diff --git a/.gitignore b/.gitignore index 5e4e0e31b..78c52c465 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ customization .*.swp *.db /customize/ +customize messages.log .DS_Store www/scratch diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a51b1ef9..bb11c061d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ Features * We spent some time improving the support ticket components of the administration panel. Tickets are now shown in four categories: tickets from premium users, tickets from non-paying users, answered tickets, and closed tickets. * We also improved the readability of some of the server's activity logs by rounding off some numbers to display fewer decimal points. On a related note, log events indicating the completion of a file upload now display the size of the uploaded file. * Errors that occur when loading teams now trigger some basic telemetry to the server to indicate the error code. This should help us determine the origin of some annoying teams issues that several users have reported. -* Users of the rich text editor should now find that their scroll position is now maintained when they are at the bottom of the document and a remote users adds more text. +* Users of the rich text editor should now find that their scroll position is maintained when they are at the bottom of the document and a remote users adds more text. Bug fixes @@ -20,6 +20,8 @@ Bug fixes * We found that shared folders were reconnecting to the server correctly after a network failure, however, some changes in the UI caused clients to incorrectly remain locked. * Some recent refactoring of some styles caused some buttons on the login page to inherit bootstrap's styles instead of our custom ones. * A third-party admin brought it to our attention that a library that was used for some development tests was being fetched via http instead of https, and was thus blocked by some of their local configuration parameters. We've updated its source to load via secure protocols only. +* The recent replacement of a link to our faq with a link to our documentation platform violated some security headers and prevented the link from loading. We've fixed the inline link with some code to open this link in a compatible way. +* Finally, we found a bug that caused custom colors in the slide app to revert to the default settings on page reloads. Custom slide colors should now be preserved. To update from 3.25.0 to 3.25.1: diff --git a/customize.dist/404.html b/customize.dist/404.html index 9298a5377..0030c2bcd 100644 --- a/customize.dist/404.html +++ b/customize.dist/404.html @@ -2,10 +2,10 @@ - CryptPad: Zero Knowledge, Collaborative Real Time Editing + CryptPad: Collaboration suite, encrypted and open-source - + diff --git a/customize.dist/CryptPad_logo.svg b/customize.dist/CryptPad_logo.svg new file mode 100644 index 000000000..1944b9142 --- /dev/null +++ b/customize.dist/CryptPad_logo.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/customize.dist/CryptPad_logo_grey.svg b/customize.dist/CryptPad_logo_grey.svg new file mode 100644 index 000000000..cbadd7697 --- /dev/null +++ b/customize.dist/CryptPad_logo_grey.svg @@ -0,0 +1,129 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/customize.dist/about.html b/customize.dist/about.html deleted file mode 100644 index 31d4c99f8..000000000 --- a/customize.dist/about.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - CryptPad: Zero Knowledge, Collaborative Real Time Editing - - - - - - - - diff --git a/customize.dist/alt-favicon.png b/customize.dist/alt-favicon.png deleted file mode 100644 index 23753684f..000000000 Binary files a/customize.dist/alt-favicon.png and /dev/null differ diff --git a/customize.dist/bg14.jpg b/customize.dist/bg14.jpg deleted file mode 100644 index 7f5211229..000000000 Binary files a/customize.dist/bg14.jpg and /dev/null differ diff --git a/customize.dist/bkabout.jpg b/customize.dist/bkabout.jpg deleted file mode 100644 index d9434609e..000000000 Binary files a/customize.dist/bkabout.jpg and /dev/null differ diff --git a/customize.dist/bkregister.jpg b/customize.dist/bkregister.jpg deleted file mode 100644 index a67a3b03e..000000000 Binary files a/customize.dist/bkregister.jpg and /dev/null differ diff --git a/customize.dist/bkwhat.jpg b/customize.dist/bkwhat.jpg deleted file mode 100644 index 90a2841e3..000000000 Binary files a/customize.dist/bkwhat.jpg and /dev/null differ diff --git a/customize.dist/code.svg b/customize.dist/code.svg deleted file mode 100644 index 29647b529..000000000 --- a/customize.dist/code.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - diff --git a/customize.dist/contact.html b/customize.dist/contact.html index 31d4c99f8..f1cf1b429 100644 --- a/customize.dist/contact.html +++ b/customize.dist/contact.html @@ -2,10 +2,10 @@ - CryptPad: Zero Knowledge, Collaborative Real Time Editing + CryptPad: Collaboration suite, encrypted and open-source - + diff --git a/customize.dist/faq.html b/customize.dist/down.html similarity index 50% rename from customize.dist/faq.html rename to customize.dist/down.html index d485505dd..6005f2ad6 100644 --- a/customize.dist/faq.html +++ b/customize.dist/down.html @@ -1,17 +1,21 @@ - + CryptPad: Zero Knowledge, Collaborative Real Time Editing - - - + +

CryptPad

+

We're temporarily offline while we recover from a bad data-center outage

+

Your data is safe, but we need to move it to a new machine. +
+
+ We'll be back as soon as possible. +

+

For the latest updates, follow us on Mastodon or Twitter.

+ diff --git a/customize.dist/favicon/alt-favicon-code.png b/customize.dist/favicon/alt-favicon-code.png new file mode 100644 index 000000000..a15038d97 Binary files /dev/null and b/customize.dist/favicon/alt-favicon-code.png differ diff --git a/customize.dist/favicon/alt-favicon-kanban.png b/customize.dist/favicon/alt-favicon-kanban.png new file mode 100644 index 000000000..1db1114ac Binary files /dev/null and b/customize.dist/favicon/alt-favicon-kanban.png differ diff --git a/customize.dist/favicon/alt-favicon-pad.png b/customize.dist/favicon/alt-favicon-pad.png new file mode 100644 index 000000000..cbc20de3c Binary files /dev/null and b/customize.dist/favicon/alt-favicon-pad.png differ diff --git a/customize.dist/favicon/alt-favicon-poll.png b/customize.dist/favicon/alt-favicon-poll.png new file mode 100644 index 000000000..2194e35b7 Binary files /dev/null and b/customize.dist/favicon/alt-favicon-poll.png differ diff --git a/customize.dist/favicon/alt-favicon-sheet.png b/customize.dist/favicon/alt-favicon-sheet.png new file mode 100644 index 000000000..0cb370f7b Binary files /dev/null and b/customize.dist/favicon/alt-favicon-sheet.png differ diff --git a/customize.dist/favicon/alt-favicon-slide.png b/customize.dist/favicon/alt-favicon-slide.png new file mode 100644 index 000000000..d3824b9dd Binary files /dev/null and b/customize.dist/favicon/alt-favicon-slide.png differ diff --git a/customize.dist/favicon/alt-favicon-whiteboard.png b/customize.dist/favicon/alt-favicon-whiteboard.png new file mode 100644 index 000000000..1f94fb6e4 Binary files /dev/null and b/customize.dist/favicon/alt-favicon-whiteboard.png differ diff --git a/customize.dist/favicon/alt-favicon.png b/customize.dist/favicon/alt-favicon.png new file mode 100644 index 000000000..f7d472090 Binary files /dev/null and b/customize.dist/favicon/alt-favicon.png differ diff --git a/customize.dist/favicon/favicon_source.svg b/customize.dist/favicon/favicon_source.svg new file mode 100644 index 000000000..46329f2fa --- /dev/null +++ b/customize.dist/favicon/favicon_source.svg @@ -0,0 +1,498 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/customize.dist/favicon/main-favicon-code.png b/customize.dist/favicon/main-favicon-code.png new file mode 100644 index 000000000..06157c70f Binary files /dev/null and b/customize.dist/favicon/main-favicon-code.png differ diff --git a/customize.dist/favicon/main-favicon-kanban.png b/customize.dist/favicon/main-favicon-kanban.png new file mode 100644 index 000000000..3a8d218ce Binary files /dev/null and b/customize.dist/favicon/main-favicon-kanban.png differ diff --git a/customize.dist/favicon/main-favicon-pad.png b/customize.dist/favicon/main-favicon-pad.png new file mode 100644 index 000000000..8c46d21dd Binary files /dev/null and b/customize.dist/favicon/main-favicon-pad.png differ diff --git a/customize.dist/favicon/main-favicon-poll.png b/customize.dist/favicon/main-favicon-poll.png new file mode 100644 index 000000000..05c8ebf45 Binary files /dev/null and b/customize.dist/favicon/main-favicon-poll.png differ diff --git a/customize.dist/favicon/main-favicon-sheet.png b/customize.dist/favicon/main-favicon-sheet.png new file mode 100644 index 000000000..6df4fd0d6 Binary files /dev/null and b/customize.dist/favicon/main-favicon-sheet.png differ diff --git a/customize.dist/favicon/main-favicon-slide.png b/customize.dist/favicon/main-favicon-slide.png new file mode 100644 index 000000000..41f98c84b Binary files /dev/null and b/customize.dist/favicon/main-favicon-slide.png differ diff --git a/customize.dist/favicon/main-favicon-teams.png b/customize.dist/favicon/main-favicon-teams.png new file mode 100644 index 000000000..3b780cc2f Binary files /dev/null and b/customize.dist/favicon/main-favicon-teams.png differ diff --git a/customize.dist/favicon/main-favicon-whiteboard.png b/customize.dist/favicon/main-favicon-whiteboard.png new file mode 100644 index 000000000..cb60edf46 Binary files /dev/null and b/customize.dist/favicon/main-favicon-whiteboard.png differ diff --git a/customize.dist/favicon/main-favicon.png b/customize.dist/favicon/main-favicon.png new file mode 100644 index 000000000..ce110f883 Binary files /dev/null and b/customize.dist/favicon/main-favicon.png differ diff --git a/customize.dist/features.html b/customize.dist/features.html index 31d4c99f8..f1cf1b429 100644 --- a/customize.dist/features.html +++ b/customize.dist/features.html @@ -2,10 +2,10 @@ - CryptPad: Zero Knowledge, Collaborative Real Time Editing + CryptPad: Collaboration suite, encrypted and open-source - + diff --git a/customize.dist/fonts/IBMPlexMono-Medium.woff b/customize.dist/fonts/IBMPlexMono-Medium.woff new file mode 100644 index 000000000..c6ca87bd1 Binary files /dev/null and b/customize.dist/fonts/IBMPlexMono-Medium.woff differ diff --git a/customize.dist/fonts/IBMPlexMono-Medium.woff2 b/customize.dist/fonts/IBMPlexMono-Medium.woff2 new file mode 100644 index 000000000..6e17c4c50 Binary files /dev/null and b/customize.dist/fonts/IBMPlexMono-Medium.woff2 differ diff --git a/customize.dist/fonts/cptools/fonts/cptools.svg b/customize.dist/fonts/cptools/fonts/cptools.svg index 8eee6df58..776b66ba3 100644 --- a/customize.dist/fonts/cptools/fonts/cptools.svg +++ b/customize.dist/fonts/cptools/fonts/cptools.svg @@ -8,22 +8,21 @@ - - + + - - - - - + + + + + - + - - - - + + + diff --git a/customize.dist/fonts/cptools/fonts/cptools.ttf b/customize.dist/fonts/cptools/fonts/cptools.ttf index 181d4268a..cfc9d1e3c 100644 Binary files a/customize.dist/fonts/cptools/fonts/cptools.ttf and b/customize.dist/fonts/cptools/fonts/cptools.ttf differ diff --git a/customize.dist/fonts/cptools/fonts/cptools.woff b/customize.dist/fonts/cptools/fonts/cptools.woff index a2b04bff9..80432d647 100644 Binary files a/customize.dist/fonts/cptools/fonts/cptools.woff and b/customize.dist/fonts/cptools/fonts/cptools.woff differ diff --git a/customize.dist/fonts/cptools/style.css b/customize.dist/fonts/cptools/style.css index 74ebac0b5..7fad69146 100644 --- a/customize.dist/fonts/cptools/style.css +++ b/customize.dist/fonts/cptools/style.css @@ -1,9 +1,9 @@ @font-face { font-family: 'cptools'; src: - url('fonts/cptools.ttf?5ntnhs') format('truetype'), - url('fonts/cptools.woff?5ntnhs') format('woff'), - url('fonts/cptools.svg?5ntnhs#cptools') format('svg'); + url('fonts/cptools.ttf?n9y2kz') format('truetype'), + url('fonts/cptools.woff?n9y2kz') format('woff'), + url('fonts/cptools.svg?n9y2kz#cptools') format('svg'); font-weight: normal; font-style: normal; font-display: block; @@ -25,6 +25,39 @@ -moz-osx-font-smoothing: grayscale; } +.cptools-sheet:before { + content: "\e908"; +} +.cptools-slide:before { + content: "\e907"; +} +.cptools-whiteboard:before { + content: "\e901"; +} +.cptools-new-template:before { + content: "\e902"; +} +.cptools-file-upload:before { + content: "\e904"; +} +.cptools-template:before { + content: "\e905"; +} +.cptools-poll:before { + content: "\e906"; +} +.cptools-kanban:before { + content: "\e90a"; +} +.cptools-code:before { + content: "\e90d"; +} +.cptools-richtext:before { + content: "\e90e"; +} +.cptools-file:before { + content: "\e90f"; +} .cptools-destroy:before { content: "\e915"; } @@ -40,54 +73,18 @@ .cptools-folder-no-color:before { content: "\e900"; } -.cptools-slide:before { - content: "\e902"; -} .cptools-shared-folder:before { content: "\e903"; } -.cptools-poll:before { - content: "\e904"; -} -.cptools-file-upload:before { - content: "\e905"; -} -.cptools-whiteboard:before { - content: "\e906"; -} -.cptools-todo:before { - content: "\e907"; -} -.cptools-pad:before { - content: "\e908"; -} .cptools-folder-open:before { content: "\e909"; } -.cptools-kanban:before { - content: "\e90a"; -} .cptools-folder:before { content: "\e90b"; } .cptools-shared-folder-open:before { content: "\e90c"; } -.cptools-file:before { - content: "\e90d"; -} -.cptools-contacts:before { - content: "\e90e"; -} -.cptools-code:before { - content: "\e90f"; -} -.cptools-template:before { - content: "\e901"; -} -.cptools-new-template:before { - content: "\e910"; -} .cptools-palette:before { content: "\e911"; } diff --git a/customize.dist/fonts/lato/Lato-Black.ttf b/customize.dist/fonts/lato/Lato-Black.ttf deleted file mode 100644 index 6848db0d1..000000000 Binary files a/customize.dist/fonts/lato/Lato-Black.ttf and /dev/null differ diff --git a/customize.dist/fonts/lato/Lato-Italic.ttf b/customize.dist/fonts/lato/Lato-Italic.ttf deleted file mode 100644 index 3d3b7a298..000000000 Binary files a/customize.dist/fonts/lato/Lato-Italic.ttf and /dev/null differ diff --git a/customize.dist/fonts/lato/Lato-Regular.ttf b/customize.dist/fonts/lato/Lato-Regular.ttf deleted file mode 100644 index 04ea8efb1..000000000 Binary files a/customize.dist/fonts/lato/Lato-Regular.ttf and /dev/null differ diff --git a/customize.dist/fonts/lato/METADATA.json b/customize.dist/fonts/lato/METADATA.json deleted file mode 100644 index 31213e2d8..000000000 --- a/customize.dist/fonts/lato/METADATA.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "name": "Lato", - "designer": "Łukasz Dziedzic", - "license": "OFL", - "visibility": "External", - "category": "Sans Serif", - "size": 51318, - "fonts": [ - { - "name": "Lato", - "style": "normal", - "weight": 100, - "filename": "Lato-Hairline.ttf", - "postScriptName": "Lato-Hairline", - "fullName": "Lato Hairline", - "copyright": "Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name \"Lato\". Licensed under the SIL Open Font License, Version 1.1." - }, - { - "name": "Lato", - "style": "italic", - "weight": 100, - "filename": "Lato-HairlineItalic.ttf", - "postScriptName": "Lato-HairlineItalic", - "fullName": "Lato Hairline Italic", - "copyright": "Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name \"Lato\". Licensed under the SIL Open Font License, Version 1.1." - }, - { - "name": "Lato", - "style": "normal", - "weight": 300, - "filename": "Lato-Light.ttf", - "postScriptName": "Lato-Light", - "fullName": "Lato Light", - "copyright": "Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name \"Lato\". Licensed under the SIL Open Font License, Version 1.1." - }, - { - "name": "Lato", - "style": "italic", - "weight": 300, - "filename": "Lato-LightItalic.ttf", - "postScriptName": "Lato-LightItalic", - "fullName": "Lato Light Italic", - "copyright": "Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name \"Lato\". Licensed under the SIL Open Font License, Version 1.1." - }, - { - "name": "Lato", - "style": "normal", - "weight": 400, - "filename": "Lato-Regular.ttf", - "postScriptName": "Lato-Regular", - "fullName": "Lato Regular", - "copyright": "Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name \"Lato\". Licensed under the SIL Open Font License, Version 1.1." - }, - { - "name": "Lato", - "style": "italic", - "weight": 400, - "filename": "Lato-Italic.ttf", - "postScriptName": "Lato-Italic", - "fullName": "Lato Italic", - "copyright": "Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name \"Lato\". Licensed under the SIL Open Font License, Version 1.1." - }, - { - "name": "Lato", - "style": "normal", - "weight": 700, - "filename": "Lato-Bold.ttf", - "postScriptName": "Lato-Bold", - "fullName": "Lato Bold", - "copyright": "Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name \"Lato\". Licensed under the SIL Open Font License, Version 1.1." - }, - { - "name": "Lato", - "style": "italic", - "weight": 700, - "filename": "Lato-BoldItalic.ttf", - "postScriptName": "Lato-BoldItalic", - "fullName": "Lato Bold Italic", - "copyright": "Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name \"Lato\". Licensed under the SIL Open Font License, Version 1.1." - }, - { - "name": "Lato", - "style": "normal", - "weight": 900, - "filename": "Lato-Black.ttf", - "postScriptName": "Lato-Black", - "fullName": "Lato Black", - "copyright": "Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name \"Lato\". Licensed under the SIL Open Font License, Version 1.1." - }, - { - "name": "Lato", - "style": "italic", - "weight": 900, - "filename": "Lato-BlackItalic.ttf", - "postScriptName": "Lato-BlackItalic", - "fullName": "Lato Black Italic", - "copyright": "Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name \"Lato\". Licensed under the SIL Open Font License, Version 1.1." - } - ], - "subsets": [ - "latin", - "latin-ext", - "menu" - ], - "dateAdded": "2010-12-15" -} diff --git a/customize.dist/fonts/lato/OFL.txt b/customize.dist/fonts/lato/OFL.txt deleted file mode 100644 index 98383e3d8..000000000 --- a/customize.dist/fonts/lato/OFL.txt +++ /dev/null @@ -1,93 +0,0 @@ -Copyright (c) 2010-2014 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato" - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/customize.dist/fonts/neuropolitical.ttf b/customize.dist/fonts/neuropolitical.ttf deleted file mode 100644 index 26bbb63ce..000000000 Binary files a/customize.dist/fonts/neuropolitical.ttf and /dev/null differ diff --git a/customize.dist/four-oh-four.js b/customize.dist/four-oh-four.js index bcae8b4b2..568faf951 100644 --- a/customize.dist/four-oh-four.js +++ b/customize.dist/four-oh-four.js @@ -9,7 +9,7 @@ define([ ], function ($, Config, h, LocalStore, Messages) { var urlArgs = Config.requireConf.urlArgs; var img = h('img#cp-logo', { - src: '/customize/cryptpad-new-logo-colors-logoonly.png?' + urlArgs + src: '/customize/CryptPad_logo_grey.svg?' + urlArgs }); var brand = h('h1#cp-brand', 'CryptPad'); diff --git a/customize.dist/images/AaronMacSween.jpg b/customize.dist/images/AaronMacSween.jpg deleted file mode 100644 index 95afcda67..000000000 Binary files a/customize.dist/images/AaronMacSween.jpg and /dev/null differ diff --git a/customize.dist/images/CalebJames.jpg b/customize.dist/images/CalebJames.jpg deleted file mode 100644 index 0e29dd116..000000000 Binary files a/customize.dist/images/CalebJames.jpg and /dev/null differ diff --git a/customize.dist/images/Catalin.jpg b/customize.dist/images/Catalin.jpg deleted file mode 100644 index 508c0692e..000000000 Binary files a/customize.dist/images/Catalin.jpg and /dev/null differ diff --git a/customize.dist/images/LudovicDuboist.jpg b/customize.dist/images/LudovicDuboist.jpg deleted file mode 100644 index 09bf4afba..000000000 Binary files a/customize.dist/images/LudovicDuboist.jpg and /dev/null differ diff --git a/customize.dist/images/Pierre-new.jpg b/customize.dist/images/Pierre-new.jpg deleted file mode 100644 index c8dafbe41..000000000 Binary files a/customize.dist/images/Pierre-new.jpg and /dev/null differ diff --git a/customize.dist/images/apps-preview.png b/customize.dist/images/apps-preview.png new file mode 100644 index 000000000..1ef33fede Binary files /dev/null and b/customize.dist/images/apps-preview.png differ diff --git a/customize.dist/images/bkcontact.jpg b/customize.dist/images/bkcontact.jpg deleted file mode 100644 index bae61ba1a..000000000 Binary files a/customize.dist/images/bkcontact.jpg and /dev/null differ diff --git a/customize.dist/images/collaboration.png b/customize.dist/images/collaboration.png new file mode 100644 index 000000000..16e5dc77b Binary files /dev/null and b/customize.dist/images/collaboration.png differ diff --git a/customize.dist/images/cover-faq.jpg b/customize.dist/images/cover-faq.jpg deleted file mode 100644 index 27be3af99..000000000 Binary files a/customize.dist/images/cover-faq.jpg and /dev/null differ diff --git a/customize.dist/images/cover-features.jpg b/customize.dist/images/cover-features.jpg deleted file mode 100644 index 6652c9b28..000000000 Binary files a/customize.dist/images/cover-features.jpg and /dev/null differ diff --git a/customize.dist/images/cover-privacy.jpg b/customize.dist/images/cover-privacy.jpg deleted file mode 100644 index ff873c99d..000000000 Binary files a/customize.dist/images/cover-privacy.jpg and /dev/null differ diff --git a/customize.dist/images/drive-grid.png b/customize.dist/images/drive-grid.png new file mode 100644 index 000000000..b9b55157e Binary files /dev/null and b/customize.dist/images/drive-grid.png differ diff --git a/customize.dist/images/drive_screenshot.png b/customize.dist/images/drive_screenshot.png deleted file mode 100644 index 74f89c06d..000000000 Binary files a/customize.dist/images/drive_screenshot.png and /dev/null differ diff --git a/customize.dist/images/email.svg b/customize.dist/images/email.svg index e2e566e6e..61f7e6137 100644 --- a/customize.dist/images/email.svg +++ b/customize.dist/images/email.svg @@ -1,25 +1,66 @@ - - - - diff --git a/customize.dist/images/github.svg b/customize.dist/images/github.svg index 16cd68786..18c5b45e8 100644 --- a/customize.dist/images/github.svg +++ b/customize.dist/images/github.svg @@ -1,22 +1,77 @@ - - - - - CryptPad: Zero Knowledge, Collaborative Real Time Editing + CryptPad: Collaboration suite, encrypted and open-source - + diff --git a/customize.dist/loading.js b/customize.dist/loading.js index cc19d3544..819e0d89d 100644 --- a/customize.dist/loading.js +++ b/customize.dist/loading.js @@ -1,5 +1,6 @@ -// dark #326599 -// light #4591c4 +// bg #e7e7e7 +// blue #0087FF +// text #3F4141 define(['/customize/messages.js'], function (Messages) { var loadingStyle = (function(){/* @font-face { @@ -21,8 +22,8 @@ define(['/customize/messages.js'], function (Messages) { bottom: 0px; left: 0px; right: 0px; - background: linear-gradient(to right, #326599 0%, #326599 50%, #4591c4 50%, #4591c4 100%); - color: #fafafa; + background-color: #e7e7e7; + color: #3F4141; font-size: 1.3em; line-height: 120%; opacity: 1; @@ -32,6 +33,9 @@ define(['/customize/messages.js'], function (Messages) { align-items: center; font: 20px 'Open Sans', 'Helvetica Neue', sans-serif !important; } +#cp-loading.cp-loading-transparent { + background-color: rgba(231, 231, 231, 0.7); +} #cp-loading.cp-loading-hidden { opacity: 0; visibility: hidden; @@ -52,35 +56,39 @@ define(['/customize/messages.js'], function (Messages) { #cp-loading .cp-loading-container { width: 700px; max-width: 90vw; - height: 500px; + height: 236px; max-height: calc(100vh - 20px); margin: 50px; flex-shrink: 0; display: flex; flex-flow: column; - justify-content: space-around; align-items: center; } -@media screen and (max-height: 800px) { - #cp-loading .cp-loading-container { - height: auto; - } -} -@media screen and (max-width: 600px) { - #cp-loading .cp-loading-container { - height: auto; - } -} #cp-loading .cp-loading-cryptofist { margin-left: auto; margin-right: auto; - //height: 300px; max-width: 90vw; max-height: 300px; width: auto; height: auto; margin-bottom: 2em; } +@media screen and (max-width: 500px) { + #cp-loading { + font-size: 16px !important; + } + #cp-loading .cp-loading-container { + height: 206px; + } +} +@media screen and (max-height: 700px) { + #cp-loading { + font-size: 16px !important; + } + #cp-loading .cp-loading-container { + height: 206px; + } +} @media screen and (max-height: 500px) { #cp-loading .cp-loading-logo { display: none; @@ -170,14 +178,11 @@ p.cp-password-info{ } #cp-loading .cp-loading-spinner-container { position: relative; - height: 100px; -} -#cp-loading .cp-loading-spinner-container > div { - height: 100px; + height: 80px; + margin-bottom: 50px; } .cp-loading-progress { width: 100%; - margin: 20px; text-align: center; } .cp-loading-progress p { @@ -189,10 +194,13 @@ p.cp-password-info{ .cp-loading-progress-list { text-align: left; display: inline-block; + margin-bottom: 50px; + max-width: 100%; } .cp-loading-progress-list ul { list-style: none; padding-left: 0; + margin: 0; } .cp-loading-progress-list li { padding: 0px 5px; @@ -200,6 +208,9 @@ p.cp-password-info{ -moz-user-select: none; -ms-user-select: none; user-select: none; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } .cp-loading-progress-list li i { width: 22px; @@ -214,10 +225,11 @@ p.cp-password-info{ .cp-loading-progress-bar { height: 24px; background: white; + border: 1px solid #0087FF; } .cp-loading-progress-bar-value { height: 100%; - background: #5cb85c; + background: #0087FF; } @keyframes spin { @@ -234,7 +246,7 @@ p.cp-password-info{ box-sizing: border-box; width: 80px; height: 80px; - border: 11px solid white; + border: 11px solid #999999; border-radius: 50%; border-top-color: transparent; animation: spin infinite 3s; @@ -263,7 +275,7 @@ button:not(.btn).primary:hover{ loadingStyle, '', '', '
', '
', diff --git a/customize.dist/main-favicon.png b/customize.dist/main-favicon.png index 212975b6d..ce110f883 100644 Binary files a/customize.dist/main-favicon.png and b/customize.dist/main-favicon.png differ diff --git a/customize.dist/maintenance.html b/customize.dist/maintenance.html index 6815de38b..0f224d69b 100644 --- a/customize.dist/maintenance.html +++ b/customize.dist/maintenance.html @@ -1,10 +1,10 @@ - CryptPad: Zero Knowledge, Collaborative Real Time Editing + CryptPad: Collaboration suite, encrypted and open-source - + - - - - - - diff --git a/customize.dist/src/less2/include/alertify.less b/customize.dist/src/less2/include/alertify.less index 344e590b5..fd52420b0 100644 --- a/customize.dist/src/less2/include/alertify.less +++ b/customize.dist/src/less2/include/alertify.less @@ -1,3 +1,4 @@ + @import (reference) "./colortheme-all.less"; @import (reference) "./browser.less"; @import (reference) "./variables.less"; @@ -168,6 +169,23 @@ &:last-child { margin-bottom: 0; } + .cp-info-menu-container { + .logo-block { + text-align: center; + h6 { + font-family: "IBM Plex Mono"; + font-size: 30px; + margin-top: 5px; + } + img { + max-width: 100px; + } + } + a { + color: @colortheme_logo-2; + text-decoration: underline; + } + } } .cp-alertify-type-container { overflow: visible !important; @@ -248,7 +266,7 @@ } } - .fa-question-circle { // help links to FAQ + .fa-question-circle { // help links to Docs color: @colortheme_logo-2; &:hover { text-decoration: none; diff --git a/customize.dist/src/less2/include/colortheme.less b/customize.dist/src/less2/include/colortheme.less index 3b232be81..38c0c6139 100644 --- a/customize.dist/src/less2/include/colortheme.less +++ b/customize.dist/src/less2/include/colortheme.less @@ -4,11 +4,13 @@ @colortheme_app-font: @colortheme_app-font-size @colortheme_font; @colortheme_logo-1: #326599; -@colortheme_logo-2: #4591c4; +@colortheme_logo-2: #0087FF; +@colortheme_logo_2_light: lighten(@colortheme_logo-2, 40%); +@colortheme_loading_bg: #E7E7E7; @colortheme_link-color: #0275D8; @colortheme_link-color-visited: #005999; -@colortheme_info-background: #fafafa; +@colortheme_info-background: #eeeeee; @colortheme_old-base: #302B28; @colortheme_old-fore: #fafafa; @@ -33,7 +35,7 @@ @colortheme_modal-fg: @colortheme_form-color-alt; @colortheme_modal-link: @colortheme_link-color; @colortheme_modal-link-visited: lighten(@colortheme_modal-link, 10%); -@colortheme_modal-dim: fade(@colortheme_logo-2, 50%); // TODO transparent background behind modals +@colortheme_modal-dim: fade(@cryptpad_text_col, 50%); // TODO transparent background behind modals @colortheme_modal-input: @colortheme_form-bg; @colortheme_modal-input-fg: @colortheme_form-color; @@ -74,89 +76,31 @@ @colortheme_userlist-bg: #eee; @colortheme_pad-chat-bg: #AAA; -@colortheme_pad-bg: #256ad5; -@colortheme_pad-color: #fff; -@colortheme_pad-warn: #ffae00; +@colortheme_apps: { + default: #0087FF; + drive: #0087FF; + pad: #256ad5; + code: #EAA000; + slide: #e57614; + poll: #2c9e98; + whiteboard: #a72ba7; + kanban: #8C4; + sheet: #40865c; + oodoc: #5170B5; + ooslide: #C65D27; + file: #CD2532; +} + +@colortheme_static_apps: { + default: #0087FF; + teams: #4A3BBD; + contacts: #607B8D; +} -@colortheme_slide-bg: #e57614; -@colortheme_slide-color: #fff; -@colortheme_slide-warn: #005868; - -@colortheme_code-bg: #EAA000; -@colortheme_code-color: #000; -@colortheme_code-warn: #9A37F7; - -@colortheme_poll-bg: #2c9e98; @colortheme_poll-color: #fff; @colortheme_poll-help-bg: #bbffbb; @colortheme_poll-th-bg: #005bef; @colortheme_poll-th-fg: #fff; -@colortheme_poll-warn: #ffade3; - -@colortheme_whiteboard-bg: #a72ba7; -@colortheme_whiteboard-color: #fff; -@colortheme_whiteboard-warn: #ffae00; - -@colortheme_drive-bg: #0087FF; -@colortheme_drive-color: #fff; -@colortheme_drive-warn: #cd2532; - -@colortheme_teams-bg: #4a3bbd; -@colortheme_teams-color: #fff; -@colortheme_teams-warn: #cd2532; - -@colortheme_file-bg: #cd2532; -@colortheme_file-color: #fff; -@colortheme_file-warn: #ffae00; - -@colortheme_friends-bg: #607b8d; -@colortheme_friends-color: #fff; -@colortheme_friends-warn: #cd2532; - -@colortheme_default-bg: #326599; -@colortheme_default-color: #FFF; -@colortheme_default-warn: #cd2532; - -@colortheme_settings-bg: #0087ff; -@colortheme_settings-color: #fff; -@colortheme_settings-warn: #cd2532; - -@colortheme_profile-bg: #0087ff; -@colortheme_profile-color: #fff; -@colortheme_profile-warn: #cd2532; - -@colortheme_todo-bg: #999; -@colortheme_todo-color: #3F4141; -@colortheme_todo-warn: #cd2532; - -@colortheme_oodoc-bg: #5170B5; -@colortheme_oodoc-color: #FFF; -@colortheme_oodoc-warn: #cd2532; - -@colortheme_ooslide-bg: #c65d27; -@colortheme_ooslide-color: #FFF; -@colortheme_ooslide-warn: #cd2532; - -@colortheme_oocell-bg: #40865c; -@colortheme_oocell-color: #FFF; -@colortheme_oocell-warn: #ffbcc0; - -@colortheme_kanban-bg: #8C4; -@colortheme_kanban-color: #000; -@colortheme_kanban-warn: #e6385d; - -@colortheme_admin-bg: #0087ff; -@colortheme_admin-color: #FFF; -@colortheme_admin-warn: #ffae00; - -@colortheme_notifications-bg: #0087ff; -@colortheme_notifications-color: #000; -@colortheme_notifications-warn: #e34a85; - -@colortheme_support-bg: #0087ff; -@colortheme_support-color: #000; -@colortheme_support-warn: #9A37F7; - // Sidebar layout (profile / settings) @colortheme_sidebar-active: #fff; diff --git a/customize.dist/src/less2/include/creation.less b/customize.dist/src/less2/include/creation.less index ccf4ce5b1..daef0b876 100644 --- a/customize.dist/src/less2/include/creation.less +++ b/customize.dist/src/less2/include/creation.less @@ -5,21 +5,21 @@ @import (reference) "./avatar.less"; .creation_vars( - @color: @colortheme_default-color, - @bg-color: @colortheme_default-bg + @bg-color: @colortheme_apps[default] ) { - @creation-color: @color; + @creation-color: @cryptpad_text_col; @creation-bg-color: @bg-color; + @creation-bg-color-light: lighten(@bg-color, 30%); }; .creation_main( - @color: @colortheme_default-color, - @bg-color: @colortheme_default-bg + @bg-color: @colortheme_apps[default] ) { --LessLoader_require: LessLoader_currentFile(); - .creation_vars(@color, @bg-color); - --creation-color: @color; + .creation_vars(@bg-color); + --creation-color: @cryptpad_text_col; --creation-bg-color: @bg-color; + --creation-bg-color-light: @creation-bg-color-light; } & { .creation_vars(); @@ -32,7 +32,7 @@ z-index: 100000000; // #loading * 10 top: 0px; //background: @colortheme_loading-bg; - background: linear-gradient(to right, @colortheme_loading-bg 0%, @colortheme_loading-bg 50%, @colortheme_loading-bg-alt 50%, @colortheme_loading-bg-alt 100%); + background: @colortheme_loading_bg; color: @colortheme_loading-color; display: flex; flex-flow: column; /* we need column so that the child can shrink vertically */ @@ -41,16 +41,19 @@ width: 100%; height: 100%; overflow: auto; + .cp-creation-fill { + flex: 1 1 50%; + } .cp-creation-logo { height: 300px; - width: 300px; - margin-top: 50px; - flex: 0 1 auto; /* allows shrink */ + width: 200px; min-height: 0; text-align: center; img { + margin-top: 50px; + margin-bottom: 50px; max-width: 100%; - max-height: 100%; + max-height: ~"calc(100% - 100px)"; } } } @@ -63,9 +66,9 @@ outline: none; width: 700px; max-width: 90vw; - height: 550px; - max-height: calc(~"100vh - 20px"); - margin: 50px; + height: 500px; + max-height: ~"calc(100vh - 20px)"; + margin: 0px; flex-shrink: 0; display: flex; flex-flow: column; @@ -77,42 +80,66 @@ text-align: left; } + .cp-creation-checkboxes { + flex-flow: column; + align-items: baseline !important; + max-height: 150px; + min-height: 120px !important; + justify-content: space-evenly; + flex: 1; + & > div { + display: flex; + width: 100%; + max-width: 100%; + margin: auto; + text-align: left; + } + } + + .cp-creation-title { - color: @colortheme_creation-modal-title; - font-weight: bold; - margin: 15px; + font-size: 20px; + display: flex; + flex-flow: column; + align-items: center; + margin-top: 15px; + margin-bottom: 15px; + .cp-icon { + margin-bottom: 5px; + font-size: 50px; + } + .cp-creation-title-text { + position: relative; + a { + position: absolute; + top: 7px; + margin-left: 30px; + font-size: 16px; + color: inherit; + } + } } .cp-creation-create { - margin-top: 0px; + justify-content: center; + margin-top: 10px; + margin-bottom: 15px; button { .tools_unselectable(); - padding: 15px; - background: linear-gradient(to right, @colortheme_logo-2, @colortheme_logo-1); + padding: 6px; + background: @colortheme_logo-2; + font-size: 20px; color: #FFF; - font-weight: bold; margin: 3px 10px; border: none; cursor: pointer; outline: none; - width: 100%; + text-transform: uppercase; &:hover { - background: linear-gradient(to right, lighten(@colortheme_logo-2, 5%), lighten(@colortheme_logo-1, 5%)); - //background: darken(@creation-button, 5%); - //background: lighten(@creation-button, 5%); + background: lighten(@colortheme_logo-2, 5%); } } } - .cp-creation-create { - text-align: center; - //margin: auto; - //margin-top: 20px; - width: 400px; - max-width: 100%; - button { - margin: 0; - } - } #cp-creation-form { display: flex; @@ -121,7 +148,7 @@ flex: 1 0 auto; justify-content: space-around; & > div { - width: 400px; + width: 300px; max-width: 100%; display: flex; align-items: center; @@ -169,11 +196,11 @@ input, select { font-size: 14px; - border: 1px solid @colortheme_form-border; + border: 1px solid @colortheme_form-bg; height: 26px; line-height: 26px; - background-color: @colortheme_form-bg; - color: @colortheme_form-color; + //background-color: @colortheme_form-bg; + color: @cryptpad_text_col; } .cp-creation-teams { @@ -224,7 +251,10 @@ .cp-creation-expire-picker { text-align: center; input { - width: 50px; + width: 45px; + margin: 0 5px; + padding: 0; + padding-left: 3px; margin: 0 5px; } select { @@ -241,6 +271,7 @@ } } .cp-creation-password { + flex-flow: column; .cp-creation-password-picker { text-align: center; width: 100%; @@ -280,6 +311,7 @@ width: 100%; //flex: 1 0 auto; flex-wrap: nowrap; + justify-content: space-between; .cp-creation-template-more { font-size: 30px; cursor: pointer; @@ -301,34 +333,34 @@ } .cp-creation-template-container { width: 100%; + max-width: ~"calc(100% - 60px)"; flex: 1; display: flex; - flex-wrap: wrap; - justify-content: center; + flex-flow: column wrap; //overflow-y: auto; + max-height: 159px; align-items: center; .cp-creation-template-element { box-shadow: 2px 2px 7px @colortheme_form-border; - width: 135px; - padding: 5px; + width: 300px; + max-width: calc(100% - 10px); + padding: 2px; margin: 5px; display: inline-flex; - flex-flow: column; - box-sizing: content-box; + box-sizing: border-box; text-align: left; line-height: 1em; cursor: pointer; - color: black; + color: @creation-color; + color: var(--creation-color); border: 1px solid transparent; &.cp-creation-template-selected, &:hover { - color: @creation-color !important; - color: var(--creation-color) !important; - background-color: @creation-bg-color !important; - background-color: var(--creation-bg-color) !important; + background-color: @creation-bg-color-light; + background-color: var(--creation-bg-color-light); .fa, .cptools { color: @creation-color; color: var(--creation-color); @@ -340,9 +372,10 @@ align-items: center; img { - max-width: 100px; - max-height: 100px; + max-width: 30px; + max-height: 30px; background: #fff; + margin-right: 10px; } .cp-creation-template-element-name { @@ -353,18 +386,15 @@ min-height: 20px; height: 20px; line-height: 20px; - margin-top: 5px; max-width: 100%; } .fa, .cptools { color: @creation-bg-color; color: var(--creation-bg-color); cursor: pointer; - width: 100px; - height: 100px; - font-size: 70px; + font-size: 30px; text-align: center; - line-height: 100px; + margin-right: 10px; } } } @@ -384,67 +414,43 @@ } } - @media screen and (max-height: 700px) { - #cp-creation-container { - .cp-creation-logo { - //flex-shrink: 0; - display: none; - } + @media screen and (max-height: 850px) { + #cp-creation-container { + .cp-creation-logo img { + display: none; } } - @media screen and (max-width: 500px) { - #cp-creation { - #cp-creation-form { - & > div { - width: 95%; - margin: 10px auto; - } - .cp-creation-expire { - &.active { - label { - flex: 1; - } - .cp-creation-slider { - flex: none; - order: 10; - width: 100%; - } + } + @media screen and (max-width: 400px) { + #cp-creation { + #cp-creation-form { + & > div { + width: 95%; + margin: 0 auto; + } + .cp-creation-expire { + &.active { + label { + flex: 1; + } + .cp-creation-slider { + flex: none; + order: 10; + width: 100%; } } } } } - @media screen and (max-width: @browser_media-medium-screen) { - #cp-creation { - height: auto; - #cp-creation-form { - div.cp-creation-template { - margin: 0; - padding: 5px; - .cp-creation-template-container { - .cp-creation-template-element { - flex-flow: row; - margin: 1px; - padding: 5px; - width: 155px; - img { - display: none; - } - .fa { - font-size: 18px; - width: 20px; - height: 20px; - line-height: 20px; - display: inline !important; - } - .cp-creation-template-element-name { - margin: 0; - margin-left: 5px; - } - } - } - } + } + @media screen and (max-width: 800px) { + #cp-creation { + height: 550px; + #cp-creation-form { + div.cp-creation-template { + flex-flow: column; } } } + } } diff --git a/customize.dist/src/less2/include/drive.less b/customize.dist/src/less2/include/drive.less index e09dc0a0f..da2b10485 100644 --- a/customize.dist/src/less2/include/drive.less +++ b/customize.dist/src/less2/include/drive.less @@ -12,8 +12,7 @@ .limit-bar_main(); .tokenfield_main(); - @colortheme_drive-bg-light: lighten(@colortheme_drive-bg, 30%); - @colortheme_drive-bg-active: lighten(@colortheme_drive-bg, 20%); + @colortheme_drive-bg-active: lighten(@colortheme_static_apps[default], 20%); @colortheme_drive-color: @cryptpad_text_col; @drive_hover: #eee; @@ -819,7 +818,6 @@ font-size: @colortheme_app-font-size; padding: 0 5px; border: 0; - //background: @colortheme_drive-bg-active; color: @colortheme_drive-color; box-sizing: border-box; overflow: hidden; @@ -868,8 +866,11 @@ border: 1px solid @colortheme_modal-fg; li:not(.cp-app-drive-element-selected):hover { - background: @colortheme_modal-fg; - color: @colortheme_modal-bg; + background: @colortheme_logo_2_light; + color: @cryptpad_text_col; + .cptools { + color: @cryptpad_text_col; + } } .cp-modal { display: flex; @@ -896,6 +897,7 @@ } .cp-app-drive-new-name { + color: @cryptpad_text_col; white-space: nowrap; } diff --git a/customize.dist/src/less2/include/fileupload.less b/customize.dist/src/less2/include/fileupload.less index 0353b06eb..d2f2fff18 100644 --- a/customize.dist/src/less2/include/fileupload.less +++ b/customize.dist/src/less2/include/fileupload.less @@ -16,7 +16,7 @@ box-sizing: border-box; z-index: 100001; //Z file upload table container: just above the file picker display: none; - color: darken(@colortheme_drive-bg, 10%); + color: darken(@colortheme_static_apps[default], 10%); max-height: 180px; overflow-y: auto; diff --git a/customize.dist/src/less2/include/font.less b/customize.dist/src/less2/include/font.less index 627a9a9f8..7b3eff709 100644 --- a/customize.dist/src/less2/include/font.less +++ b/customize.dist/src/less2/include/font.less @@ -2,11 +2,12 @@ --LessLoader_require: LessLoader_currentFile(); } -// Fonts need to go on the global scope @font-face { - font-family: Neuropolitical; - src: url("/customize/fonts/neuropolitical.ttf"); -} + font-family: 'IBM Plex Mono'; + font-style: normal; + font-weight: 500; + src: url("/customize/fonts/IBMPlexMono-Medium.woff2") format("woff2"), url("/customize/fonts/IBMPlexMono-Medium.woff") format("woff"); } + // Fonts need to go on the global scope @font-tools { diff --git a/customize.dist/src/less2/include/forms.less b/customize.dist/src/less2/include/forms.less index a7939eacd..b6d909a73 100644 --- a/customize.dist/src/less2/include/forms.less +++ b/customize.dist/src/less2/include/forms.less @@ -204,6 +204,9 @@ background-color: fade(@colortheme_alertify-cancel-border, 25%); } } + &.btn-register { + margin-top: 10px !important; + } diff --git a/customize.dist/src/less2/include/framework.less b/customize.dist/src/less2/include/framework.less index 7876195c1..da379a164 100644 --- a/customize.dist/src/less2/include/framework.less +++ b/customize.dist/src/less2/include/framework.less @@ -20,9 +20,7 @@ @import (reference) "./modals-ui-elements.less"; .framework_main( - @bg-color: @colortheme_default-bg, // color of the toolbar background - @warn-color: @colortheme_default-warn, // color of the warning text in the toolbar - @color: @colortheme_default-color, // Color of the text for the toolbar + @bg-color: @colortheme_apps[default] ) { --LessLoader_require: LessLoader_currentFile(); // Set the HTML style for the apps which shouldn't have a body scrollbar @@ -35,8 +33,6 @@ .toolbar_main( @bg-color: @bg-color, - @warn-color: @warn-color, - @color: @color ); .alertify_main(); .modals-ui-elements_main(); @@ -48,7 +44,6 @@ .checkmark_main(20px); .password_main(); .messenger_main( - @color: @cryptpad_text_col, @bg-color: @colortheme_pad-chat-bg ); .cursor_main(); @@ -57,15 +52,12 @@ .mentions_main(); .creation_main( @bg-color: @bg-color, - @color: @color ); font: @colortheme_app-font; }; .framework_min_main( - @color: @colortheme_default-color, // Color of the text for the toolbar - @bg-color: @colortheme_default-bg, // color of the toolbar background - @warn-color: @colortheme_default-warn, // color of the warning text in the toolbar + @bg-color: @colortheme_static_apps[default] ) { --LessLoader_require: LessLoader_currentFile(); // Set the HTML style for the apps which shouldn't have a body scrollbar @@ -78,8 +70,6 @@ .toolbar_main( @bg-color: @bg-color, - @warn-color: @warn-color, - @color: @color ); .fileupload_main(); .alertify_main(); diff --git a/customize.dist/src/less2/include/icon-colors.less b/customize.dist/src/less2/include/icon-colors.less index 776a7c443..0d7ecb121 100644 --- a/customize.dist/src/less2/include/icon-colors.less +++ b/customize.dist/src/less2/include/icon-colors.less @@ -3,43 +3,15 @@ --LessLoader_require: LessLoader_currentFile(); } & { - // Classes used in common-interface.js - .cp-icon-color-pad { color: @colortheme_pad-bg; } - .cp-icon-color-code { color: @colortheme_code-bg; } - .cp-icon-color-slide { color: @colortheme_slide-bg; } - .cp-icon-color-poll { color: @colortheme_poll-bg; } - .cp-icon-color-file { color: @colortheme_file-bg; } - .cp-icon-color-contacts { color: @colortheme_friends-bg; } - .cp-icon-color-whiteboard { color: @colortheme_whiteboard-bg; } - .cp-icon-color-drive { color: @colortheme_drive-bg; } - .cp-icon-color-settings { color: @colortheme_settings-bg; } - .cp-icon-color-profile { color: @colortheme_settings-bg; } - .cp-icon-color-default { color: @colortheme_default-bg; } - .cp-icon-color-todo { color: @colortheme_todo-bg; } - .cp-icon-color-oodoc { color: @colortheme_oodoc-bg; } - .cp-icon-color-ooslide { color: @colortheme_ooslide-bg; } - .cp-icon-color-sheet { color: @colortheme_oocell-bg; } - .cp-icon-color-kanban { color: @colortheme_kanban-bg; } - .cp-icon-color-admin { color: @colortheme_admin-bg; } - .cp-icon-color-teams { color: @colortheme_teams-bg; } - .cp-border-color-pad { border-color: @colortheme_pad-bg !important; } - .cp-border-color-code { border-color: @colortheme_code-bg !important; } - .cp-border-color-slide { border-color: @colortheme_slide-bg !important; } - .cp-border-color-poll { border-color: @colortheme_poll-bg !important; } - .cp-border-color-file { border-color: @colortheme_file-bg !important; } - .cp-border-color-contacts { border-color: @colortheme_friends-bg !important; } - .cp-border-color-whiteboard { border-color: @colortheme_whiteboard-bg !important; } - .cp-border-color-drive { border-color: @colortheme_drive-bg !important; } - .cp-border-color-settings { border-color: @colortheme_settings-bg !important; } - .cp-border-color-profile { border-color: @colortheme_settings-bg !important; } - .cp-border-color-default { border-color: @colortheme_default-bg !important; } - .cp-border-color-todo { border-color: @colortheme_todo-bg !important; } - .cp-border-color-oodoc { border-color: @colortheme_oodoc-bg !important; } - .cp-border-color-ooslide { border-color: @colortheme_ooslide-bg !important; } - .cp-border-color-sheet { border-color: @colortheme_oocell-bg !important; } - .cp-border-color-kanban { border-color: @colortheme_kanban-bg !important; } - .cp-border-color-admin { border-color: @colortheme_admin-bg !important; } - .cp-border-color-teams { border-color: @colortheme_teams-bg !important; } + each(@colortheme_apps, { + .cp-icon-color-@{key} { color: @value; } + }); + + each(@colortheme_apps, { + @val: @{value} !important; + .cp-border-color-@{key} { border-color: @val; } + }); + } diff --git a/customize.dist/src/less2/include/icons.less b/customize.dist/src/less2/include/icons.less index ebadf5185..228e10c3d 100644 --- a/customize.dist/src/less2/include/icons.less +++ b/customize.dist/src/less2/include/icons.less @@ -16,13 +16,13 @@ height: 24px; margin: 0; display: inline-block; - font-size: 14px; //align-items: center; //justify-content: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; word-wrap: break-word; + color: @cryptpad_text_col; } &.cp-icons-element-selected { background-color: rgba(0,0,0,0.2); diff --git a/customize.dist/src/less2/include/infopages.less b/customize.dist/src/less2/include/infopages.less index 3df7b4c1d..535b2afe8 100644 --- a/customize.dist/src/less2/include/infopages.less +++ b/customize.dist/src/less2/include/infopages.less @@ -10,6 +10,9 @@ transform: scale(1.05); } } +.cp-shadow() { + box-shadow: 0px 0px 25px 0px rgba(0, 0, 0, 0.34); +} .infopages_main () { --LessLoader_require: LessLoader_currentFile(); @@ -21,9 +24,10 @@ body { // Basic setup for info pages, this should be used at the global level background-color: @colortheme_info-background; + color: @cryptpad_text_col; a { - color: @cryptpad_color_blue; - &:visited { color: darken(@cryptpad_color_blue, 5%); } + color: @colortheme_logo-2; + &:visited { color: darken(@colortheme_logo-2, 5%); } } a:hover { opacity: 1; @@ -38,13 +42,14 @@ body { padding-top: @infopages_padding; padding-bottom: @infopages_padding; min-height: 75vh; + max-width: 950px; h1 { font-size: 3em; margin-bottom: 0.5em; } h2 { - font-size: 2em; - margin-top: 1em; + font-size: 1.8em; + margin-top: 20px; margin-bottom: 0.5em; } h3 { @@ -57,7 +62,40 @@ body { float: left; } max-width: 100%; + margin-top: 20px; + } + .cp-page-title { + h1 { + font-family: "IBM Plex Mono"; + color: @colortheme_logo-2; + margin: 50px auto; + } } + .row.cp-page-section { + margin: 50px 0px; + } + img.cp-shadow { + .cp-shadow(); + } + + button { + outline: none; + background-color: @colortheme_logo-2; + color: @colortheme_base; + border: none; + padding: 10px 20px; + border-radius: 0px; + cursor: pointer; + &:hover, &:focus { + background-color: darken(@colortheme_logo-2, 5%); + } + } + button.cp-secondary { + background-color: white; + color: @colortheme_logo-2; + border: 1px solid @colortheme_logo-2; + } + .form-group { & > * { margin-top: 0.5em; @@ -79,40 +117,48 @@ body { } } footer { - background-color: @cryptpad_color_blue; + @footer-color: #d9d9d9; // XXX use/make variable + + background-color: @footer-color; + padding-top: 20px; .container { - .col { - margin-top: 1em; + margin-bottom: 20px; + a { + color: @colortheme_logo-2; + &:visited { + color: @colortheme_logo-2; + }; } - a { - color: #fff; - &:visited { - color: darken(#fff, 5%); - }; } - margin-bottom: 1em; - ul.list-unstyled { - margin-top: 1em; - text-align: center; + .cp-logo-foot { + display: flex; + flex-flow: column; + width: 100%; + align-items: center; + img { + max-width: 60px; + display: block; } - } - .cp-bio-foot { - background-image: url(/customize/CryptPad-white-logo.svg); - background-size: 100%; - background-repeat: no-repeat; - p { - color: #fff; - padding-top: 30%; - margin-bottom: 0; + .logo-font { + display: block; + font-family: "IBM Plex Mono"; + font-size: 1.5rem; + color: @colortheme_logo-2; + margin-bottom: 10px; } } .cp-version-footer { - background-color: @cryptpad_color_blue; - color: #fff; - text-align: center; + background-color: @footer-color; + display: flex; + flex-flow: column; + align-items: center; padding: 0.5em; - border-top: 2px solid #fff; + border-top: 1px solid #fff; + select { + min-width: 0; + margin-bottom: 10px; + } } } @@ -155,14 +201,18 @@ body { // navigation top bar .navbar { - background: #fff; + width: 100%; + color: @colortheme_logo-2; .navbar-brand { display: block; - background-image: url(/customize/CryptPad_logo_color.svg); - background-repeat: no-repeat; - background-size: contain; height: 50px; width: 250px; + font-family: "IBM Plex Mono"; + font-size: 1.8em; + img { + max-width: 40px; + margin-right: 10px; + } @media (max-width: 326px) { width: 180px; } @@ -171,15 +221,18 @@ body { a { border: 2px solid transparent; white-space: nowrap; + &:visited { + color: @colortheme_logo-2; + } } .nav-link { padding: 0.5em 0.7em; &:hover { - color: @cryptpad_color_light_blue; + color: @cryptpad_text_col; } } .cp-register-btn { - border: 2px solid #4591C4; + border: 2px solid @colortheme_logo-2; display: inline-block; } button:focus { @@ -187,7 +240,7 @@ body { } .navbar-toggler { margin-top: 10px; - color: #4591C4; + color: @colortheme_logo-2; } } @media (max-width: 1000px) { @@ -211,13 +264,5 @@ body { text-align: center; } } - - //footer general styles - - .footer-title { - font-weight: bold; - font-size: 1.2em; - color: #1E1F1F; - } } diff --git a/customize.dist/src/less2/include/leftside-menu.less b/customize.dist/src/less2/include/leftside-menu.less index 1cf84e41b..bd92601c8 100644 --- a/customize.dist/src/less2/include/leftside-menu.less +++ b/customize.dist/src/less2/include/leftside-menu.less @@ -3,6 +3,9 @@ @import (reference) "./colortheme-all.less"; .leftside-menu_main() { + div.cp-empty-rule { + display: block; // XXX workaround lesshint complaining about empty rules + } } .leftside-menu-category_main() { .unselectable_make(); diff --git a/customize.dist/src/less2/include/messenger.less b/customize.dist/src/less2/include/messenger.less index 66ad741bb..f5ace3444 100644 --- a/customize.dist/src/less2/include/messenger.less +++ b/customize.dist/src/less2/include/messenger.less @@ -2,10 +2,9 @@ @import (reference) "./colortheme-all.less"; .messenger_vars ( - @color: @colortheme_friends-color, // color of the toolbar text - @bg-color: @colortheme_friends-bg, // color of the toolbar background + @bg-color: @colortheme_static_apps[contacts], // color of the toolbar background ) { - @msg-color: @color; + @msg-color: @cryptpad_text_col; @msg-bg-color: @bg-color; @msg-bg-color-light: lighten(@bg-color, 15%); @msg-bg-color-lighter: lighten(@bg-color, 20%); @@ -13,11 +12,10 @@ @msg-bg-color-darker: darken(@bg-color, 20%); }; .messenger_main( - @color: @colortheme_friends-color, // color of the toolbar text - @bg-color: @colortheme_friends-bg, // color of the toolbar background + @bg-color: @colortheme_static_apps[contacts], // color of the toolbar background ) { --LessLoader_require: LessLoader_currentFile(); - .messenger_vars(@color, @bg-color); + .messenger_vars(@bg-color); --msg-color: @msg-color; --msg-bg-color: @msg-bg-color; --msg-bg-color-light: @msg-bg-color-light; diff --git a/customize.dist/src/less2/include/toolbar.less b/customize.dist/src/less2/include/toolbar.less index 9adef38ce..70abfea03 100644 --- a/customize.dist/src/less2/include/toolbar.less +++ b/customize.dist/src/less2/include/toolbar.less @@ -12,9 +12,7 @@ @import (reference) "./notifications.less"; .toolbar_vars ( - @color: @colortheme_default-color, // Color of the text for the toolbar - @bg-color: @colortheme_default-bg, // color of the toolbar background - @warn-color: @colortheme_default-warn // color of the warning text in the toolbar + @bg-color: @colortheme_apps[default], // color of the toolbar background ) { @toolbar-bg-color: @bg-color; @toolbar-bg-color-light: lighten(@bg-color, 30%); @@ -22,13 +20,10 @@ }; .toolbar_main ( - @color: @colortheme_default-color, // Color of the text for the toolbar - @bg-color: @colortheme_default-bg, // color of the toolbar background - @warn-color: @colortheme_default-warn, // color of the warning text in the toolbar - @barWidth: 600px // width of the toolbar + @bg-color: @colortheme_apps[default], // color of the toolbar background ) { --LessLoader_require: LessLoader_currentFile(); - .toolbar_vars(@color, @bg-color, @warn-color); + .toolbar_vars(@bg-color); --toolbar-bg-color: @toolbar-bg-color; --toolbar-bg-color-light: @toolbar-bg-color-light; @@ -271,8 +266,11 @@ border: 1px solid @colortheme_modal-fg; &:hover { //border: 1px solid @colortheme_modal-fg; - background: @colortheme_modal-fg; - color: @colortheme_modal-bg; + background: @colortheme_logo_2_light; + color: @cryptpad_text_col; + .cptools { + color: @cryptpad_text_col; + } } } .cp-modal { @@ -282,7 +280,7 @@ cursor: pointer; } &> p { - margin: 50px; + margin: 20px; } &> div { flex: 1; @@ -293,7 +291,7 @@ } &> div:last-child { flex: unset; - margin: 50px 0; + margin: 20px 0; } } @@ -811,10 +809,8 @@ padding: 10px; svg { - * { - fill: @toolbar-bg-color; - fill: var(--toolbar-bg-color); - } + fill: @toolbar-bg-color; + fill: var(--toolbar-bg-color); } img { @@ -1055,7 +1051,7 @@ &.fa-hashtag { order: 10; } &.fa-bookmark { order: 15; } &.fa-upload { order: 20; } - &.fa-clone { order: 25; } + &.fa-files-o { order: 25; } &.fa-download { order: 30; } &.fa-print { order: 35; } &.fa-trash { order: 40; } @@ -1125,6 +1121,7 @@ .cp-toolbar-spinner { color: @cryptpad_text_col; + font-family: "Open Sans"; font-size: 14px; padding: 0 8px; height: 20px; diff --git a/customize.dist/src/less2/pages/page-404.less b/customize.dist/src/less2/pages/page-404.less index 9ff9cdcc3..a42391e66 100644 --- a/customize.dist/src/less2/pages/page-404.less +++ b/customize.dist/src/less2/pages/page-404.less @@ -5,6 +5,9 @@ html, body { .font_main(); margin: 0px; padding: 0px; + background-color: @colortheme_info-background; + color: @cryptpad_text_col; + font-family: "IBM Plex Mono"; #cp-main { height: 100vh; @@ -18,7 +21,6 @@ html, body { margin: auto; } #cp-brand { - font-family: neuropolitical; font-size: 40px; } #cp-title { @@ -27,10 +29,6 @@ html, body { #cp-scramble, #cp-link { font-size: 20px; } - #cp-title, #cp-scramble, #cp-link { - //font-family: 'Open Sans'; - font-family: monospace; - } } } diff --git a/customize.dist/src/less2/pages/page-about.less b/customize.dist/src/less2/pages/page-about.less deleted file mode 100644 index 23ce14e93..000000000 --- a/customize.dist/src/less2/pages/page-about.less +++ /dev/null @@ -1,118 +0,0 @@ -@import (reference) "../include/infopages.less"; -@import (reference) "../include/colortheme-all.less"; - -&.cp-page-about { - .infopages_main(); - - #cp-main { - background: #fff; - } - .cp-about-intro { - padding-top: 3em; - padding-bottom: 3em; - background-image: url(/customize/bkabout.jpg); - background-size: cover; - background-repeat: no-repeat; - background-position: center; - .container { - color: #fff; - font-family: "Open Sans"; - h1 { - font-weight: 700; - } - a { - color: #fff; - text-decoration: underline; - } - p { - padding-top: 1em; - } - } - } - .cp-container { - .row { - background: #fff; - } - .cp-bio-avatar { - padding-right: 0; - @media (max-width: 991px) { - padding-right: 15px; - } - img { - @media (max-width: 991px) { - margin: 0 auto; - display: block; - } - } - } - .cp-bio-avatar-right { - padding-right: 15px; - padding-left: 0; - @media (max-width: 991px) { - padding-left: 15px; - } - } - } - .cp-develop-about { - .cp-icon-cent { - width: 6rem; - background: #fff; - border-radius: 50%; - height: 6rem; - box-shadow: 0 5px 15px rgba(69,145,196, 0.3); - margin: 0 auto; - background-image: url(/customize/code.svg); - background-repeat: no-repeat; - margin-top: 1em; - margin-bottom: 1.5em; - background-position: 50%; - background-size: 4rem; - } - h2 { - margin-top: 0; - font-weight: 600; - color: #1E1F1F; - margin-bottom: 1.5em; - } - } - .cp-profile-det { - padding-left: 30px; - h3 { - color: #1E1F1F; - font-weight: 700; - } - p { - color: #3F4141; - margin-bottom: 1em; - } - hr { - margin-left: 0; - width: 15rem; - border-top: 2px solid @cryptpad_color_blue; - } - margin-bottom: 1em; - } - .cp-soc-media { - font-size: 1.5em; - color: @cryptpad_color_blue; - padding-right: 1em; - display: inline-block; - &:hover { - transform: scale(1.1); - } - &:visited { - color: @cryptpad_color_blue; - } - } - .cp-contrib { - margin-top: 3em; - .cp-icon-cent { - background-image: url(/customize/source-branch.svg); - background-position: 60%; - } - } - .cp-margin-bot { - margin-bottom: 1.5em; - } -} - diff --git a/customize.dist/src/less2/pages/page-contact.less b/customize.dist/src/less2/pages/page-contact.less index 9f4ed74af..4ae651d61 100644 --- a/customize.dist/src/less2/pages/page-contact.less +++ b/customize.dist/src/less2/pages/page-contact.less @@ -7,11 +7,9 @@ .fa { padding-right: 0.25em; } - #cp-main { - background-color: #fff; - } + .cp-container { - background: #fff; + .cp-iconCont { h4 { margin-top: 1.5em; @@ -19,12 +17,13 @@ } div { .card { - box-shadow: 0 5px 15px rgba(69,145,196, 0.3); - border-color: #fff; + .cp-shadow(); + border-radius: 0; margin-bottom: 1em; + border: 0; &:hover, &:focus { text-decoration: none; - transform: scale(1.05); + background-color: @colortheme_logo_2_light; } @media (max-width: 1200px) and (min-width: 769px) { min-height: 139px; @@ -39,7 +38,7 @@ min-height: 162px; } img { - max-width: 50px; + width: 80px; margin-bottom: 10px; } p { @@ -49,22 +48,11 @@ align-items: center; margin: 0; height: 100%; + font-size: 1.3em; } } } } } - .cp-contdet { - padding-top: 3em; - padding-bottom: 3em; - background-image: url(/customize/images/bkcontact.jpg); - background-size: cover; - background-repeat: no-repeat; - background-position: center; - h1 { - font-weight: 700; - color: #fff; - } - } } diff --git a/customize.dist/src/less2/pages/page-faq.less b/customize.dist/src/less2/pages/page-faq.less deleted file mode 100644 index 96ba157e1..000000000 --- a/customize.dist/src/less2/pages/page-faq.less +++ /dev/null @@ -1,86 +0,0 @@ -@import (reference) "../include/infopages.less"; -@import (reference) "../include/colortheme-all.less"; - -&.cp-page-faq { - .infopages_main(); - - #cp-main { - background: #fff; - } - .cp-faq { - padding-top: 3em; - padding-bottom: 3em; - background-image: url(/customize/images/cover-faq.jpg); - background-size: cover; - background-repeat: no-repeat; - background-position: center; - .container { - color: #fff; - font-family: "Open Sans"; - } - h1 { - font-weight: 700; - } - } - - .cp-faq-ques-det { - .cp-faq-header { - a { - padding: 0; - h4 { - margin-top: 1.5rem; - margin-bottom: 1.5rem; - .cp-brand-font { - font-family: "Neuropolitical"; - } - } - } - } - } - .cp-faq-container { - .cp-faq-questions-items { - background: #3a84b6; - color: #fff; - padding: 1rem 1rem 0.5rem 1rem; - margin-bottom: 1rem; - } - .cp-faq-questions-q { - padding: 0; - margin-bottom: 0.5rem; - cursor: pointer; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - &:hover { - text-decoration: none; - } - &:after { - content: '\f067'; - font-family: FontAwesome; - font-weight: normal; - font-style: normal; - float: right; - text-decoration: none; - font-size: 13px; - line-height: 1.5; - } - } - .cp-faq-questions-q.active-faq { - &:after { - content: '\f068'; - } - } - .cp-faq-questions-a { - display: none; - padding: 0.5rem; - margin-bottom: 0.5rem; - background-color: #fff; - color: #212529; - } - margin-bottom: 1.5rem; - } -} - diff --git a/customize.dist/src/less2/pages/page-features.less b/customize.dist/src/less2/pages/page-features.less index 08bdbfc95..95c79b1b0 100644 --- a/customize.dist/src/less2/pages/page-features.less +++ b/customize.dist/src/less2/pages/page-features.less @@ -4,21 +4,6 @@ &.cp-page-features { .infopages_main(); - #cp-main { - background-color: #fff; - } - .cp_cont_features { - padding-top: 3em; - padding-bottom: 3em; - background-image: url('/customize/images/cover-features.jpg'); - background-size: cover; - background-repeat: no-repeat; - background-position: center; - h1 { - font-weight: 700; - color: #fff; - } - } .cp-features-register { text-align: center; padding: 20px; @@ -26,31 +11,33 @@ .cp-features-register-button { font-size: 20px; color: #fff; - background: @cryptpad_color_blue; - border: 2px solid @cryptpad_color_blue; + background: @colortheme_logo-2; border-radius: 0; &:hover { - transform: scale(1.05); cursor: pointer; } - padding: 0.5em 1em; } .cp-features-web { .card { - box-shadow: 0 5px 15px rgba(69, 145, 196, 0.3); + .cp-shadow(); border: none; - .card-body { + .title-card { + background-color: @colortheme_logo-2; + padding: 20px; + } + .card-body, .title-card { display: flex; justify-content: center; align-items: center; flex-flow: column; + padding: 12px; h3 { margin: 0; } &.cp-pricing { div { font-size: 1.2em; - color: @cryptpad_color_blue; + color: @colortheme_logo-2; &:first-child { font-weight: bold; } @@ -80,7 +67,7 @@ content: "\f00c"; font-family: "FontAwesome"; font-size: 14px; - color: @cryptpad_color_blue; + color: @colortheme_logo-2; } } &.cp-content { @@ -96,35 +83,22 @@ div.cp-note { font-size: 0.8em; } - a.voted { - opacity: 0.6; - margin-left: 15px; - &:hover { - opacity: 1; - } - } .list-group-item { - border-color: rgba(69, 145, 196, 0.125); - } - } - .cp-anon-user { - .card-body { - &:first-of-type { - background-color: @cryptpad_color_blue; + border-bottom: 1px solid rgba(0,0,0,0.125); + &:first-child { + border-top: 1px solid rgba(0,0,0,0.125); + } + &:last-child { + border-bottom-right-radius: 0px; + border-bottom-left-radius: 0px; } } } + .cp-regis-user { @media (max-width:575px) { margin-top: 3em; } - .card-body { - &:first-of-type { - background: #4591C4; - background: -webkit-linear-gradient(to right, #FF7C4F, #4592C4); // lesshint duplicateProperty: false - background: linear-gradient(to right, #FF7C4F, #4592C4); // lesshint duplicateProperty: false - } - } } } diff --git a/customize.dist/src/less2/pages/page-index.less b/customize.dist/src/less2/pages/page-index.less index b0070de53..98fe7ae4b 100644 --- a/customize.dist/src/less2/pages/page-index.less +++ b/customize.dist/src/less2/pages/page-index.less @@ -4,13 +4,7 @@ &.cp-page-index { .infopages_main(); - @background_lighter: rgba(0,0,0,0.1); - @background_darker: rgba(0,0,0,0.4); #cp-main { - color: #FFF; - background: linear-gradient( @background_darker, @background_lighter ), url('/customize/bg14.jpg'); - background-size: cover; - background-position: center; min-height: 100vh; display: flex; flex-direction: column; @@ -31,6 +25,7 @@ } body { font-family: "Open Sans", Helvetica; + color: @cryptpad_text_col; } .cp-right { .cp-register-btn { @@ -48,57 +43,38 @@ } } } + .cp-home-hero { + width: 100%; + margin-bottom: 50px; + align-self: center; + align-items: center; + } .cp-title { display: flex; align-items: center; + justify-content: center; flex-direction: column; + color: @colortheme_logo-2; margin-top: 1.5em; img { - height: 20vh; + max-width: 200px; margin-bottom: 1.5em; } margin-left: 0; h1 { - font-family: "Neuropolitical"; + font-family: "IBM Plex Mono"; + font-weight: 500; //font-family: Garamond, Baskerville, "Baskerville Old Face", "Hoefler Text", "Times New Roman", Times, serif; //font-family: "Raleway"; - font-size: 45px; + font-size: 3.7rem; } - p { - //font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; - font-size: 20px; + .tag-line { + text-align: center; + font-size: 1.4em; //font-style: italic; } } - .navbar { - background: transparent; - width: 100%; - @media only screen and (max-device-width: 991px) { - margin-top: 0; - } - .navbar-brand { - background-image: url(/customize/CryptPad-white-logo.svg); - } - a { - color: #fff; - &:visited { - color: rgba(255,255,255,.9); - }; - } - .nav-link { - &:hover { - color: inherit; - transform: scale(1.05); - }; - } - .cp-register-btn { - border: 2px solid #fff; - } - .navbar-toggler { - margin-top: 10px; - color: #fff; - } - } + @callout-padding: 15px; a:hover { text-decoration: none; @@ -107,28 +83,26 @@ .cp-app-grid { display: flex; flex-wrap: wrap; - & > a { - margin: 20px; + justify-content: space-around; + a { + margin: 10px; + } + @media screen and (max-width: 768px) { + margin-top: 40px; } } @icons-size: 120px; - @icons-text-size: 30px; + @icons-text-size: 24px; .bs-callout { display: flex; align-items: stretch; margin: 0; - background: rgba(255,255,255,0.6); - color: black; - transition: all .1s ease-in-out; box-sizing: border-box; position: relative; flex-flow: column; - height: @icons-size; + //height: @icons-size; width: @icons-size; - a { - color: black; - &:hover { text-decoration-line: none; } - } + div h4 { @media only screen and (min-device-width: 576px) and (max-device-width: 767px) { font-size: 1.3em; @@ -148,17 +122,20 @@ .fa, .cptools { display: flex; align-items: center; - font-size: @icons-size - 60px; + font-size: 3.5em; justify-content: center; width: @icons-size; - height: @icons-size - @icons-text-size; - transition: width 0.1s; - color: #fff; + padding: 10px 10px 0px 10px; + //height: @icons-size - @icons-text-size; } &.cp-app-disabled { cursor: not-allowed !important; opacity: 0.5; } + .pad-button-text { + color: @cryptpad_text_col; + padding: 5px; + } } h4 { margin: 0; @@ -171,21 +148,22 @@ } .bs-callout:hover { - //color: white; - transform: scale(1.05); cursor: pointer; } .bs-callout:hover.cp-callout-more { transform: none !important; } - .cp-callout-pad .cptools { background-color: @colortheme_pad-bg; } - .cp-callout-code .cptools { background-color: @colortheme_code-bg; } - .cp-callout-slide .cptools { background-color: @colortheme_slide-bg; } - .cp-callout-poll .cptools { background-color: @colortheme_poll-bg; } - .cp-callout-kanban .cptools { background-color: @colortheme_kanban-bg; } - .cp-callout-whiteboard .cptools { background-color: @colortheme_whiteboard-bg; } - .cp-callout-drive .fa { background-color: @colortheme_drive-bg; } - .cp-callout-sheet .fa { background-color: @colortheme_oocell-bg; } + + each(@colortheme_apps, { + .cp-callout-@{key} { + i { color: @value; } + &:hover { + background-color: lighten(@value, 30%); + i { color: @cryptpad_text_col; } + } + } + }); + .cp-hidden { display: none !important; } .cp-callout-more { display: inline-block; @@ -209,43 +187,13 @@ } } - .cp-index-block-help { - button { - outline: none; - background-color: @colortheme_logo-2; - color: @colortheme_base; - border: none; - padding: 10px 20px; - border-radius: 44px; - cursor: pointer; - &:hover { - background-color: lighten(@colortheme_logo-2, 3%); - } - } - } - - .cp-index-block { - min-height: 100%; - & > div { - background: rgba(0,0,0,0.5); - margin: 0 5px; - padding: 15px 10px; - height: 100%; - display: flex; - flex-flow: column; - justify-content: space-evenly; - } - .cp-img-container { - display: flex; - } - img, a.img { - margin: auto; - background: white; - &.agpl { - max-height: 50px; - } - &.ngi { - max-height: 100px; + #cp-main { + .cp-container { + .row.cp-index-section { + margin: 50px 0px; + .small-logo { + max-width: 40%; + } } } } diff --git a/customize.dist/src/less2/pages/page-login.less b/customize.dist/src/less2/pages/page-login.less index 61d1f18c1..98eafe483 100644 --- a/customize.dist/src/less2/pages/page-login.less +++ b/customize.dist/src/less2/pages/page-login.less @@ -19,29 +19,16 @@ } } .cp-container { - #data { - background: #4591C4; - padding-top: 3em; - padding-bottom: 7em; - padding-left: 30px; - padding-right: 30px; - p { - color: #fff; - } - h2 { - font-weight: 700; - color: @cryptpad_header_col; - } - } #userForm { - padding-top: 3em; - padding-bottom: 2em; + .cp-shadow(); + background-color: white; + padding: 10px; .form-control { border-radius: 0; color: @cryptpad_text_col; - margin-top: 1em; + margin-bottom: 5px; &:focus { - border-color: @cryptpad_color_blue; + border-color: @colortheme_logo-2; } } .checkbox-container { @@ -54,24 +41,13 @@ } .extra { margin-top: 1em; - .login { - background: @cryptpad_color_blue; - color: #fff; - padding: 10px; - border-radius: 0; - &:hover { - transform: scale(1.05); - } - } + #register { - border-color: @cryptpad_color_blue; + border-color: @colortheme_logo-2; background: #fff; - color: @cryptpad_color_blue; + color: @colortheme_logo-2; padding: 10px; border-radius: 0; - &:hover { - transform: scale(1.05); - } } } } diff --git a/customize.dist/src/less2/pages/page-privacy.less b/customize.dist/src/less2/pages/page-privacy.less index 2f6418e40..30f979859 100644 --- a/customize.dist/src/less2/pages/page-privacy.less +++ b/customize.dist/src/less2/pages/page-privacy.less @@ -4,48 +4,5 @@ &.cp-page-privacy { .infopages_main(); - #cp-main { - background: #fff; - } - .cp-privacy-top { - padding-top: 3em; - padding-bottom: 3em; - background-image: url(/customize/images/cover-privacy.jpg); - background-size: cover; - background-repeat: no-repeat; - background-position: center; - .container { - color: #fff; - font-family: "Open Sans"; - h1 { - font-weight: 700; - } - a { - color: #fff; - text-decoration: underline; - } - p { - padding-top: 1em; - } - } - } - .cp-privacy { - background-image: url(/customize/CryptPadlogo_op5.svg); - background-size: cover; - background-repeat: no-repeat; - background-position: center; - hr { - margin-left: 0; - width: 15rem; - border-top: 2px solid #4591C4; - } - h3 { - color: #1E1F1F; - font-weight: 700; - } - p { - color: #3F4141; - } - } } diff --git a/customize.dist/src/less2/pages/page-register.less b/customize.dist/src/less2/pages/page-register.less index cc319a0e4..0c03d57e4 100644 --- a/customize.dist/src/less2/pages/page-register.less +++ b/customize.dist/src/less2/pages/page-register.less @@ -39,48 +39,16 @@ display: none; } } - .cp-register-wel { - padding-top: 6em; - padding-bottom: 20em; - background-image: url(/customize/bkregister.jpg); - background-size: cover; - background-repeat: no-repeat; - background-position: center; - h1 { - font-weight: 700; - color: #fff; - text-shadow: 0 1px 5px rgba(0,0,0,.2); - } - } .cp-register-det { - margin-top: -7em; - background: #fff; - box-shadow: 0 5px 15px rgba(69,145,196, 0.3); - #data { - // Old browsers - background: #4591C4; - - // Chrome 10-25, Safari 5.1-6 - background: -webkit-linear-gradient(to right, #FF7C4F, #4592C4); // lesshint duplicateProperty: false - - // W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ - background: linear-gradient(to right, #FF7C4F, #4592C4); // lesshint duplicateProperty: false - padding-top: 3em; - padding-bottom: 7em; - padding-left: 30px; - padding-right: 30px; p { - color: #fff; li { margin-bottom: 1em; } .fa { - font-size: 1.5em; padding-right: 10px; - color: #000; } } h3 { @@ -88,13 +56,24 @@ margin-bottom: 1em; } } + .cp-reg-form { + img { + margin-top: 0px; + position: relative; + z-index: 0; + } + } #userForm { - padding-top: 3em; - padding-bottom: 2em; + padding: 15px; + background-color: white; + position: relative; + z-index: 2; + margin-bottom: 100px; + .cp-shadow(); .form-control { border-radius: 0; color: @cryptpad_text_col; - margin-top: 1em; + margin-top: 5px; &:focus { border-color: @cryptpad_color_blue; } @@ -103,42 +82,27 @@ color: @cryptpad_text_col; } } - .cp-login-register { - color: @cryptpad_color_blue; - background: #fff; - border: 2px solid @cryptpad_color_blue; - border-radius: 0; - &:hover { - transform: scale(1.05); + + .cp-register-notes { + ul.cp-notes-list { + list-style: none; + margin-left: 0; + padding-left: 30px; + position: relative; + li { + margin-bottom: 10px; + &::before { + position: absolute; + left: 0; + font-family: "FontAwesome"; + content: "\f071"; + } + .red { + color: #ff0000; + } + } } } } - .cp-register-test { - margin-top: 3em; - hr { - width: 15rem; - border-top: 2px solid @cryptpad_color_blue; - margin-top: 0; - margin-bottom: 2em; - } - p { - margin-bottom: 0; - } - .cp-test-source { - font-style: italic; - } - .test-details { - padding-left: 4em; - background-image: url(/customize/testimonial.svg); - background-repeat: no-repeat; - background-position: left top; - background-size: 3em; - color: @cryptpad_text_col; - } - - } - #cp-main { - background: #fff; - } } diff --git a/customize.dist/src/less2/pages/page-what-is-cryptpad.less b/customize.dist/src/less2/pages/page-what-is-cryptpad.less index f26188fe7..4fabcf50b 100644 --- a/customize.dist/src/less2/pages/page-what-is-cryptpad.less +++ b/customize.dist/src/less2/pages/page-what-is-cryptpad.less @@ -4,42 +4,35 @@ &.cp-page-what-is-cryptpad { .infopages_main(); - .cp-what-is { - padding-top: 3em; - padding-bottom: 3em; - background-image: url(/customize/bkwhat.jpg); - background-size: cover; - background-repeat: no-repeat; - background-position: center; - color: #fff; - h1 { - font-weight: 700; - } - } - #cp-main { - background: #fff; - } - .cp-container { - padding-top: 3em; - padding-bottom: 3em; - h2 { - margin-top: 0; - font-weight: 700; - color: @cryptpad_header_col; - } - p { - color: @cryptpad_text_col; - } - #zeroknowledge { - width: 65%; - } - .row { - margin-bottom: 1.5em; - } + .small-logos { img { - display: block; - margin: 0 auto; + max-width: 40%; + padding: 10px; + margin-top: 0px; } } + + // .cp-container { + // padding-top: 3em; + // padding-bottom: 3em; + // h2 { + // margin-top: 0; + // font-weight: 700; + // color: @cryptpad_header_col; + // } + // p { + // color: @cryptpad_text_col; + // } + // #zeroknowledge { + // width: 65%; + // } + // .row { + // margin-bottom: 1.5em; + // } + // img { + // display: block; + // margin: 0 auto; + // } + // } } diff --git a/customize.dist/src/template.html b/customize.dist/src/template.html index 31d4c99f8..2fe8b478c 100644 --- a/customize.dist/src/template.html +++ b/customize.dist/src/template.html @@ -2,10 +2,10 @@ - CryptPad: Zero Knowledge, Collaborative Real Time Editing + CryptPad: Collaboration suite,encrypted and open-source - + diff --git a/customize.dist/template.js b/customize.dist/template.js index e53772041..427dafd00 100644 --- a/customize.dist/template.js +++ b/customize.dist/template.js @@ -54,10 +54,6 @@ $(function () { require([ '/customize/main.js', ], function () {}); } else if (/invite/.test(pathname)) { require([ '/invite/main.js'], function () {}); - } else if (/faq/.test(pathname)) { - var hash = window.location.hash; - window.location.hash = ''; - window.location.hash = hash; } else { require([ '/customize/main.js', ], function () {}); } diff --git a/customize.dist/terms.html b/customize.dist/terms.html index 31d4c99f8..f1cf1b429 100644 --- a/customize.dist/terms.html +++ b/customize.dist/terms.html @@ -2,10 +2,10 @@ - CryptPad: Zero Knowledge, Collaborative Real Time Editing + CryptPad: Collaboration suite, encrypted and open-source - + diff --git a/customize.dist/testimonial.svg b/customize.dist/testimonial.svg deleted file mode 100644 index 4c1b0074e..000000000 --- a/customize.dist/testimonial.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - -testimonial - - - - - - - diff --git a/customize.dist/what-is-cryptpad.html b/customize.dist/what-is-cryptpad.html index 31d4c99f8..f1cf1b429 100644 --- a/customize.dist/what-is-cryptpad.html +++ b/customize.dist/what-is-cryptpad.html @@ -2,10 +2,10 @@ - CryptPad: Zero Knowledge, Collaborative Real Time Editing + CryptPad: Collaboration suite, encrypted and open-source - + diff --git a/docs/debugging.md b/docs/debugging.md new file mode 100644 index 000000000..5d9cfd580 --- /dev/null +++ b/docs/debugging.md @@ -0,0 +1,2 @@ +* compare your conf against `cryptpad/docs/example.nginx.conf` +* diff --git a/lib/defaults.js b/lib/defaults.js index 4110e63d4..246994d7c 100644 --- a/lib/defaults.js +++ b/lib/defaults.js @@ -50,17 +50,15 @@ Default.httpHeaders = function () { "Access-Control-Allow-Origin": "*", }; }; - +// XXX check here for any deleted pages Default.mainPages = function () { return [ 'index', 'privacy', 'terms', - 'about', 'contact', 'what-is-cryptpad', 'features', - 'faq', 'maintenance' ]; }; diff --git a/package-lock.json b/package-lock.json index ecdbfb9a9..a7c734b9a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,44 @@ "resolved": "https://registry.npmjs.org/@mcrowe/minibloom/-/minibloom-0.2.0.tgz", "integrity": "sha1-G+2WrsGDiBmNo3RDiZssP/WUgFM=" }, + "@mrmlnc/readdir-enhanced": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", + "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", + "dev": true, + "requires": { + "call-me-maybe": "^1.0.1", + "glob-to-regexp": "^0.3.0" + } + }, + "@nodelib/fs.stat": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", + "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", + "dev": true + }, + "@types/glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==", + "dev": true, + "requires": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "@types/minimatch": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", + "dev": true + }, + "@types/node": { + "version": "14.14.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.16.tgz", + "integrity": "sha512-naXYePhweTi+BMv11TgioE2/FXU4fSl29HAH1ffxVciNsH3rYXjNP2yM8wqmSm7jS20gM8TIklKiTen+1iVncw==", + "dev": true + }, "accepts": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", @@ -31,12 +69,6 @@ "uri-js": "^4.2.2" } }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -46,6 +78,33 @@ "color-convert": "^1.9.0" } }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", @@ -66,6 +125,12 @@ "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", "dev": true }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, "asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", @@ -90,6 +155,12 @@ "dev": true, "optional": true }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, "async-limiter": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", @@ -102,6 +173,12 @@ "dev": true, "optional": true }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -122,6 +199,61 @@ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, "bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", @@ -168,11 +300,87 @@ "concat-map": "0.0.1" } }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, "bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "call-me-maybe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", + "dev": true + }, + "caller-callsite": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", + "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", + "dev": true, + "requires": { + "callsites": "^2.0.0" + } + }, + "caller-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", + "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", + "dev": true, + "requires": { + "caller-callsite": "^2.0.0" + } + }, + "callsites": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", + "dev": true + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -214,6 +422,40 @@ "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } } }, "cli": { @@ -226,6 +468,16 @@ "glob": "^7.1.1" } }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -257,6 +509,12 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -292,12 +550,36 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true }, + "cosmiconfig": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", + "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", + "dev": true, + "requires": { + "import-fresh": "^2.0.0", + "is-directory": "^0.3.1", + "js-yaml": "^3.13.1", + "parse-json": "^4.0.0" + } + }, + "cssesc": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-2.0.0.tgz", + "integrity": "sha512-MsCAG1z9lPdoO/IUMLSBWBSVxVtJ1395VGIQ+Fc2gNdkQ1hNDnQdw3YhA71WJCBW1vdwA0cAnk/DnW6bqoEUYg==", + "dev": true + }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -322,6 +604,53 @@ "ms": "2.0.0" } }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -397,15 +726,6 @@ "domelementtype": "1" } }, - "dot-prop": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.2.0.tgz", - "integrity": "sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A==", - "dev": true, - "requires": { - "is-obj": "^2.0.0" - } - }, "ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -443,6 +763,15 @@ "prr": "~1.0.1" } }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -454,6 +783,12 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, "etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", @@ -465,6 +800,41 @@ "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", "dev": true }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, "express": { "version": "4.16.4", "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", @@ -509,6 +879,92 @@ "dev": true, "optional": true }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", @@ -523,6 +979,20 @@ "dev": true, "optional": true }, + "fast-glob": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz", + "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==", + "dev": true, + "requires": { + "@mrmlnc/readdir-enhanced": "^2.2.1", + "@nodelib/fs.stat": "^1.1.2", + "glob-parent": "^3.1.0", + "is-glob": "^4.0.0", + "merge2": "^1.2.3", + "micromatch": "^3.1.10" + } + }, "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -530,6 +1000,29 @@ "dev": true, "optional": true }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, "finalhandler": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", @@ -550,6 +1043,12 @@ "integrity": "sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg==", "dev": true }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -574,6 +1073,15 @@ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, "fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", @@ -609,6 +1117,12 @@ "tiny-each-async": "2.0.3" } }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -633,24 +1147,53 @@ "path-is-absolute": "^1.0.0" } }, - "globby": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", - "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", "dev": true, "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } } }, - "graceful-fs": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", - "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==" + "glob-to-regexp": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", + "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", + "dev": true + }, + "globby": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz", + "integrity": "sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==", + "dev": true, + "requires": { + "@types/glob": "^7.1.1", + "array-union": "^1.0.2", + "dir-glob": "^2.2.2", + "fast-glob": "^2.2.6", + "glob": "^7.1.3", + "ignore": "^4.0.3", + "pify": "^4.0.1", + "slash": "^2.0.0" + } + }, + "graceful-fs": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", + "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==" }, "har-schema": { "version": "2.0.0", @@ -670,21 +1213,44 @@ "har-schema": "^2.0.0" } }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, "htmlparser2": { "version": "3.8.3", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", @@ -730,9 +1296,9 @@ } }, "ignore": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", - "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true }, "image-size": { @@ -748,6 +1314,16 @@ "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=", "dev": true }, + "import-fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", + "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", + "dev": true, + "requires": { + "caller-path": "^2.0.0", + "resolve-from": "^3.0.0" + } + }, "indexes-of": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", @@ -774,12 +1350,133 @@ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==" }, - "is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": true }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-directory": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", + "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", + "dev": true + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -787,12 +1484,24 @@ "dev": true, "optional": true }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, "isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", "dev": true }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", @@ -800,11 +1509,15 @@ "dev": true, "optional": true }, - "js-base64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.1.tgz", - "integrity": "sha512-M7kLczedRMYX4L8Mdh4MzyAMM9O5osx+4FcOQuTvr3A9F2D9S5JXheN0ewNbrvK2UatkTRhL5ejGmGSjNMiZuw==", - "dev": true + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } }, "jsbn": { "version": "0.1.1", @@ -829,6 +1542,12 @@ "strip-json-comments": "1.0.x" } }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", @@ -915,6 +1634,12 @@ } } }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, "less": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/less/-/less-3.7.1.tgz", @@ -941,28 +1666,27 @@ } }, "lesshint": { - "version": "4.6.5", - "resolved": "https://registry.npmjs.org/lesshint/-/lesshint-4.6.5.tgz", - "integrity": "sha512-aTKYRG498nnVWDCAHdb9dRHdp7gP92Fa5rKdMFt6z3HfyxB2EkO8ce3hekn3E2/TR4+ROWcNL4M5ot8SpC0slg==", + "version": "6.3.7", + "resolved": "https://registry.npmjs.org/lesshint/-/lesshint-6.3.7.tgz", + "integrity": "sha512-ontd3g1seYMgeTusLTrm5NMYllLrQs4QFPkqh6GCut2CSG2csMpFbLfd/GJTQIlJXX8ixPQ4i27NeElMuftGaQ==", "dev": true, "requires": { "commander": "^2.8.0", - "globby": "^7.0.0", + "cosmiconfig": "^5.0.1", + "globby": "^9.1.0", "lodash.merge": "^4.0.1", - "lodash.sortby": "^4.0.1", - "minimatch": "^3.0.2", - "postcss": "^6.0.0", - "postcss-less": "^1.1.3", - "postcss-selector-parser": "^3.0.0", - "postcss-values-parser": "^1.3.1", - "rcfinder": "^0.1.8", - "strip-json-comments": "^2.0.0" + "lodash.orderby": "^4.6.0", + "postcss": "^7.0.14", + "postcss-less": "^3.1.1", + "postcss-selector-parser": "^5.0.0", + "postcss-values-parser": "^2.0.0", + "strip-json-comments": "^3.0.0" }, "dependencies": { "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true } } @@ -987,22 +1711,16 @@ "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", "dev": true }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, "lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "lodash.sortby": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", - "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", + "lodash.orderby": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.orderby/-/lodash.orderby-4.6.0.tgz", + "integrity": "sha1-5pfwTOXXhSL1TZM4syuBozk+TrM=", "dev": true }, "looper": { @@ -1010,6 +1728,21 @@ "resolved": "https://registry.npmjs.org/looper/-/looper-3.0.0.tgz", "integrity": "sha1-LvpUw7HLq6m5Su4uWRSwvlf7t0k=" }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -1020,11 +1753,38 @@ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, "mime": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", @@ -1059,6 +1819,27 @@ "dev": true, "optional": true }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, "mkdirp": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.3.tgz", @@ -1074,6 +1855,25 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, "negotiator": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", @@ -1096,6 +1896,55 @@ "dev": true, "optional": true }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, "on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", @@ -1125,11 +1974,33 @@ "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", "dev": true }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -1148,6 +2019,14 @@ "dev": true, "requires": { "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } } }, "performance-now": { @@ -1158,20 +2037,26 @@ "optional": true }, "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", "dev": true }, "postcss": { - "version": "6.0.23", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", - "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "version": "7.0.35", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", + "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", "dev": true, "requires": { - "chalk": "^2.4.1", + "chalk": "^2.4.2", "source-map": "^0.6.1", - "supports-color": "^5.4.0" + "supports-color": "^6.1.0" }, "dependencies": { "source-map": { @@ -1183,85 +2068,29 @@ } }, "postcss-less": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/postcss-less/-/postcss-less-1.1.5.tgz", - "integrity": "sha512-QQIiIqgEjNnquc0d4b6HDOSFZxbFQoy4MPpli2lSLpKhMyBkKwwca2HFqu4xzxlKID/F2fxSOowwtKpgczhF7A==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/postcss-less/-/postcss-less-3.1.4.tgz", + "integrity": "sha512-7TvleQWNM2QLcHqvudt3VYjULVB49uiW6XzEUFmvwHzvsOEF5MwBrIXZDJQvJNFGjJQTzSzZnDoCJ8h/ljyGXA==", "dev": true, "requires": { - "postcss": "^5.2.16" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", - "dev": true - }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "js-base64": "^2.1.9", - "source-map": "^0.5.6", - "supports-color": "^3.2.3" - } - }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", - "dev": true, - "requires": { - "has-flag": "^1.0.0" - } - } + "postcss": "^7.0.14" } }, "postcss-selector-parser": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", - "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-5.0.0.tgz", + "integrity": "sha512-w+zLE5Jhg6Liz8+rQOWEAwtwkyqpfnmsinXjXg6cY7YIONZZtgvE0v2O0uhQBs0peNomOJwWRKt6JBfTdTd3OQ==", "dev": true, "requires": { - "dot-prop": "^5.2.0", + "cssesc": "^2.0.0", "indexes-of": "^1.0.1", "uniq": "^1.0.1" } }, "postcss-values-parser": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/postcss-values-parser/-/postcss-values-parser-1.5.0.tgz", - "integrity": "sha512-3M3p+2gMp0AH3da530TlX8kiO1nxdTnc3C6vr8dMxRLIlh8UYkz0/wcwptSXjhtx2Fr0TySI7a+BHDQ8NL7LaQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/postcss-values-parser/-/postcss-values-parser-2.0.1.tgz", + "integrity": "sha512-2tLuBsA6P4rYTNKCXYG/71C7j1pU6pK503suYOmn4xYrQIzW+opD+7FAFNuGSdZC/3Qfy334QbeMu7MEb8gOxg==", "dev": true, "requires": { "flatten": "^1.0.2", @@ -1341,15 +2170,6 @@ "unpipe": "1.0.0" } }, - "rcfinder": { - "version": "0.1.9", - "resolved": "https://registry.npmjs.org/rcfinder/-/rcfinder-0.1.9.tgz", - "integrity": "sha1-8+gPOH3fmugK4wpBADKWQuroERU=", - "dev": true, - "requires": { - "lodash.clonedeep": "^4.3.2" - } - }, "readable-stream": { "version": "1.1.14", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", @@ -1362,6 +2182,28 @@ "string_decoder": "~0.10.x" } }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, "request": { "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", @@ -1391,6 +2233,24 @@ "uuid": "^3.3.2" } }, + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, "rimraf": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", @@ -1405,6 +2265,15 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -1470,6 +2339,29 @@ "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", "dev": true }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, "setprototypeof": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", @@ -1482,11 +2374,118 @@ "dev": true }, "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", "dev": true }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, "sortify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/sortify/-/sortify-1.0.4.tgz", @@ -1501,6 +2500,40 @@ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", "dev": true }, + "source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "dev": true, + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, "sshpk": { "version": "1.16.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", @@ -1528,6 +2561,27 @@ } } }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, "statuses": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", @@ -1548,15 +2602,6 @@ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", "dev": true }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, "strip-json-comments": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", @@ -1564,9 +2609,9 @@ "dev": true }, "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", "dev": true, "requires": { "has-flag": "^3.0.0" @@ -1586,6 +2631,48 @@ "os-tmpdir": "~1.0.1" } }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, "tough-cookie": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", @@ -1631,6 +2718,18 @@ "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, "uniq": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", @@ -1647,6 +2746,52 @@ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + } + } + }, "uri-js": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", @@ -1657,6 +2802,18 @@ "punycode": "^2.1.0" } }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", diff --git a/package.json b/package.json index da46e4353..8cb129a6a 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "devDependencies": { "jshint": "^2.10.2", "less": "3.7.1", - "lesshint": "^4.5.0", + "lesshint": "6.3.7", "selenium-webdriver": "^3.6.0" }, "scripts": { @@ -46,7 +46,7 @@ "lint:less": "./node_modules/lesshint/bin/lesshint -c ./.lesshintrc ./customize.dist/src/less2/", "test": "node scripts/TestSelenium.js", "test-rpc": "cd scripts/tests && node test-rpc", - "template": "cd customize.dist/src && for page in ../index.html ../privacy.html ../terms.html ../about.html ../contact.html ../what-is-cryptpad.html ../features.html ../../www/login/index.html ../../www/register/index.html ../../www/user/index.html;do echo $page; cp template.html $page; done;", + "template": "cd customize.dist/src && for page in ../index.html ../privacy.html ../terms.html ../contact.html ../what-is-cryptpad.html ../features.html ../../www/login/index.html ../../www/register/index.html ../../www/user/index.html;do echo $page; cp template.html $page; done;", "evict-inactive": "node scripts/evict-inactive.js" } } diff --git a/profile.md b/profile.md new file mode 100644 index 000000000..469617cb5 --- /dev/null +++ b/profile.md @@ -0,0 +1,22 @@ +```javascript +CryptPad_AsyncStore.rpc.send('ADMIN', + ['GET_WORKER_PROFILES'], + (e, _o) => { + var o = _o[0]; + // console.log(o[0]) + var sorted = Object.keys(o).sort(function (a, b) { + if (o[b] - o[a] <= 0) { return -1; } + return 1; + }); + var x = {}; + //console.log(sorted); + var total = 0; + sorted.forEach(function (k) { total += o[k]; }); + sorted.forEach(function (k) { + console.log("[%s] %ss running time (%s%)", k, o[k], Math.floor((o[k] / total) * 100)); + }); + } +) +``` + + diff --git a/www/admin/app-admin.less b/www/admin/app-admin.less index 77e13af43..d19e6b4d7 100644 --- a/www/admin/app-admin.less +++ b/www/admin/app-admin.less @@ -4,11 +4,7 @@ &.cp-app-admin { - .framework_min_main( - @bg-color: @colortheme_admin-bg, - @warn-color: @colortheme_admin-warn, - @color: @colortheme_admin-color - ); + .framework_min_main(); .sidebar-layout_main(); .support_main(); diff --git a/www/assert/index.html b/www/assert/index.html index eb0bd659f..10af165a9 100644 --- a/www/assert/index.html +++ b/www/assert/index.html @@ -48,7 +48,7 @@

XWiki Macros

-

Here is a macro

+

Here is a macro


diff --git a/www/assert/main.js b/www/assert/main.js index a467bfc67..db417c761 100644 --- a/www/assert/main.js +++ b/www/assert/main.js @@ -67,7 +67,7 @@ define([ '["DIV",{"id":"quot"},[["P",{},["\\"pewpewpew\\""]]]]', - '["DIV",{"id":"widget"},[["DIV",{"class":"cke_widget_wrapper cke_widget_block","contenteditable":"false","data-cke-display-name":"macro:velocity","data-cke-filter":"off","data-cke-widget-id":"0","data-cke-widget-wrapper":"1","tabindex":"-1"},[["DIV",{"class":"macro cke_widget_element","data-cke-widget-data":"%7B%22classes%22%3A%7B%22macro%22%3A1%7D%7D","data-cke-widget-keep-attr":"0","data-cke-widget-upcasted":"1","data-macro":"startmacro:velocity|-||-|Here is a macro","data-widget":"xwiki-macro"},[["P",{},["Here is a macro"]]]],["SPAN",{"class":"cke_reset cke_widget_drag_handler_container","style":"background: rgba(220, 220, 220, 0.5) url(\\"/customize/cryptofist_small.png\\") repeat scroll 0% 0%; top: -15px; left: 0px; display: block;"},[["IMG",{"class":"cke_reset cke_widget_drag_handler","data-cke-widget-drag-handler":"1","height":"15","src":"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==","title":"Click and drag to move","width":"15"},[]]]]]]]]', + '["DIV",{"id":"widget"},[["DIV",{"class":"cke_widget_wrapper cke_widget_block","contenteditable":"false","data-cke-display-name":"macro:velocity","data-cke-filter":"off","data-cke-widget-id":"0","data-cke-widget-wrapper":"1","tabindex":"-1"},[["DIV",{"class":"macro cke_widget_element","data-cke-widget-data":"%7B%22classes%22%3A%7B%22macro%22%3A1%7D%7D","data-cke-widget-keep-attr":"0","data-cke-widget-upcasted":"1","data-macro":"startmacro:velocity|-||-|Here is a macro","data-widget":"xwiki-macro"},[["P",{},["Here is a macro"]]]],["SPAN",{"class":"cke_reset cke_widget_drag_handler_container","style":"background: rgba(220, 220, 220, 0.5) repeat scroll 0% 0%; top: -15px; left: 0px; display: block;"},[["IMG",{"class":"cke_reset cke_widget_drag_handler","data-cke-widget-drag-handler":"1","height":"15","src":"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==","title":"Click and drag to move","width":"15"},[]]]]]]]]', ]; diff --git a/www/bounce/index.html b/www/bounce/index.html index c299fff4f..8e858093c 100644 --- a/www/bounce/index.html +++ b/www/bounce/index.html @@ -1,10 +1,10 @@ - CryptPad: Zero Knowledge, Collaborative Real Time Editing + CryptPad: Collaboration suite, encrypted and open-source - + diff --git a/www/code/app-code.less b/www/code/app-code.less index 6557d39f6..7ba5142a7 100644 --- a/www/code/app-code.less +++ b/www/code/app-code.less @@ -4,9 +4,7 @@ &.cp-app-code { .framework_main( - @bg-color: @colortheme_code-bg, - @warn-color: @colortheme_code-warn, - @color: @colortheme_code-color + @bg-color: @colortheme_apps[code], ); display: flex; diff --git a/www/code/inner.js b/www/code/inner.js index 68b58bce4..31d12eff4 100644 --- a/www/code/inner.js +++ b/www/code/inner.js @@ -152,7 +152,7 @@ define([ var $codeMirror = $('.CodeMirror'); $('', { - src: '/customize/main-favicon.png', + src: '/customize/CryptPad_logo.svg', alt: '', class: 'cp-app-code-preview-empty' }).appendTo($previewContainer); diff --git a/www/common/application_config_internal.js b/www/common/application_config_internal.js index 1e848d289..496e65f1f 100644 --- a/www/common/application_config_internal.js +++ b/www/common/application_config_internal.js @@ -107,7 +107,7 @@ define(function() { file: 'cptools-file', fileupload: 'cptools-file-upload', folderupload: 'cptools-folder-upload', - pad: 'cptools-pad', + pad: 'cptools-richtext', code: 'cptools-code', slide: 'cptools-slide', poll: 'cptools-poll', @@ -117,7 +117,7 @@ define(function() { kanban: 'cptools-kanban', oodoc: 'fa-file-word-o', ooslide: 'fa-file-powerpoint-o', - sheet: 'fa-file-excel-o', + sheet: 'cptools-sheet', drive: 'fa-hdd-o', teams: 'fa-users', }; diff --git a/www/common/common-interface.js b/www/common/common-interface.js index f901286e6..e5e35ffe1 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -941,6 +941,7 @@ define([ // Show the loading screen $loading.css('display', ''); $loading.removeClass('cp-loading-hidden'); + $loading.removeClass('cp-loading-transparent'); if (config.newProgress) { var progress = h('div.cp-loading-progress', [ h('p.cp-loading-progress-list'), @@ -996,7 +997,8 @@ define([ $loading.find('.cp-loading-progress').remove(); // Hide the spinner $('.cp-loading-spinner-container').hide(); - if (transparent) { $loading.css('opacity', 0.9); } + $loading.removeClass('cp-loading-transparent'); + if (transparent) { $loading.addClass('cp-loading-transparent'); } // Add the error message var $error = $loading.find('#cp-loading-message').show(); @@ -1179,7 +1181,14 @@ define([ } }); - $input.change(function () { $mark.focus(); }); + $input.change(function () { + if (!opts.labelAlt) { return; } + if ($input.is(':checked') !== checked) { + $(label).text(opts.labelAlt); + } else { + $(label).text(labelTxt); + } + }); return h('label.cp-checkmark', labelOpts, [ input, diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index fb0baa075..c0afeab10 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -20,20 +20,14 @@ define([ ], function ($, Config, Util, Hash, Language, UI, Constants, Feedback, h, Clipboard, Messages, AppConfig, Pages, NThen, InviteInner, Visible) { var UIElements = {}; + var urlArgs = Config.requireConf.urlArgs; UIElements.getSvgLogo = function () { var svg = (function(){/* - - - - - image/svg+xml - - - - - - + + + + */}).toString().slice(14,-3); return svg; @@ -371,7 +365,7 @@ define([ h('div.cp-teams-invite-block', [ h('span', Messages.team_inviteLinkSetPassword), h('a.cp-teams-help.fa.fa-question-circle', { - href: origin + '/faq.html#security-pad_password', + href: origin + 'https://docs.cryptpad.fr/en/user_guide/security.html#passwords-for-documents-and-folders', target: "_blank", 'data-tippy-placement': "right" }) @@ -618,7 +612,7 @@ define([ break; case 'copy': button = $('', {'class': 'cp-toolbar-drawer-element'}).text(Messages.makeACopy)); button .click(common.prepareFeedback(type)) @@ -1536,10 +1530,20 @@ define([ var legalLine = template(Messages.info_imprintFlavour, Pages.imprintLink); var privacyLine = template(Messages.info_privacyFlavour, Pages.privacyLink); - var faqLine = template(Messages.help.generic.more, Pages.faqLink); + + // XXX translation + Messages.help.generic.more = "Learn more about how CryptPad can work for you by reading our Documentation."; + + var faqLine = template(Messages.help.generic.more, Pages.docsLink); var content = h('div.cp-info-menu-container', [ - h('h6', Pages.versionString), + h('div.logo-block', [ + h('img', { + src: '/customize/CryptPad_logo.svg?' + urlArgs + }), + h('h6', "CryptPad"), + h('span', Pages.versionString) + ]), h('hr'), legalLine, privacyLine, @@ -1673,6 +1677,16 @@ define([ }, }); } + options.push({ + tag: 'a', + attributes: { + 'target': '_blank', + 'rel': 'noopener', + 'href': 'https://docs.cryptpad.fr', + 'class': 'fa fa-book' + }, + content: h('span', Messages.docs_link) + }); if (padType !== 'support' && accountName && Config.supportMailbox) { options.push({ tag: 'a', @@ -1687,6 +1701,7 @@ define([ }, }); } +/* if (AppConfig.surveyURL) { options.push({ tag: 'a', @@ -1700,6 +1715,7 @@ define([ }, }); } +*/ options.push({ tag: 'a', attributes: { @@ -2080,15 +2096,36 @@ define([ var $body = $('body'); var $creationContainer = $('
', { id: 'cp-creation-container' }).appendTo($body); var urlArgs = (Config.requireConf && Config.requireConf.urlArgs) || ''; - var l = h('div.cp-creation-logo', h('img', { src: '/customize/loading-logo.png?' + urlArgs })); - $(l).appendTo($creationContainer); - var $creation = $('
', { id: 'cp-creation', tabindex: 1 }).appendTo($creationContainer); + + var logo = h('img', { src: '/customize/CryptPad_logo.svg?' + urlArgs }); + var fill1 = h('div.cp-creation-fill.cp-creation-logo', logo); + var fill2 = h('div.cp-creation-fill'); + var $creation = $('
', { id: 'cp-creation', tabindex:1 }); + $creationContainer.append([fill1, $creation, fill2]); + + var createHelper = function (href, text) { + var q = UI.createHelper(href, text); + $(q).addClass('cp-creation-help'); + return q; + }; // Title - //var colorClass = 'cp-icon-color-'+type; + var colorClass = 'cp-icon-color-'+type; + colorClass = colorClass; // XXX + //$creation.append(h('h2.cp-creation-title', Messages.newButtonTitle)); var newPadH3Title = Messages['button_new' + type]; - $creation.append(h('h3.cp-creation-title', newPadH3Title)); + + // XXX translation + Messages.creation_helperText = "Learn more..."; + var title = h('div.cp-creation-title', [ + UI.getFileIcon({type: type})[0], + h('div.cp-creation-title-text', [ + h('span', newPadH3Title), + createHelper('https://docs.cryptpad.fr/en/user_guide/apps/general.html#new-document', Messages.creation_helperText) + ]) + ]); + $creation.append(title); //$creation.append(h('h2.cp-creation-title.'+colorClass, Messages.newButtonTitle)); // Deleted pad warning @@ -2098,18 +2135,6 @@ define([ )); } - var origin = privateData.origin; - var createHelper = function (href, text) { - var q = h('a.cp-creation-help.fa.fa-question-circle', { - 'data-cptippy-html': true, - title: text, - href: origin + href, - target: "_blank", - 'data-tippy-placement': "right" - }); - return q; - }; - // Team pad var team; var teamExists = privateData.teams && Object.keys(privateData.teams).length; @@ -2164,12 +2189,17 @@ define([ // Default is Owned pad var owned = h('div.cp-creation-owned', [ UI.createCheckbox('cp-creation-owned', Messages.creation_owned, true), - createHelper('/faq.html#keywords-owned', Messages.creation_owned1) ]); // Life time + + // XXX translations + Messages.creation_expiration = "Expiration date"; + Messages.creation_expiresIn = "Expires in"; var expire = h('div.cp-creation-expire', [ - UI.createCheckbox('cp-creation-expire', Messages.creation_expire, false), + UI.createCheckbox('cp-creation-expire', Messages.creation_expiration, false, { + labelAlt: Messages.creation_expiresIn + }), h('span.cp-creation-expire-picker.cp-creation-slider', [ h('input#cp-creation-expire-val', { type: "number", @@ -2186,10 +2216,11 @@ define([ }, Messages.creation_expireMonths) ]) ]), - createHelper('/faq.html#keywords-expiring', Messages.creation_expire2), ]); // Password + // XXX translation + Messages.creation_password = "Password"; var password = h('div.cp-creation-password', [ UI.createCheckbox('cp-creation-password', Messages.creation_password, false), h('span.cp-creation-password-picker.cp-creation-slider', [ @@ -2201,8 +2232,15 @@ define([ //createHelper('#', "TODO: password protection adds another layer of security ........") // TODO ]); + var $w = $(window); + var big = $w.width() > 800; + var right = h('span.fa.fa-chevron-right.cp-creation-template-more'); var left = h('span.fa.fa-chevron-left.cp-creation-template-more'); + if (!big) { + $(left).removeClass('fa-chevron-left').addClass('fa-chevron-up'); + $(right).removeClass('fa-chevron-right').addClass('fa-chevron-down'); + } var templates = h('div.cp-creation-template', [ left, h('div.cp-creation-template-container', [ @@ -2215,10 +2253,12 @@ define([ var $create = $(createDiv); $(h('div#cp-creation-form', [ - team, - owned, - expire, - password, + h('div.cp-creation-checkboxes', [ + team, + owned, + expire, + password, + ]), templates, createDiv ])).appendTo($creation); @@ -2226,7 +2266,7 @@ define([ // Display templates var selected = 0; // Selected template in the list (highlighted) - var TEMPLATES_DISPLAYED = 4; // Max templates displayed per page + var TEMPLATES_DISPLAYED = big ? 6 : 3; // Max templates displayed per page var next = function () {}; // Function called when pressing tab to highlight the next template var i = 0; // Index of the first template displayed in the current page sframeChan.query("Q_CREATE_TEMPLATES", type, function (err, res) { @@ -2340,6 +2380,20 @@ define([ .addClass('cp-creation-template-selected'); }; + $w.on('resize', function () { + var _big = $w.width() > 800; + if (big === _big) { return; } + big = _big; + if (!big) { + $(left).removeClass('fa-chevron-left').addClass('fa-chevron-up'); + $(right).removeClass('fa-chevron-right').addClass('fa-chevron-down'); + } else { + $(left).removeClass('fa-chevron-up').addClass('fa-chevron-left'); + $(right).removeClass('fa-chevron-down').addClass('fa-chevron-right'); + } + TEMPLATES_DISPLAYED = big ? 6 : 3; + redraw(0); + }); }); // Display expiration form when checkbox checked diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 4c64182ee..22875299d 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -985,6 +985,24 @@ define([ }, {timeout: -1}); }; + common.disableCache = function (disabled, cb) { + postMessage("CACHE_DISABLE", disabled, cb); + }; + window.addEventListener('storage', function (e) { + if (e.key !== 'CRYPTPAD_STORE|disableCache') { return; } + var o = e.oldValue; + var n = e.newValue; + if (n) { + Cache.disable(); + common.disableCache(true, function () {}); + } else { + Cache.enable(); + common.disableCache(false, function () {}); + } + }); + if (localStorage['CRYPTPAD_STORE|disableCache']) { + Cache.disable(); + } // Admin common.adminRpc = function (data, cb) { @@ -2226,6 +2244,7 @@ define([ localToken: tryParsing(localStorage.getItem(Constants.tokenKey)), // TODO move this to LocalStore ? language: common.getLanguage(), cache: rdyCfg.cache, + disableCache: localStorage['CRYPTPAD_STORE|disableCache'], driveEvents: true //rdyCfg.driveEvents // Boolean }; common.userHash = userHash; diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index ca44e0164..972675487 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -91,7 +91,7 @@ define([ var faRename = 'fa-pencil'; var faColor = 'cptools-palette'; var faTrash = 'fa-trash'; - var faCopy = 'fa-clone'; + var faCopy = 'fa-files-o'; var faDelete = 'cptools-destroy'; var faAccess = 'fa-unlock-alt'; var faProperties = 'fa-info-circle'; @@ -2487,17 +2487,8 @@ define([ // Get the upload options var addSharedFolderModal = function (cb) { - var createHelper = function (href, text) { - var q = h('a.fa.fa-question-circle', { - style: 'text-decoration: none !important;', - 'data-cptippy-html': true, - title: text, - href: APP.origin + href, - target: "_blank", - 'data-tippy-placement': "right" - }); - return q; - }; + + var docsHref = common.getBounceURL("https://docs.cryptpad.fr/en/user_guide/share_and_access.html#owners"); // Ask for name, password and owner var content = h('div', [ @@ -2510,7 +2501,7 @@ define([ style: 'display:flex;align-items:center;justify-content:space-between' }, [ UI.createCheckbox('cp-app-drive-sf-owned', Messages.sharedFolders_create_owned, true), - createHelper('/faq.html#keywords-owned', Messages.creation_owned1) // TODO + UI.createHelper(docsHref, Messages.creation_owned1) // TODO ]), ]); @@ -4392,6 +4383,7 @@ define([ return void UI.warn(Messages.error); } // if folder does not contains SF + else { var convertContent = h('div', [ h('p', Messages.convertFolderToSF_confirm), @@ -4404,7 +4396,7 @@ define([ style: 'display:flex;align-items:center;justify-content:space-between' }, [ UI.createCheckbox('cp-upload-owned', Messages.sharedFolders_create_owned, true), - UI.createHelper(APP.origin + '/faq.html#keywords-owned', Messages.creation_owned1) + UI.createHelper('https://docs.cryptpad.fr/en/user_guide/share_and_access.html#owners', Messages.creation_owned1) ]), ]); return void UI.confirm(convertContent, function(res) { diff --git a/www/common/inner/share.js b/www/common/inner/share.js index abcfe9966..614fc23e7 100644 --- a/www/common/inner/share.js +++ b/www/common/inner/share.js @@ -252,7 +252,7 @@ define([ h('a', {href: '#'}, Messages.passwordFaqLink) ]); $(link).click(function () { - opts.common.openURL(opts.origin + "/faq.html#security-pad_password"); + opts.common.openUnsafeURL("https://docs.cryptpad.fr/en/user_guide/security.html#passwords-for-documents-and-folders"); }); return link; }; diff --git a/www/common/notify.js b/www/common/notify.js index 81dee662d..ac8461104 100644 --- a/www/common/notify.js +++ b/www/common/notify.js @@ -1,8 +1,12 @@ define(['/api/config'], function (ApiConfig) { var Module = {}; - var DEFAULT_MAIN = '/customize/main-favicon.png?' + ApiConfig.requireConf.urlArgs; - var DEFAULT_ALT = '/customize/alt-favicon.png?' + ApiConfig.requireConf.urlArgs; + var apps = ['code', 'slide', 'pad', 'kanban', 'whiteboard', 'sheet', 'poll', 'teams']; + var app = window.location.pathname.slice(1, -1); // remove "/" at the beginnin and the end + var suffix = apps.indexOf(app) !== -1 ? '-'+app : ''; + + var DEFAULT_MAIN = '/customize/favicon/main-favicon' + suffix + '.png?' + ApiConfig.requireConf.urlArgs; + var DEFAULT_ALT = '/customize/favicon/alt-favicon' + suffix + '.png?' + ApiConfig.requireConf.urlArgs; var document = window.document; diff --git a/www/common/onlyoffice/app-oo.less b/www/common/onlyoffice/app-oo.less index 08b64df91..7bca5861c 100644 --- a/www/common/onlyoffice/app-oo.less +++ b/www/common/onlyoffice/app-oo.less @@ -7,23 +7,17 @@ body.cp-app-sheet, body.cp-app-oodoc, body.cp-app-ooslide { &.cp-app-sheet { .framework_main( - @bg-color: @colortheme_oocell-bg, - @warn-color: @colortheme_oocell-warn, - @color: @colortheme_oocell-color + @bg-color: @colortheme_apps[sheet], ); } &.cp-app-oodoc { .framework_main( - @bg-color: @colortheme_oodoc-bg, - @warn-color: @colortheme_oodoc-warn, - @color: @colortheme_oodoc-color + @bg-color: @colortheme_apps[oodoc], ); } &.cp-app-ooslide { .framework_main( - @bg-color: @colortheme_ooslide-bg, - @warn-color: @colortheme_ooslide-warn, - @color: @colortheme_ooslide-color + @bg-color: @colortheme_apps[ooslide], ); } diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index 7114b157f..f68463f9e 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -61,6 +61,7 @@ define([ var DISPLAY_RESTORE_BUTTON = false; var NEW_VERSION = 3; var PENDING_TIMEOUT = 30000; + var CURRENT_VERSION = 'v2b'; //var READONLY_REFRESH_TO = 15000; var debug = function (x) { @@ -1183,7 +1184,7 @@ define([ "url": url, "permissions": { "download": false, - "print": false, + "print": true, } }, "documentType": file.doc, @@ -1453,15 +1454,74 @@ define([ makeChannel(); }; + var x2tReady = Util.mkEvent(true); + var fetchFonts = function (x2t) { + var path = '/common/onlyoffice/'+CURRENT_VERSION+'/fonts/'; + var e = getEditor(); + var fonts = e.FontLoader.fontInfos; + var files = e.FontLoader.fontFiles; + var suffixes = { + indexR: '', + indexB: '_Bold', + indexBI: '_Bold_Italic', + indexI: '_Italic', + }; + nThen(function (waitFor) { + fonts.forEach(function (font) { + // Check if the font is already loaded + if (!font.NeedStyles) { return; } + // Pick the variants we need (regular, bold, italic) + ['indexR', 'indexB', 'indexI', 'indexBI'].forEach(function (k) { + if (typeof(font[k]) !== "number" || font[k] === -1) { return; } // No matching file + var file = files[font[k]]; + + var name = font.Name + suffixes[k] + '.ttf'; + Util.fetch(path + file.Id, waitFor(function (err, buffer) { + if (buffer) { + x2t.FS.writeFile('/working/fonts/' + name, buffer); + } + })); + }); + }); + }).nThen(function () { + x2tReady.fire(); + }); + }; + var x2tInitialized = false; var x2tInit = function(x2t) { debug("x2t mount"); // x2t.FS.mount(x2t.MEMFS, {} , '/'); x2t.FS.mkdir('/working'); x2t.FS.mkdir('/working/media'); + x2t.FS.mkdir('/working/fonts'); x2tInitialized = true; + fetchFonts(x2t); debug("x2t mount done"); }; + var getX2T = function (cb) { + // Perform the x2t conversion + require(['/common/onlyoffice/x2t/x2t.js'], function() { // FIXME why does this fail without an access-control-allow-origin header? + var x2t = window.Module; + x2t.run(); + if (x2tInitialized) { + debug("x2t runtime already initialized"); + return void x2tReady.reg(function () { + cb(x2t); + }); + } + + x2t.onRuntimeInitialized = function() { + debug("x2t in runtime initialized"); + // Init x2t js module + x2tInit(x2t); + x2tReady.reg(function () { + cb(x2t); + }); + }; + }); + }; + /* Converting Data @@ -1470,10 +1530,41 @@ define([ The filename extension needs to represent the input format Example: fileName=cryptpad.bin outputFormat=xlsx */ + var getFormatId = function (ext) { + // Sheets + if (ext === 'xlsx') { return 257; } + if (ext === 'xls') { return 258; } + if (ext === 'ods') { return 259; } + if (ext === 'csv') { return 260; } + if (ext === 'pdf') { return 513; } + return; + }; + var getFromId = function (ext) { + var id = getFormatId(ext); + if (!id) { return ''; } + return ''+id+''; + }; + var getToId = function (ext) { + var id = getFormatId(ext); + if (!id) { return ''; } + return ''+id+''; + }; var x2tConvertDataInternal = function(x2t, data, fileName, outputFormat) { debug("Converting Data for " + fileName + " to " + outputFormat); - // writing file to mounted working disk (in memory) - x2t.FS.writeFile('/working/' + fileName, data); + + // PDF + var pdfData = ''; + if (outputFormat === "pdf" && typeof(data) === "object" && data.bin && data.buffer) { + // Add conversion rules + pdfData = "false" + + "/working/fonts/"; + // writing file to mounted working disk (in memory) + x2t.FS.writeFile('/working/' + fileName, data.bin); + x2t.FS.writeFile('/working/pdf.bin', data.buffer); + } else { + // writing file to mounted working disk (in memory) + x2t.FS.writeFile('/working/' + fileName, data); + } // Adding images Object.keys(window.frames[0].AscCommon.g_oDocumentUrls.urls || {}).forEach(function (_mediaFileName) { @@ -1491,10 +1582,16 @@ define([ } }); + + var inputFormat = fileName.split('.').pop(); + var params = "" + "" + "/working/" + fileName + "" + "/working/" + fileName + "." + outputFormat + "" + + pdfData + + getFromId(inputFormat) + + getToId(outputFormat) + "false" + ""; // writing params file to mounted working disk (in memory) @@ -1514,9 +1611,61 @@ define([ return result; }; + APP.printPdf = function (obj, cb) { + getX2T(function (x2t) { + //var e = getEditor(); + //var d = e.asc_nativePrint(undefined, undefined, 0x100 + opts.printType).ImData; + var bin = getContent(); + var xlsData = x2tConvertDataInternal(x2t, { + buffer: obj.data, + bin: bin + }, 'output.bin', 'pdf'); + if (xlsData) { + var md = common.getMetadataMgr().getMetadataLazy(); + var type = common.getMetadataMgr().getPrivateData().ooType; + var title = md.title || md.defaultTitle || type; + var blob = new Blob([xlsData], {type: "application/pdf"}); + //var url = URL.createObjectURL(blob, { type: "application/pdf" }); + saveAs(blob, title+'.pdf'); + //window.open(url); + cb({ + "type":"save", + "status":"ok", + //"data":url + "?disposition=inline&ooname=output.pdf" + }); + /* + ooChannel.send({ + "type":"documentOpen", + "data": { + "type":"save", + "status":"ok", + "data":url + "?disposition=inline&ooname=output.pdf" + } + }); + */ + } + }); + }; + var x2tSaveAndConvertDataInternal = function(x2t, data, filename, extension, finalFilename) { var type = common.getMetadataMgr().getPrivateData().ooType; var xlsData; + + // PDF + if (type === "sheet" && extension === "pdf") { + var e = getEditor(); + var d = e.asc_nativePrint(undefined, undefined, 0x101).ImData; + xlsData = x2tConvertDataInternal(x2t, { + buffer: d.data, + bin: data + }, filename, extension); + if (xlsData) { + var _blob = new Blob([xlsData], {type: "application/bin;charset=utf-8"}); + UI.removeModals(); + saveAs(_blob, finalFilename); + } + return; + } if (type === "sheet" && extension !== 'xlsx') { xlsData = x2tConvertDataInternal(x2t, data, filename, 'xlsx'); filename += '.xlsx'; @@ -1535,22 +1684,9 @@ define([ } }; - var x2tSaveAndConvertData = function(data, filename, extension, finalFilename) { - // Perform the x2t conversion - require(['/common/onlyoffice/x2t/x2t.js'], function() { // FIXME why does this fail without an access-control-allow-origin header? - var x2t = window.Module; - x2t.run(); - if (x2tInitialized) { - debug("x2t runtime already initialized"); - return void x2tSaveAndConvertDataInternal(x2t, data, filename, extension, finalFilename); - } - - x2t.onRuntimeInitialized = function() { - debug("x2t in runtime initialized"); - // Init x2t js module - x2tInit(x2t); - x2tSaveAndConvertDataInternal(x2t, data, filename, extension, finalFilename); - }; + var x2tSaveAndConvertData = function(data, filename, extension, finalName) { + getX2T(function (x2t) { + x2tSaveAndConvertDataInternal(x2t, data, filename, extension, finalName); }); }; @@ -1561,7 +1697,7 @@ define([ var exportXLSXFile = function() { var text = getContent(); var suggestion = Title.suggestTitle(Title.defaultTitle); - var ext = ['.xlsx', /*'.ods',*/ '.bin']; + var ext = ['.xlsx', '.ods', '.bin', '.csv', '.pdf']; var type = common.getMetadataMgr().getPrivateData().ooType; var warning = ''; if (type==="ooslide") { @@ -1693,7 +1829,9 @@ define([ // Convert from ODF format: // first convert to Office format then to the selected extension if (filename.endsWith(".ods")) { + console.log(x2t, data, filename, extension); convertedContent = x2tConvertDataInternal(x2t, new Uint8Array(data), filename, "xlsx"); + console.log(convertedContent); convertedContent = x2tConvertDataInternal(x2t, convertedContent, filename + ".xlsx", extension); } else if (filename.endsWith(".odt")) { convertedContent = x2tConvertDataInternal(x2t, new Uint8Array(data), filename, "docx"); @@ -1759,24 +1897,10 @@ define([ ]); UI.openCustomModal(UI.dialog.customModal(div, {buttons: []})); setTimeout(function () { - require(['/common/onlyoffice/x2t/x2t.js'], function() { - var x2t = window.Module; - x2t.run(); - if (x2tInitialized) { - debug("x2t runtime already initialized"); - x2tConvertData(x2t, new Uint8Array(content), filename.name, "bin", function(convertedContent) { - importFile(convertedContent); - }); - } - - x2t.onRuntimeInitialized = function() { - debug("x2t in runtime initialized"); - // Init x2t js module - x2tInit(x2t); - x2tConvertData(x2t, new Uint8Array(content), filename.name, "bin", function(convertedContent) { - importFile(convertedContent); - }); - }; + getX2T(function (x2t) { + x2tConvertData(x2t, new Uint8Array(content), filename.name, "bin", function(c) { + importFile(c); + }); }); }, 100); }; @@ -2216,7 +2340,7 @@ define([ Title.updateTitle(Title.defaultTitle); } - var version = 'v2b/'; + var version = CURRENT_VERSION + '/'; var msg; // Old version detected: use the old OO and start the migration if we can if (privateData.ooForceVersion) { diff --git a/www/common/onlyoffice/v2b/sdkjs/cell/sdk-all-min.js b/www/common/onlyoffice/v2b/sdkjs/cell/sdk-all-min.js index d4efcfc07..6aac2e139 100644 --- a/www/common/onlyoffice/v2b/sdkjs/cell/sdk-all-min.js +++ b/www/common/onlyoffice/v2b/sdkjs/cell/sdk-all-min.js @@ -1,5 +1,5 @@ /* - * Copyright (C) Ascensio System SIA 2012-2020. All rights reserved + * Copyright (C) Ascensio System SIA 2012-2021. All rights reserved * * https://www.onlyoffice.com/ * @@ -1483,30 +1483,30 @@ function(actionType,options){return false};baseEditorsApi.prototype._printDeskto actionType);var downloadType;if(options.isDownloadEvent)downloadType=options.oDocumentMailMerge?DownloadType.MailMerge:actionType===c_oAscAsyncAction.Print?DownloadType.Print:DownloadType.Download;else downloadType=DownloadType.None;var isNoBase64=typeof ArrayBuffer!=="undefined"&&!isCloudCrypto;var dataContainer={data:null,part:null,index:0,count:0};var oAdditionalData={};oAdditionalData["c"]="save";oAdditionalData["id"]=this.documentId;oAdditionalData["userid"]=this.documentUserId;oAdditionalData["jwt"]= this.CoAuthoringApi.get_jwt();oAdditionalData["outputformat"]=options.fileType;oAdditionalData["title"]=AscCommon.changeFileExtention(this.documentTitle,AscCommon.getExtentionByFormat(options.fileType),Asc.c_nMaxDownloadTitleLen);oAdditionalData["nobase64"]=isNoBase64;if(DownloadType.Print===downloadType)oAdditionalData["inline"]=1;if(this._downloadAs(actionType,options,oAdditionalData,dataContainer))return;var t=this;this.fCurCallback=null;if(!options.callback)this.fCurCallback=function(input,status){var error= 403===status?c_oAscError.ID.AccessDeny:c_oAscError.ID.Unknown;if(null!=input&&oAdditionalData["c"]===input["type"])if("ok"===input["status"]){var url=input["data"];if(url){error=c_oAscError.ID.No;t.processSavedFile(url,downloadType)}}else error=AscCommon.mapAscServerErrorToAscError(parseInt(input["data"]),AscCommon.c_oAscAdvancedOptionsAction.Save);if(c_oAscError.ID.No!==error){t.endInsertDocumentUrls();t.sendEvent("asc_onError",options.errorDirect||error,c_oAscError.Level.NoCritical)}if(actionType)t.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, -actionType)};AscCommon.saveWithParts(function(fCallback1,oAdditionalData1,dataContainer1){AscCommon.sendCommand(t,fCallback1,oAdditionalData1,dataContainer1)},this.fCurCallback,options.callback,oAdditionalData,dataContainer)};baseEditorsApi.prototype.asc_getChartPreviews=function(chartType){return this.chartPreviewManager.getChartPreviews(chartType)};baseEditorsApi.prototype.asc_getTextArtPreviews=function(){return this.textArtPreviewManager.getWordArtStyles()};baseEditorsApi.prototype.asc_onOpenChartFrame= -function(){if(this.isMobileVersion)return;this.isOpenedChartFrame=true};baseEditorsApi.prototype.asc_onCloseChartFrame=function(){this.isOpenedChartFrame=false};baseEditorsApi.prototype.asc_setInterfaceDrawImagePlaceShape=function(elementId){this.shapeElementId=elementId};baseEditorsApi.prototype.asc_getPropertyEditorShapes=function(){return[AscCommon.g_oAutoShapesGroups,AscCommon.g_oAutoShapesTypes]};baseEditorsApi.prototype.asc_getPropertyEditorTextArts=function(){return[AscCommon.g_oPresetTxWarpGroups, -AscCommon.g_PresetTxWarpTypes]};baseEditorsApi.prototype._addImageUrl=function(){};baseEditorsApi.prototype.asc_addImageCallback=function(res){};baseEditorsApi.prototype.asc_addImage=function(){var t=this;window.parent.APP.AddImage(function(res){console.log("AddImageCallback");t.asc_addImageCallback(res);t._addImageUrl([res.url])},function(){t.sendEvent("asc_onError",error,c_oAscError.Level.NoCritical)});return;AscCommon.ShowImageFileDialog(this.documentId,this.documentUserId,this.CoAuthoringApi.get_jwt(), -function(error,files){t._uploadCallback(error,files)},function(error){if(c_oAscError.ID.No!==error)t.sendEvent("asc_onError",error,c_oAscError.Level.NoCritical);t.sync_StartAction(c_oAscAsyncActionType.BlockInteraction,c_oAscAsyncAction.UploadImage)})};baseEditorsApi.prototype._uploadCallback=function(error,files){var t=this;if(c_oAscError.ID.No!==error)this.sendEvent("asc_onError",error,c_oAscError.Level.NoCritical);else{this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction,c_oAscAsyncAction.UploadImage); -AscCommon.UploadImageFiles(files,this.documentId,this.documentUserId,this.CoAuthoringApi.get_jwt(),function(error,urls){if(c_oAscError.ID.No!==error)t.sendEvent("asc_onError",error,c_oAscError.Level.NoCritical);else t._addImageUrl(urls);t.sync_EndAction(c_oAscAsyncActionType.BlockInteraction,c_oAscAsyncAction.UploadImage)})}};baseEditorsApi.prototype.asc_replaceLoadImageCallback=function(fCallback){};baseEditorsApi.prototype.asc_loadLocalImageAndAction=function(sLocalImage,fCallback){var _loadedUrl= -this.ImageLoader.LoadImage(AscCommon.getFullImageSrc2(sLocalImage),1);if(_loadedUrl!=null)fCallback(_loadedUrl);else this.asc_replaceLoadImageCallback(fCallback)};baseEditorsApi.prototype.asc_checkImageUrlAndAction=function(sImageUrl,fCallback){var oThis=this;this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction,c_oAscAsyncAction.UploadImage);var fCallback2=function(){oThis.sync_EndAction(c_oAscAsyncActionType.BlockInteraction,c_oAscAsyncAction.UploadImage);fCallback.apply(oThis,arguments)}; -var sLocalImage=AscCommon.g_oDocumentUrls.getImageLocal(sImageUrl);if(sLocalImage){this.asc_loadLocalImageAndAction(sLocalImage,fCallback2);return}AscCommon.sendImgUrls(oThis,[sImageUrl],function(data){if(data[0]&&data[0].path!=null)oThis.asc_loadLocalImageAndAction(AscCommon.g_oDocumentUrls.imagePath2Local(data[0].path),fCallback2)},this.editorId===c_oEditorId.Spreadsheet)};baseEditorsApi.prototype.asc_addOleObject=function(oPluginData){if(this.isViewMode)return;var oThis=this;var sImgSrc=oPluginData["imgSrc"]; -var nWidthPix=oPluginData["widthPix"];var nHeightPix=oPluginData["heightPix"];var fWidth=oPluginData["width"];var fHeight=oPluginData["height"];var sData=oPluginData["data"];var sGuid=oPluginData["guid"];if(typeof sImgSrc==="string"&&sImgSrc.length>0&&typeof sData==="string"&&typeof sGuid==="string"&&sGuid.length>0&&AscFormat.isRealNumber(nWidthPix)&&AscFormat.isRealNumber(nHeightPix)&&AscFormat.isRealNumber(fWidth)&&AscFormat.isRealNumber(fHeight))this.asc_checkImageUrlAndAction(sImgSrc,function(oImage){oThis.asc_addOleObjectAction(AscCommon.g_oDocumentUrls.getImageLocal(oImage.src), -sData,sGuid,fWidth,fHeight,nWidthPix,nHeightPix)})};baseEditorsApi.prototype.asc_editOleObject=function(oPluginData){if(this.isViewMode)return;var oThis=this;var bResize=oPluginData["resize"];var sImgSrc=oPluginData["imgSrc"];var oOleObject=AscCommon.g_oTableId.Get_ById(oPluginData["objectId"]);var nWidthPix=oPluginData["widthPix"];var nHeightPix=oPluginData["heightPix"];var sData=oPluginData["data"];if(typeof sImgSrc==="string"&&sImgSrc.length>0&&typeof sData==="string"&&oOleObject&&AscFormat.isRealNumber(nWidthPix)&& -AscFormat.isRealNumber(nHeightPix))this.asc_checkImageUrlAndAction(sImgSrc,function(oImage){oThis.asc_editOleObjectAction(bResize,oOleObject,AscCommon.g_oDocumentUrls.getImageLocal(oImage.src),sData,nWidthPix,nHeightPix)})};baseEditorsApi.prototype["pluginMethod_AddOleObject"]=baseEditorsApi.prototype.asc_addOleObject;baseEditorsApi.prototype["pluginMethod_EditOleObject"]=baseEditorsApi.prototype.asc_editOleObject;baseEditorsApi.prototype.asc_addOleObjectAction=function(sLocalUrl,sData,sApplicationId, -fWidth,fHeight){};baseEditorsApi.prototype.asc_editOleObjectAction=function(bResize,oOleObject,sImageUrl,sData,nPixWidth,nPixHeight){};baseEditorsApi.prototype.asc_selectSearchingResults=function(value){if(this.selectSearchingResults===value)return;this.selectSearchingResults=value;this._selectSearchingResults(value)};baseEditorsApi.prototype.asc_startEditCurrentOleObject=function(){};baseEditorsApi.prototype.asc_canEditCrop=function(){};baseEditorsApi.prototype.asc_startEditCrop=function(){};baseEditorsApi.prototype.asc_endEditCrop= -function(){};baseEditorsApi.prototype.asc_cropFit=function(){};baseEditorsApi.prototype.asc_cropFill=function(){};baseEditorsApi.prototype.asc_showRevision=function(newObj){};baseEditorsApi.prototype.asc_undoAllChanges=function(){};baseEditorsApi.prototype.asc_getAdvancedOptions=function(){var cp={"codepage":AscCommon.c_oAscCodePageUtf8,"encodings":AscCommon.getEncodingParams()};return new AscCommon.asc_CAdvancedOptions(cp)};baseEditorsApi.prototype.asc_Print=function(options){if(window["AscDesktopEditor"]&& -this._printDesktop(options))return;if(!options)options=new Asc.asc_CDownloadOptions;options.fileType=Asc.c_oAscFileType.PDF;this.downloadAs(c_oAscAsyncAction.Print,options)};baseEditorsApi.prototype.asc_Save=function(isAutoSave,isIdle){var t=this;var res=false;if(this.canSave&&this._saveCheck()){this.IsUserSave=!isAutoSave;if(this.asc_isDocumentCanSave()||AscCommon.History.Have_Changes()||this._haveOtherChanges()||this.canUnlockDocument||this.forceSaveUndoRequest){if(this._prepareSave(isIdle)){this.canSave= -false;this.CoAuthoringApi.askSaveChanges(function(e){t._onSaveCallback(e)});res=true}}else if(this.isForceSaveOnUserSave&&this.IsUserSave)this.forceSave()}return res};baseEditorsApi.prototype.asc_isDocumentCanSave=function(){return this.isDocumentCanSave};baseEditorsApi.prototype.asc_getCanUndo=function(){return AscCommon.History.Can_Undo()};baseEditorsApi.prototype.asc_getCanRedo=function(){return AscCommon.History.Can_Redo()};baseEditorsApi.prototype.asc_isOffline=function(){return window.location.protocol.indexOf("file")== -0?true:false};baseEditorsApi.prototype.asc_getUrlType=function(url){return AscCommon.getUrlType(url)};baseEditorsApi.prototype.openDocument=function(file){};baseEditorsApi.prototype.openDocumentFromZip=function(){};baseEditorsApi.prototype.onEndLoadDocInfo=function(){if(this.isLoadFullApi&&this.DocInfo){if(this.DocInfo.get_OfflineApp())this._openChartOrLocalDocument();this.onEndLoadFile(null)}};baseEditorsApi.prototype.onEndLoadFile=function(result){if(result)this.openResult=result;if(this.isLoadFullApi&& -this.DocInfo&&this.openResult&&this.isLoadFonts){this.openDocument(this.openResult);this.openResult=null}};baseEditorsApi.prototype._onEndLoadSdk=function(){AscCommon.g_oTableId.init();var t=this;AscCommon.InitDragAndDrop(this.HtmlElement,function(error,files){t._uploadCallback(error,files)});AscFonts.g_fontApplication.Init();this.FontLoader=AscCommon.g_font_loader;this.ImageLoader=AscCommon.g_image_loader;this.FontLoader.put_Api(this);this.ImageLoader.put_Api(this);this.FontLoader.SetStandartFonts(); -this.chartPreviewManager=new AscCommon.ChartPreviewManager;this.textArtPreviewManager=new AscCommon.TextArtPreviewManager;AscFormat.initStyleManager();if(null!==this.tmpFocus)this.asc_enableKeyEvents(this.tmpFocus);this.pluginsManager=Asc.createPluginsManager(this);this.macros=new AscCommon.CDocumentMacros;this._loadSdkImages();if(AscFonts.FontPickerByCharacter&&this.documentTitle)AscFonts.FontPickerByCharacter.getFontsByString(this.documentTitle)};baseEditorsApi.prototype._loadSdkImages=function(){}; -baseEditorsApi.prototype.sendStandartTextures=function(){if(this.isSendStandartTextures)return;this.isSendStandartTextures=true;var _count=AscCommon.g_oUserTexturePresets.length;var arr=new Array(_count);var arrToDownload=[];for(var i=0;i<_count;++i){arr[i]=new AscCommon.asc_CTexture;arr[i].Id=i;arr[i].Image=AscCommon.g_oUserTexturePresets[i];arrToDownload.push(AscCommon.g_oUserTexturePresets[i])}this.ImageLoader.LoadImagesWithCallback(arrToDownload,function(){},0);this.sendEvent("asc_onInitStandartTextures", -arr)};baseEditorsApi.prototype.sendMathToMenu=function(){if(this.MathMenuLoad)return;var _MathPainter=new AscFormat.CMathPainter(this);_MathPainter.Generate();this.MathMenuLoad=true};baseEditorsApi.prototype.sendMathTypesToMenu=function(_math){this.sendEvent("asc_onMathTypes",_math)};baseEditorsApi.prototype.asyncFontEndLoaded_MathDraw=function(Obj){this.sync_EndAction(c_oAscAsyncActionType.Information,c_oAscAsyncAction.LoadFont);Obj.Generate2()};baseEditorsApi.prototype.asc_GetCurrentColorSchemeName= -function(){return""};baseEditorsApi.prototype.sendColorThemes=function(theme){var result=AscCommon.g_oUserColorScheme.slice();var _extra=theme.extraClrSchemeLst;var _count=_extra.length;var oNameMap={};var nStartIndex=result.length;for(var i=0;i<_count;++i){var _scheme=_extra[i].clrScheme;if(oNameMap[_scheme.name])continue;oNameMap[_scheme.name]=true;result.push(AscCommon.getAscColorScheme(_scheme,theme))}_scheme=theme.themeElements&&theme.themeElements.clrScheme;if(_scheme)if(!AscCommon.getColorSchemeByName(_scheme.name)&& -!oNameMap[_scheme.name])result.splice(nStartIndex,0,AscCommon.getAscColorScheme(_scheme,theme));this.sendEvent("asc_onSendThemeColorSchemes",result);return result};baseEditorsApi.prototype.showVideoControl=function(sMediaName,extX,extY,transform){if(!window["AscDesktopEditor"]||!window["AscDesktopEditor"]["MediaStart"])return;switch(this.editorId){case c_oEditorId.Word:{break}case c_oEditorId.Presentation:{var manager=this.WordControl.DemonstrationManager;if(!manager.Mode){var pos=this.WordControl.m_oDrawingDocument.ConvertCoordsToCursorWR(0, -0,this.WordControl.m_oLogicDocument.CurPage,null,true);pos.X+=this.WordControl.X;pos.Y+=this.WordControl.Y;if(!transform)window["AscDesktopEditor"]["MediaStart"](sMediaName,pos.X,pos.Y,extX,extY,this.WordControl.m_nZoomValue/100);else window["AscDesktopEditor"]["MediaStart"](sMediaName,pos.X,pos.Y,extX,extY,this.WordControl.m_nZoomValue/100,transform.sx,transform.shy,transform.shx,transform.sy,transform.tx,transform.ty)}else{var transition=this.WordControl.DemonstrationManager.Transition;if(manager.SlideNum>= -0&&manager.SlideNum>0;var _zoom=_w/(_w_mm*AscCommon.g_dKoef_mm_to_pix);if(!transform)window["AscDesktopEditor"]["MediaStart"](sMediaName,_x,transition.Rect.y, -extX,extY,_zoom);else window["AscDesktopEditor"]["MediaStart"](sMediaName,_x,transition.Rect.y,extX,extY,_zoom,transform.sx,transform.shy,transform.shx,transform.sy,transform.tx,transform.ty)}}break}case c_oEditorId.Spreadsheet:{break}}};baseEditorsApi.prototype.hideVideoControl=function(){if(!window["AscDesktopEditor"]||!window["AscDesktopEditor"]["MediaEnd"])return;window["AscDesktopEditor"]["MediaEnd"]()};baseEditorsApi.prototype._checkLicenseApiFunctions=function(){return this.licenseResult&& +actionType)};if(window.parent.APP.printPdf&&(DownloadType.Print===downloadType||!downloadType)){window.parent.APP.printPdf(dataContainer,options.callback||this.fCurCallback);return}AscCommon.saveWithParts(function(fCallback1,oAdditionalData1,dataContainer1){AscCommon.sendCommand(t,fCallback1,oAdditionalData1,dataContainer1)},this.fCurCallback,options.callback,oAdditionalData,dataContainer)};baseEditorsApi.prototype.asc_getChartPreviews=function(chartType){return this.chartPreviewManager.getChartPreviews(chartType)}; +baseEditorsApi.prototype.asc_getTextArtPreviews=function(){return this.textArtPreviewManager.getWordArtStyles()};baseEditorsApi.prototype.asc_onOpenChartFrame=function(){if(this.isMobileVersion)return;this.isOpenedChartFrame=true};baseEditorsApi.prototype.asc_onCloseChartFrame=function(){this.isOpenedChartFrame=false};baseEditorsApi.prototype.asc_setInterfaceDrawImagePlaceShape=function(elementId){this.shapeElementId=elementId};baseEditorsApi.prototype.asc_getPropertyEditorShapes=function(){return[AscCommon.g_oAutoShapesGroups, +AscCommon.g_oAutoShapesTypes]};baseEditorsApi.prototype.asc_getPropertyEditorTextArts=function(){return[AscCommon.g_oPresetTxWarpGroups,AscCommon.g_PresetTxWarpTypes]};baseEditorsApi.prototype._addImageUrl=function(){};baseEditorsApi.prototype.asc_addImageCallback=function(res){};baseEditorsApi.prototype.asc_addImage=function(){var t=this;window.parent.APP.AddImage(function(res){console.log("AddImageCallback");t.asc_addImageCallback(res);t._addImageUrl([res.url])},function(){t.sendEvent("asc_onError", +error,c_oAscError.Level.NoCritical)});return;AscCommon.ShowImageFileDialog(this.documentId,this.documentUserId,this.CoAuthoringApi.get_jwt(),function(error,files){t._uploadCallback(error,files)},function(error){if(c_oAscError.ID.No!==error)t.sendEvent("asc_onError",error,c_oAscError.Level.NoCritical);t.sync_StartAction(c_oAscAsyncActionType.BlockInteraction,c_oAscAsyncAction.UploadImage)})};baseEditorsApi.prototype._uploadCallback=function(error,files){var t=this;if(c_oAscError.ID.No!==error)this.sendEvent("asc_onError", +error,c_oAscError.Level.NoCritical);else{this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction,c_oAscAsyncAction.UploadImage);AscCommon.UploadImageFiles(files,this.documentId,this.documentUserId,this.CoAuthoringApi.get_jwt(),function(error,urls){if(c_oAscError.ID.No!==error)t.sendEvent("asc_onError",error,c_oAscError.Level.NoCritical);else t._addImageUrl(urls);t.sync_EndAction(c_oAscAsyncActionType.BlockInteraction,c_oAscAsyncAction.UploadImage)})}};baseEditorsApi.prototype.asc_replaceLoadImageCallback= +function(fCallback){};baseEditorsApi.prototype.asc_loadLocalImageAndAction=function(sLocalImage,fCallback){var _loadedUrl=this.ImageLoader.LoadImage(AscCommon.getFullImageSrc2(sLocalImage),1);if(_loadedUrl!=null)fCallback(_loadedUrl);else this.asc_replaceLoadImageCallback(fCallback)};baseEditorsApi.prototype.asc_checkImageUrlAndAction=function(sImageUrl,fCallback){var oThis=this;this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction,c_oAscAsyncAction.UploadImage);var fCallback2=function(){oThis.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, +c_oAscAsyncAction.UploadImage);fCallback.apply(oThis,arguments)};var sLocalImage=AscCommon.g_oDocumentUrls.getImageLocal(sImageUrl);if(sLocalImage){this.asc_loadLocalImageAndAction(sLocalImage,fCallback2);return}AscCommon.sendImgUrls(oThis,[sImageUrl],function(data){if(data[0]&&data[0].path!=null)oThis.asc_loadLocalImageAndAction(AscCommon.g_oDocumentUrls.imagePath2Local(data[0].path),fCallback2)},this.editorId===c_oEditorId.Spreadsheet)};baseEditorsApi.prototype.asc_addOleObject=function(oPluginData){if(this.isViewMode)return; +var oThis=this;var sImgSrc=oPluginData["imgSrc"];var nWidthPix=oPluginData["widthPix"];var nHeightPix=oPluginData["heightPix"];var fWidth=oPluginData["width"];var fHeight=oPluginData["height"];var sData=oPluginData["data"];var sGuid=oPluginData["guid"];if(typeof sImgSrc==="string"&&sImgSrc.length>0&&typeof sData==="string"&&typeof sGuid==="string"&&sGuid.length>0&&AscFormat.isRealNumber(nWidthPix)&&AscFormat.isRealNumber(nHeightPix)&&AscFormat.isRealNumber(fWidth)&&AscFormat.isRealNumber(fHeight))this.asc_checkImageUrlAndAction(sImgSrc, +function(oImage){oThis.asc_addOleObjectAction(AscCommon.g_oDocumentUrls.getImageLocal(oImage.src),sData,sGuid,fWidth,fHeight,nWidthPix,nHeightPix)})};baseEditorsApi.prototype.asc_editOleObject=function(oPluginData){if(this.isViewMode)return;var oThis=this;var bResize=oPluginData["resize"];var sImgSrc=oPluginData["imgSrc"];var oOleObject=AscCommon.g_oTableId.Get_ById(oPluginData["objectId"]);var nWidthPix=oPluginData["widthPix"];var nHeightPix=oPluginData["heightPix"];var sData=oPluginData["data"]; +if(typeof sImgSrc==="string"&&sImgSrc.length>0&&typeof sData==="string"&&oOleObject&&AscFormat.isRealNumber(nWidthPix)&&AscFormat.isRealNumber(nHeightPix))this.asc_checkImageUrlAndAction(sImgSrc,function(oImage){oThis.asc_editOleObjectAction(bResize,oOleObject,AscCommon.g_oDocumentUrls.getImageLocal(oImage.src),sData,nWidthPix,nHeightPix)})};baseEditorsApi.prototype["pluginMethod_AddOleObject"]=baseEditorsApi.prototype.asc_addOleObject;baseEditorsApi.prototype["pluginMethod_EditOleObject"]=baseEditorsApi.prototype.asc_editOleObject; +baseEditorsApi.prototype.asc_addOleObjectAction=function(sLocalUrl,sData,sApplicationId,fWidth,fHeight){};baseEditorsApi.prototype.asc_editOleObjectAction=function(bResize,oOleObject,sImageUrl,sData,nPixWidth,nPixHeight){};baseEditorsApi.prototype.asc_selectSearchingResults=function(value){if(this.selectSearchingResults===value)return;this.selectSearchingResults=value;this._selectSearchingResults(value)};baseEditorsApi.prototype.asc_startEditCurrentOleObject=function(){};baseEditorsApi.prototype.asc_canEditCrop= +function(){};baseEditorsApi.prototype.asc_startEditCrop=function(){};baseEditorsApi.prototype.asc_endEditCrop=function(){};baseEditorsApi.prototype.asc_cropFit=function(){};baseEditorsApi.prototype.asc_cropFill=function(){};baseEditorsApi.prototype.asc_showRevision=function(newObj){};baseEditorsApi.prototype.asc_undoAllChanges=function(){};baseEditorsApi.prototype.asc_getAdvancedOptions=function(){var cp={"codepage":AscCommon.c_oAscCodePageUtf8,"encodings":AscCommon.getEncodingParams()};return new AscCommon.asc_CAdvancedOptions(cp)}; +baseEditorsApi.prototype.asc_Print=function(options){if(window["AscDesktopEditor"]&&this._printDesktop(options))return;if(!options)options=new Asc.asc_CDownloadOptions;options.fileType=Asc.c_oAscFileType.PDF;this.downloadAs(c_oAscAsyncAction.Print,options)};baseEditorsApi.prototype.asc_Save=function(isAutoSave,isIdle){var t=this;var res=false;if(this.canSave&&this._saveCheck()){this.IsUserSave=!isAutoSave;if(this.asc_isDocumentCanSave()||AscCommon.History.Have_Changes()||this._haveOtherChanges()|| +this.canUnlockDocument||this.forceSaveUndoRequest){if(this._prepareSave(isIdle)){this.canSave=false;this.CoAuthoringApi.askSaveChanges(function(e){t._onSaveCallback(e)});res=true}}else if(this.isForceSaveOnUserSave&&this.IsUserSave)this.forceSave()}return res};baseEditorsApi.prototype.asc_isDocumentCanSave=function(){return this.isDocumentCanSave};baseEditorsApi.prototype.asc_getCanUndo=function(){return AscCommon.History.Can_Undo()};baseEditorsApi.prototype.asc_getCanRedo=function(){return AscCommon.History.Can_Redo()}; +baseEditorsApi.prototype.asc_isOffline=function(){return window.location.protocol.indexOf("file")==0?true:false};baseEditorsApi.prototype.asc_getUrlType=function(url){return AscCommon.getUrlType(url)};baseEditorsApi.prototype.openDocument=function(file){};baseEditorsApi.prototype.openDocumentFromZip=function(){};baseEditorsApi.prototype.onEndLoadDocInfo=function(){if(this.isLoadFullApi&&this.DocInfo){if(this.DocInfo.get_OfflineApp())this._openChartOrLocalDocument();this.onEndLoadFile(null)}};baseEditorsApi.prototype.onEndLoadFile= +function(result){if(result)this.openResult=result;if(this.isLoadFullApi&&this.DocInfo&&this.openResult&&this.isLoadFonts){this.openDocument(this.openResult);this.openResult=null}};baseEditorsApi.prototype._onEndLoadSdk=function(){AscCommon.g_oTableId.init();var t=this;AscCommon.InitDragAndDrop(this.HtmlElement,function(error,files){t._uploadCallback(error,files)});AscFonts.g_fontApplication.Init();this.FontLoader=AscCommon.g_font_loader;this.ImageLoader=AscCommon.g_image_loader;this.FontLoader.put_Api(this); +this.ImageLoader.put_Api(this);this.FontLoader.SetStandartFonts();this.chartPreviewManager=new AscCommon.ChartPreviewManager;this.textArtPreviewManager=new AscCommon.TextArtPreviewManager;AscFormat.initStyleManager();if(null!==this.tmpFocus)this.asc_enableKeyEvents(this.tmpFocus);this.pluginsManager=Asc.createPluginsManager(this);this.macros=new AscCommon.CDocumentMacros;this._loadSdkImages();if(AscFonts.FontPickerByCharacter&&this.documentTitle)AscFonts.FontPickerByCharacter.getFontsByString(this.documentTitle)}; +baseEditorsApi.prototype._loadSdkImages=function(){};baseEditorsApi.prototype.sendStandartTextures=function(){if(this.isSendStandartTextures)return;this.isSendStandartTextures=true;var _count=AscCommon.g_oUserTexturePresets.length;var arr=new Array(_count);var arrToDownload=[];for(var i=0;i<_count;++i){arr[i]=new AscCommon.asc_CTexture;arr[i].Id=i;arr[i].Image=AscCommon.g_oUserTexturePresets[i];arrToDownload.push(AscCommon.g_oUserTexturePresets[i])}this.ImageLoader.LoadImagesWithCallback(arrToDownload, +function(){},0);this.sendEvent("asc_onInitStandartTextures",arr)};baseEditorsApi.prototype.sendMathToMenu=function(){if(this.MathMenuLoad)return;var _MathPainter=new AscFormat.CMathPainter(this);_MathPainter.Generate();this.MathMenuLoad=true};baseEditorsApi.prototype.sendMathTypesToMenu=function(_math){this.sendEvent("asc_onMathTypes",_math)};baseEditorsApi.prototype.asyncFontEndLoaded_MathDraw=function(Obj){this.sync_EndAction(c_oAscAsyncActionType.Information,c_oAscAsyncAction.LoadFont);Obj.Generate2()}; +baseEditorsApi.prototype.asc_GetCurrentColorSchemeName=function(){return""};baseEditorsApi.prototype.sendColorThemes=function(theme){var result=AscCommon.g_oUserColorScheme.slice();var _extra=theme.extraClrSchemeLst;var _count=_extra.length;var oNameMap={};var nStartIndex=result.length;for(var i=0;i<_count;++i){var _scheme=_extra[i].clrScheme;if(oNameMap[_scheme.name])continue;oNameMap[_scheme.name]=true;result.push(AscCommon.getAscColorScheme(_scheme,theme))}_scheme=theme.themeElements&&theme.themeElements.clrScheme; +if(_scheme)if(!AscCommon.getColorSchemeByName(_scheme.name)&&!oNameMap[_scheme.name])result.splice(nStartIndex,0,AscCommon.getAscColorScheme(_scheme,theme));this.sendEvent("asc_onSendThemeColorSchemes",result);return result};baseEditorsApi.prototype.showVideoControl=function(sMediaName,extX,extY,transform){if(!window["AscDesktopEditor"]||!window["AscDesktopEditor"]["MediaStart"])return;switch(this.editorId){case c_oEditorId.Word:{break}case c_oEditorId.Presentation:{var manager=this.WordControl.DemonstrationManager; +if(!manager.Mode){var pos=this.WordControl.m_oDrawingDocument.ConvertCoordsToCursorWR(0,0,this.WordControl.m_oLogicDocument.CurPage,null,true);pos.X+=this.WordControl.X;pos.Y+=this.WordControl.Y;if(!transform)window["AscDesktopEditor"]["MediaStart"](sMediaName,pos.X,pos.Y,extX,extY,this.WordControl.m_nZoomValue/100);else window["AscDesktopEditor"]["MediaStart"](sMediaName,pos.X,pos.Y,extX,extY,this.WordControl.m_nZoomValue/100,transform.sx,transform.shy,transform.shx,transform.sy,transform.tx,transform.ty)}else{var transition= +this.WordControl.DemonstrationManager.Transition;if(manager.SlideNum>=0&&manager.SlideNum>0;var _zoom=_w/(_w_mm*AscCommon.g_dKoef_mm_to_pix);if(!transform)window["AscDesktopEditor"]["MediaStart"](sMediaName, +_x,transition.Rect.y,extX,extY,_zoom);else window["AscDesktopEditor"]["MediaStart"](sMediaName,_x,transition.Rect.y,extX,extY,_zoom,transform.sx,transform.shy,transform.shx,transform.sy,transform.tx,transform.ty)}}break}case c_oEditorId.Spreadsheet:{break}}};baseEditorsApi.prototype.hideVideoControl=function(){if(!window["AscDesktopEditor"]||!window["AscDesktopEditor"]["MediaEnd"])return;window["AscDesktopEditor"]["MediaEnd"]()};baseEditorsApi.prototype._checkLicenseApiFunctions=function(){return this.licenseResult&& true===this.licenseResult["plugins"]};baseEditorsApi.prototype.asc_pluginsRegister=function(basePath,plugins){if(null!=this.pluginsManager)this.pluginsManager.register(basePath,plugins)};baseEditorsApi.prototype.asc_pluginRun=function(guid,variation,pluginData){if(null!=this.pluginsManager)this.pluginsManager.run(guid,variation,pluginData)};baseEditorsApi.prototype.asc_pluginResize=function(pluginData){if(null!=this.pluginsManager)this.pluginsManager.runResize(pluginData)};baseEditorsApi.prototype.asc_pluginButtonClick= function(id){if(null!=this.pluginsManager)this.pluginsManager.buttonClick(id)};baseEditorsApi.prototype.asc_pluginEnableMouseEvents=function(isEnable){if(!this.pluginsManager)return;this.pluginsManager.onEnableMouseEvents(isEnable)};baseEditorsApi.prototype.isEnabledDropTarget=function(){return true};baseEditorsApi.prototype.beginInlineDropTarget=function(e){};baseEditorsApi.prototype.endInlineDropTarget=function(e){};baseEditorsApi.prototype["pluginMethod_GetFontList"]=function(){return AscFonts.g_fontApplication.g_fontSelections.SerializeList()}; baseEditorsApi.prototype["pluginMethod_InputText"]=function(text,textReplace){if(this.isViewMode||!AscCommon.g_inputContext)return;var codes=[];for(var i=text.getUnicodeIterator();i.check();i.next())codes.push(i.value());if(textReplace)for(var i=0;i0&&typeof sData==="string"&&typeof sGuid==="string"&&sGuid.length>0&&AscFormat.isRealNumber(nWidthPix)&&AscFormat.isRealNumber(nHeightPix)&&AscFormat.isRealNumber(fWidth)&&AscFormat.isRealNumber(fHeight))this.asc_checkImageUrlAndAction(sImgSrc,function(oImage){oThis.asc_addOleObjectAction(AscCommon.g_oDocumentUrls.getImageLocal(oImage.src), -sData,sGuid,fWidth,fHeight,nWidthPix,nHeightPix)})};baseEditorsApi.prototype.asc_editOleObject=function(oPluginData){if(this.isViewMode)return;var oThis=this;var bResize=oPluginData["resize"];var sImgSrc=oPluginData["imgSrc"];var oOleObject=AscCommon.g_oTableId.Get_ById(oPluginData["objectId"]);var nWidthPix=oPluginData["widthPix"];var nHeightPix=oPluginData["heightPix"];var sData=oPluginData["data"];if(typeof sImgSrc==="string"&&sImgSrc.length>0&&typeof sData==="string"&&oOleObject&&AscFormat.isRealNumber(nWidthPix)&& -AscFormat.isRealNumber(nHeightPix))this.asc_checkImageUrlAndAction(sImgSrc,function(oImage){oThis.asc_editOleObjectAction(bResize,oOleObject,AscCommon.g_oDocumentUrls.getImageLocal(oImage.src),sData,nWidthPix,nHeightPix)})};baseEditorsApi.prototype["pluginMethod_AddOleObject"]=baseEditorsApi.prototype.asc_addOleObject;baseEditorsApi.prototype["pluginMethod_EditOleObject"]=baseEditorsApi.prototype.asc_editOleObject;baseEditorsApi.prototype.asc_addOleObjectAction=function(sLocalUrl,sData,sApplicationId, -fWidth,fHeight){};baseEditorsApi.prototype.asc_editOleObjectAction=function(bResize,oOleObject,sImageUrl,sData,nPixWidth,nPixHeight){};baseEditorsApi.prototype.asc_selectSearchingResults=function(value){if(this.selectSearchingResults===value)return;this.selectSearchingResults=value;this._selectSearchingResults(value)};baseEditorsApi.prototype.asc_startEditCurrentOleObject=function(){};baseEditorsApi.prototype.asc_canEditCrop=function(){};baseEditorsApi.prototype.asc_startEditCrop=function(){};baseEditorsApi.prototype.asc_endEditCrop= -function(){};baseEditorsApi.prototype.asc_cropFit=function(){};baseEditorsApi.prototype.asc_cropFill=function(){};baseEditorsApi.prototype.asc_showRevision=function(newObj){};baseEditorsApi.prototype.asc_undoAllChanges=function(){};baseEditorsApi.prototype.asc_getAdvancedOptions=function(){var cp={"codepage":AscCommon.c_oAscCodePageUtf8,"encodings":AscCommon.getEncodingParams()};return new AscCommon.asc_CAdvancedOptions(cp)};baseEditorsApi.prototype.asc_Print=function(options){if(window["AscDesktopEditor"]&& -this._printDesktop(options))return;if(!options)options=new Asc.asc_CDownloadOptions;options.fileType=Asc.c_oAscFileType.PDF;this.downloadAs(c_oAscAsyncAction.Print,options)};baseEditorsApi.prototype.asc_Save=function(isAutoSave,isIdle){var t=this;var res=false;if(this.canSave&&this._saveCheck()){this.IsUserSave=!isAutoSave;if(this.asc_isDocumentCanSave()||AscCommon.History.Have_Changes()||this._haveOtherChanges()||this.canUnlockDocument||this.forceSaveUndoRequest){if(this._prepareSave(isIdle)){this.canSave= -false;this.CoAuthoringApi.askSaveChanges(function(e){t._onSaveCallback(e)});res=true}}else if(this.isForceSaveOnUserSave&&this.IsUserSave)this.forceSave()}return res};baseEditorsApi.prototype.asc_isDocumentCanSave=function(){return this.isDocumentCanSave};baseEditorsApi.prototype.asc_getCanUndo=function(){return AscCommon.History.Can_Undo()};baseEditorsApi.prototype.asc_getCanRedo=function(){return AscCommon.History.Can_Redo()};baseEditorsApi.prototype.asc_isOffline=function(){return window.location.protocol.indexOf("file")== -0?true:false};baseEditorsApi.prototype.asc_getUrlType=function(url){return AscCommon.getUrlType(url)};baseEditorsApi.prototype.openDocument=function(file){};baseEditorsApi.prototype.openDocumentFromZip=function(){};baseEditorsApi.prototype.onEndLoadDocInfo=function(){if(this.isLoadFullApi&&this.DocInfo){if(this.DocInfo.get_OfflineApp())this._openChartOrLocalDocument();this.onEndLoadFile(null)}};baseEditorsApi.prototype.onEndLoadFile=function(result){if(result)this.openResult=result;if(this.isLoadFullApi&& -this.DocInfo&&this.openResult&&this.isLoadFonts){this.openDocument(this.openResult);this.openResult=null}};baseEditorsApi.prototype._onEndLoadSdk=function(){AscCommon.g_oTableId.init();var t=this;AscCommon.InitDragAndDrop(this.HtmlElement,function(error,files){t._uploadCallback(error,files)});AscFonts.g_fontApplication.Init();this.FontLoader=AscCommon.g_font_loader;this.ImageLoader=AscCommon.g_image_loader;this.FontLoader.put_Api(this);this.ImageLoader.put_Api(this);this.FontLoader.SetStandartFonts(); -this.chartPreviewManager=new AscCommon.ChartPreviewManager;this.textArtPreviewManager=new AscCommon.TextArtPreviewManager;AscFormat.initStyleManager();if(null!==this.tmpFocus)this.asc_enableKeyEvents(this.tmpFocus);this.pluginsManager=Asc.createPluginsManager(this);this.macros=new AscCommon.CDocumentMacros;this._loadSdkImages();if(AscFonts.FontPickerByCharacter&&this.documentTitle)AscFonts.FontPickerByCharacter.getFontsByString(this.documentTitle)};baseEditorsApi.prototype._loadSdkImages=function(){}; -baseEditorsApi.prototype.sendStandartTextures=function(){if(this.isSendStandartTextures)return;this.isSendStandartTextures=true;var _count=AscCommon.g_oUserTexturePresets.length;var arr=new Array(_count);var arrToDownload=[];for(var i=0;i<_count;++i){arr[i]=new AscCommon.asc_CTexture;arr[i].Id=i;arr[i].Image=AscCommon.g_oUserTexturePresets[i];arrToDownload.push(AscCommon.g_oUserTexturePresets[i])}this.ImageLoader.LoadImagesWithCallback(arrToDownload,function(){},0);this.sendEvent("asc_onInitStandartTextures", -arr)};baseEditorsApi.prototype.sendMathToMenu=function(){if(this.MathMenuLoad)return;var _MathPainter=new AscFormat.CMathPainter(this);_MathPainter.Generate();this.MathMenuLoad=true};baseEditorsApi.prototype.sendMathTypesToMenu=function(_math){this.sendEvent("asc_onMathTypes",_math)};baseEditorsApi.prototype.asyncFontEndLoaded_MathDraw=function(Obj){this.sync_EndAction(c_oAscAsyncActionType.Information,c_oAscAsyncAction.LoadFont);Obj.Generate2()};baseEditorsApi.prototype.asc_GetCurrentColorSchemeName= -function(){return""};baseEditorsApi.prototype.sendColorThemes=function(theme){var result=AscCommon.g_oUserColorScheme.slice();var _extra=theme.extraClrSchemeLst;var _count=_extra.length;var oNameMap={};var nStartIndex=result.length;for(var i=0;i<_count;++i){var _scheme=_extra[i].clrScheme;if(oNameMap[_scheme.name])continue;oNameMap[_scheme.name]=true;result.push(AscCommon.getAscColorScheme(_scheme,theme))}_scheme=theme.themeElements&&theme.themeElements.clrScheme;if(_scheme)if(!AscCommon.getColorSchemeByName(_scheme.name)&& -!oNameMap[_scheme.name])result.splice(nStartIndex,0,AscCommon.getAscColorScheme(_scheme,theme));this.sendEvent("asc_onSendThemeColorSchemes",result);return result};baseEditorsApi.prototype.showVideoControl=function(sMediaName,extX,extY,transform){if(!window["AscDesktopEditor"]||!window["AscDesktopEditor"]["MediaStart"])return;switch(this.editorId){case c_oEditorId.Word:{break}case c_oEditorId.Presentation:{var manager=this.WordControl.DemonstrationManager;if(!manager.Mode){var pos=this.WordControl.m_oDrawingDocument.ConvertCoordsToCursorWR(0, -0,this.WordControl.m_oLogicDocument.CurPage,null,true);pos.X+=this.WordControl.X;pos.Y+=this.WordControl.Y;if(!transform)window["AscDesktopEditor"]["MediaStart"](sMediaName,pos.X,pos.Y,extX,extY,this.WordControl.m_nZoomValue/100);else window["AscDesktopEditor"]["MediaStart"](sMediaName,pos.X,pos.Y,extX,extY,this.WordControl.m_nZoomValue/100,transform.sx,transform.shy,transform.shx,transform.sy,transform.tx,transform.ty)}else{var transition=this.WordControl.DemonstrationManager.Transition;if(manager.SlideNum>= -0&&manager.SlideNum>0;var _zoom=_w/(_w_mm*AscCommon.g_dKoef_mm_to_pix);if(!transform)window["AscDesktopEditor"]["MediaStart"](sMediaName,_x,transition.Rect.y, -extX,extY,_zoom);else window["AscDesktopEditor"]["MediaStart"](sMediaName,_x,transition.Rect.y,extX,extY,_zoom,transform.sx,transform.shy,transform.shx,transform.sy,transform.tx,transform.ty)}}break}case c_oEditorId.Spreadsheet:{break}}};baseEditorsApi.prototype.hideVideoControl=function(){if(!window["AscDesktopEditor"]||!window["AscDesktopEditor"]["MediaEnd"])return;window["AscDesktopEditor"]["MediaEnd"]()};baseEditorsApi.prototype._checkLicenseApiFunctions=function(){return this.licenseResult&& +actionType)};if(window.parent.APP.printPdf&&(DownloadType.Print===downloadType||!downloadType)){window.parent.APP.printPdf(dataContainer,options.callback||this.fCurCallback);return}AscCommon.saveWithParts(function(fCallback1,oAdditionalData1,dataContainer1){AscCommon.sendCommand(t,fCallback1,oAdditionalData1,dataContainer1)},this.fCurCallback,options.callback,oAdditionalData,dataContainer)};baseEditorsApi.prototype.asc_getChartPreviews=function(chartType){return this.chartPreviewManager.getChartPreviews(chartType)}; +baseEditorsApi.prototype.asc_getTextArtPreviews=function(){return this.textArtPreviewManager.getWordArtStyles()};baseEditorsApi.prototype.asc_onOpenChartFrame=function(){if(this.isMobileVersion)return;this.isOpenedChartFrame=true};baseEditorsApi.prototype.asc_onCloseChartFrame=function(){this.isOpenedChartFrame=false};baseEditorsApi.prototype.asc_setInterfaceDrawImagePlaceShape=function(elementId){this.shapeElementId=elementId};baseEditorsApi.prototype.asc_getPropertyEditorShapes=function(){return[AscCommon.g_oAutoShapesGroups, +AscCommon.g_oAutoShapesTypes]};baseEditorsApi.prototype.asc_getPropertyEditorTextArts=function(){return[AscCommon.g_oPresetTxWarpGroups,AscCommon.g_PresetTxWarpTypes]};baseEditorsApi.prototype._addImageUrl=function(){};baseEditorsApi.prototype.asc_addImageCallback=function(res){};baseEditorsApi.prototype.asc_addImage=function(){var t=this;window.parent.APP.AddImage(function(res){console.log("AddImageCallback");t.asc_addImageCallback(res);t._addImageUrl([res.url])},function(){t.sendEvent("asc_onError", +error,c_oAscError.Level.NoCritical)});return;AscCommon.ShowImageFileDialog(this.documentId,this.documentUserId,this.CoAuthoringApi.get_jwt(),function(error,files){t._uploadCallback(error,files)},function(error){if(c_oAscError.ID.No!==error)t.sendEvent("asc_onError",error,c_oAscError.Level.NoCritical);t.sync_StartAction(c_oAscAsyncActionType.BlockInteraction,c_oAscAsyncAction.UploadImage)})};baseEditorsApi.prototype._uploadCallback=function(error,files){var t=this;if(c_oAscError.ID.No!==error)this.sendEvent("asc_onError", +error,c_oAscError.Level.NoCritical);else{this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction,c_oAscAsyncAction.UploadImage);AscCommon.UploadImageFiles(files,this.documentId,this.documentUserId,this.CoAuthoringApi.get_jwt(),function(error,urls){if(c_oAscError.ID.No!==error)t.sendEvent("asc_onError",error,c_oAscError.Level.NoCritical);else t._addImageUrl(urls);t.sync_EndAction(c_oAscAsyncActionType.BlockInteraction,c_oAscAsyncAction.UploadImage)})}};baseEditorsApi.prototype.asc_replaceLoadImageCallback= +function(fCallback){};baseEditorsApi.prototype.asc_loadLocalImageAndAction=function(sLocalImage,fCallback){var _loadedUrl=this.ImageLoader.LoadImage(AscCommon.getFullImageSrc2(sLocalImage),1);if(_loadedUrl!=null)fCallback(_loadedUrl);else this.asc_replaceLoadImageCallback(fCallback)};baseEditorsApi.prototype.asc_checkImageUrlAndAction=function(sImageUrl,fCallback){var oThis=this;this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction,c_oAscAsyncAction.UploadImage);var fCallback2=function(){oThis.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, +c_oAscAsyncAction.UploadImage);fCallback.apply(oThis,arguments)};var sLocalImage=AscCommon.g_oDocumentUrls.getImageLocal(sImageUrl);if(sLocalImage){this.asc_loadLocalImageAndAction(sLocalImage,fCallback2);return}AscCommon.sendImgUrls(oThis,[sImageUrl],function(data){if(data[0]&&data[0].path!=null)oThis.asc_loadLocalImageAndAction(AscCommon.g_oDocumentUrls.imagePath2Local(data[0].path),fCallback2)},this.editorId===c_oEditorId.Spreadsheet)};baseEditorsApi.prototype.asc_addOleObject=function(oPluginData){if(this.isViewMode)return; +var oThis=this;var sImgSrc=oPluginData["imgSrc"];var nWidthPix=oPluginData["widthPix"];var nHeightPix=oPluginData["heightPix"];var fWidth=oPluginData["width"];var fHeight=oPluginData["height"];var sData=oPluginData["data"];var sGuid=oPluginData["guid"];if(typeof sImgSrc==="string"&&sImgSrc.length>0&&typeof sData==="string"&&typeof sGuid==="string"&&sGuid.length>0&&AscFormat.isRealNumber(nWidthPix)&&AscFormat.isRealNumber(nHeightPix)&&AscFormat.isRealNumber(fWidth)&&AscFormat.isRealNumber(fHeight))this.asc_checkImageUrlAndAction(sImgSrc, +function(oImage){oThis.asc_addOleObjectAction(AscCommon.g_oDocumentUrls.getImageLocal(oImage.src),sData,sGuid,fWidth,fHeight,nWidthPix,nHeightPix)})};baseEditorsApi.prototype.asc_editOleObject=function(oPluginData){if(this.isViewMode)return;var oThis=this;var bResize=oPluginData["resize"];var sImgSrc=oPluginData["imgSrc"];var oOleObject=AscCommon.g_oTableId.Get_ById(oPluginData["objectId"]);var nWidthPix=oPluginData["widthPix"];var nHeightPix=oPluginData["heightPix"];var sData=oPluginData["data"]; +if(typeof sImgSrc==="string"&&sImgSrc.length>0&&typeof sData==="string"&&oOleObject&&AscFormat.isRealNumber(nWidthPix)&&AscFormat.isRealNumber(nHeightPix))this.asc_checkImageUrlAndAction(sImgSrc,function(oImage){oThis.asc_editOleObjectAction(bResize,oOleObject,AscCommon.g_oDocumentUrls.getImageLocal(oImage.src),sData,nWidthPix,nHeightPix)})};baseEditorsApi.prototype["pluginMethod_AddOleObject"]=baseEditorsApi.prototype.asc_addOleObject;baseEditorsApi.prototype["pluginMethod_EditOleObject"]=baseEditorsApi.prototype.asc_editOleObject; +baseEditorsApi.prototype.asc_addOleObjectAction=function(sLocalUrl,sData,sApplicationId,fWidth,fHeight){};baseEditorsApi.prototype.asc_editOleObjectAction=function(bResize,oOleObject,sImageUrl,sData,nPixWidth,nPixHeight){};baseEditorsApi.prototype.asc_selectSearchingResults=function(value){if(this.selectSearchingResults===value)return;this.selectSearchingResults=value;this._selectSearchingResults(value)};baseEditorsApi.prototype.asc_startEditCurrentOleObject=function(){};baseEditorsApi.prototype.asc_canEditCrop= +function(){};baseEditorsApi.prototype.asc_startEditCrop=function(){};baseEditorsApi.prototype.asc_endEditCrop=function(){};baseEditorsApi.prototype.asc_cropFit=function(){};baseEditorsApi.prototype.asc_cropFill=function(){};baseEditorsApi.prototype.asc_showRevision=function(newObj){};baseEditorsApi.prototype.asc_undoAllChanges=function(){};baseEditorsApi.prototype.asc_getAdvancedOptions=function(){var cp={"codepage":AscCommon.c_oAscCodePageUtf8,"encodings":AscCommon.getEncodingParams()};return new AscCommon.asc_CAdvancedOptions(cp)}; +baseEditorsApi.prototype.asc_Print=function(options){if(window["AscDesktopEditor"]&&this._printDesktop(options))return;if(!options)options=new Asc.asc_CDownloadOptions;options.fileType=Asc.c_oAscFileType.PDF;this.downloadAs(c_oAscAsyncAction.Print,options)};baseEditorsApi.prototype.asc_Save=function(isAutoSave,isIdle){var t=this;var res=false;if(this.canSave&&this._saveCheck()){this.IsUserSave=!isAutoSave;if(this.asc_isDocumentCanSave()||AscCommon.History.Have_Changes()||this._haveOtherChanges()|| +this.canUnlockDocument||this.forceSaveUndoRequest){if(this._prepareSave(isIdle)){this.canSave=false;this.CoAuthoringApi.askSaveChanges(function(e){t._onSaveCallback(e)});res=true}}else if(this.isForceSaveOnUserSave&&this.IsUserSave)this.forceSave()}return res};baseEditorsApi.prototype.asc_isDocumentCanSave=function(){return this.isDocumentCanSave};baseEditorsApi.prototype.asc_getCanUndo=function(){return AscCommon.History.Can_Undo()};baseEditorsApi.prototype.asc_getCanRedo=function(){return AscCommon.History.Can_Redo()}; +baseEditorsApi.prototype.asc_isOffline=function(){return window.location.protocol.indexOf("file")==0?true:false};baseEditorsApi.prototype.asc_getUrlType=function(url){return AscCommon.getUrlType(url)};baseEditorsApi.prototype.openDocument=function(file){};baseEditorsApi.prototype.openDocumentFromZip=function(){};baseEditorsApi.prototype.onEndLoadDocInfo=function(){if(this.isLoadFullApi&&this.DocInfo){if(this.DocInfo.get_OfflineApp())this._openChartOrLocalDocument();this.onEndLoadFile(null)}};baseEditorsApi.prototype.onEndLoadFile= +function(result){if(result)this.openResult=result;if(this.isLoadFullApi&&this.DocInfo&&this.openResult&&this.isLoadFonts){this.openDocument(this.openResult);this.openResult=null}};baseEditorsApi.prototype._onEndLoadSdk=function(){AscCommon.g_oTableId.init();var t=this;AscCommon.InitDragAndDrop(this.HtmlElement,function(error,files){t._uploadCallback(error,files)});AscFonts.g_fontApplication.Init();this.FontLoader=AscCommon.g_font_loader;this.ImageLoader=AscCommon.g_image_loader;this.FontLoader.put_Api(this); +this.ImageLoader.put_Api(this);this.FontLoader.SetStandartFonts();this.chartPreviewManager=new AscCommon.ChartPreviewManager;this.textArtPreviewManager=new AscCommon.TextArtPreviewManager;AscFormat.initStyleManager();if(null!==this.tmpFocus)this.asc_enableKeyEvents(this.tmpFocus);this.pluginsManager=Asc.createPluginsManager(this);this.macros=new AscCommon.CDocumentMacros;this._loadSdkImages();if(AscFonts.FontPickerByCharacter&&this.documentTitle)AscFonts.FontPickerByCharacter.getFontsByString(this.documentTitle)}; +baseEditorsApi.prototype._loadSdkImages=function(){};baseEditorsApi.prototype.sendStandartTextures=function(){if(this.isSendStandartTextures)return;this.isSendStandartTextures=true;var _count=AscCommon.g_oUserTexturePresets.length;var arr=new Array(_count);var arrToDownload=[];for(var i=0;i<_count;++i){arr[i]=new AscCommon.asc_CTexture;arr[i].Id=i;arr[i].Image=AscCommon.g_oUserTexturePresets[i];arrToDownload.push(AscCommon.g_oUserTexturePresets[i])}this.ImageLoader.LoadImagesWithCallback(arrToDownload, +function(){},0);this.sendEvent("asc_onInitStandartTextures",arr)};baseEditorsApi.prototype.sendMathToMenu=function(){if(this.MathMenuLoad)return;var _MathPainter=new AscFormat.CMathPainter(this);_MathPainter.Generate();this.MathMenuLoad=true};baseEditorsApi.prototype.sendMathTypesToMenu=function(_math){this.sendEvent("asc_onMathTypes",_math)};baseEditorsApi.prototype.asyncFontEndLoaded_MathDraw=function(Obj){this.sync_EndAction(c_oAscAsyncActionType.Information,c_oAscAsyncAction.LoadFont);Obj.Generate2()}; +baseEditorsApi.prototype.asc_GetCurrentColorSchemeName=function(){return""};baseEditorsApi.prototype.sendColorThemes=function(theme){var result=AscCommon.g_oUserColorScheme.slice();var _extra=theme.extraClrSchemeLst;var _count=_extra.length;var oNameMap={};var nStartIndex=result.length;for(var i=0;i<_count;++i){var _scheme=_extra[i].clrScheme;if(oNameMap[_scheme.name])continue;oNameMap[_scheme.name]=true;result.push(AscCommon.getAscColorScheme(_scheme,theme))}_scheme=theme.themeElements&&theme.themeElements.clrScheme; +if(_scheme)if(!AscCommon.getColorSchemeByName(_scheme.name)&&!oNameMap[_scheme.name])result.splice(nStartIndex,0,AscCommon.getAscColorScheme(_scheme,theme));this.sendEvent("asc_onSendThemeColorSchemes",result);return result};baseEditorsApi.prototype.showVideoControl=function(sMediaName,extX,extY,transform){if(!window["AscDesktopEditor"]||!window["AscDesktopEditor"]["MediaStart"])return;switch(this.editorId){case c_oEditorId.Word:{break}case c_oEditorId.Presentation:{var manager=this.WordControl.DemonstrationManager; +if(!manager.Mode){var pos=this.WordControl.m_oDrawingDocument.ConvertCoordsToCursorWR(0,0,this.WordControl.m_oLogicDocument.CurPage,null,true);pos.X+=this.WordControl.X;pos.Y+=this.WordControl.Y;if(!transform)window["AscDesktopEditor"]["MediaStart"](sMediaName,pos.X,pos.Y,extX,extY,this.WordControl.m_nZoomValue/100);else window["AscDesktopEditor"]["MediaStart"](sMediaName,pos.X,pos.Y,extX,extY,this.WordControl.m_nZoomValue/100,transform.sx,transform.shy,transform.shx,transform.sy,transform.tx,transform.ty)}else{var transition= +this.WordControl.DemonstrationManager.Transition;if(manager.SlideNum>=0&&manager.SlideNum>0;var _zoom=_w/(_w_mm*AscCommon.g_dKoef_mm_to_pix);if(!transform)window["AscDesktopEditor"]["MediaStart"](sMediaName, +_x,transition.Rect.y,extX,extY,_zoom);else window["AscDesktopEditor"]["MediaStart"](sMediaName,_x,transition.Rect.y,extX,extY,_zoom,transform.sx,transform.shy,transform.shx,transform.sy,transform.tx,transform.ty)}}break}case c_oEditorId.Spreadsheet:{break}}};baseEditorsApi.prototype.hideVideoControl=function(){if(!window["AscDesktopEditor"]||!window["AscDesktopEditor"]["MediaEnd"])return;window["AscDesktopEditor"]["MediaEnd"]()};baseEditorsApi.prototype._checkLicenseApiFunctions=function(){return this.licenseResult&& true===this.licenseResult["plugins"]};baseEditorsApi.prototype.asc_pluginsRegister=function(basePath,plugins){if(null!=this.pluginsManager)this.pluginsManager.register(basePath,plugins)};baseEditorsApi.prototype.asc_pluginRun=function(guid,variation,pluginData){if(null!=this.pluginsManager)this.pluginsManager.run(guid,variation,pluginData)};baseEditorsApi.prototype.asc_pluginResize=function(pluginData){if(null!=this.pluginsManager)this.pluginsManager.runResize(pluginData)};baseEditorsApi.prototype.asc_pluginButtonClick= function(id){if(null!=this.pluginsManager)this.pluginsManager.buttonClick(id)};baseEditorsApi.prototype.asc_pluginEnableMouseEvents=function(isEnable){if(!this.pluginsManager)return;this.pluginsManager.onEnableMouseEvents(isEnable)};baseEditorsApi.prototype.isEnabledDropTarget=function(){return true};baseEditorsApi.prototype.beginInlineDropTarget=function(e){};baseEditorsApi.prototype.endInlineDropTarget=function(e){};baseEditorsApi.prototype["pluginMethod_GetFontList"]=function(){return AscFonts.g_fontApplication.g_fontSelections.SerializeList()}; baseEditorsApi.prototype["pluginMethod_InputText"]=function(text,textReplace){if(this.isViewMode||!AscCommon.g_inputContext)return;var codes=[];for(var i=text.getUnicodeIterator();i.check();i.next())codes.push(i.value());if(textReplace)for(var i=0;i0&&typeof sData==="string"&&typeof sGuid==="string"&&sGuid.length>0&&AscFormat.isRealNumber(nWidthPix)&&AscFormat.isRealNumber(nHeightPix)&&AscFormat.isRealNumber(fWidth)&&AscFormat.isRealNumber(fHeight))this.asc_checkImageUrlAndAction(sImgSrc,function(oImage){oThis.asc_addOleObjectAction(AscCommon.g_oDocumentUrls.getImageLocal(oImage.src), -sData,sGuid,fWidth,fHeight,nWidthPix,nHeightPix)})};baseEditorsApi.prototype.asc_editOleObject=function(oPluginData){if(this.isViewMode)return;var oThis=this;var bResize=oPluginData["resize"];var sImgSrc=oPluginData["imgSrc"];var oOleObject=AscCommon.g_oTableId.Get_ById(oPluginData["objectId"]);var nWidthPix=oPluginData["widthPix"];var nHeightPix=oPluginData["heightPix"];var sData=oPluginData["data"];if(typeof sImgSrc==="string"&&sImgSrc.length>0&&typeof sData==="string"&&oOleObject&&AscFormat.isRealNumber(nWidthPix)&& -AscFormat.isRealNumber(nHeightPix))this.asc_checkImageUrlAndAction(sImgSrc,function(oImage){oThis.asc_editOleObjectAction(bResize,oOleObject,AscCommon.g_oDocumentUrls.getImageLocal(oImage.src),sData,nWidthPix,nHeightPix)})};baseEditorsApi.prototype["pluginMethod_AddOleObject"]=baseEditorsApi.prototype.asc_addOleObject;baseEditorsApi.prototype["pluginMethod_EditOleObject"]=baseEditorsApi.prototype.asc_editOleObject;baseEditorsApi.prototype.asc_addOleObjectAction=function(sLocalUrl,sData,sApplicationId, -fWidth,fHeight){};baseEditorsApi.prototype.asc_editOleObjectAction=function(bResize,oOleObject,sImageUrl,sData,nPixWidth,nPixHeight){};baseEditorsApi.prototype.asc_selectSearchingResults=function(value){if(this.selectSearchingResults===value)return;this.selectSearchingResults=value;this._selectSearchingResults(value)};baseEditorsApi.prototype.asc_startEditCurrentOleObject=function(){};baseEditorsApi.prototype.asc_canEditCrop=function(){};baseEditorsApi.prototype.asc_startEditCrop=function(){};baseEditorsApi.prototype.asc_endEditCrop= -function(){};baseEditorsApi.prototype.asc_cropFit=function(){};baseEditorsApi.prototype.asc_cropFill=function(){};baseEditorsApi.prototype.asc_showRevision=function(newObj){};baseEditorsApi.prototype.asc_undoAllChanges=function(){};baseEditorsApi.prototype.asc_getAdvancedOptions=function(){var cp={"codepage":AscCommon.c_oAscCodePageUtf8,"encodings":AscCommon.getEncodingParams()};return new AscCommon.asc_CAdvancedOptions(cp)};baseEditorsApi.prototype.asc_Print=function(options){if(window["AscDesktopEditor"]&& -this._printDesktop(options))return;if(!options)options=new Asc.asc_CDownloadOptions;options.fileType=Asc.c_oAscFileType.PDF;this.downloadAs(c_oAscAsyncAction.Print,options)};baseEditorsApi.prototype.asc_Save=function(isAutoSave,isIdle){var t=this;var res=false;if(this.canSave&&this._saveCheck()){this.IsUserSave=!isAutoSave;if(this.asc_isDocumentCanSave()||AscCommon.History.Have_Changes()||this._haveOtherChanges()||this.canUnlockDocument||this.forceSaveUndoRequest){if(this._prepareSave(isIdle)){this.canSave= -false;this.CoAuthoringApi.askSaveChanges(function(e){t._onSaveCallback(e)});res=true}}else if(this.isForceSaveOnUserSave&&this.IsUserSave)this.forceSave()}return res};baseEditorsApi.prototype.asc_isDocumentCanSave=function(){return this.isDocumentCanSave};baseEditorsApi.prototype.asc_getCanUndo=function(){return AscCommon.History.Can_Undo()};baseEditorsApi.prototype.asc_getCanRedo=function(){return AscCommon.History.Can_Redo()};baseEditorsApi.prototype.asc_isOffline=function(){return window.location.protocol.indexOf("file")== -0?true:false};baseEditorsApi.prototype.asc_getUrlType=function(url){return AscCommon.getUrlType(url)};baseEditorsApi.prototype.openDocument=function(file){};baseEditorsApi.prototype.openDocumentFromZip=function(){};baseEditorsApi.prototype.onEndLoadDocInfo=function(){if(this.isLoadFullApi&&this.DocInfo){if(this.DocInfo.get_OfflineApp())this._openChartOrLocalDocument();this.onEndLoadFile(null)}};baseEditorsApi.prototype.onEndLoadFile=function(result){if(result)this.openResult=result;if(this.isLoadFullApi&& -this.DocInfo&&this.openResult&&this.isLoadFonts){this.openDocument(this.openResult);this.openResult=null}};baseEditorsApi.prototype._onEndLoadSdk=function(){AscCommon.g_oTableId.init();var t=this;AscCommon.InitDragAndDrop(this.HtmlElement,function(error,files){t._uploadCallback(error,files)});AscFonts.g_fontApplication.Init();this.FontLoader=AscCommon.g_font_loader;this.ImageLoader=AscCommon.g_image_loader;this.FontLoader.put_Api(this);this.ImageLoader.put_Api(this);this.FontLoader.SetStandartFonts(); -this.chartPreviewManager=new AscCommon.ChartPreviewManager;this.textArtPreviewManager=new AscCommon.TextArtPreviewManager;AscFormat.initStyleManager();if(null!==this.tmpFocus)this.asc_enableKeyEvents(this.tmpFocus);this.pluginsManager=Asc.createPluginsManager(this);this.macros=new AscCommon.CDocumentMacros;this._loadSdkImages();if(AscFonts.FontPickerByCharacter&&this.documentTitle)AscFonts.FontPickerByCharacter.getFontsByString(this.documentTitle)};baseEditorsApi.prototype._loadSdkImages=function(){}; -baseEditorsApi.prototype.sendStandartTextures=function(){if(this.isSendStandartTextures)return;this.isSendStandartTextures=true;var _count=AscCommon.g_oUserTexturePresets.length;var arr=new Array(_count);var arrToDownload=[];for(var i=0;i<_count;++i){arr[i]=new AscCommon.asc_CTexture;arr[i].Id=i;arr[i].Image=AscCommon.g_oUserTexturePresets[i];arrToDownload.push(AscCommon.g_oUserTexturePresets[i])}this.ImageLoader.LoadImagesWithCallback(arrToDownload,function(){},0);this.sendEvent("asc_onInitStandartTextures", -arr)};baseEditorsApi.prototype.sendMathToMenu=function(){if(this.MathMenuLoad)return;var _MathPainter=new AscFormat.CMathPainter(this);_MathPainter.Generate();this.MathMenuLoad=true};baseEditorsApi.prototype.sendMathTypesToMenu=function(_math){this.sendEvent("asc_onMathTypes",_math)};baseEditorsApi.prototype.asyncFontEndLoaded_MathDraw=function(Obj){this.sync_EndAction(c_oAscAsyncActionType.Information,c_oAscAsyncAction.LoadFont);Obj.Generate2()};baseEditorsApi.prototype.asc_GetCurrentColorSchemeName= -function(){return""};baseEditorsApi.prototype.sendColorThemes=function(theme){var result=AscCommon.g_oUserColorScheme.slice();var _extra=theme.extraClrSchemeLst;var _count=_extra.length;var oNameMap={};var nStartIndex=result.length;for(var i=0;i<_count;++i){var _scheme=_extra[i].clrScheme;if(oNameMap[_scheme.name])continue;oNameMap[_scheme.name]=true;result.push(AscCommon.getAscColorScheme(_scheme,theme))}_scheme=theme.themeElements&&theme.themeElements.clrScheme;if(_scheme)if(!AscCommon.getColorSchemeByName(_scheme.name)&& -!oNameMap[_scheme.name])result.splice(nStartIndex,0,AscCommon.getAscColorScheme(_scheme,theme));this.sendEvent("asc_onSendThemeColorSchemes",result);return result};baseEditorsApi.prototype.showVideoControl=function(sMediaName,extX,extY,transform){if(!window["AscDesktopEditor"]||!window["AscDesktopEditor"]["MediaStart"])return;switch(this.editorId){case c_oEditorId.Word:{break}case c_oEditorId.Presentation:{var manager=this.WordControl.DemonstrationManager;if(!manager.Mode){var pos=this.WordControl.m_oDrawingDocument.ConvertCoordsToCursorWR(0, -0,this.WordControl.m_oLogicDocument.CurPage,null,true);pos.X+=this.WordControl.X;pos.Y+=this.WordControl.Y;if(!transform)window["AscDesktopEditor"]["MediaStart"](sMediaName,pos.X,pos.Y,extX,extY,this.WordControl.m_nZoomValue/100);else window["AscDesktopEditor"]["MediaStart"](sMediaName,pos.X,pos.Y,extX,extY,this.WordControl.m_nZoomValue/100,transform.sx,transform.shy,transform.shx,transform.sy,transform.tx,transform.ty)}else{var transition=this.WordControl.DemonstrationManager.Transition;if(manager.SlideNum>= -0&&manager.SlideNum>0;var _zoom=_w/(_w_mm*AscCommon.g_dKoef_mm_to_pix);if(!transform)window["AscDesktopEditor"]["MediaStart"](sMediaName,_x,transition.Rect.y, -extX,extY,_zoom);else window["AscDesktopEditor"]["MediaStart"](sMediaName,_x,transition.Rect.y,extX,extY,_zoom,transform.sx,transform.shy,transform.shx,transform.sy,transform.tx,transform.ty)}}break}case c_oEditorId.Spreadsheet:{break}}};baseEditorsApi.prototype.hideVideoControl=function(){if(!window["AscDesktopEditor"]||!window["AscDesktopEditor"]["MediaEnd"])return;window["AscDesktopEditor"]["MediaEnd"]()};baseEditorsApi.prototype._checkLicenseApiFunctions=function(){return this.licenseResult&& +actionType)};if(window.parent.APP.printPdf&&(DownloadType.Print===downloadType||!downloadType)){window.parent.APP.printPdf(dataContainer,options.callback||this.fCurCallback);return}AscCommon.saveWithParts(function(fCallback1,oAdditionalData1,dataContainer1){AscCommon.sendCommand(t,fCallback1,oAdditionalData1,dataContainer1)},this.fCurCallback,options.callback,oAdditionalData,dataContainer)};baseEditorsApi.prototype.asc_getChartPreviews=function(chartType){return this.chartPreviewManager.getChartPreviews(chartType)}; +baseEditorsApi.prototype.asc_getTextArtPreviews=function(){return this.textArtPreviewManager.getWordArtStyles()};baseEditorsApi.prototype.asc_onOpenChartFrame=function(){if(this.isMobileVersion)return;this.isOpenedChartFrame=true};baseEditorsApi.prototype.asc_onCloseChartFrame=function(){this.isOpenedChartFrame=false};baseEditorsApi.prototype.asc_setInterfaceDrawImagePlaceShape=function(elementId){this.shapeElementId=elementId};baseEditorsApi.prototype.asc_getPropertyEditorShapes=function(){return[AscCommon.g_oAutoShapesGroups, +AscCommon.g_oAutoShapesTypes]};baseEditorsApi.prototype.asc_getPropertyEditorTextArts=function(){return[AscCommon.g_oPresetTxWarpGroups,AscCommon.g_PresetTxWarpTypes]};baseEditorsApi.prototype._addImageUrl=function(){};baseEditorsApi.prototype.asc_addImageCallback=function(res){};baseEditorsApi.prototype.asc_addImage=function(){var t=this;window.parent.APP.AddImage(function(res){console.log("AddImageCallback");t.asc_addImageCallback(res);t._addImageUrl([res.url])},function(){t.sendEvent("asc_onError", +error,c_oAscError.Level.NoCritical)});return;AscCommon.ShowImageFileDialog(this.documentId,this.documentUserId,this.CoAuthoringApi.get_jwt(),function(error,files){t._uploadCallback(error,files)},function(error){if(c_oAscError.ID.No!==error)t.sendEvent("asc_onError",error,c_oAscError.Level.NoCritical);t.sync_StartAction(c_oAscAsyncActionType.BlockInteraction,c_oAscAsyncAction.UploadImage)})};baseEditorsApi.prototype._uploadCallback=function(error,files){var t=this;if(c_oAscError.ID.No!==error)this.sendEvent("asc_onError", +error,c_oAscError.Level.NoCritical);else{this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction,c_oAscAsyncAction.UploadImage);AscCommon.UploadImageFiles(files,this.documentId,this.documentUserId,this.CoAuthoringApi.get_jwt(),function(error,urls){if(c_oAscError.ID.No!==error)t.sendEvent("asc_onError",error,c_oAscError.Level.NoCritical);else t._addImageUrl(urls);t.sync_EndAction(c_oAscAsyncActionType.BlockInteraction,c_oAscAsyncAction.UploadImage)})}};baseEditorsApi.prototype.asc_replaceLoadImageCallback= +function(fCallback){};baseEditorsApi.prototype.asc_loadLocalImageAndAction=function(sLocalImage,fCallback){var _loadedUrl=this.ImageLoader.LoadImage(AscCommon.getFullImageSrc2(sLocalImage),1);if(_loadedUrl!=null)fCallback(_loadedUrl);else this.asc_replaceLoadImageCallback(fCallback)};baseEditorsApi.prototype.asc_checkImageUrlAndAction=function(sImageUrl,fCallback){var oThis=this;this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction,c_oAscAsyncAction.UploadImage);var fCallback2=function(){oThis.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, +c_oAscAsyncAction.UploadImage);fCallback.apply(oThis,arguments)};var sLocalImage=AscCommon.g_oDocumentUrls.getImageLocal(sImageUrl);if(sLocalImage){this.asc_loadLocalImageAndAction(sLocalImage,fCallback2);return}AscCommon.sendImgUrls(oThis,[sImageUrl],function(data){if(data[0]&&data[0].path!=null)oThis.asc_loadLocalImageAndAction(AscCommon.g_oDocumentUrls.imagePath2Local(data[0].path),fCallback2)},this.editorId===c_oEditorId.Spreadsheet)};baseEditorsApi.prototype.asc_addOleObject=function(oPluginData){if(this.isViewMode)return; +var oThis=this;var sImgSrc=oPluginData["imgSrc"];var nWidthPix=oPluginData["widthPix"];var nHeightPix=oPluginData["heightPix"];var fWidth=oPluginData["width"];var fHeight=oPluginData["height"];var sData=oPluginData["data"];var sGuid=oPluginData["guid"];if(typeof sImgSrc==="string"&&sImgSrc.length>0&&typeof sData==="string"&&typeof sGuid==="string"&&sGuid.length>0&&AscFormat.isRealNumber(nWidthPix)&&AscFormat.isRealNumber(nHeightPix)&&AscFormat.isRealNumber(fWidth)&&AscFormat.isRealNumber(fHeight))this.asc_checkImageUrlAndAction(sImgSrc, +function(oImage){oThis.asc_addOleObjectAction(AscCommon.g_oDocumentUrls.getImageLocal(oImage.src),sData,sGuid,fWidth,fHeight,nWidthPix,nHeightPix)})};baseEditorsApi.prototype.asc_editOleObject=function(oPluginData){if(this.isViewMode)return;var oThis=this;var bResize=oPluginData["resize"];var sImgSrc=oPluginData["imgSrc"];var oOleObject=AscCommon.g_oTableId.Get_ById(oPluginData["objectId"]);var nWidthPix=oPluginData["widthPix"];var nHeightPix=oPluginData["heightPix"];var sData=oPluginData["data"]; +if(typeof sImgSrc==="string"&&sImgSrc.length>0&&typeof sData==="string"&&oOleObject&&AscFormat.isRealNumber(nWidthPix)&&AscFormat.isRealNumber(nHeightPix))this.asc_checkImageUrlAndAction(sImgSrc,function(oImage){oThis.asc_editOleObjectAction(bResize,oOleObject,AscCommon.g_oDocumentUrls.getImageLocal(oImage.src),sData,nWidthPix,nHeightPix)})};baseEditorsApi.prototype["pluginMethod_AddOleObject"]=baseEditorsApi.prototype.asc_addOleObject;baseEditorsApi.prototype["pluginMethod_EditOleObject"]=baseEditorsApi.prototype.asc_editOleObject; +baseEditorsApi.prototype.asc_addOleObjectAction=function(sLocalUrl,sData,sApplicationId,fWidth,fHeight){};baseEditorsApi.prototype.asc_editOleObjectAction=function(bResize,oOleObject,sImageUrl,sData,nPixWidth,nPixHeight){};baseEditorsApi.prototype.asc_selectSearchingResults=function(value){if(this.selectSearchingResults===value)return;this.selectSearchingResults=value;this._selectSearchingResults(value)};baseEditorsApi.prototype.asc_startEditCurrentOleObject=function(){};baseEditorsApi.prototype.asc_canEditCrop= +function(){};baseEditorsApi.prototype.asc_startEditCrop=function(){};baseEditorsApi.prototype.asc_endEditCrop=function(){};baseEditorsApi.prototype.asc_cropFit=function(){};baseEditorsApi.prototype.asc_cropFill=function(){};baseEditorsApi.prototype.asc_showRevision=function(newObj){};baseEditorsApi.prototype.asc_undoAllChanges=function(){};baseEditorsApi.prototype.asc_getAdvancedOptions=function(){var cp={"codepage":AscCommon.c_oAscCodePageUtf8,"encodings":AscCommon.getEncodingParams()};return new AscCommon.asc_CAdvancedOptions(cp)}; +baseEditorsApi.prototype.asc_Print=function(options){if(window["AscDesktopEditor"]&&this._printDesktop(options))return;if(!options)options=new Asc.asc_CDownloadOptions;options.fileType=Asc.c_oAscFileType.PDF;this.downloadAs(c_oAscAsyncAction.Print,options)};baseEditorsApi.prototype.asc_Save=function(isAutoSave,isIdle){var t=this;var res=false;if(this.canSave&&this._saveCheck()){this.IsUserSave=!isAutoSave;if(this.asc_isDocumentCanSave()||AscCommon.History.Have_Changes()||this._haveOtherChanges()|| +this.canUnlockDocument||this.forceSaveUndoRequest){if(this._prepareSave(isIdle)){this.canSave=false;this.CoAuthoringApi.askSaveChanges(function(e){t._onSaveCallback(e)});res=true}}else if(this.isForceSaveOnUserSave&&this.IsUserSave)this.forceSave()}return res};baseEditorsApi.prototype.asc_isDocumentCanSave=function(){return this.isDocumentCanSave};baseEditorsApi.prototype.asc_getCanUndo=function(){return AscCommon.History.Can_Undo()};baseEditorsApi.prototype.asc_getCanRedo=function(){return AscCommon.History.Can_Redo()}; +baseEditorsApi.prototype.asc_isOffline=function(){return window.location.protocol.indexOf("file")==0?true:false};baseEditorsApi.prototype.asc_getUrlType=function(url){return AscCommon.getUrlType(url)};baseEditorsApi.prototype.openDocument=function(file){};baseEditorsApi.prototype.openDocumentFromZip=function(){};baseEditorsApi.prototype.onEndLoadDocInfo=function(){if(this.isLoadFullApi&&this.DocInfo){if(this.DocInfo.get_OfflineApp())this._openChartOrLocalDocument();this.onEndLoadFile(null)}};baseEditorsApi.prototype.onEndLoadFile= +function(result){if(result)this.openResult=result;if(this.isLoadFullApi&&this.DocInfo&&this.openResult&&this.isLoadFonts){this.openDocument(this.openResult);this.openResult=null}};baseEditorsApi.prototype._onEndLoadSdk=function(){AscCommon.g_oTableId.init();var t=this;AscCommon.InitDragAndDrop(this.HtmlElement,function(error,files){t._uploadCallback(error,files)});AscFonts.g_fontApplication.Init();this.FontLoader=AscCommon.g_font_loader;this.ImageLoader=AscCommon.g_image_loader;this.FontLoader.put_Api(this); +this.ImageLoader.put_Api(this);this.FontLoader.SetStandartFonts();this.chartPreviewManager=new AscCommon.ChartPreviewManager;this.textArtPreviewManager=new AscCommon.TextArtPreviewManager;AscFormat.initStyleManager();if(null!==this.tmpFocus)this.asc_enableKeyEvents(this.tmpFocus);this.pluginsManager=Asc.createPluginsManager(this);this.macros=new AscCommon.CDocumentMacros;this._loadSdkImages();if(AscFonts.FontPickerByCharacter&&this.documentTitle)AscFonts.FontPickerByCharacter.getFontsByString(this.documentTitle)}; +baseEditorsApi.prototype._loadSdkImages=function(){};baseEditorsApi.prototype.sendStandartTextures=function(){if(this.isSendStandartTextures)return;this.isSendStandartTextures=true;var _count=AscCommon.g_oUserTexturePresets.length;var arr=new Array(_count);var arrToDownload=[];for(var i=0;i<_count;++i){arr[i]=new AscCommon.asc_CTexture;arr[i].Id=i;arr[i].Image=AscCommon.g_oUserTexturePresets[i];arrToDownload.push(AscCommon.g_oUserTexturePresets[i])}this.ImageLoader.LoadImagesWithCallback(arrToDownload, +function(){},0);this.sendEvent("asc_onInitStandartTextures",arr)};baseEditorsApi.prototype.sendMathToMenu=function(){if(this.MathMenuLoad)return;var _MathPainter=new AscFormat.CMathPainter(this);_MathPainter.Generate();this.MathMenuLoad=true};baseEditorsApi.prototype.sendMathTypesToMenu=function(_math){this.sendEvent("asc_onMathTypes",_math)};baseEditorsApi.prototype.asyncFontEndLoaded_MathDraw=function(Obj){this.sync_EndAction(c_oAscAsyncActionType.Information,c_oAscAsyncAction.LoadFont);Obj.Generate2()}; +baseEditorsApi.prototype.asc_GetCurrentColorSchemeName=function(){return""};baseEditorsApi.prototype.sendColorThemes=function(theme){var result=AscCommon.g_oUserColorScheme.slice();var _extra=theme.extraClrSchemeLst;var _count=_extra.length;var oNameMap={};var nStartIndex=result.length;for(var i=0;i<_count;++i){var _scheme=_extra[i].clrScheme;if(oNameMap[_scheme.name])continue;oNameMap[_scheme.name]=true;result.push(AscCommon.getAscColorScheme(_scheme,theme))}_scheme=theme.themeElements&&theme.themeElements.clrScheme; +if(_scheme)if(!AscCommon.getColorSchemeByName(_scheme.name)&&!oNameMap[_scheme.name])result.splice(nStartIndex,0,AscCommon.getAscColorScheme(_scheme,theme));this.sendEvent("asc_onSendThemeColorSchemes",result);return result};baseEditorsApi.prototype.showVideoControl=function(sMediaName,extX,extY,transform){if(!window["AscDesktopEditor"]||!window["AscDesktopEditor"]["MediaStart"])return;switch(this.editorId){case c_oEditorId.Word:{break}case c_oEditorId.Presentation:{var manager=this.WordControl.DemonstrationManager; +if(!manager.Mode){var pos=this.WordControl.m_oDrawingDocument.ConvertCoordsToCursorWR(0,0,this.WordControl.m_oLogicDocument.CurPage,null,true);pos.X+=this.WordControl.X;pos.Y+=this.WordControl.Y;if(!transform)window["AscDesktopEditor"]["MediaStart"](sMediaName,pos.X,pos.Y,extX,extY,this.WordControl.m_nZoomValue/100);else window["AscDesktopEditor"]["MediaStart"](sMediaName,pos.X,pos.Y,extX,extY,this.WordControl.m_nZoomValue/100,transform.sx,transform.shy,transform.shx,transform.sy,transform.tx,transform.ty)}else{var transition= +this.WordControl.DemonstrationManager.Transition;if(manager.SlideNum>=0&&manager.SlideNum>0;var _zoom=_w/(_w_mm*AscCommon.g_dKoef_mm_to_pix);if(!transform)window["AscDesktopEditor"]["MediaStart"](sMediaName, +_x,transition.Rect.y,extX,extY,_zoom);else window["AscDesktopEditor"]["MediaStart"](sMediaName,_x,transition.Rect.y,extX,extY,_zoom,transform.sx,transform.shy,transform.shx,transform.sy,transform.tx,transform.ty)}}break}case c_oEditorId.Spreadsheet:{break}}};baseEditorsApi.prototype.hideVideoControl=function(){if(!window["AscDesktopEditor"]||!window["AscDesktopEditor"]["MediaEnd"])return;window["AscDesktopEditor"]["MediaEnd"]()};baseEditorsApi.prototype._checkLicenseApiFunctions=function(){return this.licenseResult&& true===this.licenseResult["plugins"]};baseEditorsApi.prototype.asc_pluginsRegister=function(basePath,plugins){if(null!=this.pluginsManager)this.pluginsManager.register(basePath,plugins)};baseEditorsApi.prototype.asc_pluginRun=function(guid,variation,pluginData){if(null!=this.pluginsManager)this.pluginsManager.run(guid,variation,pluginData)};baseEditorsApi.prototype.asc_pluginResize=function(pluginData){if(null!=this.pluginsManager)this.pluginsManager.runResize(pluginData)};baseEditorsApi.prototype.asc_pluginButtonClick= function(id){if(null!=this.pluginsManager)this.pluginsManager.buttonClick(id)};baseEditorsApi.prototype.asc_pluginEnableMouseEvents=function(isEnable){if(!this.pluginsManager)return;this.pluginsManager.onEnableMouseEvents(isEnable)};baseEditorsApi.prototype.isEnabledDropTarget=function(){return true};baseEditorsApi.prototype.beginInlineDropTarget=function(e){};baseEditorsApi.prototype.endInlineDropTarget=function(e){};baseEditorsApi.prototype["pluginMethod_GetFontList"]=function(){return AscFonts.g_fontApplication.g_fontSelections.SerializeList()}; baseEditorsApi.prototype["pluginMethod_InputText"]=function(text,textReplace){if(this.isViewMode||!AscCommon.g_inputContext)return;var codes=[];for(var i=text.getUnicodeIterator();i.check();i.next())codes.push(i.value());if(textReplace)for(var i=0;i0&&$(this.el).find(".inner").addBack().filter(".inner").append('
'+this.emptyText+"
"),_.each(this.dataViewItems,function(t){this.stopListening(t),t.stopListening(t.model)},this),this.dataViewItems=[],this.store.each(this.onAddItem,this),this.allowScrollbar&&(this.scroller=new Common.UI.Scroller({el:$(this.el).find(".inner").addBack().filter(".inner"),useKeyboard:this.enableKeyEvents&&!this.handleSelect,minScrollbarLength:40,wheelSpeed:10,alwaysVisibleY:this.scrollAlwaysVisible})),this.disabled&&this.setDisabled(this.disabled),this.attachKeyEvents(),this.lastSelectedRec=null,this._layoutParams=void 0},onChangeItem:function(t,e){this.isSuspendEvents||this.trigger("item:change",this,t,e)},onRemoveItem:function(t,e){var i=t.$el.data("bs.tooltip");if(i&&(void 0===i.dontShow&&(i.dontShow=!0),i.tip().remove()),this.stopListening(t),t.stopListening(),this.store.length<1&&this.emptyText.length>0){var n=$(this.el).find(".inner").addBack().filter(".inner");n.find(".empty-text").length<=0&&n.append('
'+this.emptyText+"
")}for(var o=0;o=0&&this.dataViewItems.length>n?$(this.dataViewItems[n].el):e.find("#"+t.get("id"));if(!(o.length<=0)){var s=o.offset().top,a=$(this.dataViewItems[0].el),l=a.length>0?a[0].offsetTop:0;(si+e.height())&&(this.scroller&&this.allowScrollbar?this.scroller.scrollTop(e.scrollTop()+s-i-l,0):e.scrollTop(e.scrollTop()+s-i-l))}}},onKeyDown:function(t,e){if(!this.disabled)if(void 0===e&&(e=t),_.indexOf(this.moveKeys,e.keyCode)>-1||e.keyCode==Common.UI.Keys.RETURN){e.preventDefault(),e.stopPropagation();var i=this.getSelectedRec();if(null===this.lastSelectedRec&&(this.lastSelectedRec=i),e.keyCode==Common.UI.Keys.RETURN)this.lastSelectedRec=null,this.selectedBeforeHideRec&&(i=this.selectedBeforeHideRec),this.trigger("item:click",this,this,i,t),this.trigger("item:select",this,this,i,t),this.trigger("entervalue",this,i,t),this.parentMenu&&this.parentMenu.hide();else{var n=_.indexOf(this.store.models,i);if(n<0)if(e.keyCode==Common.UI.Keys.LEFT){var o=$(t.target).closest(".dropdown-submenu.over");o.length>0?(o.removeClass("over"),o.find("> a").focus()):n=0}else n=0;else if("both"==this.options.keyMoveDirection){void 0===this._layoutParams&&this.fillIndexesArray();var s=this.dataViewItems[n].topIdx,a=this.dataViewItems[n].leftIdx;if(n=void 0,e.keyCode==Common.UI.Keys.LEFT)for(;void 0===n;){if(--a<0){var o=$(t.target).closest(".dropdown-submenu.over");if(o.length>0){o.removeClass("over"),o.find("> a").focus();break}a=this._layoutParams.columns-1}n=this._layoutParams.itemsIndexes[s][a]}else if(e.keyCode==Common.UI.Keys.RIGHT)for(;void 0===n;)a++,a>this._layoutParams.columns-1&&(a=0),n=this._layoutParams.itemsIndexes[s][a];else if(e.keyCode==Common.UI.Keys.UP)for(;void 0===n;)s--,s<0&&(s=this._layoutParams.rows-1),n=this._layoutParams.itemsIndexes[s][a];else for(;void 0===n;)s++,s>this._layoutParams.rows-1&&(s=0),n=this._layoutParams.itemsIndexes[s][a]}else n=e.keyCode==Common.UI.Keys.UP||e.keyCode==Common.UI.Keys.LEFT?Math.max(0,n-1):Math.min(this.store.length-1,n+1);void 0!==n&&n>=0&&(i=this.store.at(n)),i&&(this._fromKeyDown=!0,this.selectRecord(i),this._fromKeyDown=!1,this.scrollToRecord(i))}}else this.trigger("item:keydown",this,i,t)},attachKeyEvents:function(){if(this.enableKeyEvents&&this.handleSelect){var t=$(this.el).find(".inner").addBack().filter(".inner");t.addClass("canfocused"),t.attr("tabindex","0"),t.on(this.parentMenu&&this.useBSKeydown?"dataview:keydown":"keydown",_.bind(this.onKeyDown,this))}},showLastSelected:function(){this.lastSelectedRec?(this.selectRecord(this.lastSelectedRec,!0),this.scrollToRecord(this.lastSelectedRec),this.lastSelectedRec=null):this.scrollToRecord(this.getSelectedRec())},setDisabled:function(t){this.disabled=t,$(this.el).find(".inner").addBack().filter(".inner").toggleClass("disabled",t)},isDisabled:function(){return this.disabled},setEmptyText:function(t){this.emptyText=t},alignPosition:function(){var t="menu"===this.parentMenu.cmpEl.attr("role")?this.parentMenu.cmpEl:this.parentMenu.cmpEl.find("[role=menu]"),e=Common.Utils.innerHeight()-10,i=$(this.el).find(".inner").addBack().filter(".inner"),n=i.parent(),o=parseInt(n.css("margin-top"))+parseInt(n.css("margin-bottom"))+parseInt(t.css("margin-top")),s=parseInt(t.css("padding-top"))+parseInt(t.css("padding-bottom")),a=t.outerHeight(),l=parseInt(t.css("top")),r={minScrollbarLength:40};this.scrollAlwaysVisible&&(r.alwaysVisibleY=this.scrollAlwaysVisible),l+a>e?(i.css("max-height",e-l-s-o+"px"),this.allowScrollbar&&this.scroller.update(r)):l+ao&&(o=r,this._layoutParams.itemsIndexes.push([]),s=this._layoutParams.itemsIndexes.length-1),this._layoutParams.itemsIndexes[s][a]=l,this.dataViewItems[l].topIdx=s,this.dataViewItems[l].leftIdx=a,this._layoutParams.columns<%= value %>
')},template:_.template(['
'].join("")),onResetItems:function(){this.innerEl=null,Common.UI.DataView.prototype.onResetItems.call(this),this.trigger("items:reset",this)},onAddItem:function(t,e,i){var n=new Common.UI.DataViewItem({template:this.itemTemplate,model:t});if(this.innerEl||(this.innerEl=$(this.el).find(".inner")),n&&this.innerEl){if(this.dataViewItems.length<1&&this.innerEl.find(".empty-text").remove(),this.options.simpleAddMode)this.innerEl.append(n.render().el),this.dataViewItems.push(n);else{var o=_.indexOf(this.store.models,t),s=this.innerEl.find("> div");o>0?$(s.get(o-1)).after(n.render().el):s.length>0?$(s[o]).before(n.render().el):this.innerEl.append(n.render().el),this.dataViewItems=this.dataViewItems.slice(0,o).concat(n).concat(this.dataViewItems.slice(o))}if(this.listenTo(n,"change",this.onChangeItem),this.listenTo(n,"remove",this.onRemoveItem),this.listenTo(n,"click",this.onClickItem),this.listenTo(n,"dblclick",this.onDblClickItem),this.listenTo(n,"select",this.onSelectItem),t.get("tip")){var a=$(n.el);a.attr("data-toggle","tooltip"),a.tooltip({title:t.get("tip"),placement:"cursor",zIndex:this.tipZIndex})}this.isSuspendEvents||this.trigger("item:add",this,n,t)}}}}())}),define("spreadsheeteditor/main/app/view/ParagraphSettingsAdvanced",["text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced.template","common/main/lib/view/AdvancedSettingsWindow","common/main/lib/component/MetricSpinner","common/main/lib/component/CheckBox","common/main/lib/component/RadioBox","common/main/lib/component/ListView"],function(t){"use strict";SSE.Views.ParagraphSettingsAdvanced=Common.Views.AdvancedSettingsWindow.extend(_.extend({options:{contentWidth:370,height:394,toggleGroup:"paragraph-adv-settings-group",storageName:"sse-para-settings-adv-category"},initialize:function(e){var i=this;_.extend(this.options,{title:this.textTitle,items:[{panelId:"id-adv-paragraph-indents",panelCaption:this.strParagraphIndents},{panelId:"id-adv-paragraph-font",panelCaption:this.strParagraphFont},{panelId:"id-adv-paragraph-tabs",panelCaption:this.strTabs}],contentTemplate:_.template(t)({scope:this})},e),Common.Views.AdvancedSettingsWindow.prototype.initialize.call(this,this.options),this._changedProps=null,this.checkGroup=0,this._noApply=!0,this._tabListChanged=!1,this.spinners=[],this.FirstLine=void 0,this.Spacing=null,this.api=this.options.api,this._originalProps=new Asc.asc_CParagraphProperty(this.options.paragraphProps),this._arrLineRule=[{displayValue:this.textAuto,defaultValue:1,value:c_paragraphLinerule.LINERULE_AUTO,minValue:.5,step:.01,defaultUnit:""},{displayValue:this.textExact,defaultValue:5,value:c_paragraphLinerule.LINERULE_EXACT,minValue:.03,step:.01,defaultUnit:"cm"}];var n=this._originalProps.asc_getSpacing().asc_getLineRule(),o=_.findWhere(this._arrLineRule,{value:n});this.CurLineRuleIdx=this._arrLineRule.indexOf(o),this._arrTextAlignment=[{displayValue:this.textTabLeft,value:c_paragraphTextAlignment.LEFT},{displayValue:this.textTabCenter,value:c_paragraphTextAlignment.CENTERED},{displayValue:this.textTabRight,value:c_paragraphTextAlignment.RIGHT},{displayValue:this.textJustified,value:c_paragraphTextAlignment.JUSTIFIED}],this._arrSpecial=[{displayValue:this.textNoneSpecial,value:c_paragraphSpecial.NONE_SPECIAL,defaultValue:0},{displayValue:this.textFirstLine,value:c_paragraphSpecial.FIRST_LINE,defaultValue:12.7},{displayValue:this.textHanging,value:c_paragraphSpecial.HANGING,defaultValue:12.7}],this._arrTabAlign=[{value:1,displayValue:this.textTabLeft},{value:3,displayValue:this.textTabCenter},{value:2,displayValue:this.textTabRight}],this._arrKeyTabAlign=[],this._arrTabAlign.forEach(function(t){i._arrKeyTabAlign[t.value]=t.displayValue})},render:function(){Common.Views.AdvancedSettingsWindow.prototype.render.call(this);var t=this;this.cmbTextAlignment=new Common.UI.ComboBox({el:$("#paragraphadv-spin-text-alignment"),cls:"input-group-nr",editable:!1,data:this._arrTextAlignment,style:"width: 173px;",menuStyle:"min-width: 173px;"}),this.cmbTextAlignment.setValue(""),this.numIndentsLeft=new Common.UI.MetricSpinner({el:$("#paragraphadv-spin-indent-left"),step:.1,width:85,defaultUnit:"cm",defaultValue:0,value:"0 cm",maxValue:55.87,minValue:0}),this.numIndentsLeft.on("change",_.bind(function(t,e,i,n){var o=t.getNumberValue();this._changedProps&&(null!==this._changedProps.asc_getInd()&&void 0!==this._changedProps.asc_getInd()||this._changedProps.put_Ind(new Asc.asc_CParagraphInd),this._changedProps.asc_getInd().put_Left(Common.Utils.Metric.fnRecalcToMM(o)))},this)),this.spinners.push(this.numIndentsLeft),this.numIndentsRight=new Common.UI.MetricSpinner({el:$("#paragraphadv-spin-indent-right"),step:.1,width:85,defaultUnit:"cm",defaultValue:0,value:"0 cm",maxValue:55.87,minValue:0}),this.numIndentsRight.on("change",_.bind(function(t,e,i,n){this._changedProps&&(null!==this._changedProps.asc_getInd()&&void 0!==this._changedProps.asc_getInd()||this._changedProps.put_Ind(new Asc.asc_CParagraphInd),this._changedProps.asc_getInd().put_Right(Common.Utils.Metric.fnRecalcToMM(t.getNumberValue())))},this)),this.spinners.push(this.numIndentsRight),this.cmbSpecial=new Common.UI.ComboBox({el:$("#paragraphadv-spin-special"),cls:"input-group-nr",editable:!1,data:this._arrSpecial,style:"width: 85px;",menuStyle:"min-width: 85px;"}),this.cmbSpecial.setValue(""),this.cmbSpecial.on("selected",_.bind(this.onSpecialSelect,this)),this.numSpecialBy=new Common.UI.MetricSpinner({el:$("#paragraphadv-spin-special-by"),step:.1,width:85,defaultUnit:"cm",defaultValue:0,value:"0 cm",maxValue:55.87,minValue:0}),this.spinners.push(this.numSpecialBy),this.numSpecialBy.on("change",_.bind(this.onFirstLineChange,this)),this.numSpacingBefore=new Common.UI.MetricSpinner({el:$("#paragraphadv-spin-spacing-before"),step:.1,width:85,value:"",defaultUnit:"cm",maxValue:55.88,minValue:0,allowAuto:!0,autoText:this.txtAutoText}),this.numSpacingBefore.on("change",_.bind(function(t,e,i,n){if(null===this.Spacing){var o=this._originalProps?this._originalProps:new Asc.asc_CParagraphProperty;this.Spacing=o.asc_getSpacing()}this.Spacing.Before=Common.Utils.Metric.fnRecalcToMM(t.getNumberValue())},this)),this.spinners.push(this.numSpacingBefore),this.numSpacingAfter=new Common.UI.MetricSpinner({el:$("#paragraphadv-spin-spacing-after"),step:.1,width:85,value:"",defaultUnit:"cm",maxValue:55.88,minValue:0,allowAuto:!0,autoText:this.txtAutoText}),this.numSpacingAfter.on("change",_.bind(function(t,e,i,n){if(null===this.Spacing){var o=this._originalProps?this._originalProps:new Asc.asc_CParagraphProperty;this.Spacing=o.asc_getSpacing()}this.Spacing.After=Common.Utils.Metric.fnRecalcToMM(t.getNumberValue())},this)),this.spinners.push(this.numSpacingAfter),this.cmbLineRule=new Common.UI.ComboBox({el:$("#paragraphadv-spin-line-rule"),cls:"input-group-nr",editable:!1,data:this._arrLineRule,style:"width: 85px;",menuStyle:"min-width: 85px;"}),this.cmbLineRule.setValue(this.CurLineRuleIdx),this.cmbLineRule.on("selected",_.bind(this.onLineRuleSelect,this)),this.numLineHeight=new Common.UI.MetricSpinner({el:$("#paragraphadv-spin-line-height"),step:.01,width:85,value:"",defaultUnit:"",maxValue:132,minValue:.5}),this.spinners.push(this.numLineHeight),this.numLineHeight.on("change",_.bind(this.onNumLineHeightChange,this)),this.chStrike=new Common.UI.CheckBox({el:$("#paragraphadv-checkbox-strike"),labelText:this.strStrike}),this.chStrike.on("change",_.bind(this.onStrikeChange,this)),this.chDoubleStrike=new Common.UI.CheckBox({el:$("#paragraphadv-checkbox-double-strike"),labelText:this.strDoubleStrike}),this.chDoubleStrike.on("change",_.bind(this.onDoubleStrikeChange,this)),this.chSuperscript=new Common.UI.CheckBox({el:$("#paragraphadv-checkbox-superscript"),labelText:this.strSuperscript}),this.chSuperscript.on("change",_.bind(this.onSuperscriptChange,this)),this.chSubscript=new Common.UI.CheckBox({el:$("#paragraphadv-checkbox-subscript"),labelText:this.strSubscript}),this.chSubscript.on("change",_.bind(this.onSubscriptChange,this)),this.chSmallCaps=new Common.UI.CheckBox({el:$("#paragraphadv-checkbox-small-caps"),labelText:this.strSmallCaps}),this.chSmallCaps.on("change",_.bind(this.onSmallCapsChange,this)),this.chAllCaps=new Common.UI.CheckBox({el:$("#paragraphadv-checkbox-all-caps"),labelText:this.strAllCaps}),this.chAllCaps.on("change",_.bind(this.onAllCapsChange,this)),this.numSpacing=new Common.UI.MetricSpinner({el:$("#paragraphadv-spin-spacing"),step:.01,width:100,defaultUnit:"cm",defaultValue:0,value:"0 cm",maxValue:55.87,minValue:-55.87}),this.numSpacing.on("change",_.bind(function(t,e,i,n){if(this._changedProps&&this._changedProps.asc_putTextSpacing(Common.Utils.Metric.fnRecalcToMM(t.getNumberValue())),this.api&&!this._noApply){var o=this._originalProps?this._originalProps:new Asc.asc_CParagraphProperty;o.asc_putTextSpacing(Common.Utils.Metric.fnRecalcToMM(t.getNumberValue())),this.api.asc_setDrawImagePlaceParagraph("paragraphadv-font-img",o)}},this)),this.spinners.push(this.numSpacing),this.numTab=new Common.UI.MetricSpinner({el:$("#paraadv-spin-tab"),step:.1,width:108,defaultUnit:"cm",value:"1.25 cm",maxValue:55.87,minValue:0}),this.spinners.push(this.numTab),this.numDefaultTab=new Common.UI.MetricSpinner({el:$("#paraadv-spin-default-tab"),step:.1,width:108,defaultUnit:"cm",value:"1.25 cm",maxValue:55.87,minValue:0}),this.numDefaultTab.on("change",_.bind(function(t,e,i,n){this._changedProps&&this._changedProps.asc_putDefaultTab(parseFloat(Common.Utils.Metric.fnRecalcToMM(t.getNumberValue()).toFixed(1)))},this)),this.spinners.push(this.numDefaultTab),this.tabList=new Common.UI.ListView({el:$("#paraadv-list-tabs"),emptyText:this.noTabs,store:new Common.UI.DataViewStore,template:_.template(['
'].join("")),itemTemplate:_.template(['
','
<%= value %>
','
<%= displayTabAlign %>
',"
"].join(""))}),this.tabList.store.comparator=function(t){return t.get("tabPos")},this.tabList.on("item:select",_.bind(this.onSelectTab,this));var e=function(){t._noApply||(t._tabListChanged=!0)};this.listenTo(this.tabList.store,"add",e),this.listenTo(this.tabList.store,"remove",e),this.listenTo(this.tabList.store,"reset",e),this.cmbAlign=new Common.UI.ComboBox({el:$("#paraadv-cmb-align"),style:"width: 108px;",menuStyle:"min-width: 108px;",editable:!1,cls:"input-group-nr",data:this._arrTabAlign}),this.cmbAlign.setValue(1),this.btnAddTab=new Common.UI.Button({el:$("#paraadv-button-add-tab")}),this.btnAddTab.on("click",_.bind(this.addTab,this)),this.btnRemoveTab=new Common.UI.Button({el:$("#paraadv-button-remove-tab")}),this.btnRemoveTab.on("click",_.bind(this.removeTab,this)),this.btnRemoveAll=new Common.UI.Button({el:$("#paraadv-button-remove-all")}),this.btnRemoveAll.on("click",_.bind(this.removeAllTabs,this)),this.on("show",function(t){t.getChild(".footer .primary").focus()}),this.afterRender()},getSettings:function(){this._tabListChanged&&(null!==this._changedProps.asc_getTabs()&&void 0!==this._changedProps.asc_getTabs()||this._changedProps.asc_putTabs(new Asc.asc_CParagraphTabs),this.tabList.store.each(function(t,e){var i=new Asc.asc_CParagraphTab(Common.Utils.Metric.fnRecalcToMM(t.get("tabPos")),t.get("tabAlign"));this._changedProps.asc_getTabs().add_Tab(i)},this));var t=this.cmbTextAlignment.getValue();return this._changedProps.asc_putJc(void 0!==t&&null!==t?t:c_paragraphTextAlignment.LEFT),null!==this.Spacing&&this._changedProps.asc_putSpacing(this.Spacing),{paragraphProps:this._changedProps}},_setDefaults:function(t){if(t){this._originalProps=new Asc.asc_CParagraphProperty(t),this.FirstLine=null!==t.asc_getInd()?t.asc_getInd().asc_getFirstLine():null,this.numIndentsLeft.setValue(null!==t.asc_getInd()&&null!==t.asc_getInd().asc_getLeft()?Common.Utils.Metric.fnRecalcFromMM(t.asc_getInd().asc_getLeft()):"",!0),this.numIndentsRight.setValue(null!==t.asc_getInd()&&null!==t.asc_getInd().asc_getRight()?Common.Utils.Metric.fnRecalcFromMM(t.asc_getInd().asc_getRight()):"",!0),this.cmbTextAlignment.setValue(void 0!==t.asc_getJc()&&null!==t.asc_getJc()?t.asc_getJc():c_paragraphTextAlignment.CENTERED,!0),void 0===this.CurSpecial&&(this.CurSpecial=0===t.asc_getInd().asc_getFirstLine()?c_paragraphSpecial.NONE_SPECIAL:t.asc_getInd().asc_getFirstLine()>0?c_paragraphSpecial.FIRST_LINE:c_paragraphSpecial.HANGING),this.cmbSpecial.setValue(this.CurSpecial),this.numSpecialBy.setValue(null!==this.FirstLine?Math.abs(Common.Utils.Metric.fnRecalcFromMM(this.FirstLine)):"",!0),this.numSpacingBefore.setValue(null!==t.asc_getSpacing()&&null!==t.asc_getSpacing().asc_getBefore()?Common.Utils.Metric.fnRecalcFromMM(t.asc_getSpacing().asc_getBefore()):"",!0),this.numSpacingAfter.setValue(null!==t.asc_getSpacing()&&null!==t.asc_getSpacing().asc_getAfter()?Common.Utils.Metric.fnRecalcFromMM(t.asc_getSpacing().asc_getAfter()):"",!0);var e=t.asc_getSpacing().asc_getLineRule();this.cmbLineRule.setValue(null!==e?e:"",!0),null!==t.asc_getSpacing()&&null!==t.asc_getSpacing().asc_getLine()?this.numLineHeight.setValue(e==c_paragraphLinerule.LINERULE_AUTO?t.asc_getSpacing().asc_getLine():Common.Utils.Metric.fnRecalcFromMM(t.asc_getSpacing().asc_getLine()),!0):this.numLineHeight.setValue("",!0),this._noApply=!0,this.chStrike.setValue(null!==t.asc_getStrikeout()&&void 0!==t.asc_getStrikeout()?t.asc_getStrikeout():"indeterminate",!0),this.chDoubleStrike.setValue(null!==t.asc_getDStrikeout()&&void 0!==t.asc_getDStrikeout()?t.asc_getDStrikeout():"indeterminate",!0),this.chSubscript.setValue(null!==t.asc_getSubscript()&&void 0!==t.asc_getSubscript()?t.asc_getSubscript():"indeterminate",!0),this.chSuperscript.setValue(null!==t.asc_getSuperscript()&&void 0!==t.asc_getSuperscript()?t.asc_getSuperscript():"indeterminate",!0),this.chSmallCaps.setValue(null!==t.asc_getSmallCaps()&&void 0!==t.asc_getSmallCaps()?t.asc_getSmallCaps():"indeterminate",!0),this.chAllCaps.setValue(null!==t.asc_getAllCaps()&&void 0!==t.asc_getAllCaps()?t.asc_getAllCaps():"indeterminate",!0),this.numSpacing.setValue(null!==t.asc_getTextSpacing()&&void 0!==t.asc_getTextSpacing()?Common.Utils.Metric.fnRecalcFromMM(t.asc_getTextSpacing()):"",!0),this.api.asc_setDrawImagePlaceParagraph("paragraphadv-font-img",this._originalProps),this.numDefaultTab.setValue(null!==t.asc_getDefaultTab()&&void 0!==t.asc_getDefaultTab()?Common.Utils.Metric.fnRecalcFromMM(parseFloat(t.asc_getDefaultTab().toFixed(1))):"",!0);var i=this.tabList.store,n=t.asc_getTabs();if(n){for(var o=[],s=n.asc_getCount(),a=0;an.length-1&&(o=n.length-1),n.length>0&&(this.tabList.selectByIndex(o),this.tabList.scrollToRecord(n.at(o)))}},removeAllTabs:function(t,e){this.tabList.store.reset()},onSelectTab:function(t,e,i){var n={};if(_.isFunction(i.toJSON)){if(!i.get("selected"))return;n=i.toJSON()}else n=i;this.numTab.setValue(n.tabPos),this.cmbAlign.setValue(n.tabAlign)},onSpecialSelect:function(t,e){if(this.CurSpecial=e.value,this.CurSpecial===c_paragraphSpecial.NONE_SPECIAL&&this.numSpecialBy.setValue(0,!0),this._changedProps){null!==this._changedProps.asc_getInd()&&void 0!==this._changedProps.asc_getInd()||this._changedProps.put_Ind(new Asc.asc_CParagraphInd);var i=Common.Utils.Metric.fnRecalcToMM(this.numSpecialBy.getNumberValue());0===i&&(this.numSpecialBy.setValue(Common.Utils.Metric.fnRecalcFromMM(this._arrSpecial[e.value].defaultValue),!0),i=this._arrSpecial[e.value].defaultValue),this.CurSpecial===c_paragraphSpecial.HANGING&&(i=-i),this._changedProps.asc_getInd().put_FirstLine(i)}},onFirstLineChange:function(t,e,i,n){if(this._changedProps){null!==this._changedProps.asc_getInd()&&void 0!==this._changedProps.asc_getInd()||this._changedProps.put_Ind(new Asc.asc_CParagraphInd);var o=Common.Utils.Metric.fnRecalcToMM(t.getNumberValue());this.CurSpecial===c_paragraphSpecial.HANGING?o=-o:this.CurSpecial===c_paragraphSpecial.NONE_SPECIAL&&o>0?(this.CurSpecial=c_paragraphSpecial.FIRST_LINE,this.cmbSpecial.setValue(c_paragraphSpecial.FIRST_LINE)):0===o&&(this.CurSpecial=c_paragraphSpecial.NONE_SPECIAL,this.cmbSpecial.setValue(c_paragraphSpecial.NONE_SPECIAL)),this._changedProps.asc_getInd().put_FirstLine(o)}},onLineRuleSelect:function(t,e){if(null===this.Spacing){var i=this._originalProps?this._originalProps:new Asc.asc_CParagraphProperty;this.Spacing=i.asc_getSpacing()}this.Spacing.LineRule=e.value;var n=_.findWhere(this._arrLineRule,{value:e.value}),o=this._arrLineRule.indexOf(n);this.CurLineRuleIdx!==o&&(this.numLineHeight.setDefaultUnit(this._arrLineRule[o].defaultUnit),this.numLineHeight.setMinValue(this._arrLineRule[o].minValue),this.numLineHeight.setStep(this._arrLineRule[o].step),this.Spacing.LineRule===c_paragraphLinerule.LINERULE_AUTO?this.numLineHeight.setValue(this._arrLineRule[o].defaultValue):this.numLineHeight.setValue(Common.Utils.Metric.fnRecalcFromMM(this._arrLineRule[o].defaultValue)),this.CurLineRuleIdx=o)},onNumLineHeightChange:function(t,e,i,n){if(""!==this.cmbLineRule.getRawValue()){if(null===this.Spacing){var o=this._originalProps?this._originalProps:new Asc.asc_CParagraphProperty;this.Spacing=o.asc_getSpacing()}this.Spacing.Line=this.cmbLineRule.getValue()==c_paragraphLinerule.LINERULE_AUTO?t.getNumberValue():Common.Utils.Metric.fnRecalcToMM(t.getNumberValue())}},textTitle:"Paragraph - Advanced Settings",strIndentsLeftText:"Left",strIndentsRightText:"Right",strParagraphIndents:"Indents & Spacing",strParagraphFont:"Font",cancelButtonText:"Cancel",okButtonText:"Ok",textEffects:"Effects",textCharacterSpacing:"Character Spacing",strDoubleStrike:"Double strikethrough",strStrike:"Strikethrough",strSuperscript:"Superscript",strSubscript:"Subscript",strSmallCaps:"Small caps",strAllCaps:"All caps",strTabs:"Tab",textSet:"Specify",textRemove:"Remove",textRemoveAll:"Remove All",textTabLeft:"Left",textTabRight:"Right",textTabCenter:"Center",textAlign:"Alignment",textTabPosition:"Tab Position",textDefault:"Default Tab",noTabs:"The specified tabs will appear in this field",textJustified:"Justified",strIndentsSpecial:"Special",textNoneSpecial:"(none)",textFirstLine:"First line",textHanging:"Hanging",strIndentsSpacingBefore:"Before",strIndentsSpacingAfter:"After",strIndentsLineSpacing:"Line Spacing",txtAutoText:"Auto",textAuto:"Multiple",textExact:"Exactly",strIndent:"Indents",strSpacing:"Spacing"},SSE.Views.ParagraphSettingsAdvanced||{}))}),define("text!spreadsheeteditor/main/app/template/ImageSettingsAdvanced.template",[],function(){ return'
\n
\n
\n \n
\n
\n
\n
\n
\n \n \n \n \n \n \n \n \n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n \n \n \n \n \n \n \n \n \n \n
\n \n
\n
\n \n \n
\n \n
\n
\n
'}),define("spreadsheeteditor/main/app/view/ImageSettingsAdvanced",["text!spreadsheeteditor/main/app/template/ImageSettingsAdvanced.template","common/main/lib/view/AdvancedSettingsWindow","common/main/lib/component/InputField","common/main/lib/component/MetricSpinner","common/main/lib/component/CheckBox"],function(t){"use strict";SSE.Views.ImageSettingsAdvanced=Common.Views.AdvancedSettingsWindow.extend(_.extend({options:{contentWidth:300,height:342,toggleGroup:"image-adv-settings-group",properties:null,storageName:"sse-image-settings-adv-category"},initialize:function(e){_.extend(this.options,{title:this.textTitle,items:[{panelId:"id-adv-image-rotate",panelCaption:this.textRotation},{panelId:"id-adv-image-alttext",panelCaption:this.textAlt}],contentTemplate:_.template(t)({scope:this})},e),Common.Views.AdvancedSettingsWindow.prototype.initialize.call(this,this.options),this._originalProps=this.options.imageProps,this._changedProps=null},render:function(){Common.Views.AdvancedSettingsWindow.prototype.render.call(this);var t=this;this.spnAngle=new Common.UI.MetricSpinner({el:$("#image-advanced-spin-angle"),step:1,width:80,defaultUnit:"°",value:"0 °",maxValue:3600,minValue:-3600}),this.chFlipHor=new Common.UI.CheckBox({el:$("#image-advanced-checkbox-hor"),labelText:this.textHorizontally}),this.chFlipVert=new Common.UI.CheckBox({el:$("#image-advanced-checkbox-vert"),labelText:this.textVertically}),this.inputAltTitle=new Common.UI.InputField({el:$("#image-advanced-alt-title"),allowBlank:!0,validateOnBlur:!1,style:"width: 100%;"}).on("changed:after",function(){t.isAltTitleChanged=!0}),this.textareaAltDescription=this.$window.find("textarea"),this.textareaAltDescription.keydown(function(e){e.keyCode==Common.UI.Keys.RETURN&&e.stopPropagation(),t.isAltDescChanged=!0}),this.afterRender()},afterRender:function(){if(this._setDefaults(this._originalProps),this.storageName){var t=Common.localStorage.getItem(this.storageName);this.setActiveCategory(null!==t?parseInt(t):0)}},_setDefaults:function(t){if(t){var e=t.asc_getTitle();this.inputAltTitle.setValue(e||""),e=t.asc_getDescription(),this.textareaAltDescription.val(e||""),e=t.asc_getRot(),this.spnAngle.setValue(void 0==e||null===e?"":Math.floor(180*e/3.14159265358979+.5),!0),this.chFlipHor.setValue(t.asc_getFlipH()),this.chFlipVert.setValue(t.asc_getFlipV());var i=t.asc_getPluginGuid();this.btnsCategory[0].setVisible(null===i||void 0===i),this._changedProps=new Asc.asc_CImgProperty}},getSettings:function(){return this.isAltTitleChanged&&this._changedProps.asc_putTitle(this.inputAltTitle.getValue()),this.isAltDescChanged&&this._changedProps.asc_putDescription(this.textareaAltDescription.val()),this._changedProps.asc_putRot(3.14159265358979*this.spnAngle.getNumberValue()/180),this._changedProps.asc_putFlipH("checked"==this.chFlipHor.getValue()),this._changedProps.asc_putFlipV("checked"==this.chFlipVert.getValue()),{imageProps:this._changedProps}},textTitle:"Image - Advanced Settings",cancelButtonText:"Cancel",okButtonText:"Ok",textAlt:"Alternative Text",textAltTitle:"Title",textAltDescription:"Description",textAltTip:"The alternative text-based representation of the visual object information, which will be read to the people with vision or cognitive impairments to help them better understand what information there is in the image, autoshape, chart or table.",textRotation:"Rotation",textAngle:"Angle",textFlipped:"Flipped",textHorizontally:"Horizontally",textVertically:"Vertically"},SSE.Views.ImageSettingsAdvanced||{}))}),define("spreadsheeteditor/main/app/view/SetValueDialog",["common/main/lib/component/Window","common/main/lib/component/ComboBox"],function(){"use strict";SSE.Views.SetValueDialog=Common.UI.Window.extend(_.extend({options:{width:214,header:!0,style:"min-width: 214px;",cls:"modal-dlg"},initialize:function(t){_.extend(this.options,{title:this.textTitle},t||{}),this.template=['
','
','
',"
",'"].join(""),this.options.tpl=_.template(this.template)(this.options),this.startvalue=this.options.startvalue,this.maxvalue=this.options.maxvalue,this.defaultUnit=this.options.defaultUnit,this.step=this.options.step,Common.UI.Window.prototype.initialize.call(this,this.options)},render:function(){if(Common.UI.Window.prototype.render.call(this),this.spnSize=new Common.UI.MetricSpinner({el:$("#id-spin-set-value"),width:182,step:this.step,defaultUnit:this.defaultUnit,minValue:0,maxValue:this.maxvalue,value:null!==this.startvalue?this.startvalue+" "+this.defaultUnit:""}),null!==this.startvalue){var t=this;setTimeout(function(){var e=t.spnSize.$input[0];document.selection?t.spnSize.$input.select():(e.selectionStart=0,e.selectionEnd=t.startvalue.toString().length)},10)}this.getChild().find(".dlg-btn").on("click",_.bind(this.onBtnClick,this)),this.spnSize.on("entervalue",_.bind(this.onPrimary,this)),this.options.rounding&&this.spnSize.on("change",_.bind(this.onChange,this)),this.spnSize.$el.find("input").focus()},_handleInput:function(t){this.options.handler&&this.options.handler.call(this,this,t),this.close()},onBtnClick:function(t){this._handleInput(t.currentTarget.attributes.result.value)},onChange:function(){var t=this.spnSize.getNumberValue();t/=this.step,t=(t|t)*this.step,this.spnSize.setValue(t,!0)},getSettings:function(){return this.spnSize.getNumberValue()},onPrimary:function(){return this._handleInput("ok"),!1},cancelButtonText:"Cancel",okButtonText:"Ok",txtMinText:"The minimum value for this field is {0}",txtMaxText:"The maximum value for this field is {0}"},SSE.Views.SetValueDialog||{}))}),void 0===Common)var Common={};define("common/main/lib/component/ColorPaletteExt",["common/main/lib/component/BaseView"],function(){"use strict";Common.UI.ColorPaletteExt=Common.UI.BaseView.extend({options:{dynamiccolors:10,allowReselect:!0,cls:"",style:""},template:_.template(['
',"<% var me = this; %>","<% $(colors).each(function(num, item) { %>","<% if (me.isColor(item)) { %>",'
',' ',"
","<% } else if (me.isTransparent(item)) { %>",'
',' ',"
","<% } else if (me.isEffect(item)) { %>",'
',' ',"
","<% } %>","<% }); %>","
"].join("")),colorRe:/(?:^|\s)color-(.{6})(?:\s|$)/,selectedCls:"selected",initialize:function(t){Common.UI.BaseView.prototype.initialize.call(this,t),this.id=this.options.id,this.cls=this.options.cls,this.style=this.options.style,this.colors=this.options.colors||[],this.value=this.options.value,this.options.el&&this.render(),this.options.value&&this.select(this.options.value,!0)},render:function(t){var e=this;return e.rendered?this.cmpEl=$(this.el):(this.cmpEl=$(this.template({id:this.id,cls:this.cls,style:this.style,colors:this.colors})),t?(this.setElement(t,!1),t.html(this.cmpEl)):$(this.el).html(this.cmpEl),this.cmpEl.on("click",_.bind(this.handleClick,this))),e.rendered=!0,this},isColor:function(t){return"string"==typeof t&&/[0-9A-F]{6}/.test(t)},isTransparent:function(t){return"string"==typeof t&&"transparent"==t},isEffect:function(t){return"object"==typeof t&&void 0!==t.effectId},getColor:function(){return this.value},handleClick:function(t){var e,i=this,n=$(t.target).closest("div.palette-color-item");if(0!=n.length)if(n.hasClass("color-transparent"))$(i.el).find("div."+i.selectedCls).removeClass(i.selectedCls),n.addClass(i.selectedCls),i.value="transparent",i.trigger("select",i,"transparent");else if((!/^[a-fA-F0-9]{6}$/.test(i.value)||_.indexOf(i.colors,i.value)<0)&&(i.value=!1),$(i.el).find("div."+i.selectedCls).removeClass(i.selectedCls),n.addClass(i.selectedCls),e=n[0].className.match(i.colorRe)[1],n.hasClass("palette-color-effect")){var o=parseInt(n.attr("effectid"));e&&(i.value=e.toUpperCase(),i.trigger("select",i,{color:e,effectId:o}))}else/#?[a-fA-F0-9]{6}/.test(e)&&(e=/#?([a-fA-F0-9]{6})/.exec(e)[1].toUpperCase(),i.value=e,i.trigger("select",i,e))},select:function(t,e){var i=$(this.el);if(i.find("div."+this.selectedCls).removeClass(this.selectedCls),t)if("object"==typeof t){var n;void 0!==t.effectId?(n=i.find('div[effectid="'+t.effectId+'"]').first(),n.length>0?(n.addClass(this.selectedCls),this.value=n[0].className.match(this.colorRe)[1].toUpperCase()):this.value=!1):void 0!==t.effectValue&&(n=i.find('div[effectvalue="'+t.effectValue+'"].color-'+t.color.toUpperCase()).first(),n.length>0?(n.addClass(this.selectedCls),this.value=n[0].className.match(this.colorRe)[1].toUpperCase()):this.value=!1)}else if(/#?[a-fA-F0-9]{6}/.test(t)&&(t=/#?([a-fA-F0-9]{6})/.exec(t)[1].toUpperCase(),this.value=t),/^[a-fA-F0-9]{6}|transparent$/.test(t)&&_.indexOf(this.colors,t)>=0)_.indexOf(this.colors,this.value)<0&&(this.value=!1),(t!=this.value||this.options.allowReselect)&&("transparent"==t?i.find("div.color-transparent").addClass(this.selectedCls):i.find("div.palette-color.color-"+t).first().addClass(this.selectedCls),this.value=t,!0!==e&&this.fireEvent("select",this,t));else{var o=i.find("#"+t).first();0==o.length&&(o=i.find('div[color="'+t+'"]').first()),o.length>0&&(o.addClass(this.selectedCls),this.value=t.toUpperCase())}},updateColors:function(t){void 0!==t&&(this.colors=t,this.cmpEl=$(this.template({id:this.id,cls:this.cls,style:this.style,colors:this.colors})),$(this.el).html(this.cmpEl),this.cmpEl.on("click",_.bind(this.handleClick,this)))},clearSelection:function(t){$(this.el).find("div."+this.selectedCls).removeClass(this.selectedCls),this.value=void 0}})}),define("spreadsheeteditor/main/app/view/AutoFilterDialog",["common/main/lib/component/Window","common/main/lib/component/ColorPaletteExt"],function(){"use strict";SSE.Views=SSE.Views||{},SSE.Views.DigitalFilterDialog=Common.UI.Window.extend(_.extend({initialize:function(t){var e=this,i={};_.extend(i,{width:501,height:230,contentWidth:180,header:!0,cls:"filter-dlg",contentTemplate:"",title:e.txtTitle,items:[]},t),this.template=t.template||['
','
','",'
','
','
',"
","
",'
','
',"
",'
','
','
',"
","
","
",'
','"].join(""),this.api=t.api,this.handler=t.handler,this.type=t.type||"number",i.tpl=_.template(this.template)(i),Common.UI.Window.prototype.initialize.call(this,i)},render:function(){Common.UI.Window.prototype.render.call(this),this.conditions=[{value:Asc.c_oAscCustomAutoFilter.equals,displayValue:this.capCondition1},{value:Asc.c_oAscCustomAutoFilter.doesNotEqual,displayValue:this.capCondition2},{value:Asc.c_oAscCustomAutoFilter.isGreaterThan,displayValue:this.capCondition3},{value:Asc.c_oAscCustomAutoFilter.isGreaterThanOrEqualTo,displayValue:this.capCondition4},{value:Asc.c_oAscCustomAutoFilter.isLessThan,displayValue:this.capCondition5},{value:Asc.c_oAscCustomAutoFilter.isLessThanOrEqualTo,displayValue:this.capCondition6}],"text"==this.type&&(this.conditions=this.conditions.concat([{value:Asc.c_oAscCustomAutoFilter.beginsWith,displayValue:this.capCondition7},{value:Asc.c_oAscCustomAutoFilter.doesNotBeginWith,displayValue:this.capCondition8},{value:Asc.c_oAscCustomAutoFilter.endsWith,displayValue:this.capCondition9},{value:Asc.c_oAscCustomAutoFilter.doesNotEndWith,displayValue:this.capCondition10},{value:Asc.c_oAscCustomAutoFilter.contains,displayValue:this.capCondition11},{value:Asc.c_oAscCustomAutoFilter.doesNotContain,displayValue:this.capCondition12}])),this.cmbCondition1=new Common.UI.ComboBox({el:$("#id-search-begin-digital-combo",this.$window),menuStyle:"min-width: 225px;max-height: 135px;",cls:"input-group-nr",data:this.conditions,scrollAlwaysVisible:!0,editable:!1}),this.cmbCondition1.setValue(Asc.c_oAscCustomAutoFilter.equals),this.conditions.splice(0,0,{value:0,displayValue:this.textNoFilter}),this.cmbCondition2=new Common.UI.ComboBox({el:$("#id-search-end-digital-combo",this.$window),menuStyle:"min-width: 225px;max-height: 135px;",cls:"input-group-nr",data:this.conditions,scrollAlwaysVisible:!0,editable:!1}),this.cmbCondition2.setValue(0),this.rbAnd=new Common.UI.RadioBox({el:$("#id-and-radio",this.$window),labelText:this.capAnd,name:"asc-radio-filter-tab",checked:!0}),this.rbOr=new Common.UI.RadioBox({el:$("#id-or-radio",this.$window),labelText:this.capOr,name:"asc-radio-filter-tab"}),this.cmbValue1=new Common.UI.ComboBox({el:$("#id-sd-cell-search-begin",this.$window),cls:"input-group-nr",menuStyle:"min-width: 225px;max-height: 135px;",scrollAlwaysVisible:!0,data:[]}),this.cmbValue2=new Common.UI.ComboBox({el:$("#id-sd-cell-search-end",this.$window),cls:"input-group-nr",menuStyle:"min-width: 225px;max-height: 135px;",scrollAlwaysVisible:!0,data:[]});var t=function(t,e){var i=t.get("intval"),n=e.get("intval"),o=void 0!==i;return o!==(void 0!==n)?o?-1:1:(!o&&(i=t.get("value").toLowerCase())&&(n=e.get("value").toLowerCase()),i==n?0:""==n||""!==i&&i1?n[1].asc_getOperator()||0:0),this.cmbValue1.setValue(null===n[0].asc_getVal()?"":n[0].asc_getVal()),this.cmbValue2.setValue(n.length>1?null===n[1].asc_getVal()?"":n[1].asc_getVal():"")}}},save:function(){if(this.api&&this.properties&&this.rbOr&&this.rbAnd&&this.cmbCondition1&&this.cmbCondition2&&this.cmbValue1&&this.cmbValue2){var t=this.properties.asc_getFilterObj();t.asc_setFilter(new Asc.CustomFilters),t.asc_setType(Asc.c_oAscAutoFilterTypes.CustomFilters);var e=t.asc_getFilter();e.asc_setCustomFilters(0==this.cmbCondition2.getValue()?[new Asc.CustomFilter]:[new Asc.CustomFilter,new Asc.CustomFilter]);var i=e.asc_getCustomFilters();e.asc_setAnd(this.rbAnd.getValue()),i[0].asc_setOperator(this.cmbCondition1.getValue()),i[0].asc_setVal(this.cmbValue1.getValue()),0!==this.cmbCondition2.getValue()&&(i[1].asc_setOperator(this.cmbCondition2.getValue()||void 0),i[1].asc_setVal(this.cmbValue2.getValue())),this.api.asc_applyAutoFilter(this.properties)}},onPrimary:function(){return this.save(),this.close(),!1},cancelButtonText:"Cancel",capAnd:"And",capCondition1:"equals",capCondition10:"does not end with",capCondition11:"contains",capCondition12:"does not contain",capCondition2:"does not equal",capCondition3:"is greater than",capCondition4:"is greater than or equal to",capCondition5:"is less than",capCondition6:"is less than or equal to",capCondition7:"begins with",capCondition8:"does not begin with",capCondition9:"ends with",capOr:"Or",textNoFilter:"no filter",textShowRows:"Show rows where",textUse1:"Use ? to present any single character",textUse2:"Use * to present any series of character",txtTitle:"Custom Filter"},SSE.Views.DigitalFilterDialog||{})),SSE.Views.Top10FilterDialog=Common.UI.Window.extend(_.extend({initialize:function(t){var e=this,i={};_.extend(i,{width:318,height:160,contentWidth:180,header:!0,cls:"filter-dlg",contentTemplate:"",title:e.txtTitle,items:[]},t),this.template=t.template||['
','
','
','",'
',"
",'
','','
',"
",'
','','
',"
","
","
",'
','"].join(""),this.api=t.api,this.handler=t.handler,i.tpl=_.template(this.template)(i),Common.UI.Window.prototype.initialize.call(this,i)},render:function(){Common.UI.Window.prototype.render.call(this),this.cmbType=new Common.UI.ComboBox({el:$("#id-top10-type-combo",this.$window),style:"width: 85px;",menuStyle:"min-width: 85px;",cls:"input-group-nr",data:[{value:!0,displayValue:this.txtTop},{value:!1,displayValue:this.txtBottom}],editable:!1}),this.cmbType.setValue(!0),this.cmbItem=new Common.UI.ComboBox({el:$("#id-top10-item-combo",this.$window),style:"width: 85px;",menuStyle:"min-width: 85px;",cls:"input-group-nr",data:[{value:!1,displayValue:this.txtItems},{value:!0,displayValue:this.txtPercent}],editable:!1}),this.cmbItem.setValue(!1),this.cmbItem.on("selected",_.bind(function(t,e){this.spnCount.setDefaultUnit(e.value?"%":"")},this)),this.spnCount=new Common.UI.MetricSpinner({el:$("#id-top10-count-spin"),step:1,width:85,defaultUnit:"",value:"10",maxValue:500,minValue:1}),this.$window.find(".dlg-btn").on("click",_.bind(this.onBtnClick,this)),this.loadDefaults()},show:function(){Common.UI.Window.prototype.show.call(this);var t=this;_.defer(function(){t.spnCount&&t.spnCount.$input.focus()},500)},close:function(){this.api&&this.api.asc_enableKeyEvents(!0),Common.UI.Window.prototype.close.call(this)},onBtnClick:function(t){t.currentTarget.attributes&&t.currentTarget.attributes.result&&("ok"===t.currentTarget.attributes.result.value&&this.save(),this.close())},setSettings:function(t){this.properties=t},loadDefaults:function(){if(this.properties){var t=this.properties.asc_getFilterObj();if(t.asc_getType()==Asc.c_oAscAutoFilterTypes.Top10){var e=t.asc_getFilter(),i=e.asc_getTop(),n=e.asc_getPercent();this.cmbType.setValue(i||null===i),this.cmbItem.setValue(n||null===n),this.spnCount.setDefaultUnit(n||null===n?"%":""),this.spnCount.setValue(e.asc_getVal())}}},save:function(){if(this.api&&this.properties){var t=this.properties.asc_getFilterObj();t.asc_setFilter(new Asc.Top10),t.asc_setType(Asc.c_oAscAutoFilterTypes.Top10);var e=t.asc_getFilter();e.asc_setTop(this.cmbType.getValue()),e.asc_setPercent(this.cmbItem.getValue()),e.asc_setVal(this.spnCount.getNumberValue()),this.api.asc_applyAutoFilter(this.properties)}},onPrimary:function(){return this.save(),this.close(),!1},cancelButtonText:"Cancel",okButtonText:"OK",txtTitle:"Top 10 AutoFilter",textType:"Show",txtTop:"Top",txtBottom:"Bottom",txtItems:"Item",txtPercent:"Percent"},SSE.Views.Top10FilterDialog||{})),SSE.Views.AutoFilterDialog=Common.UI.Window.extend(_.extend({initialize:function(t){var e=this,i={},n=void 0,o=void 0;Common.Utils.InternalSettings.get("sse-settings-size-filter-window")&&(n=Common.Utils.InternalSettings.get("sse-settings-size-filter-window")[0],o=Common.Utils.InternalSettings.get("sse-settings-size-filter-window")[1]),_.extend(i,{width:n||450,height:o||265,contentWidth:n-50||400,header:!1,cls:"filter-dlg",contentTemplate:"",title:e.txtTitle,modal:!1,animate:!1,items:[],resizable:!0,minwidth:450,minheight:265},t),this.template=t.template||['
','
','
','','
','
',"
","
",'","
",'","
"].join(""),this.api=t.api,this.handler=t.handler,this.throughIndexes=[],this.filteredIndexes=[],this.curSize=null,i.tpl=_.template(this.template)(i),Common.UI.Window.prototype.initialize.call(this,i),this.on("resizing",_.bind(this.onWindowResizing,this)),this.on("resize",_.bind(this.onWindowResize,this))},render:function(){var t=this;Common.UI.Window.prototype.render.call(this);var e=this.$window.find(".resize-border");this.$window.find(".resize-border.left, .resize-border.top").css({cursor:"default"}),e.css({background:"none",border:"none"}),e.removeClass("left"),e.removeClass("top"),this.$window.find(".btn").on("click",_.bind(this.onBtnClick,this)),this.btnOk=new Common.UI.Button({cls:"btn normal dlg-btn primary",caption:this.okButtonText,style:"margin-right:10px;",enableToggle:!1,allowDepress:!1}),this.btnOk&&(this.btnOk.render($("#id-apply-filter",this.$window)),this.btnOk.on("click",_.bind(this.onApplyFilter,this))),this.miSortLow2High=new Common.UI.MenuItem({caption:this.txtSortLow2High,toggleGroup:"menufiltersort",checkable:!0,checked:!1}),this.miSortLow2High.on("click",_.bind(this.onSortType,this,Asc.c_oAscSortOptions.Ascending)),this.miSortHigh2Low=new Common.UI.MenuItem({caption:this.txtSortHigh2Low,toggleGroup:"menufiltersort",checkable:!0,checked:!1}),this.miSortHigh2Low.on("click",_.bind(this.onSortType,this,Asc.c_oAscSortOptions.Descending)),this.miSortCellColor=new Common.UI.MenuItem({caption:this.txtSortCellColor,toggleGroup:"menufiltersort",checkable:!0,checked:!1,menu:new Common.UI.Menu({style:"min-width: inherit; padding: 0px;",menuAlign:"tl-tr",items:[{template:_.template('
')}]})}),this.miSortFontColor=new Common.UI.MenuItem({caption:this.txtSortFontColor,toggleGroup:"menufiltersort",checkable:!0,checked:!1,menu:new Common.UI.Menu({style:"min-width: inherit; padding: 0px;",menuAlign:"tl-tr",items:[{template:_.template('
')}]})}),this.miNumFilter=new Common.UI.MenuItem({caption:this.txtNumFilter,toggleGroup:"menufilterfilter",checkable:!0,checked:!1,menu:new Common.UI.Menu({menuAlign:"tl-tr",items:[{value:Asc.c_oAscCustomAutoFilter.equals,caption:this.txtEquals,checkable:!0,type:Asc.c_oAscAutoFilterTypes.CustomFilters},{value:Asc.c_oAscCustomAutoFilter.doesNotEqual,caption:this.txtNotEquals,checkable:!0,type:Asc.c_oAscAutoFilterTypes.CustomFilters},{value:Asc.c_oAscCustomAutoFilter.isGreaterThan,caption:this.txtGreater,checkable:!0,type:Asc.c_oAscAutoFilterTypes.CustomFilters},{value:Asc.c_oAscCustomAutoFilter.isGreaterThanOrEqualTo,caption:this.txtGreaterEquals,checkable:!0,type:Asc.c_oAscAutoFilterTypes.CustomFilters},{value:Asc.c_oAscCustomAutoFilter.isLessThan,caption:this.txtLess,checkable:!0,type:Asc.c_oAscAutoFilterTypes.CustomFilters},{value:Asc.c_oAscCustomAutoFilter.isLessThanOrEqualTo,caption:this.txtLessEquals,checkable:!0,type:Asc.c_oAscAutoFilterTypes.CustomFilters},{value:-2,caption:this.txtBetween,checkable:!0,type:Asc.c_oAscAutoFilterTypes.CustomFilters},{value:Asc.c_oAscCustomAutoFilter.top10,caption:this.txtTop10,checkable:!0,type:Asc.c_oAscAutoFilterTypes.Top10},{value:Asc.c_oAscDynamicAutoFilter.aboveAverage,caption:this.txtAboveAve,checkable:!0,type:Asc.c_oAscAutoFilterTypes.DynamicFilter},{value:Asc.c_oAscDynamicAutoFilter.belowAverage,caption:this.txtBelowAve,checkable:!0,type:Asc.c_oAscAutoFilterTypes.DynamicFilter},{value:-1,caption:this.btnCustomFilter+"...",checkable:!0,type:Asc.c_oAscAutoFilterTypes.CustomFilters}]})});for(var i=this.miNumFilter.menu.items,n=0;n
')}]})}),this.miFilterFontColor=new Common.UI.MenuItem({caption:this.txtFilterFontColor,toggleGroup:"menufilterfilter",checkable:!0,checked:!1,menu:new Common.UI.Menu({style:"min-width: inherit; padding: 0px;",menuAlign:"tl-tr",items:[{template:_.template('
')}]})}),this.miClear=new Common.UI.MenuItem({caption:this.txtClear,checkable:!1}),this.miClear.on("click",_.bind(this.onClear,this)),this.miReapply=new Common.UI.MenuItem({caption:this.txtReapply,checkable:!1}),this.miReapply.on("click",_.bind(this.onReapply,this)),this.filtersMenu=new Common.UI.Menu({items:[this.miSortLow2High,this.miSortHigh2Low,this.miSortCellColor,this.miSortFontColor,{caption:"--"},this.miNumFilter,this.miTextFilter,this.miFilterCellColor,this.miFilterFontColor,this.miClear,{caption:"--"},this.miReapply]});var o=this.$window.find("#menu-container-filters");this.filtersMenu.render(o),this.filtersMenu.cmpEl.attr({tabindex:"-1"}),this.mnuSortColorCellsPicker=new Common.UI.ColorPaletteExt({el:$("#filter-dlg-sort-cells-color"),colors:[]}),this.mnuSortColorCellsPicker.on("select",_.bind(this.onSortColorSelect,this,Asc.c_oAscSortOptions.ByColorFill)),this.mnuSortColorFontPicker=new Common.UI.ColorPaletteExt({el:$("#filter-dlg-sort-font-color"),colors:[]}),this.mnuSortColorFontPicker.on("select",_.bind(this.onSortColorSelect,this,Asc.c_oAscSortOptions.ByColorFont)), this.mnuFilterColorCellsPicker=new Common.UI.ColorPaletteExt({el:$("#filter-dlg-filter-cells-color"),colors:[]}),this.mnuFilterColorCellsPicker.on("select",_.bind(this.onFilterColorSelect,this,!0)),this.mnuFilterColorFontPicker=new Common.UI.ColorPaletteExt({el:$("#filter-dlg-filter-font-color"),colors:[]}),this.mnuFilterColorFontPicker.on("select",_.bind(this.onFilterColorSelect,this,!1)),this.input=new Common.UI.InputField({el:$("#id-sd-cell-search",this.$window),allowBlank:!0,placeHolder:this.txtEmpty,validateOnChange:!0,validation:function(){return!0}}).on("changing",function(e,i){i.length?(i=i.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),t.filter=new RegExp(i,"ig")):t.filter=void 0,t.setupDataCells()}),this.cells=new Common.UI.DataViewStore,this.filterExcludeCells=new Common.UI.DataViewStore,this.cells&&(this.cellsList=new Common.UI.ListView({el:$("#id-dlg-filter-values",this.$window),store:this.cells,simpleAddMode:!0,template:_.template(['
'].join("")),itemTemplate:_.template(["
",'",'
','
<%= Common.Utils.String.htmlEncode(value) %>
','<% if (typeof count !=="undefined" && count) { %>','
<%= count%>
',"<% } %>","
","
"].join(""))}),this.cellsList.store.comparator=function(t,e){if("0"==t.get("groupid"))return-1;if("0"==e.get("groupid"))return 1;if("2"==t.get("groupid"))return-1;if("2"==e.get("groupid"))return 1;var i=t.get("intval"),n=e.get("intval"),o=void 0!==i;return o!==(void 0!==n)?o?-1:1:(!o&&(i=t.get("cellvalue").toLowerCase())&&(n=e.get("cellvalue").toLowerCase()),i==n?0:""==n||""!==i&&i1?r[1].asc_getOperator()||0:0,i=null===r[0].asc_getVal()?"":r[0].asc_getVal(),n=r.length>1?null===r[1].asc_getVal()?"":r[1].asc_getVal():""}if(-1!==t.value){var c=new Asc.CustomFilters;c.asc_setCustomFilters(-2==t.value?[new Asc.CustomFilter,new Asc.CustomFilter]:[new Asc.CustomFilter]);var h=c.asc_getCustomFilters();if(h[0].asc_setOperator(-2==t.value?Asc.c_oAscCustomAutoFilter.isGreaterThanOrEqualTo:t.value),-2==t.value){var d=o==Asc.c_oAscCustomAutoFilter.isGreaterThanOrEqualTo&&s==Asc.c_oAscCustomAutoFilter.isLessThanOrEqualTo;c.asc_setAnd(!d||a),h[0].asc_setVal(d?i:""),h[1].asc_setOperator(Asc.c_oAscCustomAutoFilter.isLessThanOrEqualTo),h[1].asc_setVal(d?n:"")}else c.asc_setAnd(!0),h[0].asc_setVal(t.value==o?i:"");e.asc_setFilter(c),e.asc_setType(Asc.c_oAscAutoFilterTypes.CustomFilters)}var p=this,m=new SSE.Views.DigitalFilterDialog({api:this.api,type:"number"}).on({close:function(){p.close()}});this.close(),m.setSettings(this.configTo),m.show()},onTextFilterMenuClick:function(t,e){var i=this.configTo.asc_getFilterObj(),n="",o=Asc.c_oAscCustomAutoFilter.equals;if(i.asc_getType()==Asc.c_oAscAutoFilterTypes.CustomFilters){var s=i.asc_getFilter(),a=s.asc_getCustomFilters();s.asc_getAnd(),o=a[0].asc_getOperator(),a.length>1?a[1].asc_getOperator()||0:0,n=null===a[0].asc_getVal()?"":a[0].asc_getVal(),a.length>1?null===a[1].asc_getVal()?"":a[1].asc_getVal():""}if(-1!==e.value){var l=new Asc.CustomFilters;l.asc_setCustomFilters([new Asc.CustomFilter]);var r=l.asc_getCustomFilters();l.asc_setAnd(!0),r[0].asc_setOperator(e.value),r[0].asc_setVal(e.value==o?n:""),i.asc_setFilter(l),i.asc_setType(Asc.c_oAscAutoFilterTypes.CustomFilters)}var c=this,h=new SSE.Views.DigitalFilterDialog({api:this.api,type:"text"}).on({close:function(){c.close()}});this.close(),h.setSettings(this.configTo),h.show()},onNumDynamicFilterItemClick:function(t){var e=this.configTo.asc_getFilterObj();e.asc_getType()!==Asc.c_oAscAutoFilterTypes.DynamicFilter&&(e.asc_setFilter(new Asc.DynamicFilter),e.asc_setType(Asc.c_oAscAutoFilterTypes.DynamicFilter)),e.asc_getFilter().asc_setType(t.value),this.api.asc_applyAutoFilter(this.configTo),this.close()},onTop10FilterItemClick:function(t,e){var i=this,n=new SSE.Views.Top10FilterDialog({api:this.api}).on({close:function(){i.close()}});this.close(),n.setSettings(this.configTo),n.show()},onFilterColorSelect:function(t,e,i){var n=this.configTo.asc_getFilterObj();n.asc_getType()!==Asc.c_oAscAutoFilterTypes.ColorFilter&&(n.asc_setFilter(new Asc.ColorFilter),n.asc_setType(Asc.c_oAscAutoFilterTypes.ColorFilter));var o=n.asc_getFilter();o.asc_setCellColor(!!t&&null),o.asc_setCColor(t&&"transparent"==i||!t&&"#000000"==i?null:Common.Utils.ThemeColor.getRgbColor(i)),this.api.asc_applyAutoFilter(this.configTo),this.close()},onSortColorSelect:function(t,e,i){if(this.api&&this.configTo){var n=t==Asc.c_oAscSortOptions.ByColorFill;this.api.asc_sortColFilter(t,this.configTo.asc_getCellId(),this.configTo.asc_getDisplayName(),n&&"transparent"==i||!n&&"#000000"==i?null:Common.Utils.ThemeColor.getRgbColor(i))}this.close()},onCellCheck:function(t,e,i){if(!this.checkCellTrigerBlock){var n="",o="",s=!1,a=null,l=window.event?window.event:window._event;if(l){if(o=l.target.type,n=$(l.currentTarget).find(".list-item"),n.length){a=n.get(0).getBoundingClientRect();var r=l.clientX*Common.Utils.zoom(),c=l.clientY*Common.Utils.zoom();a.left1&&(o[parseInt(t.get("throughIndex"))]=i))});else{e.set("check",i),o[parseInt(e.get("throughIndex"))]=i;for(var s=i,a=0;a0;if(this.miSortFontColor.setVisible(c),this.miFilterFontColor.setVisible(c),c){var h=[];a.forEach(function(t,e){t?h.push(Common.Utils.ThemeColor.getHexColor(t.get_r(),t.get_g(),t.get_b()).toLocaleUpperCase()):h.push("000000")}),this.mnuSortColorFontPicker.updateColors(h),this.mnuFilterColorFontPicker.updateColors(h),this.miFilterFontColor.setChecked(!1,!0),this.miSortFontColor.setChecked(l==Asc.c_oAscSortOptions.ByColorFont,!0),l==Asc.c_oAscSortOptions.ByColorFont&&this.mnuSortColorFontPicker.select(r||"000000",!0)}if(c=s&&s.length>0,this.miSortCellColor.setVisible(c),this.miFilterCellColor.setVisible(c),c){var h=[];s.forEach(function(t,e){t?h.push(Common.Utils.ThemeColor.getHexColor(t.get_r(),t.get_g(),t.get_b()).toLocaleUpperCase()):h.push("transparent")}),this.mnuSortColorCellsPicker.updateColors(h),this.mnuFilterColorCellsPicker.updateColors(h),this.miFilterCellColor.setChecked(!1,!0),this.miSortCellColor.setChecked(l==Asc.c_oAscSortOptions.ByColorFill,!0),l==Asc.c_oAscSortOptions.ByColorFill&&this.mnuSortColorCellsPicker.select(r||"transparent",!0)}if(e){var d=t.asc_getFilter(),p=d.asc_getCustomFilters(),m=(d.asc_getAnd(),p[0].asc_getOperator()),u=p.length>1?p[1].asc_getOperator()||0:0,g=o?this.miTextFilter.menu.items:this.miNumFilter.menu.items,b=!0;1==p.length?g.forEach(function(t){var e=t.options.type==Asc.c_oAscAutoFilterTypes.CustomFilters&&t.value==m;t.setChecked(e,!0),e&&(b=!1)}):!o&&(m==Asc.c_oAscCustomAutoFilter.isGreaterThanOrEqualTo&&u==Asc.c_oAscCustomAutoFilter.isLessThanOrEqualTo||m==Asc.c_oAscCustomAutoFilter.isLessThanOrEqualTo&&u==Asc.c_oAscCustomAutoFilter.isGreaterThanOrEqualTo)&&(g[6].setChecked(!0,!0),b=!1),b&&g[g.length-1].setChecked(!0,!0)}else if(this.initialFilterType===Asc.c_oAscAutoFilterTypes.ColorFilter){var f=t.asc_getFilter(),C=f.asc_getCColor();C&&(C=Common.Utils.ThemeColor.getHexColor(C.get_r(),C.get_g(),C.get_b()).toLocaleUpperCase()),null===f.asc_getCellColor()?(this.miFilterCellColor.setChecked(!0,!0),this.mnuFilterColorCellsPicker.select(C||"transparent",!0)):!1===f.asc_getCellColor()&&(this.miFilterFontColor.setChecked(!0,!0),this.mnuFilterColorFontPicker.select(C||"000000",!0))}else if(i||n){var v=i?t.asc_getFilter().asc_getType():null,g=this.miNumFilter.menu.items;g.forEach(function(t){t.setChecked(i&&t.options.type==Asc.c_oAscAutoFilterTypes.DynamicFilter&&t.value==v||n&&t.options.type==Asc.c_oAscAutoFilterTypes.Top10,!0)})}this.miClear.setDisabled(this.initialFilterType===Asc.c_oAscAutoFilterTypes.None),this.miReapply.setDisabled(this.initialFilterType===Asc.c_oAscAutoFilterTypes.None),this.btnOk.setDisabled(this.initialFilterType!==Asc.c_oAscAutoFilterTypes.Filters&&this.initialFilterType!==Asc.c_oAscAutoFilterTypes.None)},setupDataCells:function(){function t(t){return!isNaN(parseFloat(t))&&isFinite(t)}var e,i,n,o=this,s=0,a=2,l=!0,r=!1,c=0,h=[],d=[],p=o.filter?o.filteredIndexes:o.throughIndexes;this.configTo.asc_getValues().forEach(function(r){i=r.asc_getText(),e=t(i),l=!0,n=r.asc_getRepeats?r.asc_getRepeats():void 0,o.filter?(null===i.match(o.filter)&&(l=!1),p[a]=l):void 0==p[a]&&(p[a]=r.asc_getVisible()),l?(h.push(new Common.UI.DataViewModel({id:++s,selected:!1,allowSelected:!0,cellvalue:i,value:e?i:i.length>0?i:o.textEmptyItem,intval:e?parseFloat(i):void 0,strval:e?"":i,groupid:"1",check:p[a],throughIndex:a,count:n?n.toString():""})),p[a]&&c++):d.push(new Common.UI.DataViewModel({cellvalue:i})),++a}),c==h.length?r=!0:c>0&&(r="indeterminate"),(o.filter||void 0==p[0])&&(p[0]=!0),(!o.filter||h.length>0)&&h.unshift(new Common.UI.DataViewModel({id:++s,selected:!1,allowSelected:!0,value:o.filter?this.textSelectAllResults:this.textSelectAll,groupid:"0",check:p[0],throughIndex:0})),o.filter&&h.length>1&&(void 0==p[1]&&(p[1]=!1),h.splice(1,0,new Common.UI.DataViewModel({id:++s,selected:!1,allowSelected:!0,value:this.textAddSelection,groupid:"2",check:p[1],throughIndex:1}))),this.cells.reset(h),this.filterExcludeCells.reset(d),this.cells.length&&(this.checkCellTrigerBlock=!0,this.cells.at(0).set("check",r),this.checkCellTrigerBlock=void 0),this.btnOk.setDisabled(this.cells.length<1),this.cellsList.scroller.update({minScrollbarLength:40,alwaysVisibleY:!0,suppressScrollX:!0}),this.cellsList.cmpEl.toggleClass("scroll-padding",this.cellsList.scroller.isVisible())},testFilter:function(){var t=this,e=!1;return this.cells&&(this.filter&&this.filteredIndexes[1]?e=!0:this.cells.forEach(function(t){if("1"==t.get("groupid")&&t.get("check"))return e=!0,!0})),e||(t._skipCheckDocumentClick=!0,Common.UI.warning({title:this.textWarning,msg:this.warnNoSelected,callback:function(){t._skipCheckDocumentClick=!1,_.delay(function(){t.input.$el.find("input").focus()},100,this)}})),e},save:function(){if(this.api&&this.configTo&&this.cells&&this.filterExcludeCells){var t=this.configTo.asc_getValues(),e=!1;if(this.filter&&this.filteredIndexes[1])this.initialFilterType===Asc.c_oAscAutoFilterTypes.CustomFilters&&t.forEach(function(t,e){t.asc_setVisible(!0)}),this.cells.each(function(e){"1"==e.get("groupid")&&t[parseInt(e.get("throughIndex"))-2].asc_setVisible(e.get("check"))}),t.forEach(function(t,i){if(t.asc_getVisible())return e=!0,!0});else{var i=this.filter?this.filteredIndexes:this.throughIndexes;t.forEach(function(t,e){t.asc_setVisible(i[e+2])}),e=!0}e&&(this.configTo.asc_getFilterObj().asc_setType(Asc.c_oAscAutoFilterTypes.Filters),this.api.asc_applyAutoFilter(this.configTo))}},onPrimary:function(){return this.save(),this.close(),!1},onWindowResize:function(t){if(t&&"start"==t[1])this.curSize={resize:!1,height:this.getSize()[1]};else if(this.curSize.resize){var e=this.getSize();this.$window.find(".combo-values").css({height:e[1]-100+"px"}),this.cellsList.scroller.update({minScrollbarLength:40,alwaysVisibleY:!0,suppressScrollX:!0})}},onWindowResizing:function(){if(this.curSize){var t=this.getSize();t[1]!==this.curSize.height&&(this.curSize.resize||(this.curSize.resize=!0,this.cellsList.scroller.update({minScrollbarLength:40,alwaysVisibleY:!1,suppressScrollX:!0})),this.$window.find(".combo-values").css({height:t[1]-100+"px"}),this.curSize.height=t[1]),Common.Utils.InternalSettings.set("sse-settings-size-filter-window",t)}},okButtonText:"Ok",btnCustomFilter:"Custom Filter",textSelectAll:"Select All",txtTitle:"Filter",warnNoSelected:"You must choose at least one value",textWarning:"Warning",cancelButtonText:"Cancel",textEmptyItem:"{Blanks}",txtEmpty:"Enter cell's filter",txtSortLow2High:"Sort Lowest to Highest",txtSortHigh2Low:"Sort Highest to Lowest",txtSortCellColor:"Sort by cells color",txtSortFontColor:"Sort by font color",txtNumFilter:"Number filter",txtTextFilter:"Text filter",txtFilterCellColor:"Filter by cells color",txtFilterFontColor:"Filter by font color",txtClear:"Clear",txtReapply:"Reapply",txtEquals:"Equals...",txtNotEquals:"Does not equal...",txtGreater:"Greater than...",txtGreaterEquals:"Greater than or equal to...",txtLess:"Less than...",txtLessEquals:"Less than or equal to...",txtBetween:"Between...",txtTop10:"Top 10",txtAboveAve:"Above average",txtBelowAve:"Below average",txtBegins:"Begins with...",txtNotBegins:"Does not begin with...",txtEnds:"Ends with...",txtNotEnds:"Does not end with...",txtContains:"Contains...",txtNotContains:"Does not contain...",textSelectAllResults:"Select All Search Results",textAddSelection:"Add current selection to filter"},SSE.Views.AutoFilterDialog||{}))});var c_paragraphLinerule={LINERULE_AUTO:1,LINERULE_EXACT:2},c_paragraphTextAlignment={RIGHT:0,LEFT:1,CENTERED:2,JUSTIFIED:3},c_paragraphSpecial={NONE_SPECIAL:0,FIRST_LINE:1,HANGING:2};if(define("spreadsheeteditor/main/app/controller/DocumentHolder",["core","common/main/lib/util/utils","common/main/lib/util/Shortcuts","common/main/lib/view/CopyWarningDialog","common/main/lib/view/OpenDialog","spreadsheeteditor/main/app/view/DocumentHolder","spreadsheeteditor/main/app/view/HyperlinkSettingsDialog","spreadsheeteditor/main/app/view/ParagraphSettingsAdvanced","spreadsheeteditor/main/app/view/ImageSettingsAdvanced","spreadsheeteditor/main/app/view/SetValueDialog","spreadsheeteditor/main/app/view/AutoFilterDialog"],function(){"use strict";SSE.Controllers.DocumentHolder=Backbone.Controller.extend(_.extend({models:[],collections:[],views:["DocumentHolder"],initialize:function(){var t=this;t.tooltips={hyperlink:{},comment:{},coauth:{ttHeight:20},row_column:{ttHeight:20},filter:{ttHeight:40},func_arg:{},input_msg:{}},t.mouse={},t.popupmenu=!1,t.rangeSelectionMode=!1,t.namedrange_locked=!1,t._currentMathObj=void 0,t._currentParaObjDisabled=!1,t._isDisabled=!1,t._state={},this.wrapEvents={apiHideComment:_.bind(this.onApiHideComment,this)},this.addListeners({DocumentHolder:{createdelayedelements:this.onCreateDelayedElements}});var e={};this.hkComments="alt+h",e[this.hkComments]=function(){return t.onAddComment(),!1},Common.util.Shortcuts.delegateShortcuts({shortcuts:e})},onLaunch:function(){var t=this;t.documentHolder=this.createView("DocumentHolder"),t.documentHolder.render(),t.documentHolder.el.tabIndex=-1,$(document).on("mousewheel",_.bind(t.onDocumentWheel,t)),$(document).on("mousedown",_.bind(t.onDocumentRightDown,t)),$(document).on("mouseup",_.bind(t.onDocumentRightUp,t)),$(document).on("keydown",_.bind(t.onDocumentKeyDown,t)),$(document).on("mousemove",_.bind(t.onDocumentMouseMove,t)),$(window).on("resize",_.bind(t.onDocumentResize,t)),SSE.getController("Viewport").getView("Viewport").hlayout.on("layout:resizedrag",_.bind(t.onDocumentResize,t)),Common.NotificationCenter.on({"window:show":function(e){t.hideHyperlinkTip()},"modal:show":function(e){t.hideCoAuthTips()},"layout:changed":function(e){t.hideHyperlinkTip(),t.hideCoAuthTips(),t.onDocumentResize()},"cells:range":function(e){t.onCellsRange(e)}}),Common.Gateway.on("processmouse",_.bind(t.onProcessMouse,t))},onCreateDelayedElements:function(t){var e=this;e.permissions.isEdit?(t.pmiCut.on("click",_.bind(e.onCopyPaste,e)),t.pmiCopy.on("click",_.bind(e.onCopyPaste,e)),t.pmiPaste.on("click",_.bind(e.onCopyPaste,e)),t.pmiImgCut.on("click",_.bind(e.onCopyPaste,e)),t.pmiImgCopy.on("click",_.bind(e.onCopyPaste,e)),t.pmiImgPaste.on("click",_.bind(e.onCopyPaste,e)),t.pmiTextCut.on("click",_.bind(e.onCopyPaste,e)),t.pmiTextCopy.on("click",_.bind(e.onCopyPaste,e)),t.pmiTextPaste.on("click",_.bind(e.onCopyPaste,e)),t.pmiCommonCut.on("click",_.bind(e.onCopyPaste,e)),t.pmiCommonCopy.on("click",_.bind(e.onCopyPaste,e)),t.pmiCommonPaste.on("click",_.bind(e.onCopyPaste,e)),t.pmiInsertEntire.on("click",_.bind(e.onInsertEntire,e)),t.pmiDeleteEntire.on("click",_.bind(e.onDeleteEntire,e)),t.pmiInsertCells.menu.on("item:click",_.bind(e.onInsertCells,e)),t.pmiDeleteCells.menu.on("item:click",_.bind(e.onDeleteCells,e)),t.pmiSparklines.menu.on("item:click",_.bind(e.onClear,e)),t.pmiSortCells.menu.on("item:click",_.bind(e.onSortCells,e)),t.pmiFilterCells.menu.on("item:click",_.bind(e.onFilterCells,e)),t.pmiReapply.on("click",_.bind(e.onReapply,e)),t.pmiClear.menu.on("item:click",_.bind(e.onClear,e)),t.pmiSelectTable.menu.on("item:click",_.bind(e.onSelectTable,e)),t.pmiInsertTable.menu.on("item:click",_.bind(e.onInsertTable,e)),t.pmiDeleteTable.menu.on("item:click",_.bind(e.onDeleteTable,e)),t.pmiInsFunction.on("click",_.bind(e.onInsFunction,e)),t.menuAddHyperlink.on("click",_.bind(e.onInsHyperlink,e)),t.menuEditHyperlink.on("click",_.bind(e.onInsHyperlink,e)),t.menuRemoveHyperlink.on("click",_.bind(e.onDelHyperlink,e)),t.pmiRowHeight.menu.on("item:click",_.bind(e.onSetSize,e)),t.pmiColumnWidth.menu.on("item:click",_.bind(e.onSetSize,e)),t.pmiEntireHide.on("click",_.bind(e.onEntireHide,e)),t.pmiEntireShow.on("click",_.bind(e.onEntireShow,e)),t.pmiFreezePanes.on("click",_.bind(e.onFreezePanes,e)),t.pmiEntriesList.on("click",_.bind(e.onEntriesList,e)),t.pmiAddComment.on("click",_.bind(e.onAddComment,e)),t.pmiAddNamedRange.on("click",_.bind(e.onAddNamedRange,e)),t.menuImageArrange.menu.on("item:click",_.bind(e.onImgMenu,e)),t.menuImgRotate.menu.on("item:click",_.bind(e.onImgMenu,e)),t.menuImgCrop.menu.on("item:click",_.bind(e.onImgCrop,e)),t.menuImageAlign.menu.on("item:click",_.bind(e.onImgMenuAlign,e)),t.menuParagraphVAlign.menu.on("item:click",_.bind(e.onParagraphVAlign,e)),t.menuParagraphDirection.menu.on("item:click",_.bind(e.onParagraphDirection,e)),t.menuParagraphBullets.menu.on("item:click",_.bind(e.onSelectNoneBullet,e)),t.menuAddHyperlinkShape.on("click",_.bind(e.onInsHyperlink,e)),t.menuEditHyperlinkShape.on("click",_.bind(e.onInsHyperlink,e)),t.menuRemoveHyperlinkShape.on("click",_.bind(e.onRemoveHyperlinkShape,e)),t.pmiTextAdvanced.on("click",_.bind(e.onTextAdvanced,e)),t.mnuShapeAdvanced.on("click",_.bind(e.onShapeAdvanced,e)),t.mnuChartEdit.on("click",_.bind(e.onChartEdit,e)),t.mnuImgAdvanced.on("click",_.bind(e.onImgAdvanced,e)),t.textInShapeMenu.on("render:after",_.bind(e.onTextInShapeAfterRender,e)),t.menuSignatureEditSign.on("click",_.bind(e.onSignatureClick,e)),t.menuSignatureEditSetup.on("click",_.bind(e.onSignatureClick,e)),t.menuImgOriginalSize.on("click",_.bind(e.onOriginalSizeClick,e)),t.menuImgReplace.menu.on("item:click",_.bind(e.onImgReplace,e)),t.pmiNumFormat.menu.on("item:click",_.bind(e.onNumberFormatSelect,e)),t.pmiNumFormat.menu.on("show:after",_.bind(e.onNumberFormatOpenAfter,e)),t.pmiAdvancedNumFormat.on("click",_.bind(e.onCustomNumberFormat,e))):(t.menuViewCopy.on("click",_.bind(e.onCopyPaste,e)),t.menuViewUndo.on("click",_.bind(e.onUndo,e)),t.menuViewAddComment.on("click",_.bind(e.onAddComment,e)),t.menuSignatureViewSign.on("click",_.bind(e.onSignatureClick,e)),t.menuSignatureDetails.on("click",_.bind(e.onSignatureClick,e)),t.menuSignatureViewSetup.on("click",_.bind(e.onSignatureClick,e)),t.menuSignatureRemove.on("click",_.bind(e.onSignatureClick,e)));var i=t.cmpEl;if(i){i.on({mousedown:function(t){"canvas"==t.target.localName&&2!=t.button&&Common.UI.Menu.Manager.hideAll()},click:function(t){e.api&&(e.api.isTextAreaBlur=!1,"canvas"!=t.target.localName||e.isEditFormula||i.focus())}});var n=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";!function(t,e,i){t.addEventListener?t.addEventListener(e,i,!1):t.attachEvent("on"+e,i)}(t.el,n,_.bind(this.onDocumentWheel,this)),e.cellEditor=$("#ce-cell-content")}},loadConfig:function(t){this.editorConfig=t.config},setMode:function(t){this.permissions=t,this.permissions.canCoAuthoring&&this.permissions.canComments?Common.util.Shortcuts.resumeEvents(this.hkComments):Common.util.Shortcuts.suspendEvents(this.hkComments)},setApi:function(t){return this.api=t,this.api.asc_registerCallback("asc_onContextMenu",_.bind(this.onApiContextMenu,this)),this.api.asc_registerCallback("asc_onMouseMove",_.bind(this.onApiMouseMove,this)),this.api.asc_registerCallback("asc_onHideComment",this.wrapEvents.apiHideComment),this.api.asc_registerCallback("asc_onHyperlinkClick",_.bind(this.onApiHyperlinkClick,this)),this.api.asc_registerCallback("asc_onCoAuthoringDisconnect",_.bind(this.onApiCoAuthoringDisconnect,this)),Common.NotificationCenter.on("api:disconnect",_.bind(this.onApiCoAuthoringDisconnect,this)),this.api.asc_registerCallback("asc_onSelectionChanged",_.bind(this.onSelectionChanged,this)),!0===this.permissions.isEdit&&(this.api.asc_registerCallback("asc_onSetAFDialog",_.bind(this.onApiAutofilter,this)),this.api.asc_registerCallback("asc_onEditCell",_.bind(this.onApiEditCell,this)),this.api.asc_registerCallback("asc_onLockDefNameManager",_.bind(this.onLockDefNameManager,this)),this.api.asc_registerCallback("asc_onEntriesListMenu",_.bind(this.onEntriesListMenu,this)),this.api.asc_registerCallback("asc_onFormulaCompleteMenu",_.bind(this.onFormulaCompleteMenu,this)),this.api.asc_registerCallback("asc_onShowSpecialPasteOptions",_.bind(this.onShowSpecialPasteOptions,this)),this.api.asc_registerCallback("asc_onHideSpecialPasteOptions",_.bind(this.onHideSpecialPasteOptions,this)),this.api.asc_registerCallback("asc_onToggleAutoCorrectOptions",_.bind(this.onToggleAutoCorrectOptions,this)),this.api.asc_registerCallback("asc_onFormulaInfo",_.bind(this.onFormulaInfo,this)),this.api.asc_registerCallback("asc_ChangeCropState",_.bind(this.onChangeCropState,this)),this.api.asc_registerCallback("asc_onInputMessage",_.bind(this.onInputMessage,this))),this},resetApi:function(t){this.api.asc_unregisterCallback("asc_onHideComment",this.wrapEvents.apiHideComment),this.api.asc_registerCallback("asc_onHideComment",this.wrapEvents.apiHideComment)},onCopyPaste:function(t){var e=this;if(e.api){if("cut"==t.value?e.api.asc_Cut():"copy"==t.value?e.api.asc_Copy():e.api.asc_Paste())Common.component.Analytics.trackEvent("ToolBar","Copy Warning");else{var i=Common.localStorage.getItem("sse-hide-copywarning");i&&1==parseInt(i)||new Common.Views.CopyWarningDialog({handler:function(t){t&&Common.localStorage.setItem("sse-hide-copywarning",1),Common.NotificationCenter.trigger("edit:complete",e.documentHolder)}}).show()}}Common.NotificationCenter.trigger("edit:complete",e.documentHolder)},onInsertEntire:function(t){if(this.api){switch(this.api.asc_getCellInfo().asc_getFlags().asc_getSelectionType()){case Asc.c_oAscSelectionType.RangeRow:this.api.asc_insertCells(Asc.c_oAscInsertOptions.InsertRows);break;case Asc.c_oAscSelectionType.RangeCol:this.api.asc_insertCells(Asc.c_oAscInsertOptions.InsertColumns)}Common.NotificationCenter.trigger("edit:complete",this.documentHolder),Common.component.Analytics.trackEvent("DocumentHolder","Insert Entire")}},onInsertCells:function(t,e){this.api&&(this.api.asc_insertCells(e.value),Common.NotificationCenter.trigger("edit:complete",this.documentHolder),Common.component.Analytics.trackEvent("DocumentHolder","Insert Cells"))},onDeleteEntire:function(t){if(this.api){switch(this.api.asc_getCellInfo().asc_getFlags().asc_getSelectionType()){case Asc.c_oAscSelectionType.RangeRow:this.api.asc_deleteCells(Asc.c_oAscDeleteOptions.DeleteRows);break;case Asc.c_oAscSelectionType.RangeCol:this.api.asc_deleteCells(Asc.c_oAscDeleteOptions.DeleteColumns)}Common.NotificationCenter.trigger("edit:complete",this.documentHolder),Common.component.Analytics.trackEvent("DocumentHolder","Delete Entire")}},onDeleteCells:function(t,e){this.api&&(this.api.asc_deleteCells(e.value),Common.NotificationCenter.trigger("edit:complete",this.documentHolder),Common.component.Analytics.trackEvent("DocumentHolder","Delete Cells"))},onSortCells:function(t,e){if(this.api){var i=this.api.asc_sortCellsRangeExpand();if(i){var n={width:500,title:this.txtSorting,msg:this.txtExpandSort,buttons:[{caption:this.txtExpand,primary:!0,value:"expand"},{caption:this.txtSortSelected,primary:!0,value:"sort"},"cancel"],callback:_.bind(function(t){"expand"!=t&&"sort"!=t||this.api.asc_sortColFilter(e.value,"",void 0,e.value==Asc.c_oAscSortOptions.ByColorFill?this.documentHolder.ssMenu.cellColor:this.documentHolder.ssMenu.fontColor,"expand"==t),Common.NotificationCenter.trigger("edit:complete",this.documentHolder),Common.component.Analytics.trackEvent("DocumentHolder","Sort Cells")},this)};Common.UI.alert(n)}else this.api.asc_sortColFilter(e.value,"",void 0,e.value==Asc.c_oAscSortOptions.ByColorFill?this.documentHolder.ssMenu.cellColor:this.documentHolder.ssMenu.fontColor,null!==i),Common.NotificationCenter.trigger("edit:complete",this.documentHolder),Common.component.Analytics.trackEvent("DocumentHolder","Sort Cells")}},onFilterCells:function(t,e){if(this.api){var i=new Asc.AutoFiltersOptions,n=new Asc.AutoFilterObj;if(e.value>0){n.asc_setFilter(new Asc.ColorFilter),n.asc_setType(Asc.c_oAscAutoFilterTypes.ColorFilter);var o=n.asc_getFilter();o.asc_setCellColor(1==e.value&&null),o.asc_setCColor(1==e.value?this.documentHolder.ssMenu.cellColor:this.documentHolder.ssMenu.fontColor)}else{n.asc_setFilter(new Asc.CustomFilters),n.asc_setType(Asc.c_oAscAutoFilterTypes.CustomFilters);var s=n.asc_getFilter();s.asc_setCustomFilters([new Asc.CustomFilter]),s.asc_setAnd(!0);s.asc_getCustomFilters()[0].asc_setOperator(Asc.c_oAscCustomAutoFilter.equals)}i.asc_setFilterObj(n),this.api.asc_applyAutoFilterByType(i),Common.NotificationCenter.trigger("edit:complete",this.documentHolder),Common.component.Analytics.trackEvent("DocumentHolder","Filter Cells")}},onReapply:function(){this.api.asc_reapplyAutoFilter(this.documentHolder.ssMenu.formatTableName)},onClear:function(t,e){this.api&&(this.api.asc_emptyCells(e.value),Common.NotificationCenter.trigger("edit:complete",this.documentHolder),Common.component.Analytics.trackEvent("DocumentHolder","Clear"))},onSelectTable:function(t,e){this.api&&this.documentHolder.ssMenu.formatTableName&&(this.api.asc_changeSelectionFormatTable(this.documentHolder.ssMenu.formatTableName,e.value),Common.NotificationCenter.trigger("edit:complete",this.documentHolder),Common.component.Analytics.trackEvent("DocumentHolder","Select Table"))},onInsertTable:function(t,e){this.api&&this.documentHolder.ssMenu.formatTableName&&(this.api.asc_insertCellsInTable(this.documentHolder.ssMenu.formatTableName,e.value),Common.NotificationCenter.trigger("edit:complete",this.documentHolder),Common.component.Analytics.trackEvent("DocumentHolder","Insert to Table"))},onDeleteTable:function(t,e){this.api&&this.documentHolder.ssMenu.formatTableName&&(this.api.asc_deleteCellsInTable(this.documentHolder.ssMenu.formatTableName,e.value),Common.NotificationCenter.trigger("edit:complete",this.documentHolder),Common.component.Analytics.trackEvent("DocumentHolder","Delete from Table"))},onInsFunction:function(t){var e=this.getApplication().getController("FormulaDialog");e&&this.api&&e.showDialog()},onInsHyperlink:function(t){var e,i,n=this;if(n.api){for(var o=n.api.asc_getWorksheetsCount(),s=-1,a=[];++s-1&&e.value<6?(this.api.asc_setSelectedDrawingObjectAlign(e.value),Common.NotificationCenter.trigger("edit:complete",this.documentHolder),Common.component.Analytics.trackEvent("DocumentHolder","Objects Align")):6==e.value?(this.api.asc_DistributeSelectedDrawingObjectHor(),Common.NotificationCenter.trigger("edit:complete",this.documentHolder),Common.component.Analytics.trackEvent("DocumentHolder","Distribute")):7==e.value&&(this.api.asc_DistributeSelectedDrawingObjectVer(),Common.NotificationCenter.trigger("edit:complete",this.documentHolder),Common.component.Analytics.trackEvent("DocumentHolder","Distribute")))},onParagraphVAlign:function(t,e){if(this.api){var i=new Asc.asc_CImgProperty;i.asc_putVerticalTextAlign(e.value),this.api.asc_setGraphicObjectProps(i),Common.NotificationCenter.trigger("edit:complete",this.documentHolder),Common.component.Analytics.trackEvent("DocumentHolder","Paragraph Vertical Align")}},onParagraphDirection:function(t,e){if(this.api){var i=new Asc.asc_CImgProperty;i.asc_putVert(e.options.direction),this.api.asc_setGraphicObjectProps(i),Common.NotificationCenter.trigger("edit:complete",this.documentHolder),Common.component.Analytics.trackEvent("DocumentHolder","Text Direction")}},onSelectNoneBullet:function(t,e){this.api&&-1==e.options.value&&(this.api.asc_setListType(e.options.value),Common.NotificationCenter.trigger("edit:complete",this.documentHolder),Common.component.Analytics.trackEvent("DocumentHolder","List Type"))},onSelectBullets:function(t,e,i,n){var o={};if(_.isFunction(i.toJSON)){if(!i.get("selected"))return;o=i.toJSON()}else o=i;this.api&&this.api.asc_setListType(o.type,o.subtype),"click"!==n.type&&this.documentHolder.textInShapeMenu.hide(),Common.NotificationCenter.trigger("edit:complete",this.documentHolder),Common.component.Analytics.trackEvent("DocumentHolder","List Type")},onRemoveHyperlinkShape:function(t){this.api&&(this.api.asc_removeHyperlink(),Common.NotificationCenter.trigger("edit:complete",this.documentHolder),Common.component.Analytics.trackEvent("DocumentHolder","Remove Hyperlink"))},onTextAdvanced:function(t){var e=this;new SSE.Views.ParagraphSettingsAdvanced({paragraphProps:t.textInfo,api:e.api,handler:function(t,i){"ok"==t&&e.api&&(e.api.asc_setGraphicObjectProps(i.paragraphProps),Common.component.Analytics.trackEvent("DocumentHolder","Apply advanced paragraph settings")),Common.NotificationCenter.trigger("edit:complete",e)}}).show()},onShapeAdvanced:function(t){var e=this;new SSE.Views.ShapeSettingsAdvanced({shapeProps:t.shapeInfo,api:e.api,handler:function(t,i){"ok"==t&&e.api&&(e.api.asc_setGraphicObjectProps(i.shapeProps),Common.component.Analytics.trackEvent("DocumentHolder","Apply advanced shape settings")),Common.NotificationCenter.trigger("edit:complete",e)}}).show()},onImgAdvanced:function(t){var e=this;new SSE.Views.ImageSettingsAdvanced({imageProps:t.imageInfo,api:e.api,handler:function(t,i){"ok"==t&&e.api&&(e.api.asc_setGraphicObjectProps(i.imageProps),Common.component.Analytics.trackEvent("DocumentHolder","Apply advanced image settings")),Common.NotificationCenter.trigger("edit:complete",e)}}).show()},onChartEdit:function(t){var e,i=this;i.api&&(e=i.api.asc_getChartObject())&&new SSE.Views.ChartSettingsDlg({chartSettings:e,imageSettings:t.chartInfo,isChart:!0,api:i.api,handler:function(t,e){"ok"==t&&i.api&&(i.api.asc_editChartDrawingObject(e.chartSettings),e.imageSettings&&i.api.asc_setGraphicObjectProps(e.imageSettings)),Common.NotificationCenter.trigger("edit:complete",i)}}).show()},onApiCoAuthoringDisconnect:function(){this.permissions.isEdit=!1},hideCoAuthTips:function(){this.tooltips.coauth.ref&&($(this.tooltips.coauth.ref).remove(),this.tooltips.coauth.ref=void 0,this.tooltips.coauth.x_point=void 0,this.tooltips.coauth.y_point=void 0)},hideHyperlinkTip:function(){!this.tooltips.hyperlink.isHidden&&this.tooltips.hyperlink.ref&&(this.tooltips.hyperlink.ref.hide(),this.tooltips.hyperlink.ref=void 0,this.tooltips.hyperlink.text="",this.tooltips.hyperlink.isHidden=!0)},onApiMouseMove:function(t){if(!this._isFullscreenMenu&&t.length){for(var e,i,n,o,s,a,l=t.length;l>0;l--)switch(t[l-1].asc_getType()){case Asc.c_oAscMouseMoveType.Hyperlink:e=l;break;case Asc.c_oAscMouseMoveType.Comment:i=l;break;case Asc.c_oAscMouseMoveType.LockedObject:n=l;break;case Asc.c_oAscMouseMoveType.ResizeColumn:o=l;break;case Asc.c_oAscMouseMoveType.ResizeRow:s=l;break;case Asc.c_oAscMouseMoveType.Filter:a=l}var r=this,c=[0,0],h=r.tooltips.coauth,d=r.tooltips.comment,p=r.tooltips.hyperlink,m=r.tooltips.row_column,u=r.tooltips.filter,g=[r.documentHolder.cmpEl.offset().left-$(window).scrollLeft(),r.documentHolder.cmpEl.offset().top-$(window).scrollTop()];if(e||r.hideHyperlinkTip(),void 0===o&&void 0===s&&!m.isHidden&&m.ref&&(m.ref.hide(),m.ref=void 0,m.text="",m.isHidden=!0),(r.permissions.isEdit||r.permissions.canViewComments)&&(!i||this.popupmenu)&&(d.moveCommentId=void 0,void 0!=d.viewCommentId)){d={};var b=this.getApplication().getController("Common.Controllers.Comments");b&&(this.permissions.canCoAuthoring&&this.permissions.canViewComments?setTimeout(function(){b.onApiHideComment(!0)},200):b.onApiHideComment(!0))}r.permissions.isEdit&&(n||r.hideCoAuthTips()),(void 0===a||r.dlgFilter&&r.dlgFilter.isVisible()||r.currentMenu&&r.currentMenu.isVisible())&&!u.isHidden&&u.ref&&(u.ref.hide(),u.ref=void 0,u.text="",u.isHidden=!0);if(e){p.parentEl||(p.parentEl=$('
'),r.documentHolder.cmpEl.append(p.parentEl));var f=t[e-1],C=f.asc_getHyperlink();if(C.asc_getType()==Asc.c_oAscHyperlinkType.WebLink){var v=C.asc_getTooltip();v=v?Common.Utils.String.htmlEncode(v)+"
"+r.textCtrlClick+"":C.asc_getHyperlinkUrl()+"
"+r.textCtrlClick+""}else v=C.asc_getTooltip()||C.asc_getLocation(),v+="
"+r.textCtrlClick+"";if(p.ref&&p.ref.isVisible()&&p.text!=v&&(p.ref.hide(),p.ref=void 0,p.text="",p.isHidden=!0),!p.ref||!p.ref.isVisible()){p.text=v,p.ref=new Common.UI.Tooltip({owner:p.parentEl,html:!0,title:v}),p.ref.show([-1e4,-1e4]),p.isHidden=!1,c=[f.asc_getX(),f.asc_getY()],c[0]+=g[0]+6,c[1]+=g[1]-20,c[1]-=p.ref.getBSTip().$tip.height();var _=p.ref.getBSTip().$tip.width();c[0]+_>r.tooltips.coauth.bodyWidth&&(c[0]=r.tooltips.coauth.bodyWidth-_),p.ref.getBSTip().$tip.css({top:c[1]+"px",left:c[0]+"px"})}}if(void 0!==o||void 0!==s){m.parentEl||(m.parentEl=$('
'),r.documentHolder.cmpEl.append(m.parentEl));var f=t[void 0!==o?o-1:s-1],y=Common.Utils.String.format(void 0!==o?this.textChangeColumnWidth:this.textChangeRowHeight,f.asc_getSizeCCOrPt().toFixed(2),f.asc_getSizePx().toFixed());if(m.ref&&m.ref.isVisible()&&m.text!=y&&(m.text=y,m.ref.setTitle(y),m.ref.updateTitle()),!m.ref||!m.ref.isVisible()){m.text=y,m.ref=new Common.UI.Tooltip({owner:m.parentEl,html:!0,title:y}),m.ref.show([-1e4,-1e4]),m.isHidden=!1,c=[f.asc_getX(),f.asc_getY()],c[0]+=g[0]+6,c[1]+=g[1]-20-m.ttHeight;var _=m.ref.getBSTip().$tip.width();c[0]+_>r.tooltips.coauth.bodyWidth&&(c[0]=r.tooltips.coauth.bodyWidth-_-20),m.ref.getBSTip().$tip.css({top:c[1]+"px",left:c[0]+"px"})}}if((r.permissions.isEdit||r.permissions.canViewComments)&&i&&!this.popupmenu&&(f=t[i-1],!d.editCommentId&&d.moveCommentId!=f.asc_getCommentIndexes()[0])){d.moveCommentId=f.asc_getCommentIndexes()[0],d.moveCommentTimer&&clearTimeout(d.moveCommentTimer);var x=f.asc_getCommentIndexes(),w=f.asc_getX(),S=f.asc_getY(),A=f.asc_getReverseX();d.moveCommentTimer=setTimeout(function(){if(d.moveCommentId&&!d.editCommentId){d.viewCommentId=d.moveCommentId;var t=r.getApplication().getController("Common.Controllers.Comments");t&&(t.isSelectedComment||t.onApiShowComment(x,w,S,A,!1,!0))}},400)}if(r.permissions.isEdit&&n&&(f=t[n-1],h.XY||r.onDocumentResize(),h.x_point!=f.asc_getX()||h.y_point!=f.asc_getY())){r.hideCoAuthTips(),h.x_point=f.asc_getX(),h.y_point=f.asc_getY();var k=$(document.createElement("div")),T=f.asc_getLockedObjectType()==Asc.c_oAscMouseMoveLockedObjectType.Sheet||f.asc_getLockedObjectType()==Asc.c_oAscMouseMoveLockedObjectType.TableProperties;h.ref=k,k.addClass("username-tip"),k.css({height:h.ttHeight+"px",position:"absolute",zIndex:"900",visibility:"visible"}),$(document.body).append(k),c=[T?h.x_point+h.rightMenuWidth:h.bodyWidth-(h.x_point+h.XY[0]),h.y_point+h.XY[1]],c[1]>=h.XY[1]&&c[1]+h.ttHeight
'),r.documentHolder.cmpEl.append(u.parentEl));var f=t[a-1],y=r.makeFilterTip(f.asc_getFilter());if(u.ref&&u.ref.isVisible()&&u.text!=y&&(u.text=y,u.ref.setTitle(y),u.ref.updateTitle()),!u.ref||!u.ref.isVisible()){u.text=y,u.ref=new Common.UI.Tooltip({owner:u.parentEl,html:!0,title:y,cls:"auto-tooltip"}),u.ref.show([-1e4,-1e4]),u.isHidden=!1,c=[f.asc_getX()+g[0]-10,f.asc_getY()+g[1]+20];u.ref.getBSTip().$tip.width();c[1]+u.ttHeight>r.tooltips.coauth.bodyHeight&&(c[1]=r.tooltips.coauth.bodyHeight-u.ttHeight-5,c[0]+=20);var _=u.ref.getBSTip().$tip.width();c[0]+_>r.tooltips.coauth.bodyWidth&&(c[0]=r.tooltips.coauth.bodyWidth-_-20),u.ref.getBSTip().$tip.css({top:c[1]+"px",left:c[0]+"px"})}}}},onApiHideComment:function(){this.tooltips.comment.viewCommentId=this.tooltips.comment.editCommentId=this.tooltips.comment.moveCommentId=void 0},onApiHyperlinkClick:function(t){if(!t)return void Common.UI.alert({msg:this.errorInvalidLink,title:this.notcriticalErrorTitle,iconCls:"warn",buttons:["ok"],callback:_.bind(function(t){Common.NotificationCenter.trigger("edit:complete",this.documentHolder)},this)});if(this.api.asc_getUrlType(t)>0){return void window.parent.APP.openURL(t)}},onApiAutofilter:function(t){var e=this;if(!e.tooltips.filter.isHidden&&e.tooltips.filter.ref&&(e.tooltips.filter.ref.hide(),e.tooltips.filter.ref=void 0,e.tooltips.filter.text="",e.tooltips.filter.isHidden=!0),e.permissions.isEdit&&!e.dlgFilter){e.dlgFilter=new SSE.Views.AutoFilterDialog({api:this.api}).on({close:function(){e.api&&e.api.asc_enableKeyEvents(!0),e.dlgFilter=void 0}}),e.api&&e.api.asc_enableKeyEvents(!1),Common.UI.Menu.Manager.hideAll(),e.dlgFilter.setSettings(t);var i=e.documentHolder.cmpEl.offset(),n=t.asc_getCellCoord(),o=n.asc_getX()+n.asc_getWidth()+i.left,s=n.asc_getY()+n.asc_getHeight()+i.top,a=Common.Utils.innerWidth(),l=Common.Utils.innerHeight();o+e.dlgFilter.options.width>a&&(o=a-e.dlgFilter.options.width-5),s+e.dlgFilter.options.height>l&&(s=l-e.dlgFilter.options.height-5),e.dlgFilter.show(o,s)}},makeFilterTip:function(t){var e=t.asc_getFilterObj(),i=e.asc_getType(),n=(t.asc_getIsTextFilter(),t.asc_getColorsFill(),t.asc_getColorsFont(),"");if(i===Asc.c_oAscAutoFilterTypes.CustomFilters){var o=e.asc_getFilter(),s=o.asc_getCustomFilters();n=this.getFilterName(Asc.c_oAscAutoFilterTypes.CustomFilters,s[0].asc_getOperator())+' "'+s[0].asc_getVal()+'"',s.length>1&&(n=n+" "+(o.asc_getAnd()?this.txtAnd:this.txtOr),n=n+" "+this.getFilterName(Asc.c_oAscAutoFilterTypes.CustomFilters,s[1].asc_getOperator())+' "'+s[1].asc_getVal()+'"')}else if(i===Asc.c_oAscAutoFilterTypes.ColorFilter){var a=e.asc_getFilter();null===a.asc_getCellColor()?n=this.txtEqualsToCellColor:!1===a.asc_getCellColor()&&(n=this.txtEqualsToFontColor)}else if(i===Asc.c_oAscAutoFilterTypes.DynamicFilter)n=this.getFilterName(Asc.c_oAscAutoFilterTypes.DynamicFilter,e.asc_getFilter().asc_getType());else if(i===Asc.c_oAscAutoFilterTypes.Top10){var l=e.asc_getFilter(),r=l.asc_getPercent();n=this.getFilterName(Asc.c_oAscAutoFilterTypes.Top10,l.asc_getTop()),n+=" "+l.asc_getVal()+" "+(r||null===r?this.txtPercent:this.txtItems)}else if(i===Asc.c_oAscAutoFilterTypes.Filters){var c=0,h=0,d=void 0,p=t.asc_getValues();p.forEach(function(t){t.asc_getVisible()&&(h++,c<100&&t.asc_getText()&&(n+=t.asc_getText()+"; ",c=n.length)),t.asc_getText()||(d=t.asc_getVisible())}),h==p.length?n=this.txtAll:1==h&&d?n=this.txtEquals+' "'+this.txtBlanks+'"':h==p.length-1&&0==d?n=this.txtNotEquals+' "'+this.txtBlanks+'"':(d&&(n+=this.txtBlanks+"; "),n=this.txtEquals+' "'+n.substring(0,n.length-2)+'"')}else i===Asc.c_oAscAutoFilterTypes.None&&(n=this.txtAll);return n.length>100&&(n=n.substring(0,100)+"..."),n=""+(t.asc_getColumnName()||"("+this.txtColumn+" "+t.asc_getSheetColumnName()+")")+":
"+n},getFilterName:function(t,e){var i="";if(t==Asc.c_oAscAutoFilterTypes.CustomFilters)switch(e){case Asc.c_oAscCustomAutoFilter.equals:i=this.txtEquals;break;case Asc.c_oAscCustomAutoFilter.isGreaterThan:i=this.txtGreater;break;case Asc.c_oAscCustomAutoFilter.isGreaterThanOrEqualTo:i=this.txtGreaterEquals;break;case Asc.c_oAscCustomAutoFilter.isLessThan:i=this.txtLess;break;case Asc.c_oAscCustomAutoFilter.isLessThanOrEqualTo:i=this.txtLessEquals;break;case Asc.c_oAscCustomAutoFilter.doesNotEqual:i=this.txtNotEquals;break;case Asc.c_oAscCustomAutoFilter.beginsWith:i=this.txtBegins;break;case Asc.c_oAscCustomAutoFilter.doesNotBeginWith:i=this.txtNotBegins;break;case Asc.c_oAscCustomAutoFilter.endsWith:i=this.txtEnds;break;case Asc.c_oAscCustomAutoFilter.doesNotEndWith:i=this.txtNotEnds;break;case Asc.c_oAscCustomAutoFilter.contains:i=this.txtContains;break;case Asc.c_oAscCustomAutoFilter.doesNotContain:i=this.txtNotContains}else if(t==Asc.c_oAscAutoFilterTypes.DynamicFilter)switch(e){case Asc.c_oAscDynamicAutoFilter.aboveAverage:i=this.txtAboveAve;break;case Asc.c_oAscDynamicAutoFilter.belowAverage:i=this.txtBelowAve}else t==Asc.c_oAscAutoFilterTypes.Top10&&(i=e||null===e?this.txtFilterTop:this.txtFilterBottom);return i},onUndo:function(){this.api&&(this.api.asc_Undo(),Common.NotificationCenter.trigger("edit:complete",this.documentHolder))},onApiContextMenu:function(t){var e=this;_.delay(function(){e.showObjectMenu.call(e,t)},10)},onAfterRender:function(t){},onDocumentResize:function(t){var e=this;e.documentHolder&&(e.tooltips.coauth.XY=[e.documentHolder.cmpEl.offset().left-$(window).scrollLeft(),e.documentHolder.cmpEl.offset().top-$(window).scrollTop()],e.tooltips.coauth.apiHeight=e.documentHolder.cmpEl.height(),e.tooltips.coauth.rightMenuWidth=$("#right-menu").width(),e.tooltips.coauth.bodyWidth=$(window).width(),e.tooltips.coauth.bodyHeight=$(window).height())},onDocumentWheel:function(t){if(this.api&&!this.isEditCell){var e=_.isUndefined(t.originalEvent)?t.wheelDelta:t.originalEvent.wheelDelta;if(_.isUndefined(e)&&(e=t.deltaY),(t.ctrlKey||t.metaKey)&&!t.altKey){var i=this.api.asc_getZoom();e<0?(i=Math.ceil(10*i)/10,(i-=.1)<.5||this.api.asc_setZoom(i)):e>0&&(i=Math.floor(10*i)/10,(i+=.1)>0&&!(i>2)&&this.api.asc_setZoom(i)),t.preventDefault(),t.stopPropagation()}}},onDocumentKeyDown:function(t){if(this.api){var e=t.keyCode;if(!t.ctrlKey&&!t.metaKey||t.shiftKey||t.altKey){if(e==Common.UI.Keys.F10&&t.shiftKey)return this.showObjectMenu(t),t.preventDefault(),t.stopPropagation(),!1}else if(e===Common.UI.Keys.NUM_PLUS||e===Common.UI.Keys.EQUALITY||Common.Utils.isGecko&&e===Common.UI.Keys.EQUALITY_FF||Common.Utils.isOpera&&43==e){if(!this.api.isCellEdited){var i=Math.floor(10*this.api.asc_getZoom())/10;return i+=.1,i>0&&!(i>2)&&this.api.asc_setZoom(i),t.preventDefault(),t.stopPropagation(),!1}}else if((e===Common.UI.Keys.NUM_MINUS||e===Common.UI.Keys.MINUS||Common.Utils.isGecko&&e===Common.UI.Keys.MINUS_FF||Common.Utils.isOpera&&45==e)&&!this.api.isCellEdited)return i=Math.ceil(10*this.api.asc_getZoom())/10,i-=.1,i<.5||this.api.asc_setZoom(i),t.preventDefault(),t.stopPropagation(),!1}},onDocumentRightDown:function(t){0==t.button&&(this.mouse.isLeftButtonDown=!0)},onDocumentRightUp:function(t){0==t.button&&(this.mouse.isLeftButtonDown=!1)},onProcessMouse:function(t){"mouseup"==t.type&&(this.mouse.isLeftButtonDown=!1)},onDocumentMouseMove:function(t){"canvas"!==t.target.localName&&this.hideHyperlinkTip()},showObjectMenu:function(t){!this.api||this.mouse.isLeftButtonDown||this.rangeSelectionMode||(this.permissions.isEdit&&!this._isDisabled?this.fillMenuProps(this.api.asc_getCellInfo(),!0,t):this.fillViewMenuProps(this.api.asc_getCellInfo(),!0,t))},onSelectionChanged:function(t){!this.mouse.isLeftButtonDown&&!this.rangeSelectionMode&&this.currentMenu&&this.currentMenu.isVisible()&&(this.permissions.isEdit&&!this._isDisabled?this.fillMenuProps(t,!0):this.fillViewMenuProps(t,!0))},fillMenuProps:function(t,e,i){var n,o,s,a,l,r,c,h,d,p,m=this.documentHolder,u=t.asc_getFlags().asc_getSelectionType(),g=t.asc_getLocked(),b=!0===t.asc_getLockedTable(),f=!1,C=this.getApplication().getController("Common.Controllers.Comments"),v=this.permissions.isEditMailMerge||this.permissions.isEditDiagram;switch(u){case Asc.c_oAscSelectionType.RangeCells:n=!0;break;case Asc.c_oAscSelectionType.RangeRow:o=!0;break;case Asc.c_oAscSelectionType.RangeCol:s=!0;break;case Asc.c_oAscSelectionType.RangeMax:a=!0;break;case Asc.c_oAscSelectionType.RangeImage:r=!v;break;case Asc.c_oAscSelectionType.RangeShape:h=!v;break;case Asc.c_oAscSelectionType.RangeChart:l=!v;break;case Asc.c_oAscSelectionType.RangeChartText:d=!v;break;case Asc.c_oAscSelectionType.RangeShapeText:c=!v}if(this.api.asc_getHeaderFooterMode()){if(!m.copyPasteMenu||!e&&!m.copyPasteMenu.isVisible())return;e&&this.showPopupMenu(m.copyPasteMenu,{},i)}else if(r||h||l){if(!m.imgMenu||!e&&!m.imgMenu.isVisible())return;r=h=l=!1,m.mnuImgAdvanced.imageInfo=void 0;for(var y,x=!1,w=this.api.asc_getGraphicObjectProps(),S=0;S-1&&e.value<6?(this.api.asc_setSelectedDrawingObjectAlign(e.value),Common.NotificationCenter.trigger("edit:complete",this.documentHolder),Common.component.Analytics.trackEvent("DocumentHolder","Objects Align")):6==e.value?(this.api.asc_DistributeSelectedDrawingObjectHor(),Common.NotificationCenter.trigger("edit:complete",this.documentHolder),Common.component.Analytics.trackEvent("DocumentHolder","Distribute")):7==e.value&&(this.api.asc_DistributeSelectedDrawingObjectVer(),Common.NotificationCenter.trigger("edit:complete",this.documentHolder),Common.component.Analytics.trackEvent("DocumentHolder","Distribute")))},onParagraphVAlign:function(t,e){if(this.api){var i=new Asc.asc_CImgProperty;i.asc_putVerticalTextAlign(e.value),this.api.asc_setGraphicObjectProps(i),Common.NotificationCenter.trigger("edit:complete",this.documentHolder),Common.component.Analytics.trackEvent("DocumentHolder","Paragraph Vertical Align")}},onParagraphDirection:function(t,e){if(this.api){var i=new Asc.asc_CImgProperty;i.asc_putVert(e.options.direction),this.api.asc_setGraphicObjectProps(i),Common.NotificationCenter.trigger("edit:complete",this.documentHolder),Common.component.Analytics.trackEvent("DocumentHolder","Text Direction")}},onSelectNoneBullet:function(t,e){this.api&&-1==e.options.value&&(this.api.asc_setListType(e.options.value),Common.NotificationCenter.trigger("edit:complete",this.documentHolder),Common.component.Analytics.trackEvent("DocumentHolder","List Type"))},onSelectBullets:function(t,e,i,n){var o={};if(_.isFunction(i.toJSON)){if(!i.get("selected"))return;o=i.toJSON()}else o=i;this.api&&this.api.asc_setListType(o.type,o.subtype),"click"!==n.type&&this.documentHolder.textInShapeMenu.hide(),Common.NotificationCenter.trigger("edit:complete",this.documentHolder),Common.component.Analytics.trackEvent("DocumentHolder","List Type")},onRemoveHyperlinkShape:function(t){this.api&&(this.api.asc_removeHyperlink(),Common.NotificationCenter.trigger("edit:complete",this.documentHolder),Common.component.Analytics.trackEvent("DocumentHolder","Remove Hyperlink"))},onTextAdvanced:function(t){var e=this;new SSE.Views.ParagraphSettingsAdvanced({paragraphProps:t.textInfo,api:e.api,handler:function(t,i){"ok"==t&&e.api&&(e.api.asc_setGraphicObjectProps(i.paragraphProps),Common.component.Analytics.trackEvent("DocumentHolder","Apply advanced paragraph settings")),Common.NotificationCenter.trigger("edit:complete",e)}}).show()},onShapeAdvanced:function(t){var e=this;new SSE.Views.ShapeSettingsAdvanced({shapeProps:t.shapeInfo,api:e.api,handler:function(t,i){"ok"==t&&e.api&&(e.api.asc_setGraphicObjectProps(i.shapeProps),Common.component.Analytics.trackEvent("DocumentHolder","Apply advanced shape settings")),Common.NotificationCenter.trigger("edit:complete",e)}}).show()},onImgAdvanced:function(t){var e=this;new SSE.Views.ImageSettingsAdvanced({imageProps:t.imageInfo,api:e.api,handler:function(t,i){"ok"==t&&e.api&&(e.api.asc_setGraphicObjectProps(i.imageProps),Common.component.Analytics.trackEvent("DocumentHolder","Apply advanced image settings")),Common.NotificationCenter.trigger("edit:complete",e)}}).show()},onChartEdit:function(t){var e,i=this;i.api&&(e=i.api.asc_getChartObject())&&new SSE.Views.ChartSettingsDlg({chartSettings:e,imageSettings:t.chartInfo,isChart:!0,api:i.api,handler:function(t,e){"ok"==t&&i.api&&(i.api.asc_editChartDrawingObject(e.chartSettings),e.imageSettings&&i.api.asc_setGraphicObjectProps(e.imageSettings)),Common.NotificationCenter.trigger("edit:complete",i)}}).show()},onApiCoAuthoringDisconnect:function(){this.permissions.isEdit=!1},hideCoAuthTips:function(){this.tooltips.coauth.ref&&($(this.tooltips.coauth.ref).remove(),this.tooltips.coauth.ref=void 0,this.tooltips.coauth.x_point=void 0,this.tooltips.coauth.y_point=void 0)},hideHyperlinkTip:function(){!this.tooltips.hyperlink.isHidden&&this.tooltips.hyperlink.ref&&(this.tooltips.hyperlink.ref.hide(),this.tooltips.hyperlink.ref=void 0,this.tooltips.hyperlink.text="",this.tooltips.hyperlink.isHidden=!0)},onApiMouseMove:function(t){if(!this._isFullscreenMenu&&t.length){for(var e,i,n,o,s,a,l=t.length;l>0;l--)switch(t[l-1].asc_getType()){case Asc.c_oAscMouseMoveType.Hyperlink:e=l;break;case Asc.c_oAscMouseMoveType.Comment:i=l;break;case Asc.c_oAscMouseMoveType.LockedObject:n=l;break;case Asc.c_oAscMouseMoveType.ResizeColumn:o=l;break;case Asc.c_oAscMouseMoveType.ResizeRow:s=l;break;case Asc.c_oAscMouseMoveType.Filter:a=l}var r=this,c=[0,0],h=r.tooltips.coauth,d=r.tooltips.comment,p=r.tooltips.hyperlink,m=r.tooltips.row_column,u=r.tooltips.filter,g=[r.documentHolder.cmpEl.offset().left-$(window).scrollLeft(),r.documentHolder.cmpEl.offset().top-$(window).scrollTop()];if(e||r.hideHyperlinkTip(),void 0===o&&void 0===s&&!m.isHidden&&m.ref&&(m.ref.hide(),m.ref=void 0,m.text="",m.isHidden=!0),(r.permissions.isEdit||r.permissions.canViewComments)&&(!i||this.popupmenu)&&(d.moveCommentId=void 0,void 0!=d.viewCommentId)){d={};var b=this.getApplication().getController("Common.Controllers.Comments");b&&(this.permissions.canCoAuthoring&&this.permissions.canViewComments?setTimeout(function(){b.onApiHideComment(!0)},200):b.onApiHideComment(!0))}r.permissions.isEdit&&(n||r.hideCoAuthTips()),(void 0===a||r.dlgFilter&&r.dlgFilter.isVisible()||r.currentMenu&&r.currentMenu.isVisible())&&!u.isHidden&&u.ref&&(u.ref.hide(),u.ref=void 0,u.text="",u.isHidden=!0);if(e){p.parentEl||(p.parentEl=$('
'),r.documentHolder.cmpEl.append(p.parentEl));var f=t[e-1],C=f.asc_getHyperlink();if(C.asc_getType()==Asc.c_oAscHyperlinkType.WebLink){var v=C.asc_getTooltip();v=v?Common.Utils.String.htmlEncode(v)+"
"+r.textCtrlClick+"":C.asc_getHyperlinkUrl()+"
"+r.textCtrlClick+""}else v=C.asc_getTooltip()||C.asc_getLocation(),v+="
"+r.textCtrlClick+"";if(p.ref&&p.ref.isVisible()&&p.text!=v&&(p.ref.hide(),p.ref=void 0,p.text="",p.isHidden=!0),!p.ref||!p.ref.isVisible()){p.text=v,p.ref=new Common.UI.Tooltip({owner:p.parentEl,html:!0,title:v}),p.ref.show([-1e4,-1e4]),p.isHidden=!1,c=[f.asc_getX(),f.asc_getY()],c[0]+=g[0]+6,c[1]+=g[1]-20,c[1]-=p.ref.getBSTip().$tip.height();var _=p.ref.getBSTip().$tip.width();c[0]+_>r.tooltips.coauth.bodyWidth&&(c[0]=r.tooltips.coauth.bodyWidth-_),p.ref.getBSTip().$tip.css({top:c[1]+"px",left:c[0]+"px"})}}if(void 0!==o||void 0!==s){m.parentEl||(m.parentEl=$('
'),r.documentHolder.cmpEl.append(m.parentEl));var f=t[void 0!==o?o-1:s-1],y=Common.Utils.String.format(void 0!==o?this.textChangeColumnWidth:this.textChangeRowHeight,f.asc_getSizeCCOrPt().toFixed(2),f.asc_getSizePx().toFixed());if(m.ref&&m.ref.isVisible()&&m.text!=y&&(m.text=y,m.ref.setTitle(y),m.ref.updateTitle()),!m.ref||!m.ref.isVisible()){m.text=y,m.ref=new Common.UI.Tooltip({owner:m.parentEl,html:!0,title:y}),m.ref.show([-1e4,-1e4]),m.isHidden=!1,c=[f.asc_getX(),f.asc_getY()],c[0]+=g[0]+6,c[1]+=g[1]-20-m.ttHeight;var _=m.ref.getBSTip().$tip.width();c[0]+_>r.tooltips.coauth.bodyWidth&&(c[0]=r.tooltips.coauth.bodyWidth-_-20),m.ref.getBSTip().$tip.css({top:c[1]+"px",left:c[0]+"px"})}}if((r.permissions.isEdit||r.permissions.canViewComments)&&i&&!this.popupmenu&&(f=t[i-1],!d.editCommentId&&d.moveCommentId!=f.asc_getCommentIndexes()[0])){d.moveCommentId=f.asc_getCommentIndexes()[0],d.moveCommentTimer&&clearTimeout(d.moveCommentTimer);var x=f.asc_getCommentIndexes(),w=f.asc_getX(),S=f.asc_getY(),A=f.asc_getReverseX();d.moveCommentTimer=setTimeout(function(){if(d.moveCommentId&&!d.editCommentId){d.viewCommentId=d.moveCommentId;var t=r.getApplication().getController("Common.Controllers.Comments");t&&(t.isSelectedComment||t.onApiShowComment(x,w,S,A,!1,!0))}},400)}if(r.permissions.isEdit&&n&&(f=t[n-1],h.XY||r.onDocumentResize(),h.x_point!=f.asc_getX()||h.y_point!=f.asc_getY())){r.hideCoAuthTips(),h.x_point=f.asc_getX(),h.y_point=f.asc_getY();var k=$(document.createElement("div")),T=f.asc_getLockedObjectType()==Asc.c_oAscMouseMoveLockedObjectType.Sheet||f.asc_getLockedObjectType()==Asc.c_oAscMouseMoveLockedObjectType.TableProperties;h.ref=k,k.addClass("username-tip"),k.css({height:h.ttHeight+"px",position:"absolute",zIndex:"900",visibility:"visible"}),$(document.body).append(k),c=[T?h.x_point+h.rightMenuWidth:h.bodyWidth-(h.x_point+h.XY[0]),h.y_point+h.XY[1]],c[1]>=h.XY[1]&&c[1]+h.ttHeight
'),r.documentHolder.cmpEl.append(u.parentEl));var f=t[a-1],y=r.makeFilterTip(f.asc_getFilter());if(u.ref&&u.ref.isVisible()&&u.text!=y&&(u.text=y,u.ref.setTitle(y),u.ref.updateTitle()),!u.ref||!u.ref.isVisible()){u.text=y,u.ref=new Common.UI.Tooltip({owner:u.parentEl,html:!0,title:y,cls:"auto-tooltip"}),u.ref.show([-1e4,-1e4]),u.isHidden=!1,c=[f.asc_getX()+g[0]-10,f.asc_getY()+g[1]+20];u.ref.getBSTip().$tip.width();c[1]+u.ttHeight>r.tooltips.coauth.bodyHeight&&(c[1]=r.tooltips.coauth.bodyHeight-u.ttHeight-5,c[0]+=20);var _=u.ref.getBSTip().$tip.width();c[0]+_>r.tooltips.coauth.bodyWidth&&(c[0]=r.tooltips.coauth.bodyWidth-_-20),u.ref.getBSTip().$tip.css({top:c[1]+"px",left:c[0]+"px"})}}}},onApiHideComment:function(){this.tooltips.comment.viewCommentId=this.tooltips.comment.editCommentId=this.tooltips.comment.moveCommentId=void 0},onApiHyperlinkClick:function(t){if(!t)return void Common.UI.alert({msg:this.errorInvalidLink,title:this.notcriticalErrorTitle,iconCls:"warn",buttons:["ok"],callback:_.bind(function(t){Common.NotificationCenter.trigger("edit:complete",this.documentHolder)},this)});if(this.api.asc_getUrlType(t)>0)try{window.parent.APP.openURL(t)}catch(i){console.error(i);var e=window.open(t,"_blank");e&&e.focus()}},onApiAutofilter:function(t){var e=this;if(!e.tooltips.filter.isHidden&&e.tooltips.filter.ref&&(e.tooltips.filter.ref.hide(),e.tooltips.filter.ref=void 0,e.tooltips.filter.text="",e.tooltips.filter.isHidden=!0),e.permissions.isEdit&&!e.dlgFilter){e.dlgFilter=new SSE.Views.AutoFilterDialog({api:this.api}).on({close:function(){e.api&&e.api.asc_enableKeyEvents(!0),e.dlgFilter=void 0}}),e.api&&e.api.asc_enableKeyEvents(!1),Common.UI.Menu.Manager.hideAll(),e.dlgFilter.setSettings(t);var i=e.documentHolder.cmpEl.offset(),n=t.asc_getCellCoord(),o=n.asc_getX()+n.asc_getWidth()+i.left,s=n.asc_getY()+n.asc_getHeight()+i.top,a=Common.Utils.innerWidth(),l=Common.Utils.innerHeight();o+e.dlgFilter.options.width>a&&(o=a-e.dlgFilter.options.width-5),s+e.dlgFilter.options.height>l&&(s=l-e.dlgFilter.options.height-5),e.dlgFilter.show(o,s)}},makeFilterTip:function(t){var e=t.asc_getFilterObj(),i=e.asc_getType(),n=(t.asc_getIsTextFilter(),t.asc_getColorsFill(),t.asc_getColorsFont(),"");if(i===Asc.c_oAscAutoFilterTypes.CustomFilters){var o=e.asc_getFilter(),s=o.asc_getCustomFilters();n=this.getFilterName(Asc.c_oAscAutoFilterTypes.CustomFilters,s[0].asc_getOperator())+' "'+s[0].asc_getVal()+'"',s.length>1&&(n=n+" "+(o.asc_getAnd()?this.txtAnd:this.txtOr),n=n+" "+this.getFilterName(Asc.c_oAscAutoFilterTypes.CustomFilters,s[1].asc_getOperator())+' "'+s[1].asc_getVal()+'"')}else if(i===Asc.c_oAscAutoFilterTypes.ColorFilter){var a=e.asc_getFilter();null===a.asc_getCellColor()?n=this.txtEqualsToCellColor:!1===a.asc_getCellColor()&&(n=this.txtEqualsToFontColor)}else if(i===Asc.c_oAscAutoFilterTypes.DynamicFilter)n=this.getFilterName(Asc.c_oAscAutoFilterTypes.DynamicFilter,e.asc_getFilter().asc_getType());else if(i===Asc.c_oAscAutoFilterTypes.Top10){var l=e.asc_getFilter(),r=l.asc_getPercent();n=this.getFilterName(Asc.c_oAscAutoFilterTypes.Top10,l.asc_getTop()),n+=" "+l.asc_getVal()+" "+(r||null===r?this.txtPercent:this.txtItems)}else if(i===Asc.c_oAscAutoFilterTypes.Filters){var c=0,h=0,d=void 0,p=t.asc_getValues();p.forEach(function(t){t.asc_getVisible()&&(h++,c<100&&t.asc_getText()&&(n+=t.asc_getText()+"; ",c=n.length)),t.asc_getText()||(d=t.asc_getVisible())}),h==p.length?n=this.txtAll:1==h&&d?n=this.txtEquals+' "'+this.txtBlanks+'"':h==p.length-1&&0==d?n=this.txtNotEquals+' "'+this.txtBlanks+'"':(d&&(n+=this.txtBlanks+"; "),n=this.txtEquals+' "'+n.substring(0,n.length-2)+'"')}else i===Asc.c_oAscAutoFilterTypes.None&&(n=this.txtAll);return n.length>100&&(n=n.substring(0,100)+"..."),n=""+(t.asc_getColumnName()||"("+this.txtColumn+" "+t.asc_getSheetColumnName()+")")+":
"+n},getFilterName:function(t,e){var i="";if(t==Asc.c_oAscAutoFilterTypes.CustomFilters)switch(e){case Asc.c_oAscCustomAutoFilter.equals:i=this.txtEquals;break;case Asc.c_oAscCustomAutoFilter.isGreaterThan:i=this.txtGreater;break;case Asc.c_oAscCustomAutoFilter.isGreaterThanOrEqualTo:i=this.txtGreaterEquals;break;case Asc.c_oAscCustomAutoFilter.isLessThan:i=this.txtLess;break;case Asc.c_oAscCustomAutoFilter.isLessThanOrEqualTo:i=this.txtLessEquals;break;case Asc.c_oAscCustomAutoFilter.doesNotEqual:i=this.txtNotEquals;break;case Asc.c_oAscCustomAutoFilter.beginsWith:i=this.txtBegins;break;case Asc.c_oAscCustomAutoFilter.doesNotBeginWith:i=this.txtNotBegins;break;case Asc.c_oAscCustomAutoFilter.endsWith:i=this.txtEnds;break;case Asc.c_oAscCustomAutoFilter.doesNotEndWith:i=this.txtNotEnds;break;case Asc.c_oAscCustomAutoFilter.contains:i=this.txtContains;break;case Asc.c_oAscCustomAutoFilter.doesNotContain:i=this.txtNotContains}else if(t==Asc.c_oAscAutoFilterTypes.DynamicFilter)switch(e){case Asc.c_oAscDynamicAutoFilter.aboveAverage:i=this.txtAboveAve;break;case Asc.c_oAscDynamicAutoFilter.belowAverage:i=this.txtBelowAve}else t==Asc.c_oAscAutoFilterTypes.Top10&&(i=e||null===e?this.txtFilterTop:this.txtFilterBottom);return i},onUndo:function(){this.api&&(this.api.asc_Undo(),Common.NotificationCenter.trigger("edit:complete",this.documentHolder))},onApiContextMenu:function(t){var e=this;_.delay(function(){e.showObjectMenu.call(e,t)},10)},onAfterRender:function(t){},onDocumentResize:function(t){var e=this;e.documentHolder&&(e.tooltips.coauth.XY=[e.documentHolder.cmpEl.offset().left-$(window).scrollLeft(),e.documentHolder.cmpEl.offset().top-$(window).scrollTop()],e.tooltips.coauth.apiHeight=e.documentHolder.cmpEl.height(),e.tooltips.coauth.rightMenuWidth=$("#right-menu").width(),e.tooltips.coauth.bodyWidth=$(window).width(),e.tooltips.coauth.bodyHeight=$(window).height())},onDocumentWheel:function(t){if(this.api&&!this.isEditCell){var e=_.isUndefined(t.originalEvent)?t.wheelDelta:t.originalEvent.wheelDelta;if(_.isUndefined(e)&&(e=t.deltaY),(t.ctrlKey||t.metaKey)&&!t.altKey){var i=this.api.asc_getZoom();e<0?(i=Math.ceil(10*i)/10,(i-=.1)<.5||this.api.asc_setZoom(i)):e>0&&(i=Math.floor(10*i)/10,(i+=.1)>0&&!(i>2)&&this.api.asc_setZoom(i)),t.preventDefault(),t.stopPropagation()}}},onDocumentKeyDown:function(t){if(this.api){var e=t.keyCode;if(!t.ctrlKey&&!t.metaKey||t.shiftKey||t.altKey){if(e==Common.UI.Keys.F10&&t.shiftKey)return this.showObjectMenu(t),t.preventDefault(),t.stopPropagation(),!1}else if(e===Common.UI.Keys.NUM_PLUS||e===Common.UI.Keys.EQUALITY||Common.Utils.isGecko&&e===Common.UI.Keys.EQUALITY_FF||Common.Utils.isOpera&&43==e){if(!this.api.isCellEdited){var i=Math.floor(10*this.api.asc_getZoom())/10;return i+=.1,i>0&&!(i>2)&&this.api.asc_setZoom(i),t.preventDefault(),t.stopPropagation(),!1}}else if((e===Common.UI.Keys.NUM_MINUS||e===Common.UI.Keys.MINUS||Common.Utils.isGecko&&e===Common.UI.Keys.MINUS_FF||Common.Utils.isOpera&&45==e)&&!this.api.isCellEdited)return i=Math.ceil(10*this.api.asc_getZoom())/10,i-=.1,i<.5||this.api.asc_setZoom(i),t.preventDefault(),t.stopPropagation(),!1}},onDocumentRightDown:function(t){0==t.button&&(this.mouse.isLeftButtonDown=!0)},onDocumentRightUp:function(t){0==t.button&&(this.mouse.isLeftButtonDown=!1)},onProcessMouse:function(t){"mouseup"==t.type&&(this.mouse.isLeftButtonDown=!1)},onDocumentMouseMove:function(t){"canvas"!==t.target.localName&&this.hideHyperlinkTip()},showObjectMenu:function(t){!this.api||this.mouse.isLeftButtonDown||this.rangeSelectionMode||(this.permissions.isEdit&&!this._isDisabled?this.fillMenuProps(this.api.asc_getCellInfo(),!0,t):this.fillViewMenuProps(this.api.asc_getCellInfo(),!0,t))},onSelectionChanged:function(t){!this.mouse.isLeftButtonDown&&!this.rangeSelectionMode&&this.currentMenu&&this.currentMenu.isVisible()&&(this.permissions.isEdit&&!this._isDisabled?this.fillMenuProps(t,!0):this.fillViewMenuProps(t,!0))},fillMenuProps:function(t,e,i){var n,o,s,a,l,r,c,h,d,p,m=this.documentHolder,u=t.asc_getFlags().asc_getSelectionType(),g=t.asc_getLocked(),b=!0===t.asc_getLockedTable(),f=!1,C=this.getApplication().getController("Common.Controllers.Comments"),v=this.permissions.isEditMailMerge||this.permissions.isEditDiagram;switch(u){case Asc.c_oAscSelectionType.RangeCells:n=!0;break;case Asc.c_oAscSelectionType.RangeRow:o=!0;break;case Asc.c_oAscSelectionType.RangeCol:s=!0;break;case Asc.c_oAscSelectionType.RangeMax:a=!0;break;case Asc.c_oAscSelectionType.RangeImage:r=!v;break;case Asc.c_oAscSelectionType.RangeShape:h=!v;break;case Asc.c_oAscSelectionType.RangeChart:l=!v;break;case Asc.c_oAscSelectionType.RangeChartText:d=!v;break;case Asc.c_oAscSelectionType.RangeShapeText:c=!v}if(this.api.asc_getHeaderFooterMode()){if(!m.copyPasteMenu||!e&&!m.copyPasteMenu.isVisible())return;e&&this.showPopupMenu(m.copyPasteMenu,{},i)}else if(r||h||l){if(!m.imgMenu||!e&&!m.imgMenu.isVisible())return;r=h=l=!1,m.mnuImgAdvanced.imageInfo=void 0;for(var y,x=!1,w=this.api.asc_getGraphicObjectProps(),S=0;S
',t.id)),o.cmpEl.append(a)),t.render(a),t.cmpEl.attr({tabindex:"-1"})),2!==i.button){var l=n.api.asc_getActiveCellCoord(),r={left:0,top:0};s[0]=l.asc_getX()+l.asc_getWidth()+r.left,s[1]=(l.asc_getY()<0?0:l.asc_getY())+l.asc_getHeight()+r.top}a.css({left:s[0],top:s[1]}),_.isFunction(t.options.initMenu)&&(t.options.initMenu(e),t.alignPosition()),_.delay(function(){t.cmpEl.focus()},10),t.show(),n.currentMenu=t}},onEntriesListMenu:function(t){if(t&&t.length>0){for(var e=this,i=e.documentHolder,n=i.entriesMenu,o=i.cmpEl.find(Common.Utils.String.format("#menu-container-{0}",n.id)),s=0;s
',n.id)),i.cmpEl.append(o)),n.render(o),n.cmpEl.attr({tabindex:"-1"}));var a=e.api.asc_getActiveCellCoord(),l={left:0,top:0},r=[a.asc_getX()+l.left,(a.asc_getY()<0?0:a.asc_getY())+a.asc_getHeight()+l.top];o.css({left:r[0],top:r[1]}),n.show(),n.alignPosition(),_.delay(function(){n.cmpEl.focus()},10)}else this.documentHolder.entriesMenu.hide(),Common.UI.warning({title:this.notcriticalErrorTitle,maxwidth:600,msg:this.txtNoChoices,callback:_.bind(function(t){Common.NotificationCenter.trigger("edit:complete",this.documentHolder)},this)})},onFormulaCompleteMenu:function(t){if(this.documentHolder.funcMenu)if(t){for(var e=this,i=e.documentHolder,n=i.funcMenu,o=i.cmpEl.find("#menu-formula-selection"),s=e.getApplication().getController("FormulaDialog").getDescription(Common.Utils.InternalSettings.get("sse-settings-func-locale")),a=0;an?1:0}),_.each(t,function(t,i){var o=t.asc_getType(),a=t.asc_getName(!0),l=e.api.asc_getFormulaNameByLocale(a),r=new Common.UI.MenuItem({iconCls:o==Asc.c_oAscPopUpSelectorType.Func?"mnu-popup-func":o==Asc.c_oAscPopUpSelectorType.Table?"mnu-popup-table":"mnu-popup-range",caption:a,hint:s&&s[l]?s[l].d:""}).on("click",function(t,i){setTimeout(function(){e.api.asc_insertFormula(t.caption,o,!1)},10)});n.addItem(r)}),n.rendered||(o.length<1&&(o=$(Common.Utils.String.format('')),i.cmpEl.append(o)),n.onAfterKeydownMenu=function(t){if(t.keyCode!=Common.UI.Keys.RETURN||!t.ctrlKey&&!t.altKey){var e;if(arguments.length>1&&arguments[1]instanceof KeyboardEvent&&(t=arguments[1]),o.hasClass("open"))if(t.keyCode==Common.UI.Keys.TAB||t.keyCode==Common.UI.Keys.RETURN&&!t.ctrlKey&&!t.altKey)e=o.find("a.focus").closest("li");else if(t.keyCode==Common.UI.Keys.UP||t.keyCode==Common.UI.Keys.DOWN){var i=n.cmpEl,s=i.offset().top,a=o.find("a.focus").closest("li"),l=a.offset().top;(ls+i.height())&&(n.scroller?n.scroller.scrollTop(i.scrollTop()+l-s,0):i.scrollTop(i.scrollTop()+l-s))}e&&(e.length>0&&e.click(),Common.UI.Menu.Manager.hideAll())}},n.on("hide:after",function(){for(var t=0;t
'),this.documentHolder.cmpEl.append(e.parentEl));var i=this.getApplication().getController("FormulaDialog").getDescription(Common.Utils.InternalSettings.get("sse-settings-func-locale")),n=(i&&i[t]?this.api.asc_getFormulaLocaleName(t)+i[t].a:"").replace(/[,;]/g,this.api.asc_getFunctionArgumentSeparator());if(e.ref&&e.ref.isVisible()&&e.text!=n&&(e.ref.hide(),e.ref=void 0,e.text="",e.isHidden=!0),!n)return;e.ref&&e.ref.isVisible()||(e.text=n,e.ref=new Common.UI.Tooltip({owner:e.parentEl,html:!0,title:n,cls:"auto-tooltip"}),e.ref.show([-1e4,-1e4]),e.isHidden=!1);var o=[this.documentHolder.cmpEl.offset().left-$(window).scrollLeft(),this.documentHolder.cmpEl.offset().top-$(window).scrollTop()],s=this.api.asc_getActiveCellCoord(),a=[s.asc_getX()+o[0]-3,s.asc_getY()+o[1]-e.ref.getBSTip().$tip.height()-5],l=e.ref.getBSTip().$tip.width();a[0]+l>this.tooltips.coauth.bodyWidth&&(a[0]=this.tooltips.coauth.bodyWidth-l),e.ref.getBSTip().$tip.css({top:a[1]+"px",left:a[0]+"px"})}else!e.isHidden&&e.ref&&(e.ref.hide(),e.ref=void 0,e.text="",e.isHidden=!0)},onInputMessage:function(t,e){var i=this.tooltips.input_msg;if(e){i.parentEl||(i.parentEl=$('
'),this.documentHolder.cmpEl.append(i.parentEl));var n=t?""+(t||"")+"
":"";n+=e||"",i.ref&&i.ref.isVisible()&&i.text!=n&&(i.ref.hide(),i.ref=void 0,i.text="",i.isHidden=!0),i.ref&&i.ref.isVisible()||(i.text=n,i.ref=new Common.UI.Tooltip({owner:i.parentEl,html:!0,title:n}),i.ref.show([-1e4,-1e4]),i.isHidden=!1);var o=[this.documentHolder.cmpEl.offset().left-$(window).scrollLeft(),this.documentHolder.cmpEl.offset().top-$(window).scrollTop()],s=this.api.asc_getActiveCellCoord(),a=[s.asc_getX()+o[0]-3,s.asc_getY()+o[1]-i.ref.getBSTip().$tip.height()-5],l=i.ref.getBSTip().$tip.width();a[0]+l>this.tooltips.coauth.bodyWidth&&(a[0]=this.tooltips.coauth.bodyWidth-l),i.ref.getBSTip().$tip.css({top:a[1]+"px",left:a[0]+"px"})}else!i.isHidden&&i.ref&&(i.ref.hide(),i.ref=void 0,i.text="",i.isHidden=!0)},onShowSpecialPasteOptions:function(t){var e=this,i=e.documentHolder,n=t.asc_getCellCoord(),o=i.cmpEl.find("#special-paste-container"),s=t.asc_getOptions();if(s){if(o.length<1&&(e._arrSpecialPaste=[],e._arrSpecialPaste[Asc.c_oSpecialPasteProps.paste]=[e.txtPaste,0],e._arrSpecialPaste[Asc.c_oSpecialPasteProps.pasteOnlyFormula]=[e.txtPasteFormulas,0],e._arrSpecialPaste[Asc.c_oSpecialPasteProps.formulaNumberFormat]=[e.txtPasteFormulaNumFormat,0],e._arrSpecialPaste[Asc.c_oSpecialPasteProps.formulaAllFormatting]=[e.txtPasteKeepSourceFormat,0],e._arrSpecialPaste[Asc.c_oSpecialPasteProps.formulaWithoutBorders]=[e.txtPasteBorders,0],e._arrSpecialPaste[Asc.c_oSpecialPasteProps.formulaColumnWidth]=[e.txtPasteColWidths,0],e._arrSpecialPaste[Asc.c_oSpecialPasteProps.mergeConditionalFormating]=[e.txtPasteMerge,0],e._arrSpecialPaste[Asc.c_oSpecialPasteProps.transpose]=[e.txtPasteTranspose,0],e._arrSpecialPaste[Asc.c_oSpecialPasteProps.pasteOnlyValues]=[e.txtPasteValues,1],e._arrSpecialPaste[Asc.c_oSpecialPasteProps.valueNumberFormat]=[e.txtPasteValNumFormat,1],e._arrSpecialPaste[Asc.c_oSpecialPasteProps.valueAllFormating]=[e.txtPasteValFormat,1],e._arrSpecialPaste[Asc.c_oSpecialPasteProps.pasteOnlyFormating]=[e.txtPasteFormat,2],e._arrSpecialPaste[Asc.c_oSpecialPasteProps.link]=[e.txtPasteLink,2],e._arrSpecialPaste[Asc.c_oSpecialPasteProps.picture]=[e.txtPastePicture,2],e._arrSpecialPaste[Asc.c_oSpecialPasteProps.linkedPicture]=[e.txtPasteLinkPicture,2],e._arrSpecialPaste[Asc.c_oSpecialPasteProps.sourceformatting]=[e.txtPasteSourceFormat,2],e._arrSpecialPaste[Asc.c_oSpecialPasteProps.destinationFormatting]=[e.txtPasteDestFormat,2],e._arrSpecialPaste[Asc.c_oSpecialPasteProps.keepTextOnly]=[e.txtKeepTextOnly,2],e._arrSpecialPaste[Asc.c_oSpecialPasteProps.useTextImport]=[e.txtUseTextImport,3],o=$('
'),i.cmpEl.append(o),e.btnSpecialPaste=new Common.UI.Button({cls:"btn-toolbar",iconCls:"btn-paste",menu:new Common.UI.Menu({items:[]})}),e.btnSpecialPaste.render($("#id-document-holder-btn-special-paste"))),s.length>0){for(var a=e.btnSpecialPaste.menu,l=0;l0&&(a.addItem(new Common.UI.MenuItem({caption:"--"})),h=!1),_.each(r[l],function(t,e){a.addItem(t),h=!0});a.items.length>0&&a.items[0].setChecked(!0,!0),e._state.lastSpecPasteChecked=a.items.length>0?a.items[0]:null,c&&(a.addItem(new Common.UI.MenuItem({caption:"--"})),a.addItem(c))}if(n[0].asc_getX()<0||n[0].asc_getY()<0)return void(o.is(":visible")&&o.hide());var d=n[0],p=n[1],m=e.tooltips.coauth.bodyWidth-e.tooltips.coauth.XY[0]-e.tooltips.coauth.rightMenuWidth-15,u=e.tooltips.coauth.apiHeight-15,g=[],b=[31,20],f=d.asc_getX()+d.asc_getWidth()+3+b[0],C=d.asc_getY()+d.asc_getHeight()+3+b[1];f>m?(g[0]=void 0!==p?p.asc_getX():m-b[0]-3,C>u&&(g[0]-=b[0]+3),g[0]<0&&(g[0]=m-3-b[0])):g[0]=f-b[0],g[1]=C>u?u-3-b[1]:C-b[1],o.css({left:g[0],top:g[1]}),o.show()}},onHideSpecialPasteOptions:function(){var t=this.documentHolder.cmpEl.find("#special-paste-container");t.is(":visible")&&t.hide()},onToggleAutoCorrectOptions:function(t){if(!t){var e=this.documentHolder.cmpEl.find("#autocorrect-paste-container");return void(e.is(":visible")&&e.hide())}var i=this,n=i.documentHolder,o=t.asc_getCellCoord(),e=n.cmpEl.find("#autocorrect-paste-container"),s=t.asc_getOptions();if(e.length<1&&(i._arrAutoCorrectPaste=[],i._arrAutoCorrectPaste[Asc.c_oAscAutoCorrectOptions.UndoTableAutoExpansion]=i.txtUndoExpansion,i._arrAutoCorrectPaste[Asc.c_oAscAutoCorrectOptions.RedoTableAutoExpansion]=i.txtRedoExpansion,e=$('
'),n.cmpEl.append(e),i.btnAutoCorrectPaste=new Common.UI.Button({cls:"btn-toolbar",iconCls:"btn-paste",menu:new Common.UI.Menu({items:[]})}),i.btnAutoCorrectPaste.render($("#id-document-holder-btn-autocorrect-paste"))),s.length>0){for(var a=i.btnAutoCorrectPaste.menu,l=0;lr||p>c||o.asc_getX()<0||o.asc_getY()<0?e.is(":visible")&&e.hide():(e.css({left:d-h[0],top:p-h[1]}),e.show())},onCellsRange:function(t){this.rangeSelectionMode=t!=Asc.c_oAscSelectionDialogType.None},onApiEditCell:function(t){this.isEditFormula=t==Asc.c_oAscCellEditorState.editFormula,this.isEditCell=t!=Asc.c_oAscCellEditorState.editEnd},onLockDefNameManager:function(t){this.namedrange_locked=t==Asc.c_oAscDefinedNameReason.LockDefNameManager},onChangeCropState:function(t){this.documentHolder.menuImgCrop.menu.items[0].setChecked(t,!0)},initEquationMenu:function(){if(this._currentMathObj){var t,e=this,i=e._currentMathObj.get_Type(),n=e._currentMathObj,o=[];switch(i){case Asc.c_oAscMathInterfaceType.Accent:t=new Common.UI.MenuItem({caption:e.txtRemoveAccentChar,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"remove_AccentCharacter"}}),o.push(t);break;case Asc.c_oAscMathInterfaceType.BorderBox:t=new Common.UI.MenuItem({caption:e.txtBorderProps,equation:!0,disabled:e._currentParaObjDisabled,menu:new Common.UI.Menu({menuAlign:"tl-tr",items:[{caption:n.get_HideTop()?e.txtAddTop:e.txtHideTop,equationProps:{type:i,callback:"put_HideTop",value:!n.get_HideTop()}},{caption:n.get_HideBottom()?e.txtAddBottom:e.txtHideBottom,equationProps:{type:i,callback:"put_HideBottom",value:!n.get_HideBottom()}},{caption:n.get_HideLeft()?e.txtAddLeft:e.txtHideLeft,equationProps:{type:i,callback:"put_HideLeft",value:!n.get_HideLeft()}},{caption:n.get_HideRight()?e.txtAddRight:e.txtHideRight,equationProps:{type:i,callback:"put_HideRight",value:!n.get_HideRight()}},{caption:n.get_HideHor()?e.txtAddHor:e.txtHideHor,equationProps:{type:i,callback:"put_HideHor",value:!n.get_HideHor()}},{caption:n.get_HideVer()?e.txtAddVer:e.txtHideVer,equationProps:{type:i,callback:"put_HideVer",value:!n.get_HideVer()}},{caption:n.get_HideTopLTR()?e.txtAddLT:e.txtHideLT,equationProps:{type:i,callback:"put_HideTopLTR",value:!n.get_HideTopLTR()}},{caption:n.get_HideTopRTL()?e.txtAddLB:e.txtHideLB,equationProps:{type:i,callback:"put_HideTopRTL",value:!n.get_HideTopRTL()}}]})}),o.push(t);break;case Asc.c_oAscMathInterfaceType.Bar:t=new Common.UI.MenuItem({caption:e.txtRemoveBar,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"remove_Bar"}}),o.push(t),t=new Common.UI.MenuItem({caption:n.get_Pos()==Asc.c_oAscMathInterfaceBarPos.Top?e.txtUnderbar:e.txtOverbar,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"put_Pos",value:n.get_Pos()==Asc.c_oAscMathInterfaceBarPos.Top?Asc.c_oAscMathInterfaceBarPos.Bottom:Asc.c_oAscMathInterfaceBarPos.Top}}),o.push(t);break;case Asc.c_oAscMathInterfaceType.Script:var s=n.get_ScriptType();s==Asc.c_oAscMathInterfaceScript.PreSubSup?(t=new Common.UI.MenuItem({caption:e.txtScriptsAfter,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"put_ScriptType",value:Asc.c_oAscMathInterfaceScript.SubSup}}),o.push(t),t=new Common.UI.MenuItem({caption:e.txtRemScripts,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"put_ScriptType",value:Asc.c_oAscMathInterfaceScript.None}}),o.push(t)):(s==Asc.c_oAscMathInterfaceScript.SubSup&&(t=new Common.UI.MenuItem({caption:e.txtScriptsBefore,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"put_ScriptType",value:Asc.c_oAscMathInterfaceScript.PreSubSup}}),o.push(t)),s!=Asc.c_oAscMathInterfaceScript.SubSup&&s!=Asc.c_oAscMathInterfaceScript.Sub||(t=new Common.UI.MenuItem({caption:e.txtRemSubscript,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"put_ScriptType",value:s==Asc.c_oAscMathInterfaceScript.SubSup?Asc.c_oAscMathInterfaceScript.Sup:Asc.c_oAscMathInterfaceScript.None}}),o.push(t)),s!=Asc.c_oAscMathInterfaceScript.SubSup&&s!=Asc.c_oAscMathInterfaceScript.Sup||(t=new Common.UI.MenuItem({caption:e.txtRemSuperscript,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"put_ScriptType",value:s==Asc.c_oAscMathInterfaceScript.SubSup?Asc.c_oAscMathInterfaceScript.Sub:Asc.c_oAscMathInterfaceScript.None}}),o.push(t)));break;case Asc.c_oAscMathInterfaceType.Fraction:var a=n.get_FractionType();a!=Asc.c_oAscMathInterfaceFraction.Skewed&&a!=Asc.c_oAscMathInterfaceFraction.Linear||(t=new Common.UI.MenuItem({caption:e.txtFractionStacked,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"put_FractionType",value:Asc.c_oAscMathInterfaceFraction.Bar}}),o.push(t)),a!=Asc.c_oAscMathInterfaceFraction.Bar&&a!=Asc.c_oAscMathInterfaceFraction.Linear||(t=new Common.UI.MenuItem({caption:e.txtFractionSkewed,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"put_FractionType",value:Asc.c_oAscMathInterfaceFraction.Skewed}}),o.push(t)),a!=Asc.c_oAscMathInterfaceFraction.Bar&&a!=Asc.c_oAscMathInterfaceFraction.Skewed||(t=new Common.UI.MenuItem({caption:e.txtFractionLinear,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"put_FractionType",value:Asc.c_oAscMathInterfaceFraction.Linear}}),o.push(t)),a!=Asc.c_oAscMathInterfaceFraction.Bar&&a!=Asc.c_oAscMathInterfaceFraction.NoBar||(t=new Common.UI.MenuItem({caption:a==Asc.c_oAscMathInterfaceFraction.Bar?e.txtRemFractionBar:e.txtAddFractionBar,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"put_FractionType",value:a==Asc.c_oAscMathInterfaceFraction.Bar?Asc.c_oAscMathInterfaceFraction.NoBar:Asc.c_oAscMathInterfaceFraction.Bar}}),o.push(t));break;case Asc.c_oAscMathInterfaceType.Limit:t=new Common.UI.MenuItem({caption:n.get_Pos()==Asc.c_oAscMathInterfaceLimitPos.Top?e.txtLimitUnder:e.txtLimitOver,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"put_Pos",value:n.get_Pos()==Asc.c_oAscMathInterfaceLimitPos.Top?Asc.c_oAscMathInterfaceLimitPos.Bottom:Asc.c_oAscMathInterfaceLimitPos.Top}}),o.push(t),t=new Common.UI.MenuItem({caption:e.txtRemLimit,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"put_Pos",value:Asc.c_oAscMathInterfaceLimitPos.None}}),o.push(t);break;case Asc.c_oAscMathInterfaceType.Matrix:t=new Common.UI.MenuItem({caption:n.get_HidePlaceholder()?e.txtShowPlaceholder:e.txtHidePlaceholder,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"put_HidePlaceholder",value:!n.get_HidePlaceholder()}}),o.push(t),t=new Common.UI.MenuItem({caption:e.insertText,equation:!0,disabled:e._currentParaObjDisabled,menu:new Common.UI.Menu({menuAlign:"tl-tr",items:[{caption:e.insertRowAboveText,equationProps:{type:i,callback:"insert_MatrixRow",value:!0}},{caption:e.insertRowBelowText,equationProps:{type:i,callback:"insert_MatrixRow",value:!1}},{caption:e.insertColumnLeftText,equationProps:{type:i,callback:"insert_MatrixColumn",value:!0}},{caption:e.insertColumnRightText,equationProps:{type:i,callback:"insert_MatrixColumn",value:!1}}]})}),o.push(t),t=new Common.UI.MenuItem({caption:e.deleteText,equation:!0,disabled:e._currentParaObjDisabled,menu:new Common.UI.Menu({menuAlign:"tl-tr",items:[{caption:e.deleteRowText,equationProps:{type:i,callback:"delete_MatrixRow"}},{caption:e.deleteColumnText,equationProps:{type:i,callback:"delete_MatrixColumn"}}]})}),o.push(t),t=new Common.UI.MenuItem({caption:e.txtMatrixAlign,equation:!0,disabled:e._currentParaObjDisabled,menu:new Common.UI.Menu({menuAlign:"tl-tr",items:[{caption:e.txtTop,checkable:!0,checked:n.get_MatrixAlign()==Asc.c_oAscMathInterfaceMatrixMatrixAlign.Top,equationProps:{type:i,callback:"put_MatrixAlign",value:Asc.c_oAscMathInterfaceMatrixMatrixAlign.Top}},{caption:e.centerText,checkable:!0,checked:n.get_MatrixAlign()==Asc.c_oAscMathInterfaceMatrixMatrixAlign.Center,equationProps:{type:i,callback:"put_MatrixAlign",value:Asc.c_oAscMathInterfaceMatrixMatrixAlign.Center}},{caption:e.txtBottom,checkable:!0,checked:n.get_MatrixAlign()==Asc.c_oAscMathInterfaceMatrixMatrixAlign.Bottom,equationProps:{type:i,callback:"put_MatrixAlign",value:Asc.c_oAscMathInterfaceMatrixMatrixAlign.Bottom}}]})}),o.push(t),t=new Common.UI.MenuItem({caption:e.txtColumnAlign,equation:!0,disabled:e._currentParaObjDisabled,menu:new Common.UI.Menu({menuAlign:"tl-tr",items:[{caption:e.leftText,checkable:!0,checked:n.get_ColumnAlign()==Asc.c_oAscMathInterfaceMatrixColumnAlign.Left,equationProps:{type:i,callback:"put_ColumnAlign",value:Asc.c_oAscMathInterfaceMatrixColumnAlign.Left}},{caption:e.centerText,checkable:!0,checked:n.get_ColumnAlign()==Asc.c_oAscMathInterfaceMatrixColumnAlign.Center,equationProps:{type:i,callback:"put_ColumnAlign",value:Asc.c_oAscMathInterfaceMatrixColumnAlign.Center}},{caption:e.rightText,checkable:!0,checked:n.get_ColumnAlign()==Asc.c_oAscMathInterfaceMatrixColumnAlign.Right,equationProps:{type:i,callback:"put_ColumnAlign",value:Asc.c_oAscMathInterfaceMatrixColumnAlign.Right}}]})}),o.push(t);break;case Asc.c_oAscMathInterfaceType.EqArray:t=new Common.UI.MenuItem({caption:e.txtInsertEqBefore,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"insert_Equation",value:!0}}),o.push(t),t=new Common.UI.MenuItem({caption:e.txtInsertEqAfter,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"insert_Equation",value:!1}}),o.push(t),t=new Common.UI.MenuItem({caption:e.txtDeleteEq,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"delete_Equation"}}),o.push(t),t=new Common.UI.MenuItem({caption:e.alignmentText,equation:!0,disabled:e._currentParaObjDisabled,menu:new Common.UI.Menu({menuAlign:"tl-tr",items:[{caption:e.txtTop,checkable:!0,checked:n.get_Align()==Asc.c_oAscMathInterfaceEqArrayAlign.Top,equationProps:{type:i,callback:"put_Align",value:Asc.c_oAscMathInterfaceEqArrayAlign.Top}},{caption:e.centerText,checkable:!0,checked:n.get_Align()==Asc.c_oAscMathInterfaceEqArrayAlign.Center,equationProps:{type:i,callback:"put_Align",value:Asc.c_oAscMathInterfaceEqArrayAlign.Center}},{caption:e.txtBottom,checkable:!0,checked:n.get_Align()==Asc.c_oAscMathInterfaceEqArrayAlign.Bottom,equationProps:{type:i,callback:"put_Align",value:Asc.c_oAscMathInterfaceEqArrayAlign.Bottom}}]})}),o.push(t);break;case Asc.c_oAscMathInterfaceType.LargeOperator:t=new Common.UI.MenuItem({caption:e.txtLimitChange,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"put_LimitLocation",value:n.get_LimitLocation()==Asc.c_oAscMathInterfaceNaryLimitLocation.UndOvr?Asc.c_oAscMathInterfaceNaryLimitLocation.SubSup:Asc.c_oAscMathInterfaceNaryLimitLocation.UndOvr}}),o.push(t),void 0!==n.get_HideUpper()&&(t=new Common.UI.MenuItem({caption:n.get_HideUpper()?e.txtShowTopLimit:e.txtHideTopLimit,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"put_HideUpper",value:!n.get_HideUpper()}}),o.push(t)),void 0!==n.get_HideLower()&&(t=new Common.UI.MenuItem({caption:n.get_HideLower()?e.txtShowBottomLimit:e.txtHideBottomLimit,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"put_HideLower",value:!n.get_HideLower()}}),o.push(t));break;case Asc.c_oAscMathInterfaceType.Delimiter:t=new Common.UI.MenuItem({caption:e.txtInsertArgBefore,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"insert_DelimiterArgument",value:!0}}),o.push(t),t=new Common.UI.MenuItem({caption:e.txtInsertArgAfter,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"insert_DelimiterArgument",value:!1}}),o.push(t),n.can_DeleteArgument()&&(t=new Common.UI.MenuItem({caption:e.txtDeleteArg,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"delete_DelimiterArgument"}}),o.push(t)),t=new Common.UI.MenuItem({caption:n.has_Separators()?e.txtDeleteCharsAndSeparators:e.txtDeleteChars,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"remove_DelimiterCharacters"}}),o.push(t),t=new Common.UI.MenuItem({caption:n.get_HideOpeningBracket()?e.txtShowOpenBracket:e.txtHideOpenBracket,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"put_HideOpeningBracket",value:!n.get_HideOpeningBracket()}}),o.push(t),t=new Common.UI.MenuItem({caption:n.get_HideClosingBracket()?e.txtShowCloseBracket:e.txtHideCloseBracket,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"put_HideClosingBracket",value:!n.get_HideClosingBracket()}}),o.push(t),t=new Common.UI.MenuItem({caption:e.txtStretchBrackets,equation:!0,disabled:e._currentParaObjDisabled,checkable:!0,checked:n.get_StretchBrackets(),equationProps:{type:i,callback:"put_StretchBrackets",value:!n.get_StretchBrackets()}}),o.push(t),t=new Common.UI.MenuItem({caption:e.txtMatchBrackets,equation:!0,disabled:!n.get_StretchBrackets()||e._currentParaObjDisabled,checkable:!0,checked:n.get_StretchBrackets()&&n.get_MatchBrackets(),equationProps:{type:i,callback:"put_MatchBrackets",value:!n.get_MatchBrackets()}}),o.push(t);break;case Asc.c_oAscMathInterfaceType.GroupChar:n.can_ChangePos()&&(t=new Common.UI.MenuItem({caption:n.get_Pos()==Asc.c_oAscMathInterfaceGroupCharPos.Top?e.txtGroupCharUnder:e.txtGroupCharOver,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"put_Pos",value:n.get_Pos()==Asc.c_oAscMathInterfaceGroupCharPos.Top?Asc.c_oAscMathInterfaceGroupCharPos.Bottom:Asc.c_oAscMathInterfaceGroupCharPos.Top}}),o.push(t),t=new Common.UI.MenuItem({caption:e.txtDeleteGroupChar,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"put_Pos",value:Asc.c_oAscMathInterfaceGroupCharPos.None}}),o.push(t));break;case Asc.c_oAscMathInterfaceType.Radical:void 0!==n.get_HideDegree()&&(t=new Common.UI.MenuItem({caption:n.get_HideDegree()?e.txtShowDegree:e.txtHideDegree,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"put_HideDegree",value:!n.get_HideDegree()}}),o.push(t)),t=new Common.UI.MenuItem({caption:e.txtDeleteRadical,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"remove_Radical"}}),o.push(t)}return n.can_IncreaseArgumentSize()&&(t=new Common.UI.MenuItem({caption:e.txtIncreaseArg,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"increase_ArgumentSize"}}),o.push(t)),n.can_DecreaseArgumentSize()&&(t=new Common.UI.MenuItem({caption:e.txtDecreaseArg,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"decrease_ArgumentSize"}}),o.push(t)),n.can_InsertManualBreak()&&(t=new Common.UI.MenuItem({caption:e.txtInsertBreak,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"insert_ManualBreak"}}),o.push(t)),n.can_DeleteManualBreak()&&(t=new Common.UI.MenuItem({caption:e.txtDeleteBreak,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"delete_ManualBreak"}}),o.push(t)),n.can_AlignToCharacter()&&(t=new Common.UI.MenuItem({caption:e.txtAlignToChar,equation:!0,disabled:e._currentParaObjDisabled,equationProps:{type:i,callback:"align_ToCharacter"}}),o.push(t)),o}},addEquationMenu:function(t){var e=this;e.clearEquationMenu(t);var i=e.documentHolder.textInShapeMenu,n=e.initEquationMenu();return n.length>0&&_.each(n,function(n,o){n.menu?_.each(n.menu.items,function(t){t.on("click",_.bind(e.equationCallback,e,t.options.equationProps))}):n.on("click",_.bind(e.equationCallback,e,n.options.equationProps)),i.insertItem(t,n),t++}),n.length},clearEquationMenu:function(t){for(var e=this,i=e.documentHolder.textInShapeMenu,n=t;n')}),e.paraBulletsPicker.on("item:click",_.bind(this.onSelectBullets,this)),i&&e.paraBulletsPicker.selectRecord(i.rec,!0)},onSignatureClick:function(t){var e=t.cmpEl.attr("data-value");switch(t.value){case 0:Common.NotificationCenter.trigger("protect:sign",e);break;case 1:this.api.asc_ViewCertificate(e);break;case 2:Common.NotificationCenter.trigger("protect:signature","visible",this._isDisabled,e);break;case 3:this.api.asc_RemoveSignature(e)}},onOriginalSizeClick:function(t){if(this.api){var e=this.api.asc_getOriginalImageSize(),i=e.asc_getImageWidth(),n=e.asc_getImageHeight(),o=new Asc.asc_CImgProperty;o.asc_putWidth(i),o.asc_putHeight(n),o.put_ResetCrop(!0),this.api.asc_setGraphicObjectProps(o),Common.NotificationCenter.trigger("edit:complete",this.documentHolder),Common.component.Analytics.trackEvent("DocumentHolder","Set Image Original Size")}},onImgReplace:function(t,e){var i=this;this.api&&("file"==e.value?setTimeout(function(){i.api&&i.api.asc_changeImageFromFile(),Common.NotificationCenter.trigger("edit:complete",i.documentHolder)},10):new Common.Views.ImageFromUrlDialog({handler:function(t,e){if("ok"==t&&i.api){var n=e.replace(/ /g,"");if(!_.isEmpty(n)){var o=new Asc.asc_CImgProperty;o.asc_putImageUrl(n),i.api.asc_setGraphicObjectProps(o)}}Common.NotificationCenter.trigger("edit:complete",i.documentHolder)}}).show())},onNumberFormatSelect:function(t,e){void 0!==e.value&&"advanced"!==e.value&&this.api&&this.api.asc_setCellFormat(e.options.format),Common.NotificationCenter.trigger("edit:complete",this.documentHolder)},onCustomNumberFormat:function(t){var e=this,i=e.api.asc_getLocale();!i&&(i=e.permissions.lang?parseInt(Common.util.LanguageInfo.getLocalLanguageCode(e.permissions.lang)):1033),new SSE.Views.FormatSettingsDialog({api:e.api,handler:function(t,i){i&&e.api.asc_setCellFormat(i.format),Common.NotificationCenter.trigger("edit:complete",e.documentHolder)},props:{format:t.options.numformat,formatInfo:t.options.numformatinfo,langId:i}}).show(),Common.NotificationCenter.trigger("edit:complete",this.documentHolder)},onNumberFormatOpenAfter:function(t){if(this.api){var e=this,i=e.api.asc_getLocale();if(!i&&(i=e.permissions.lang?parseInt(Common.util.LanguageInfo.getLocalLanguageCode(e.permissions.lang)):1033),this._state.langId!==i){this._state.langId=i;var n=new Asc.asc_CFormatCellsInfo ;n.asc_setType(Asc.c_oAscNumFormatType.None),n.asc_setSymbol(this._state.langId);for(var o=this.api.asc_getFormatCells(n),s=0;sOnly text values from the column can be selected for replacement.",txtExpandSort:"The data next to the selection will not be sorted. Do you want to expand the selection to include the adjacent data or continue with sorting the currently selected cells only?",txtExpand:"Expand and sort",txtSorting:"Sorting",txtSortSelected:"Sort selected",txtPaste:"Paste",txtPasteFormulas:"Paste only formula",txtPasteFormulaNumFormat:"Formula + number format",txtPasteKeepSourceFormat:"Formula + all formatting",txtPasteBorders:"Formula without borders",txtPasteColWidths:"Formula + column width",txtPasteMerge:"Merge conditional formatting",txtPasteTranspose:"Transpose",txtPasteValues:"Paste only value",txtPasteValNumFormat:"Value + number format",txtPasteValFormat:"Value + all formatting",txtPasteFormat:"Paste only formatting",txtPasteLink:"Paste Link",txtPastePicture:"Picture",txtPasteLinkPicture:"Linked Picture",txtPasteSourceFormat:"Source formatting",txtPasteDestFormat:"Destination formatting",txtKeepTextOnly:"Keep text only",txtUseTextImport:"Use text import wizard",txtUndoExpansion:"Undo table autoexpansion",txtRedoExpansion:"Redo table autoexpansion",txtAnd:"and",txtOr:"or",txtEquals:"Equals",txtNotEquals:"Does not equal",txtGreater:"Greater than",txtGreaterEquals:"Greater than or equal to",txtLess:"Less than",txtLessEquals:"Less than or equal to",txtAboveAve:"Above average",txtBelowAve:"Below average",txtBegins:"Begins with",txtNotBegins:"Does not begin with",txtEnds:"Ends with",txtNotEnds:"Does not end with",txtContains:"Contains",txtNotContains:"Does not contain",txtFilterTop:"Top",txtFilterBottom:"Bottom",txtItems:"items",txtPercent:"percent",txtEqualsToCellColor:"Equals to cell color",txtEqualsToFontColor:"Equals to font color",txtAll:"(All)",txtBlanks:"(Blanks)",txtColumn:"Column",txtImportWizard:"Text Import Wizard"},SSE.Controllers.DocumentHolder||{}))}),define("text!spreadsheeteditor/main/app/template/CellEditor.template",[],function(){return'
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n'}),define("spreadsheeteditor/main/app/view/CellEditor",["text!spreadsheeteditor/main/app/template/CellEditor.template","common/main/lib/component/BaseView"],function(t){"use strict";SSE.Views.CellEditor=Common.UI.BaseView.extend(_.extend({template:_.template(t),initialize:function(t){Common.UI.BaseView.prototype.initialize.call(this,t)},render:function(){$(this.el).html(this.template()),this.btnNamedRanges=new Common.UI.Button({menu:new Common.UI.Menu({style:"min-width: 70px;max-width:400px;",maxHeight:250,items:[{caption:this.textManager,value:"manager"},{caption:"--"}]})}),this.btnNamedRanges.render($("#ce-cell-name-menu")),this.btnNamedRanges.setVisible(!1),this.btnNamedRanges.menu.setOffset(-81),this.$cellname=$("#ce-cell-name",this.el),this.$btnexpand=$("#ce-btn-expand",this.el),this.$btnfunc=$("#ce-func-label",this.el);var t=this;return this.$cellname.on("focus",function(e){var i=t.$cellname[0];i.selectionStart=0,i.selectionEnd=i.value.length,i.scrollLeft=i.scrollWidth}),this.$btnfunc.addClass("disabled"),this.$btnfunc.tooltip({title:this.tipFormula,placement:"cursor"}),this},updateCellInfo:function(t){t&&this.$cellname.val("string"==typeof t?t:t.asc_getName())},cellNameDisabled:function(t){t?this.$cellname.attr("disabled","disabled"):this.$cellname.removeAttr("disabled"),this.btnNamedRanges.setDisabled(t)},tipFormula:"Insert Function",textManager:"Manager"},SSE.Views.CellEditor||{}))}),define("text!spreadsheeteditor/main/app/template/NameManagerDlg.template",[],function(){return'
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
'}),define("spreadsheeteditor/main/app/view/NameManagerDlg",["text!spreadsheeteditor/main/app/template/NameManagerDlg.template","common/main/lib/view/AdvancedSettingsWindow","common/main/lib/component/ComboBox","common/main/lib/component/ListView","common/main/lib/component/InputField"],function(t){"use strict";SSE.Views=SSE.Views||{},SSE.Views.NameManagerDlg=Common.Views.AdvancedSettingsWindow.extend(_.extend({options:{alias:"NameManagerDlg",contentWidth:510,height:353},initialize:function(e){_.extend(this.options,{title:this.txtTitle,template:['
','
'+_.template(t)({scope:this})+"
","
",'
','"].join("")},e),this.api=e.api,this.handler=e.handler,this.sheets=e.sheets||[],this.sheetNames=e.sheetNames||[],this.ranges=e.ranges||[],this.props=e.props,this.sort=e.sort||{type:"name",direction:1},this.locked=e.locked||!1,this.userTooltip=!0,this.currentNamedRange=void 0,this.rangesStore=new Common.UI.DataViewStore,this.wrapEvents={onRefreshDefNameList:_.bind(this.onRefreshDefNameList,this),onLockDefNameManager:_.bind(this.onLockDefNameManager,this)},Common.Views.AdvancedSettingsWindow.prototype.initialize.call(this,this.options)},render:function(){Common.Views.AdvancedSettingsWindow.prototype.render.call(this);var t=this;this.cmbFilter=new Common.UI.ComboBox({el:$("#name-manager-combo-filter"),menuStyle:"min-width: 100%;",editable:!1,cls:"input-group-nr",data:[{value:0,displayValue:this.textFilterAll},{value:1,displayValue:this.textFilterDefNames},{value:2,displayValue:this.textFilterTableNames},{value:3,displayValue:this.textFilterSheet},{value:4,displayValue:this.textFilterWorkbook}]}).on("selected",function(e,i){t.refreshRangeList(null,0)}),this.cmbFilter.setValue(0),this.rangeList=new Common.UI.ListView({el:$("#name-manager-range-list",this.$window),store:new Common.UI.DataViewStore,simpleAddMode:!0,emptyText:this.textEmpty,template:_.template(['
'].join("")),itemTemplate:_.template(['
','
','
<%= name %>
','
<%= scopeName %>
','
<%= range %>
',"<% if (lock) { %>",'
<%=lockuser%>
',"<% } %>","
"].join(""))}),this.rangeList.store.comparator=function(e,i){var n=e.get(t.sort.type).toLowerCase(),o=i.get(t.sort.type).toLowerCase();return n==o?0:n0?this.textnoNames:this.textEmpty)}var a=this,l=this.rangeList.store,r=this.rangesStore.models,c=this.cmbFilter.getValue(),h=c<3?2==c:-1,d=c>2?4==c:-1;if(c>0&&(r=this.rangesStore.filter(function(t){return-1!==h?h===t.get("isTable"):-1!==d&&d===(null===t.get("scope"))})),l.reset(r,{silent:!1}),c=l.length,this.btnEditRange.setDisabled(!c),this.btnDeleteRange.setDisabled(!c),c>0){if(void 0!==e&&null!==e||(e=0),_.isNumber(e))e>c-1&&(e=c-1),this.rangeList.selectByIndex(e),setTimeout(function(){a.rangeList.scrollToRecord(l.at(e))},50);else if(e){var p=l.findWhere({name:e.asc_getName(!0),scope:e.asc_getScope()});p&&(this.rangeList.selectRecord(p),setTimeout(function(){a.rangeList.scrollToRecord(p)},50))}!0===this.userTooltip&&this.rangeList.cmpEl.find(".lock-user").length>0&&this.rangeList.cmpEl.on("mouseover",_.bind(a.onMouseOverLock,a)).on("mouseout",_.bind(a.onMouseOutLock,a))}_.delay(function(){a.rangeList.cmpEl.find(".listview").focus(),a.rangeList.scroller.update({alwaysVisibleY:!0})},100,this)},onMouseOverLock:function(t,e,i){if(!0===this.userTooltip&&$(t.target).hasClass("lock-user")){var n=this,o=$(t.target).tooltip({title:this.tipIsLocked,trigger:"manual"}).data("bs.tooltip");this.userTooltip=o.tip(),this.userTooltip.css("z-index",parseInt(this.$window.css("z-index"))+10),o.show(),setTimeout(function(){n.userTipHide()},5e3)}},userTipHide:function(){"object"==typeof this.userTooltip&&(this.userTooltip.remove(),this.userTooltip=void 0,this.rangeList.cmpEl.off("mouseover").off("mouseout"))},onMouseOutLock:function(t,e,i){"object"==typeof this.userTooltip&&this.userTipHide()},onEditRange:function(t){if(this.locked)return void Common.NotificationCenter.trigger("namedrange:locked");var e=this,i=e.$window.offset(),n=this.rangeList.getSelectedRec(),o=(_.indexOf(this.rangeList.store.models,n),t&&n?new Asc.asc_CDefName(n.get("name"),n.get("range"),n.get("scope"),n.get("isTable"),void 0,void 0,void 0,!0):null),s=new SSE.Views.NamedRangeEditDlg({api:e.api,sheets:this.sheets,props:t?o:this.props,isEdit:t,handler:function(i,n){"ok"==i&&n&&(t?(e.currentNamedRange=n,e.api.asc_editDefinedNames(o,n)):(e.cmbFilter.setValue(0),e.currentNamedRange=n,e.api.asc_setDefinedNames(n)))}}).on("close",function(){e.show(),_.delay(function(){e.rangeList.cmpEl.find(".listview").focus()},100,e)});e.hide(),s.show(i.left+65,i.top+77)},onDeleteRange:function(){var t=this.rangeList.getSelectedRec();t&&(this.currentNamedRange=_.indexOf(this.rangeList.store.models,t),this.api.asc_delDefinedNames(new Asc.asc_CDefName(t.get("name"),t.get("range"),t.get("scope"),t.get("isTable"),void 0,void 0,void 0,!0)))},getSettings:function(){return this.sort},onPrimary:function(){return!0},onDlgBtnClick:function(t){this.handler&&this.handler.call(this,t.currentTarget.attributes.result.value),this.close()},onSortNames:function(t){t!==this.sort.type?(this.sort={type:t,direction:1},this.spanSortName.toggleClass("hidden"),this.spanSortScope.toggleClass("hidden")):this.sort.direction=-this.sort.direction;var e="name"==t?this.spanSortName:this.spanSortScope;this.sort.direction>0?e.removeClass("sort-desc"):e.addClass("sort-desc"),this.rangeList.store.sort(),this.rangeList.onResetItems(),this.rangeList.scroller.update({alwaysVisibleY:!0})},getUserName:function(t){var e=SSE.getCollection("Common.Collections.Users");if(e){var i=e.findUser(t);if(i)return i.get("username")}return this.guestText},onSelectRangeItem:function(t,e,i){this.userTipHide();var n={};if(_.isFunction(i.toJSON)){if(!i.get("selected"))return;n=i.toJSON(),this.currentNamedRange=_.indexOf(this.rangeList.store.models,i),this.btnEditRange.setDisabled(n.lock),this.btnDeleteRange.setDisabled(n.lock||n.isTable)}},hide:function(){this.userTipHide(),Common.UI.Window.prototype.hide.call(this)},close:function(){this.userTipHide(),this.api.asc_unregisterCallback("asc_onLockDefNameManager",this.wrapEvents.onLockDefNameManager),this.api.asc_unregisterCallback("asc_onRefreshDefNameList",this.wrapEvents.onRefreshDefNameList),Common.UI.Window.prototype.close.call(this)},onKeyDown:function(t,e,i){i.keyCode!=Common.UI.Keys.DELETE||this.btnDeleteRange.isDisabled()||this.onDeleteRange()},onDblClickItem:function(t,e,i){this.btnEditRange.isDisabled()||this.onEditRange(!0)},onLockDefNameManager:function(t){this.locked=t==Asc.c_oAscDefinedNameReason.LockDefNameManager},txtTitle:"Name Manager",closeButtonText:"Close",okButtonText:"Ok",textDataRange:"Data Range",textNew:"New",textEdit:"Edit",textDelete:"Delete",textRanges:"Named Ranges",textScope:"Scope",textFilter:"Filter",textEmpty:"No named ranges have been created yet.
Create at least one named range and it will appear in this field.",textnoNames:"No named ranges matching your filter could be found.",textFilterAll:"All",textFilterDefNames:"Defined names",textFilterTableNames:"Table names",textFilterSheet:"Names Scoped to Sheet",textFilterWorkbook:"Names Scoped to Workbook",textWorkbook:"Workbook",guestText:"Guest",tipIsLocked:"This element is being edited by another user."},SSE.Views.NameManagerDlg||{}))}),define("spreadsheeteditor/main/app/controller/CellEditor",["core","spreadsheeteditor/main/app/view/CellEditor","spreadsheeteditor/main/app/view/NameManagerDlg"],function(t){"use strict";SSE.Controllers.CellEditor=Backbone.Controller.extend({views:["CellEditor"],events:function(){return{"keyup input#ce-cell-name":_.bind(this.onCellName,this),"keyup textarea#ce-cell-content":_.bind(this.onKeyupCellEditor,this),"blur textarea#ce-cell-content":_.bind(this.onBlurCellEditor,this),"click button#ce-btn-expand":_.bind(this.expandEditorField,this),"click button#ce-func-label":_.bind(this.onInsertFunction,this)}},initialize:function(){this.addListeners({CellEditor:{},Viewport:{"layout:resizedrag":_.bind(this.onLayoutResize,this)},"Common.Views.Header":{"formulabar:hide":function(t){this.editor.setVisible(!t),Common.localStorage.setBool("sse-hidden-formula",t),Common.NotificationCenter.trigger("layout:changed","celleditor",t?"hidden":"showed")}.bind(this)}})},setApi:function(t){return this.api=t,this.api.isCEditorFocused=!1,this.api.asc_registerCallback("asc_onSelectionNameChanged",_.bind(this.onApiCellSelection,this)),this.api.asc_registerCallback("asc_onEditCell",_.bind(this.onApiEditCell,this)),this.api.asc_registerCallback("asc_onCoAuthoringDisconnect",_.bind(this.onApiDisconnect,this)),Common.NotificationCenter.on("api:disconnect",_.bind(this.onApiDisconnect,this)),Common.NotificationCenter.on("cells:range",_.bind(this.onCellsRange,this)),this.api.asc_registerCallback("asc_onLockDefNameManager",_.bind(this.onLockDefNameManager,this)),this.api.asc_registerCallback("asc_onInputKeyDown",_.bind(this.onInputKeyDown,this)),this},setMode:function(t){this.mode=t,this.editor.$btnfunc[this.mode.isEdit?"removeClass":"addClass"]("disabled"),this.editor.btnNamedRanges.setVisible(this.mode.isEdit&&!this.mode.isEditDiagram&&!this.mode.isEditMailMerge),this.mode.isEdit&&this.api.asc_registerCallback("asc_onSelectionChanged",_.bind(this.onApiSelectionChanged,this))},onInputKeyDown:function(t){if(Common.UI.Keys.UP===t.keyCode||Common.UI.Keys.DOWN===t.keyCode||Common.UI.Keys.TAB===t.keyCode||Common.UI.Keys.RETURN===t.keyCode||Common.UI.Keys.ESC===t.keyCode||Common.UI.Keys.LEFT===t.keyCode||Common.UI.Keys.RIGHT===t.keyCode){var e=$("#menu-formula-selection");e.hasClass("open")&&e.find(".dropdown-menu").trigger("keydown",t)}},onLaunch:function(){this.editor=this.createView("CellEditor",{el:"#cell-editing-box"}).render(),this.bindViewEvents(this.editor,this.events),this.editor.$el.parent().find(".after").css({zIndex:"4"}),this.editor.btnNamedRanges.menu.on("item:click",_.bind(this.onNamedRangesMenu,this)).on("show:before",_.bind(this.onNameBeforeShow,this)),this.namedrange_locked=!1},onApiEditCell:function(t){t==Asc.c_oAscCellEditorState.editStart?(this.api.isCellEdited=!0,this.editor.cellNameDisabled(!0)):t==Asc.c_oAscCellEditorState.editInCell?this.api.isCEditorFocused="clear":t==Asc.c_oAscCellEditorState.editEnd&&(this.api.isCellEdited=!1,this.api.isCEditorFocused=!1,this.editor.cellNameDisabled(!1)),this.editor.$btnfunc.toggleClass("disabled",t==Asc.c_oAscCellEditorState.editText)},onApiCellSelection:function(t){this.editor.updateCellInfo(t)},onApiSelectionChanged:function(t){var e=t.asc_getFlags().asc_getSelectionType(),i=!this.mode.isEditMailMerge&&!this.mode.isEditDiagram&&(!0===t.asc_getLocked()||!0===t.asc_getLockedTable()),n=e==Asc.c_oAscSelectionType.RangeChartText,o=e==Asc.c_oAscSelectionType.RangeChart,s=e==Asc.c_oAscSelectionType.RangeShapeText,a=e==Asc.c_oAscSelectionType.RangeShape,l=e==Asc.c_oAscSelectionType.RangeImage,r=s||a||n||o;this.editor.$btnfunc.toggleClass("disabled",l||r||i)},onApiDisconnect:function(){this.mode.isEdit=!1;var t=this.getApplication().getController("FormulaDialog");t&&t.hideDialog(),this.mode.isEdit||($("#ce-func-label",this.editor.el).addClass("disabled"),this.editor.btnNamedRanges.setVisible(!1))},onCellsRange:function(t){this.editor.cellNameDisabled(t!=Asc.c_oAscSelectionDialogType.None),this.editor.$btnfunc.toggleClass("disabled",t!=Asc.c_oAscSelectionDialogType.None)},onLayoutResize:function(t,e){"cell:edit"==e&&(this.editor.$el.height()>19?this.editor.$btnexpand.hasClass("btn-collapse")||this.editor.$btnexpand.addClass("btn-collapse"):this.editor.$btnexpand.removeClass("btn-collapse"))},onCellName:function(t){if(t.keyCode==Common.UI.Keys.RETURN){var e=this.editor.$cellname.val();e&&e.length&&this.api.asc_findCell(e),Common.NotificationCenter.trigger("edit:complete",this.editor)}},onBlurCellEditor:function(){"clear"==this.api.isCEditorFocused?this.api.isCEditorFocused=void 0:this.api.isCellEdited&&(this.api.isCEditorFocused=!0)},onKeyupCellEditor:function(t){t.keyCode!=Common.UI.Keys.RETURN||t.altKey||(this.api.isCEditorFocused="clear")},expandEditorField:function(){this.editor.$el.height()>19?(this.editor.keep_height=this.editor.$el.height(),this.editor.$el.height(19),this.editor.$btnexpand.removeClass("btn-collapse")):(this.editor.$el.height(this.editor.keep_height||74),this.editor.$btnexpand.addClass("btn-collapse")),Common.NotificationCenter.trigger("layout:changed","celleditor"),Common.NotificationCenter.trigger("edit:complete",this.editor,{restorefocus:!0})},onInsertFunction:function(){if(this.mode.isEdit&&!this.editor.$btnfunc.hasClass("disabled")){var t=this.getApplication().getController("FormulaDialog");t&&($("#ce-func-label",this.editor.el).blur(),t.showDialog())}},onNamedRangesMenu:function(t,e){var i=this;if("manager"==e.options.value){for(var n=this.api.asc_getWorksheetsCount(),o=-1,s=[],a=[];++o2)},onLockDefNameManager:function(t){this.namedrange_locked=t==Asc.c_oAscDefinedNameReason.LockDefNameManager}})}),define("common/main/lib/view/ImageFromUrlDialog",["common/main/lib/component/Window"],function(){"use strict";Common.Views.ImageFromUrlDialog=Common.UI.Window.extend(_.extend({options:{width:330,header:!1,cls:"modal-dlg"},initialize:function(t){_.extend(this.options,t||{}),this.template=['
','
',"","
",'
',"
",'"].join(""),this.options.tpl=_.template(this.template)(this.options),Common.UI.Window.prototype.initialize.call(this,this.options)},render:function(){Common.UI.Window.prototype.render.call(this);var t=this;t.inputUrl=new Common.UI.InputField({el:$("#id-dlg-url"),allowBlank:!1,blankError:t.txtEmpty,style:"width: 100%;",validateOnBlur:!1,validation:function(e){return!!/((^https?)|(^ftp)):\/\/.+/i.test(e)||t.txtNotUrl}}),this.getChild().find(".btn").on("click",_.bind(this.onBtnClick,this))},show:function(){Common.UI.Window.prototype.show.apply(this,arguments);var t=this;_.delay(function(){t.getChild("input").focus()},500)},onPrimary:function(t){return this._handleInput("ok"),!1},onBtnClick:function(t){this._handleInput(t.currentTarget.attributes.result.value)},_handleInput:function(t){if(this.options.handler){if("ok"==t&&!0!==this.inputUrl.checkValidate())return void this.inputUrl.cmpEl.find("input").focus();this.options.handler.call(this,t,this.inputUrl.getValue())}this.close()},textUrl:"Paste an image URL:",cancelButtonText:"Cancel",okButtonText:"Ok",txtEmpty:"This field is required",txtNotUrl:'This field should be a URL in the format "http://www.example.com"'},Common.Views.ImageFromUrlDialog||{}))}),void 0===Common)var Common={};if(define("common/main/lib/component/LoadMask",["common/main/lib/component/BaseView"],function(){"use strict";Common.UI.LoadMask=Common.UI.BaseView.extend(function(){var t,e,i;return{options:{cls:"",style:"",title:"Loading...",owner:document.body},template:_.template(['"].join("")),initialize:function(t){Common.UI.BaseView.prototype.initialize.call(this,t),this.template=this.options.template||this.template,this.cls=this.options.cls,this.style=this.options.style,this.title=this.options.title,this.owner=this.options.owner},render:function(){return this},show:function(){if(!e&&!i){if(t=this.owner instanceof Common.UI.BaseView?$(this.owner.el):$(this.owner),t.hasClass("masked"))return this;var n=this;return e=$('
'),i=$(this.template({id:n.id,cls:n.cls,style:n.style,title:n.title})),t.addClass("masked"),t.append(e),t.append(i),i.css({top:Math.round(t.height()/2-(i.height()+parseInt(i.css("padding-top"))+parseInt(i.css("padding-bottom")))/2)+"px",left:Math.round(t.width()/2-(i.width()+parseInt(i.css("padding-left"))+parseInt(i.css("padding-right")))/2)+"px"}),(t.height()<1||t.width()<1)&&i.css({visibility:"hidden"}),Common.util.Shortcuts.suspendEvents(),this}},hide:function(){t&&t.removeClass("masked"),e&&e.remove(),i&&i.remove(),e=null,i=null,Common.util.Shortcuts.resumeEvents()},setTitle:function(e){this.title=e,t&&t.hasClass("masked")&&i&&$(".asc-loadmask-title",i).html(e)},isVisible:function(){return!_.isEmpty(i)},updatePosition:function(){t&&t.hasClass("masked")&&i&&(i.css({top:Math.round(t.height()/2-(i.height()+parseInt(i.css("padding-top"))+parseInt(i.css("padding-bottom")))/2)+"px",left:Math.round(t.width()/2-(i.width()+parseInt(i.css("padding-left"))+parseInt(i.css("padding-right")))/2)+"px"}),i.css({visibility:"visible"}))}}}())}),define("common/main/lib/view/SelectFileDlg",["common/main/lib/component/Window","common/main/lib/component/LoadMask"],function(){"use strict";Common.Views.SelectFileDlg=Common.UI.Window.extend(_.extend({initialize:function(t){var e={};_.extend(e,{title:this.textTitle,width:1024,height:621,header:!0},t),this.template=['
'].join(""),e.tpl=_.template(this.template)(e),this.fileChoiceUrl=t.fileChoiceUrl||"",Common.UI.Window.prototype.initialize.call(this,e)},render:function(){Common.UI.Window.prototype.render.call(this),this.$window.find("> .body").css({height:"auto",overflow:"hidden"});var t=document.createElement("iframe");t.width="100%",t.height=585,t.align="top",t.frameBorder=0,t.scrolling="no",t.onload=_.bind(this._onLoad,this),$("#id-select-file-placeholder").append(t),this.loadMask=new Common.UI.LoadMask({owner:$("#id-select-file-placeholder")}),this.loadMask.setTitle(this.textLoading),this.loadMask.show(), t.src=this.fileChoiceUrl;var e=this;this._eventfunc=function(t){e._onWindowMessage(t)},this._bindWindowEvents.call(this),this.on("close",function(t){e._unbindWindowEvents()})},_bindWindowEvents:function(){window.addEventListener?window.addEventListener("message",this._eventfunc,!1):window.attachEvent&&window.attachEvent("onmessage",this._eventfunc)},_unbindWindowEvents:function(){window.removeEventListener?window.removeEventListener("message",this._eventfunc):window.detachEvent&&window.detachEvent("onmessage",this._eventfunc)},_onWindowMessage:function(t){if(t&&window.JSON)try{this._onMessage.call(this,window.JSON.parse(t.data))}catch(t){}},_onMessage:function(t){if(t&&"onlyoffice"==t.Referer&&void 0!==t.file){Common.NotificationCenter.trigger("window:close",this);var e=this;setTimeout(function(){_.isEmpty(t.file)||e.trigger("selectfile",e,t.file)},50)}},_onLoad:function(){this.loadMask&&this.loadMask.hide()},textTitle:"Select Data Source",textLoading:"Loading"},Common.Views.SelectFileDlg||{}))}),void 0===Common)var Common={};if(define("common/main/lib/util/define",[],function(){"use strict";Common.define={},Common.define.c_oAscMathMainType={Symbol:0,Fraction:1,Script:2,Radical:3,Integral:4,LargeOperator:5,Bracket:6,Function:7,Accent:8,LimitLog:9,Operator:10,Matrix:11},Common.define.c_oAscMathType={Symbol_pm:0,Symbol_infinity:1,Symbol_equals:2,Symbol_neq:3,Symbol_about:4,Symbol_times:5,Symbol_div:6,Symbol_factorial:7,Symbol_propto:8,Symbol_less:9,Symbol_ll:10,Symbol_greater:11,Symbol_gg:12,Symbol_leq:13,Symbol_geq:14,Symbol_mp:15,Symbol_cong:16,Symbol_approx:17,Symbol_equiv:18,Symbol_forall:19,Symbol_additional:20,Symbol_partial:21,Symbol_sqrt:22,Symbol_cbrt:23,Symbol_qdrt:24,Symbol_cup:25,Symbol_cap:26,Symbol_emptyset:27,Symbol_percent:28,Symbol_degree:29,Symbol_fahrenheit:30,Symbol_celsius:31,Symbol_inc:32,Symbol_nabla:33,Symbol_exists:34,Symbol_notexists:35,Symbol_in:36,Symbol_ni:37,Symbol_leftarrow:38,Symbol_uparrow:39,Symbol_rightarrow:40,Symbol_downarrow:41,Symbol_leftrightarrow:42,Symbol_therefore:43,Symbol_plus:44,Symbol_minus:45,Symbol_not:46,Symbol_ast:47,Symbol_bullet:48,Symbol_vdots:49,Symbol_cdots:50,Symbol_rddots:51,Symbol_ddots:52,Symbol_aleph:53,Symbol_beth:54,Symbol_QED:55,Symbol_alpha:65536,Symbol_beta:65537,Symbol_gamma:65538,Symbol_delta:65539,Symbol_varepsilon:65540,Symbol_epsilon:65541,Symbol_zeta:65542,Symbol_eta:65543,Symbol_theta:65544,Symbol_vartheta:65545,Symbol_iota:65546,Symbol_kappa:65547,Symbol_lambda:65548,Symbol_mu:65549,Symbol_nu:65550,Symbol_xsi:65551,Symbol_o:65552,Symbol_pi:65553,Symbol_varpi:65554,Symbol_rho:65555,Symbol_varrho:65556,Symbol_sigma:65557,Symbol_varsigma:65558,Symbol_tau:65559,Symbol_upsilon:65560,Symbol_varphi:65561,Symbol_phi:65562,Symbol_chi:65563,Symbol_psi:65564,Symbol_omega:65565,Symbol_Alpha:131072,Symbol_Beta:131073,Symbol_Gamma:131074,Symbol_Delta:131075,Symbol_Epsilon:131076,Symbol_Zeta:131077,Symbol_Eta:131078,Symbol_Theta:131079,Symbol_Iota:131080,Symbol_Kappa:131081,Symbol_Lambda:131082,Symbol_Mu:131083,Symbol_Nu:131084,Symbol_Xsi:131085,Symbol_O:131086,Symbol_Pi:131087,Symbol_Rho:131088,Symbol_Sigma:131089,Symbol_Tau:131090,Symbol_Upsilon:131091,Symbol_Phi:131092,Symbol_Chi:131093,Symbol_Psi:131094,Symbol_Omega:131095,FractionVertical:16777216,FractionDiagonal:16777217,FractionHorizontal:16777218,FractionSmall:16777219,FractionDifferential_1:16842752,FractionDifferential_2:16842753,FractionDifferential_3:16842754,FractionDifferential_4:16842755,FractionPi_2:16842756,ScriptSup:33554432,ScriptSub:33554433,ScriptSubSup:33554434,ScriptSubSupLeft:33554435,ScriptCustom_1:33619968,ScriptCustom_2:33619969,ScriptCustom_3:33619970,ScriptCustom_4:33619971,RadicalSqrt:50331648,RadicalRoot_n:50331649,RadicalRoot_2:50331650,RadicalRoot_3:50331651,RadicalCustom_1:50397184,RadicalCustom_2:50397185,Integral:67108864,IntegralSubSup:67108865,IntegralCenterSubSup:67108866,IntegralDouble:67108867,IntegralDoubleSubSup:67108868,IntegralDoubleCenterSubSup:67108869,IntegralTriple:67108870,IntegralTripleSubSup:67108871,IntegralTripleCenterSubSup:67108872,IntegralOriented:67174400,IntegralOrientedSubSup:67174401,IntegralOrientedCenterSubSup:67174402,IntegralOrientedDouble:67174403,IntegralOrientedDoubleSubSup:67174404,IntegralOrientedDoubleCenterSubSup:67174405,IntegralOrientedTriple:67174406,IntegralOrientedTripleSubSup:67174407,IntegralOrientedTripleCenterSubSup:67174408,Integral_dx:67239936,Integral_dy:67239937,Integral_dtheta:67239938,LargeOperator_Sum:83886080,LargeOperator_Sum_CenterSubSup:83886081,LargeOperator_Sum_SubSup:83886082,LargeOperator_Sum_CenterSub:83886083,LargeOperator_Sum_Sub:83886084,LargeOperator_Prod:83951616,LargeOperator_Prod_CenterSubSup:83951617,LargeOperator_Prod_SubSup:83951618,LargeOperator_Prod_CenterSub:83951619,LargeOperator_Prod_Sub:83951620,LargeOperator_CoProd:83951621,LargeOperator_CoProd_CenterSubSup:83951622,LargeOperator_CoProd_SubSup:83951623,LargeOperator_CoProd_CenterSub:83951624,LargeOperator_CoProd_Sub:83951625,LargeOperator_Union:84017152,LargeOperator_Union_CenterSubSup:84017153,LargeOperator_Union_SubSup:84017154,LargeOperator_Union_CenterSub:84017155,LargeOperator_Union_Sub:84017156,LargeOperator_Intersection:84017157,LargeOperator_Intersection_CenterSubSup:84017158,LargeOperator_Intersection_SubSup:84017159,LargeOperator_Intersection_CenterSub:84017160,LargeOperator_Intersection_Sub:84017161,LargeOperator_Disjunction:84082688,LargeOperator_Disjunction_CenterSubSup:84082689,LargeOperator_Disjunction_SubSup:84082690,LargeOperator_Disjunction_CenterSub:84082691,LargeOperator_Disjunction_Sub:84082692,LargeOperator_Conjunction:84082693,LargeOperator_Conjunction_CenterSubSup:84082694,LargeOperator_Conjunction_SubSup:84082695,LargeOperator_Conjunction_CenterSub:84082696,LargeOperator_Conjunction_Sub:84082697,LargeOperator_Custom_1:84148224,LargeOperator_Custom_2:84148225,LargeOperator_Custom_3:84148226,LargeOperator_Custom_4:84148227,LargeOperator_Custom_5:84148228,Bracket_Round:100663296,Bracket_Square:100663297,Bracket_Curve:100663298,Bracket_Angle:100663299,Bracket_LowLim:100663300,Bracket_UppLim:100663301,Bracket_Line:100663302,Bracket_LineDouble:100663303,Bracket_Square_OpenOpen:100663304,Bracket_Square_CloseClose:100663305,Bracket_Square_CloseOpen:100663306,Bracket_SquareDouble:100663307,Bracket_Round_Delimiter_2:100728832,Bracket_Curve_Delimiter_2:100728833,Bracket_Angle_Delimiter_2:100728834,Bracket_Angle_Delimiter_3:100728835,Bracket_Round_OpenNone:100794368,Bracket_Round_NoneOpen:100794369,Bracket_Square_OpenNone:100794370,Bracket_Square_NoneOpen:100794371,Bracket_Curve_OpenNone:100794372,Bracket_Curve_NoneOpen:100794373,Bracket_Angle_OpenNone:100794374,Bracket_Angle_NoneOpen:100794375,Bracket_LowLim_OpenNone:100794376,Bracket_LowLim_NoneNone:100794377,Bracket_UppLim_OpenNone:100794378,Bracket_UppLim_NoneOpen:100794379,Bracket_Line_OpenNone:100794380,Bracket_Line_NoneOpen:100794381,Bracket_LineDouble_OpenNone:100794382,Bracket_LineDouble_NoneOpen:100794383,Bracket_SquareDouble_OpenNone:100794384,Bracket_SquareDouble_NoneOpen:100794385,Bracket_Custom_1:100859904,Bracket_Custom_2:100859905,Bracket_Custom_3:100859906,Bracket_Custom_4:100859907,Bracket_Custom_5:100925440,Bracket_Custom_6:100925441,Bracket_Custom_7:100925442,Function_Sin:117440512,Function_Cos:117440513,Function_Tan:117440514,Function_Csc:117440515,Function_Sec:117440516,Function_Cot:117440517,Function_1_Sin:117506048,Function_1_Cos:117506049,Function_1_Tan:117506050,Function_1_Csc:117506051,Function_1_Sec:117506052,Function_1_Cot:117506053,Function_Sinh:117571584,Function_Cosh:117571585,Function_Tanh:117571586,Function_Csch:117571587,Function_Sech:117571588,Function_Coth:117571589,Function_1_Sinh:117637120,Function_1_Cosh:117637121,Function_1_Tanh:117637122,Function_1_Csch:117637123,Function_1_Sech:117637124,Function_1_Coth:117637125,Function_Custom_1:117702656,Function_Custom_2:117702657,Function_Custom_3:117702658,Accent_Dot:134217728,Accent_DDot:134217729,Accent_DDDot:134217730,Accent_Hat:134217731,Accent_Check:134217732,Accent_Accent:134217733,Accent_Grave:134217734,Accent_Smile:134217735,Accent_Tilde:134217736,Accent_Bar:134217737,Accent_DoubleBar:134217738,Accent_CurveBracketTop:134217739,Accent_CurveBracketBot:134217740,Accent_GroupTop:134217741,Accent_GroupBot:134217742,Accent_ArrowL:134217743,Accent_ArrowR:134217744,Accent_ArrowD:134217745,Accent_HarpoonL:134217746,Accent_HarpoonR:134217747,Accent_BorderBox:134283264,Accent_BorderBoxCustom:134283265,Accent_BarTop:134348800,Accent_BarBot:134348801,Accent_Custom_1:134414336,Accent_Custom_2:134414337,Accent_Custom_3:134414338,LimitLog_LogBase:150994944,LimitLog_Log:150994945,LimitLog_Lim:150994946,LimitLog_Min:150994947,LimitLog_Max:150994948,LimitLog_Ln:150994949,LimitLog_Custom_1:151060480,LimitLog_Custom_2:151060481,Operator_ColonEquals:167772160,Operator_EqualsEquals:167772161,Operator_PlusEquals:167772162,Operator_MinusEquals:167772163,Operator_Definition:167772164,Operator_UnitOfMeasure:167772165,Operator_DeltaEquals:167772166,Operator_ArrowL_Top:167837696,Operator_ArrowR_Top:167837697,Operator_ArrowL_Bot:167837698,Operator_ArrowR_Bot:167837699,Operator_DoubleArrowL_Top:167837700,Operator_DoubleArrowR_Top:167837701,Operator_DoubleArrowL_Bot:167837702,Operator_DoubleArrowR_Bot:167837703,Operator_ArrowD_Top:167837704,Operator_ArrowD_Bot:167837705,Operator_DoubleArrowD_Top:167837706,Operator_DoubleArrowD_Bot:167837707,Operator_Custom_1:167903232,Operator_Custom_2:167903233,Matrix_1_2:184549376,Matrix_2_1:184549377,Matrix_1_3:184549378,Matrix_3_1:184549379,Matrix_2_2:184549380,Matrix_2_3:184549381,Matrix_3_2:184549382,Matrix_3_3:184549383,Matrix_Dots_Center:184614912,Matrix_Dots_Baseline:184614913,Matrix_Dots_Vertical:184614914,Matrix_Dots_Diagonal:184614915,Matrix_Identity_2:184680448,Matrix_Identity_2_NoZeros:184680449,Matrix_Identity_3:184680450,Matrix_Identity_3_NoZeros:184680451,Matrix_2_2_RoundBracket:184745984,Matrix_2_2_SquareBracket:184745985,Matrix_2_2_LineBracket:184745986,Matrix_2_2_DLineBracket:184745987,Matrix_Flat_Round:184811520,Matrix_Flat_Square:184811521}}),define("text!spreadsheeteditor/main/app/template/Toolbar.template",[],function(){return'
\n
\n
\n <%= tabsmarkup %>\n
\n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n \n \n \n \n
\n
\n \n \n \n \n \n \n \n \n
\n
\n
\n
\n
\n \n \n \n \n \n
\n
\n \n \n \n \n \n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n
\n
\n \n
\n
\n \n \n \n \n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n \n \n \n \n \n
\n
\n
\n \n \n
\n
\n
\n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n \n \n \n \n
\n
\n
\n
\n \n
\n
\n
\n \n \n \n \n \n \n \n \n \n
\n
\n
\n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n
\n \n
\n
\n
\n \n \n
\n \x3c!--
--\x3e\n \x3c!--
--\x3e\n \x3c!----\x3e\n \x3c!--
--\x3e\n \x3c!--
--\x3e\n \x3c!----\x3e\n \x3c!--
--\x3e\n \x3c!--
--\x3e\n
\n
\n
\n
'}),define("text!spreadsheeteditor/main/app/template/ToolbarAnother.template",[],function(){return'
\n <% if ( isEditDiagram ) { %>\n \x3c!-----------------------\x3e\n \x3c!-- Edit diagram mode --\x3e\n \x3c!-----------------------\x3e\n
\n
\n
\n \n \n \n \n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n \n \n \n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n <% } else if ( isEditMailMerge ) { %>\n \x3c!-----------------------\x3e\n \x3c!-- Edit mail merge mode --\x3e\n \x3c!-----------------------\x3e\n
\n
\n
\n \n \n \n \n
\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n <% } %>\n
'}),define("text!spreadsheeteditor/main/app/template/ToolbarView.template",[],function(){return'
\n
\n
\n <%= tabsmarkup %>\n
\n
\n
\n
\n
\n
\n
\n
'}),void 0===Common)var Common={};if(Common.Models=Common.Models||{},define("common/main/lib/model/Font",["backbone"],function(t){"use strict";Common.Models.Font=t.Model.extend({defaults:function(){return{id:Common.UI.getId(),name:null,cloneid:null,imgidx:0,type:0}}})}),void 0===Common)var Common={};if(Common.Collections=Common.Collections||{},define("common/main/lib/collection/Fonts",["backbone","common/main/lib/model/Font"],function(t){"use strict";Common.Collections.Fonts=t.Collection.extend({model:Common.Models.Font,comparator:function(t,e){var i=t.get("name").toLowerCase(),n=e.get("name").toLowerCase();return i==n?0:i","<% if (iconImg) { print(''); } else { %>","<% if (iconCls != \"\") { if (/svgicon/.test(iconCls)) {print('');} else print(' '); }} %>","<% } %>","<% if ( !menu ) { %>",'","<% } else if (split == false) {%>",'
','","
","<% } else { %>",'
','",'","
","<% } %>"].join("")),initialize:function(t){Common.UI.BaseView.prototype.initialize.call(this,t);var e=this;e.id=e.options.id||Common.UI.getId(),e.hint=e.options.hint,e.enableToggle=e.options.enableToggle,e.allowDepress=e.options.allowDepress,e.cls=e.options.cls,e.iconCls=e.options.iconCls,e.menu=e.options.menu,e.split=e.options.split,e.toggleGroup=e.options.toggleGroup,e.disabled=e.options.disabled,e.visible=e.options.visible,e.pressed=e.options.pressed,e.caption=e.options.caption,e.template=e.options.template||e.template,e.style=e.options.style,e.rendered=!1,e.options.el&&e.render()},render:function(t){var e=this;if(e.trigger("render:before",e),e.cmpEl=$(e.el),t&&(e.setElement(t,!1),e.rendered||(/icon-top/.test(e.cls)&&e.caption&&/huge/.test(e.cls)&&(!0===e.split?(!!e.cls&&(e.cls=e.cls.replace(/\s?(?:x-huge|icon-top)/g,"")),this.template=_.template('
')):e.menu?this.template=_.template('
'):this.template=_.template('')),e.cmpEl=$(this.template({id:e.id,cls:e.cls,iconCls:e.iconCls,iconImg:e.options.iconImg,menu:e.menu,split:e.split,disabled:e.disabled,pressed:e.pressed,caption:e.caption,style:e.style})),e.menu&&_.isObject(e.menu)&&_.isFunction(e.menu.render)&&e.menu.render(e.cmpEl),t.html(e.cmpEl),e.$icon=e.$el.find(".icon"))),!e.rendered){var i=e.cmpEl,n=i.hasClass("btn-group"),o=i.hasClass("split");if(e.options.hint){var s=e.cmpEl.closest(".asc-window");if("object"==typeof e.options.hint&&e.options.hint.length>1&&$("button",i).length>0){var a=$("button",i);e.btnEl=$(a[0]),e.btnMenuEl=$(a[1])}else e.btnEl=e.cmpEl,e.btnEl.attr("data-toggle","tooltip");e.btnEl.tooltip({ diff --git a/www/common/onlyoffice/x2t/README.md b/www/common/onlyoffice/x2t/README.md deleted file mode 100644 index 2c20b9cc2..000000000 --- a/www/common/onlyoffice/x2t/README.md +++ /dev/null @@ -1,11 +0,0 @@ - -LICENCE: GNU AGPL v3.0 - -The code in x2t.js is a WASM build based on the OnlyOffice Core source from this repository: - -https://github.com/ldubost/core/commits/wasm32-5.2.6 - -It is built using emscripten using docker: - -https://git.xwikisas.com/caubin/onlyoffice-x2t-wasm/tree/master/x2t-wasm - diff --git a/www/common/onlyoffice/x2t/x2t.js b/www/common/onlyoffice/x2t/x2t.js index c87f65922..181b2db8f 100644 --- a/www/common/onlyoffice/x2t/x2t.js +++ b/www/common/onlyoffice/x2t/x2t.js @@ -635,8 +635,8 @@ function getValue(ptr, type, noSafe) { } var wasmMemory; var wasmTable = new WebAssembly.Table({ - "initial": 63857, - "maximum": 63857 + 0, + "initial": 64685, + "maximum": 64685 + 0, "element": "anyfunc" }); var wasmModule; @@ -996,7 +996,7 @@ function updateGlobalBufferAndViews(buf) { Module["HEAPF32"] = HEAPF32 = new Float32Array(buf); Module["HEAPF64"] = HEAPF64 = new Float64Array(buf); } -var STATIC_BASE = 1024, STACK_BASE = 17838800, STACKTOP = STACK_BASE, STACK_MAX = 12595920, DYNAMIC_BASE = 17838800, DYNAMICTOP_PTR = 12594960; +var STATIC_BASE = 1024, STACK_BASE = 19131664, STACKTOP = STACK_BASE, STACK_MAX = 13888784, DYNAMIC_BASE = 19131664, DYNAMICTOP_PTR = 13887824; assert(STACK_BASE % 16 === 0, "stack must start aligned"); assert(DYNAMIC_BASE % 16 === 0, "heap must start aligned"); if (ENVIRONMENT_IS_PTHREAD) { @@ -1385,15 +1385,15 @@ var ASM_CONSTS = { root: "." }, "/working"); }), - 10774952: (function() { + 11958700: (function() { throw "Canceled!"; }), - 10775091: (function() { + 11958839: (function() { postMessage({ cmd: "processQueuedMainThreadWork" }); }), - 10775142: (function($0) { + 11958890: (function($0) { if (!ENVIRONMENT_IS_PTHREAD) { if (!PThread.pthreads[$0] || !PThread.pthreads[$0].worker) { return 0; @@ -1409,10 +1409,10 @@ var ASM_CONSTS = { } return 1; }), - 10775510: (function() { + 11959258: (function() { return !!Module["canvas"]; }), - 10775546: (function() { + 11959294: (function() { noExitRuntime = true; }) }; @@ -1480,96 +1480,261 @@ function stackTrace() { return demangleAll(js); } Module["stackTrace"] = stackTrace; -function __ZN12CPdfRenderer10SaveToFileERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE() { - err("missing function: _ZN12CPdfRenderer10SaveToFileERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE"); +function __ZN23CFileDownloader_privateC1ENSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEEb() { + err("missing function: _ZN23CFileDownloader_privateC1ENSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEEb"); abort(-1); } -Module["__ZN12CPdfRenderer10SaveToFileERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE"] = __ZN12CPdfRenderer10SaveToFileERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE; -function __ZN12CPdfRenderer11SetPasswordERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE() { - err("missing function: _ZN12CPdfRenderer11SetPasswordERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE"); +Module["__ZN23CFileDownloader_privateC1ENSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEEb"] = __ZN23CFileDownloader_privateC1ENSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEEb; +function __ZN2v810Uint8Array3NewENS_5LocalINS_11ArrayBufferEEEmm() { + err("missing function: _ZN2v810Uint8Array3NewENS_5LocalINS_11ArrayBufferEEEmm"); abort(-1); } -Module["__ZN12CPdfRenderer11SetPasswordERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE"] = __ZN12CPdfRenderer11SetPasswordERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE; -function __ZN12CPdfRenderer13SetDocumentIDERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE() { - err("missing function: _ZN12CPdfRenderer13SetDocumentIDERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE"); +Module["__ZN2v810Uint8Array3NewENS_5LocalINS_11ArrayBufferEEEmm"] = __ZN2v810Uint8Array3NewENS_5LocalINS_11ArrayBufferEEEmm; +function __ZN2v811ArrayBuffer11ExternalizeEv() { + err("missing function: _ZN2v811ArrayBuffer11ExternalizeEv"); abort(-1); } -Module["__ZN12CPdfRenderer13SetDocumentIDERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE"] = __ZN12CPdfRenderer13SetDocumentIDERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE; -function __ZN12CPdfRenderer13SetTempFolderERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE() { - err("missing function: _ZN12CPdfRenderer13SetTempFolderERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE"); +Module["__ZN2v811ArrayBuffer11ExternalizeEv"] = __ZN2v811ArrayBuffer11ExternalizeEv; +function __ZN2v811ArrayBuffer3NewEPNS_7IsolateEPvmNS_23ArrayBufferCreationModeE() { + err("missing function: _ZN2v811ArrayBuffer3NewEPNS_7IsolateEPvmNS_23ArrayBufferCreationModeE"); abort(-1); } -Module["__ZN12CPdfRenderer13SetTempFolderERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE"] = __ZN12CPdfRenderer13SetTempFolderERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE; -function __ZN12CPdfRenderer14SetThemesPlaceERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE() { - err("missing function: _ZN12CPdfRenderer14SetThemesPlaceERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE"); +Module["__ZN2v811ArrayBuffer3NewEPNS_7IsolateEPvmNS_23ArrayBufferCreationModeE"] = __ZN2v811ArrayBuffer3NewEPNS_7IsolateEPvmNS_23ArrayBufferCreationModeE; +function __ZN2v811ArrayBuffer9Allocator19NewDefaultAllocatorEv() { + err("missing function: _ZN2v811ArrayBuffer9Allocator19NewDefaultAllocatorEv"); abort(-1); } -Module["__ZN12CPdfRenderer14SetThemesPlaceERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE"] = __ZN12CPdfRenderer14SetThemesPlaceERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE; -function __ZN12CPdfRenderer15OnlineWordToPdfERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEES8_RKb() { - err("missing function: _ZN12CPdfRenderer15OnlineWordToPdfERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEES8_RKb"); +Module["__ZN2v811ArrayBuffer9Allocator19NewDefaultAllocatorEv"] = __ZN2v811ArrayBuffer9Allocator19NewDefaultAllocatorEv; +function __ZN2v811HandleScope12CreateHandleEPNS_8internal10HeapObjectEPNS1_6ObjectE() { + err("missing function: _ZN2v811HandleScope12CreateHandleEPNS_8internal10HeapObjectEPNS1_6ObjectE"); abort(-1); } -Module["__ZN12CPdfRenderer15OnlineWordToPdfERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEES8_RKb"] = __ZN12CPdfRenderer15OnlineWordToPdfERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEES8_RKb; -function __ZN12CPdfRenderer25OnlineWordToPdfFromBinaryERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEES8_RKb() { - err("missing function: _ZN12CPdfRenderer25OnlineWordToPdfFromBinaryERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEES8_RKb"); +Module["__ZN2v811HandleScope12CreateHandleEPNS_8internal10HeapObjectEPNS1_6ObjectE"] = __ZN2v811HandleScope12CreateHandleEPNS_8internal10HeapObjectEPNS1_6ObjectE; +function __ZN2v811HandleScopeC1EPNS_7IsolateE() { + err("missing function: _ZN2v811HandleScopeC1EPNS_7IsolateE"); abort(-1); } -Module["__ZN12CPdfRenderer25OnlineWordToPdfFromBinaryERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEES8_RKb"] = __ZN12CPdfRenderer25OnlineWordToPdfFromBinaryERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEES8_RKb; -function __ZN12CPdfRendererC1EPN7NSFonts17IApplicationFontsEb() { - err("missing function: _ZN12CPdfRendererC1EPN7NSFonts17IApplicationFontsEb"); +Module["__ZN2v811HandleScopeC1EPNS_7IsolateE"] = __ZN2v811HandleScopeC1EPNS_7IsolateE; +function __ZN2v811HandleScopeD1Ev() { + err("missing function: _ZN2v811HandleScopeD1Ev"); abort(-1); } -Module["__ZN12CPdfRendererC1EPN7NSFonts17IApplicationFontsEb"] = __ZN12CPdfRendererC1EPN7NSFonts17IApplicationFontsEb; -function __ZN12CPdfRendererD1Ev() { - err("missing function: _ZN12CPdfRendererD1Ev"); +Module["__ZN2v811HandleScopeD1Ev"] = __ZN2v811HandleScopeD1Ev; +function __ZN2v814ObjectTemplate11NewInstanceEv() { + err("missing function: _ZN2v814ObjectTemplate11NewInstanceEv"); abort(-1); } -Module["__ZN12CPdfRendererD1Ev"] = __ZN12CPdfRendererD1Ev; -function __ZN14NSDoctRenderer13CDoctrenderer18GetImagesInChangesEv() { - err("missing function: _ZN14NSDoctRenderer13CDoctrenderer18GetImagesInChangesEv"); +Module["__ZN2v814ObjectTemplate11NewInstanceEv"] = __ZN2v814ObjectTemplate11NewInstanceEv; +function __ZN2v814ObjectTemplate11SetAccessorENS_5LocalINS_6StringEEEPFvS3_RKNS_20PropertyCallbackInfoINS_5ValueEEEEPFvS3_NS1_IS5_EERKNS4_IvEEESB_NS_13AccessControlENS_17PropertyAttributeENS1_INS_17AccessorSignatureEEE() { + err("missing function: _ZN2v814ObjectTemplate11SetAccessorENS_5LocalINS_6StringEEEPFvS3_RKNS_20PropertyCallbackInfoINS_5ValueEEEEPFvS3_NS1_IS5_EERKNS4_IvEEESB_NS_13AccessControlENS_17PropertyAttributeENS1_INS_17AccessorSignatureEEE"); abort(-1); } -Module["__ZN14NSDoctRenderer13CDoctrenderer18GetImagesInChangesEv"] = __ZN14NSDoctRenderer13CDoctrenderer18GetImagesInChangesEv; -function __ZN14NSDoctRenderer13CDoctrenderer7ExecuteERKNSt3__212basic_stringIwNS1_11char_traitsIwEENS1_9allocatorIwEEEERS7_() { - err("missing function: _ZN14NSDoctRenderer13CDoctrenderer7ExecuteERKNSt3__212basic_stringIwNS1_11char_traitsIwEENS1_9allocatorIwEEEERS7_"); +Module["__ZN2v814ObjectTemplate11SetAccessorENS_5LocalINS_6StringEEEPFvS3_RKNS_20PropertyCallbackInfoINS_5ValueEEEEPFvS3_NS1_IS5_EERKNS4_IvEEESB_NS_13AccessControlENS_17PropertyAttributeENS1_INS_17AccessorSignatureEEE"] = __ZN2v814ObjectTemplate11SetAccessorENS_5LocalINS_6StringEEEPFvS3_RKNS_20PropertyCallbackInfoINS_5ValueEEEEPFvS3_NS1_IS5_EERKNS4_IvEEESB_NS_13AccessControlENS_17PropertyAttributeENS1_INS_17AccessorSignatureEEE; +function __ZN2v814ObjectTemplate21SetInternalFieldCountEi() { + err("missing function: _ZN2v814ObjectTemplate21SetInternalFieldCountEi"); abort(-1); } -Module["__ZN14NSDoctRenderer13CDoctrenderer7ExecuteERKNSt3__212basic_stringIwNS1_11char_traitsIwEENS1_9allocatorIwEEEERS7_"] = __ZN14NSDoctRenderer13CDoctrenderer7ExecuteERKNSt3__212basic_stringIwNS1_11char_traitsIwEENS1_9allocatorIwEEEERS7_; -function __ZN14NSDoctRenderer13CDoctrendererC1ERKNSt3__212basic_stringIwNS1_11char_traitsIwEENS1_9allocatorIwEEEE() { - err("missing function: _ZN14NSDoctRenderer13CDoctrendererC1ERKNSt3__212basic_stringIwNS1_11char_traitsIwEENS1_9allocatorIwEEEE"); +Module["__ZN2v814ObjectTemplate21SetInternalFieldCountEi"] = __ZN2v814ObjectTemplate21SetInternalFieldCountEi; +function __ZN2v814ObjectTemplate3NewEv() { + err("missing function: _ZN2v814ObjectTemplate3NewEv"); abort(-1); } -Module["__ZN14NSDoctRenderer13CDoctrendererC1ERKNSt3__212basic_stringIwNS1_11char_traitsIwEENS1_9allocatorIwEEEE"] = __ZN14NSDoctRenderer13CDoctrendererC1ERKNSt3__212basic_stringIwNS1_11char_traitsIwEENS1_9allocatorIwEEEE; -function __ZN14NSDoctRenderer13CDoctrendererD1Ev() { - err("missing function: _ZN14NSDoctRenderer13CDoctrendererD1Ev"); +Module["__ZN2v814ObjectTemplate3NewEv"] = __ZN2v814ObjectTemplate3NewEv; +function __ZN2v814ScriptCompiler10CachedDataC1EPKhiNS1_12BufferPolicyE() { + err("missing function: _ZN2v814ScriptCompiler10CachedDataC1EPKhiNS1_12BufferPolicyE"); abort(-1); } -Module["__ZN14NSDoctRenderer13CDoctrendererD1Ev"] = __ZN14NSDoctRenderer13CDoctrendererD1Ev; -function __ZN14NSHtmlRenderer17CASCHTMLRenderer316CreateOfficeFileENSt3__212basic_stringIwNS1_11char_traitsIwEENS1_9allocatorIwEEEERKS7_() { - err("missing function: _ZN14NSHtmlRenderer17CASCHTMLRenderer316CreateOfficeFileENSt3__212basic_stringIwNS1_11char_traitsIwEENS1_9allocatorIwEEEERKS7_"); +Module["__ZN2v814ScriptCompiler10CachedDataC1EPKhiNS1_12BufferPolicyE"] = __ZN2v814ScriptCompiler10CachedDataC1EPKhiNS1_12BufferPolicyE; +function __ZN2v814ScriptCompiler7CompileENS_5LocalINS_7ContextEEEPNS0_6SourceENS0_14CompileOptionsE() { + err("missing function: _ZN2v814ScriptCompiler7CompileENS_5LocalINS_7ContextEEEPNS0_6SourceENS0_14CompileOptionsE"); abort(-1); } -Module["__ZN14NSHtmlRenderer17CASCHTMLRenderer316CreateOfficeFileENSt3__212basic_stringIwNS1_11char_traitsIwEENS1_9allocatorIwEEEERKS7_"] = __ZN14NSHtmlRenderer17CASCHTMLRenderer316CreateOfficeFileENSt3__212basic_stringIwNS1_11char_traitsIwEENS1_9allocatorIwEEEERKS7_; -function __ZN14NSHtmlRenderer17CASCHTMLRenderer39CloseFileEb() { - err("missing function: _ZN14NSHtmlRenderer17CASCHTMLRenderer39CloseFileEb"); +Module["__ZN2v814ScriptCompiler7CompileENS_5LocalINS_7ContextEEEPNS0_6SourceENS0_14CompileOptionsE"] = __ZN2v814ScriptCompiler7CompileENS_5LocalINS_7ContextEEEPNS0_6SourceENS0_14CompileOptionsE; +function __ZN2v815ArrayBufferView6BufferEv() { + err("missing function: _ZN2v815ArrayBufferView6BufferEv"); abort(-1); } -Module["__ZN14NSHtmlRenderer17CASCHTMLRenderer39CloseFileEb"] = __ZN14NSHtmlRenderer17CASCHTMLRenderer39CloseFileEb; -function __ZN14NSHtmlRenderer17CASCHTMLRenderer3C1Ev() { - err("missing function: _ZN14NSHtmlRenderer17CASCHTMLRenderer3C1Ev"); +Module["__ZN2v815ArrayBufferView6BufferEv"] = __ZN2v815ArrayBufferView6BufferEv; +function __ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorE() { + err("missing function: _ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorE"); abort(-1); } -Module["__ZN14NSHtmlRenderer17CASCHTMLRenderer3C1Ev"] = __ZN14NSHtmlRenderer17CASCHTMLRenderer3C1Ev; -function __ZN14NSHtmlRenderer17CASCHTMLRenderer3D1Ev() { - err("missing function: _ZN14NSHtmlRenderer17CASCHTMLRenderer3D1Ev"); +Module["__ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorE"] = __ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorE; +function __ZN2v819ResourceConstraintsC1Ev() { + err("missing function: _ZN2v819ResourceConstraintsC1Ev"); abort(-1); } -Module["__ZN14NSHtmlRenderer17CASCHTMLRenderer3D1Ev"] = __ZN14NSHtmlRenderer17CASCHTMLRenderer3D1Ev; -function __ZN23CFileDownloader_privateC1ENSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEEb() { - err("missing function: _ZN23CFileDownloader_privateC1ENSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEEb"); +Module["__ZN2v819ResourceConstraintsC1Ev"] = __ZN2v819ResourceConstraintsC1Ev; +function __ZN2v82V812ToLocalEmptyEv() { + err("missing function: _ZN2v82V812ToLocalEmptyEv"); abort(-1); } -Module["__ZN23CFileDownloader_privateC1ENSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEEb"] = __ZN23CFileDownloader_privateC1ENSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEEb; +Module["__ZN2v82V812ToLocalEmptyEv"] = __ZN2v82V812ToLocalEmptyEv; +function __ZN2v84JSON5ParseENS_5LocalINS_6StringEEE() { + err("missing function: _ZN2v84JSON5ParseENS_5LocalINS_6StringEEE"); + abort(-1); +} +Module["__ZN2v84JSON5ParseENS_5LocalINS_6StringEEE"] = __ZN2v84JSON5ParseENS_5LocalINS_6StringEEE; +function __ZN2v85Array3NewEPNS_7IsolateEi() { + err("missing function: _ZN2v85Array3NewEPNS_7IsolateEi"); + abort(-1); +} +Module["__ZN2v85Array3NewEPNS_7IsolateEi"] = __ZN2v85Array3NewEPNS_7IsolateEi; +function __ZN2v86Locker10InitializeEPNS_7IsolateE() { + err("missing function: _ZN2v86Locker10InitializeEPNS_7IsolateE"); + abort(-1); +} +Module["__ZN2v86Locker10InitializeEPNS_7IsolateE"] = __ZN2v86Locker10InitializeEPNS_7IsolateE; +function __ZN2v86LockerD1Ev() { + err("missing function: _ZN2v86LockerD1Ev"); + abort(-1); +} +Module["__ZN2v86LockerD1Ev"] = __ZN2v86LockerD1Ev; +function __ZN2v86Object16SetInternalFieldEiNS_5LocalINS_5ValueEEE() { + err("missing function: _ZN2v86Object16SetInternalFieldEiNS_5LocalINS_5ValueEEE"); + abort(-1); +} +Module["__ZN2v86Object16SetInternalFieldEiNS_5LocalINS_5ValueEEE"] = __ZN2v86Object16SetInternalFieldEiNS_5LocalINS_5ValueEEE; +function __ZN2v86Object20SlowGetInternalFieldEi() { + err("missing function: _ZN2v86Object20SlowGetInternalFieldEi"); + abort(-1); +} +Module["__ZN2v86Object20SlowGetInternalFieldEi"] = __ZN2v86Object20SlowGetInternalFieldEi; +function __ZN2v86Object3GetENS_5LocalINS_5ValueEEE() { + err("missing function: _ZN2v86Object3GetENS_5LocalINS_5ValueEEE"); + abort(-1); +} +Module["__ZN2v86Object3GetENS_5LocalINS_5ValueEEE"] = __ZN2v86Object3GetENS_5LocalINS_5ValueEEE; +function __ZN2v86Object3NewEPNS_7IsolateE() { + err("missing function: _ZN2v86Object3NewEPNS_7IsolateE"); + abort(-1); +} +Module["__ZN2v86Object3NewEPNS_7IsolateE"] = __ZN2v86Object3NewEPNS_7IsolateE; +function __ZN2v86Object3SetENS_5LocalINS_5ValueEEES3_() { + err("missing function: _ZN2v86Object3SetENS_5LocalINS_5ValueEEES3_"); + abort(-1); +} +Module["__ZN2v86Object3SetENS_5LocalINS_5ValueEEES3_"] = __ZN2v86Object3SetENS_5LocalINS_5ValueEEES3_; +function __ZN2v86Object3SetEjNS_5LocalINS_5ValueEEE() { + err("missing function: _ZN2v86Object3SetEjNS_5LocalINS_5ValueEEE"); + abort(-1); +} +Module["__ZN2v86Object3SetEjNS_5LocalINS_5ValueEEE"] = __ZN2v86Object3SetEjNS_5LocalINS_5ValueEEE; +function __ZN2v86Script3RunEv() { + err("missing function: _ZN2v86Script3RunEv"); + abort(-1); +} +Module["__ZN2v86Script3RunEv"] = __ZN2v86Script3RunEv; +function __ZN2v86Script7CompileENS_5LocalINS_6StringEEEPNS_12ScriptOriginE() { + err("missing function: _ZN2v86Script7CompileENS_5LocalINS_6StringEEEPNS_12ScriptOriginE"); + abort(-1); +} +Module["__ZN2v86Script7CompileENS_5LocalINS_6StringEEEPNS_12ScriptOriginE"] = __ZN2v86Script7CompileENS_5LocalINS_6StringEEEPNS_12ScriptOriginE; +function __ZN2v86String11NewFromUtf8EPNS_7IsolateEPKcNS0_13NewStringTypeEi() { + err("missing function: _ZN2v86String11NewFromUtf8EPNS_7IsolateEPKcNS0_13NewStringTypeEi"); + abort(-1); +} +Module["__ZN2v86String11NewFromUtf8EPNS_7IsolateEPKcNS0_13NewStringTypeEi"] = __ZN2v86String11NewFromUtf8EPNS_7IsolateEPKcNS0_13NewStringTypeEi; +function __ZN2v86String5ValueC1ENS_5LocalINS_5ValueEEE() { + err("missing function: _ZN2v86String5ValueC1ENS_5LocalINS_5ValueEEE"); + abort(-1); +} +Module["__ZN2v86String5ValueC1ENS_5LocalINS_5ValueEEE"] = __ZN2v86String5ValueC1ENS_5LocalINS_5ValueEEE; +function __ZN2v86String5ValueD1Ev() { + err("missing function: _ZN2v86String5ValueD1Ev"); + abort(-1); +} +Module["__ZN2v86String5ValueD1Ev"] = __ZN2v86String5ValueD1Ev; +function __ZN2v86String9Utf8ValueC1ENS_5LocalINS_5ValueEEE() { + err("missing function: _ZN2v86String9Utf8ValueC1ENS_5LocalINS_5ValueEEE"); + abort(-1); +} +Module["__ZN2v86String9Utf8ValueC1ENS_5LocalINS_5ValueEEE"] = __ZN2v86String9Utf8ValueC1ENS_5LocalINS_5ValueEEE; +function __ZN2v86String9Utf8ValueD1Ev() { + err("missing function: _ZN2v86String9Utf8ValueD1Ev"); + abort(-1); +} +Module["__ZN2v86String9Utf8ValueD1Ev"] = __ZN2v86String9Utf8ValueD1Ev; +function __ZN2v87Context3NewEPNS_7IsolateEPNS_22ExtensionConfigurationENS_10MaybeLocalINS_14ObjectTemplateEEENS5_INS_5ValueEEE() { + err("missing function: _ZN2v87Context3NewEPNS_7IsolateEPNS_22ExtensionConfigurationENS_10MaybeLocalINS_14ObjectTemplateEEENS5_INS_5ValueEEE"); + abort(-1); +} +Module["__ZN2v87Context3NewEPNS_7IsolateEPNS_22ExtensionConfigurationENS_10MaybeLocalINS_14ObjectTemplateEEENS5_INS_5ValueEEE"] = __ZN2v87Context3NewEPNS_7IsolateEPNS_22ExtensionConfigurationENS_10MaybeLocalINS_14ObjectTemplateEEENS5_INS_5ValueEEE; +function __ZN2v87Context4ExitEv() { + err("missing function: _ZN2v87Context4ExitEv"); + abort(-1); +} +Module["__ZN2v87Context4ExitEv"] = __ZN2v87Context4ExitEv; +function __ZN2v87Context5EnterEv() { + err("missing function: _ZN2v87Context5EnterEv"); + abort(-1); +} +Module["__ZN2v87Context5EnterEv"] = __ZN2v87Context5EnterEv; +function __ZN2v87Context6GlobalEv() { + err("missing function: _ZN2v87Context6GlobalEv"); + abort(-1); +} +Module["__ZN2v87Context6GlobalEv"] = __ZN2v87Context6GlobalEv; +function __ZN2v87Integer3NewEPNS_7IsolateEi() { + err("missing function: _ZN2v87Integer3NewEPNS_7IsolateEi"); + abort(-1); +} +Module["__ZN2v87Integer3NewEPNS_7IsolateEi"] = __ZN2v87Integer3NewEPNS_7IsolateEi; +function __ZN2v87Isolate10GetCurrentEv() { + err("missing function: _ZN2v87Isolate10GetCurrentEv"); + abort(-1); +} +Module["__ZN2v87Isolate10GetCurrentEv"] = __ZN2v87Isolate10GetCurrentEv; +function __ZN2v87Isolate17GetCurrentContextEv() { + err("missing function: _ZN2v87Isolate17GetCurrentContextEv"); + abort(-1); +} +Module["__ZN2v87Isolate17GetCurrentContextEv"] = __ZN2v87Isolate17GetCurrentContextEv; +function __ZN2v87Isolate3NewERKNS0_12CreateParamsE() { + err("missing function: _ZN2v87Isolate3NewERKNS0_12CreateParamsE"); + abort(-1); +} +Module["__ZN2v87Isolate3NewERKNS0_12CreateParamsE"] = __ZN2v87Isolate3NewERKNS0_12CreateParamsE; +function __ZN2v87Isolate4ExitEv() { + err("missing function: _ZN2v87Isolate4ExitEv"); + abort(-1); +} +Module["__ZN2v87Isolate4ExitEv"] = __ZN2v87Isolate4ExitEv; +function __ZN2v87Isolate5EnterEv() { + err("missing function: _ZN2v87Isolate5EnterEv"); + abort(-1); +} +Module["__ZN2v87Isolate5EnterEv"] = __ZN2v87Isolate5EnterEv; +function __ZN2v87Isolate7DisposeEv() { + err("missing function: _ZN2v87Isolate7DisposeEv"); + abort(-1); +} +Module["__ZN2v87Isolate7DisposeEv"] = __ZN2v87Isolate7DisposeEv; +function __ZN2v88External3NewEPNS_7IsolateEPv() { + err("missing function: _ZN2v88External3NewEPNS_7IsolateEPv"); + abort(-1); +} +Module["__ZN2v88External3NewEPNS_7IsolateEPv"] = __ZN2v88External3NewEPNS_7IsolateEPv; +function __ZN2v88Function4CallENS_5LocalINS_5ValueEEEiPS3_() { + err("missing function: _ZN2v88Function4CallENS_5LocalINS_5ValueEEEiPS3_"); + abort(-1); +} +Module["__ZN2v88Function4CallENS_5LocalINS_5ValueEEEiPS3_"] = __ZN2v88Function4CallENS_5LocalINS_5ValueEEEiPS3_; +function __ZN2v88Template3SetENS_5LocalINS_4NameEEENS1_INS_4DataEEENS_17PropertyAttributeE() { + err("missing function: _ZN2v88Template3SetENS_5LocalINS_4NameEEENS1_INS_4DataEEENS_17PropertyAttributeE"); + abort(-1); +} +Module["__ZN2v88Template3SetENS_5LocalINS_4NameEEENS1_INS_4DataEEENS_17PropertyAttributeE"] = __ZN2v88Template3SetENS_5LocalINS_4NameEEENS1_INS_4DataEEENS_17PropertyAttributeE; +function __ZN2v88TryCatchC1Ev() { + err("missing function: _ZN2v88TryCatchC1Ev"); + abort(-1); +} +Module["__ZN2v88TryCatchC1Ev"] = __ZN2v88TryCatchC1Ev; +function __ZN2v88TryCatchD1Ev() { + err("missing function: _ZN2v88TryCatchD1Ev"); + abort(-1); +} +Module["__ZN2v88TryCatchD1Ev"] = __ZN2v88TryCatchD1Ev; function __ZN8CXpsFileC1EPN7NSFonts17IApplicationFontsE() { err("missing function: _ZN8CXpsFileC1EPN7NSFonts17IApplicationFontsE"); abort(-1); @@ -1605,16 +1770,76 @@ function __ZN9CHtmlFileD1Ev() { abort(-1); } Module["__ZN9CHtmlFileD1Ev"] = __ZN9CHtmlFileD1Ev; -function __ZN9PdfReader10CPdfReader8GetErrorEv() { - err("missing function: _ZN9PdfReader10CPdfReader8GetErrorEv"); +function __ZNK2v85Int325ValueEv() { + err("missing function: _ZNK2v85Int325ValueEv"); + abort(-1); +} +Module["__ZNK2v85Int325ValueEv"] = __ZNK2v85Int325ValueEv; +function __ZNK2v85Value10IsFunctionEv() { + err("missing function: _ZNK2v85Value10IsFunctionEv"); + abort(-1); +} +Module["__ZNK2v85Value10IsFunctionEv"] = __ZNK2v85Value10IsFunctionEv; +function __ZNK2v85Value12BooleanValueEv() { + err("missing function: _ZNK2v85Value12BooleanValueEv"); + abort(-1); +} +Module["__ZNK2v85Value12BooleanValueEv"] = __ZNK2v85Value12BooleanValueEv; +function __ZNK2v85Value7ToInt32ENS_5LocalINS_7ContextEEE() { + err("missing function: _ZNK2v85Value7ToInt32ENS_5LocalINS_7ContextEEE"); + abort(-1); +} +Module["__ZNK2v85Value7ToInt32ENS_5LocalINS_7ContextEEE"] = __ZNK2v85Value7ToInt32ENS_5LocalINS_7ContextEEE; +function __ZNK2v85Value8ToNumberENS_5LocalINS_7ContextEEE() { + err("missing function: _ZNK2v85Value8ToNumberENS_5LocalINS_7ContextEEE"); + abort(-1); +} +Module["__ZNK2v85Value8ToNumberENS_5LocalINS_7ContextEEE"] = __ZNK2v85Value8ToNumberENS_5LocalINS_7ContextEEE; +function __ZNK2v85Value8ToObjectENS_5LocalINS_7ContextEEE() { + err("missing function: _ZNK2v85Value8ToObjectENS_5LocalINS_7ContextEEE"); + abort(-1); +} +Module["__ZNK2v85Value8ToObjectENS_5LocalINS_7ContextEEE"] = __ZNK2v85Value8ToObjectENS_5LocalINS_7ContextEEE; +function __ZNK2v85Value8ToUint32ENS_5LocalINS_7ContextEEE() { + err("missing function: _ZNK2v85Value8ToUint32ENS_5LocalINS_7ContextEEE"); + abort(-1); +} +Module["__ZNK2v85Value8ToUint32ENS_5LocalINS_7ContextEEE"] = __ZNK2v85Value8ToUint32ENS_5LocalINS_7ContextEEE; +function __ZNK2v86Number5ValueEv() { + err("missing function: _ZNK2v86Number5ValueEv"); + abort(-1); +} +Module["__ZNK2v86Number5ValueEv"] = __ZNK2v86Number5ValueEv; +function __ZNK2v86Uint325ValueEv() { + err("missing function: _ZNK2v86Uint325ValueEv"); + abort(-1); +} +Module["__ZNK2v86Uint325ValueEv"] = __ZNK2v86Uint325ValueEv; +function __ZNK2v87Message13GetSourceLineEv() { + err("missing function: _ZNK2v87Message13GetSourceLineEv"); abort(-1); } -Module["__ZN9PdfReader10CPdfReader8GetErrorEv"] = __ZN9PdfReader10CPdfReader8GetErrorEv; -function __ZN9PdfReader10CPdfReaderC1EPN7NSFonts17IApplicationFontsE() { - err("missing function: _ZN9PdfReader10CPdfReaderC1EPN7NSFonts17IApplicationFontsE"); +Module["__ZNK2v87Message13GetSourceLineEv"] = __ZNK2v87Message13GetSourceLineEv; +function __ZNK2v87Message3GetEv() { + err("missing function: _ZNK2v87Message3GetEv"); abort(-1); } -Module["__ZN9PdfReader10CPdfReaderC1EPN7NSFonts17IApplicationFontsE"] = __ZN9PdfReader10CPdfReaderC1EPN7NSFonts17IApplicationFontsE; +Module["__ZNK2v87Message3GetEv"] = __ZNK2v87Message3GetEv; +function __ZNK2v88External5ValueEv() { + err("missing function: _ZNK2v88External5ValueEv"); + abort(-1); +} +Module["__ZNK2v88External5ValueEv"] = __ZNK2v88External5ValueEv; +function __ZNK2v88TryCatch7MessageEv() { + err("missing function: _ZNK2v88TryCatch7MessageEv"); + abort(-1); +} +Module["__ZNK2v88TryCatch7MessageEv"] = __ZNK2v88TryCatch7MessageEv; +function __ZNK2v88TryCatch9HasCaughtEv() { + err("missing function: _ZNK2v88TryCatch9HasCaughtEv"); + abort(-1); +} +Module["__ZNK2v88TryCatch9HasCaughtEv"] = __ZNK2v88TryCatch9HasCaughtEv; function ___assert_fail(condition, filename, line, func) { abort("Assertion failed: " + UTF8ToString(condition) + ", at: " + [ filename ? UTF8ToString(filename) : "unknown filename", line, func ? UTF8ToString(func) : "unknown function" ]); } @@ -1765,7 +1990,7 @@ var ERRNO_CODES = { ESTRPIPE: 135 }; Module["ERRNO_CODES"] = ERRNO_CODES; -var __main_thread_futex_wait_address = 12595904; +var __main_thread_futex_wait_address = 13888768; Module["__main_thread_futex_wait_address"] = __main_thread_futex_wait_address; function _emscripten_futex_wake(addr, count) { if (addr <= 0 || addr > HEAP8.length || addr & 3 != 0 || count < 0) return -28; @@ -1832,12 +2057,12 @@ var PThread = { }), initMainThreadBlock: (function() { if (ENVIRONMENT_IS_PTHREAD) return undefined; - PThread.mainThreadBlock = 12595120; + PThread.mainThreadBlock = 13887984; for (var i = 0; i < 244 / 4; ++i) GROWABLE_HEAP_STORE_I32((PThread.mainThreadBlock / 4 + i) * 4 | 0, 0); GROWABLE_HEAP_STORE_I32(PThread.mainThreadBlock + 24 | 0, PThread.mainThreadBlock); var headPtr = PThread.mainThreadBlock + 168; GROWABLE_HEAP_STORE_I32(headPtr | 0, headPtr); - var tlsMemory = 12595376; + var tlsMemory = 13888240; for (var i = 0; i < 128; ++i) GROWABLE_HEAP_STORE_I32((tlsMemory / 4 + i) * 4 | 0, 0); Atomics.store(HEAPU32, PThread.mainThreadBlock + 116 >> 2, tlsMemory); Atomics.store(HEAPU32, PThread.mainThreadBlock + 52 >> 2, PThread.mainThreadBlock); @@ -5124,95 +5349,8 @@ function ___syscall183(which, varargs) { } } Module["___syscall183"] = ___syscall183; -function _memset(ptr, value, num) { - ptr = ptr | 0; - value = value | 0; - num = num | 0; - var end = 0, aligned_end = 0, block_aligned_end = 0, value4 = 0; - end = ptr + num | 0; - value = value & 255; - if ((num | 0) >= 67) { - while ((ptr & 3) != 0) { - GROWABLE_HEAP_STORE_I8(ptr >> 0 | 0, value); - ptr = ptr + 1 | 0; - } - aligned_end = end & -4 | 0; - value4 = value | value << 8 | value << 16 | value << 24; - block_aligned_end = aligned_end - 64 | 0; - while ((ptr | 0) <= (block_aligned_end | 0)) { - GROWABLE_HEAP_STORE_I32(ptr | 0, value4); - GROWABLE_HEAP_STORE_I32(ptr + 4 | 0, value4); - GROWABLE_HEAP_STORE_I32(ptr + 8 | 0, value4); - GROWABLE_HEAP_STORE_I32(ptr + 12 | 0, value4); - GROWABLE_HEAP_STORE_I32(ptr + 16 | 0, value4); - GROWABLE_HEAP_STORE_I32(ptr + 20 | 0, value4); - GROWABLE_HEAP_STORE_I32(ptr + 24 | 0, value4); - GROWABLE_HEAP_STORE_I32(ptr + 28 | 0, value4); - GROWABLE_HEAP_STORE_I32(ptr + 32 | 0, value4); - GROWABLE_HEAP_STORE_I32(ptr + 36 | 0, value4); - GROWABLE_HEAP_STORE_I32(ptr + 40 | 0, value4); - GROWABLE_HEAP_STORE_I32(ptr + 44 | 0, value4); - GROWABLE_HEAP_STORE_I32(ptr + 48 | 0, value4); - GROWABLE_HEAP_STORE_I32(ptr + 52 | 0, value4); - GROWABLE_HEAP_STORE_I32(ptr + 56 | 0, value4); - GROWABLE_HEAP_STORE_I32(ptr + 60 | 0, value4); - ptr = ptr + 64 | 0; - } - while ((ptr | 0) < (aligned_end | 0)) { - GROWABLE_HEAP_STORE_I32(ptr | 0, value4); - ptr = ptr + 4 | 0; - } - } - while ((ptr | 0) < (end | 0)) { - GROWABLE_HEAP_STORE_I8(ptr >> 0 | 0, value); - ptr = ptr + 1 | 0; - } - return end - num | 0; -} -Module["_memset"] = _memset; -function __emscripten_syscall_mmap2(addr, len, prot, flags, fd, off) { - off <<= 12; - var ptr; - var allocated = false; - if ((flags & 16) !== 0 && addr % PAGE_SIZE !== 0) { - return -28; - } - if ((flags & 32) !== 0) { - ptr = _memalign(PAGE_SIZE, len); - if (!ptr) return -48; - _memset(ptr, 0, len); - allocated = true; - } else { - var info = FS.getStream(fd); - if (!info) return -8; - var res = FS.mmap(info, HEAPU8, addr, len, off, prot, flags); - ptr = res.ptr; - allocated = res.allocated; - } - SYSCALLS.mappings[ptr] = { - malloc: ptr, - len: len, - allocated: allocated, - fd: fd, - flags: flags - }; - return ptr; -} -Module["__emscripten_syscall_mmap2"] = __emscripten_syscall_mmap2; -function ___syscall192(which, varargs) { - if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(5, 1, which, varargs); - SYSCALLS.varargs = varargs; - try { - var addr = SYSCALLS.get(), len = SYSCALLS.get(), prot = SYSCALLS.get(), flags = SYSCALLS.get(), fd = SYSCALLS.get(), off = SYSCALLS.get(); - return __emscripten_syscall_mmap2(addr, len, prot, flags, fd, off); - } catch (e) { - if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) abort(e); - return -e.errno; - } -} -Module["___syscall192"] = ___syscall192; function ___syscall195(which, varargs) { - if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(6, 1, which, varargs); + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(5, 1, which, varargs); SYSCALLS.varargs = varargs; try { var path = SYSCALLS.getStr(), buf = SYSCALLS.get(); @@ -5224,7 +5362,7 @@ function ___syscall195(which, varargs) { } Module["___syscall195"] = ___syscall195; function ___syscall196(which, varargs) { - if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(7, 1, which, varargs); + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(6, 1, which, varargs); SYSCALLS.varargs = varargs; try { var path = SYSCALLS.getStr(), buf = SYSCALLS.get(); @@ -5236,7 +5374,7 @@ function ___syscall196(which, varargs) { } Module["___syscall196"] = ___syscall196; function ___syscall220(which, varargs) { - if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(8, 1, which, varargs); + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(7, 1, which, varargs); SYSCALLS.varargs = varargs; try { var stream = SYSCALLS.getStreamFromFD(), dirp = SYSCALLS.get(), count = SYSCALLS.get(); @@ -5276,7 +5414,7 @@ function ___syscall220(which, varargs) { } Module["___syscall220"] = ___syscall220; function ___syscall221(which, varargs) { - if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(9, 1, which, varargs); + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(8, 1, which, varargs); SYSCALLS.varargs = varargs; try { var stream = SYSCALLS.getStreamFromFD(), cmd = SYSCALLS.get(); @@ -5330,7 +5468,7 @@ function ___syscall221(which, varargs) { } Module["___syscall221"] = ___syscall221; function ___syscall3(which, varargs) { - if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(10, 1, which, varargs); + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(9, 1, which, varargs); SYSCALLS.varargs = varargs; try { var stream = SYSCALLS.getStreamFromFD(), buf = SYSCALLS.get(), count = SYSCALLS.get(); @@ -5342,7 +5480,7 @@ function ___syscall3(which, varargs) { } Module["___syscall3"] = ___syscall3; function ___syscall39(which, varargs) { - if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(11, 1, which, varargs); + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(10, 1, which, varargs); SYSCALLS.varargs = varargs; try { var path = SYSCALLS.getStr(), mode = SYSCALLS.get(); @@ -5354,7 +5492,7 @@ function ___syscall39(which, varargs) { } Module["___syscall39"] = ___syscall39; function ___syscall4(which, varargs) { - if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(12, 1, which, varargs); + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(11, 1, which, varargs); SYSCALLS.varargs = varargs; try { var stream = SYSCALLS.getStreamFromFD(), buf = SYSCALLS.get(), count = SYSCALLS.get(); @@ -5366,7 +5504,7 @@ function ___syscall4(which, varargs) { } Module["___syscall4"] = ___syscall4; function ___syscall40(which, varargs) { - if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(13, 1, which, varargs); + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(12, 1, which, varargs); SYSCALLS.varargs = varargs; try { var path = SYSCALLS.getStr(); @@ -5379,7 +5517,7 @@ function ___syscall40(which, varargs) { } Module["___syscall40"] = ___syscall40; function ___syscall5(which, varargs) { - if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(14, 1, which, varargs); + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(13, 1, which, varargs); SYSCALLS.varargs = varargs; try { var pathname = SYSCALLS.getStr(), flags = SYSCALLS.get(), mode = SYSCALLS.get(); @@ -5392,7 +5530,7 @@ function ___syscall5(which, varargs) { } Module["___syscall5"] = ___syscall5; function ___syscall54(which, varargs) { - if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(15, 1, which, varargs); + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(14, 1, which, varargs); SYSCALLS.varargs = varargs; try { var stream = SYSCALLS.getStreamFromFD(), op = SYSCALLS.get(); @@ -5450,7 +5588,7 @@ function ___syscall54(which, varargs) { } Module["___syscall54"] = ___syscall54; function ___syscall85(which, varargs) { - if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(16, 1, which, varargs); + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(15, 1, which, varargs); SYSCALLS.varargs = varargs; try { var path = SYSCALLS.getStr(), buf = SYSCALLS.get(), bufsize = SYSCALLS.get(); @@ -5480,7 +5618,7 @@ function __emscripten_syscall_munmap(addr, len) { } Module["__emscripten_syscall_munmap"] = __emscripten_syscall_munmap; function ___syscall91(which, varargs) { - if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(17, 1, which, varargs); + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(16, 1, which, varargs); SYSCALLS.varargs = varargs; try { var addr = SYSCALLS.get(), len = SYSCALLS.get(); @@ -5541,7 +5679,7 @@ function _emscripten_get_heap_size() { } Module["_emscripten_get_heap_size"] = _emscripten_get_heap_size; function _emscripten_get_sbrk_ptr() { - return 12594960; + return 13887824; } Module["_emscripten_get_sbrk_ptr"] = _emscripten_get_sbrk_ptr; function _emscripten_has_threading_support() { @@ -5930,7 +6068,7 @@ function _emscripten_set_canvas_element_size_calling_thread(target, width, heigh } Module["_emscripten_set_canvas_element_size_calling_thread"] = _emscripten_set_canvas_element_size_calling_thread; function _emscripten_set_canvas_element_size_main_thread(target, width, height) { - if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(18, 1, target, width, height); + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(17, 1, target, width, height); return _emscripten_set_canvas_element_size_calling_thread(target, width, height); } Module["_emscripten_set_canvas_element_size_main_thread"] = _emscripten_set_canvas_element_size_main_thread; @@ -5964,8 +6102,6 @@ function _emscripten_syscall(which, varargs) { return ___syscall12(which, varargs); case 183: return ___syscall183(which, varargs); - case 192: - return ___syscall192(which, varargs); case 195: return ___syscall195(which, varargs); case 196: @@ -6269,7 +6405,7 @@ function _exit(status) { } Module["_exit"] = _exit; function _fd_close(fd) { - if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(19, 1, fd); + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(18, 1, fd); try { var stream = SYSCALLS.getStreamFromFD(fd); FS.close(stream); @@ -6281,7 +6417,7 @@ function _fd_close(fd) { } Module["_fd_close"] = _fd_close; function _fd_read(fd, iov, iovcnt, pnum) { - if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(20, 1, fd, iov, iovcnt, pnum); + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(19, 1, fd, iov, iovcnt, pnum); try { var stream = SYSCALLS.getStreamFromFD(fd); var num = SYSCALLS.doReadv(stream, iov, iovcnt); @@ -6294,7 +6430,7 @@ function _fd_read(fd, iov, iovcnt, pnum) { } Module["_fd_read"] = _fd_read; function _fd_seek(fd, offset_low, offset_high, whence, newOffset) { - if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(21, 1, fd, offset_low, offset_high, whence, newOffset); + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(20, 1, fd, offset_low, offset_high, whence, newOffset); try { var stream = SYSCALLS.getStreamFromFD(fd); var HIGH_OFFSET = 4294967296; @@ -6314,7 +6450,7 @@ function _fd_seek(fd, offset_low, offset_high, whence, newOffset) { } Module["_fd_seek"] = _fd_seek; function _fd_write(fd, iov, iovcnt, pnum) { - if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(22, 1, fd, iov, iovcnt, pnum); + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(21, 1, fd, iov, iovcnt, pnum); try { var stream = SYSCALLS.getStreamFromFD(fd); var num = SYSCALLS.doWritev(stream, iov, iovcnt); @@ -6337,9 +6473,9 @@ function _gettimeofday(ptr) { return 0; } Module["_gettimeofday"] = _gettimeofday; -var ___tm_current = 12594976; +var ___tm_current = 13887840; Module["___tm_current"] = ___tm_current; -var ___tm_timezone = (stringToUTF8("GMT", 12595024, 4), 12595024); +var ___tm_timezone = (stringToUTF8("GMT", 13887888, 4), 13887888); Module["___tm_timezone"] = ___tm_timezone; function _gmtime_r(time, tmPtr) { var date = new Date(GROWABLE_HEAP_LOAD_I32(time | 0) * 1e3); @@ -6431,8 +6567,54 @@ function _memcpy(dest, src, num) { return ret | 0; } Module["_memcpy"] = _memcpy; +function _memset(ptr, value, num) { + ptr = ptr | 0; + value = value | 0; + num = num | 0; + var end = 0, aligned_end = 0, block_aligned_end = 0, value4 = 0; + end = ptr + num | 0; + value = value & 255; + if ((num | 0) >= 67) { + while ((ptr & 3) != 0) { + GROWABLE_HEAP_STORE_I8(ptr >> 0 | 0, value); + ptr = ptr + 1 | 0; + } + aligned_end = end & -4 | 0; + value4 = value | value << 8 | value << 16 | value << 24; + block_aligned_end = aligned_end - 64 | 0; + while ((ptr | 0) <= (block_aligned_end | 0)) { + GROWABLE_HEAP_STORE_I32(ptr | 0, value4); + GROWABLE_HEAP_STORE_I32(ptr + 4 | 0, value4); + GROWABLE_HEAP_STORE_I32(ptr + 8 | 0, value4); + GROWABLE_HEAP_STORE_I32(ptr + 12 | 0, value4); + GROWABLE_HEAP_STORE_I32(ptr + 16 | 0, value4); + GROWABLE_HEAP_STORE_I32(ptr + 20 | 0, value4); + GROWABLE_HEAP_STORE_I32(ptr + 24 | 0, value4); + GROWABLE_HEAP_STORE_I32(ptr + 28 | 0, value4); + GROWABLE_HEAP_STORE_I32(ptr + 32 | 0, value4); + GROWABLE_HEAP_STORE_I32(ptr + 36 | 0, value4); + GROWABLE_HEAP_STORE_I32(ptr + 40 | 0, value4); + GROWABLE_HEAP_STORE_I32(ptr + 44 | 0, value4); + GROWABLE_HEAP_STORE_I32(ptr + 48 | 0, value4); + GROWABLE_HEAP_STORE_I32(ptr + 52 | 0, value4); + GROWABLE_HEAP_STORE_I32(ptr + 56 | 0, value4); + GROWABLE_HEAP_STORE_I32(ptr + 60 | 0, value4); + ptr = ptr + 64 | 0; + } + while ((ptr | 0) < (aligned_end | 0)) { + GROWABLE_HEAP_STORE_I32(ptr | 0, value4); + ptr = ptr + 4 | 0; + } + } + while ((ptr | 0) < (end | 0)) { + GROWABLE_HEAP_STORE_I8(ptr >> 0 | 0, value); + ptr = ptr + 1 | 0; + } + return end - num | 0; +} +Module["_memset"] = _memset; function _tzset() { - if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(23, 1); + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(22, 1); if (_tzset.called) return; _tzset.called = true; GROWABLE_HEAP_STORE_I32(__get_timezone() | 0, (new Date).getTimezoneOffset() * 60); @@ -6953,7 +7135,7 @@ function _strftime_l(s, maxsize, format, tm) { } Module["_strftime_l"] = _strftime_l; function _sysconf(name) { - if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(24, 1, name); + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(23, 1, name); switch (name) { case 30: return PAGE_SIZE; @@ -7136,6 +7318,76 @@ function _times(buffer) { return 0; } Module["_times"] = _times; +function _u_strFromWCS_62() { + err("missing function: u_strFromWCS_62"); + abort(-1); +} +Module["_u_strFromWCS_62"] = _u_strFromWCS_62; +function _u_strToWCS_62() { + err("missing function: u_strToWCS_62"); + abort(-1); +} +Module["_u_strToWCS_62"] = _u_strToWCS_62; +function _ucnv_close_62() { + err("missing function: ucnv_close_62"); + abort(-1); +} +Module["_ucnv_close_62"] = _ucnv_close_62; +function _ucnv_fromUnicode_62() { + err("missing function: ucnv_fromUnicode_62"); + abort(-1); +} +Module["_ucnv_fromUnicode_62"] = _ucnv_fromUnicode_62; +function _ucnv_getCCSID_62() { + err("missing function: ucnv_getCCSID_62"); + abort(-1); +} +Module["_ucnv_getCCSID_62"] = _ucnv_getCCSID_62; +function _ucnv_getMaxCharSize_62() { + err("missing function: ucnv_getMaxCharSize_62"); + abort(-1); +} +Module["_ucnv_getMaxCharSize_62"] = _ucnv_getMaxCharSize_62; +function _ucnv_getMinCharSize_62() { + err("missing function: ucnv_getMinCharSize_62"); + abort(-1); +} +Module["_ucnv_getMinCharSize_62"] = _ucnv_getMinCharSize_62; +function _ucnv_getName_62() { + err("missing function: ucnv_getName_62"); + abort(-1); +} +Module["_ucnv_getName_62"] = _ucnv_getName_62; +function _ucnv_openCCSID_62() { + err("missing function: ucnv_openCCSID_62"); + abort(-1); +} +Module["_ucnv_openCCSID_62"] = _ucnv_openCCSID_62; +function _ucnv_open_62() { + err("missing function: ucnv_open_62"); + abort(-1); +} +Module["_ucnv_open_62"] = _ucnv_open_62; +function _ucnv_toUnicode_62() { + err("missing function: ucnv_toUnicode_62"); + abort(-1); +} +Module["_ucnv_toUnicode_62"] = _ucnv_toUnicode_62; +function _usprep_close_62() { + err("missing function: usprep_close_62"); + abort(-1); +} +Module["_usprep_close_62"] = _usprep_close_62; +function _usprep_openByType_62() { + err("missing function: usprep_openByType_62"); + abort(-1); +} +Module["_usprep_openByType_62"] = _usprep_openByType_62; +function _usprep_prepare_62() { + err("missing function: usprep_prepare_62"); + abort(-1); +} +Module["_usprep_prepare_62"] = _usprep_prepare_62; if (!ENVIRONMENT_IS_PTHREAD) PThread.initMainThreadBlock(); else PThread.initWorker(); if (ENVIRONMENT_IS_NODE) { _emscripten_get_now = function _emscripten_get_now_actual() { @@ -7163,7 +7415,7 @@ if (ENVIRONMENT_HAS_NODE) { } var GLctx; GL.init(); -var proxiedFunctionTable = [ null, _atexit, ___syscall10, ___syscall12, ___syscall183, ___syscall192, ___syscall195, ___syscall196, ___syscall220, ___syscall221, ___syscall3, ___syscall39, ___syscall4, ___syscall40, ___syscall5, ___syscall54, ___syscall85, ___syscall91, _emscripten_set_canvas_element_size_main_thread, _fd_close, _fd_read, _fd_seek, _fd_write, _tzset, _sysconf ]; +var proxiedFunctionTable = [ null, _atexit, ___syscall10, ___syscall12, ___syscall183, ___syscall195, ___syscall196, ___syscall220, ___syscall221, ___syscall3, ___syscall39, ___syscall4, ___syscall40, ___syscall5, ___syscall54, ___syscall85, ___syscall91, _emscripten_set_canvas_element_size_main_thread, _fd_close, _fd_read, _fd_seek, _fd_write, _tzset, _sysconf ]; var ASSERTIONS = true; function intArrayFromString(stringy, dontAddNull, length) { var len = length > 0 ? length : lengthBytesUTF8(stringy) + 1; @@ -7188,24 +7440,57 @@ function intArrayToString(array) { } var asmGlobalArg = {}; var asmLibraryArg = { - "_ZN12CPdfRenderer10SaveToFileERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE": __ZN12CPdfRenderer10SaveToFileERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE, - "_ZN12CPdfRenderer11SetPasswordERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE": __ZN12CPdfRenderer11SetPasswordERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE, - "_ZN12CPdfRenderer13SetDocumentIDERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE": __ZN12CPdfRenderer13SetDocumentIDERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE, - "_ZN12CPdfRenderer13SetTempFolderERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE": __ZN12CPdfRenderer13SetTempFolderERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE, - "_ZN12CPdfRenderer14SetThemesPlaceERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE": __ZN12CPdfRenderer14SetThemesPlaceERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE, - "_ZN12CPdfRenderer15OnlineWordToPdfERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEES8_RKb": __ZN12CPdfRenderer15OnlineWordToPdfERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEES8_RKb, - "_ZN12CPdfRenderer25OnlineWordToPdfFromBinaryERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEES8_RKb": __ZN12CPdfRenderer25OnlineWordToPdfFromBinaryERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEES8_RKb, - "_ZN12CPdfRendererC1EPN7NSFonts17IApplicationFontsEb": __ZN12CPdfRendererC1EPN7NSFonts17IApplicationFontsEb, - "_ZN12CPdfRendererD1Ev": __ZN12CPdfRendererD1Ev, - "_ZN14NSDoctRenderer13CDoctrenderer18GetImagesInChangesEv": __ZN14NSDoctRenderer13CDoctrenderer18GetImagesInChangesEv, - "_ZN14NSDoctRenderer13CDoctrenderer7ExecuteERKNSt3__212basic_stringIwNS1_11char_traitsIwEENS1_9allocatorIwEEEERS7_": __ZN14NSDoctRenderer13CDoctrenderer7ExecuteERKNSt3__212basic_stringIwNS1_11char_traitsIwEENS1_9allocatorIwEEEERS7_, - "_ZN14NSDoctRenderer13CDoctrendererC1ERKNSt3__212basic_stringIwNS1_11char_traitsIwEENS1_9allocatorIwEEEE": __ZN14NSDoctRenderer13CDoctrendererC1ERKNSt3__212basic_stringIwNS1_11char_traitsIwEENS1_9allocatorIwEEEE, - "_ZN14NSDoctRenderer13CDoctrendererD1Ev": __ZN14NSDoctRenderer13CDoctrendererD1Ev, - "_ZN14NSHtmlRenderer17CASCHTMLRenderer316CreateOfficeFileENSt3__212basic_stringIwNS1_11char_traitsIwEENS1_9allocatorIwEEEERKS7_": __ZN14NSHtmlRenderer17CASCHTMLRenderer316CreateOfficeFileENSt3__212basic_stringIwNS1_11char_traitsIwEENS1_9allocatorIwEEEERKS7_, - "_ZN14NSHtmlRenderer17CASCHTMLRenderer39CloseFileEb": __ZN14NSHtmlRenderer17CASCHTMLRenderer39CloseFileEb, - "_ZN14NSHtmlRenderer17CASCHTMLRenderer3C1Ev": __ZN14NSHtmlRenderer17CASCHTMLRenderer3C1Ev, - "_ZN14NSHtmlRenderer17CASCHTMLRenderer3D1Ev": __ZN14NSHtmlRenderer17CASCHTMLRenderer3D1Ev, "_ZN23CFileDownloader_privateC1ENSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEEb": __ZN23CFileDownloader_privateC1ENSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEEb, + "_ZN2v810Uint8Array3NewENS_5LocalINS_11ArrayBufferEEEmm": __ZN2v810Uint8Array3NewENS_5LocalINS_11ArrayBufferEEEmm, + "_ZN2v811ArrayBuffer11ExternalizeEv": __ZN2v811ArrayBuffer11ExternalizeEv, + "_ZN2v811ArrayBuffer3NewEPNS_7IsolateEPvmNS_23ArrayBufferCreationModeE": __ZN2v811ArrayBuffer3NewEPNS_7IsolateEPvmNS_23ArrayBufferCreationModeE, + "_ZN2v811ArrayBuffer9Allocator19NewDefaultAllocatorEv": __ZN2v811ArrayBuffer9Allocator19NewDefaultAllocatorEv, + "_ZN2v811HandleScope12CreateHandleEPNS_8internal10HeapObjectEPNS1_6ObjectE": __ZN2v811HandleScope12CreateHandleEPNS_8internal10HeapObjectEPNS1_6ObjectE, + "_ZN2v811HandleScopeC1EPNS_7IsolateE": __ZN2v811HandleScopeC1EPNS_7IsolateE, + "_ZN2v811HandleScopeD1Ev": __ZN2v811HandleScopeD1Ev, + "_ZN2v814ObjectTemplate11NewInstanceEv": __ZN2v814ObjectTemplate11NewInstanceEv, + "_ZN2v814ObjectTemplate11SetAccessorENS_5LocalINS_6StringEEEPFvS3_RKNS_20PropertyCallbackInfoINS_5ValueEEEEPFvS3_NS1_IS5_EERKNS4_IvEEESB_NS_13AccessControlENS_17PropertyAttributeENS1_INS_17AccessorSignatureEEE": __ZN2v814ObjectTemplate11SetAccessorENS_5LocalINS_6StringEEEPFvS3_RKNS_20PropertyCallbackInfoINS_5ValueEEEEPFvS3_NS1_IS5_EERKNS4_IvEEESB_NS_13AccessControlENS_17PropertyAttributeENS1_INS_17AccessorSignatureEEE, + "_ZN2v814ObjectTemplate21SetInternalFieldCountEi": __ZN2v814ObjectTemplate21SetInternalFieldCountEi, + "_ZN2v814ObjectTemplate3NewEv": __ZN2v814ObjectTemplate3NewEv, + "_ZN2v814ScriptCompiler10CachedDataC1EPKhiNS1_12BufferPolicyE": __ZN2v814ScriptCompiler10CachedDataC1EPKhiNS1_12BufferPolicyE, + "_ZN2v814ScriptCompiler7CompileENS_5LocalINS_7ContextEEEPNS0_6SourceENS0_14CompileOptionsE": __ZN2v814ScriptCompiler7CompileENS_5LocalINS_7ContextEEEPNS0_6SourceENS0_14CompileOptionsE, + "_ZN2v815ArrayBufferView6BufferEv": __ZN2v815ArrayBufferView6BufferEv, + "_ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorE": __ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorE, + "_ZN2v819ResourceConstraintsC1Ev": __ZN2v819ResourceConstraintsC1Ev, + "_ZN2v82V812ToLocalEmptyEv": __ZN2v82V812ToLocalEmptyEv, + "_ZN2v84JSON5ParseENS_5LocalINS_6StringEEE": __ZN2v84JSON5ParseENS_5LocalINS_6StringEEE, + "_ZN2v85Array3NewEPNS_7IsolateEi": __ZN2v85Array3NewEPNS_7IsolateEi, + "_ZN2v86Locker10InitializeEPNS_7IsolateE": __ZN2v86Locker10InitializeEPNS_7IsolateE, + "_ZN2v86LockerD1Ev": __ZN2v86LockerD1Ev, + "_ZN2v86Object16SetInternalFieldEiNS_5LocalINS_5ValueEEE": __ZN2v86Object16SetInternalFieldEiNS_5LocalINS_5ValueEEE, + "_ZN2v86Object20SlowGetInternalFieldEi": __ZN2v86Object20SlowGetInternalFieldEi, + "_ZN2v86Object3GetENS_5LocalINS_5ValueEEE": __ZN2v86Object3GetENS_5LocalINS_5ValueEEE, + "_ZN2v86Object3NewEPNS_7IsolateE": __ZN2v86Object3NewEPNS_7IsolateE, + "_ZN2v86Object3SetENS_5LocalINS_5ValueEEES3_": __ZN2v86Object3SetENS_5LocalINS_5ValueEEES3_, + "_ZN2v86Object3SetEjNS_5LocalINS_5ValueEEE": __ZN2v86Object3SetEjNS_5LocalINS_5ValueEEE, + "_ZN2v86Script3RunEv": __ZN2v86Script3RunEv, + "_ZN2v86Script7CompileENS_5LocalINS_6StringEEEPNS_12ScriptOriginE": __ZN2v86Script7CompileENS_5LocalINS_6StringEEEPNS_12ScriptOriginE, + "_ZN2v86String11NewFromUtf8EPNS_7IsolateEPKcNS0_13NewStringTypeEi": __ZN2v86String11NewFromUtf8EPNS_7IsolateEPKcNS0_13NewStringTypeEi, + "_ZN2v86String5ValueC1ENS_5LocalINS_5ValueEEE": __ZN2v86String5ValueC1ENS_5LocalINS_5ValueEEE, + "_ZN2v86String5ValueD1Ev": __ZN2v86String5ValueD1Ev, + "_ZN2v86String9Utf8ValueC1ENS_5LocalINS_5ValueEEE": __ZN2v86String9Utf8ValueC1ENS_5LocalINS_5ValueEEE, + "_ZN2v86String9Utf8ValueD1Ev": __ZN2v86String9Utf8ValueD1Ev, + "_ZN2v87Context3NewEPNS_7IsolateEPNS_22ExtensionConfigurationENS_10MaybeLocalINS_14ObjectTemplateEEENS5_INS_5ValueEEE": __ZN2v87Context3NewEPNS_7IsolateEPNS_22ExtensionConfigurationENS_10MaybeLocalINS_14ObjectTemplateEEENS5_INS_5ValueEEE, + "_ZN2v87Context4ExitEv": __ZN2v87Context4ExitEv, + "_ZN2v87Context5EnterEv": __ZN2v87Context5EnterEv, + "_ZN2v87Context6GlobalEv": __ZN2v87Context6GlobalEv, + "_ZN2v87Integer3NewEPNS_7IsolateEi": __ZN2v87Integer3NewEPNS_7IsolateEi, + "_ZN2v87Isolate10GetCurrentEv": __ZN2v87Isolate10GetCurrentEv, + "_ZN2v87Isolate17GetCurrentContextEv": __ZN2v87Isolate17GetCurrentContextEv, + "_ZN2v87Isolate3NewERKNS0_12CreateParamsE": __ZN2v87Isolate3NewERKNS0_12CreateParamsE, + "_ZN2v87Isolate4ExitEv": __ZN2v87Isolate4ExitEv, + "_ZN2v87Isolate5EnterEv": __ZN2v87Isolate5EnterEv, + "_ZN2v87Isolate7DisposeEv": __ZN2v87Isolate7DisposeEv, + "_ZN2v88External3NewEPNS_7IsolateEPv": __ZN2v88External3NewEPNS_7IsolateEPv, + "_ZN2v88Function4CallENS_5LocalINS_5ValueEEEiPS3_": __ZN2v88Function4CallENS_5LocalINS_5ValueEEEiPS3_, + "_ZN2v88Template3SetENS_5LocalINS_4NameEEENS1_INS_4DataEEENS_17PropertyAttributeE": __ZN2v88Template3SetENS_5LocalINS_4NameEEENS1_INS_4DataEEENS_17PropertyAttributeE, + "_ZN2v88TryCatchC1Ev": __ZN2v88TryCatchC1Ev, + "_ZN2v88TryCatchD1Ev": __ZN2v88TryCatchD1Ev, "_ZN8CXpsFileC1EPN7NSFonts17IApplicationFontsE": __ZN8CXpsFileC1EPN7NSFonts17IApplicationFontsE, "_ZN9CDjVuFileC1EPN7NSFonts17IApplicationFontsE": __ZN9CDjVuFileC1EPN7NSFonts17IApplicationFontsE, "_ZN9CHtmlFile10ConvertMhtERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEES8_S8_": __ZN9CHtmlFile10ConvertMhtERKNSt3__212basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEES8_S8_, @@ -7213,8 +7498,20 @@ var asmLibraryArg = { "_ZN9CHtmlFile7ConvertERKNSt3__26vectorINS0_12basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEENS5_IS7_EEEERKS7_SD_": __ZN9CHtmlFile7ConvertERKNSt3__26vectorINS0_12basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEENS5_IS7_EEEERKS7_SD_, "_ZN9CHtmlFileC1Ev": __ZN9CHtmlFileC1Ev, "_ZN9CHtmlFileD1Ev": __ZN9CHtmlFileD1Ev, - "_ZN9PdfReader10CPdfReader8GetErrorEv": __ZN9PdfReader10CPdfReader8GetErrorEv, - "_ZN9PdfReader10CPdfReaderC1EPN7NSFonts17IApplicationFontsE": __ZN9PdfReader10CPdfReaderC1EPN7NSFonts17IApplicationFontsE, + "_ZNK2v85Int325ValueEv": __ZNK2v85Int325ValueEv, + "_ZNK2v85Value10IsFunctionEv": __ZNK2v85Value10IsFunctionEv, + "_ZNK2v85Value12BooleanValueEv": __ZNK2v85Value12BooleanValueEv, + "_ZNK2v85Value7ToInt32ENS_5LocalINS_7ContextEEE": __ZNK2v85Value7ToInt32ENS_5LocalINS_7ContextEEE, + "_ZNK2v85Value8ToNumberENS_5LocalINS_7ContextEEE": __ZNK2v85Value8ToNumberENS_5LocalINS_7ContextEEE, + "_ZNK2v85Value8ToObjectENS_5LocalINS_7ContextEEE": __ZNK2v85Value8ToObjectENS_5LocalINS_7ContextEEE, + "_ZNK2v85Value8ToUint32ENS_5LocalINS_7ContextEEE": __ZNK2v85Value8ToUint32ENS_5LocalINS_7ContextEEE, + "_ZNK2v86Number5ValueEv": __ZNK2v86Number5ValueEv, + "_ZNK2v86Uint325ValueEv": __ZNK2v86Uint325ValueEv, + "_ZNK2v87Message13GetSourceLineEv": __ZNK2v87Message13GetSourceLineEv, + "_ZNK2v87Message3GetEv": __ZNK2v87Message3GetEv, + "_ZNK2v88External5ValueEv": __ZNK2v88External5ValueEv, + "_ZNK2v88TryCatch7MessageEv": __ZNK2v88TryCatch7MessageEv, + "_ZNK2v88TryCatch9HasCaughtEv": __ZNK2v88TryCatch9HasCaughtEv, "__assert_fail": ___assert_fail, "__call_main": ___call_main, "__clock_gettime": ___clock_gettime, @@ -7227,7 +7524,6 @@ var asmLibraryArg = { "__syscall10": ___syscall10, "__syscall12": ___syscall12, "__syscall183": ___syscall183, - "__syscall192": ___syscall192, "__syscall195": ___syscall195, "__syscall196": ___syscall196, "__syscall220": ___syscall220, @@ -7300,7 +7596,21 @@ var asmLibraryArg = { "table": wasmTable, "testSetjmp": _testSetjmp, "time": _time, - "times": _times + "times": _times, + "u_strFromWCS_62": _u_strFromWCS_62, + "u_strToWCS_62": _u_strToWCS_62, + "ucnv_close_62": _ucnv_close_62, + "ucnv_fromUnicode_62": _ucnv_fromUnicode_62, + "ucnv_getCCSID_62": _ucnv_getCCSID_62, + "ucnv_getMaxCharSize_62": _ucnv_getMaxCharSize_62, + "ucnv_getMinCharSize_62": _ucnv_getMinCharSize_62, + "ucnv_getName_62": _ucnv_getName_62, + "ucnv_openCCSID_62": _ucnv_openCCSID_62, + "ucnv_open_62": _ucnv_open_62, + "ucnv_toUnicode_62": _ucnv_toUnicode_62, + "usprep_close_62": _usprep_close_62, + "usprep_openByType_62": _usprep_openByType_62, + "usprep_prepare_62": _usprep_prepare_62 }; var asm = createWasm(); var real____wasm_call_ctors = asm["__wasm_call_ctors"]; @@ -7381,12 +7691,6 @@ asm["emscripten_get_global_libc"] = (function() { assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); return real__emscripten_get_global_libc.apply(null, arguments); }); -var real____em_js__initPthreadsJS = asm["__em_js__initPthreadsJS"]; -asm["__em_js__initPthreadsJS"] = (function() { - assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); - assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); - return real____em_js__initPthreadsJS.apply(null, arguments); -}); var real____emscripten_pthread_data_constructor = asm["__emscripten_pthread_data_constructor"]; asm["__emscripten_pthread_data_constructor"] = (function() { assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); @@ -7423,18 +7727,6 @@ asm["memalign"] = (function() { assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); return real__memalign.apply(null, arguments); }); -var real__emscripten_builtin_free = asm["emscripten_builtin_free"]; -asm["emscripten_builtin_free"] = (function() { - assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); - assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); - return real__emscripten_builtin_free.apply(null, arguments); -}); -var real__emscripten_builtin_memalign = asm["emscripten_builtin_memalign"]; -asm["emscripten_builtin_memalign"] = (function() { - assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); - assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); - return real__emscripten_builtin_memalign.apply(null, arguments); -}); var real__emscripten_main_browser_thread_id = asm["emscripten_main_browser_thread_id"]; asm["emscripten_main_browser_thread_id"] = (function() { assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); @@ -7789,6 +8081,78 @@ asm["dynCall_viiiiiii"] = (function() { assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); return real_dynCall_viiiiiii.apply(null, arguments); }); +var real_dynCall_iiiiiiiiiiii = asm["dynCall_iiiiiiiiiiii"]; +asm["dynCall_iiiiiiiiiiii"] = (function() { + assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); + assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); + return real_dynCall_iiiiiiiiiiii.apply(null, arguments); +}); +var real_dynCall_iiiddiiiiiiiiiii = asm["dynCall_iiiddiiiiiiiiiii"]; +asm["dynCall_iiiddiiiiiiiiiii"] = (function() { + assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); + assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); + return real_dynCall_iiiddiiiiiiiiiii.apply(null, arguments); +}); +var real_dynCall_viddii = asm["dynCall_viddii"]; +asm["dynCall_viddii"] = (function() { + assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); + assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); + return real_dynCall_viddii.apply(null, arguments); +}); +var real_dynCall_viidddddd = asm["dynCall_viidddddd"]; +asm["dynCall_viidddddd"] = (function() { + assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); + assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); + return real_dynCall_viidddddd.apply(null, arguments); +}); +var real_dynCall_viid = asm["dynCall_viid"]; +asm["dynCall_viid"] = (function() { + assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); + assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); + return real_dynCall_viid.apply(null, arguments); +}); +var real_dynCall_viiiiiiiiiiidd = asm["dynCall_viiiiiiiiiiidd"]; +asm["dynCall_viiiiiiiiiiidd"] = (function() { + assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); + assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); + return real_dynCall_viiiiiiiiiiidd.apply(null, arguments); +}); +var real_dynCall_viiiiiiddddddi = asm["dynCall_viiiiiiddddddi"]; +asm["dynCall_viiiiiiddddddi"] = (function() { + assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); + assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); + return real_dynCall_viiiiiiddddddi.apply(null, arguments); +}); +var real_dynCall_viiddddddiiii = asm["dynCall_viiddddddiiii"]; +asm["dynCall_viiddddddiiii"] = (function() { + assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); + assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); + return real_dynCall_viiddddddiiii.apply(null, arguments); +}); +var real_dynCall_iiiddddiii = asm["dynCall_iiiddddiii"]; +asm["dynCall_iiiddddiii"] = (function() { + assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); + assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); + return real_dynCall_iiiddddiii.apply(null, arguments); +}); +var real_dynCall_viiiiiiii = asm["dynCall_viiiiiiii"]; +asm["dynCall_viiiiiiii"] = (function() { + assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); + assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); + return real_dynCall_viiiiiiii.apply(null, arguments); +}); +var real_dynCall_viiiiiiiiiii = asm["dynCall_viiiiiiiiiii"]; +asm["dynCall_viiiiiiiiiii"] = (function() { + assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); + assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); + return real_dynCall_viiiiiiiiiii.apply(null, arguments); +}); +var real_dynCall_viidd = asm["dynCall_viidd"]; +asm["dynCall_viidd"] = (function() { + assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); + assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); + return real_dynCall_viidd.apply(null, arguments); +}); var real_dynCall_viiiiiiiiiiii = asm["dynCall_viiiiiiiiiiii"]; asm["dynCall_viiiiiiiiiiii"] = (function() { assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); @@ -7825,12 +8189,6 @@ asm["dynCall_viidddd"] = (function() { assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); return real_dynCall_viidddd.apply(null, arguments); }); -var real_dynCall_viidddddd = asm["dynCall_viidddddd"]; -asm["dynCall_viidddddd"] = (function() { - assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); - assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); - return real_dynCall_viidddddd.apply(null, arguments); -}); var real_dynCall_iiiiiddd = asm["dynCall_iiiiiddd"]; asm["dynCall_iiiiiddd"] = (function() { assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); @@ -7975,11 +8333,6 @@ var _emscripten_get_global_libc = Module["_emscripten_get_global_libc"] = (funct assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); return Module["asm"]["emscripten_get_global_libc"].apply(null, arguments); }); -var ___em_js__initPthreadsJS = Module["___em_js__initPthreadsJS"] = (function() { - assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); - assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); - return Module["asm"]["__em_js__initPthreadsJS"].apply(null, arguments); -}); var ___emscripten_pthread_data_constructor = Module["___emscripten_pthread_data_constructor"] = (function() { assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); @@ -8010,16 +8363,6 @@ var _memalign = Module["_memalign"] = (function() { assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); return Module["asm"]["memalign"].apply(null, arguments); }); -var _emscripten_builtin_free = Module["_emscripten_builtin_free"] = (function() { - assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); - assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); - return Module["asm"]["emscripten_builtin_free"].apply(null, arguments); -}); -var _emscripten_builtin_memalign = Module["_emscripten_builtin_memalign"] = (function() { - assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); - assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); - return Module["asm"]["emscripten_builtin_memalign"].apply(null, arguments); -}); var _emscripten_main_browser_thread_id = Module["_emscripten_main_browser_thread_id"] = (function() { assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); @@ -8315,6 +8658,66 @@ var dynCall_viiiiiii = Module["dynCall_viiiiiii"] = (function() { assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); return Module["asm"]["dynCall_viiiiiii"].apply(null, arguments); }); +var dynCall_iiiiiiiiiiii = Module["dynCall_iiiiiiiiiiii"] = (function() { + assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); + assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); + return Module["asm"]["dynCall_iiiiiiiiiiii"].apply(null, arguments); +}); +var dynCall_iiiddiiiiiiiiiii = Module["dynCall_iiiddiiiiiiiiiii"] = (function() { + assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); + assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); + return Module["asm"]["dynCall_iiiddiiiiiiiiiii"].apply(null, arguments); +}); +var dynCall_viddii = Module["dynCall_viddii"] = (function() { + assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); + assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); + return Module["asm"]["dynCall_viddii"].apply(null, arguments); +}); +var dynCall_viidddddd = Module["dynCall_viidddddd"] = (function() { + assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); + assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); + return Module["asm"]["dynCall_viidddddd"].apply(null, arguments); +}); +var dynCall_viid = Module["dynCall_viid"] = (function() { + assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); + assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); + return Module["asm"]["dynCall_viid"].apply(null, arguments); +}); +var dynCall_viiiiiiiiiiidd = Module["dynCall_viiiiiiiiiiidd"] = (function() { + assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); + assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); + return Module["asm"]["dynCall_viiiiiiiiiiidd"].apply(null, arguments); +}); +var dynCall_viiiiiiddddddi = Module["dynCall_viiiiiiddddddi"] = (function() { + assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); + assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); + return Module["asm"]["dynCall_viiiiiiddddddi"].apply(null, arguments); +}); +var dynCall_viiddddddiiii = Module["dynCall_viiddddddiiii"] = (function() { + assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); + assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); + return Module["asm"]["dynCall_viiddddddiiii"].apply(null, arguments); +}); +var dynCall_iiiddddiii = Module["dynCall_iiiddddiii"] = (function() { + assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); + assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); + return Module["asm"]["dynCall_iiiddddiii"].apply(null, arguments); +}); +var dynCall_viiiiiiii = Module["dynCall_viiiiiiii"] = (function() { + assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); + assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); + return Module["asm"]["dynCall_viiiiiiii"].apply(null, arguments); +}); +var dynCall_viiiiiiiiiii = Module["dynCall_viiiiiiiiiii"] = (function() { + assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); + assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); + return Module["asm"]["dynCall_viiiiiiiiiii"].apply(null, arguments); +}); +var dynCall_viidd = Module["dynCall_viidd"] = (function() { + assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); + assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); + return Module["asm"]["dynCall_viidd"].apply(null, arguments); +}); var dynCall_viiiiiiiiiiii = Module["dynCall_viiiiiiiiiiii"] = (function() { assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); @@ -8345,11 +8748,6 @@ var dynCall_viidddd = Module["dynCall_viidddd"] = (function() { assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); return Module["asm"]["dynCall_viidddd"].apply(null, arguments); }); -var dynCall_viidddddd = Module["dynCall_viidddddd"] = (function() { - assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); - assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); - return Module["asm"]["dynCall_viidddddd"].apply(null, arguments); -}); var dynCall_iiiiiddd = Module["dynCall_iiiiiddd"] = (function() { assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"); assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"); diff --git a/www/common/onlyoffice/x2t/x2t.wasm b/www/common/onlyoffice/x2t/x2t.wasm index 3a35af86a..170e6bbee 100644 Binary files a/www/common/onlyoffice/x2t/x2t.wasm and b/www/common/onlyoffice/x2t/x2t.wasm differ diff --git a/www/common/onlyoffice/x2t/x2t.worker.js b/www/common/onlyoffice/x2t/x2t.worker.js deleted file mode 100644 index 9f738e1d7..000000000 --- a/www/common/onlyoffice/x2t/x2t.worker.js +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright 2015 The Emscripten Authors. All rights reserved. -// Emscripten is available under two separate licenses, the MIT license and the -// University of Illinois/NCSA Open Source License. Both these licenses can be -// found in the LICENSE file. - -// Pthread Web Worker startup routine: -// This is the entry point file that is loaded first by each Web Worker -// that executes pthreads on the Emscripten application. - -// Thread-local: -var threadInfoStruct = 0; // Info area for this thread in Emscripten HEAP (shared). If zero, this worker is not currently hosting an executing pthread. -var selfThreadId = 0; // The ID of this thread. 0 if not hosting a pthread. -var parentThreadId = 0; // The ID of the parent pthread that launched this thread. - -var noExitRuntime; - -// performance.now() is specced to return a wallclock time in msecs since that Web Worker/main thread launched. However for pthreads this can cause -// subtle problems in emscripten_get_now() as this essentially would measure time from pthread_create(), meaning that the clocks between each threads -// would be wildly out of sync. Therefore sync all pthreads to the clock on the main browser thread, so that different threads see a somewhat -// coherent clock across each of them (+/- 0.1msecs in testing) -var __performance_now_clock_drift = 0; - -// Cannot use console.log or console.error in a web worker, since that would risk a browser deadlock! https://bugzilla.mozilla.org/show_bug.cgi?id=1049091 -// Therefore implement custom logging facility for threads running in a worker, which queue the messages to main thread to print. -var Module = {}; - -// These modes need to assign to these variables because of how scoping works in them. - -function assert(condition, text) { - if (!condition) abort('Assertion failed: ' + text); -} - -function threadPrintErr() { - var text = Array.prototype.slice.call(arguments).join(' '); - console.error(text); - console.error(new Error().stack); -} -function threadAlert() { - var text = Array.prototype.slice.call(arguments).join(' '); - postMessage({cmd: 'alert', text: text, threadId: selfThreadId}); -} -var err = threadPrintErr; -this.alert = threadAlert; - -// When using postMessage to send an object, it is processed by the structured clone algorithm. -// The prototype, and hence methods, on that object is then lost. This function adds back the lost prototype. -// This does not work with nested objects that has prototypes, but it suffices for WasmSourceMap and WasmOffsetConverter. -function resetPrototype(constructor, attrs) { - var object = Object.create(constructor.prototype); - for (var key in attrs) { - if (attrs.hasOwnProperty(key)) { - object[key] = attrs[key]; - } - } - return object; -} - -Module['instantiateWasm'] = function(info, receiveInstance) { - // Instantiate from the module posted from the main thread. - // We can just use sync instantiation in the worker. - var instance = new WebAssembly.Instance(Module['wasmModule'], info); - // We don't need the module anymore; new threads will be spawned from the main thread. - Module['wasmModule'] = null; - receiveInstance(instance); // The second 'module' parameter is intentionally null here, we don't need to keep a ref to the Module object from here. - return instance.exports; -}; - - -this.onmessage = function(e) { - try { - if (e.data.cmd === 'load') { // Preload command that is called once per worker to parse and load the Emscripten code. - - // Initialize the global "process"-wide fields: - Module['DYNAMIC_BASE'] = e.data.DYNAMIC_BASE; - Module['DYNAMICTOP_PTR'] = e.data.DYNAMICTOP_PTR; - - // Module and memory were sent from main thread - Module['wasmModule'] = e.data.wasmModule; - Module['wasmMemory'] = e.data.wasmMemory; - Module['buffer'] = Module['wasmMemory'].buffer; - - Module['ENVIRONMENT_IS_PTHREAD'] = true; - - if (typeof e.data.urlOrBlob === 'string') { - importScripts(e.data.urlOrBlob); - } else { - var objectUrl = URL.createObjectURL(e.data.urlOrBlob); - importScripts(objectUrl); - URL.revokeObjectURL(objectUrl); - } - PThread = Module['PThread']; - HEAPU32 = Module['HEAPU32']; - - if (typeof FS !== 'undefined' && typeof FS.createStandardStreams === 'function') FS.createStandardStreams(); - postMessage({ cmd: 'loaded' }); - } else if (e.data.cmd === 'objectTransfer') { - PThread.receiveObjectTransfer(e.data); - } else if (e.data.cmd === 'run') { // This worker was idle, and now should start executing its pthread entry point. - __performance_now_clock_drift = performance.now() - e.data.time; // Sync up to the clock of the main thread. - threadInfoStruct = e.data.threadInfoStruct; - Module['__register_pthread_ptr'](threadInfoStruct, /*isMainBrowserThread=*/0, /*isMainRuntimeThread=*/0); // Pass the thread address inside the asm.js scope to store it for fast access that avoids the need for a FFI out. - selfThreadId = e.data.selfThreadId; - parentThreadId = e.data.parentThreadId; - // Establish the stack frame for this thread in global scope - // The stack grows downwards - var max = e.data.stackBase; - var top = e.data.stackBase + e.data.stackSize; - Module['applyStackValues'](top, top, max); - assert(threadInfoStruct); - assert(selfThreadId); - assert(parentThreadId); - assert(top != 0); - assert(max === e.data.stackBase); - assert(top > max); - // Call inside asm.js/wasm module to set up the stack frame for this pthread in asm.js/wasm module scope - Module['establishStackSpace'](e.data.stackBase, e.data.stackBase + e.data.stackSize); - Module['_emscripten_tls_init'](); - Module['writeStackCookie'](); - - PThread.receiveObjectTransfer(e.data); - PThread.setThreadStatus(Module['_pthread_self'](), 1/*EM_THREAD_STATUS_RUNNING*/); - - try { - // pthread entry points are always of signature 'void *ThreadMain(void *arg)' - // Native codebases sometimes spawn threads with other thread entry point signatures, - // such as void ThreadMain(void *arg), void *ThreadMain(), or void ThreadMain(). - // That is not acceptable per C/C++ specification, but x86 compiler ABI extensions - // enable that to work. If you find the following line to crash, either change the signature - // to "proper" void *ThreadMain(void *arg) form, or try linking with the Emscripten linker - // flag -s EMULATE_FUNCTION_POINTER_CASTS=1 to add in emulation for this x86 ABI extension. - var result = Module['dynCall_ii'](e.data.start_routine, e.data.arg); - - Module['checkStackCookie'](); - - } catch(e) { - if (e === 'Canceled!') { - PThread.threadCancel(); - return; - } else if (e === 'SimulateInfiniteLoop' || e === 'pthread_exit') { - return; - } else { - Atomics.store(HEAPU32, (threadInfoStruct + 4 /*C_STRUCTS.pthread.threadExitCode*/ ) >> 2, (e instanceof Module['ExitStatus']) ? e.status : -2 /*A custom entry specific to Emscripten denoting that the thread crashed.*/); - Atomics.store(HEAPU32, (threadInfoStruct + 0 /*C_STRUCTS.pthread.threadStatus*/ ) >> 2, 1); // Mark the thread as no longer running. - if (typeof(Module['_emscripten_futex_wake']) !== "function") { - err("Thread Initialisation failed."); - throw e; - } - Module['_emscripten_futex_wake'](threadInfoStruct + 0 /*C_STRUCTS.pthread.threadStatus*/, 0x7FFFFFFF/*INT_MAX*/); // Wake all threads waiting on this thread to finish. - if (!(e instanceof Module['ExitStatus'])) throw e; - } - } - // The thread might have finished without calling pthread_exit(). If so, then perform the exit operation ourselves. - // (This is a no-op if explicit pthread_exit() had been called prior.) - if (!noExitRuntime) PThread.threadExit(result); - } else if (e.data.cmd === 'cancel') { // Main thread is asking for a pthread_cancel() on this thread. - if (threadInfoStruct) { - PThread.threadCancel(); - } - } else if (e.data.target === 'setimmediate') { - // no-op - } else if (e.data.cmd === 'processThreadQueue') { - if (threadInfoStruct) { // If this thread is actually running? - Module['_emscripten_current_thread_process_queued_calls'](); - } - } else { - err('worker.js received unknown command ' + e.data.cmd); - console.error(e.data); - } - } catch(e) { - console.error('worker.js onmessage() captured an uncaught exception: ' + e); - console.error(e.stack); - throw e; - } -}; - -// Node.js support -if (typeof process === 'object' && typeof process.versions === 'object' && typeof process.versions.node === 'string') { - // Create as web-worker-like an environment as we can. - self = { - location: { - href: __filename - } - }; - - var onmessage = this.onmessage; - - var nodeWorkerThreads = require('worker_threads'); - - Worker = nodeWorkerThreads.Worker; - - var parentPort = nodeWorkerThreads.parentPort; - - parentPort.on('message', function(data) { - onmessage({ data: data }); - }); - - var nodeFS = require('fs'); - - var nodeRead = function(filename) { - return nodeFS.readFileSync(filename, 'utf8'); - }; - - function globalEval(x) { - global.require = require; - global.Module = Module; - eval.call(null, x); - } - - importScripts = function(f) { - globalEval(nodeRead(f)); - }; - - postMessage = function(msg) { - parentPort.postMessage(msg); - }; - - if (typeof performance === 'undefined') { - performance = { - now: function() { - return Date.now(); - } - }; - } -} - - diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index 1745d0dd7..23412bf60 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -37,6 +37,9 @@ define([ var onReadyEvt = Util.mkEvent(true); var onCacheReadyEvt = Util.mkEvent(true); + // XXX Number of days before deleting the cache for a channel or blob + var CACHE_MAX_AGE = 90; // DAYS + // Default settings for new users var NEW_USER_SETTINGS = { drive: { @@ -334,7 +337,6 @@ define([ if (!s.rpc) { return void cb({error: 'RPC_NOT_READY'}); } s.rpc.removeOwnedChannel(channel, function (err) { - if (!err) { Cache.clearChannel(channel); } cb({error:err}); }); }; @@ -2861,6 +2863,15 @@ define([ }, PING_INTERVAL); }; + Store.disableCache = function (clientId, disabled, cb) { + if (disabled) { + Cache.disable(); + } else { + Cache.enable(); + } + cb(); + }; + /** * Data: * - userHash or anonHash @@ -2901,6 +2912,11 @@ define([ }); }); } + + if (data.disableCache) { + Cache.disable(); + } + initialized = true; postMessage = function (clientId, cmd, d, cb) { data.query(clientId, cmd, d, cb); @@ -2920,6 +2936,27 @@ define([ callback(ret); }); + + // Clear inactive channels from cache + onReadyEvt.reg(function () { + var inactiveTime = (+new Date()) - CACHE_MAX_AGE * (24 * 3600 * 1000); + Cache.getKeys(function (err, keys) { + if (err) { return void console.error(err); } + var next = function (cb) { + if (!keys.length) { return; } + var key = keys.pop(); + var value = Cache.getTime(key, function (err, atime) { + if (err) { return void next(); } + if (!atime || atime < inactiveTime) { + Cache.clearChannel(key, next()); + return; + } + next(); + }); + }; + next(); + }); + }); }; Store.disconnect = function () { diff --git a/www/common/outer/cache-store.js b/www/common/outer/cache-store.js index a7b1bd3d7..45f334bb4 100644 --- a/www/common/outer/cache-store.js +++ b/www/common/outer/cache-store.js @@ -7,10 +7,14 @@ define([ // Check if indexedDB is allowed var allowed = false; + var disabled = false; + var supported = false; + try { var request = window.indexedDB.open('test_db', 1); request.onsuccess = function () { - allowed = true; + supported = true; + allowed = supported && !disabled; onReady.fire(); }; request.onerror = function () { @@ -20,6 +24,15 @@ define([ onReady.fire(); } + S.enable = function () { + disabled = false; + allowed = supported && !disabled; + }; + S.disable = function () { + disabled = true; + allowed = supported && !disabled; + }; + var cache = localForage.createInstance({ driver: localForage.INDEXEDDB, name: "cp_cache" @@ -141,6 +154,30 @@ define([ }); }; + S.getKeys = function (cb) { + cb = Util.once(Util.mkAsync(cb || function () {})); + onReady.reg(function () { + if (!allowed) { return void cb('NOCACHE'); } + cache.keys().then(function (keys) { + cb(null, keys); + }).catch(function (err) { + cb(err); + }); + }); + }; + S.getTime = function (id, cb) { + cb = Util.once(Util.mkAsync(cb || function () {})); + onReady.reg(function () { + if (!allowed) { return void cb('NOCACHE'); } + cache.getItem(id, function (err, obj) { + if (err || !obj || !obj.c) { + return void cb(Util.serializeError(err || 'EINVAL')); + } + cb(null, obj.t); + }); + }); + }; + self.CryptPad_clearIndexedDB = S.clear; return S; diff --git a/www/common/outer/store-rpc.js b/www/common/outer/store-rpc.js index 767448284..5bae1506f 100644 --- a/www/common/outer/store-rpc.js +++ b/www/common/outer/store-rpc.js @@ -14,6 +14,7 @@ define([ CREATE_README: Store.createReadme, MIGRATE_ANON_DRIVE: Store.migrateAnonDrive, PING: function (cId, data, cb) { cb(); }, + CACHE_DISABLE: Store.disableCache, // RPC UPDATE_PIN_LIMIT: Store.updatePinLimit, GET_PIN_LIMIT: Store.getPinLimit, diff --git a/www/common/outer/worker-channel.js b/www/common/outer/worker-channel.js index a359d8836..06b38a96b 100644 --- a/www/common/outer/worker-channel.js +++ b/www/common/outer/worker-channel.js @@ -76,9 +76,15 @@ define([ }; // Fire an event. channel.event('EV_SOMETHING', { args: "whatever" }); - var event = chan.event = function (e, content) { + var event = chan.event = function (e, content, opts) { + opts = opts || {}; evReady.reg(function () { - postMsg(JSON.stringify({ content: content, q: e })); + var toSend = { + content: content, + q: e, + raw: opts.raw + }; + postMsg(opts.raw ? toSend : JSON.stringify(toSend)); }); }; diff --git a/www/common/pinpad.js b/www/common/pinpad.js index 2841656bc..1e2031088 100644 --- a/www/common/pinpad.js +++ b/www/common/pinpad.js @@ -1,6 +1,6 @@ (function () { var factory = function (Util, Rpc) { - var create = function (network, proxy, _cb) { + var create = function (network, proxy, _cb, Cache) { if (typeof(_cb) !== 'function') { throw new Error("Expected callback"); } var cb = Util.once(Util.mkAsync(_cb)); @@ -155,6 +155,9 @@ var factory = function (Util, Rpc) { if (e) { return void cb(e); } if (response && response.length && response[0] === "OK") { cb(); + if (Cache && Cache.clearChannel) { + Cache.clearChannel(channel); + } } else { cb('INVALID_RESPONSE'); } diff --git a/www/common/sframe-common-file.js b/www/common/sframe-common-file.js index 6a0367b69..674a98ae8 100644 --- a/www/common/sframe-common-file.js +++ b/www/common/sframe-common-file.js @@ -319,7 +319,7 @@ define([ style: 'display:flex;align-items:center;justify-content:space-between' }, [ UI.createCheckbox('cp-upload-owned', Messages.upload_modal_owner, modalState.owned), - createHelper('/faq.html#keywords-owned', Messages.creation_owned1) + createHelper('https://docs.cryptpad.fr/en/user_guide/share_and_access.html#owners', Messages.creation_owned1) ]), manualStore ]); @@ -374,7 +374,7 @@ define([ style: 'display:flex;align-items:center;justify-content:space-between' }, [ UI.createCheckbox('cp-upload-owned', Messages.uploadFolder_modal_owner, modalState.owned), - createHelper('/faq.html#keywords-owned', Messages.creation_owned1) + createHelper('https://docs.cryptpad.fr/en/user_guide/share_and_access.html#owners', Messages.creation_owned1) ]), manualStore ]); diff --git a/www/common/sframe-common-outer.js b/www/common/sframe-common-outer.js index 1d5597ab2..70aef650a 100644 --- a/www/common/sframe-common-outer.js +++ b/www/common/sframe-common-outer.js @@ -1476,6 +1476,21 @@ define([ }); }); + sframeChan.on('Q_CACHE_DISABLE', function (data, cb) { + if (data.disabled) { + Utils.Cache.clear(function () { + Utils.Cache.disable(); + }); + Cryptpad.disableCache(true, cb); + return; + } + Utils.Cache.enable(); + Cryptpad.disableCache(false, cb); + }); + sframeChan.on('Q_CLEAR_CACHE', function (data, cb) { + Utils.Cache.clear(cb); + }); + sframeChan.on('Q_PIN_GET_USAGE', function (teamId, cb) { Cryptpad.isOverPinLimit(teamId, function (err, overLimit, data) { cb({ diff --git a/www/common/sframe-common.js b/www/common/sframe-common.js index c60402e7b..9304d9469 100644 --- a/www/common/sframe-common.js +++ b/www/common/sframe-common.js @@ -642,6 +642,9 @@ define([ funcs.gotoURL = function (url) { ctx.sframeChan.event('EV_GOTO_URL', url); }; funcs.openURL = function (url) { ctx.sframeChan.event('EV_OPEN_URL', url); }; + funcs.getBounceURL = function (url) { + return window.location.origin + '/bounce/#' + encodeURIComponent(url); + }; funcs.openUnsafeURL = function (url) { var app = ctx.metadataMgr.getPrivateData().app; if (app === "sheet") { @@ -755,7 +758,7 @@ define([ window.cryptpadStore._put(k, v, cb); var x = {}; x[k] = v; - ctx.sframeChan.event('EV_LOCALSTORE_PUT', x); + ctx.sframeChan.event('EV_LOCALSTORE_PUT', x, {raw:true}); }; }); diff --git a/www/common/toolbar.js b/www/common/toolbar.js index 6dcb44024..138cc5590 100644 --- a/www/common/toolbar.js +++ b/www/common/toolbar.js @@ -838,7 +838,7 @@ MessengerUI, Messages) { /*.append($('', { //src: '/customize/images/logo_white.png?' + ApiConfig.requireConf.urlArgs - src: '/customize/main-favicon.png?' + ApiConfig.requireConf.urlArgs + src: '/customize/favicon/main-favicon.png?' + ApiConfig.requireConf.urlArgs }));*/ var onClick = function (e) { e.preventDefault(); diff --git a/www/common/translations/messages.de.json b/www/common/translations/messages.de.json index 6ee050cc8..92e693efb 100644 --- a/www/common/translations/messages.de.json +++ b/www/common/translations/messages.de.json @@ -1506,5 +1506,6 @@ "admin_support_normal": "Unbeantwortete Tickets:", "admin_support_premium": "Premium-Tickets:", "access_offline": "Du bist offline. Verwaltung von Zugriffsrechten ist nicht verfügbar.", - "share_noContactsOffline": "Du bist offline. Kontakte sind nicht verfügbar." + "share_noContactsOffline": "Du bist offline. Kontakte sind nicht verfügbar.", + "offlineError": "OFFLINE-MODUS NICHT VERFÜGBAR" } diff --git a/www/common/translations/messages.fr.json b/www/common/translations/messages.fr.json index aeca9722f..dc93709fb 100644 --- a/www/common/translations/messages.fr.json +++ b/www/common/translations/messages.fr.json @@ -1507,5 +1507,5 @@ "admin_support_answered": "Tickets traité :", "admin_support_normal": "Tickets sans réponse :", "admin_support_premium": "Tickets prime :", - "offlineError": "MODE HORS LIGNE NON DISPONIBLE" + "offlineError": "Impossible de synchroniser les données les plus récentes, cette page ne peut pas être affichée pour le moment. Le chargement continuera au retour de votre connexion au service." } diff --git a/www/common/translations/messages.json b/www/common/translations/messages.json index 3e94aab03..48601972f 100644 --- a/www/common/translations/messages.json +++ b/www/common/translations/messages.json @@ -1507,5 +1507,5 @@ "admin_support_last": "Updated on: ", "access_offline": "You are currently offline. Access management is not available.", "share_noContactsOffline": "You are currently offline. Contacts are not available.", - "offlineError": "OFFLINE MODE NOT AVAILABLE" + "offlineError": "Unable to synchronize the most recent data, this page cannot be displayed at this time. Loading will continue when your connection to the service is restored." } diff --git a/www/contacts/app-contacts.less b/www/contacts/app-contacts.less index 99b927b6c..ba45c962c 100644 --- a/www/contacts/app-contacts.less +++ b/www/contacts/app-contacts.less @@ -5,9 +5,7 @@ // body &.cp-app-contacts { .framework_min_main( - @bg-color: @colortheme_friends-bg, - @warn-color: @colortheme_friends-warn, - @color: @colortheme_friends-color + @bg-color: @colortheme_static_apps[contacts] ); display: flex; diff --git a/www/drive/app-drive.less b/www/drive/app-drive.less index 2cf445524..21ecb6b89 100644 --- a/www/drive/app-drive.less +++ b/www/drive/app-drive.less @@ -2,11 +2,7 @@ @import (reference) '../../customize/src/less2/include/drive.less'; &.cp-app-drive { - .framework_min_main( - @bg-color: @colortheme_drive-bg, - @warn-color: @colortheme_drive-warn, - @color: @colortheme_drive-color - ); + .framework_min_main(); .drive_main(); } diff --git a/www/file/app-file.less b/www/file/app-file.less index be7e067f1..1226ded8d 100644 --- a/www/file/app-file.less +++ b/www/file/app-file.less @@ -5,9 +5,7 @@ &.cp-app-file { .framework_min_main( - @bg-color: @colortheme_file-bg, - @warn-color: @colortheme_file-warn, - @color: @colortheme_file-color + @bg-color: @colortheme_apps[file], ); .tokenfield_main(); diff --git a/www/kanban/app-kanban.less b/www/kanban/app-kanban.less index a4c7ad743..524d414b4 100644 --- a/www/kanban/app-kanban.less +++ b/www/kanban/app-kanban.less @@ -7,9 +7,7 @@ // body &.cp-app-kanban { .framework_main( - @bg-color: @colortheme_kanban-bg, - @warn-color: @colortheme_kanban-warn, - @color: @colortheme_kanban-color + @bg-color: @colortheme_apps[kanban], ); display: flex; diff --git a/www/login/index.html b/www/login/index.html index 31d4c99f8..f1cf1b429 100644 --- a/www/login/index.html +++ b/www/login/index.html @@ -2,10 +2,10 @@ - CryptPad: Zero Knowledge, Collaborative Real Time Editing + CryptPad: Collaboration suite, encrypted and open-source - + diff --git a/www/logout/index.html b/www/logout/index.html index 365c4bbe2..6d72fb30b 100644 --- a/www/logout/index.html +++ b/www/logout/index.html @@ -2,11 +2,11 @@ - CryptPad: Zero Knowledge, Collaborative Real Time Editing + CryptPad: Collaboration suite, encrypted and open-source - +