Merge branch 'soon' of github.com:xwiki-labs/cryptpad into soon

pull/1/head
yflory 4 years ago
commit 6d7efb4853

@ -1,3 +1,54 @@
# 4.4.0
## Goals
## Update notes
* no default privacy policy
* nginx update
* calendar
* /api/broadcast
* clarified TELEMETRY in the 4.3.1 release notes
## Features
* prompt premium users to cancel their subscriptions before deleting their accounts
* check that headers for XLSX export are correctly set via the checkup app
* remove HTML from most translations
* localize links to the docs where a translation exists
* implement admin-broadcast features
* add "getting started" banner in the drive
* calendars: BETA
* clear document cache when visiting /logout/
## Bug fixes
* bad channel IDs stored in your drive or accessed via bad links (corrupted somehow)
* don't try to join invalid channels
* don't try to get their metadata
* guard against some type errors in the support page
* remove redundant link from OpenCollective popup
* guard against a type error when copying a pad in nodrive mode
* correctly navigate to anchors when clicking links to anchors in read-only rich-text pads
* OnlyOffice
* inform OnlyOffice of userlist changes
* rename doc and slide editors
* handle different lock formats for docs and slides
* relative to sheets
* handle some cursor logic outside of sheets
* handle locks when integrating remote checkpoints in strict mode
* OnlyOffice renamed buttons in slides and docs and we need to hardcode CSS that hides them by their randomly generated IDs
* support CryptPad cursor colors in OnlyOffice by adding opacity value
* use the appropriate APIs to detect if the document is modified
* display users cursor colors in the toolbar next to their name
* handle errors when migrating in embed mode
* change the method we use to lock the whole sheet since OnlyOffice changed their internal API's behaviour
* **soft release of OnlyOffice presentations and docs**
* if you've been using them, tell your users to export them before they break
* we still don't recommend that you use either editor!
# 4.3.1
This minor release addresses some bugs discovered after deploying and tagging 4.3.0
@ -6,7 +57,7 @@ This minor release addresses some bugs discovered after deploying and tagging 4.
* Our 4.2.0 update introduced a new internal format for spreadsheets which broke support for spreadsheet templates using the older format. This release implements a compatibility layer.
* We fixed some minor bugs in our rich text editor. Section links in the table of contents now navigate correctly. Adding a comment to a link no longer prevents clicking on that link.
* A race condition that caused poll titles to reset occasionally has been fixed.
* We've added a little bit of telemetry to tell our server when a newly registered user opens the new user guide which is automatically added to their drive. We're considering either rewriting or removing this guide, so it's helpful to be able to determine how often people actually read it.
* We've added a little bit of telemetry to tell the application server when a newly registered user opens the new user guide which is automatically added to their drive. We're considering either rewriting or removing this guide, so it's helpful to be able to determine how often people actually read it.
* An error introduced in 4.3.0 was preventing the creation of new teams. It's been fixed.
* 4.3.0 temporarily broke the sheet editor for iPad users. Migrations to a new internal format that were run while the editor was in a bad state produced some invalid data that prevented sheets from loading correctly. This release improves the platforms ability to recover from bad states like this and improves its ability to detect the kind of errors we observed.

@ -135,10 +135,6 @@ define([
Exports.mergeAnonDrive = 1;
};
var setCreateReadme = function () {
Exports.createReadme = 1;
};
Exports.loginOrRegister = function (uname, passwd, isRegister, shouldImport, cb) {
if (typeof(cb) !== 'function') { return; }
@ -372,7 +368,6 @@ define([
proxy.curvePrivate = opt.curvePrivate;
proxy.login_name = uname;
proxy[Constants.displayNameKey] = uname;
setCreateReadme();
if (shouldImport) {
setMergeAnonDrive();
} else {
@ -436,9 +431,6 @@ define([
if (Exports.mergeAnonDrive) {
loginOpts.mergeAnonDrive = 1;
}
if (Exports.createReadme) {
loginOpts.createReadme = 1;
}
h = Hash.getLoginURL(h, loginOpts);
var parser = document.createElement('a');

@ -120,10 +120,6 @@ define(req, function(AppConfig, Default, Language) {
}
};
messages.driveReadme = '["BODY",{"class":"cke_editable cke_editable_themed cke_contents_ltr cke_show_borders","contenteditable":"true","spellcheck":"false","style":"color: rgb(51, 51, 51);"},' +
'[["H1",{},["'+messages.readme_welcome+'"]],["P",{},["'+messages.readme_p1+'"]],["P",{},["'+messages.readme_p2+'"]],["HR",{},[]],["H2",{},["'+messages.readme_cat1+'",["BR",{},[]]]],["UL",{},[["LI",{},["'+messages._getKey("readme_cat1_l1", ['",["STRONG",{},["'+messages.newButton+'"]],"', '",["STRONG",{},["'+messages.type.pad+'"]],"'])+'"]],["LI",{},["'+messages.readme_cat1_l2+'"]],["LI",{},["'+messages._getKey("readme_cat1_l3", ['",["STRONG",{},["'+messages.fm_unsortedName+'"]],"'])+'",["UL",{},[["LI",{},["'+messages._getKey("readme_cat1_l3_l1", ['",["STRONG",{},["'+messages.fm_rootName+'"]],"'])+'"]],["LI",{},["'+messages.readme_cat1_l3_l2+'"]]]]]],["LI",{},["'+messages._getKey("readme_cat1_l4", ['",["STRONG",{},["'+messages.fm_trashName+'"]],"'])+'",["BR",{},[]]]]]],["P",{},[["BR",{},[]]]],["H2",{},["'+messages.readme_cat2+'",["BR",{},[]]]],["UL",{},[["LI",{},["'+messages._getKey("readme_cat2_l1", ['",["STRONG",{},["'+messages.shareButton+'"]],"', '",["STRONG",{},["'+messages.edit+'"]],"', '",["STRONG",{},["'+messages.view+'"]],"'])+'"]],["LI",{},["'+messages.readme_cat2_l2+'"]]]],["P",{},[["BR",{},[]]]],["H2",{},["'+messages.readme_cat3+'"]],["UL",{},[["LI",{},["'+messages.readme_cat3_l1+'"]],["LI",{},["'+messages.readme_cat3_l2+'"]],["LI",{},["'+messages.readme_cat3_l3+'",["BR",{},[]]]]]]],' +
'{"metadata":{"defaultTitle":"' + messages.driveReadmeTitle + '","title":"' + messages.driveReadmeTitle + '"}}]';
return messages;
});

@ -12,6 +12,36 @@ define([
return e;
};
Pages.externalLink = function (el, href) {
if (!el) { return el; }
el.setAttribute("rel", "noopener noreferrer");
el.setAttribute("target", "_blank");
if (typeof(href) === 'string') {
el.setAttribute("href", href);
}
return el;
};
// this rewrites URLS to point to the appropriate translation:
// French, German, or English as a default
var documentedLanguages = ['en', 'fr', 'de'];
Pages.localizeDocsLink = function (href) {
try {
var lang = Msg._getLanguage();
if (documentedLanguages.indexOf(lang) > 0) {
return href.replace('/en/', '/' + lang + '/');
}
} catch (err) {
console.error(err);
// if it fails just use the default href (English)
}
return href;
};
Pages.documentationLink = function (el, href) {
return Pages.externalLink(el, Pages.localizeDocsLink(href));
};
var languageSelector = function () {
var options = [];
var languages = Msg._languages;
@ -45,6 +75,7 @@ define([
};
var footLink = function (ref, loc, text) {
if (!ref) { return; }
var attrs = {
href: ref,
};
@ -62,7 +93,7 @@ define([
var imprintUrl = AppConfig.imprint && (typeof(AppConfig.imprint) === "boolean" ?
'/imprint.html' : AppConfig.imprint);
Pages.versionString = "v4.3.1";
Pages.versionString = "v4.4.0";
// used for the about menu
Pages.imprintLink = AppConfig.imprint ? footLink(imprintUrl, 'imprint') : undefined;
@ -71,6 +102,18 @@ define([
Pages.docsLink = footLink('https://docs.cryptpad.fr', 'docs_link');
Pages.infopageFooter = function () {
var terms = footLink('/terms.html', 'footer_tos'); // FIXME this should be configurable like the other legal pages
var legalFooter;
// only display the legal part of the footer if it has content
if (terms || Pages.privacyLink || Pages.imprintLink) {
legalFooter = footerCol('footer_legal', [
terms,
Pages.privacyLink,
Pages.imprintLink,
]);
}
return h('footer', [
h('div.container', [
h('div.row', [
@ -97,11 +140,7 @@ define([
footLink('https://github.com/xwiki-labs/cryptpad/wiki/Contributors', 'footer_team'),
footLink('http://www.xwiki.com', null, 'XWiki SAS'),
]),
footerCol('footer_legal', [
footLink('/terms.html', 'footer_tos'),
Pages.privacyLink,
Pages.imprintLink,
]),
legalFooter,
])
]),
h('div.cp-version-footer', [

@ -80,6 +80,12 @@ define([
});
}
var supportText = Pages.setHTML(h('span'), Msg.home_support);
Pages.documentationLink(supportText.querySelector('a'), "https://docs.cryptpad.fr/en/how_to_contribute.html");
var opensource = Pages.setHTML(h('p'), Msg.home_opensource);
Pages.externalLink(opensource.querySelector('a'), "https://github.com/xwiki-labs/cryptpad");
var blocks = [
h('div.row.cp-page-section', [
h('div.col-sm-6',
@ -103,7 +109,7 @@ define([
h('div.row.cp-page-section', [
h('div.col-sm-6', [
h('h2', Msg.home_opensource_title),
Pages.setHTML(h('p'), Msg.home_opensource),
opensource,
h('img.small-logo.cp-img-invert', {
src: '/customize/images/logo_AGPLv3.svg',
alt: 'APGL3 License Logo'
@ -111,7 +117,7 @@ define([
]),
h('div.col-sm-6', [
h('h2', Msg.home_support_title),
Pages.setHTML(h('span'), Msg.home_support),
supportText,
subscribeButton,
Pages.crowdfundingButton(function () {
Feedback.send('HOME_SUPPORT_CRYPTPAD');

@ -1,36 +0,0 @@
define([
'/common/hyperscript.js',
'/customize/messages.js',
'/customize/pages.js'
], function (h, Msg, Pages) {
return function () {
return h('div#cp-main', [
Pages.infopageTopbar(),
h('div.container.cp-container.cp-privacy',[
h('div.row.cp-page-title', h('h1', Msg.policy_title)),
h('h2', Msg.policy_whatweknow),
Pages.setHTML(h('p'), Msg.policy_whatweknow_p1),
h('h2', Msg.policy_howweuse),
h('p', Msg.policy_howweuse_p1),
h('p', Msg.policy_howweuse_p2),
h('h2', Msg.policy_whatwetell),
h('p', Msg.policy_whatwetell_p1),
h('h2', Msg.policy_links),
h('p', Msg.policy_links_p1),
h('h2', Msg.policy_ads),
h('p', Msg.policy_ads_p1),
h('h2', Msg.policy_choices),
h('p', Msg.policy_choices_open),
Pages.setHTML(h('p'), Msg.policy_choices_vpn),
]),
Pages.infopageFooter()
]);
};
});

@ -9,6 +9,13 @@ define([
return function () {
var urlArgs = Config.requireConf.urlArgs;
var tos = $(UI.createCheckbox('accept-terms')).find('.cp-checkmark-label').append(Msg.register_acceptTerms).parent()[0];
$(tos).find('a').attr({
href: '/terms.html',
target: '_blank',
tabindex: '-1',
});
return [h('div#cp-main', [
Pages.infopageTopbar(),
h('div.container.cp-container', [
@ -47,7 +54,7 @@ define([
UI.createCheckbox('import-recent', Msg.register_importRecent, true)
]),
h('div.checkbox-container', [
$(UI.createCheckbox('accept-terms')).find('.cp-checkmark-label').append(Msg.register_acceptTerms).parent()[0]
tos,
]),
h('button#register', Msg.login_register)
])

@ -17,6 +17,9 @@ define([
};
return function () {
var xwiki_info = Pages.setHTML(h('span'), Msg.whatis_xwiki_info);
Pages.externalLink(xwiki_info.querySelector('a'), "https://xwiki.com");
return h('div#cp-main', [
Pages.infopageTopbar(),
h('div.container.cp-container', [
@ -52,7 +55,7 @@ define([
h('div.row.cp-page-section', [
h('div.col-md-6', [
Pages.setHTML(h('h2'), Msg.whatis_drive),
Pages.setHTML(h('spam'), Msg.whatis_drive_info),
Pages.setHTML(h('span'), Msg.whatis_drive_info),
]),
h('div.col-md-6', [
h('img.cp-shadow', {
@ -91,7 +94,7 @@ define([
h('div.row.cp-page-section', [
h('div.col-md-6', [
Pages.setHTML(h('h2'), Msg.whatis_xwiki),
Pages.setHTML(h('spam'), Msg.whatis_xwiki_info),
xwiki_info,
]),
h('div.col-md-6.small-logos', [
h('img', {

@ -1,16 +0,0 @@
<!DOCTYPE html>
<html class="cp">
<!-- If this file is not called customize.dist/src/template.html, it is generated -->
<head>
<title data-localization="main_title">CryptPad: Collaboration suite, encrypted and open-source</title>
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" type="image/png" href="/customize/favicon/main-favicon.png" id="favicon"/>
<script async data-bootload="/customize/template.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
</head>
<body class="html">
<noscript>
<p><strong>OOPS</strong> In order to do encryption in your browser, Javascript is really <strong>really</strong> required.</p>
<p><strong>OUPS</strong> Afin de pouvoir réaliser le chiffrement dans votre navigateur, Javascript est <strong>vraiment</strong> nécessaire.</p>
</noscript>
</html>

@ -58,12 +58,17 @@
width: 100%;
height: 100%;
z-index: 100000; // alertify container
outline: none;
font: @colortheme_app-font;
.cp-checkmark {
color: @cryptpad_text_col;
}
.cp-admin-message {
color: @cryptpad_text_col;
}
.cp-inline-alert-text {
flex: 1;
}

@ -13,8 +13,8 @@
whiteboard: #a72ba7;
kanban: #8C4;
sheet: #40865c;
oodoc: #5170B5;
ooslide: #C65D27;
doc: #5170B5;
presentation: #C65D27;
file: #CD2532;
}
@ -414,3 +414,12 @@
@cp_whiteboard-board-border: @cryptpad_color_grey_800;
@cp_whiteboard-bg: @cp_app-bg;
@cp_whiteboard-fg: @cryptpad_text_col;
// Flatpickr
@cp_flatpickr-bg: @cryptpad_color_grey_800;
@cp_flatpickr-highlight: @cryptpad_color_brand_300;
@cp_flatpickr-highlight-text: @cryptpad_color_grey_800;
// Calendar
@cp_calendar-border: @cryptpad_color_grey_600;

@ -13,8 +13,8 @@
whiteboard: #a72ba7;
kanban: #8C4;
sheet: #40865c;
oodoc: #5170B5;
ooslide: #C65D27;
doc: #5170B5;
presentation: #C65D27;
file: #CD2532;
}
@ -190,7 +190,7 @@
// Dropdown
@cp_dropdown-fg: @cryptpad_text_col;
@cp_dropdown-bg: @cryptpad_color_grey_100;
@cp_dropdown-bg-hover: @cryptpad_color_grey_100;
@cp_dropdown-bg-hover: @cryptpad_color_grey_200;
@cp_dropdown-bg-active: @cryptpad_color_grey_300;
// Rendered Markdown
@ -414,3 +414,12 @@
@cp_whiteboard-board-border: @cryptpad_color_grey_600;
@cp_whiteboard-bg: @cp_app-bg;
@cp_whiteboard-fg: @cryptpad_text_col;
// Flatpickr
@cp_flatpickr-bg: @cryptpad_color_grey_50;
@cp_flatpickr-highlight: @cryptpad_color_brand_fadest;
@cp_flatpickr-highlight-text: @cryptpad_text_col;
// Calendar
@cp_calendar-border: @cryptpad_color_grey_300;

@ -1,5 +1,6 @@
@import (reference) "./colortheme-all.less";
@import (reference) "./variables.less";
@import (reference) "./tools.less";
.forms_main() {
--LessLoader_require: LessLoader_currentFile();
@ -8,19 +9,25 @@
& {
@alertify_padding-base: @variables_padding;
input:not(.form-control):not([type="checkbox"]), textarea, div.cp-textarea {
input:not(.numInput):not(.form-control):not([type="checkbox"]), textarea, div.cp-textarea {
// background-color: @alertify-input-fg;
color: @cp_forms-fg;
background-color: @cp_forms-bg;
border: 1px solid @cp_forms-border;
width: 100%;
font-size: 100%;
padding: @alertify_padding-base;
&:not(.tui-full-calendar-content) {
width: 100%;
}
&.tui-full-calendar-content {
font-size: @colortheme_app-font-size;
}
&[readonly] {
background-color: @cp_forms-readonly;
border-color: @cp_forms-readonly-border;
color: @cp_forms-fg;
}
.tools_placeholder-color();
}
input:not(.form-control) {
@ -112,6 +119,11 @@
&.no-margin {
margin: 0;
}
&.small {
line-height: initial;
padding: 5px;
height: auto;
}
&:hover, &:not(:disabled):not(.disabled):active, &:focus {
color: @cp_buttons-fg;
@ -169,7 +181,7 @@
&:hover, &:not(:disabled):active, &:focus {
border-color: @cryptpad_text_col;
color: @cryptpad_text_col;
background-color: fade(@cryptpad_text_col, 25%);
background-color: fade(@cryptpad_text_col, 10%);
}
}
@ -280,4 +292,90 @@
color: @cp_drive-infobox-fg;
}
}
// Flatpickr
body {
.flatpickr-calendar {
background: @cp_flatpickr-bg;
color: @cryptpad_text_col;
border-radius: 0;
box-shadow: @variables_shadow;
-webkit-box-shadow: @variables_shadow;
&.arrowTop::before, &.arrowTop::after {
border-bottom: 0;
}
.flatpickr-months {
.flatpickr-month, .flatpickr-months, .flatpickr-next-month, .flatpickr-prev-month {
color: @cryptpad_text_col;
fill: @cryptpad_text_col;
&:hover {
svg {
fill: @cryptpad_text_col;
}
}
}
.flatpickr-current-month {
span.cur-month:hover {
background: fade(@cryptpad_text_col, 10%);
}
.numInputWrapper span.arrowUp:after {
border-bottom-color: @cryptpad_text_col;
}
.numInputWrapper span.arrowDown:after {
border-top-color: @cryptpad_text_col;
}
}
}
.flatpickr-innerContainer {
border-bottom: 0;
.flatpickr-weekdays {
span.flatpickr-weekday {
color: @cryptpad_text_col;
}
}
.flatpickr-days {
border-left: 0;
border-right: 0;
.flatpickr-day {
color: @cryptpad_text_col;
&:hover {
background-color: fade(@cryptpad_text_col, 10%);
border: 0;
}
&.selected {
background: @cp_flatpickr-highlight;
color: @cp_flatpickr-highlight-text;
border: 0;
}
}
.flatpickr-disabled {
color: fade(@cryptpad_text_col, 20%);
}
}
}
.flatpickr-time {
border-top: none;
.flatpickr-time-separator, .flatpickr-am-pm {
color: @cryptpad_text_col;
}
.flatpickr-am-pm {
&:hover {
background-color: fade(@cryptpad_text_col, 10%);
}
}
.numInputWrapper {
.numInput, .arrowUp, .arrowDown {
color: @cryptpad_text_col;
&:hover, &:focus {
background-color: fade(@cryptpad_text_col, 10%);
}
}
span.arrowDown::after, span.arrowUp::after {
border-top-color: @cryptpad_text_col;
border-bottom-color: @cryptpad_text_col;
}
}
}
}
}
}

@ -17,6 +17,16 @@
.cp-notification {
min-height: @notif-height;
display: flex;
.cp-broadcast {
display: flex;
font-size: 30px;
align-items: center;
padding: 0 5px;
color: @cp_dropdown-fg;
&.preview {
color: @cryptpad_color_red;
}
}
.cp-avatar {
.avatar_main(30px);
padding: 0 5px;

@ -400,7 +400,7 @@
button {
.toolbar_button;
&.cp-notifications-bell {
&.cp-notifications-bell, &.cp-maintenance-wrench {
color: @cryptpad_text_col;
}
}
@ -506,7 +506,7 @@
}
.cp-toolbar-user {
height: @toolbar_line-height;
.cp-toolbar-notifications {
.cp-toolbar-notifications, .cp-toolbar-maintenance {
height: @toolbar_line-height;
width: @toolbar_line-height;
margin-left: 0;
@ -709,7 +709,7 @@
height: 43px;
}
}
.cp-toolbar-link, .cp-toolbar-notifications {
.cp-toolbar-link, .cp-toolbar-notifications, .cp-toolbar-maintenance {
line-height: @toolbar_top-height;
width: @toolbar_top-height;
height: @toolbar_top-height;
@ -717,7 +717,7 @@
box-sizing: border-box;
display: inline-block;
}
.cp-toolbar-notifications {
.cp-toolbar-notifications, .cp-toolbar-maintenance {
text-align: center;
font-size: 32px;
margin-left: 10px;
@ -996,6 +996,9 @@
display: flex;
#cp-toolbar-chat-drawer-open { order: 0; }
#cp-toolbar-userlist-drawer-open { order: 1; }
& > .cp-dropdown-container {
height: @toolbar_line-height;
}
}
.cp-toolbar-bottom-right {

@ -4,16 +4,20 @@
@color: @cp_forms-placeholder;
&::-webkit-input-placeholder { /* WebKit, Blink, Edge */
color: @color;
font-weight: normal;
}
&::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */
color: @color;
opacity: 1; /* Firefox */
font-weight: normal;
}
&:-ms-input-placeholder { /* Internet Explorer 10-11 */
color: @color;
font-weight: normal;
}
&::-ms-input-placeholder { /* Microsoft Edge */
color: @color;
font-weight: normal;
}
}

@ -52,7 +52,7 @@ html, body {
.advisory-text {
display: inline-block;
word-break: break-all;
word-break: break-word;
padding: 5px;
//font-size: 16px;
border: 1px solid red;

@ -0,0 +1,20 @@
@import (reference) "../include/colortheme-all.less";
@import (reference) "../include/font.less";
html, body {
.font_main();
margin: 0px;
padding: 0px;
background-color: @cp_static-bg !important;
color: @cryptpad_text_col;
font-family: "IBM Plex Mono";
a {
color: @cryptpad_color_link;
}
}
body {
width: 50%;
min-width: 650px;
margin: auto;
}

@ -61,7 +61,7 @@ server {
# add_header X-Frame-Options "SAMEORIGIN";
set $coop '';
if ($uri ~ ^\/sheet\/.*$) { set $coop 'same-origin'; }
if ($uri ~ ^\/(sheet|presentation|doc)\/.*$) { set $coop 'same-origin'; }
# Enable SharedArrayBuffer in Firefox (for .xlsx export)
add_header Cross-Origin-Resource-Policy cross-origin;
@ -116,7 +116,7 @@ server {
set $unsafe 0;
# the following assets are loaded via the sandbox domain
# they unfortunately still require exceptions to the sandboxing to work correctly.
if ($uri = "/sheet/inner.html") { set $unsafe 1; }
if ($uri ~ ^\/(sheet|doc|presentation)\/inner.html.*$) { set $unsafe 1; }
if ($uri ~ ^\/common\/onlyoffice\/.*\/index\.html.*$) { set $unsafe 1; }
# everything except the sandbox domain is a privileged scope, as they might be used to handle keys
@ -159,7 +159,7 @@ server {
# /api/config is loaded once per page load and is used to retrieve
# the caching variable which is applied to every other resource
# which is loaded during that session.
location = /api/config {
location ~ ^/api/(config|broadcast).*$ {
proxy_pass http://localhost:3000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
@ -204,7 +204,7 @@ server {
# The nodejs server has some built-in forwarding rules to prevent
# URLs like /pad from resulting in a 404. This simply adds a trailing slash
# to a variety of applications.
location ~ ^/(register|login|settings|user|pad|drive|poll|slide|code|whiteboard|file|media|profile|contacts|todo|filepicker|debug|kanban|sheet|support|admin|notifications|teams)$ {
location ~ ^/(register|login|settings|user|pad|drive|poll|slide|code|whiteboard|file|media|profile|contacts|todo|filepicker|debug|kanban|sheet|support|admin|notifications|teams|calendar|presentation|doc)$ {
rewrite ^(.*)$ $1/ redirect;
}

@ -191,7 +191,8 @@ var ARRAY_LINE = /^\[/;
*/
Channel.isNewChannel = function (Env, channel, cb) {
if (!Core.isValidId(channel)) { return void cb('INVALID_CHAN'); }
if (channel.length !== 32) { return void cb('INVALID_CHAN'); }
if (channel.length !== HK.STANDARD_CHANNEL_LENGTH &&
channel.length !== HK.ADMIN_CHANNEL_LENGTH) { return void cb('INVALID_CHAN'); }
// TODO replace with readMessagesBin
var done = false;
@ -229,7 +230,8 @@ Channel.writePrivateMessage = function (Env, args, _cb, Server, netfluxId) {
if (!msg) { return void cb("INVALID_MESSAGE"); }
// don't support anything except regular channels
if (!Core.isValidId(channelId) || channelId.length !== 32) {
if (!Core.isValidId(channelId) || (channelId.length !== HK.STANDARD_CHANNEL_LENGTH
&& channelId.length !== HK.ADMIN_CHANNEL_LENGTH)) {
return void cb("INVALID_CHAN");
}
@ -254,6 +256,11 @@ Channel.writePrivateMessage = function (Env, args, _cb, Server, netfluxId) {
var session = HK.getNetfluxSession(Env, netfluxId);
var allowed = HK.listAllowedUsers(metadata);
// Special broadcast channel
if (channelId.length === HK.ADMIN_CHANNEL_LENGTH) {
allowed = Env.admins;
}
if (HK.isUserSessionAllowed(allowed, session)) { return; }
w.abort();
@ -278,12 +285,19 @@ Channel.writePrivateMessage = function (Env, args, _cb, Server, netfluxId) {
// historyKeeper already knows how to handle metadata and message validation, so we just pass it off here
// if the message isn't valid it won't be stored.
Env.historyKeeper.channelMessage(Server, channelStruct, fullMessage);
Env.historyKeeper.channelMessage(Server, channelStruct, fullMessage, function (err) {
if (err) {
// Message not stored...
return void cb(err);
}
Server.getChannelUserList(channelId).forEach(function (userId) {
Server.send(userId, fullMessage);
// Broadcast the message
Server.getChannelUserList(channelId).forEach(function (userId) {
Server.send(userId, fullMessage);
});
});
cb();
});
};

@ -10,7 +10,7 @@ Core.SESSION_EXPIRATION_TIME = 60 * 1000;
Core.isValidId = function (chan) {
return chan && chan.length && /^[a-zA-Z0-9=+-]*$/.test(chan) &&
[32, 48].indexOf(chan.length) > -1;
[32, 33, 48].indexOf(chan.length) > -1;
};
var makeToken = Core.makeToken = function () {

@ -9,7 +9,18 @@ const HK = require("../hk-util");
Data.getMetadataRaw = function (Env, channel /* channelName */, _cb) {
const cb = Util.once(Util.mkAsync(_cb));
if (!Core.isValidId(channel)) { return void cb('INVALID_CHAN'); }
if (channel.length !== HK.STANDARD_CHANNEL_LENGTH) { return cb("INVALID_CHAN_LENGTH"); }
if (channel.length !== HK.STANDARD_CHANNEL_LENGTH &&
channel.length !== HK.ADMIN_CHANNEL_LENGTH) { return cb("INVALID_CHAN_LENGTH"); }
// return synthetic metadata for admin broadcast channels as a safety net
// in case anybody manages to write metadata
if (channel.length === HK.ADMIN_CHANNEL_LENGTH) {
return void cb(void 0, {
channel: channel,
creation: +new Date(),
owners: Env.admins,
});
}
var cached = Env.metadata_cache[channel];
if (HK.isMetadataMessage(cached)) {

@ -24,6 +24,11 @@ SET_PREMIUM_UPLOAD_SIZE
DISABLE_INTEGRATED_TASKS
DISABLE_INTEGRATED_EVICTION
// BROADCAST
SET_LAST_BROADCAST_HASH
SET_SURVEY_URL
SET_MAINTENANCE
NOT IMPLEMENTED:
// RESTRICTED REGISTRATION
@ -121,6 +126,44 @@ commands.SET_ARCHIVE_RETENTION_TIME = makeIntegerSetter('archiveRetentionTime');
// CryptPad_AsyncStore.rpc.send('ADMIN', [ 'ADMIN_DECREE', ['SET_ACCOUNT_RETENTION_TIME', [365]]], console.log)
commands.SET_ACCOUNT_RETENTION_TIME = makeIntegerSetter('accountRetentionTime');
var args_isString = function (args) {
return Array.isArray(args) && typeof(args[0]) === "string";
};
// Maintenance: Empty string or an object with a start and end time
var isNumber = function (value) {
return typeof(value) === "number" && !isNaN(value);
};
var args_isMaintenance = function (args) {
return Array.isArray(args) && args[0] &&
(args[0] === "" || (isNumber(args[0].end) && isNumber(args[0].start)));
};
// we anticipate that we'll add language-specific surveys in the future
// whenever that happens we can relax validation a bit to support more formats
var makeBroadcastSetter = function (attr, validation) {
return function (Env, args) {
if ((validation && !validation(args)) && !args_isString(args)) {
throw new Error('INVALID_ARGS');
}
var str = args[0];
if (str === Env[attr]) { return false; }
Env[attr] = str;
Env.broadcastCache = {};
return true;
};
};
// CryptPad_AsyncStore.rpc.send('ADMIN', [ 'ADMIN_DECREE', ['SET_LAST_BROADCAST_HASH', [hash]]], console.log)
commands.SET_LAST_BROADCAST_HASH = makeBroadcastSetter('lastBroadcastHash');
// CryptPad_AsyncStore.rpc.send('ADMIN', [ 'ADMIN_DECREE', ['SET_SURVEY_URL', [url]]], console.log)
commands.SET_SURVEY_URL = makeBroadcastSetter('surveyURL');
// CryptPad_AsyncStore.rpc.send('ADMIN', [ 'ADMIN_DECREE', ['SET_MAINTENANCE', [{start: +Date, end: +Date}]]], console.log)
// CryptPad_AsyncStore.rpc.send('ADMIN', [ 'ADMIN_DECREE', ['SET_MAINTENANCE', [""]]], console.log)
commands.SET_MAINTENANCE = makeBroadcastSetter('maintenance', args_isMaintenance);
var Quota = require("./commands/quota");
var Keys = require("./keys");
var Util = require("./common-util");

@ -19,8 +19,10 @@ module.exports.create = function (config) {
FRESH_MODE: true,
DEV_MODE: false,
configCache: {},
broadcastCache: {},
flushCache: function () {
Env.configCache = {};
Env.broadcastCache = {};
Env.FRESH_KEY = +new Date();
if (!(Env.DEV_MODE || Env.FRESH_MODE)) { Env.FRESH_MODE = true; }
if (!Env.Log) { return; }
@ -65,6 +67,11 @@ module.exports.create = function (config) {
paths: {},
//msgStore: config.store,
// /api/broadcast
lastBroadcastHash: '',
surveyURL: undefined,
maintenance: undefined,
netfluxUsers: {},
pinStore: undefined,

@ -34,6 +34,7 @@ const getHash = HK.getHash = function (msg, Log) {
// historyKeeper should explicitly store any channel
// with a 32 character id
const STANDARD_CHANNEL_LENGTH = HK.STANDARD_CHANNEL_LENGTH = 32;
const ADMIN_CHANNEL_LENGTH = HK.ADMIN_CHANNEL_LENGTH = 33;
// historyKeeper should not store messages sent to any channel
// with a 34 character id
@ -685,7 +686,7 @@ const handleGetHistory = function (Env, Server, seq, userId, parsed) {
// If we're asking for a specific version (lastKnownHash) but we receive an
// ENOENT, this is not a pad creation so we need to abort.
if (err && err.code === 'ENOENT' && lastKnownHash) { // XXX && lastKnownHash !== -1
if (err && err.code === 'ENOENT' && lastKnownHash) {
/*
This informs clients that the pad they're trying to load was deleted by its owner.
The user in question might be reconnecting or might have loaded the document from their cache.
@ -902,6 +903,11 @@ HK.onChannelMessage = function (Env, Server, channel, msgStruct, cb) {
// don't store messages if the channel id indicates that it's an ephemeral message
if (!channel.id || channel.id.length === EPHEMERAL_CHANNEL_LENGTH) { return void cb(); }
// Admin channel. We can only write to this one from private message (RPC)
if (channel.id.length === ADMIN_CHANNEL_LENGTH && msgStruct[1] !== null) {
return void cb('ERESTRICTED_ADMIN');
}
const isCp = /^cp\|/.test(msgStruct[4]);
let id;
if (isCp) {
@ -912,8 +918,9 @@ HK.onChannelMessage = function (Env, Server, channel, msgStruct, cb) {
// more straightforward and reliable.
if (Array.isArray(id) && id[2] && id[2] === channel.lastSavedCp) {
// Reject duplicate checkpoints
// XXX not an error? the checkpoint is already here so we can assume it's stored
return void cb('DUPLICATE');
return void cb();
// not an error? the checkpoint is already here so we can assume it's stored
//return void cb('DUPLICATE');
}
}

@ -567,7 +567,7 @@ var listChannels = function (root, handler, cb, fast) {
var metadataName;
// if the current file is not the channel data, then it must be metadata
if (!/^[0-9a-fA-F]{32}\.ndjson$/.test(item)) {
if (!/^[0-9a-fA-F]{32, 33}\.ndjson$/.test(item)) {
metadataName = item;
channelName = item.replace(/\.metadata/, '');
@ -584,7 +584,7 @@ var listChannels = function (root, handler, cb, fast) {
}
var channel = metadataName.replace(/\.metadata.ndjson$/, '');
if ([32, 34, 44].indexOf(channel.length) === -1) { return; }
if ([32, 33, 34, 44].indexOf(channel.length) === -1) { return; }
// otherwise throw it on the pile
sema.take(function (give) {

@ -391,7 +391,8 @@ const getPinState = function (data, cb) {
const _getFileSize = function (channel, _cb) {
var cb = Util.once(Util.mkAsync(_cb));
if (!Core.isValidId(channel)) { return void cb('INVALID_CHAN'); }
if (channel.length === 32) {
if (channel.length === HK.STANDARD_CHANNEL_LENGTH ||
channel.length === HK.ADMIN_CHANNEL_LENGTH) {
return void store.getChannelSize(channel, function (e, size) {
if (e) {
if (e.code === 'ENOENT') { return void cb(void 0, 0); }

2
package-lock.json generated

@ -1,6 +1,6 @@
{
"name": "cryptpad",
"version": "4.3.1",
"version": "4.4.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

@ -1,7 +1,7 @@
{
"name": "cryptpad",
"description": "realtime collaborative visual editor with zero knowlege server",
"version": "4.3.1",
"version": "4.4.0",
"license": "AGPL-3.0+",
"repository": {
"type": "git",

@ -3,6 +3,22 @@ var EN = require("../www/common/translations/messages.json");
var simpleTags = [
'<br>',
'<br />',
'<br/>',
'<a href="/login/">',
'<a href="/register/">',
// FIXME
"<a href='#'>",
'<h3>',
'</h3>',
// FIXME register_notes
'<ul class="cp-notes-list">',
'</ul>',
'<li>',
'</li>',
'<span class="red">',
'</span>',
];
['a', 'b', 'em', 'p', 'i'].forEach(function (tag) {
@ -10,18 +26,71 @@ var simpleTags = [
simpleTags.push('</' + tag + '>');
});
Object.keys(EN).forEach(function (k) {
var s = EN[k];
if (typeof(s) !== 'string') { return; }
var usesHTML;
// these keys are known to be problematic
var KNOWN_ISSUES = [ // FIXME
//'newVersion',
//'fm_info_anonymous',
//'register_notes',
];
var processLang = function (map, lang, primary) {
var announced = false;
var announce = function () {
if (announced) { return; }
announced = true;
console.log("NEXT LANGUAGE: ", lang);
};
s.replace(/<.*?>/g, function (html) {
if (simpleTags.indexOf(html) !== -1) { return; }
usesHTML = true;
console.log("{%s}", html);
Object.keys(map).forEach(function (k) {
if (!EN[k]) { return; }
if (KNOWN_ISSUES.indexOf(k) !== -1) { return; }
var s = map[k];
if (typeof(s) !== 'string') { return; }
var usesHTML;
s.replace(/<.*?>/g, function (html) {
if (simpleTags.indexOf(html) !== -1) { return; }
announce();
usesHTML = true;
if (!primary) {
console.log("{%s}", html);
}
});
if (usesHTML) {
announce();
console.log("%s", s);
console.log("[%s]\n", k);
}
});
};
processLang(EN, 'en', true);
if (usesHTML) {
console.log("[%s] %s\n", k, s);
}
[
'ar',
'bn_BD',
'ca',
'de',
'es',
'fi',
'fr',
'hi',
'it',
'ja',
'nb',
'nl',
'pl',
'pt-br',
'ro',
'ru',
'sv',
'te',
'tr',
'zh',
].forEach(function (lang) {
var map = require("../www/common/translations/messages." + lang + ".json");
if (!Object.keys(map).length) { return; }
processLang(map, lang);
});

@ -113,11 +113,11 @@ var setHeaders = (function () {
// Don't set CSP headers on /api/config because they aren't necessary and they cause problems
// when duplicated by NGINX in production environments
if (/^\/api\/config/.test(req.url)) { return; }
if (/^\/api\/(broadcast|config)/.test(req.url)) { return; }
// targeted CSP, generic policies, maybe custom headers
const h = [
/^\/common\/onlyoffice\/.*\/index\.html.*/,
/^\/(sheet|ooslide|oodoc)\/inner\.html.*/,
/^\/(sheet|presentation|doc)\/inner\.html.*/,
].some((regex) => {
return regex.test(req.url);
}) ? padHeaders : headers;
@ -201,46 +201,14 @@ app.use("/customize.dist", Express.static(__dirname + '/customize.dist'));
app.use(/^\/[^\/]*$/, Express.static('customize'));
app.use(/^\/[^\/]*$/, Express.static('customize.dist'));
var serveConfig = (function () {
// if dev mode: never cache
var cacheString = function () {
return (Env.FRESH_KEY? '-' + Env.FRESH_KEY: '') + (Env.DEV_MODE? '-' + (+new Date()): '');
};
var template = function (host) {
return [
'define(function(){',
'var obj = ' + JSON.stringify({
requireConf: {
waitSeconds: 600,
urlArgs: 'ver=' + Package.version + cacheString(),
},
removeDonateButton: (config.removeDonateButton === true),
allowSubscriptions: (config.allowSubscriptions === true),
websocketPath: config.externalWebsocketURL,
httpUnsafeOrigin: config.httpUnsafeOrigin,
adminEmail: Env.adminEmail,
adminKeys: Env.admins,
inactiveTime: Env.inactiveTime,
supportMailbox: Env.supportMailbox,
defaultStorageLimit: Env.defaultStorageLimit,
maxUploadSize: Env.maxUploadSize,
premiumUploadSize: Env.premiumUploadSize,
}, null, '\t'),
'obj.httpSafeOrigin = ' + (function () {
if (config.httpSafeOrigin) { return '"' + config.httpSafeOrigin + '"'; }
if (config.httpSafePort) {
return "(function () { return window.location.origin.replace(/\:[0-9]+$/, ':" +
config.httpSafePort + "'); }())";
}
return 'window.location.origin';
}()),
'return obj',
'});'
].join(';\n')
};
// if dev mode: never cache
var cacheString = function () {
return (Env.FRESH_KEY? '-' + Env.FRESH_KEY: '') + (Env.DEV_MODE? '-' + (+new Date()): '');
};
var makeRouteCache = function (template, cacheName) {
var cleanUp = {};
var cache = Env[cacheName] = Env[cacheName] || {};
return function (req, res) {
var host = req.headers.host.replace(/\:[0-9]+/, '');
@ -255,24 +223,74 @@ var serveConfig = (function () {
// FIXME mutable
// we must be able to clear the cache when updating any mutable key
// if there's nothing cached for that key...
if (!Env.configCache[cacheKey]) {
if (!cache[cacheKey]) {
// generate the response and cache it in memory
Env.configCache[cacheKey] = template(host);
cache[cacheKey] = template(host);
// and create a function to conditionally evict cache entries
// which have not been accessed in the last 20 seconds
cleanUp[cacheKey] = Util.throttle(function () {
delete cleanUp[cacheKey];
delete Env.configCache[cacheKey];
delete cache[cacheKey];
}, 20000);
}
// successive calls to this function
cleanUp[cacheKey]();
return void res.send(Env.configCache[cacheKey]);
return void res.send(cache[cacheKey]);
};
}());
};
var serveConfig = makeRouteCache(function (host) {
return [
'define(function(){',
'var obj = ' + JSON.stringify({
requireConf: {
waitSeconds: 600,
urlArgs: 'ver=' + Package.version + cacheString(),
},
removeDonateButton: (config.removeDonateButton === true),
allowSubscriptions: (config.allowSubscriptions === true),
websocketPath: config.externalWebsocketURL,
httpUnsafeOrigin: config.httpUnsafeOrigin,
adminEmail: Env.adminEmail,
adminKeys: Env.admins,
inactiveTime: Env.inactiveTime,
supportMailbox: Env.supportMailbox,
defaultStorageLimit: Env.defaultStorageLimit,
maxUploadSize: Env.maxUploadSize,
premiumUploadSize: Env.premiumUploadSize,
}, null, '\t'),
'obj.httpSafeOrigin = ' + (function () {
if (config.httpSafeOrigin) { return '"' + config.httpSafeOrigin + '"'; }
if (config.httpSafePort) {
return "(function () { return window.location.origin.replace(/\:[0-9]+$/, ':" +
config.httpSafePort + "'); }())";
}
return 'window.location.origin';
}()),
'return obj',
'});'
].join(';\n')
}, 'configCache');
var serveBroadcast = makeRouteCache(function (host) {
var maintenance = Env.maintenance;
if (maintenance && maintenance.end && maintenance.end < (+new Date())) {
maintenance = undefined;
}
return [
'define(function(){',
'return ' + JSON.stringify({
lastBroadcastHash: Env.lastBroadcastHash,
surveyURL: Env.surveyURL,
maintenance: maintenance
}, null, '\t'),
'});'
].join(';\n')
}, 'broadcastCache');
app.get('/api/config', serveConfig);
app.get('/api/broadcast', serveBroadcast);
var four04_path = Path.resolve(__dirname + '/customize.dist/404.html');
var custom_four04_path = Path.resolve(__dirname + '/customize/404.html');

@ -14,8 +14,12 @@
display: flex;
flex-flow: column;
a {
color: @cryptpad_color_link;
text-decoration: underline;
}
.cp-admin-setlimit-form {
.cp-admin-setlimit-form, .cp-admin-broadcast-form {
label {
font-weight: normal !important;
}
@ -199,5 +203,85 @@
}
}
.cp-admin-broadcast-form {
input.flatpickr-input {
width: 307.875px !important; // same width as flatpickr calendar
}
.cp-broadcast-active {
display: flex;
flex-flow: column;
align-items: start;
padding: 10px;
background-color: @cp_sidebar-left-bg;
color: @cp_sidebar-left-fg;
p {
margin: 0;
}
}
.cp-broadcast-form-submit {
margin-top: 30px;
button {
margin-bottom: 10px !important;
}
}
.cp-broadcast-container {
display: flex;
flex-flow: column;
}
.cp-broadcast-lang {
margin: 30px;
margin-bottom: 0;
display: flex;
flex-flow: column;
align-items: baseline;
.cp-checkmark {
margin: 5px 0;
}
}
div.cp-broadcast-languages {
& > label.cp-checkmark:not(:last-child) {
margin-right: 20px;
}
}
.cp-broadcast-preview {
vertical-align: bottom !important;
}
.cp-broadcast-delete {
width: 100%;
min-width: 600px;
tbody {
tr {
background-color: @cp_support-msg-bg;
padding: 5px;
td {
padding: 5px;
button {
margin: 0 !important;
}
}
}
}
.cp-notification {
display: flex;
align-items: center;
.cp-avatar, .cp-broadcast, .cp-notification-dismiss {
display: none;
}
p {
margin: 0 !important;
}
.cp-notification-content {
width: 100%;
padding: 10px;
}
.cp-clickable {
cursor: pointer;
&:hover {
background-color: @cp_dropdown-bg-hover;
}
}
}
}
}
}

@ -1,6 +1,7 @@
define([
'jquery',
'/api/config',
'/customize/application_config.js',
'/bower_components/chainpad-crypto/crypto.js',
'/common/toolbar.js',
'/bower_components/nthen/index.js',
@ -14,12 +15,16 @@ define([
'/common/common-signing-keys.js',
'/support/ui.js',
'/lib/datepicker/flatpickr.js',
'css!/lib/datepicker/flatpickr.min.css',
'css!/bower_components/bootstrap/dist/css/bootstrap.min.css',
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
'less!/admin/app-admin.less',
], function (
$,
ApiConfig,
AppConfig,
Crypto,
Toolbar,
nThen,
@ -31,7 +36,8 @@ define([
Util,
Hash,
Keys,
Support
Support,
Flatpickr
)
{
var APP = {
@ -67,6 +73,11 @@ define([
'cp-admin-support-list',
'cp-admin-support-init'
],
'broadcast': [ // Msg.admin_cat_broadcast
'cp-admin-maintenance',
'cp-admin-survey',
'cp-admin-broadcast',
],
'performance': [ // Msg.admin_cat_performance
'cp-admin-refresh-performance',
'cp-admin-performance-profiling',
@ -930,6 +941,542 @@ define([
return;
};
var getApi = function (cb) {
return function () {
require(['/api/broadcast?'+ (+new Date())], function (Broadcast) {
cb(Broadcast);
setTimeout(function () {
try {
var ctx = require.s.contexts._;
var defined = ctx.defined;
Object.keys(defined).forEach(function (href) {
if (/^\/api\/broadcast\?[0-9]{13}/.test(href)) {
delete defined[href];
return;
}
});
} catch (e) {}
});
});
};
};
// Update the lastBroadcastHash in /api/broadcast if we can do it.
// To do so, find the last "BROADCAST_CUSTOM" in the current history and use the previous
// message's hash.
// If the last BROADCAST_CUSTOM has been deleted by an admin, we can use the most recent
// message's hash.
var checkLastBroadcastHash = function () {
var deleted = [];
require(['/api/broadcast?'+ (+new Date())], function (BCast) {
var hash = BCast.lastBroadcastHash || '1'; // Truthy value if no lastKnownHash
common.mailbox.getNotificationsHistory('broadcast', null, hash, function (e, msgs) {
if (e) { return void console.error(e); }
// No history, nothing to change
if (!Array.isArray(msgs)) { return; }
if (!msgs.length) { return; }
var lastHash;
var next = false;
// Start from the most recent messages until you find a CUSTOM message and
// check if it has been deleted
msgs.reverse().some(function (data) {
var c = data.content;
// This is the hash we want to keep
if (next) {
if (!c || !c.hash) { return; }
lastHash = c.hash;
next = false;
return true;
}
// initialize with the most recent hash
if (!lastHash && c && c.hash) { lastHash = c.hash; }
var msg = c && c.msg;
if (!msg) { return; }
// Remember all deleted messages
if (msg.type === "BROADCAST_DELETE") {
deleted.push(Util.find(msg, ['content', 'uid']));
}
// Only check custom messages
if (msg.type !== "BROADCAST_CUSTOM") { return; }
// If the most recent CUSTOM message has been deleted, it means we don't
// need to keep any message and we can continue with lastHash as the most
// recent broadcast message.
if (deleted.indexOf(msg.uid) !== -1) { return true; }
// We just found the oldest message we want to keep, move one iteration
// further into the loop to get the next message's hash.
// If this is the end of the loop, don't bump lastBroadcastHash at all.
next = true;
});
// If we don't have to bump our lastBroadcastHash, abort
if (next) { return; }
// Otherwise, bump to lastHash
console.warn('Updating last broadcast hash to', lastHash);
sFrameChan.query('Q_ADMIN_RPC', {
cmd: 'ADMIN_DECREE',
data: ['SET_LAST_BROADCAST_HASH', [lastHash]]
}, function (e) {
if (e) {
console.error(e);
return;
}
console.log('lastBroadcastHash updated');
});
});
});
};
create['broadcast'] = function () {
var key = 'broadcast';
var $div = makeBlock(key); // Msg.admin_broadcastHint, admin_broadcastTitle
var form = h('div.cp-admin-broadcast-form');
var $form = $(form).appendTo($div);
var refresh = getApi(function (Broadcast) {
var button = h('button.btn.btn-primary', Messages.admin_broadcastButton);
var $button = $(button);
var removeButton = h('button.btn.btn-danger', Messages.admin_broadcastCancel);
var active = h('div.cp-broadcast-active', h('p', Messages.admin_broadcastActive));
var $active = $(active);
var activeUid;
var deleted = [];
// Render active message (if there is one)
var hash = Broadcast.lastBroadcastHash || '1'; // Truthy value if no lastKnownHash
common.mailbox.getNotificationsHistory('broadcast', null, hash, function (e, msgs) {
if (e) { return void console.error(e); }
if (!Array.isArray(msgs)) { return; }
if (!msgs.length) {
$active.hide();
}
msgs.reverse().some(function (data) {
var c = data.content;
var msg = c && c.msg;
if (!msg) { return; }
if (msg.type === "BROADCAST_DELETE") {
deleted.push(Util.find(msg, ['content', 'uid']));
}
if (msg.type !== "BROADCAST_CUSTOM") { return; }
if (deleted.indexOf(msg.uid) !== -1) { return true; }
// We found an active custom message, show it
var el = common.mailbox.createElement(data);
var table = h('table.cp-broadcast-delete');
var $table = $(table);
var uid = Util.find(data, ['content', 'msg', 'uid']);
var time = Util.find(data, ['content', 'msg', 'content', 'time']);
var tr = h('tr', { 'data-uid': uid }, [
h('td', 'ID: '+uid),
h('td', new Date(time || 0).toLocaleString()),
h('td', el),
h('td.delete', removeButton),
]);
$table.append(tr);
$active.append(table);
activeUid = uid;
return true;
});
if (!activeUid) { $active.hide(); }
});
// Custom message
var container = h('div.cp-broadcast-container');
var $container = $(container);
var languages = Messages._languages;
var keys = Object.keys(languages).sort();
// Always keep the textarea ordered by language code
var reorder = function () {
$container.find('.cp-broadcast-lang').each(function (i, el) {
var $el = $(el);
var l = $el.attr('data-lang');
$el.css('order', keys.indexOf(l));
});
};
// Remove a textarea
var removeLang = function (l) {
$container.find('.cp-broadcast-lang[data-lang="'+l+'"]').remove();
var hasDefault = $container.find('.cp-broadcast-lang .cp-checkmark input:checked').length;
if (!hasDefault) {
$container.find('.cp-broadcast-lang').first().find('.cp-checkmark input').prop('checked', 'checked');
}
};
var getData = function () { return false; };
var onPreview = function (l) {
var data = getData();
if (data === false) { return void UI.warn(Messages.error); }
var msg = {
uid: Util.uid(),
type: 'BROADCAST_CUSTOM',
content: data
};
common.mailbox.onMessage({
lang: l,
type: 'broadcast',
content: {
msg: msg,
hash: 'LOCAL|' + JSON.stringify(msg).slice(0,58)
}
}, function () {
UI.log(Messages.saved);
});
};
// Add a textarea
var addLang = function (l) {
if ($container.find('.cp-broadcast-lang[data-lang="'+l+'"]').length) { return; }
var preview = h('button.btn.btn-secondary', Messages.broadcast_preview);
$(preview).click(function () {
onPreview(l);
});
var bcastDefault = Messages.broadcast_defaultLanguage;
var first = !$container.find('.cp-broadcast-lang').length;
var radio = UI.createRadio('broadcastDefault', null, bcastDefault, first, {
'data-lang': l,
label: {class: 'noTitle'}
});
$container.append(h('div.cp-broadcast-lang', { 'data-lang': l }, [
h('h4', languages[l]),
h('label', Messages.kanban_body),
h('textarea'),
radio,
preview
]));
reorder();
};
// Checkboxes to select translations
var boxes = keys.map(function (l) {
var $cbox = $(UI.createCheckbox('cp-broadcast-custom-lang-'+l,
languages[l], false, { label: { class: 'noTitle' } }));
var $check = $cbox.find('input').on('change', function () {
var c = $check.is(':checked');
if (c) { return void addLang(l); }
removeLang(l);
});
if (l === 'en') {
setTimeout(function () {
$check.click();
});
}
return $cbox[0];
});
// Extract form data
getData = function () {
var map = {};
var defaultLanguage;
var error = false;
$container.find('.cp-broadcast-lang').each(function (i, el) {
var $el = $(el);
var l = $el.attr('data-lang');
if (!l) { error = true; return; }
var text = $el.find('textarea').val();
if (!text.trim()) { error = true; return; }
if ($el.find('.cp-checkmark input').is(':checked')) {
defaultLanguage = l;
}
map[l] = text;
});
if (!Object.keys(map).length) {
console.error('You must select at least one language');
return false;
}
if (error) {
console.error('One of the selected languages has no data');
return false;
}
return {
defaultLanguage: defaultLanguage,
content: map
};
};
var send = function (data) {
$button.prop('disabled', 'disabled');
//data.time = +new Date(); // FIXME not used anymore?
common.mailbox.sendTo('BROADCAST_CUSTOM', data, {}, function (err) {
if (err) {
$button.prop('disabled', '');
console.error(err);
return UI.warn(Messages.error);
}
UI.log(Messages.saved);
refresh();
checkLastBroadcastHash();
});
};
$button.click(function () {
var data = getData();
if (data === false) { return void UI.warn(Messages.error); }
send(data);
});
UI.confirmButton(removeButton, {
classes: 'btn-danger',
}, function () {
if (!activeUid) { return; }
common.mailbox.sendTo('BROADCAST_DELETE', {
uid: activeUid
}, {}, function (err) {
if (err) { return UI.warn(Messages.error); }
UI.log(Messages.saved);
refresh();
checkLastBroadcastHash();
});
});
// Make the form
$form.empty().append([
active,
h('label', Messages.broadcast_translations),
h('div.cp-broadcast-languages', boxes),
container,
h('div.cp-broadcast-form-submit', [
h('br'),
button
])
]);
});
refresh();
return $div;
};
create['maintenance'] = function () {
var key = 'maintenance';
var $div = makeBlock(key); // Msg.admin_maintenanceHint, admin_maintenanceTitle
var form = h('div.cp-admin-broadcast-form');
var $form = $(form).appendTo($div);
var refresh = getApi(function (Broadcast) {
var button = h('button.btn.btn-primary', Messages.admin_maintenanceButton);
var $button = $(button);
var removeButton = h('button.btn.btn-danger', Messages.admin_maintenanceCancel);
var active;
if (Broadcast && Broadcast.maintenance) {
var m = Broadcast.maintenance;
if (m.start && m.end && m.end >= (+new Date())) {
active = h('div.cp-broadcast-active', [
UI.setHTML(h('p'), Messages._getKey('broadcast_maintenance', [
new Date(m.start).toLocaleString(),
new Date(m.end).toLocaleString(),
])),
removeButton
]);
}
}
// Start and end date pickers
var start = h('input');
var end = h('input');
var $start = $(start);
var $end = $(end);
var is24h = false;
try {
is24h = !new Intl.DateTimeFormat(navigator.language, { hour: 'numeric' }).format(0).match(/AM/);
} catch (e) {}
var endPickr = Flatpickr(end, {
enableTime: true,
time_24hr: is24h,
minDate: new Date()
});
Flatpickr(start, {
enableTime: true,
time_24hr: is24h,
minDate: new Date(),
onChange: function () {
endPickr.set('minDate', new Date($start.val()));
}
});
// Extract form data
var getData = function () {
var start = +new Date($start.val());
var end = +new Date($end.val());
if (isNaN(start) || isNaN(end)) {
console.error('Invalid dates');
return false;
}
return {
start: start,
end: end
};
};
var send = function (data) {
$button.prop('disabled', 'disabled');
sFrameChan.query('Q_ADMIN_RPC', {
cmd: 'ADMIN_DECREE',
data: ['SET_MAINTENANCE', [data]]
}, function (e) {
if (e) {
UI.warn(Messages.error); console.error(e);
$button.prop('disabled', '');
return;
}
// Maintenance applied, send notification
common.mailbox.sendTo('BROADCAST_MAINTENANCE', {}, {}, function () {
refresh();
checkLastBroadcastHash();
});
});
};
$button.click(function () {
var data = getData();
if (data === false) { return void UI.warn(Messages.error); }
send(data);
});
UI.confirmButton(removeButton, {
classes: 'btn-danger',
}, function () {
send("");
});
$form.empty().append([
active,
h('label', Messages.broadcast_start),
start,
h('label', Messages.broadcast_end),
end,
h('br'),
h('div.cp-broadcast-form-submit', [
button
])
]);
});
refresh();
common.makeUniversal('broadcast', {
onEvent: function (obj) {
var cmd = obj.ev;
if (cmd !== "MAINTENANCE") { return; }
refresh();
}
});
return $div;
};
create['survey'] = function () {
var key = 'survey';
var $div = makeBlock(key); // Msg.admin_surveyHint, admin_surveyTitle
var form = h('div.cp-admin-broadcast-form');
var $form = $(form).appendTo($div);
var refresh = getApi(function (Broadcast) {
var button = h('button.btn.btn-primary', Messages.admin_surveyButton);
var $button = $(button);
var removeButton = h('button.btn.btn-danger', Messages.admin_surveyCancel);
var active;
if (Broadcast && Broadcast.surveyURL) {
var a = h('a', {href: Broadcast.surveyURL}, Messages.admin_surveyActive);
$(a).click(function (e) {
e.preventDefault();
common.openUnsafeURL(Broadcast.surveyURL);
});
active = h('div.cp-broadcast-active', [
h('p', a),
removeButton
]);
}
// Survey form
var label = h('label', Messages.broadcast_surveyURL);
var input = h('input');
var $input = $(input);
// Extract form data
var getData = function () {
var url = $input.val();
if (!Util.isValidURL(url)) {
console.error('Invalid URL');
return false;
}
return url;
};
var send = function (data) {
$button.prop('disabled', 'disabled');
sFrameChan.query('Q_ADMIN_RPC', {
cmd: 'ADMIN_DECREE',
data: ['SET_SURVEY_URL', [data]]
}, function (e) {
if (e) {
$button.prop('disabled', '');
UI.warn(Messages.error); console.error(e);
return;
}
// Maintenance applied, send notification
common.mailbox.sendTo('BROADCAST_SURVEY', {
url: data
}, {}, function () {
refresh();
checkLastBroadcastHash();
});
});
};
$button.click(function () {
var data = getData();
if (data === false) { return void UI.warn(Messages.error); }
send(data);
});
UI.confirmButton(removeButton, {
classes: 'btn-danger',
}, function () {
send("");
});
$form.empty().append([
active,
label,
input,
h('br'),
h('div.cp-broadcast-form-submit', [
button
])
]);
});
refresh();
common.makeUniversal('broadcast', {
onEvent: function (obj) {
var cmd = obj.ev;
if (cmd !== "SURVEY") { return; }
refresh();
}
});
return $div;
};
var onRefreshPerformance = Util.mkEvent();
create['refresh-performance'] = function () {
@ -1010,6 +1557,7 @@ define([
stats: 'fa fa-line-chart',
quota: 'fa fa-hdd-o',
support: 'fa fa-life-ring',
broadcast: 'fa fa-bullhorn',
performance: 'fa fa-heartbeat',
};
@ -1094,8 +1642,7 @@ define([
var privateData = metadataMgr.getPrivateData();
common.setTabTitle(Messages.adminPage || 'Administration');
if (!privateData.edPublic || !ApiConfig.adminKeys || !Array.isArray(ApiConfig.adminKeys)
|| ApiConfig.adminKeys.indexOf(privateData.edPublic) === -1) {
if (!common.isAdmin()) {
return void UI.errorLoadingScreen(Messages.admin_authError || '403 Forbidden');
}

@ -0,0 +1,266 @@
@import (reference) '../../customize/src/less2/include/framework.less';
@import (reference) '../../customize/src/less2/include/sidebar-layout.less';
@import (reference) '../../customize/src/less2/include/tools.less';
@import (reference) '../../customize/src/less2/include/avatar.less';
&.cp-app-calendar {
.framework_min_main();
.sidebar-layout_main();
display: flex;
flex-flow: column;
#cp-sidebarlayout-container #cp-sidebarlayout-rightside {
padding: 0;
& > div {
margin: 0;
}
.cp-forcehide {
display: none !important;
}
.tui-full-calendar-layout {
background-color: @cp_sidebar-right-bg !important;
color: @cryptpad_text_col;
.tui-full-calendar-month {
.tui-full-calendar-weekday-schedule-time .tui-full-calendar-weekday-schedule-title {
color: @cryptpad_text_col !important; // XXX
}
.tui-full-calendar-extra-date {
.tui-full-calendar-weekday-grid-date {
color: @cp_sidebar-hint !important; // XXX
opacity: 0.5;
}
}
.tui-full-calendar-weekday-grid-date {
color: @cryptpad_text_col !important; // XXX
}
.tui-full-calendar-month-dayname-item span {
color: @cryptpad_text_col !important; // XXX
}
}
.tui-full-calendar-dayname * {
color: @cryptpad_text_col !important; // XXX
}
.tui-full-calendar-month-more {
background-color: @cp_sidebar-right-bg !important;
color: @cryptpad_text_col;
span {
color: @cryptpad_text_col !important;
}
}
}
.tui-full-calendar-timegrid-timezone {
background-color: @cp_sidebar-right-bg !important;
.tui-full-calendar-timegrid-hour {
color: @cryptpad_text_col !important;
}
color: @cryptpad_text_col;
}
.tui-full-calendar-timegrid-gridline, .tui-full-calendar-time-date {
border-color: @cp_calendar-border !important;
}
.tui-full-calendar-splitter, .tui-full-calendar-left, .tui-full-calendar-dayname-container, .tui-full-calendar-weekday-grid-line {
border-color: @cp_calendar-border !important;
}
.tui-full-calendar-popup-container {
background: @cp_flatpickr-bg;
color: @cryptpad_text_col;
.tui-full-calendar-icon:not(.tui-full-calendar-calendar-dot):not(.tui-full-calendar-dropdown-arrow):not(.tui-full-calendar-ic-checkbox) {
display: none;
}
}
li.tui-full-calendar-popup-section-item {
padding: 0 6px;
height: 32px;
}
.tui-full-calendar-popup-section-item {
height: auto;
margin: 0;
&:not(li):not(button) {
padding: 0;
margin-top: 5px;
}
#tui-full-calendar-schedule-calendar {
width: 179px;
top: 0;
}
&:not(button) {
border: none;
display: inline-flex;
align-items: center;
&:hover {
background-color: @cp_dropdown-bg-hover;
}
.tui-full-calendar-content {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font: @colortheme_app-font;
}
input { flex: 1; }
}
}
.tui-full-calendar-section-date-dash {
height: auto;
}
.tui-full-calendar-section-title, .tui-full-calendar-section-location {
width: 100%;
}
.tui-full-calendar-dropdown-menu {
top: 38px;
width: 221px; // same as button
background-color: @cp_dropdown-bg;
color: @cp_dropdown-fg;
}
.tui-full-calendar-section-state, #tui-full-calendar-schedule-private {
display: none !important;
}
.tui-full-calendar-popup:not(.tui-full-calendar-popup-detail) {
.tui-full-calendar-section-calendar {
width: 221px; // 50%
}
.tui-full-calendar-popup-section {
display: flex;
align-items: center;
flex-wrap: wrap;
.tui-full-calendar-section-start-date, .tui-full-calendar-section-end-date {
flex: 1;
}
.tui-full-calendar-section-allday {
width: 100%;
height: 32px;
}
}
}
.tui-full-calendar-popup-detail {
font: @colortheme_app-font;
color: @cryptpad_text_col;
.tui-full-calendar-popup-container {
padding-bottom: 17px;
}
.tui-full-calendar-popup-detail-date {
font-size: 14px;
}
.tui-full-calendar-section-button {
border: 0;
display: flex;
align-items: center;
button {
flex: 1;
margin: 0;
}
}
.tui-full-calendar-popup-vertical-line {
visibility: hidden;
width: 10px;
}
}
.cp-calendar-close {
height: auto;
line-height: initial;
border: 1px solid;
&:not(:hover) {
background: transparent;
}
}
}
#cp-toolbar .cp-calendar-browse {
display: flex;
align-items: center;
}
#cp-sidebarlayout-leftside {
& > div {
padding: 10px
}
.cp-calendar-new {
display: flex;
align-items: center;
justify-content: space-between;
}
.cp-calendar-list {
.cp-calendar-team {
height: 30px;
.avatar_main(30px);
.cp-avatar {
margin-right: 10px;
}
.cp-name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
display: flex;
align-items: center;
justify-content: center;
margin: 5px 0;
}
.cp-calendar-entry {
display: flex;
align-items: center;
justify-content: space-between;
padding: 5px;
cursor: pointer;
&.cp-ghost {
padding: 0;
button {
.tools_unselectable();
cursor: pointer;
width: 100%;
display: flex;
justify-content: space-between;
background: transparent;
border: 1px solid @cryptpad_text_col;
height: 36px;
font: @colortheme_app-font;
align-items: center;
color: @cryptpad_text_col;
&:hover {
background: @cp_sidebar-left-active;
}
}
}
&:not(:last-child) {
margin-bottom: 10px;
}
&:hover {
background: fade(@cryptpad_text_col, 10%);
}
&.cp-restricted {
color: @cp_drive-header-fg;
}
&.cp-active {
background: @cp_sidebar-left-active;
}
.tools_unselectable();
.cp-calendar-color {
display: inline-block;
border-radius: 50%;
width: 15px;
height: 15px;
flex-shrink: 0;
}
.cp-calendar-title {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding: 0 5px;
}
}
}
}
.cp-calendar-colorpicker {
width: 100px;
height: 25px;
cursor: pointer;
border: 1px solid @cp_forms-border;
}
}

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>CryptPad</title>
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="no-referrer" />
<script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<link href="/customize/src/outer.css?ver=1.3.2" rel="stylesheet" type="text/css">
</head>
<body>
<iframe-placeholder>

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html class="cp-app-noscroll">
<head>
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<script async data-bootload="/calendar/inner.js" data-main="/common/sframe-boot.js?ver=1.7" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<style>
.loading-hidden { display: none; }
</style>
</head>
<body class="cp-app-calendar">
<div id="cp-toolbar" class="cp-toolbar-container"></div>
<div id="cp-sidebarlayout-container"></div>
<noscript>
<p><strong>OOPS</strong> In order to do encryption in your browser, Javascript is really <strong>really</strong> required.</p>
<p><strong>OUPS</strong> Afin de pouvoir réaliser le chiffrement dans votre navigateur, Javascript est <strong>vraiment</strong> nécessaire.</p>
</noscript>
</body>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,24 @@
// Load #1, load as little as possible because we are in a race to get the loading screen up.
define([
'/bower_components/nthen/index.js',
'/api/config',
'/common/dom-ready.js',
'/common/sframe-common-outer.js',
], function (nThen, ApiConfig, DomReady, SFCommonO) {
// Loaded in load #2
nThen(function (waitFor) {
DomReady.onReady(waitFor());
}).nThen(function (waitFor) {
SFCommonO.initIframe(waitFor);
}).nThen(function (/*waitFor*/) {
var addData = function (meta) {
meta.calendarHash = Boolean(window.location.hash);
};
SFCommonO.start({
addData: addData,
noRealtime: true,
cache: true,
});
});
});

@ -202,6 +202,35 @@ define([
}, _alert("Login block is not working (write/read/remove)"));
assert(function (cb) {
var url = '/common/onlyoffice/v4/web-apps/apps/spreadsheeteditor/main/index.html';
var expect = {
'cross-origin-resource-policy': 'cross-origin',
'cross-origin-embedder-policy': 'require-corp',
};
$.ajax(url, {
complete: function (xhr) {
cb(!Object.keys(expect).some(function (k) {
var response = xhr.getResponseHeader(k);
console.log(k, response);
return response !== expect[k];
}));
},
});
}, _alert("Missing HTTP headers required for XLSX export"));
assert(function (cb) {
cb(true);
$.ajax('/api/broadcast', {
dataType: 'text',
complete: function (xhr) {
console.log(xhr);
cb(xhr.status === 200);
},
});
}, _alert("/api/broadcast is not available"));
var row = function (cells) {
return h('tr', cells.map(function (cell) {
return h('td', cell);

@ -12,7 +12,7 @@ define(function() {
* You should never remove the drive from this list.
*/
config.availablePadTypes = ['drive', 'teams', 'pad', 'sheet', 'code', 'slide', 'poll', 'kanban', 'whiteboard',
/*'oodoc', 'ooslide',*/ 'file', /*'todo',*/ 'contacts'];
/*'doc', 'presentation',*/ 'file', /*'todo',*/ 'contacts' /*, 'calendar' */];
/* The registered only types are apps restricted to registered users.
* You should never remove apps from this list unless you know what you're doing. The apps
* listed here by default can't work without a user account.
@ -20,7 +20,7 @@ define(function() {
* users and these users will be redirected to the login page if they still try to access
* the app
*/
config.registeredOnlyTypes = ['file', 'contacts', 'oodoc', 'ooslide', 'notifications', 'support'];
config.registeredOnlyTypes = ['file', 'contacts', 'notifications', 'support', 'calendar'];
/* CryptPad is available is multiple languages, but only English and French are maintained
* by the developers. The other languages may be outdated, and any missing string for a langauge
@ -43,7 +43,6 @@ define(function() {
/* You can display a link to your own privacy policy in the static pages footer.
* To do so, set the following value to the absolute URL of your privacy policy.
*/
config.privacy = '/privacy.html';
// config.privacy = 'https://xwiki.com/en/company/PrivacyPolicy';
/* Cryptpad apps use a common API to display notifications to users
@ -115,8 +114,8 @@ define(function() {
todo: 'cptools-todo',
contacts: 'fa-address-book',
kanban: 'cptools-kanban',
oodoc: 'fa-file-word-o',
ooslide: 'fa-file-powerpoint-o',
doc: 'fa-file-word-o',
presentation: 'fa-file-powerpoint-o',
sheet: 'cptools-sheet',
drive: 'fa-hdd-o',
teams: 'fa-users',
@ -162,8 +161,6 @@ define(function() {
// making it much faster to open new tabs.
config.disableWorkers = false;
//config.surveyURL = "";
// Teams are always loaded during the initial loading screen (for the first tab only if
// SharedWorkers are available). Allowing users to be members of multiple teams can
// make them have a very slow loading time. To avoid impacting the user experience

@ -15,6 +15,6 @@ define(['/customize/application_config.js'], function (AppConfig) {
MAX_TEAMS_SLOTS: AppConfig.maxTeamsSlots || 5,
MAX_TEAMS_OWNED: AppConfig.maxOwnedTeams || 5,
// Apps
criticalApps: ['profile', 'settings', 'debug', 'admin', 'support', 'notifications']
criticalApps: ['profile', 'settings', 'debug', 'admin', 'support', 'notifications', 'calendar']
};
});

@ -644,6 +644,10 @@ Version 4: Data URL when not a realtime link yet (new pad or "static" app)
'/' + curvePublic.replace(/\//g, '-') + '/';
};
Hash.isValidChannel = function (channelId) {
return /^[a-zA-Z0-9]{32,48}$/.test(channelId);
};
Hash.isValidHref = function (href) {
// Non-empty href?
if (!href) { return; }

@ -739,6 +739,7 @@ define([
}
});
};
// TODO: make it such that the confirmButton's width does not change
UI.confirmButton = function (originalBtn, config, _cb) {
config = config || {};
var cb = Util.mkAsync(_cb);
@ -1257,10 +1258,13 @@ define([
Messages.dontShowAgain
]);
var footerSel = 'div.cp-corner-footer';
var popup = h('div.cp-corner-container', [
setHTML(h('div.cp-corner-text'), text),
h('div.cp-corner-actions', actions),
setHTML(h('div.cp-corner-footer'), footer),
(typeof(footer) === 'string'?
setHTML(h(footerSel), footer):
h(footerSel, footer)),
opts.dontShowAgain ? dontShowAgain : undefined
]);

@ -1,6 +1,7 @@
define([
'jquery',
'/api/config',
'/api/broadcast',
'/common/common-util.js',
'/common/common-hash.js',
'/common/common-language.js',
@ -17,7 +18,7 @@ define([
'/common/visible.js',
'css!/customize/fonts/cptools/style.css',
], function ($, Config, Util, Hash, Language, UI, Constants, Feedback, h, Clipboard,
], function ($, Config, Broadcast, Util, Hash, Language, UI, Constants, Feedback, h, Clipboard,
Messages, AppConfig, Pages, NThen, InviteInner, Visible) {
var UIElements = {};
var urlArgs = Config.requireConf.urlArgs;
@ -369,7 +370,7 @@ define([
h('div.cp-teams-invite-block', [
h('span', Messages.team_inviteLinkSetPassword),
h('a.cp-teams-help.fa.fa-question-circle', {
href: origin + 'https://docs.cryptpad.fr/en/user_guide/security.html#passwords-for-documents-and-folders',
href: origin + Pages.localizeDocsLink('https://docs.cryptpad.fr/en/user_guide/security.html#passwords-for-documents-and-folders'),
target: "_blank",
'data-tippy-placement': "right"
})
@ -714,8 +715,14 @@ define([
callback(err);
return void UI.warn(Messages.fm_forbidden);
}
var cMsg = common.isLoggedIn() ? Messages.movedToTrash : Messages.deleted;
var msg = common.fixLinks($('<div>').html(cMsg));
var msg;
if (common.isLoggedIn()) {
msg = Pages.setHTML(h('div'), Messages.movedToTrash);
$(msg).find('a').attr('href', '/drive/');
common.fixLinks(msg);
} else {
msg = h('div', Messages.deleted);
}
UI.alert(msg);
callback();
return;
@ -1105,6 +1112,10 @@ define([
if (apps[type]) {
href = "https://docs.cryptpad.fr/en/user_guide/apps/" + apps[type] + ".html";
}
if (type === 'drive') {
href = "https://docs.cryptpad.fr/en/user_guide/drive.html";
}
href = Pages.localizeDocsLink(href);
var content = setHTML(h('p'), Messages.help_genericMore);
$(content).find('a').attr({
@ -1332,7 +1343,7 @@ define([
// Button
var $button = $('<button>', {
'class': ''
'class': config.buttonCls || ''
}).append($('<span>', {'class': 'cp-dropdown-button-title'}).html(config.text || ""));
if (config.caretDown) {
$('<span>', {
@ -1349,13 +1360,20 @@ define([
var $innerblock = $('<div>', {'class': 'cp-dropdown-content'});
if (config.left) { $innerblock.addClass('cp-dropdown-left'); }
var hide = function () {
window.setTimeout(function () { $innerblock.hide(); }, 0);
};
config.options.forEach(function (o) {
if (!isValidOption(o)) { return; }
if (isElement(o)) { return $innerblock.append($(o)); }
var $el = $('<' + o.tag + '>', o.attributes || {}).html(o.content || '');
$el.appendTo($innerblock);
if (typeof(o.action) === 'function') {
$el.click(o.action);
$el.click(function (e) {
var close = o.action(e);
if (close) { hide(); }
});
}
});
@ -1375,10 +1393,6 @@ define([
}
};
var hide = function () {
window.setTimeout(function () { $innerblock.hide(); }, 0);
};
var show = function () {
var wh = $(window).height();
var button = $button[0].getBoundingClientRect();
@ -1737,7 +1751,14 @@ define([
});
}*/
options.push({ tag: 'hr' });
// We have code to hide 2 separators in a row, but in the case of survey, they may be
// in the DOM but hidden. We need to know if there are other elements in this
// section to determine if we have to manually hide a separator.
var surveyAlone = true;
if (Config.allowSubscriptions) {
surveyAlone = false;
options.push({
tag: 'a',
attributes: {
@ -1750,6 +1771,7 @@ define([
});
}
if (!priv.plan && !Config.removeDonateButton) {
surveyAlone = false;
options.push({
tag: 'a',
attributes: {
@ -1762,19 +1784,20 @@ define([
});
}
if (AppConfig.surveyURL) {
options.push({
tag: 'a',
attributes: {
'class': 'cp-toolbar-survey fa fa-graduation-cap'
},
content: h('span', Messages.survey),
action: function () {
Common.openUnsafeURL(AppConfig.surveyURL);
Feedback.send('SURVEY_CLICKED');
},
});
}
// If you set "" in the admin panel, it will remove the AppConfig survey
var surveyURL = typeof(Broadcast.surveyURL) !== "undefined" ? Broadcast.surveyURL
: AppConfig.surveyURL;
options.push({
tag: 'a',
attributes: {
'class': 'cp-toolbar-survey fa fa-graduation-cap'
},
content: h('span', Messages.survey),
action: function () {
Common.openUnsafeURL(surveyURL);
Feedback.send('SURVEY_CLICKED');
},
});
options.push({ tag: 'hr' });
// Add login or logout button depending on the current status
@ -1841,6 +1864,29 @@ define([
};
var $userAdmin = UIElements.createDropdown(dropdownConfigUser);
var $survey = $userAdmin.find('.cp-toolbar-survey');
if (!surveyURL) {
$survey.hide();
if (surveyAlone) { $survey.next('hr').hide(); }
}
Common.makeUniversal('broadcast', {
onEvent: function (obj) {
var cmd = obj.ev;
if (cmd !== "SURVEY") { return; }
var url = obj.data;
if (url === surveyURL) { return; }
if (url && !Util.isValidURL(url)) { return; }
surveyURL = url;
if (!url) {
$survey.hide();
if (surveyAlone) { $survey.next('hr').hide(); }
return;
}
$survey.show();
if (surveyAlone) { $survey.next('hr').show(); }
}
});
/*
// Uncomment these lines to have a language selector in the admin menu
// FIXME clicking on the inner menu hides the outer one
@ -2142,7 +2188,7 @@ define([
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)
createHelper(Pages.localizeDocsLink('https://docs.cryptpad.fr/en/user_guide/apps/general.html#new-document'), Messages.creation_helperText)
])
]);
$creation.append(title);
@ -2716,13 +2762,6 @@ define([
common.openURL(priv.accounts.donateURL);
Feedback.send('CROWDFUNDING_YES');
});
$(modal.popup).find('a').click(function (e) {
e.stopPropagation();
e.preventDefault();
modal.delete();
common.openURL(priv.accounts.donateURL);
Feedback.send('CROWDFUNDING_LINK');
});
$(no).click(function () {
modal.delete();
Feedback.send('CROWDFUNDING_NO');
@ -2762,7 +2801,7 @@ define([
priv.pathname.indexOf('/drive/') !== -1 ? Messages.autostore_sf :
Messages.autostore_pad;
var text = Messages._getKey('autostore_notstored', [typeMsg]);
var footer = Messages.autostore_settings;
var footer = Pages.setHTML(h('span'), Messages.autostore_settings);
var hide = h('button.cp-corner-cancel', Messages.autostore_hide);
var store = h('button.cp-corner-primary', Messages.autostore_store);
@ -2899,7 +2938,7 @@ define([
var dismiss = function () {
common.mailbox.dismiss(data, function (err) {
console.log(err);
if (err) { console.log(err); }
});
};
var answer = function (yes) {
@ -2908,6 +2947,7 @@ define([
href: msg.content.href,
password: msg.content.password,
title: msg.content.title,
calendar: msg.content.calendar,
answer: yes
}, {
channel: msg.content.user.notifications,
@ -2943,16 +2983,29 @@ define([
// Add the pad to your drive
// This command will also add your mailbox to the metadata log
// The callback is called when the pad is stored, independantly of the metadata command
sframeChan.query('Q_ACCEPT_OWNERSHIP', data, function (err, res) {
if (err || (res && res.error)) {
return void console.error(err | res.error);
}
UI.log(Messages.saved);
if (autoStoreModal[data.channel]) {
autoStoreModal[data.channel].delete();
delete autoStoreModal[data.channel];
}
});
if (data.calendar) {
var calendarModule = common.makeUniversal('calendar');
var calendarData = data.calendar;
calendarData.href = data.href;
calendarData.teamId = 1;
calendarModule.execCommand('ADD', calendarData, function (obj) {
if (obj && obj.error) {
console.error(obj.error);
return void UI.warn(Messages.error);
}
});
} else {
sframeChan.query('Q_ACCEPT_OWNERSHIP', data, function (err, res) {
if (err || (res && res.error)) {
return void console.error(err | res.error);
}
UI.log(Messages.saved);
if (autoStoreModal[data.channel]) {
autoStoreModal[data.channel].delete();
delete autoStoreModal[data.channel];
}
});
}
// Remove yourself from the pending owners
sframeChan.query('Q_SET_PAD_METADATA', {

@ -554,6 +554,16 @@
return false;
};
Util.isValidURL = function (str) {
var pattern = new RegExp('^(https?:\\/\\/)'+ // protocol
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|'+ // domain name
'((\\d{1,3}\\.){3}\\d{1,3}))'+ // OR ip (v4) address
'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*'+ // port and path
'(\\?[;&a-z\\d%_.~+=-]*)?'+ // query string
'(\\#[-a-z\\d_]*)?$','i'); // fragment locator
return !!pattern.test(str);
};
var emoji_patt = /([\uD800-\uDBFF][\uDC00-\uDFFF])/;
var isEmoji = function (str) {
return emoji_patt.test(str);
@ -575,6 +585,18 @@
return isEmoji(emojis[0])? emojis[0]: str[0];
};
Util.getRandomColor = function (light) {
var getColor = function () {
if (light) {
return Math.floor(Math.random() * 156) + 70;
}
return Math.floor(Math.random() * 200) + 25;
};
return '#' + getColor().toString(16) +
getColor().toString(16) +
getColor().toString(16);
};
if (typeof(module) !== 'undefined' && module.exports) {
module.exports = Util;
} else if ((typeof(define) !== 'undefined' && define !== null) && (define.amd !== null)) {

@ -2551,16 +2551,6 @@ define([
console.log('onLogout: disconnect');
postMessage("DISCONNECT");
});
}).nThen(function (waitFor) {
if (common.createReadme || sessionStorage.createReadme) {
var data = {
driveReadme: Messages.driveReadme,
driveReadmeTitle: Messages.driveReadmeTitle,
};
postMessage("CREATE_README", data, waitFor(function (e) {
if (e && e.error) { return void console.error(e.error); }
}));
}
}).nThen(function (waitFor) {
if (common.migrateAnonDrive || sessionStorage.migrateAnonDrive) {
common.mergeAnonDrive(waitFor());

@ -19,6 +19,7 @@ define([
'/common/proxy-manager.js',
'/customize/application_config.js',
'/customize/messages.js',
'/customize/pages.js',
], function (
$,
ApiConfig,
@ -37,7 +38,8 @@ define([
h,
ProxyManager,
AppConfig,
Messages)
Messages,
Pages)
{
var APP = window.APP = {
@ -646,11 +648,6 @@ define([
} else {
displayedCategories = [FILES_DATA];
currentPath = [FILES_DATA];
if (Object.keys(files.root).length && !proxy.anonymousAlert) {
var msg = common.fixLinks($('<div>').html(Messages.fm_alert_anonymous));
UI.alert(msg);
proxy.anonymousAlert = true;
}
}
}
@ -2495,7 +2492,7 @@ define([
// Get the upload options
var addSharedFolderModal = function (cb) {
var docsHref = common.getBounceURL("https://docs.cryptpad.fr/en/user_guide/share_and_access.html#owners");
var docsHref = common.getBounceURL(Pages.localizeDocsLink("https://docs.cryptpad.fr/en/user_guide/share_and_access.html#owners"));
// Ask for name, password and owner
var content = h('div', [
@ -2508,7 +2505,7 @@ define([
style: 'display:flex;align-items:center;justify-content:space-between'
}, [
UI.createCheckbox('cp-app-drive-sf-owned', Messages.sharedFolders_create_owned, true),
UI.createHelper(docsHref, Messages.creation_owned1) // TODO
UI.createHelper(docsHref, Messages.creation_owned1)
]),
]);
@ -4399,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('https://docs.cryptpad.fr/en/user_guide/share_and_access.html#owners', Messages.creation_owned1)
UI.createHelper(Pages.localizeDocsLink('https://docs.cryptpad.fr/en/user_guide/share_and_access.html#owners'), Messages.creation_owned1)
]),
]);
return void UI.confirm(convertContent, function(res) {

@ -1,5 +1,10 @@
define([
'/common/common-language.js',
'less!/customize/src/less2/pages/page-feedback.less',
], function (Language) {
Language.applyTranslation();
var optoutLink = document.querySelector('#optout a');
if (optoutLink) {
optoutLink.setAttribute('href', '/settings/');
}
});

@ -11,9 +11,9 @@ body {
</style>
</head>
<body>
<p data-localization="feedback_about">If you're reading this, you were probably curious why CryptPad is requesting web pages when you perform certain actions</p>
<p data-localization="feedback_about">If you're reading this, you were probably curious why CryptPad is requesting web pages when you perform certain actions.</p>
<p data-localization="feedback_privacy">We care about your privacy, and at the same time we want CryptPad to be very easy to use.
We use this file to figure out which UI features matter to our users, by requesting it along with a parameter specifying which action was taken.</p>
<p data-localization="feedback_optout">If you would like to opt out, visit <a href="/settings/">your user settings page</a>, where you'll find a checkbox to enable or disable user feedback</p>
<p data-localization="feedback_optout" id="optout">If you would like to opt out, visit <a href="/settings/">your user settings page</a>, where you'll find a checkbox to enable or disable user feedback.</p>

@ -336,6 +336,7 @@ define([
common.mailbox.sendTo("ADD_OWNER", {
channel: channel,
href: href,
calendar: opts.calendar,
password: data.password || priv.password,
title: data.title || title
}, {
@ -841,7 +842,7 @@ define([
// In the properties, we should have the edit href if we know it.
// We should know it because the pad is stored, but it's better to check...
if (!data.noEditPassword && owned && data.href) { // FIXME SHEET fix password change for sheets
if (!data.noEditPassword && !opts.noEditPassword && owned && data.href) { // FIXME SHEET fix password change for sheets
var isOO = parsed.type === 'sheet';
var isFile = parsed.hashData.type === 'file';
var isSharedFolder = parsed.type === 'drive';
@ -984,7 +985,7 @@ define([
if (err || (obj && obj.error)) { UI.warn(Messages.error); }
});
});
$d.append(h('br'));
if (!opts.noEditPassword) { $d.append(h('br')); }
$d.append(h('div', [
h('label', Messages.access_destroyPad),
h('br'),
@ -1016,7 +1017,7 @@ define([
var owned = Modal.isOwned(Env, data);
// Request edit access
if (common.isLoggedIn() && ((data.roHref && !data.href) || data.fakeHref) && !owned) {
if (common.isLoggedIn() && ((data.roHref && !data.href) || data.fakeHref) && !owned && !opts.calendar) {
var requestButton = h('button.btn.btn-secondary.no-margin.cp-access-margin-right',
Messages.requestEdit_button);
var requestBlock = h('p', requestButton);
@ -1054,7 +1055,7 @@ define([
var canMute = data.mailbox && owned === true && (
(typeof (data.mailbox) === "string" && data.owners[0] === edPublic) ||
data.mailbox[edPublic]);
if (owned === true) {
if (owned === true && !opts.calendar) {
var cbox = UI.createCheckbox('cp-access-mute', Messages.access_muteRequests, !canMute);
var $cbox = $(cbox);
var spinner = UI.makeSpinner($cbox);

@ -10,8 +10,9 @@ define([
'/common/clipboard.js',
'/customize/messages.js',
'/bower_components/nthen/index.js',
'/customize/pages.js',
], function ($, Util, Hash, UI, UIElements, Feedback, Modal, h, Clipboard,
Messages, nThen) {
Messages, nThen, Pages) {
var Share = {};
var createShareWithFriends = function (config, onShare, linkGetter) {
@ -111,6 +112,7 @@ define([
password: config.password,
isTemplate: config.isTemplate,
name: myName,
isCalendar: Boolean(config.calendar),
title: title
}, {
viewed: team && team.id,
@ -122,6 +124,19 @@ define([
}
// If it's a team with edit right, add the pad directly
if (!team) { return; }
if (config.calendar) {
var calendarModule = common.makeUniversal('calendar');
var calendarData = config.calendar;
calendarData.href = href;
calendarData.teamId = team.id;
calendarModule.execCommand('ADD', calendarData, function (obj) {
if (obj && obj.error) {
console.error(obj.error);
return void UI.warn(Messages.error);
}
});
return;
}
sframeChan.query('Q_STORE_IN_TEAM', {
href: href,
password: config.password,
@ -252,7 +267,7 @@ define([
h('a', {href: '#'}, Messages.passwordFaqLink)
]);
$(link).click(function () {
opts.common.openUnsafeURL("https://docs.cryptpad.fr/en/user_guide/security.html#passwords-for-documents-and-folders");
opts.common.openUnsafeURL(Pages.localizeDocsLink("https://docs.cryptpad.fr/en/user_guide/security.html#passwords-for-documents-and-folders"));
});
return link;
};

@ -7,7 +7,8 @@ define([
'/common/common-util.js',
'/common/common-constants.js',
'/customize/messages.js',
], function($, h, Hash, UI, UIElements, Util, Constants, Messages) {
'/customize/pages.js',
], function($, h, Hash, UI, UIElements, Util, Constants, Messages, Pages) {
var handlers = {};
@ -395,7 +396,10 @@ define([
handlers['SAFE_LINKS_DEFAULT'] = function (common, data) {
var content = data.content;
content.getFormatText = function () {
return Messages.settings_safeLinkDefault;
var msg = Pages.setHTML(h('span'), Messages.settings_safeLinkDefault);
var i = msg.querySelector('i');
if (i) { i.classList = 'fa fa-shhare-alt'; }
return msg.innerHTML;
};
content.handler = function () {
@ -406,6 +410,57 @@ define([
}
};
handlers['BROADCAST_SURVEY'] = function (common, data) {
var content = data.content;
var msg = content.msg.content;
content.getFormatText = function () {
return Messages.broadcast_newSurvey;
};
content.handler = function () {
common.openUnsafeURL(msg.url);
defaultDismiss(common, data)();
};
if (!content.archived) {
content.dismissHandler = defaultDismiss(common, data);
}
};
handlers['BROADCAST_CUSTOM'] = function (common, data) {
var content = data.content;
var msg = content.msg.content;
var text = msg.content;
var defaultL = msg.defaultLanguage;
var myLang = data.lang || Messages._languageUsed;
// Check if our language is available
var toShow = text[myLang];
// Otherwise, fallback to the default language if it exists
if (!toShow && defaultL) { toShow = text[defaultL]; }
// No translation available, dismiss
if (!toShow) { return defaultDismiss(common, data)(); }
var slice = toShow.length > 200;
toShow = Util.fixHTML(toShow);
content.getFormatText = function () {
if (slice) {
return toShow.slice(0, 200) + '...';
}
return toShow;
};
if (slice) {
content.handler = function () {
var content = h('div', [
h('h4', Messages.broadcast_newCustom),
h('div.cp-admin-message', toShow)
]);
UI.alert(content);
};
}
if (!content.archived) {
content.dismissHandler = defaultDismiss(common, data);
}
};
// NOTE: don't forget to fixHTML everything returned by "getFormatText"
return {

@ -1,7 +1,7 @@
@import (reference) "../../customize/src/less2/include/framework.less";
// body
body.cp-app-sheet, body.cp-app-oodoc, body.cp-app-ooslide {
body.cp-app-sheet, body.cp-app-doc, body.cp-app-presentation {
display: flex;
flex-flow: column;
@ -10,14 +10,14 @@ body.cp-app-sheet, body.cp-app-oodoc, body.cp-app-ooslide {
@bg-color: @colortheme_apps[sheet],
);
}
&.cp-app-oodoc {
&.cp-app-doc {
.framework_main(
@bg-color: @colortheme_apps[oodoc],
@bg-color: @colortheme_apps[doc],
);
}
&.cp-app-ooslide {
&.cp-app-presentation {
.framework_main(
@bg-color: @colortheme_apps[ooslide],
@bg-color: @colortheme_apps[presentation],
);
}

@ -79,6 +79,7 @@ define([
var toolbar;
var cursor;
var andThen = function (common) {
@ -231,7 +232,7 @@ define([
var title = common.getMetadataMgr().getMetadataLazy().title;
var file = {};
switch(type) {
case 'oodoc':
case 'doc':
file.type = 'docx';
file.title = title + '.docx' || 'document.docx';
file.doc = 'text';
@ -241,7 +242,7 @@ define([
file.title = title + '.xlsx' || 'spreadsheet.xlsx';
file.doc = 'spreadsheet';
break;
case 'ooslide':
case 'presentation':
file.type = 'pptx';
file.title = title + '.pptx' || 'presentation.pptx';
file.doc = 'presentation';
@ -561,10 +562,10 @@ define([
case 'sheet' :
newText = EmptyCell(useNewDefault);
break;
case 'oodoc':
case 'doc':
newText = EmptyDoc();
break;
case 'ooslide':
case 'presentation':
newText = EmptySlide();
break;
default:
@ -798,6 +799,7 @@ define([
var i = 1;
var p = Object.keys(content.ids || {}).map(function (id) {
var nId = id.slice(0,32);
if (!users[nId]) { return; }
var ooId = content.ids[id].ooid;
var idx = content.ids[id].index;
if (!ooId || ooId === myOOId) { return; }
@ -841,14 +843,31 @@ define([
};
// Get all existing locks
var getUserLock = function (id) {
var getUserLock = function (id, forceArray) {
var type = common.getMetadataMgr().getPrivateData().ooType;
content.locks = content.locks || {};
var l = content.locks[id] || {};
return Object.keys(l).map(function (uid) { return l[uid]; });
if (type === "sheet" || forceArray) {
return Object.keys(l).map(function (uid) { return l[uid]; });
}
var res = {};
Object.keys(l).forEach(function (uid) {
res[uid] = l[uid];
});
return res;
};
var getLock = function () {
var type = common.getMetadataMgr().getPrivateData().ooType;
var locks = [];
Object.keys(content.locks).forEach(function (id) {
Array.prototype.push.apply(locks, getUserLock(id));
if (type === "sheet") {
Object.keys(content.locks || {}).forEach(function (id) {
Array.prototype.push.apply(locks, getUserLock(id));
});
return locks;
}
locks = {};
Object.keys(content.locks || {}).forEach(function (id) {
Util.extend(locks, getUserLock(id));
});
return locks;
};
@ -997,6 +1016,8 @@ define([
}, 50);
return;
}
var type = common.getMetadataMgr().getPrivateData().ooType;
content.locks = content.locks || {};
// Send the lock to other users
var msg = {
@ -1006,8 +1027,13 @@ define([
};
var myId = getId();
content.locks[myId] = content.locks[myId] || {};
var uid = Util.uid();
content.locks[myId][uid] = msg;
var b = obj.block && obj.block[0];
if (type === "sheet") {
var uid = Util.uid();
content.locks[myId][uid] = msg;
} else {
if (typeof(b) === "string") { content.locks[myId][b] = msg; }
}
oldLocks = JSON.parse(JSON.stringify(content.locks));
// Remove old locks
deleteOfflineLocks();
@ -1098,8 +1124,8 @@ define([
type: "saveChanges",
changes: parseChanges(obj.changes),
changesIndex: ooChannel.cpIndex || 0,
locks: getUserLock(getId()),
excelAdditionalInfo: null
locks: getUserLock(getId(), true),
excelAdditionalInfo: obj.excelAdditionalInfo
}, null, function (err, hash) {
if (err) {
return void console.error(err);
@ -1134,6 +1160,7 @@ define([
var makeChannel = function () {
var msgEv = Util.mkEvent();
var iframe = $('#cp-app-oo-editor > iframe')[0].contentWindow;
var type = common.getMetadataMgr().getPrivateData().ooType;
window.addEventListener('message', function (msg) {
if (msg.source !== iframe) { return; }
msgEv.fire(msg);
@ -1145,7 +1172,11 @@ define([
APP.chan = chan;
var send = ooChannel.send = function (obj, force) {
if (APP.onStrictSaveChanges && !force) { return; } // can't push to OO before reloading cp
// can't push to OO before reloading cp
if (APP.onStrictSaveChanges && !force) { return; }
// We only need to release locks for sheets
if (type !== "sheet" && obj.type === "releaseLock") { return; }
debug(obj, 'toOO');
chan.event('CMD', obj);
};
@ -1174,6 +1205,17 @@ define([
}
}
break;
case "cursor":
cursor.updateCursor({
type: "cursor",
messages: [{
cursor: obj.cursor,
time: +new Date(),
user: myUniqueOOId,
useridoriginal: myOOId
}]
});
break;
case "getLock":
handleLock(obj, send);
break;
@ -1184,12 +1226,14 @@ define([
case "saveChanges":
// If we have unsaved data before reloading for a checkpoint...
if (APP.onStrictSaveChanges) {
delete APP.unsavedLocks;
APP.unsavedChanges = {
type: "saveChanges",
changes: parseChanges(obj.changes),
changesIndex: ooChannel.cpIndex || 0,
locks: getUserLock(getId()),
excelAdditionalInfo: null
locks: type === "sheet" ? [] : APP.unsavedLocks,
excelAdditionalInfo: null,
recover: true
};
APP.onStrictSaveChanges();
return;
@ -1284,22 +1328,37 @@ define([
var css = // Old OO
//'#id-toolbar-full .toolbar-group:nth-child(2), #id-toolbar-full .separator:nth-child(3) { display: none; }' +
//'#fm-btn-save { display: none !important; }' +
'#panel-settings-general tr.autosave { display: none !important; }' +
'#panel-settings-general tr.coauth { display: none !important; }' +
//'#panel-settings-general tr.autosave { display: none !important; }' +
//'#panel-settings-general tr.coauth { display: none !important; }' +
//'#header { display: none !important; }' +
'#title-doc-name { display: none !important; }' +
'#title-user-name { display: none !important; }' +
(supportsXLSX() ? '' : '#slot-btn-dt-print { display: none !important; }') +
// New OO:
'#asc-gen257 { display: none !important; }' + // Insert image from url
'section[data-tab="ins"] .separator:nth-last-child(2) { display: none !important; }' + // separator
'#slot-btn-insequation { display: none !important; }' + // Insert equation
'#asc-gen125 { display: none !important; }' + // Disable presenter mode
//'.toolbar .tabs .ribtab:not(.canedit) { display: none !important; }' + // Switch collaborative mode
'#fm-btn-info { display: none !important; }' + // Author name, doc title, etc. in "File" (menu entry)
'#panel-info { display: none !important; }' + // Same but content
'#image-button-from-url { display: none !important; }' + // Inline image settings: replace with url
'#asc-gen257 { display: none !important; }' + // Insert image from url
'#asc-gen1839 { display: none !important; }' + // Image context menu: replace with url
'#asc-gen5883 { display: none !important; }' + // Rightside image menu: replace with url
'#asc-gen1211 { display: none !important; }' + // Slide Image context menu: replace with url
'#asc-gen3880 { display: none !important; }' + // Rightside slide image menu: replace with url
'#asc-gen2218 { display: none !important; }' + // Rightside slide menu: fill slide with image url
'#asc-gen849 { display: none !important; }' + // Toolbar slide: insert image from url
'#asc-gen857 { display: none !important; }' + // Toolbar slide: insert image from url (insert tab)
'#asc-gen180 { display: none !important; }' + // Doc Insert image from url
'#asc-gen1760 { display: none !important; }' + // Doc Image context menu: replace with url
'#asc-gen3319 { display: none !important; }' + // Doc Rightside image menu: replace with url
'.statusbar .cnt-lang { display: none !important; }' + // Spellcheck language
'.statusbar #btn-doc-spell { display: none !important; }' + // Spellcheck button
'#file-menu-panel .devider { display: none !important; }' + // separator in the "File" menu
'#left-btn-spellcheck, #left-btn-about { display: none !important; }'+
'div.btn-users.dropdown-toggle { display: none; !important }';
@ -1445,6 +1504,29 @@ define([
};
*/
APP.getUserColor = function (userId) {
var hex;
Object.keys(content.ids || {}).some(function (k) {
var u = content.ids[k];
if (Number(u.ooid) === Number(userId)) {
var md = common.getMetadataMgr().getMetadataLazy();
if (md && md.users && md.users[u.netflux]) {
hex = md.users[u.netflux].color;
}
return true;
}
});
if (hex) {
var rgb = Util.hexToRGB(hex);
return {
r: rgb[0],
g: rgb[1],
b: rgb[2],
a: 255
};
}
};
APP.UploadImageFiles = function (files, type, id, jwt, cb) {
return void cb();
};
@ -1507,6 +1589,10 @@ define([
APP.loadingImage = 0;
APP.getImageURL = function(name, callback) {
if (name && /^data:image/.test(name)) {
return void callback('');
}
var mediasSources = getMediasSources();
var data = mediasSources[name];
@ -1782,10 +1868,10 @@ define([
if (type === "sheet" && extension !== 'xlsx') {
xlsData = x2tConvertDataInternal(x2t, data, filename, 'xlsx');
filename += '.xlsx';
} else if (type === "ooslide" && extension !== "pptx") {
} else if (type === "presentation" && extension !== "pptx") {
xlsData = x2tConvertDataInternal(x2t, data, filename, 'pptx');
filename += '.pptx';
} else if (type === "oodoc" && extension !== "docx") {
} else if (type === "doc" && extension !== "docx") {
xlsData = x2tConvertDataInternal(x2t, data, filename, 'docx');
filename += '.docx';
}
@ -1809,9 +1895,9 @@ define([
var ext = ['.xlsx', '.ods', '.bin', '.csv', '.pdf'];
var type = common.getMetadataMgr().getPrivateData().ooType;
var warning = '';
if (type==="ooslide") {
if (type==="presentation") {
ext = ['.pptx', /*'.odp',*/ '.bin'];
} else if (type==="oodoc") {
} else if (type==="doc") {
ext = ['.docx', /*'.odt',*/ '.bin'];
}
@ -2034,10 +2120,10 @@ define([
case 'sheet' :
newText = EmptyCell(useNewDefault);
break;
case 'oodoc':
case 'doc':
newText = EmptyDoc();
break;
case 'ooslide':
case 'presentation':
newText = EmptySlide();
break;
default:
@ -2094,7 +2180,8 @@ define([
var setStrictEditing = function () {
if (APP.isFast) { return; }
var editor = getEditor();
var editing = editor.asc_isDocumentModified();
var isModified = editor.asc_isDocumentModified || editor.isDocumentModified;
var editing = isModified();
if (editing) {
evOnPatch.fire();
} else {
@ -2252,6 +2339,7 @@ define([
$contentContainer: $('#cp-app-oo-container')
};
toolbar = APP.toolbar = Toolbar.create(configTb);
toolbar.showColors();
Title.setToolbar(toolbar);
if (window.CP_DEV_MODE) {
@ -2398,9 +2486,9 @@ define([
var type = privateData.ooType;
var accept = [".bin", ".ods", ".xlsx"];
if (type === "ooslide") {
if (type === "presentation") {
accept = ['.bin', '.odp', '.pptx'];
} else if (type === "oodoc") {
} else if (type === "doc") {
accept = ['.bin', '.odt', '.docx'];
}
if (!supportsXLSX()) {
@ -2466,6 +2554,7 @@ define([
newDoc = !content.hashes || Object.keys(content.hashes).length === 0;
} else if (!privateData.isNewFile) {
// This is an empty doc but not a new file: error
// XXX clear cache before reloading
UI.errorLoadingScreen(Messages.unableToDisplay, false, function () {
common.gotoURL('');
});
@ -2547,6 +2636,44 @@ define([
initializing = false;
common.openPadChat(APP.onLocal);
if (!readOnly) {
var cursors = {};
common.openCursorChannel(APP.onLocal);
cursor = common.createCursor(APP.onLocal);
cursor.onCursorUpdate(function (data) {
// Leaving user
if (data && data.leave && data.id) {
// When a netflux user leaves, remove all their cursors
Object.keys(cursors).forEach(function (ooid) {
var d = cursors[ooid];
if (d !== data.id) { return; } // Only continue for the leaving user
// Remove from OO UI
ooChannel.send({
type: "cursor",
messages: [{
cursor: "10;AgAAADIAAAAAAA==",
time: +new Date(),
user: ooid,
useridoriginal: String(ooid).slice(0,-1),
}]
});
// Remove from memory
delete cursors[ooid];
});
handleNewIds({}, content.ids);
}
// Cursor update
if (!data || !data.cursor) { return; }
// Store the new cursor in memory for this user, with their netflux ID
var ooid = Util.find(data.cursor, ['messages', 0, 'user']);
if (ooid) { cursors[ooid] = data.id.slice(0,32); }
// Update cursor in the UI
ooChannel.send(data.cursor);
});
}
if (APP.startWithTemplate) {
var template = APP.startWithTemplate;
loadTemplate(template.href, template.password, template.content);
@ -2590,6 +2717,8 @@ define([
var wasMigrating = content.migration;
var myLocks = getUserLock(getId(), true);
content = json.content;
if (content.saveLock && wasLocked !== content.saveLock) {
@ -2615,8 +2744,12 @@ define([
checkNewCheckpoint();
});
};
if (editor.asc_isDocumentModified()) {
var isModified = editor.asc_isDocumentModified || function () {
return editor.isDocumentModify;
};
if (isModified()) {
setEditable(false);
APP.unsavedLocks = myLocks;
APP.onStrictSaveChanges = function () {
reload();
delete APP.onStrictSaveChanges;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -781,19 +781,19 @@ true;if(nTTRemainder<=0){sResult=sGroup+sResult;if(nRemValue<=0)break;continue}v
false}else if(!isPrevZero){sGroup+=arrChinese[0];isPrevZero=true}if(nRemainder<=0){sResult=sGroup+sResult;if(nRemValue<=0)break;continue}nQuotient=nRemainder/10|0;nRemainder=nRemainder-nQuotient*10;if(0!==nQuotient){sGroup+=arrChinese[nQuotient]+arrChinese[10];isPrevZero=false}else if(!isPrevZero){sGroup+=arrChinese[0];isPrevZero=true}if(0!==nRemainder)sGroup+=arrChinese[nRemainder];sResult=sGroup+sResult;if(nRemValue<=0)break}break}}return sResult}var c_oAscSpaces=[];c_oAscSpaces[10]=1;c_oAscSpaces[32]=
1;c_oAscSpaces[8194]=1;c_oAscSpaces[8195]=1;c_oAscSpaces[8197]=1;c_oAscSpaces[12288]=1;function IsSpace(nUnicode){return!!c_oAscSpaces[nUnicode]}function private_IsAbbreviation(sWord){if(sWord.toUpperCase()===sWord){for(var nPos=0,nLen=sWord.length;nPos<nLen;++nPos){var nCharCode=sWord.charCodeAt(nPos);if(44032<=nCharCode&&nCharCode<=55203||4352<=nCharCode&&nCharCode<=4607||12592<=nCharCode&&nCharCode<=12687||43360<=nCharCode&&nCharCode<=43391||55216<=nCharCode&&nCharCode<=55295||19968<=nCharCode&&
nCharCode<=40959||13312<=nCharCode&&nCharCode<=19903||131072<=nCharCode&&nCharCode<=173791||173824<=nCharCode&&nCharCode<=177983||177984<=nCharCode&&nCharCode<=178207||178208<=nCharCode&&nCharCode<=183983||63744<=nCharCode&&nCharCode<=64255||194560<=nCharCode&&nCharCode<=195103)return false}return true}return false}var g_oUserColorById={},g_oUserNextColorIndex=0;function getUserColorById(userId,userName,isDark,isNumericValue){if(window.parent.APP&&window.parent.APP.getUserColor)try{var CPColor=window.parent.APP.getUserColor(userId);
if(CPColor)return true===isNumericValue?CPColor.r<<16&16711680|CPColor.g<<8&65280|CPColor.b&255:CPColor}catch(e){}if((!userId||""===userId)&&(!userName||""===userName))return new CColor(0,0,0,255);var res;if(g_oUserColorById.hasOwnProperty(userId))res=g_oUserColorById[userId];else if(g_oUserColorById.hasOwnProperty(userName))res=g_oUserColorById[userName];else{var nColor=Asc.c_oAscArrUserColors[g_oUserNextColorIndex%Asc.c_oAscArrUserColors.length];++g_oUserNextColorIndex;res=g_oUserColorById[userId||
userName]=new CUserCacheColor(nColor)}if(!res)return new CColor(0,0,0,255);var oColor=true===isDark?res.Dark:res.Light;return true===isNumericValue?oColor.r<<16&16711680|oColor.g<<8&65280|oColor.b&255:oColor}function isNullOrEmptyString(str){return str==undefined||str==null||str==""}function unleakString(s){return(" "+s).substr(1)}function readValAttr(attr){if(attr()){var val=attr()["val"];return val?val:null}return null}function getNumFromXml(val){return val?val-0:null}function getColorFromXml(attr){if(attr()){var vals=
attr();if(null!=vals["theme"])return AscCommonExcel.g_oColorManager.getThemeColor(getNumFromXml(vals["theme"]),getNumFromXml(vals["tint"]));else if(null!=vals["rgb"])return new AscCommonExcel.RgbColor(16777215&getNumFromXml(vals["rgb"]))}return null}function getBoolFromXml(val){return"0"!==val&&"false"!==val&&"off"!==val}function CUserCacheColor(nColor){this.Light=null;this.Dark=null;this.init(nColor)}CUserCacheColor.prototype.init=function(nColor){var r=nColor>>16&255;var g=nColor>>8&255;var b=nColor&
255;var Y=Math.max(0,Math.min(255,.299*r+.587*g+.114*b));var Cb=Math.max(0,Math.min(255,128-.168736*r-.331264*g+.5*b));var Cr=Math.max(0,Math.min(255,128+.5*r-.418688*g-.081312*b));if(Y>63)Y=63;var R=Math.max(0,Math.min(255,Y+1.402*(Cr-128)))|0;var G=Math.max(0,Math.min(255,Y-.34414*(Cb-128)-.71414*(Cr-128)))|0;var B=Math.max(0,Math.min(255,Y+1.772*(Cb-128)))|0;this.Light=new CColor(r,g,b,255);this.Dark=new CColor(R,G,B,255)};function loadScript(url,onSuccess,onError){if(window["NATIVE_EDITOR_ENJINE"]===
true||window["Native"]!==undefined){onSuccess();return}if(window["AscDesktopEditor"]&&window["local_load_add"]){var _context={"completeLoad":function(){return onSuccess()}};window["local_load_add"](_context,"sdk-all-from-min",url);var _ret_param=window["AscDesktopEditor"]["LoadJS"](url);if(2!=_ret_param)window["local_load_remove"](url);if(_ret_param==1){setTimeout(onSuccess,1);return}else if(_ret_param==2)return}var backoff=new AscCommon.Backoff(AscCommon.g_oBackoffDefaults);loadScriptWithBackoff(backoff,
url,onSuccess,onError)}function loadScriptWithBackoff(backoff,url,onSuccess,onError){var script=document.createElement("script");script.type="text/javascript";script.src=url;script.onload=onSuccess;script.onerror=function(){backoff.attempt(onError,function(){loadScriptWithBackoff(backoff,url,onSuccess,onError)})};document.head.appendChild(script)}function loadSdk(sdkName,onSuccess,onError){if(window["AscNotLoadAllScript"])onSuccess();else{var urlArgs=window.parent&&window.parent.APP&&window.parent.APP.urlArgs||
"";loadScript("./../../../../sdkjs/"+sdkName+"/sdk-all.js?"+urlArgs,onSuccess,onError)}}function getAltGr(e){var ctrlKey=e.metaKey||e.ctrlKey;var altKey=e.altKey;return altKey&&(AscBrowser.isMacOs?!ctrlKey:ctrlKey)}function getColorSchemeByName(sName){for(var i=0;i<AscCommon.g_oUserColorScheme.length;++i){var tmp=AscCommon.g_oUserColorScheme[i];if(tmp&&tmp.name===sName)return getColorSchemeByIdx(i)}return null}function getColorSchemeByIdx(idx){var tmp=AscCommon.g_oUserColorScheme[idx];if(tmp){var scheme=
new AscFormat.ClrScheme,_c;scheme.name=tmp.name;_c=tmp.get_dk1();scheme.colors[8]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_lt1();scheme.colors[12]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_dk2();scheme.colors[9]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_lt2();scheme.colors[13]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent1();scheme.colors[0]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent2();scheme.colors[1]=AscFormat.CreateUniColorRGB(_c.r,
_c.g,_c.b);_c=tmp.get_accent3();scheme.colors[2]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent4();scheme.colors[3]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent5();scheme.colors[4]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent6();scheme.colors[5]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_hlink();scheme.colors[11]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_folHlink();scheme.colors[10]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);
return scheme}return null}function getAscColorScheme(_scheme,theme){var elem,_c;var _rgba={R:0,G:0,B:0,A:255};elem=new AscCommon.CAscColorScheme;elem.scheme=_scheme;elem.name=_scheme.name;_scheme.colors[8].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[8].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[12].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[12].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[9].Calculate(theme,null,null,
null,_rgba);_c=_scheme.colors[9].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[13].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[13].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[0].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[0].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[1].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[1].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[2].Calculate(theme,
null,null,null,_rgba);_c=_scheme.colors[2].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[3].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[3].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[4].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[4].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[5].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[5].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));
_scheme.colors[11].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[11].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[10].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[10].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));return elem}function getIndexColorSchemeInArray(result,asc_color_scheme){for(var j=0;j<result.length;++j)if(result[j].isEqual(asc_color_scheme))return j;return-1}function checkAddColorScheme(result,asc_color_scheme,nStartIndex){var nIndex=
if(CPColor)return true===isNumericValue?CPColor.r<<16&16711680|CPColor.g<<8&65280|CPColor.b&255:new CColor(CPColor.r,CPColor.g,CPColor.b,CPColor.a)}catch(e){}if((!userId||""===userId)&&(!userName||""===userName))return new CColor(0,0,0,255);var res;if(g_oUserColorById.hasOwnProperty(userId))res=g_oUserColorById[userId];else if(g_oUserColorById.hasOwnProperty(userName))res=g_oUserColorById[userName];else{var nColor=Asc.c_oAscArrUserColors[g_oUserNextColorIndex%Asc.c_oAscArrUserColors.length];++g_oUserNextColorIndex;
res=g_oUserColorById[userId||userName]=new CUserCacheColor(nColor)}if(!res)return new CColor(0,0,0,255);var oColor=true===isDark?res.Dark:res.Light;return true===isNumericValue?oColor.r<<16&16711680|oColor.g<<8&65280|oColor.b&255:oColor}function isNullOrEmptyString(str){return str==undefined||str==null||str==""}function unleakString(s){return(" "+s).substr(1)}function readValAttr(attr){if(attr()){var val=attr()["val"];return val?val:null}return null}function getNumFromXml(val){return val?val-0:null}
function getColorFromXml(attr){if(attr()){var vals=attr();if(null!=vals["theme"])return AscCommonExcel.g_oColorManager.getThemeColor(getNumFromXml(vals["theme"]),getNumFromXml(vals["tint"]));else if(null!=vals["rgb"])return new AscCommonExcel.RgbColor(16777215&getNumFromXml(vals["rgb"]))}return null}function getBoolFromXml(val){return"0"!==val&&"false"!==val&&"off"!==val}function CUserCacheColor(nColor){this.Light=null;this.Dark=null;this.init(nColor)}CUserCacheColor.prototype.init=function(nColor){var r=
nColor>>16&255;var g=nColor>>8&255;var b=nColor&255;var Y=Math.max(0,Math.min(255,.299*r+.587*g+.114*b));var Cb=Math.max(0,Math.min(255,128-.168736*r-.331264*g+.5*b));var Cr=Math.max(0,Math.min(255,128+.5*r-.418688*g-.081312*b));if(Y>63)Y=63;var R=Math.max(0,Math.min(255,Y+1.402*(Cr-128)))|0;var G=Math.max(0,Math.min(255,Y-.34414*(Cb-128)-.71414*(Cr-128)))|0;var B=Math.max(0,Math.min(255,Y+1.772*(Cb-128)))|0;this.Light=new CColor(r,g,b,255);this.Dark=new CColor(R,G,B,255)};function loadScript(url,
onSuccess,onError){if(window["NATIVE_EDITOR_ENJINE"]===true||window["Native"]!==undefined){onSuccess();return}if(window["AscDesktopEditor"]&&window["local_load_add"]){var _context={"completeLoad":function(){return onSuccess()}};window["local_load_add"](_context,"sdk-all-from-min",url);var _ret_param=window["AscDesktopEditor"]["LoadJS"](url);if(2!=_ret_param)window["local_load_remove"](url);if(_ret_param==1){setTimeout(onSuccess,1);return}else if(_ret_param==2)return}var backoff=new AscCommon.Backoff(AscCommon.g_oBackoffDefaults);
loadScriptWithBackoff(backoff,url,onSuccess,onError)}function loadScriptWithBackoff(backoff,url,onSuccess,onError){var script=document.createElement("script");script.type="text/javascript";script.src=url;script.onload=onSuccess;script.onerror=function(){backoff.attempt(onError,function(){loadScriptWithBackoff(backoff,url,onSuccess,onError)})};document.head.appendChild(script)}function loadSdk(sdkName,onSuccess,onError){if(window["AscNotLoadAllScript"])onSuccess();else{var urlArgs=window.parent&&window.parent.APP&&
window.parent.APP.urlArgs||"";loadScript("./../../../../sdkjs/"+sdkName+"/sdk-all.js?"+urlArgs,onSuccess,onError)}}function getAltGr(e){var ctrlKey=e.metaKey||e.ctrlKey;var altKey=e.altKey;return altKey&&(AscBrowser.isMacOs?!ctrlKey:ctrlKey)}function getColorSchemeByName(sName){for(var i=0;i<AscCommon.g_oUserColorScheme.length;++i){var tmp=AscCommon.g_oUserColorScheme[i];if(tmp&&tmp.name===sName)return getColorSchemeByIdx(i)}return null}function getColorSchemeByIdx(idx){var tmp=AscCommon.g_oUserColorScheme[idx];
if(tmp){var scheme=new AscFormat.ClrScheme,_c;scheme.name=tmp.name;_c=tmp.get_dk1();scheme.colors[8]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_lt1();scheme.colors[12]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_dk2();scheme.colors[9]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_lt2();scheme.colors[13]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent1();scheme.colors[0]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent2();scheme.colors[1]=
AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent3();scheme.colors[2]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent4();scheme.colors[3]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent5();scheme.colors[4]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent6();scheme.colors[5]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_hlink();scheme.colors[11]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_folHlink();scheme.colors[10]=AscFormat.CreateUniColorRGB(_c.r,
_c.g,_c.b);return scheme}return null}function getAscColorScheme(_scheme,theme){var elem,_c;var _rgba={R:0,G:0,B:0,A:255};elem=new AscCommon.CAscColorScheme;elem.scheme=_scheme;elem.name=_scheme.name;_scheme.colors[8].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[8].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[12].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[12].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[9].Calculate(theme,
null,null,null,_rgba);_c=_scheme.colors[9].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[13].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[13].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[0].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[0].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[1].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[1].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));
_scheme.colors[2].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[2].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[3].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[3].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[4].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[4].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[5].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[5].RGBA;elem.putColor(new AscCommon.CColor(_c.R,
_c.G,_c.B));_scheme.colors[11].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[11].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[10].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[10].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));return elem}function getIndexColorSchemeInArray(result,asc_color_scheme){for(var j=0;j<result.length;++j)if(result[j].isEqual(asc_color_scheme))return j;return-1}function checkAddColorScheme(result,asc_color_scheme,nStartIndex){var nIndex=
getIndexColorSchemeInArray(result,asc_color_scheme);if(nIndex>-1)return nIndex;var nStartIndex_=nStartIndex;if(nStartIndex===null)nStartIndex_=result.length;result.splice(nStartIndex_,0,asc_color_scheme);return nStartIndex_}function isEastAsianScript(value){return 12544<=value&&value<=12591||12704<=value&&value<=12735||19968<=value&&value<=40938||13312<=value&&value<=19893||131072<=value&&value<=173782||173824<=value&&value<=177972||177984<=value&&value<=178205||178208<=value&&value<=183969||183984<=
value&&value<=191456||63744<=value&&value<=64255||194560<=value&&value<=195103||12032<=value&&value<=12255||11904<=value&&value<=12031||12736<=value&&value<=12783||12272<=value&&value<=12287||4352<=value&&value<=4607||43360<=value&&value<=43391||55216<=value&&value<=55295||12592<=value&&value<=12687||65280<=value&&value<=65519||44032<=value&&value<=55215||12352<=value&&value<=12447||110848<=value&&value<=110895||110592<=value&&value<=110847||12688<=value&&value<=12703||12448<=value&&value<=12543||
12784<=value&&value<=12799||42192<=value&&value<=42239||93952<=value&&value<=94111||110960<=value&&value<=111359||94208<=value&&value<=100332||100352<=value&&value<=101119||40960<=value&&value<=42127||42128<=value&&value<=42191}var g_oIdCounter=new CIdCounter;window.Asc.g_signature_drawer=null;function CSignatureDrawer(id,api,w,h){window.Asc.g_signature_drawer=this;this.Api=api;this.CanvasParent=document.getElementById(id);this.Canvas=document.createElement("canvas");this.Canvas.style.position="absolute";

@ -8419,10 +8419,10 @@ oThis.Api.SendOpenProgress()}if(!oThis.bIsLoadDocumentImagesNoByOrder){oThis.ima
oThis._LoadImages()}else if(oThis.nNoByOrderCounter==oThis.images_loading.length){oThis.images_loading=[];oThis._LoadImages()}};AscCommon.backoffOnErrorImg(oImage.Image,function(img){oThis.loadImageByUrl(img,img.src)});oThis.loadImageByUrl(oImage.Image,oImage.src);if(!oThis.bIsLoadDocumentImagesNoByOrder)return}};this.LoadImage=function(src,Type){var _image=this.map_image_index[src];if(undefined!=_image)return _image;this.Api.asyncImageStartLoaded();var oImage=new CImage(src);oImage.Type=Type;oImage.Image=
new Image;oImage.Status=ImageLoadStatus.Loading;oThis.map_image_index[oImage.src]=oImage;oImage.Image.onload=function(){oImage.Status=ImageLoadStatus.Complete;oThis.Api.asyncImageEndLoaded(oImage)};oImage.Image.onerror=function(){oImage.Image=null;oImage.Status=ImageLoadStatus.Complete;oThis.Api.asyncImageEndLoaded(oImage)};AscCommon.backoffOnErrorImg(oImage.Image,function(img){oThis.loadImageByUrl(img,img.src)});this.loadImageByUrl(oImage.Image,oImage.src);return null};this.LoadImageAsync=function(i,
cb){var _id=oThis.images_loading[i];var oImage=new CImage(_id);oImage.Status=ImageLoadStatus.Loading;oImage.Image=new Image;oThis.map_image_index[oImage.src]=oImage;var oThat=oThis;oImage.Image.onload=function(){oImage.Status=ImageLoadStatus.Complete;oThat.Api.asyncImageEndLoadedBackground(oImage)};oImage.Image.onerror=function(){oImage.Status=ImageLoadStatus.Complete;oImage.Image=null;oThat.Api.asyncImageEndLoadedBackground(oImage)};AscCommon.backoffOnErrorImg(oImage.Image,function(img){oThis.loadImageByUrl(img,
img.src)});console.log("Loading image "+i);console.log(oImage);window.parent.APP.getImageURL(oImage.src,function(url){if(url=="")oThis.loadImageByUrl(oImage.Image,oImage.src);else{oThis.loadImageByUrl(oImage.Image,url);oThis.map_image_index[url]=oImage}if(typeof cb==="function")cb()})};this.LoadImagesWithCallback=function(arr,loadImageCallBack,loadImageCallBackArgs){var arrAsync=[];var i=0;for(i=0;i<arr.length;i++)if(this.map_image_index[arr[i]]===undefined)arrAsync.push(arr[i]);if(arrAsync.length==
0){loadImageCallBack.call(this.Api,loadImageCallBackArgs);return}this.loadImageCallBackCounter=0;this.loadImageCallBackCounterMax=arrAsync.length;this.loadImageCallBack=loadImageCallBack;this.loadImageCallBackArgs=loadImageCallBackArgs;for(i=0;i<arrAsync.length;i++){var oImage=new CImage(arrAsync[i]);oImage.Image=new Image;oImage.Image.parentImage=oImage;oImage.Status=ImageLoadStatus.Loading;this.map_image_index[oImage.src]=oImage;oImage.Image.onload=function(){this.parentImage.Status=ImageLoadStatus.Complete;
oThis.loadImageCallBackCounter++;if(oThis.loadImageCallBackCounter==oThis.loadImageCallBackCounterMax)oThis.LoadImagesWithCallbackEnd()};oImage.Image.onerror=function(){this.parentImage.Image=null;this.parentImage.Status=ImageLoadStatus.Complete;oThis.loadImageCallBackCounter++;if(oThis.loadImageCallBackCounter==oThis.loadImageCallBackCounterMax)oThis.LoadImagesWithCallbackEnd()};AscCommon.backoffOnErrorImg(oImage.Image,function(img){oThis.loadImageByUrl(img,img.src)});this.loadImageByUrl(oImage.Image,
oImage.src)}};this.LoadImagesWithCallbackEnd=function(){this.loadImageCallBack.call(this.Api,this.loadImageCallBackArgs);this.loadImageCallBack=null;this.loadImageCallBackArgs=null;this.loadImageCallBackCounterMax=0;this.loadImageCallBackCounter=0}}var g_flow_anchor=new Image;g_flow_anchor.asc_complete=false;g_flow_anchor.onload=function(){g_flow_anchor.asc_complete=true};g_flow_anchor.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAPBAMAAADNDVhEAAAAIVBMVEUAAAANDQ0NDQ0NDQ0NDQ0NDQ0AAAANDQ0NDQ0NDQ0NDQ1jk7YPAAAACnRSTlMAGkD4mb9c5s9TDghpXQAAAFZJREFUCNdjYGBgW8YABlxcIBLBZ1gAEfZa5QWiGRkWMAIpAaA4iHQE0YwODEtANMsChkIwv4BBWQBICyswMC1iWADEDAzKoUuDFUAGNC9uABvIaQkkABpxD6lFb9lRAAAAAElFTkSuQmCC";
img.src)});window.parent.APP.getImageURL(oImage.src,function(url){if(url=="")oThis.loadImageByUrl(oImage.Image,oImage.src);else{oThis.loadImageByUrl(oImage.Image,url);oThis.map_image_index[url]=oImage}if(typeof cb==="function")cb()})};this.LoadImagesWithCallback=function(arr,loadImageCallBack,loadImageCallBackArgs){var arrAsync=[];var i=0;for(i=0;i<arr.length;i++)if(this.map_image_index[arr[i]]===undefined)arrAsync.push(arr[i]);if(arrAsync.length==0){loadImageCallBack.call(this.Api,loadImageCallBackArgs);
return}this.loadImageCallBackCounter=0;this.loadImageCallBackCounterMax=arrAsync.length;this.loadImageCallBack=loadImageCallBack;this.loadImageCallBackArgs=loadImageCallBackArgs;for(i=0;i<arrAsync.length;i++){var oImage=new CImage(arrAsync[i]);oImage.Image=new Image;oImage.Image.parentImage=oImage;oImage.Status=ImageLoadStatus.Loading;this.map_image_index[oImage.src]=oImage;oImage.Image.onload=function(){this.parentImage.Status=ImageLoadStatus.Complete;oThis.loadImageCallBackCounter++;if(oThis.loadImageCallBackCounter==
oThis.loadImageCallBackCounterMax)oThis.LoadImagesWithCallbackEnd()};oImage.Image.onerror=function(){this.parentImage.Image=null;this.parentImage.Status=ImageLoadStatus.Complete;oThis.loadImageCallBackCounter++;if(oThis.loadImageCallBackCounter==oThis.loadImageCallBackCounterMax)oThis.LoadImagesWithCallbackEnd()};AscCommon.backoffOnErrorImg(oImage.Image,function(img){oThis.loadImageByUrl(img,img.src)});this.loadImageByUrl(oImage.Image,oImage.src)}};this.LoadImagesWithCallbackEnd=function(){this.loadImageCallBack.call(this.Api,
this.loadImageCallBackArgs);this.loadImageCallBack=null;this.loadImageCallBackArgs=null;this.loadImageCallBackCounterMax=0;this.loadImageCallBackCounter=0}}var g_flow_anchor=new Image;g_flow_anchor.asc_complete=false;g_flow_anchor.onload=function(){g_flow_anchor.asc_complete=true};g_flow_anchor.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAPBAMAAADNDVhEAAAAIVBMVEUAAAANDQ0NDQ0NDQ0NDQ0NDQ0AAAANDQ0NDQ0NDQ0NDQ1jk7YPAAAACnRSTlMAGkD4mb9c5s9TDghpXQAAAFZJREFUCNdjYGBgW8YABlxcIBLBZ1gAEfZa5QWiGRkWMAIpAaA4iHQE0YwODEtANMsChkIwv4BBWQBICyswMC1iWADEDAzKoUuDFUAGNC9uABvIaQkkABpxD6lFb9lRAAAAAElFTkSuQmCC";
var g_flow_anchor2=new Image;g_flow_anchor2.asc_complete=false;g_flow_anchor2.onload=function(){g_flow_anchor2.asc_complete=true};g_flow_anchor2.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAeCAMAAAAFBf7qAAAAOVBMVEUAAAAAAAAAAAAAAAAJCQkAAAAJCQkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJCQknI0ZQAAAAEnRSTlMAx9ITlAfyPHxn68yecTAl5qt6y0BvAAAAt0lEQVQoz8WS0QrDIAxFk0ajtlXb+/8fuzAprltg7Gnn4aIcvAgJTSSoBiGPoIAGV60qoquvIIL110IJgPONmKIlMI73MiwGRoZvahbKVSizcDKU8QeVPDXEIr6ShVB9VUEn2FOMkwL8VwjUtuypvDWiHeVTFeyWkZHfVQZHGm4XMhKQyJB9GKMxuHQSBlioF7u2q7kzgO2AcWwW3F8mWRmGKgyu91mK1Tzh4ixVVkBzJI/EnGjyACbfCaO3eIWRAAAAAElFTkSuQmCC";
window["AscCommon"]=window["AscCommon"]||{};window["AscCommon"].g_font_loader=new CGlobalFontLoader;window["AscCommon"].g_image_loader=new CGlobalImageLoader;window["AscCommon"].g_flow_anchor=g_flow_anchor;window["AscCommon"].g_flow_anchor2=g_flow_anchor2})(window,window.document);"use strict";(function(window,undefined){var FOREIGN_CURSOR_LABEL_HIDETIME=1500;function CCollaborativeChanges(){this.m_pData=null;this.m_oColor=null}CCollaborativeChanges.prototype.Set_Data=function(pData){this.m_pData=
pData};CCollaborativeChanges.prototype.Set_Color=function(oColor){this.m_oColor=oColor};CCollaborativeChanges.prototype.Set_FromUndoRedo=function(Class,Data,Binary){if(!Class.Get_Id)return false;this.m_pData=this.private_SaveData(Binary);return true};CCollaborativeChanges.prototype.Apply_Data=function(){var CollaborativeEditing=AscCommon.CollaborativeEditing;var Reader=this.private_LoadData(this.m_pData);var ClassId=Reader.GetString2();var Class=AscCommon.g_oTableId.Get_ById(ClassId);if(!Class)return false;
@ -17184,8 +17184,8 @@ this.Lines.length-RangeOffset);if(this.Lines[0]!==LineIndex+1&&0===RangeIndex)th
this.protected_GetRangeOffset(LineIndex,RangeIndex);this.Lines[RangeOffset+1]=EndPos};CParagraphContentWithContentBase.prototype.private_UpdateSpellChecking=function(){if(this.Paragraph&&this.Paragraph.SpellChecker){this.Paragraph.SpellChecker.ClearPausedEngine();this.Paragraph.RecalcInfo.Set_Type_0_Spell(pararecalc_0_Spell_All)}};CParagraphContentWithContentBase.prototype.Is_UseInDocument=function(Id){if(this.Paragraph){for(var i=0;i<this.Content.length;++i)if(this.Content[i].Get_Id&&this.Content[i].Get_Id()===
Id)break;if(i<this.Content.length)return this.Paragraph.Is_UseInDocument(this.Get_Id())}return false};CParagraphContentWithContentBase.prototype.IsUseInDocument=function(sId){return this.Is_UseInDocument(sId)};CParagraphContentWithContentBase.prototype.protected_GetPrevRangeEndPos=function(LineIndex,RangeIndex){var RangeCount=this.protected_GetRangesCount(LineIndex-1);var RangeOffset=this.protected_GetRangeOffset(LineIndex-1,RangeCount-1);return LineIndex==0&&RangeIndex==0?0:this.Lines[RangeOffset+
1]};CParagraphContentWithContentBase.prototype.private_UpdateTrackRevisions=function(){if(this.Paragraph&&this.Paragraph.LogicDocument&&this.Paragraph.LogicDocument.GetTrackRevisionsManager){var RevisionsManager=this.Paragraph.LogicDocument.GetTrackRevisionsManager();RevisionsManager.CheckElement(this.Paragraph)}};CParagraphContentWithContentBase.prototype.CanSplit=function(){return true};CParagraphContentWithContentBase.prototype.PreDelete=function(){};CParagraphContentWithContentBase.prototype.private_UpdateDocumentOutline=
function(){if(this.Paragraph)this.Paragraph.UpdateDocumentOutline()};CParagraphContentWithContentBase.prototype.IsSolid=function(){return false};CParagraphContentWithContentBase.prototype.ConvertParaContentPosToRangePos=function(oContentPos,nDepth){return 0};CParagraphContentWithContentBase.prototype.ProcessNotInlineObjectCheck=function(oChecker){oChecker.Result=false;oChecker.Found=true};function CParagraphContentWithParagraphLikeContent(){CParagraphContentWithContentBase.call(this);this.Type=undefined;
this.Paragraph=null;this.m_oContentChanges=new AscCommon.CContentChanges;this.Content=[];this.State=new CParaRunState;this.Selection=this.State.Selection;this.NearPosArray=[];this.SearchMarks=[]}CParagraphContentWithParagraphLikeContent.prototype=Object.create(CParagraphContentWithContentBase.prototype);CParagraphContentWithParagraphLikeContent.prototype.constructor=CParagraphContentWithParagraphLikeContent;CParagraphContentWithParagraphLikeContent.prototype.Get_Type=function(){return this.Type};
function(){if(this.Paragraph&&this.Paragraph.UpdateDocumentOutline)this.Paragraph.UpdateDocumentOutline()};CParagraphContentWithContentBase.prototype.IsSolid=function(){return false};CParagraphContentWithContentBase.prototype.ConvertParaContentPosToRangePos=function(oContentPos,nDepth){return 0};CParagraphContentWithContentBase.prototype.ProcessNotInlineObjectCheck=function(oChecker){oChecker.Result=false;oChecker.Found=true};function CParagraphContentWithParagraphLikeContent(){CParagraphContentWithContentBase.call(this);
this.Type=undefined;this.Paragraph=null;this.m_oContentChanges=new AscCommon.CContentChanges;this.Content=[];this.State=new CParaRunState;this.Selection=this.State.Selection;this.NearPosArray=[];this.SearchMarks=[]}CParagraphContentWithParagraphLikeContent.prototype=Object.create(CParagraphContentWithContentBase.prototype);CParagraphContentWithParagraphLikeContent.prototype.constructor=CParagraphContentWithParagraphLikeContent;CParagraphContentWithParagraphLikeContent.prototype.Get_Type=function(){return this.Type};
CParagraphContentWithParagraphLikeContent.prototype.Copy=function(Selected,oPr){var NewElement=new this.constructor;var StartPos=0;var EndPos=this.Content.length-1;if(true===Selected&&true===this.State.Selection.Use){StartPos=this.State.Selection.StartPos;EndPos=this.State.Selection.EndPos;if(StartPos>EndPos){StartPos=this.State.Selection.EndPos;EndPos=this.State.Selection.StartPos}}for(var CurPos=StartPos;CurPos<=EndPos;CurPos++){var Item=this.Content[CurPos];if(StartPos===CurPos||EndPos===CurPos)NewElement.Add_ToContent(CurPos-
StartPos,Item.Copy(Selected,oPr));else NewElement.Add_ToContent(CurPos-StartPos,Item.Copy(false,oPr))}return NewElement};CParagraphContentWithParagraphLikeContent.prototype.GetSelectedContent=function(oSelectedContent){var oNewElement=new this.constructor;var nStartPos=this.State.Selection.StartPos;var nEndPos=this.State.Selection.EndPos;if(nStartPos>nEndPos){nStartPos=this.State.Selection.EndPos;nEndPos=this.State.Selection.StartPos}var nItemPos=0;for(var nPos=nStartPos,nItemPos=0;nPos<=nEndPos;++nPos){var oNewItem=
this.Content[nPos].GetSelectedContent(oSelectedContent);if(oNewItem){oNewElement.AddToContent(nItemPos,oNewItem);nItemPos++}}if(0===nItemPos)return null;return oNewElement};CParagraphContentWithParagraphLikeContent.prototype.CopyContent=function(Selected){var CopyContent=[];var StartPos=0;var EndPos=this.Content.length-1;if(true===Selected&&true===this.State.Selection.Use){StartPos=this.State.Selection.StartPos;EndPos=this.State.Selection.EndPos;if(StartPos>EndPos){StartPos=this.State.Selection.EndPos;
@ -18283,155 +18283,156 @@ CChangesParaTextPrUnderline.prototype.private_SetValue=function(Value){this.Clas
AscDFH.historyitem_TextPr_FontSize;CChangesParaTextPrFontSize.prototype.private_SetValue=function(Value){this.Class.Value.FontSize=Value};CChangesParaTextPrFontSize.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrColor(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrColor.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrColor.prototype.constructor=CChangesParaTextPrColor;
CChangesParaTextPrColor.prototype.Type=AscDFH.historyitem_TextPr_Color;CChangesParaTextPrColor.prototype.private_SetValue=function(Value){this.Class.Value.Color=Value};CChangesParaTextPrColor.prototype.private_CreateObject=function(){return new CDocumentColor(0,0,0,false)};CChangesParaTextPrColor.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrVertAlign(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrVertAlign.prototype=
Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrVertAlign.prototype.constructor=CChangesParaTextPrVertAlign;CChangesParaTextPrVertAlign.prototype.Type=AscDFH.historyitem_TextPr_VertAlign;CChangesParaTextPrVertAlign.prototype.private_SetValue=function(Value){this.Class.Value.VertAlign=Value};CChangesParaTextPrVertAlign.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrHighLight(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,
Old,New,Color)}CChangesParaTextPrHighLight.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrHighLight.prototype.constructor=CChangesParaTextPrHighLight;CChangesParaTextPrHighLight.prototype.Type=AscDFH.historyitem_TextPr_HighLight;CChangesParaTextPrHighLight.prototype.private_SetValue=function(Value){this.Class.Value.HighLight=Value};CChangesParaTextPrHighLight.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=
2;else if(highlight_None===this.New)nFlags|=4;if(undefined===this.Old)nFlags|=8;else if(highlight_None===this.Old)nFlags|=16;Writer.WriteLong(nFlags);if(undefined!==this.New&&highlight_None!==this.New)this.New.Write_ToBinary(Writer);if(undefined!==this.Old&&highlight_None!==this.Old)this.Old.Write_ToBinary(Writer)};CChangesParaTextPrHighLight.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else if(nFlags&
4)this.New=highlight_None;else{this.New=new CDocumentColor(0,0,0);this.New.Read_FromBinary(Reader)}if(nFlags&8)this.Old=undefined;else if(nFlags&16)this.Old=highlight_None;else{this.Old=new CDocumentColor(0,0,0);this.Old.Read_FromBinary(Reader)}};CChangesParaTextPrHighLight.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrRStyle(Class,Old,New,Color){AscDFH.CChangesBaseStringProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRStyle.prototype=Object.create(AscDFH.CChangesBaseStringProperty.prototype);
CChangesParaTextPrRStyle.prototype.constructor=CChangesParaTextPrRStyle;CChangesParaTextPrRStyle.prototype.Type=AscDFH.historyitem_TextPr_RStyle;CChangesParaTextPrRStyle.prototype.private_SetValue=function(Value){this.Class.Value.RStyle=Value};CChangesParaTextPrRStyle.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrSpacing(Class,Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrSpacing.prototype=Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);
CChangesParaTextPrSpacing.prototype.constructor=CChangesParaTextPrSpacing;CChangesParaTextPrSpacing.prototype.Type=AscDFH.historyitem_TextPr_Spacing;CChangesParaTextPrSpacing.prototype.private_SetValue=function(Value){this.Class.Value.Spacing=Value};CChangesParaTextPrSpacing.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrDStrikeout(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrDStrikeout.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);
CChangesParaTextPrDStrikeout.prototype.constructor=CChangesParaTextPrDStrikeout;CChangesParaTextPrDStrikeout.prototype.Type=AscDFH.historyitem_TextPr_DStrikeout;CChangesParaTextPrDStrikeout.prototype.private_SetValue=function(Value){this.Class.Value.DStrikeout=Value};CChangesParaTextPrDStrikeout.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrCaps(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrCaps.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);
CChangesParaTextPrCaps.prototype.constructor=CChangesParaTextPrCaps;CChangesParaTextPrCaps.prototype.Type=AscDFH.historyitem_TextPr_Caps;CChangesParaTextPrCaps.prototype.private_SetValue=function(Value){this.Class.Value.Caps=Value};CChangesParaTextPrCaps.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrSmallCaps(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrSmallCaps.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);
CChangesParaTextPrSmallCaps.prototype.constructor=CChangesParaTextPrSmallCaps;CChangesParaTextPrSmallCaps.prototype.Type=AscDFH.historyitem_TextPr_SmallCaps;CChangesParaTextPrSmallCaps.prototype.private_SetValue=function(Value){this.Class.Value.SmallCaps=Value};CChangesParaTextPrSmallCaps.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrPosition(Class,Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrPosition.prototype=
Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);CChangesParaTextPrPosition.prototype.constructor=CChangesParaTextPrPosition;CChangesParaTextPrPosition.prototype.Type=AscDFH.historyitem_TextPr_Position;CChangesParaTextPrPosition.prototype.private_SetValue=function(Value){this.Class.Value.Position=Value};CChangesParaTextPrPosition.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrValue(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,
New,Color)}CChangesParaTextPrValue.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrValue.prototype.constructor=CChangesParaTextPrValue;CChangesParaTextPrValue.prototype.Type=AscDFH.historyitem_TextPr_Value;CChangesParaTextPrValue.prototype.private_SetValue=function(Value){this.Class.Value=Value};CChangesParaTextPrValue.prototype.private_CreateObject=function(){return new CTextPr};CChangesParaTextPrValue.prototype.private_IsCreateEmptyObject=function(){return true};
CChangesParaTextPrValue.prototype.Merge=function(oChange){if(oChange.Class!==this.Class)return true;if(oChange.Type===this.Type)return false;if(!this.New)this.New=new CTextPr;switch(oChange.Type){case AscDFH.historyitem_TextPr_Bold:{this.New.Bold=oChange.New;break}case AscDFH.historyitem_TextPr_Italic:{this.New.Italic=oChange.New;break}case AscDFH.historyitem_TextPr_Strikeout:{this.New.Strikeout=oChange.New;break}case AscDFH.historyitem_TextPr_Underline:{this.New.Underline=oChange.New;break}case AscDFH.historyitem_TextPr_FontSize:{this.New.FontSize=
oChange.New;break}case AscDFH.historyitem_TextPr_Color:{this.New.Color=oChange.New;break}case AscDFH.historyitem_TextPr_VertAlign:{this.New.VertAlign=oChange.New;break}case AscDFH.historyitem_TextPr_HighLight:{this.New.HighLight=oChange.New;break}case AscDFH.historyitem_TextPr_RStyle:{this.New.RStyle=oChange.New;break}case AscDFH.historyitem_TextPr_Spacing:{this.New.Spacing=oChange.New;break}case AscDFH.historyitem_TextPr_DStrikeout:{this.New.DStrikeout=oChange.New;break}case AscDFH.historyitem_TextPr_Caps:{this.New.Caps=
oChange.New;break}case AscDFH.historyitem_TextPr_SmallCaps:{this.New.SmallCaps=oChange.New;break}case AscDFH.historyitem_TextPr_Position:{this.New.Position=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts:{this.New.RFonts=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_Ascii:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.Ascii=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_HAnsi:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.HAnsi=oChange.New;
break}case AscDFH.historyitem_TextPr_RFonts_CS:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.CS=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_EastAsia:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_Hint:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.Hint=oChange.New;break}case AscDFH.historyitem_TextPr_Lang:{this.New.Lang=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_Bidi:{if(!this.New.Lang)this.New.Lang=
new CLang;this.New.Lang.Bidi=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_EastAsia:{if(!this.New.Lang)this.New.Lang=new CLang;this.New.Lang.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_Val:{if(!this.New.Lang)this.New.Lang=new CLang;this.New.Lang.Val=oChange.New;break}case AscDFH.historyitem_TextPr_Unifill:{this.New.Unifill=oChange.New;break}case AscDFH.historyitem_TextPr_FontSizeCS:{this.New.FontSizeCS=oChange.New;break}case AscDFH.historyitem_TextPr_Outline:{this.New.TextOutline=
oChange.New;break}case AscDFH.historyitem_TextPr_Fill:{this.New.TextFill=oChange.New;break}}return true};function CChangesParaTextPrRFonts(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFonts.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrRFonts.prototype.constructor=CChangesParaTextPrRFonts;CChangesParaTextPrRFonts.prototype.Type=AscDFH.historyitem_TextPr_RFonts;CChangesParaTextPrRFonts.prototype.private_SetValue=
function(Value){this.Class.Value.RFonts=Value};CChangesParaTextPrRFonts.prototype.private_CreateObject=function(){return new CRFonts};CChangesParaTextPrRFonts.prototype.private_IsCreateEmptyObject=function(){return true};CChangesParaTextPrRFonts.prototype.Merge=function(oChange){if(this.Class!==oChange.Class)return true;if(this.Type===oChange.Type||oChange.Type===AscDFH.historyitem_TextPr_Value)return false;if(!this.New)this.New=new CRFonts;switch(oChange.Type){case AscDFH.historyitem_TextPr_RFonts_Ascii:{this.New.Ascii=
oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_HAnsi:{this.New.HAnsi=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_CS:{this.New.CS=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_EastAsia:{this.New.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_Hint:{this.New.Hint=oChange.New;break}}return true};function CChangesParaTextPrRFontsAscii(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsAscii.prototype=
Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsAscii.prototype.constructor=CChangesParaTextPrRFontsAscii;CChangesParaTextPrRFontsAscii.prototype.Type=AscDFH.historyitem_TextPr_RFonts_Ascii;CChangesParaTextPrRFontsAscii.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==
this.Old)Writer.WriteString2(this.Old.Name)};CChangesParaTextPrRFontsAscii.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;else this.Old={Name:Reader.GetString2(),Index:-1}};CChangesParaTextPrRFontsAscii.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.Ascii=Value};CChangesParaTextPrRFontsAscii.prototype.Merge=
private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrRFontsHAnsi(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsHAnsi.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsHAnsi.prototype.constructor=CChangesParaTextPrRFontsHAnsi;CChangesParaTextPrRFontsHAnsi.prototype.Type=AscDFH.historyitem_TextPr_RFonts_HAnsi;CChangesParaTextPrRFontsHAnsi.prototype.WriteToBinary=function(Writer){var nFlags=
0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==this.Old)Writer.WriteString2(this.Old.Name)};CChangesParaTextPrRFontsHAnsi.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;
else this.Old={Name:Reader.GetString2(),Index:-1}};CChangesParaTextPrRFontsHAnsi.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.HAnsi=Value};CChangesParaTextPrRFontsHAnsi.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrRFontsCS(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsCS.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsCS.prototype.constructor=
CChangesParaTextPrRFontsCS;CChangesParaTextPrRFontsCS.prototype.Type=AscDFH.historyitem_TextPr_RFonts_CS;CChangesParaTextPrRFontsCS.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==this.Old)Writer.WriteString2(this.Old.Name)};CChangesParaTextPrRFontsCS.prototype.ReadFromBinary=function(Reader){var nFlags=
Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;else this.Old={Name:Reader.GetString2(),Index:-1}};CChangesParaTextPrRFontsCS.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.CS=Value};CChangesParaTextPrRFontsCS.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrRFontsEastAsia(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,
Class,Old,New,Color)}CChangesParaTextPrRFontsEastAsia.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsEastAsia.prototype.constructor=CChangesParaTextPrRFontsEastAsia;CChangesParaTextPrRFontsEastAsia.prototype.Type=AscDFH.historyitem_TextPr_RFonts_EastAsia;CChangesParaTextPrRFontsEastAsia.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);
if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==this.Old)Writer.WriteString2(this.Old.Name)};CChangesParaTextPrRFontsEastAsia.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;else this.Old={Name:Reader.GetString2(),Index:-1}};CChangesParaTextPrRFontsEastAsia.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.EastAsia=
Value};CChangesParaTextPrRFontsEastAsia.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrRFontsHint(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsHint.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrRFontsHint.prototype.constructor=CChangesParaTextPrRFontsHint;CChangesParaTextPrRFontsHint.prototype.Type=AscDFH.historyitem_TextPr_RFonts_Hint;CChangesParaTextPrRFontsHint.prototype.private_SetValue=
function(Value){this.Class.Value.RFonts.Hint=Value};CChangesParaTextPrRFontsHint.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrLang(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrLang.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrLang.prototype.constructor=CChangesParaTextPrLang;CChangesParaTextPrLang.prototype.Type=AscDFH.historyitem_TextPr_Lang;CChangesParaTextPrLang.prototype.private_SetValue=
function(Value){this.Class.Value.Lang=Value};CChangesParaTextPrLang.prototype.private_CreateObject=function(){return new CLang};CChangesParaTextPrLang.prototype.private_IsCreateEmptyObject=function(){return true};CChangesParaTextPrLang.prototype.Merge=function(oChange){if(this.Class!==oChange.Class)return true;if(AscDFH.historyitem_TextPr_Lang===oChange.Type||AscDFH.historyitem_TextPr_Value===oChange.Type)return false;if(!this.New)this.New=new CLang;switch(oChange.Type){case AscDFH.historyitem_TextPr_Lang_Bidi:{this.New.Bidi=
oChange.New;break}case AscDFH.historyitem_TextPr_Lang_EastAsia:{this.New.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_Val:{this.New.Val=oChange.New;break}}return true};function CChangesParaTextPrLangBidi(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrLangBidi.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrLangBidi.prototype.constructor=CChangesParaTextPrLangBidi;CChangesParaTextPrLangBidi.prototype.Type=
AscDFH.historyitem_TextPr_Lang_Bidi;CChangesParaTextPrLangBidi.prototype.private_SetValue=function(Value){this.Class.Value.Lang.Bidi=Value};CChangesParaTextPrLangBidi.prototype.Merge=private_ParaTextPrChangesOnMergeLangValue;function CChangesParaTextPrLangEastAsia(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrLangEastAsia.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrLangEastAsia.prototype.constructor=CChangesParaTextPrLangEastAsia;
CChangesParaTextPrLangEastAsia.prototype.Type=AscDFH.historyitem_TextPr_Lang_EastAsia;CChangesParaTextPrLangEastAsia.prototype.private_SetValue=function(Value){this.Class.Value.Lang.EastAsia=Value};CChangesParaTextPrLangEastAsia.prototype.Merge=private_ParaTextPrChangesOnMergeLangValue;function CChangesParaTextPrLangVal(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrLangVal.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrLangVal.prototype.constructor=
CChangesParaTextPrLangVal;CChangesParaTextPrLangVal.prototype.Type=AscDFH.historyitem_TextPr_Lang_Val;CChangesParaTextPrLangVal.prototype.private_SetValue=function(Value){this.Class.Value.Lang.Val=Value};CChangesParaTextPrLangVal.prototype.Merge=private_ParaTextPrChangesOnMergeLangValue;function CChangesParaTextPrUnifill(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrUnifill.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);
CChangesParaTextPrUnifill.prototype.constructor=CChangesParaTextPrUnifill;CChangesParaTextPrUnifill.prototype.Type=AscDFH.historyitem_TextPr_Unifill;CChangesParaTextPrUnifill.prototype.private_SetValue=function(Value){this.Class.Value.Unifill=Value};CChangesParaTextPrUnifill.prototype.private_CreateObject=function(){return new AscFormat.CUniFill};CChangesParaTextPrUnifill.prototype.Load=function(Color){this.Redo();var Unifill=this.Class.Value.Unifill;if(AscCommon.CollaborativeEditing&&Unifill&&Unifill.fill&&
Unifill.fill.type===Asc.c_oAscFill.FILL_TYPE_BLIP&&typeof Unifill.fill.RasterImageId==="string"&&Unifill.fill.RasterImageId.length>0)AscCommon.CollaborativeEditing.Add_NewImage(Unifill.fill.RasterImageId)};CChangesParaTextPrUnifill.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrFontSizeCS(Class,Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrFontSizeCS.prototype=Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);
CChangesParaTextPrFontSizeCS.prototype.constructor=CChangesParaTextPrFontSizeCS;CChangesParaTextPrFontSizeCS.prototype.Type=AscDFH.historyitem_TextPr_FontSizeCS;CChangesParaTextPrFontSizeCS.prototype.private_SetValue=function(Value){this.Class.Value.FontSizeCS=Value};CChangesParaTextPrFontSizeCS.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrTextOutline(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrTextOutline.prototype=
Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrTextOutline.prototype.constructor=CChangesParaTextPrTextOutline;CChangesParaTextPrTextOutline.prototype.Type=AscDFH.historyitem_TextPr_Outline;CChangesParaTextPrTextOutline.prototype.private_SetValue=function(Value){this.Class.Value.TextOutline=Value};CChangesParaTextPrTextOutline.prototype.private_CreateObject=function(){return new AscFormat.CLn};CChangesParaTextPrTextOutline.prototype.Merge=private_ParaTextPrChangesOnMergeValue;
function CChangesParaTextPrTextFill(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrTextFill.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrTextFill.prototype.constructor=CChangesParaTextPrTextFill;CChangesParaTextPrTextFill.prototype.Type=AscDFH.historyitem_TextPr_Fill;CChangesParaTextPrTextFill.prototype.private_SetValue=function(Value){this.Class.Value.TextFill=Value};CChangesParaTextPrTextFill.prototype.private_CreateObject=
function(){return new AscFormat.CUniFill};CChangesParaTextPrTextFill.prototype.Merge=private_ParaTextPrChangesOnMergeValue;"use strict";var drawing_Inline=1;var drawing_Anchor=2;var WRAPPING_TYPE_NONE=0;var WRAPPING_TYPE_SQUARE=1;var WRAPPING_TYPE_THROUGH=2;var WRAPPING_TYPE_TIGHT=3;var WRAPPING_TYPE_TOP_AND_BOTTOM=4;var WRAP_HIT_TYPE_POINT=0;var WRAP_HIT_TYPE_SECTION=1;var c_oAscAlignH=Asc.c_oAscAlignH;var c_oAscAlignV=Asc.c_oAscAlignV;function ParaDrawing(W,H,GraphicObj,DrawingDocument,DocumentContent,
Parent){CRunElementBase.call(this);this.Id=AscCommon.g_oIdCounter.Get_NewId();this.DrawingType=drawing_Inline;this.GraphicObj=GraphicObj;this.X=0;this.Y=0;this.Width=0;this.Height=0;this.OrigX=0;this.OrigY=0;this.ShiftX=0;this.ShiftY=0;this.PageNum=0;this.LineNum=0;this.YOffset=0;this.DocumentContent=DocumentContent;this.DrawingDocument=DrawingDocument;this.Parent=Parent;this.LogicDocument=DrawingDocument?DrawingDocument.m_oLogicDocument:null;this.Distance={T:0,B:0,L:0,R:0};this.LayoutInCell=true;
this.RelativeHeight=undefined;this.SimplePos={Use:false,X:0,Y:0};this.Extent={W:W,H:H};this.EffectExtent={L:0,T:0,R:0,B:0};this.docPr=new AscFormat.CNvPr;this.SizeRelH=undefined;this.SizeRelV=undefined;this.AllowOverlap=true;this.Locked=null;this.Hidden=null;this.PositionH={RelativeFrom:c_oAscRelativeFromH.Column,Align:false,Value:0,Percent:false};this.PositionV={RelativeFrom:c_oAscRelativeFromV.Paragraph,Align:false,Value:0,Percent:false};this.PositionH_Old=undefined;this.PositionV_Old=undefined;
this.Internal_Position=new CAnchorPosition;this.wrappingType=WRAPPING_TYPE_THROUGH;this.useWrap=true;if(typeof CWrapPolygon!=="undefined")this.wrappingPolygon=new CWrapPolygon(this);this.document=editor.WordControl.m_oLogicDocument;this.drawingDocument=DrawingDocument;this.graphicObjects=editor.WordControl.m_oLogicDocument.DrawingObjects;this.selected=false;this.behindDoc=false;this.bNoNeedToAdd=false;this.pageIndex=-1;this.Lock=new AscCommon.CLock;this.ParaMath=null;this.SkipOnRecalculate=false;
this.LineTop=null;this.LineBottom=null;g_oTableId.Add(this,this.Id);if(this.graphicObjects){this.Set_RelativeHeight(this.graphicObjects.getZIndex());if(History.Is_On()&&!g_oTableId.m_bTurnOff)this.graphicObjects.addGraphicObject(this)}}ParaDrawing.prototype=Object.create(CRunElementBase.prototype);ParaDrawing.prototype.constructor=ParaDrawing;ParaDrawing.prototype.Type=para_Drawing;ParaDrawing.prototype.Get_Type=function(){return this.Type};ParaDrawing.prototype.Get_Width=function(){return this.Width};
ParaDrawing.prototype.Get_WidthVisible=function(){return this.WidthVisible};ParaDrawing.prototype.Set_WidthVisible=function(WidthVisible){this.WidthVisible=WidthVisible};ParaDrawing.prototype.GetSelectedContent=function(SelectedContent){if(this.GraphicObj&&this.GraphicObj.GetSelectedContent)this.GraphicObj.GetSelectedContent(SelectedContent)};ParaDrawing.prototype.GetSearchElementId=function(bNext,bCurrent){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.GetSearchElementId==="function")return this.GraphicObj.GetSearchElementId(bNext,
bCurrent);return null};ParaDrawing.prototype.CheckCorrect=function(){if(!this.GraphicObj)return false;if(this.GraphicObj&&this.GraphicObj.checkCorrect)return this.GraphicObj.checkCorrect();return true};ParaDrawing.prototype.GetAllDrawingObjects=function(DrawingObjects){if(null==DrawingObjects)DrawingObjects=[];if(this.GraphicObj.GetAllDrawingObjects)this.GraphicObj.GetAllDrawingObjects(DrawingObjects)};ParaDrawing.prototype.canRotate=function(){return AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.canRotate==
"function"&&this.GraphicObj.canRotate()};ParaDrawing.prototype.GetParagraph=function(){return this.Get_ParentParagraph()};ParaDrawing.prototype.GetRun=function(){return this.Get_Run()};ParaDrawing.prototype.Get_Run=function(){var oParagraph=this.Get_ParentParagraph();if(oParagraph)return oParagraph.Get_DrawingObjectRun(this.Id);return null};ParaDrawing.prototype.Get_Props=function(OtherProps){var Props={};Props.Width=this.GraphicObj.extX;Props.Height=this.GraphicObj.extY;if(drawing_Inline===this.DrawingType)Props.WrappingStyle=
c_oAscWrapStyle2.Inline;else if(WRAPPING_TYPE_NONE===this.wrappingType)Props.WrappingStyle=this.behindDoc===true?c_oAscWrapStyle2.Behind:c_oAscWrapStyle2.InFront;else switch(this.wrappingType){case WRAPPING_TYPE_SQUARE:Props.WrappingStyle=c_oAscWrapStyle2.Square;break;case WRAPPING_TYPE_TIGHT:Props.WrappingStyle=c_oAscWrapStyle2.Tight;break;case WRAPPING_TYPE_THROUGH:Props.WrappingStyle=c_oAscWrapStyle2.Through;break;case WRAPPING_TYPE_TOP_AND_BOTTOM:Props.WrappingStyle=c_oAscWrapStyle2.TopAndBottom;
break;default:Props.WrappingStyle=c_oAscWrapStyle2.Inline;break}if(drawing_Inline===this.DrawingType)Props.Paddings={Left:AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT,Right:AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT,Top:0,Bottom:0};else{var oDistance=this.Get_Distance();Props.Paddings={Left:oDistance.L,Right:oDistance.R,Top:oDistance.T,Bottom:oDistance.B}}Props.AllowOverlap=this.AllowOverlap;Props.Position={X:this.X,Y:this.Y};Props.PositionH={RelativeFrom:this.PositionH.RelativeFrom,UseAlign:this.PositionH.Align,
Align:true===this.PositionH.Align?this.PositionH.Value:undefined,Value:true===this.PositionH.Align?0:this.PositionH.Value,Percent:this.PositionH.Percent};Props.PositionV={RelativeFrom:this.PositionV.RelativeFrom,UseAlign:this.PositionV.Align,Align:true===this.PositionV.Align?this.PositionV.Value:undefined,Value:true===this.PositionV.Align?0:this.PositionV.Value,Percent:this.PositionV.Percent};if(this.SizeRelH&&this.SizeRelH.Percent>0)Props.SizeRelH={RelativeFrom:AscFormat.ConvertRelSizeHToRelPosition(this.SizeRelH.RelativeFrom),
Value:this.SizeRelH.Percent*100>>0};if(this.SizeRelV&&this.SizeRelV.Percent>0)Props.SizeRelV={RelativeFrom:AscFormat.ConvertRelSizeVToRelPosition(this.SizeRelV.RelativeFrom),Value:this.SizeRelV.Percent*100>>0};Props.Internal_Position=this.Internal_Position;Props.Locked=this.Lock.Is_Locked();var ParentParagraph=this.Get_ParentParagraph();if(ParentParagraph&&undefined!==ParentParagraph.Parent){var DocContent=ParentParagraph.Parent;if(true===DocContent.Is_DrawingShape()||DocContent.GetTopDocumentContent()instanceof
CFootEndnote)Props.CanBeFlow=false}Props.title=this.docPr.title!==null?this.docPr.title:undefined;Props.description=this.docPr.descr!==null?this.docPr.descr:undefined;if(null!=OtherProps&&undefined!=OtherProps){if(undefined===OtherProps.Width||.001>Math.abs(Props.Width-OtherProps.Width))Props.Width=undefined;if(undefined===OtherProps.Height||.001>Math.abs(Props.Height-OtherProps.Height))Props.Height=undefined;if(undefined===OtherProps.WrappingStyle||Props.WrappingStyle!=OtherProps.WrappingStyle)Props.WrappingStyle=
undefined;if(undefined===OtherProps.ImageUrl||Props.ImageUrl!=OtherProps.ImageUrl)Props.ImageUrl=undefined;if(undefined===OtherProps.Paddings.Left||.001>Math.abs(Props.Paddings.Left-OtherProps.Paddings.Left))Props.Paddings.Left=undefined;if(undefined===OtherProps.Paddings.Right||.001>Math.abs(Props.Paddings.Right-OtherProps.Paddings.Right))Props.Paddings.Right=undefined;if(undefined===OtherProps.Paddings.Top||.001>Math.abs(Props.Paddings.Top-OtherProps.Paddings.Top))Props.Paddings.Top=undefined;if(undefined===
OtherProps.Paddings.Bottom||.001>Math.abs(Props.Paddings.Bottom-OtherProps.Paddings.Bottom))Props.Paddings.Bottom=undefined;if(undefined===OtherProps.AllowOverlap||Props.AllowOverlap!=OtherProps.AllowOverlap)Props.AllowOverlap=undefined;if(undefined===OtherProps.Position.X||.001>Math.abs(Props.Position.X-OtherProps.Position.X))Props.Position.X=undefined;if(undefined===OtherProps.Position.Y||.001>Math.abs(Props.Position.Y-OtherProps.Position.Y))Props.Position.Y=undefined;if(undefined===OtherProps.PositionH.RelativeFrom||
Props.PositionH.RelativeFrom!=OtherProps.PositionH.RelativeFrom)Props.PositionH.RelativeFrom=undefined;if(undefined===OtherProps.PositionH.UseAlign||Props.PositionH.UseAlign!=OtherProps.PositionH.UseAlign)Props.PositionH.UseAlign=undefined;if(Props.PositionH.RelativeFrom===OtherProps.PositionH.RelativeFrom&&Props.PositionH.UseAlign===OtherProps.PositionH.UseAlign){if(true!=Props.PositionH.UseAlign&&.001>Math.abs(Props.PositionH.Value-OtherProps.PositionH.Value))Props.PositionH.Value=undefined;if(true===
Props.PositionH.UseAlign&&Props.PositionH.Align!=OtherProps.PositionH.Align)Props.PositionH.Align=undefined}if(undefined===OtherProps.PositionV.RelativeFrom||Props.PositionV.RelativeFrom!=OtherProps.PositionV.RelativeFrom)Props.PositionV.RelativeFrom=undefined;if(undefined===OtherProps.PositionV.UseAlign||Props.PositionV.UseAlign!=OtherProps.PositionV.UseAlign)Props.PositionV.UseAlign=undefined;if(Props.PositionV.RelativeFrom===OtherProps.PositionV.RelativeFrom&&Props.PositionV.UseAlign===OtherProps.PositionV.UseAlign){if(true!=
Props.PositionV.UseAlign&&.001>Math.abs(Props.PositionV.Value-OtherProps.PositionV.Value))Props.PositionV.Value=undefined;if(true===Props.PositionV.UseAlign&&Props.PositionV.Align!=OtherProps.PositionV.Align)Props.PositionV.Align=undefined}if(false===OtherProps.Locked)Props.Locked=false;if(false===OtherProps.CanBeFlow||false===Props.CanBeFlow)Props.CanBeFlow=false;else Props.CanBeFlow=true;if(undefined===OtherProps.title||Props.title!==OtherProps.title)Props.title=undefined;if(undefined===OtherProps.description||
Props.description!==OtherProps.description)Props.description=undefined}return Props};ParaDrawing.prototype.Is_UseInDocument=function(){if(this.Parent){var Run=this.Parent.Get_DrawingObjectRun(this.Id);if(Run)return Run.Is_UseInDocument(this.Get_Id())}return false};ParaDrawing.prototype.IsUseInDocument=function(){return this.Is_UseInDocument()};ParaDrawing.prototype.CheckGroupSizes=function(){if(this.GraphicObj&&this.GraphicObj.CheckGroupSizes)this.GraphicObj.CheckGroupSizes()};ParaDrawing.prototype.Set_DrawingType=
function(DrawingType){History.Add(new CChangesParaDrawingDrawingType(this,this.DrawingType,DrawingType));this.DrawingType=DrawingType};ParaDrawing.prototype.Set_WrappingType=function(WrapType){History.Add(new CChangesParaDrawingWrappingType(this,this.wrappingType,WrapType));this.wrappingType=WrapType};ParaDrawing.prototype.Set_Distance=function(L,T,R,B){var oDistance=this.Get_Distance();if(!AscFormat.isRealNumber(L))L=oDistance.L;if(!AscFormat.isRealNumber(T))T=oDistance.T;if(!AscFormat.isRealNumber(R))R=
oDistance.R;if(!AscFormat.isRealNumber(B))B=oDistance.B;History.Add(new CChangesParaDrawingDistance(this,{Left:this.Distance.L,Top:this.Distance.T,Right:this.Distance.R,Bottom:this.Distance.B},{Left:L,Top:T,Right:R,Bottom:B}));this.Distance.L=L;this.Distance.R=R;this.Distance.T=T;this.Distance.B=B};ParaDrawing.prototype.Set_AllowOverlap=function(AllowOverlap){History.Add(new CChangesParaDrawingAllowOverlap(this,this.AllowOverlap,AllowOverlap));this.AllowOverlap=AllowOverlap};ParaDrawing.prototype.Set_PositionH=
function(RelativeFrom,Align,Value,Percent){var _Value,_Percent;if(AscFormat.isRealNumber(Value)&&AscFormat.fApproxEqual(Value,0)&&true===Percent){_Value=0;_Percent=false}else{_Value=Value;_Percent=Percent}History.Add(new CChangesParaDrawingPositionH(this,{RelativeFrom:this.PositionH.RelativeFrom,Align:this.PositionH.Align,Value:this.PositionH.Value,Percent:this.PositionH.Percent},{RelativeFrom:RelativeFrom,Align:Align,Value:_Value,Percent:_Percent}));this.PositionH.RelativeFrom=RelativeFrom;this.PositionH.Align=
Align;this.PositionH.Value=_Value;this.PositionH.Percent=_Percent};ParaDrawing.prototype.Set_PositionV=function(RelativeFrom,Align,Value,Percent){var _Value,_Percent;if(AscFormat.isRealNumber(Value)&&AscFormat.fApproxEqual(Value,0)&&true===Percent){_Value=0;_Percent=false}else{_Value=Value;_Percent=Percent}History.Add(new CChangesParaDrawingPositionV(this,{RelativeFrom:this.PositionV.RelativeFrom,Align:this.PositionV.Align,Value:this.PositionV.Value,Percent:this.PositionV.Percent},{RelativeFrom:RelativeFrom,
Align:Align,Value:_Value,Percent:_Percent}));this.PositionV.RelativeFrom=RelativeFrom;this.PositionV.Align=Align;this.PositionV.Value=_Value;this.PositionV.Percent=_Percent};ParaDrawing.prototype.GetPositionH=function(){return{RelativeFrom:this.PositionH.RelativeFrom,Align:this.PositionH.Align,Value:this.PositionH.Value,Percent:this.PositionH.Percent}};ParaDrawing.prototype.GetPositionV=function(){return{RelativeFrom:this.PositionV.RelativeFrom,Align:this.PositionV.Align,Value:this.PositionV.Value,
Percent:this.PositionV.Percent}};ParaDrawing.prototype.Set_BehindDoc=function(BehindDoc){History.Add(new CChangesParaDrawingBehindDoc(this,this.behindDoc,BehindDoc));this.behindDoc=BehindDoc};ParaDrawing.prototype.Set_GraphicObject=function(graphicObject){var oldId=AscCommon.isRealObject(this.GraphicObj)?this.GraphicObj.Get_Id():null;var newId=AscCommon.isRealObject(graphicObject)?graphicObject.Get_Id():null;History.Add(new CChangesParaDrawingGraphicObject(this,oldId,newId));if(graphicObject)graphicObject.handleUpdateExtents();
this.GraphicObj=graphicObject};ParaDrawing.prototype.setSimplePos=function(use,x,y){History.Add(new CChangesParaDrawingSimplePos(this,{Use:this.SimplePos.Use,X:this.SimplePos.X,Y:this.SimplePos.Y},{Use:use,X:x,Y:y}));this.SimplePos.Use=use;this.SimplePos.X=x;this.SimplePos.Y=y};ParaDrawing.prototype.setExtent=function(extX,extY){History.Add(new CChangesParaDrawingExtent(this,{W:this.Extent.W,H:this.Extent.H},{W:extX,H:extY}));this.Extent.W=extX;this.Extent.H=extY};ParaDrawing.prototype.addWrapPolygon=
function(wrapPolygon){History.Add(new CChangesParaDrawingWrapPolygon(this,this.wrappingPolygon,wrapPolygon));this.wrappingPolygon=wrapPolygon};ParaDrawing.prototype.Set_Locked=function(bLocked){History.Add(new CChangesParaDrawingLocked(this,this.Locked,bLocked));this.Locked=bLocked};ParaDrawing.prototype.Set_RelativeHeight=function(nRelativeHeight){History.Add(new CChangesParaDrawingRelativeHeight(this,this.RelativeHeight,nRelativeHeight));this.Set_RelativeHeight2(nRelativeHeight)};ParaDrawing.prototype.Set_RelativeHeight2=
function(nRelativeHeight){this.RelativeHeight=nRelativeHeight;if(this.graphicObjects&&AscFormat.isRealNumber(nRelativeHeight)&&nRelativeHeight>this.graphicObjects.maximalGraphicObjectZIndex)this.graphicObjects.maximalGraphicObjectZIndex=nRelativeHeight};ParaDrawing.prototype.setEffectExtent=function(L,T,R,B){var oEE=this.EffectExtent;History.Add(new CChangesParaDrawingEffectExtent(this,{L:oEE.L,T:oEE.T,R:oEE.R,B:oEE.B},{L:L,T:T,R:R,B:B}));this.EffectExtent.L=L;this.EffectExtent.T=T;this.EffectExtent.R=
R;this.EffectExtent.B=B};ParaDrawing.prototype.Set_Parent=function(oParent){History.Add(new CChangesParaDrawingParent(this,this.Parent,oParent));this.Parent=oParent};ParaDrawing.prototype.IsWatermark=function(){if(!this.GraphicObj)return false;if(this.GraphicObj.getObjectType()!==AscDFH.historyitem_type_Shape&&this.GraphicObj.getObjectType()!==AscDFH.historyitem_type_ImageShape)return false;if(this.Is_Inline())return false;var oParagraph=this.GetParagraph();if(!(oParagraph instanceof Paragraph))return false;
var oContent=oParagraph.Parent;if(!oContent||oContent.Is_DrawingShape(false))return false;var oHdrFtr=oContent.IsHdrFtr(true);if(!oHdrFtr)return false;var oRun=this.Get_Run();if(!oRun)return false;var arrDocPos=oRun.GetDocumentPositionFromObject();for(var nIndex=0,nCount=arrDocPos.length;nIndex<nCount;++nIndex){var oClass=arrDocPos[nIndex].Class;var oSdt=null;if(oClass instanceof CDocumentContent&&oClass.Parent instanceof CBlockLevelSdt)oSdt=oClass.Parent;else if(oClass instanceof CInlineLevelSdt)oSdt=
oClass;if(oSdt){var oPr=oSdt.Pr;if(AscCommon.isRealObject(oPr)&&AscCommon.isRealObject(oPr.DocPartObj)&&oPr.DocPartObj.Gallery==="Watermarks")return true}}return false};ParaDrawing.prototype.Set_ParaMath=function(ParaMath){History.Add(new CChangesParaDrawingParaMath(this,this.ParaMath,ParaMath));this.ParaMath=ParaMath};ParaDrawing.prototype.Set_LayoutInCell=function(LayoutInCell){if(this.LayoutInCell===LayoutInCell)return;History.Add(new CChangesParaDrawingLayoutInCell(this,this.LayoutInCell,LayoutInCell));
this.LayoutInCell=LayoutInCell};ParaDrawing.prototype.SetSizeRelH=function(oSize){History.Add(new CChangesParaDrawingSizeRelH(this,this.SizeRelH,oSize));this.SizeRelH=oSize};ParaDrawing.prototype.SetSizeRelV=function(oSize){History.Add(new CChangesParaDrawingSizeRelV(this,this.SizeRelV,oSize));this.SizeRelV=oSize};ParaDrawing.prototype.getXfrmExtX=function(){if(AscCommon.isRealObject(this.GraphicObj)&&AscCommon.isRealObject(this.GraphicObj.spPr)&&AscCommon.isRealObject(this.GraphicObj.spPr.xfrm)&&
AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extX))return this.GraphicObj.spPr.xfrm.extX;if(AscFormat.isRealNumber(this.Extent.W))return this.Extent.W;return 0};ParaDrawing.prototype.getXfrmExtY=function(){if(AscCommon.isRealObject(this.GraphicObj)&&AscCommon.isRealObject(this.GraphicObj.spPr)&&AscCommon.isRealObject(this.GraphicObj.spPr.xfrm)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extY))return this.GraphicObj.spPr.xfrm.extY;if(AscFormat.isRealNumber(this.Extent.H))return this.Extent.H;
return 0};ParaDrawing.prototype.getXfrmRot=function(){if(AscCommon.isRealObject(this.GraphicObj)&&AscCommon.isRealObject(this.GraphicObj.spPr)&&AscCommon.isRealObject(this.GraphicObj.spPr.xfrm)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.rot))return this.GraphicObj.spPr.xfrm.rot;return 0};ParaDrawing.prototype.Get_Bounds=function(){var InsL,InsT,InsR,InsB;InsL=0;InsT=0;InsR=0;InsB=0;if(!this.Is_Inline()){var oDistance=this.Get_Distance();if(oDistance){InsL=oDistance.L;InsT=oDistance.T;InsR=
oDistance.R;InsB=oDistance.B}}var ExtX=this.getXfrmExtX();var ExtY=this.getXfrmExtY();var Rot=this.getXfrmRot();var X,Y,W,H;if(AscFormat.checkNormalRotate(Rot)){X=this.X;Y=this.Y;W=ExtX;H=ExtY}else{X=this.X+ExtX/2-ExtY/2;Y=this.Y+ExtY/2-ExtX/2;W=ExtY;H=ExtX}return{Left:X-this.EffectExtent.L-InsL,Top:Y-this.EffectExtent.T-InsT,Bottom:Y+H+this.EffectExtent.B+InsB,Right:X+W+this.EffectExtent.R+InsR}};ParaDrawing.prototype.Search=function(Str,Props,SearchEngine,Type){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.Search==="function")this.GraphicObj.Search(Str,Props,SearchEngine,Type)};ParaDrawing.prototype.Set_Props=function(Props){var bCheckWrapPolygon=false;var isPictureCC=false;var oRun=this.GetRun();if(oRun){var arrContentControls=oRun.GetParentContentControls();for(var nIndex=0,nCount=arrContentControls.length;nIndex<nCount;++nIndex)if(arrContentControls[nIndex].IsPicture()){isPictureCC=true;break}}if(undefined!=Props.WrappingStyle&&!isPictureCC){if(drawing_Inline===this.DrawingType&&
c_oAscWrapStyle2.Inline!=Props.WrappingStyle&&undefined===Props.Paddings)this.Set_Distance(3.2,0,3.2,0);this.Set_DrawingType(c_oAscWrapStyle2.Inline===Props.WrappingStyle?drawing_Inline:drawing_Anchor);if(c_oAscWrapStyle2.Inline===Props.WrappingStyle)if(AscCommon.isRealObject(this.GraphicObj.bounds)&&AscFormat.isRealNumber(this.GraphicObj.bounds.w)&&AscFormat.isRealNumber(this.GraphicObj.bounds.h))this.CheckWH();if(c_oAscWrapStyle2.Behind===Props.WrappingStyle||c_oAscWrapStyle2.InFront===Props.WrappingStyle){this.Set_WrappingType(WRAPPING_TYPE_NONE);
this.Set_BehindDoc(c_oAscWrapStyle2.Behind===Props.WrappingStyle?true:false)}else{switch(Props.WrappingStyle){case c_oAscWrapStyle2.Square:this.Set_WrappingType(WRAPPING_TYPE_SQUARE);break;case c_oAscWrapStyle2.Tight:{bCheckWrapPolygon=true;this.Set_WrappingType(WRAPPING_TYPE_TIGHT);break}case c_oAscWrapStyle2.Through:{this.Set_WrappingType(WRAPPING_TYPE_THROUGH);bCheckWrapPolygon=true;break}case c_oAscWrapStyle2.TopAndBottom:this.Set_WrappingType(WRAPPING_TYPE_TOP_AND_BOTTOM);break;default:this.Set_WrappingType(WRAPPING_TYPE_SQUARE);
break}this.Set_BehindDoc(false)}}if(undefined!=Props.Paddings)this.Set_Distance(Props.Paddings.Left,Props.Paddings.Top,Props.Paddings.Right,Props.Paddings.Bottom);if(undefined!=Props.AllowOverlap)this.Set_AllowOverlap(Props.AllowOverlap);if(undefined!=Props.PositionH)this.Set_PositionH(Props.PositionH.RelativeFrom,Props.PositionH.UseAlign,true===Props.PositionH.UseAlign?Props.PositionH.Align:Props.PositionH.Value,Props.PositionH.Percent);if(undefined!=Props.PositionV)this.Set_PositionV(Props.PositionV.RelativeFrom,
Props.PositionV.UseAlign,true===Props.PositionV.UseAlign?Props.PositionV.Align:Props.PositionV.Value,Props.PositionV.Percent);if(undefined!=Props.SizeRelH)this.SetSizeRelH({RelativeFrom:AscFormat.ConvertRelPositionHToRelSize(Props.SizeRelH.RelativeFrom),Percent:Props.SizeRelH.Value/100});if(undefined!=Props.SizeRelV)this.SetSizeRelV({RelativeFrom:AscFormat.ConvertRelPositionVToRelSize(Props.SizeRelV.RelativeFrom),Percent:Props.SizeRelV.Value/100});if(this.SizeRelH&&!this.SizeRelV)this.SetSizeRelV({RelativeFrom:AscCommon.c_oAscSizeRelFromV.sizerelfromvPage,
Percent:0});if(this.SizeRelV&&!this.SizeRelH)this.SetSizeRelH({RelativeFrom:AscCommon.c_oAscSizeRelFromH.sizerelfromhPage,Percent:0});if(bCheckWrapPolygon)this.Check_WrapPolygon();if(undefined!=Props.description)this.docPr.setDescr(Props.description);if(undefined!=Props.title)this.docPr.setTitle(Props.title)};ParaDrawing.prototype.CheckWH=function(){if(!this.GraphicObj)return;var oldExtW=this.Extent.W;var oldExtH=this.Extent.H;if(this.GraphicObj.spPr&&this.GraphicObj.spPr.xfrm&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extX)&&
AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extY)){this.Extent.W=this.GraphicObj.spPr.xfrm.extX;this.Extent.H=this.GraphicObj.spPr.xfrm.extY}this.GraphicObj.recalculate();this.Extent.W=oldExtW;this.Extent.H=oldExtH;var extX,extY,rot;if(this.GraphicObj.spPr&&this.GraphicObj.spPr.xfrm){if(AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extX)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extY)){extX=this.GraphicObj.spPr.xfrm.extX;extY=this.GraphicObj.spPr.xfrm.extY}else{extX=5;extY=5}if(AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.rot))rot=
this.GraphicObj.spPr.xfrm.rot;else rot=0}else{extX=5;extY=5;rot=0}this.setExtent(extX,extY);var EEL=0,EET=0,EER=0,EEB=0;{var xc=this.GraphicObj.localTransform.TransformPointX(this.GraphicObj.extX/2,this.GraphicObj.extY/2);var yc=this.GraphicObj.localTransform.TransformPointY(this.GraphicObj.extX/2,this.GraphicObj.extY/2);var oBounds=this.GraphicObj.bounds;var LineCorrect=0;if(this.GraphicObj.pen&&this.GraphicObj.pen.Fill&&this.GraphicObj.pen.Fill.fill){LineCorrect=this.GraphicObj.pen.w==null?12700:
parseInt(this.GraphicObj.pen.w);LineCorrect/=72E3}var l=oBounds.x;var r=l+oBounds.w;var t=oBounds.y;var b=t+oBounds.h;var startX,startY;if(!AscFormat.checkNormalRotate(rot)){var temp=extX;extX=extY;extY=temp}startX=xc-extX/2;startY=yc-extY/2;if(l>startX)l=startX;if(r<startX+extX)r=startX+extX;if(t>startY)t=startY;if(b<startY+extY)b=startY+extY;EEL=xc-extX/2-l+LineCorrect;EET=yc-extY/2-t+LineCorrect;EER=r+LineCorrect-(xc+extX/2);EEB=b+LineCorrect-(yc+extY/2)}this.setEffectExtent(EEL,EET,EER,EEB);this.Check_WrapPolygon()};
ParaDrawing.prototype.Check_WrapPolygon=function(){if((this.wrappingType===WRAPPING_TYPE_TIGHT||this.wrappingType===WRAPPING_TYPE_THROUGH)&&this.wrappingPolygon&&!this.wrappingPolygon.edited){this.GraphicObj.recalculate();this.wrappingPolygon.setArrRelPoints(this.wrappingPolygon.calculate(this.GraphicObj))}};ParaDrawing.prototype.Draw=function(X,Y,pGraphics,PDSE){var nPageIndex=null;if(AscCommon.isRealObject(PDSE))nPageIndex=PDSE.Page;if(pGraphics.Start_Command){pGraphics.m_aDrawings.push(new AscFormat.ParaDrawingStruct(undefined,
this));return}if(this.Is_Inline()){pGraphics.shapePageIndex=nPageIndex;this.draw(pGraphics,PDSE);pGraphics.shapePageIndex=null}if(pGraphics.End_Command)pGraphics.End_Command()};ParaDrawing.prototype.Measure=function(){if(!this.GraphicObj){this.Width=0;this.Height=0;return}if(AscFormat.isRealNumber(this.Extent.W)&&AscFormat.isRealNumber(this.Extent.H)&&(!this.GraphicObj.checkAutofit||!this.GraphicObj.checkAutofit())&&!this.SizeRelH&&!this.SizeRelV){var oEffectExtent=this.EffectExtent;var W,H;if(AscFormat.isRealNumber(this.GraphicObj.rot))if(AscFormat.checkNormalRotate(this.GraphicObj.rot)){W=
this.Extent.W;H=this.Extent.H}else{W=this.Extent.H;H=this.Extent.W}else{W=this.Extent.W;H=this.Extent.H}this.Width=W+AscFormat.getValOrDefault(oEffectExtent.L,0)+AscFormat.getValOrDefault(oEffectExtent.R,0);this.Height=H+AscFormat.getValOrDefault(oEffectExtent.T,0)+AscFormat.getValOrDefault(oEffectExtent.B,0);this.WidthVisible=this.Width}else{this.GraphicObj.recalculate();if(this.GraphicObj.recalculateText)this.GraphicObj.recalculateText();if(this.PositionH.UseAlign||this.Is_Inline())this.Width=this.GraphicObj.bounds.w;
else this.Width=this.GraphicObj.extX;this.WidthVisible=this.Width;if(this.PositionV.UseAlign||this.Is_Inline())this.Height=this.GraphicObj.bounds.h;else this.Height=this.GraphicObj.extY}};ParaDrawing.prototype.SaveRecalculateObject=function(Copy){var DrawingObj={};DrawingObj.Type=this.Type;DrawingObj.DrawingType=this.DrawingType;DrawingObj.WrappingType=this.wrappingType;if(drawing_Anchor===this.Get_DrawingType()&&true===this.Use_TextWrap()){var oDistance=this.Get_Distance();DrawingObj.FlowPos={X:this.X-
oDistance.L,Y:this.Y-oDistance.T,W:this.Width+oDistance.R,H:this.Height+oDistance.B}}DrawingObj.PageNum=this.PageNum;DrawingObj.X=this.X;DrawingObj.Y=this.Y;DrawingObj.spRecaclcObject=this.GraphicObj.getRecalcObject();return DrawingObj};ParaDrawing.prototype.LoadRecalculateObject=function(RecalcObj){this.updatePosition3(RecalcObj.PageNum,RecalcObj.X,RecalcObj.Y);this.GraphicObj.setRecalcObject(RecalcObj.spRecaclcObject)};ParaDrawing.prototype.Reassign_ImageUrls=function(mapUrls){if(this.GraphicObj)this.GraphicObj.Reassign_ImageUrls(mapUrls)};
ParaDrawing.prototype.PrepareRecalculateObject=function(){};ParaDrawing.prototype.Is_RealContent=function(){return true};ParaDrawing.prototype.Can_AddNumbering=function(){if(drawing_Inline===this.DrawingType)return true;return false};ParaDrawing.prototype.Copy=function(oPr){var c=new ParaDrawing(this.Extent.W,this.Extent.H,null,editor.WordControl.m_oLogicDocument.DrawingDocument,null,null);c.Set_DrawingType(this.DrawingType);if(AscCommon.isRealObject(this.GraphicObj)){var oCopyPr=new AscFormat.CCopyObjectProperties;
oCopyPr.contentCopyPr=oPr;c.Set_GraphicObject(this.GraphicObj.copy(oCopyPr));c.GraphicObj.setParent(c)}var d=this.Distance;c.Set_PositionH(this.PositionH.RelativeFrom,this.PositionH.Align,this.PositionH.Value,this.PositionH.Percent);c.Set_PositionV(this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent);c.Set_Distance(d.L,d.T,d.R,d.B);c.Set_AllowOverlap(this.AllowOverlap);c.Set_WrappingType(this.wrappingType);if(this.wrappingPolygon)c.wrappingPolygon.fromOther(this.wrappingPolygon);
c.Set_BehindDoc(this.behindDoc);c.Set_RelativeHeight(this.RelativeHeight);if(this.SizeRelH)c.SetSizeRelH({RelativeFrom:this.SizeRelH.RelativeFrom,Percent:this.SizeRelH.Percent});if(this.SizeRelV)c.SetSizeRelV({RelativeFrom:this.SizeRelV.RelativeFrom,Percent:this.SizeRelV.Percent});if(AscFormat.isRealNumber(this.Extent.W)&&AscFormat.isRealNumber(this.Extent.H))c.setExtent(this.Extent.W,this.Extent.H);var EE=this.EffectExtent;if(EE.L>0||EE.T>0||EE.R>0||EE.B>0)c.setEffectExtent(EE.L,EE.T,EE.R,EE.B);
c.docPr.setFromOther(this.docPr);if(this.ParaMath)c.Set_ParaMath(this.ParaMath.Copy());return c};ParaDrawing.prototype.IsEqual=function(oElement){return false};ParaDrawing.prototype.Get_Id=function(){return this.Id};ParaDrawing.prototype.GetId=function(){return this.Id};ParaDrawing.prototype.setParagraphTabs=function(tabs){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphTabs==="function")this.GraphicObj.setParagraphTabs(tabs)};ParaDrawing.prototype.IsMovingTableBorder=
function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.IsMovingTableBorder==="function")return this.GraphicObj.IsMovingTableBorder();return false};ParaDrawing.prototype.SetVerticalClip=function(Top,Bottom){this.LineTop=Top;this.LineBottom=Bottom};ParaDrawing.prototype.Update_Position=function(Paragraph,ParaLayout,PageLimits,PageLimitsOrigin,LineNum){if(undefined!=this.PositionH_Old){this.PositionH.RelativeFrom=this.PositionH_Old.RelativeFrom2;this.PositionH.Align=this.PositionH_Old.Align2;
this.PositionH.Value=this.PositionH_Old.Value2;this.PositionH.Percent=this.PositionH_Old.Percent2}if(undefined!=this.PositionV_Old){this.PositionV.RelativeFrom=this.PositionV_Old.RelativeFrom2;this.PositionV.Align=this.PositionV_Old.Align2;this.PositionV.Value=this.PositionV_Old.Value2;this.PositionV.Percent=this.PositionV_Old.Percent2}var oDocumentContent=this.Parent&&this.Parent.Parent;if(oDocumentContent&&oDocumentContent.IsBlockLevelSdtContent())oDocumentContent=oDocumentContent.Parent.Parent;
this.Parent=Paragraph;this.DocumentContent=oDocumentContent;var PageNum=ParaLayout.PageNum;var OtherFlowObjects=editor.WordControl.m_oLogicDocument.DrawingObjects.getAllFloatObjectsOnPage(PageNum,this.Parent.Parent);var bInline=this.Is_Inline();this.Internal_Position.Set(this.GraphicObj.extX,this.GraphicObj.extY,this.getXfrmRot(),this.EffectExtent,this.YOffset,ParaLayout,PageLimits);this.Internal_Position.Calculate_X(bInline,this.PositionH.RelativeFrom,this.PositionH.Align,this.PositionH.Value,this.PositionH.Percent);
this.Internal_Position.Calculate_Y(bInline,this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent);var bCorrect=false;if(oDocumentContent&&oDocumentContent.IsTableCellContent&&oDocumentContent.IsTableCellContent(false))bCorrect=true;if(this.PositionH.RelativeFrom!==c_oAscRelativeFromH.Page||this.PositionV.RelativeFrom!==c_oAscRelativeFromV.Page)bCorrect=true;this.Internal_Position.Correct_Values(bInline,PageLimits,this.AllowOverlap,this.Use_TextWrap(),OtherFlowObjects,
bCorrect);this.GraphicObj.bounds.l=this.GraphicObj.bounds.x+this.Internal_Position.CalcX;this.GraphicObj.bounds.r=this.GraphicObj.bounds.x+this.GraphicObj.bounds.w+this.Internal_Position.CalcX;this.GraphicObj.bounds.t=this.GraphicObj.bounds.y+this.Internal_Position.CalcY;this.GraphicObj.bounds.b=this.GraphicObj.bounds.y+this.GraphicObj.bounds.h+this.Internal_Position.CalcY;var OldPageNum=this.PageNum;this.PageNum=PageNum;this.LineNum=LineNum;this.X=this.Internal_Position.CalcX;this.Y=this.Internal_Position.CalcY;
if(undefined!=this.PositionH_Old){this.PositionH.RelativeFrom=this.PositionH_Old.RelativeFrom;this.PositionH.Align=this.PositionH_Old.Align;this.PositionH.Value=this.PositionH_Old.Value;this.PositionH.Percent=this.PositionH_Old.Percent;var Value=this.Internal_Position.Calculate_X_Value(this.PositionH_Old.RelativeFrom);this.Set_PositionH(this.PositionH_Old.RelativeFrom,false,Value,false);this.X=this.Internal_Position.Calculate_X(bInline,this.PositionH.RelativeFrom,this.PositionH.Align,this.PositionH.Value,
this.PositionH.Percent)}if(undefined!=this.PositionV_Old){this.PositionV.RelativeFrom=this.PositionV_Old.RelativeFrom;this.PositionV.Align=this.PositionV_Old.Align;this.PositionV.Value=this.PositionV_Old.Value;this.PositionV.Percent=this.PositionV_Old.Percent;var Value=this.Internal_Position.Calculate_Y_Value(this.PositionV_Old.RelativeFrom);this.Set_PositionV(this.PositionV_Old.RelativeFrom,false,Value,false);this.Y=this.Internal_Position.Calculate_Y(bInline,this.PositionV.RelativeFrom,this.PositionV.Align,
this.PositionV.Value,this.PositionV.Percent)}this.OrigX=this.X;this.OrigY=this.Y;this.ShiftX=0;this.ShiftY=0;this.updatePosition3(this.PageNum,this.X,this.Y,OldPageNum);this.useWrap=this.Use_TextWrap()};ParaDrawing.prototype.GetClipRect=function(){if(this.Is_Inline()||this.Use_TextWrap()){var oCell;if(this.DocumentContent&&(oCell=this.DocumentContent.IsTableCellContent(true))){var arrPages=oCell.GetCurPageByAbsolutePage(this.PageNum);for(var nIndex=0,nCount=arrPages.length;nIndex<nCount;++nIndex){var oPageBounds=
oCell.GetPageBounds(arrPages[nIndex]);if(this.GraphicObj.bounds.isIntersect(oPageBounds.Left,oPageBounds.Top,oPageBounds.Right,oPageBounds.Bottom))return new AscFormat.CGraphicBounds(oPageBounds.Left,oPageBounds.Top,oPageBounds.Right,oPageBounds.Bottom)}}}return null};ParaDrawing.prototype.Update_PositionYHeaderFooter=function(TopMarginY,BottomMarginY){this.Internal_Position.Update_PositionYHeaderFooter(TopMarginY,BottomMarginY);this.Internal_Position.Calculate_Y(this.Is_Inline(),this.PositionV.RelativeFrom,
this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent);this.OrigY=this.Internal_Position.CalcY;this.Y=this.OrigY+this.ShiftY;this.updatePosition3(this.PageNum,this.X,this.Y,this.PageNum)};ParaDrawing.prototype.Reset_SavedPosition=function(){this.PositionV_Old=undefined;this.PositionH_Old=undefined};ParaDrawing.prototype.setParagraphBorders=function(val){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphBorders==="function")this.GraphicObj.setParagraphBorders(val)};
ParaDrawing.prototype.deselect=function(){this.selected=false;if(this.GraphicObj&&this.GraphicObj.deselect)this.GraphicObj.deselect()};ParaDrawing.prototype.updatePosition3=function(pageIndex,x,y,oldPageNum){var _x=x,_y=y;this.graphicObjects.removeById(pageIndex,this.Get_Id());if(AscFormat.isRealNumber(oldPageNum))this.graphicObjects.removeById(oldPageNum,this.Get_Id());var bChangePageIndex=this.pageIndex!==pageIndex;this.setPageIndex(pageIndex);if(typeof this.GraphicObj.setStartPage==="function"){var bIsHfdFtr=
this.DocumentContent&&this.DocumentContent.IsHdrFtr();this.GraphicObj.setStartPage(pageIndex,bIsHfdFtr,bIsHfdFtr||bChangePageIndex)}if(!(this.DocumentContent&&this.DocumentContent.IsHdrFtr()&&this.DocumentContent.Get_StartPage_Absolute()!==pageIndex)){this.graphicObjects.addObjectOnPage(pageIndex,this.GraphicObj);this.bNoNeedToAdd=false}else this.bNoNeedToAdd=true;if(this.GraphicObj.bNeedUpdatePosition||!(AscFormat.isRealNumber(this.GraphicObj.posX)&&AscFormat.isRealNumber(this.GraphicObj.posY))||
!(Math.abs(this.GraphicObj.posX-_x)<MOVE_DELTA&&Math.abs(this.GraphicObj.posY-_y)<MOVE_DELTA))this.GraphicObj.updatePosition(_x,_y);if(this.GraphicObj.bNeedUpdatePosition||!(AscFormat.isRealNumber(this.wrappingPolygon.posX)&&AscFormat.isRealNumber(this.wrappingPolygon.posY))||!(Math.abs(this.wrappingPolygon.posX-_x)<MOVE_DELTA&&Math.abs(this.wrappingPolygon.posY-_y)<MOVE_DELTA))this.wrappingPolygon.updatePosition(_x,_y);this.calculateSnapArrays()};ParaDrawing.prototype.calculateAfterChangeTheme=function(){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.calculateAfterChangeTheme==="function")this.GraphicObj.calculateAfterChangeTheme()};ParaDrawing.prototype.selectionIsEmpty=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.selectionIsEmpty==="function")return this.GraphicObj.selectionIsEmpty();return false};ParaDrawing.prototype.recalculateDocContent=function(){};ParaDrawing.prototype.Shift=function(Dx,Dy){this.ShiftX=Dx;this.ShiftY=Dy;this.X=this.OrigX+Dx;this.Y=this.OrigY+Dy;this.updatePosition3(this.PageNum,
this.X,this.Y)};ParaDrawing.prototype.IsLayoutInCell=function(){if(this.LogicDocument&&this.LogicDocument.GetCompatibilityMode()>=AscCommon.document_compatibility_mode_Word15)return true;return this.LayoutInCell};ParaDrawing.prototype.Get_Distance=function(){var oDist=this.Distance;return new AscFormat.CDistance(AscFormat.getValOrDefault(oDist.L,AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT),AscFormat.getValOrDefault(oDist.T,0),AscFormat.getValOrDefault(oDist.R,AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT),AscFormat.getValOrDefault(oDist.B,
0))};ParaDrawing.prototype.Set_XYForAdd=function(X,Y,NearPos,PageNum){if(null!==NearPos){var Layout=NearPos.Paragraph.Get_Layout(NearPos.ContentPos,this);this.private_SetXYByLayout(X,Y,PageNum,Layout,true,true);var nRecalcIndex=null;var oLogicDocument=this.document;if(oLogicDocument){nRecalcIndex=oLogicDocument.Get_History().GetRecalculateIndex();this.SetSkipOnRecalculate(true);oLogicDocument.TurnOff_InterfaceEvents();oLogicDocument.Recalculate();oLogicDocument.TurnOn_InterfaceEvents(false);this.SetSkipOnRecalculate(false)}if(null!==
nRecalcIndex)oLogicDocument.Get_History().SetRecalculateIndex(nRecalcIndex);Layout=NearPos.Paragraph.Get_Layout(NearPos.ContentPos,this);this.private_SetXYByLayout(X,Y,PageNum,Layout,true,true)}};ParaDrawing.prototype.SetSkipOnRecalculate=function(isSkip){this.SkipOnRecalculate=isSkip};ParaDrawing.prototype.IsSkipOnRecalculate=function(){return this.SkipOnRecalculate};ParaDrawing.prototype.Set_XY=function(X,Y,Paragraph,PageNum,bResetAlign){if(Paragraph){var PageNumOld=this.PageNum;var ContentPos=
Paragraph.Get_DrawingObjectContentPos(this.Get_Id());if(null===ContentPos)return;var Layout=Paragraph.Get_Layout(ContentPos,this);this.private_SetXYByLayout(X,Y,PageNum,Layout,bResetAlign||true!==this.PositionH.Align?true:false,bResetAlign||true!==this.PositionV.Align?true:false);var nRecalcIndex=null;var oLogicDocument=this.document;if(oLogicDocument){nRecalcIndex=oLogicDocument.Get_History().GetRecalculateIndex();this.SetSkipOnRecalculate(true);oLogicDocument.Recalculate();this.SetSkipOnRecalculate(false)}if(null!==
nRecalcIndex)oLogicDocument.Get_History().SetRecalculateIndex(nRecalcIndex);if(!this.LogicDocument||null===this.LogicDocument.FullRecalc.Id||PageNum<this.LogicDocument.FullRecalc.PageIndex&&PageNumOld<this.LogicDocument.FullRecalc.PageIndex)Layout=Paragraph.Get_Layout(ContentPos,this);this.private_SetXYByLayout(X,Y,PageNum,Layout,bResetAlign||true!==this.PositionH.Align?true:false,bResetAlign||true!==this.PositionV.Align?true:false)}};ParaDrawing.prototype.private_SetXYByLayout=function(X,Y,PageNum,
Layout,bChangeX,bChangeY){if(!Layout)return;this.PageNum=PageNum;this.Internal_Position.Set(this.GraphicObj.extX,this.GraphicObj.extY,this.getXfrmRot(),this.EffectExtent,this.YOffset,Layout.ParagraphLayout,Layout.PageLimitsOrigin);this.Internal_Position.Calculate_X(false,c_oAscRelativeFromH.Page,false,X-Layout.PageLimitsOrigin.X,false);this.Internal_Position.Calculate_Y(false,c_oAscRelativeFromV.Page,false,Y-Layout.PageLimitsOrigin.Y,false);var bCorrect=false;if(this.DocumentContent&&this.DocumentContent.IsTableCellContent&&
this.DocumentContent.IsTableCellContent(false))bCorrect=true;if(this.PositionH.RelativeFrom!==c_oAscRelativeFromH.Page||this.PositionV.RelativeFrom!==c_oAscRelativeFromV.Page)bCorrect=true;this.Internal_Position.Correct_Values(false,Layout.PageLimits,this.AllowOverlap,this.Use_TextWrap(),[],bCorrect);if(true===bChangeX){this.X=this.Internal_Position.CalcX;var ValueX=this.Internal_Position.Calculate_X_Value(this.PositionH.RelativeFrom);this.Set_PositionH(this.PositionH.RelativeFrom,false,ValueX,false);
this.X=this.Internal_Position.Calculate_X(false,this.PositionH.RelativeFrom,this.PositionH.Align,this.PositionH.Value,this.PositionH.Percent)}if(true===bChangeY){this.Y=this.Internal_Position.CalcY;var ValueY=this.Internal_Position.Calculate_Y_Value(this.PositionV.RelativeFrom);this.Set_PositionV(this.PositionV.RelativeFrom,false,ValueY,false);this.Y=this.Internal_Position.Calculate_Y(false,this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent)}};ParaDrawing.prototype.Get_DrawingType=
function(){return this.DrawingType};ParaDrawing.prototype.Is_Inline=function(){if(this.Parent&&this.Parent.Get_ParentTextTransform&&this.Parent.Get_ParentTextTransform())return true;return drawing_Inline===this.DrawingType?true:false};ParaDrawing.prototype.IsInline=function(){return this.Is_Inline()};ParaDrawing.prototype.Use_TextWrap=function(){if(!this.Parent||!this.Parent.Get_FramePr||null!==this.Parent.Get_FramePr()&&undefined!==this.Parent.Get_FramePr())return false;return drawing_Anchor===this.DrawingType&&
!(this.wrappingType===WRAPPING_TYPE_NONE)};ParaDrawing.prototype.IsUseTextWrap=function(){return this.Use_TextWrap()};ParaDrawing.prototype.Draw_Selection=function(){var Padding=this.DrawingDocument.GetMMPerDot(6);var extX,extY;if(this.GraphicObj){extX=this.GraphicObj.extX;extY=this.GraphicObj.extY}else{extX=this.getXfrmExtX();extY=this.getXfrmExtY()}var rot=this.getXfrmRot();if(AscFormat.checkNormalRotate(rot))this.DrawingDocument.AddPageSelection(this.PageNum,this.X-this.EffectExtent.L-Padding,
this.Y-this.EffectExtent.T-Padding,this.EffectExtent.L+extX+this.EffectExtent.R+2*Padding,this.EffectExtent.T+extY+this.EffectExtent.B+2*Padding);else this.DrawingDocument.AddPageSelection(this.PageNum,this.X+extX/2-extY/2-this.EffectExtent.L-Padding,this.Y+extY/2-extX/2-this.EffectExtent.T-Padding,this.EffectExtent.L+extY+this.EffectExtent.R+2*Padding,this.EffectExtent.T+extX+this.EffectExtent.B+2*Padding)};ParaDrawing.prototype.CanInsertToPos=function(oAnchorPos){if(!oAnchorPos||!oAnchorPos.Paragraph||
!oAnchorPos.Paragraph.Parent)return false;return!((this.IsShape()||this.IsGroup())&&(true===oAnchorPos.Paragraph.Parent.Is_DrawingShape()||true===oAnchorPos.Paragraph.Parent.IsFootnote()))};ParaDrawing.prototype.OnEnd_MoveInline=function(NearPos){if(!this.Parent)return;NearPos.Paragraph.Check_NearestPos(NearPos);var oRun=this.GetRun();var oPictureCC=false;if(oRun){var arrContentControls=oRun.GetParentContentControls();for(var nIndex=arrContentControls.length-1;nIndex>=0;--nIndex)if(arrContentControls[nIndex].IsPicture()){oPictureCC=
arrContentControls[nIndex];break}}var oDstRun=null;var arrClasses=NearPos.Paragraph.GetClassesByPos(NearPos.ContentPos);for(var nIndex=arrClasses.length-1;nIndex>=0;--nIndex)if(arrClasses[nIndex]instanceof ParaRun){oDstRun=arrClasses[nIndex];break}if(!oDstRun||oPictureCC&&oDstRun===oRun||oDstRun.GetParentForm()){NearPos.Paragraph.Clear_NearestPosArray();return}var NewParaDrawing=this.Copy();var RunPr=this.Remove_FromDocument(false);this.DocumentContent.Select_DrawingObject(NewParaDrawing.GetId());
NewParaDrawing.Add_ToDocument(NearPos,true,RunPr,undefined,oPictureCC)};ParaDrawing.prototype.Get_ParentTextTransform=function(){if(this.Parent)return this.Parent.Get_ParentTextTransform();return null};ParaDrawing.prototype.GoTo_Text=function(bBefore,bUpdateStates){var Paragraph=this.Get_ParentParagraph();if(Paragraph){Paragraph.MoveCursorToDrawing(this.Id,bBefore);Paragraph.Document_SetThisElementCurrent(undefined===bUpdateStates?true:bUpdateStates)}};ParaDrawing.prototype.Remove_FromDocument=function(bRecalculate){var oResult=
null;if(!this.Parent)return oResult;var oRun=this.Parent.Get_DrawingObjectRun(this.Id);if(oRun){var oGrObject=this.GraphicObj;if(oGrObject&&oGrObject.getObjectType()===AscDFH.historyitem_type_Shape)if(oGrObject.signatureLine)oGrObject.setSignature(oGrObject.signatureLine);var oPictureCC=null;var arrContentControls=oRun.GetParentContentControls();for(var nIndex=arrContentControls.length-1;nIndex>=0;--nIndex)if(arrContentControls[nIndex].IsPicture()){oPictureCC=arrContentControls[nIndex];break}if(oPictureCC)oPictureCC.RemoveContentControlWrapper();
oRun.Remove_DrawingObject(this.Id);if(oRun.IsInHyperlink())oResult=new CTextPr;else oResult=oRun.GetTextPr();if(oGrObject&&oGrObject.getObjectType()===AscDFH.historyitem_type_Shape)if(oGrObject.signatureLine){editor.sendEvent("asc_onRemoveSignature",oGrObject.signatureLine.id);oGrObject.setSignature(oGrObject.signatureLine)}}if(false!=bRecalculate)editor.WordControl.m_oLogicDocument.Recalculate();return oResult};ParaDrawing.prototype.Get_ParentParagraph=function(){if(this.Parent instanceof Paragraph)return this.Parent;
if(this.Parent instanceof ParaRun)return this.Parent.Paragraph;if(this.Parent&&this.Parent.GetParagraph())return this.Parent.GetParagraph();return null};ParaDrawing.prototype.SelectAsText=function(){var oParagraph=this.GetParagraph();var oRun=this.GetRun();if(!oParagraph||!oRun)return;var oDocument=oParagraph.GetLogicDocument();if(!oDocument)return;oDocument.RemoveSelection();oRun.Make_ThisElementCurrent(false);oRun.SetCursorPosition(oRun.GetElementPosition(this));var oStartPos=oDocument.GetContentPosition(false);
oRun.SetCursorPosition(oRun.GetElementPosition(this)+1);var oEndPos=oDocument.GetContentPosition(false);oDocument.RemoveSelection();oDocument.SetSelectionByContentPositions(oStartPos,oEndPos)};ParaDrawing.prototype.Add_ToDocument=function(NearPos,bRecalculate,RunPr,Run,oPictureCC){NearPos.Paragraph.Check_NearestPos(NearPos);var LogicDocument=this.DrawingDocument.m_oLogicDocument;var Para=new Paragraph(this.DrawingDocument,LogicDocument);var DrawingRun=new ParaRun(Para);DrawingRun.Add_ToContent(0,
this);if(RunPr)DrawingRun.Set_Pr(RunPr.Copy());if(Run)DrawingRun.SetReviewTypeWithInfo(Run.GetReviewType(),Run.GetReviewInfo());if(oPictureCC){var oSdt=new CInlineLevelSdt;oSdt.SetPicturePr(true);oSdt.ReplacePlaceHolderWithContent();oSdt.AddToContent(0,DrawingRun);Para.Add_ToContent(0,oSdt);var oFormPr=oPictureCC.GetFormPr();if(oFormPr)oSdt.SetFormPr(oFormPr.Copy())}else Para.Add_ToContent(0,DrawingRun);var SelectedElement=new CSelectedElement(Para,false);var SelectedContent=new CSelectedContent;
SelectedContent.Add(SelectedElement);SelectedContent.SetMoveDrawing(true);SelectedContent.DrawingObjects.push(this);NearPos.Paragraph.Parent.InsertContent(SelectedContent,NearPos);NearPos.Paragraph.Clear_NearestPosArray();NearPos.Paragraph.Correct_Content();this.Set_Parent(NearPos.Paragraph);if(false!=bRecalculate)LogicDocument.Recalculate()};ParaDrawing.prototype.Add_ToDocument2=function(Paragraph){var DrawingRun=new ParaRun(Paragraph);DrawingRun.Add_ToContent(0,this);Paragraph.Add_ToContent(0,DrawingRun);
this.Set_Parent(Paragraph)};ParaDrawing.prototype.UpdateCursorType=function(X,Y,PageIndex){this.DrawingDocument.SetCursorType("move",new AscCommon.CMouseMoveData);if(null!=this.Parent){var Lock=this.Parent.Lock;if(true===Lock.Is_Locked()){var PNum=Math.max(0,Math.min(PageIndex-this.Parent.PageNum,this.Parent.Pages.length-1));var _X=this.Parent.Pages[PNum].X;var _Y=this.Parent.Pages[PNum].Y;var MMData=new AscCommon.CMouseMoveData;var Coords=this.DrawingDocument.ConvertCoordsToCursorWR(_X,_Y,this.Parent.Get_StartPage_Absolute()+
(PageIndex-this.Parent.PageNum));MMData.X_abs=Coords.X-5;MMData.Y_abs=Coords.Y;MMData.Type=Asc.c_oAscMouseMoveDataTypes.LockedObject;MMData.UserId=Lock.Get_UserId();MMData.HaveChanges=Lock.Have_Changes();MMData.LockedObjectType=c_oAscMouseMoveLockedObjectType.Common;editor.sync_MouseMoveCallback(MMData)}}};ParaDrawing.prototype.Get_AnchorPos=function(){if(!this.Parent)return null;return this.Parent.Get_AnchorPos(this)};ParaDrawing.prototype.CheckRecalcAutoFit=function(oSectPr){if(this.GraphicObj&&
this.GraphicObj.CheckNeedRecalcAutoFit)if(this.GraphicObj.CheckNeedRecalcAutoFit(oSectPr)){if(this.GraphicObj)this.GraphicObj.recalcWrapPolygon&&this.GraphicObj.recalcWrapPolygon();this.Measure()}};ParaDrawing.prototype.Get_ParentObject_or_DocumentPos=function(){if(this.Parent!=null)return this.Parent.Get_ParentObject_or_DocumentPos()};ParaDrawing.prototype.Refresh_RecalcData=function(Data){var oRun=this.GetRun();if(oRun){if(AscCommon.isRealObject(Data))switch(Data.Type){case AscDFH.historyitem_Drawing_Distance:{if(this.GraphicObj){this.GraphicObj.recalcWrapPolygon&&
this.GraphicObj.recalcWrapPolygon();this.GraphicObj.addToRecalculate()}break}case AscDFH.historyitem_Drawing_SetExtent:{oRun.RecalcInfo.Measure=true;break}case AscDFH.historyitem_Drawing_SetSizeRelH:case AscDFH.historyitem_Drawing_SetSizeRelV:case AscDFH.historyitem_Drawing_SetGraphicObject:{if(this.GraphicObj){this.GraphicObj.handleUpdateExtents&&this.GraphicObj.handleUpdateExtents();this.GraphicObj.addToRecalculate()}oRun.RecalcInfo.Measure=true;break}case AscDFH.historyitem_Drawing_WrappingType:{if(this.GraphicObj){this.GraphicObj.recalcWrapPolygon&&
this.GraphicObj.recalcWrapPolygon();this.GraphicObj.addToRecalculate()}break}}return oRun.Refresh_RecalcData2()}};ParaDrawing.prototype.Refresh_RecalcData2=function(Data){var oRun=this.GetRun();if(oRun)return oRun.Refresh_RecalcData2()};ParaDrawing.prototype.hyperlinkCheck=function(bCheck){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkCheck==="function")return this.GraphicObj.hyperlinkCheck(bCheck);return null};ParaDrawing.prototype.hyperlinkCanAdd=function(bCheckInHyperlink){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.hyperlinkCanAdd==="function")return this.GraphicObj.hyperlinkCanAdd(bCheckInHyperlink);return false};ParaDrawing.prototype.hyperlinkRemove=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkCanAdd==="function")return this.GraphicObj.hyperlinkRemove();return false};ParaDrawing.prototype.hyperlinkModify=function(HyperProps){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkModify==="function")return this.GraphicObj.hyperlinkModify(HyperProps)};
ParaDrawing.prototype.hyperlinkAdd=function(HyperProps){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkAdd==="function")return this.GraphicObj.hyperlinkAdd(HyperProps)};ParaDrawing.prototype.documentStatistics=function(stat){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.documentStatistics==="function")this.GraphicObj.documentStatistics(stat)};ParaDrawing.prototype.documentCreateFontCharMap=function(fontMap){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.documentCreateFontCharMap==="function")this.GraphicObj.documentCreateFontCharMap(fontMap)};ParaDrawing.prototype.documentCreateFontMap=function(fontMap){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.documentCreateFontMap==="function")this.GraphicObj.documentCreateFontMap(fontMap)};ParaDrawing.prototype.tableCheckSplit=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableCheckSplit==="function")return this.GraphicObj.tableCheckSplit();
return false};ParaDrawing.prototype.tableCheckMerge=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableCheckMerge==="function")return this.GraphicObj.tableCheckMerge();return false};ParaDrawing.prototype.tableSelect=function(Type){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableSelect==="function")return this.GraphicObj.tableSelect(Type)};ParaDrawing.prototype.tableRemoveTable=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableRemoveTable===
"function")return this.GraphicObj.tableRemoveTable()};ParaDrawing.prototype.tableSplitCell=function(Cols,Rows){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableSplitCell==="function")return this.GraphicObj.tableSplitCell(Cols,Rows)};ParaDrawing.prototype.tableMergeCells=function(Cols,Rows){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableMergeCells==="function")return this.GraphicObj.tableMergeCells(Cols,Rows)};ParaDrawing.prototype.tableRemoveCol=function(){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.tableRemoveCol==="function")return this.GraphicObj.tableRemoveCol()};ParaDrawing.prototype.tableAddCol=function(bBefore,nCount){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableAddCol==="function")return this.GraphicObj.tableAddCol(bBefore,nCount)};ParaDrawing.prototype.tableRemoveRow=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableRemoveRow==="function")return this.GraphicObj.tableRemoveRow()};ParaDrawing.prototype.tableAddRow=
function(bBefore,nCount){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableAddRow==="function")return this.GraphicObj.tableAddRow(bBefore,nCount)};ParaDrawing.prototype.getCurrentParagraph=function(bIgnoreSelection,arrSelectedParagraphs){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getCurrentParagraph==="function")return this.GraphicObj.getCurrentParagraph(bIgnoreSelection,arrSelectedParagraphs);if(this.Parent instanceof Paragraph)return this.Parent};ParaDrawing.prototype.GetSelectedText=
function(bClearText,oPr){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.GetSelectedText==="function")return this.GraphicObj.GetSelectedText(bClearText,oPr);return""};ParaDrawing.prototype.getCurPosXY=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getCurPosXY==="function")return this.GraphicObj.getCurPosXY();return{X:0,Y:0}};ParaDrawing.prototype.setParagraphKeepLines=function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphKeepLines===
"function")return this.GraphicObj.setParagraphKeepLines(Value)};ParaDrawing.prototype.setParagraphKeepNext=function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphKeepNext==="function")return this.GraphicObj.setParagraphKeepNext(Value)};ParaDrawing.prototype.setParagraphWidowControl=function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphWidowControl==="function")return this.GraphicObj.setParagraphWidowControl(Value)};ParaDrawing.prototype.setParagraphPageBreakBefore=
function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphPageBreakBefore==="function")return this.GraphicObj.setParagraphPageBreakBefore(Value)};ParaDrawing.prototype.isTextSelectionUse=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.isTextSelectionUse==="function")return this.GraphicObj.isTextSelectionUse();return false};ParaDrawing.prototype.paragraphFormatPaste=function(CopyTextPr,CopyParaPr,Bool){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.isTextSelectionUse==="function")return this.GraphicObj.paragraphFormatPaste(CopyTextPr,CopyParaPr,Bool)};ParaDrawing.prototype.getNearestPos=function(x,y,pageIndex){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getNearestPos==="function")return this.GraphicObj.getNearestPos(x,y,pageIndex);return null};ParaDrawing.prototype.Write_ToBinary=function(Writer){Writer.WriteLong(this.Type);Writer.WriteString2(this.Id)};ParaDrawing.prototype.Write_ToBinary2=function(Writer){Writer.WriteLong(AscDFH.historyitem_type_Drawing);
Writer.WriteString2(this.Id);AscFormat.writeDouble(Writer,this.Extent.W);AscFormat.writeDouble(Writer,this.Extent.H);AscFormat.writeObject(Writer,this.GraphicObj);AscFormat.writeObject(Writer,this.DocumentContent);AscFormat.writeObject(Writer,this.Parent);AscFormat.writeObject(Writer,this.wrappingPolygon);AscFormat.writeLong(Writer,this.RelativeHeight);AscFormat.writeObject(Writer,this.docPr)};ParaDrawing.prototype.Read_FromBinary2=function(Reader){this.Id=Reader.GetString2();this.DrawingDocument=
editor.WordControl.m_oLogicDocument.DrawingDocument;this.LogicDocument=this.DrawingDocument?this.DrawingDocument.m_oLogicDocument:null;this.Extent.W=AscFormat.readDouble(Reader);this.Extent.H=AscFormat.readDouble(Reader);this.GraphicObj=AscFormat.readObject(Reader);this.DocumentContent=AscFormat.readObject(Reader);this.Parent=AscFormat.readObject(Reader);this.wrappingPolygon=AscFormat.readObject(Reader);this.RelativeHeight=AscFormat.readLong(Reader);this.docPr=AscFormat.readObject(Reader);if(this.wrappingPolygon)this.wrappingPolygon.wordGraphicObject=
this;this.drawingDocument=editor.WordControl.m_oLogicDocument.DrawingDocument;this.document=editor.WordControl.m_oLogicDocument;this.graphicObjects=editor.WordControl.m_oLogicDocument.DrawingObjects;this.graphicObjects.addGraphicObject(this);g_oTableId.Add(this,this.Id)};ParaDrawing.prototype.Load_LinkData=function(){};ParaDrawing.prototype.draw=function(graphics,PDSE){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.draw==="function"){graphics.SaveGrState();var bInline=this.Is_Inline();
if(bInline&&AscCommon.isRealObject(PDSE)&&AscFormat.isRealNumber(this.LineTop)&&AscFormat.isRealNumber(this.LineBottom)&&AscCommon.isRealObject(this.GraphicObj.bounds)){var x,y,w,h;var oEffectExtent=this.EffectExtent;x=PDSE.X;y=this.LineTop;w=this.GraphicObj.bounds.r-this.GraphicObj.bounds.l+AscFormat.getValOrDefault(oEffectExtent.R,0)+AscFormat.getValOrDefault(oEffectExtent.L,0);h=this.LineBottom-this.LineTop;graphics.AddClipRect(x,y,w,h)}this.GraphicObj.draw(graphics);graphics.RestoreGrState()}};
ParaDrawing.prototype.drawAdjustments=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.drawAdjustments==="function")this.GraphicObj.drawAdjustments()};ParaDrawing.prototype.getTransformMatrix=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getTransformMatrix==="function")return this.GraphicObj.getTransformMatrix();return null};ParaDrawing.prototype.getExtensions=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getExtensions===
"function")return this.GraphicObj.getExtensions();return null};ParaDrawing.prototype.isGroup=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.isGroup==="function")return this.GraphicObj.isGroup();return false};ParaDrawing.prototype.isShapeChild=function(bRetShape){if(!this.Is_Inline()||!this.DocumentContent)return bRetShape?null:false;var cur_doc_content=this.DocumentContent;var oCell;while(oCell=cur_doc_content.IsTableCellContent(true))cur_doc_content=oCell.Row.Table.Parent;
if(AscCommon.isRealObject(cur_doc_content.Parent)&&typeof cur_doc_content.Parent.getObjectType==="function"&&cur_doc_content.Parent.getObjectType()===AscDFH.historyitem_type_Shape)return bRetShape?cur_doc_content.Parent:true;return bRetShape?null:false};ParaDrawing.prototype.checkShapeChildAndGetTopParagraph=function(paragraph){var parent_paragraph=!paragraph?this.Get_ParentParagraph():paragraph;var parent_doc_content=parent_paragraph.Parent;if(parent_doc_content.Parent instanceof AscFormat.CShape)if(!parent_doc_content.Parent.group)return parent_doc_content.Parent.parent.Get_ParentParagraph();
Old,New,Color)}CChangesParaTextPrHighLight.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrHighLight.prototype.constructor=CChangesParaTextPrHighLight;CChangesParaTextPrHighLight.prototype.Type=AscDFH.historyitem_TextPr_HighLight;CChangesParaTextPrHighLight.prototype.private_SetValue=function(Value){if(this.Class.Value)this.Class.Value.HighLight=Value};CChangesParaTextPrHighLight.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;
if(undefined===this.New)nFlags|=2;else if(highlight_None===this.New)nFlags|=4;if(undefined===this.Old)nFlags|=8;else if(highlight_None===this.Old)nFlags|=16;Writer.WriteLong(nFlags);if(undefined!==this.New&&highlight_None!==this.New)this.New.Write_ToBinary(Writer);if(undefined!==this.Old&&highlight_None!==this.Old)this.Old.Write_ToBinary(Writer)};CChangesParaTextPrHighLight.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&
2)this.New=undefined;else if(nFlags&4)this.New=highlight_None;else{this.New=new CDocumentColor(0,0,0);this.New.Read_FromBinary(Reader)}if(nFlags&8)this.Old=undefined;else if(nFlags&16)this.Old=highlight_None;else{this.Old=new CDocumentColor(0,0,0);this.Old.Read_FromBinary(Reader)}};CChangesParaTextPrHighLight.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrRStyle(Class,Old,New,Color){AscDFH.CChangesBaseStringProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRStyle.prototype=
Object.create(AscDFH.CChangesBaseStringProperty.prototype);CChangesParaTextPrRStyle.prototype.constructor=CChangesParaTextPrRStyle;CChangesParaTextPrRStyle.prototype.Type=AscDFH.historyitem_TextPr_RStyle;CChangesParaTextPrRStyle.prototype.private_SetValue=function(Value){this.Class.Value.RStyle=Value};CChangesParaTextPrRStyle.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrSpacing(Class,Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,Class,Old,New,Color)}
CChangesParaTextPrSpacing.prototype=Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);CChangesParaTextPrSpacing.prototype.constructor=CChangesParaTextPrSpacing;CChangesParaTextPrSpacing.prototype.Type=AscDFH.historyitem_TextPr_Spacing;CChangesParaTextPrSpacing.prototype.private_SetValue=function(Value){this.Class.Value.Spacing=Value};CChangesParaTextPrSpacing.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrDStrikeout(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,
Class,Old,New,Color)}CChangesParaTextPrDStrikeout.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesParaTextPrDStrikeout.prototype.constructor=CChangesParaTextPrDStrikeout;CChangesParaTextPrDStrikeout.prototype.Type=AscDFH.historyitem_TextPr_DStrikeout;CChangesParaTextPrDStrikeout.prototype.private_SetValue=function(Value){this.Class.Value.DStrikeout=Value};CChangesParaTextPrDStrikeout.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrCaps(Class,
Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrCaps.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesParaTextPrCaps.prototype.constructor=CChangesParaTextPrCaps;CChangesParaTextPrCaps.prototype.Type=AscDFH.historyitem_TextPr_Caps;CChangesParaTextPrCaps.prototype.private_SetValue=function(Value){this.Class.Value.Caps=Value};CChangesParaTextPrCaps.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrSmallCaps(Class,
Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrSmallCaps.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesParaTextPrSmallCaps.prototype.constructor=CChangesParaTextPrSmallCaps;CChangesParaTextPrSmallCaps.prototype.Type=AscDFH.historyitem_TextPr_SmallCaps;CChangesParaTextPrSmallCaps.prototype.private_SetValue=function(Value){this.Class.Value.SmallCaps=Value};CChangesParaTextPrSmallCaps.prototype.Merge=private_ParaTextPrChangesOnMergeValue;
function CChangesParaTextPrPosition(Class,Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrPosition.prototype=Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);CChangesParaTextPrPosition.prototype.constructor=CChangesParaTextPrPosition;CChangesParaTextPrPosition.prototype.Type=AscDFH.historyitem_TextPr_Position;CChangesParaTextPrPosition.prototype.private_SetValue=function(Value){this.Class.Value.Position=Value};CChangesParaTextPrPosition.prototype.Merge=
private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrValue(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrValue.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrValue.prototype.constructor=CChangesParaTextPrValue;CChangesParaTextPrValue.prototype.Type=AscDFH.historyitem_TextPr_Value;CChangesParaTextPrValue.prototype.private_SetValue=function(Value){this.Class.Value=Value};CChangesParaTextPrValue.prototype.private_CreateObject=
function(){return new CTextPr};CChangesParaTextPrValue.prototype.private_IsCreateEmptyObject=function(){return true};CChangesParaTextPrValue.prototype.Merge=function(oChange){if(oChange.Class!==this.Class)return true;if(oChange.Type===this.Type)return false;if(!this.New)this.New=new CTextPr;switch(oChange.Type){case AscDFH.historyitem_TextPr_Bold:{this.New.Bold=oChange.New;break}case AscDFH.historyitem_TextPr_Italic:{this.New.Italic=oChange.New;break}case AscDFH.historyitem_TextPr_Strikeout:{this.New.Strikeout=
oChange.New;break}case AscDFH.historyitem_TextPr_Underline:{this.New.Underline=oChange.New;break}case AscDFH.historyitem_TextPr_FontSize:{this.New.FontSize=oChange.New;break}case AscDFH.historyitem_TextPr_Color:{this.New.Color=oChange.New;break}case AscDFH.historyitem_TextPr_VertAlign:{this.New.VertAlign=oChange.New;break}case AscDFH.historyitem_TextPr_HighLight:{this.New.HighLight=oChange.New;break}case AscDFH.historyitem_TextPr_RStyle:{this.New.RStyle=oChange.New;break}case AscDFH.historyitem_TextPr_Spacing:{this.New.Spacing=
oChange.New;break}case AscDFH.historyitem_TextPr_DStrikeout:{this.New.DStrikeout=oChange.New;break}case AscDFH.historyitem_TextPr_Caps:{this.New.Caps=oChange.New;break}case AscDFH.historyitem_TextPr_SmallCaps:{this.New.SmallCaps=oChange.New;break}case AscDFH.historyitem_TextPr_Position:{this.New.Position=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts:{this.New.RFonts=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_Ascii:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.Ascii=
oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_HAnsi:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.HAnsi=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_CS:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.CS=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_EastAsia:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_Hint:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;
this.New.RFonts.Hint=oChange.New;break}case AscDFH.historyitem_TextPr_Lang:{this.New.Lang=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_Bidi:{if(!this.New.Lang)this.New.Lang=new CLang;this.New.Lang.Bidi=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_EastAsia:{if(!this.New.Lang)this.New.Lang=new CLang;this.New.Lang.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_Val:{if(!this.New.Lang)this.New.Lang=new CLang;this.New.Lang.Val=oChange.New;break}case AscDFH.historyitem_TextPr_Unifill:{this.New.Unifill=
oChange.New;break}case AscDFH.historyitem_TextPr_FontSizeCS:{this.New.FontSizeCS=oChange.New;break}case AscDFH.historyitem_TextPr_Outline:{this.New.TextOutline=oChange.New;break}case AscDFH.historyitem_TextPr_Fill:{this.New.TextFill=oChange.New;break}}return true};function CChangesParaTextPrRFonts(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFonts.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrRFonts.prototype.constructor=
CChangesParaTextPrRFonts;CChangesParaTextPrRFonts.prototype.Type=AscDFH.historyitem_TextPr_RFonts;CChangesParaTextPrRFonts.prototype.private_SetValue=function(Value){this.Class.Value.RFonts=Value};CChangesParaTextPrRFonts.prototype.private_CreateObject=function(){return new CRFonts};CChangesParaTextPrRFonts.prototype.private_IsCreateEmptyObject=function(){return true};CChangesParaTextPrRFonts.prototype.Merge=function(oChange){if(this.Class!==oChange.Class)return true;if(this.Type===oChange.Type||
oChange.Type===AscDFH.historyitem_TextPr_Value)return false;if(!this.New)this.New=new CRFonts;switch(oChange.Type){case AscDFH.historyitem_TextPr_RFonts_Ascii:{this.New.Ascii=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_HAnsi:{this.New.HAnsi=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_CS:{this.New.CS=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_EastAsia:{this.New.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_Hint:{this.New.Hint=oChange.New;break}}return true};
function CChangesParaTextPrRFontsAscii(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsAscii.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsAscii.prototype.constructor=CChangesParaTextPrRFontsAscii;CChangesParaTextPrRFontsAscii.prototype.Type=AscDFH.historyitem_TextPr_RFonts_Ascii;CChangesParaTextPrRFontsAscii.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===
this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==this.Old)Writer.WriteString2(this.Old.Name)};CChangesParaTextPrRFontsAscii.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;else this.Old={Name:Reader.GetString2(),Index:-1}};
CChangesParaTextPrRFontsAscii.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.Ascii=Value};CChangesParaTextPrRFontsAscii.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrRFontsHAnsi(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsHAnsi.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsHAnsi.prototype.constructor=CChangesParaTextPrRFontsHAnsi;CChangesParaTextPrRFontsHAnsi.prototype.Type=
AscDFH.historyitem_TextPr_RFonts_HAnsi;CChangesParaTextPrRFontsHAnsi.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==this.Old)Writer.WriteString2(this.Old.Name)};CChangesParaTextPrRFontsHAnsi.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=
false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;else this.Old={Name:Reader.GetString2(),Index:-1}};CChangesParaTextPrRFontsHAnsi.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.HAnsi=Value};CChangesParaTextPrRFontsHAnsi.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrRFontsCS(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsCS.prototype=
Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsCS.prototype.constructor=CChangesParaTextPrRFontsCS;CChangesParaTextPrRFontsCS.prototype.Type=AscDFH.historyitem_TextPr_RFonts_CS;CChangesParaTextPrRFontsCS.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==this.Old)Writer.WriteString2(this.Old.Name)};
CChangesParaTextPrRFontsCS.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;else this.Old={Name:Reader.GetString2(),Index:-1}};CChangesParaTextPrRFontsCS.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.CS=Value};CChangesParaTextPrRFontsCS.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;
function CChangesParaTextPrRFontsEastAsia(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsEastAsia.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsEastAsia.prototype.constructor=CChangesParaTextPrRFontsEastAsia;CChangesParaTextPrRFontsEastAsia.prototype.Type=AscDFH.historyitem_TextPr_RFonts_EastAsia;CChangesParaTextPrRFontsEastAsia.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=
1;if(undefined===this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==this.Old)Writer.WriteString2(this.Old.Name)};CChangesParaTextPrRFontsEastAsia.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;else this.Old={Name:Reader.GetString2(),
Index:-1}};CChangesParaTextPrRFontsEastAsia.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.EastAsia=Value};CChangesParaTextPrRFontsEastAsia.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrRFontsHint(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsHint.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrRFontsHint.prototype.constructor=CChangesParaTextPrRFontsHint;
CChangesParaTextPrRFontsHint.prototype.Type=AscDFH.historyitem_TextPr_RFonts_Hint;CChangesParaTextPrRFontsHint.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.Hint=Value};CChangesParaTextPrRFontsHint.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrLang(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrLang.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrLang.prototype.constructor=
CChangesParaTextPrLang;CChangesParaTextPrLang.prototype.Type=AscDFH.historyitem_TextPr_Lang;CChangesParaTextPrLang.prototype.private_SetValue=function(Value){this.Class.Value.Lang=Value};CChangesParaTextPrLang.prototype.private_CreateObject=function(){return new CLang};CChangesParaTextPrLang.prototype.private_IsCreateEmptyObject=function(){return true};CChangesParaTextPrLang.prototype.Merge=function(oChange){if(this.Class!==oChange.Class)return true;if(AscDFH.historyitem_TextPr_Lang===oChange.Type||
AscDFH.historyitem_TextPr_Value===oChange.Type)return false;if(!this.New)this.New=new CLang;switch(oChange.Type){case AscDFH.historyitem_TextPr_Lang_Bidi:{this.New.Bidi=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_EastAsia:{this.New.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_Val:{this.New.Val=oChange.New;break}}return true};function CChangesParaTextPrLangBidi(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrLangBidi.prototype=
Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrLangBidi.prototype.constructor=CChangesParaTextPrLangBidi;CChangesParaTextPrLangBidi.prototype.Type=AscDFH.historyitem_TextPr_Lang_Bidi;CChangesParaTextPrLangBidi.prototype.private_SetValue=function(Value){this.Class.Value.Lang.Bidi=Value};CChangesParaTextPrLangBidi.prototype.Merge=private_ParaTextPrChangesOnMergeLangValue;function CChangesParaTextPrLangEastAsia(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,
Class,Old,New,Color)}CChangesParaTextPrLangEastAsia.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrLangEastAsia.prototype.constructor=CChangesParaTextPrLangEastAsia;CChangesParaTextPrLangEastAsia.prototype.Type=AscDFH.historyitem_TextPr_Lang_EastAsia;CChangesParaTextPrLangEastAsia.prototype.private_SetValue=function(Value){this.Class.Value.Lang.EastAsia=Value};CChangesParaTextPrLangEastAsia.prototype.Merge=private_ParaTextPrChangesOnMergeLangValue;function CChangesParaTextPrLangVal(Class,
Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrLangVal.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrLangVal.prototype.constructor=CChangesParaTextPrLangVal;CChangesParaTextPrLangVal.prototype.Type=AscDFH.historyitem_TextPr_Lang_Val;CChangesParaTextPrLangVal.prototype.private_SetValue=function(Value){this.Class.Value.Lang.Val=Value};CChangesParaTextPrLangVal.prototype.Merge=private_ParaTextPrChangesOnMergeLangValue;
function CChangesParaTextPrUnifill(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrUnifill.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrUnifill.prototype.constructor=CChangesParaTextPrUnifill;CChangesParaTextPrUnifill.prototype.Type=AscDFH.historyitem_TextPr_Unifill;CChangesParaTextPrUnifill.prototype.private_SetValue=function(Value){this.Class.Value.Unifill=Value};CChangesParaTextPrUnifill.prototype.private_CreateObject=
function(){return new AscFormat.CUniFill};CChangesParaTextPrUnifill.prototype.Load=function(Color){this.Redo();var Unifill=this.Class.Value.Unifill;if(AscCommon.CollaborativeEditing&&Unifill&&Unifill.fill&&Unifill.fill.type===Asc.c_oAscFill.FILL_TYPE_BLIP&&typeof Unifill.fill.RasterImageId==="string"&&Unifill.fill.RasterImageId.length>0)AscCommon.CollaborativeEditing.Add_NewImage(Unifill.fill.RasterImageId)};CChangesParaTextPrUnifill.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrFontSizeCS(Class,
Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrFontSizeCS.prototype=Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);CChangesParaTextPrFontSizeCS.prototype.constructor=CChangesParaTextPrFontSizeCS;CChangesParaTextPrFontSizeCS.prototype.Type=AscDFH.historyitem_TextPr_FontSizeCS;CChangesParaTextPrFontSizeCS.prototype.private_SetValue=function(Value){this.Class.Value.FontSizeCS=Value};CChangesParaTextPrFontSizeCS.prototype.Merge=private_ParaTextPrChangesOnMergeValue;
function CChangesParaTextPrTextOutline(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrTextOutline.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrTextOutline.prototype.constructor=CChangesParaTextPrTextOutline;CChangesParaTextPrTextOutline.prototype.Type=AscDFH.historyitem_TextPr_Outline;CChangesParaTextPrTextOutline.prototype.private_SetValue=function(Value){this.Class.Value.TextOutline=Value};CChangesParaTextPrTextOutline.prototype.private_CreateObject=
function(){return new AscFormat.CLn};CChangesParaTextPrTextOutline.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrTextFill(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrTextFill.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrTextFill.prototype.constructor=CChangesParaTextPrTextFill;CChangesParaTextPrTextFill.prototype.Type=AscDFH.historyitem_TextPr_Fill;CChangesParaTextPrTextFill.prototype.private_SetValue=
function(Value){this.Class.Value.TextFill=Value};CChangesParaTextPrTextFill.prototype.private_CreateObject=function(){return new AscFormat.CUniFill};CChangesParaTextPrTextFill.prototype.Merge=private_ParaTextPrChangesOnMergeValue;"use strict";var drawing_Inline=1;var drawing_Anchor=2;var WRAPPING_TYPE_NONE=0;var WRAPPING_TYPE_SQUARE=1;var WRAPPING_TYPE_THROUGH=2;var WRAPPING_TYPE_TIGHT=3;var WRAPPING_TYPE_TOP_AND_BOTTOM=4;var WRAP_HIT_TYPE_POINT=0;var WRAP_HIT_TYPE_SECTION=1;var c_oAscAlignH=Asc.c_oAscAlignH;
var c_oAscAlignV=Asc.c_oAscAlignV;function ParaDrawing(W,H,GraphicObj,DrawingDocument,DocumentContent,Parent){CRunElementBase.call(this);this.Id=AscCommon.g_oIdCounter.Get_NewId();this.DrawingType=drawing_Inline;this.GraphicObj=GraphicObj;this.X=0;this.Y=0;this.Width=0;this.Height=0;this.OrigX=0;this.OrigY=0;this.ShiftX=0;this.ShiftY=0;this.PageNum=0;this.LineNum=0;this.YOffset=0;this.DocumentContent=DocumentContent;this.DrawingDocument=DrawingDocument;this.Parent=Parent;this.LogicDocument=DrawingDocument?
DrawingDocument.m_oLogicDocument:null;this.Distance={T:0,B:0,L:0,R:0};this.LayoutInCell=true;this.RelativeHeight=undefined;this.SimplePos={Use:false,X:0,Y:0};this.Extent={W:W,H:H};this.EffectExtent={L:0,T:0,R:0,B:0};this.docPr=new AscFormat.CNvPr;this.SizeRelH=undefined;this.SizeRelV=undefined;this.AllowOverlap=true;this.Locked=null;this.Hidden=null;this.PositionH={RelativeFrom:c_oAscRelativeFromH.Column,Align:false,Value:0,Percent:false};this.PositionV={RelativeFrom:c_oAscRelativeFromV.Paragraph,
Align:false,Value:0,Percent:false};this.PositionH_Old=undefined;this.PositionV_Old=undefined;this.Internal_Position=new CAnchorPosition;this.wrappingType=WRAPPING_TYPE_THROUGH;this.useWrap=true;if(typeof CWrapPolygon!=="undefined")this.wrappingPolygon=new CWrapPolygon(this);this.document=editor.WordControl.m_oLogicDocument;this.drawingDocument=DrawingDocument;this.graphicObjects=editor.WordControl.m_oLogicDocument.DrawingObjects;this.selected=false;this.behindDoc=false;this.bNoNeedToAdd=false;this.pageIndex=
-1;this.Lock=new AscCommon.CLock;this.ParaMath=null;this.SkipOnRecalculate=false;this.LineTop=null;this.LineBottom=null;g_oTableId.Add(this,this.Id);if(this.graphicObjects){this.Set_RelativeHeight(this.graphicObjects.getZIndex());if(History.Is_On()&&!g_oTableId.m_bTurnOff)this.graphicObjects.addGraphicObject(this)}}ParaDrawing.prototype=Object.create(CRunElementBase.prototype);ParaDrawing.prototype.constructor=ParaDrawing;ParaDrawing.prototype.Type=para_Drawing;ParaDrawing.prototype.Get_Type=function(){return this.Type};
ParaDrawing.prototype.Get_Width=function(){return this.Width};ParaDrawing.prototype.Get_WidthVisible=function(){return this.WidthVisible};ParaDrawing.prototype.Set_WidthVisible=function(WidthVisible){this.WidthVisible=WidthVisible};ParaDrawing.prototype.GetSelectedContent=function(SelectedContent){if(this.GraphicObj&&this.GraphicObj.GetSelectedContent)this.GraphicObj.GetSelectedContent(SelectedContent)};ParaDrawing.prototype.GetSearchElementId=function(bNext,bCurrent){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.GetSearchElementId==="function")return this.GraphicObj.GetSearchElementId(bNext,bCurrent);return null};ParaDrawing.prototype.CheckCorrect=function(){if(!this.GraphicObj)return false;if(this.GraphicObj&&this.GraphicObj.checkCorrect)return this.GraphicObj.checkCorrect();return true};ParaDrawing.prototype.GetAllDrawingObjects=function(DrawingObjects){if(null==DrawingObjects)DrawingObjects=[];if(this.GraphicObj.GetAllDrawingObjects)this.GraphicObj.GetAllDrawingObjects(DrawingObjects)};
ParaDrawing.prototype.canRotate=function(){return AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.canRotate=="function"&&this.GraphicObj.canRotate()};ParaDrawing.prototype.GetParagraph=function(){return this.Get_ParentParagraph()};ParaDrawing.prototype.GetRun=function(){return this.Get_Run()};ParaDrawing.prototype.Get_Run=function(){var oParagraph=this.Get_ParentParagraph();if(oParagraph)return oParagraph.Get_DrawingObjectRun(this.Id);return null};ParaDrawing.prototype.Get_Props=function(OtherProps){var Props=
{};Props.Width=this.GraphicObj.extX;Props.Height=this.GraphicObj.extY;if(drawing_Inline===this.DrawingType)Props.WrappingStyle=c_oAscWrapStyle2.Inline;else if(WRAPPING_TYPE_NONE===this.wrappingType)Props.WrappingStyle=this.behindDoc===true?c_oAscWrapStyle2.Behind:c_oAscWrapStyle2.InFront;else switch(this.wrappingType){case WRAPPING_TYPE_SQUARE:Props.WrappingStyle=c_oAscWrapStyle2.Square;break;case WRAPPING_TYPE_TIGHT:Props.WrappingStyle=c_oAscWrapStyle2.Tight;break;case WRAPPING_TYPE_THROUGH:Props.WrappingStyle=
c_oAscWrapStyle2.Through;break;case WRAPPING_TYPE_TOP_AND_BOTTOM:Props.WrappingStyle=c_oAscWrapStyle2.TopAndBottom;break;default:Props.WrappingStyle=c_oAscWrapStyle2.Inline;break}if(drawing_Inline===this.DrawingType)Props.Paddings={Left:AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT,Right:AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT,Top:0,Bottom:0};else{var oDistance=this.Get_Distance();Props.Paddings={Left:oDistance.L,Right:oDistance.R,Top:oDistance.T,Bottom:oDistance.B}}Props.AllowOverlap=this.AllowOverlap;Props.Position=
{X:this.X,Y:this.Y};Props.PositionH={RelativeFrom:this.PositionH.RelativeFrom,UseAlign:this.PositionH.Align,Align:true===this.PositionH.Align?this.PositionH.Value:undefined,Value:true===this.PositionH.Align?0:this.PositionH.Value,Percent:this.PositionH.Percent};Props.PositionV={RelativeFrom:this.PositionV.RelativeFrom,UseAlign:this.PositionV.Align,Align:true===this.PositionV.Align?this.PositionV.Value:undefined,Value:true===this.PositionV.Align?0:this.PositionV.Value,Percent:this.PositionV.Percent};
if(this.SizeRelH&&this.SizeRelH.Percent>0)Props.SizeRelH={RelativeFrom:AscFormat.ConvertRelSizeHToRelPosition(this.SizeRelH.RelativeFrom),Value:this.SizeRelH.Percent*100>>0};if(this.SizeRelV&&this.SizeRelV.Percent>0)Props.SizeRelV={RelativeFrom:AscFormat.ConvertRelSizeVToRelPosition(this.SizeRelV.RelativeFrom),Value:this.SizeRelV.Percent*100>>0};Props.Internal_Position=this.Internal_Position;Props.Locked=this.Lock.Is_Locked();var ParentParagraph=this.Get_ParentParagraph();if(ParentParagraph&&undefined!==
ParentParagraph.Parent){var DocContent=ParentParagraph.Parent;if(true===DocContent.Is_DrawingShape()||DocContent.GetTopDocumentContent()instanceof CFootEndnote)Props.CanBeFlow=false}Props.title=this.docPr.title!==null?this.docPr.title:undefined;Props.description=this.docPr.descr!==null?this.docPr.descr:undefined;if(null!=OtherProps&&undefined!=OtherProps){if(undefined===OtherProps.Width||.001>Math.abs(Props.Width-OtherProps.Width))Props.Width=undefined;if(undefined===OtherProps.Height||.001>Math.abs(Props.Height-
OtherProps.Height))Props.Height=undefined;if(undefined===OtherProps.WrappingStyle||Props.WrappingStyle!=OtherProps.WrappingStyle)Props.WrappingStyle=undefined;if(undefined===OtherProps.ImageUrl||Props.ImageUrl!=OtherProps.ImageUrl)Props.ImageUrl=undefined;if(undefined===OtherProps.Paddings.Left||.001>Math.abs(Props.Paddings.Left-OtherProps.Paddings.Left))Props.Paddings.Left=undefined;if(undefined===OtherProps.Paddings.Right||.001>Math.abs(Props.Paddings.Right-OtherProps.Paddings.Right))Props.Paddings.Right=
undefined;if(undefined===OtherProps.Paddings.Top||.001>Math.abs(Props.Paddings.Top-OtherProps.Paddings.Top))Props.Paddings.Top=undefined;if(undefined===OtherProps.Paddings.Bottom||.001>Math.abs(Props.Paddings.Bottom-OtherProps.Paddings.Bottom))Props.Paddings.Bottom=undefined;if(undefined===OtherProps.AllowOverlap||Props.AllowOverlap!=OtherProps.AllowOverlap)Props.AllowOverlap=undefined;if(undefined===OtherProps.Position.X||.001>Math.abs(Props.Position.X-OtherProps.Position.X))Props.Position.X=undefined;
if(undefined===OtherProps.Position.Y||.001>Math.abs(Props.Position.Y-OtherProps.Position.Y))Props.Position.Y=undefined;if(undefined===OtherProps.PositionH.RelativeFrom||Props.PositionH.RelativeFrom!=OtherProps.PositionH.RelativeFrom)Props.PositionH.RelativeFrom=undefined;if(undefined===OtherProps.PositionH.UseAlign||Props.PositionH.UseAlign!=OtherProps.PositionH.UseAlign)Props.PositionH.UseAlign=undefined;if(Props.PositionH.RelativeFrom===OtherProps.PositionH.RelativeFrom&&Props.PositionH.UseAlign===
OtherProps.PositionH.UseAlign){if(true!=Props.PositionH.UseAlign&&.001>Math.abs(Props.PositionH.Value-OtherProps.PositionH.Value))Props.PositionH.Value=undefined;if(true===Props.PositionH.UseAlign&&Props.PositionH.Align!=OtherProps.PositionH.Align)Props.PositionH.Align=undefined}if(undefined===OtherProps.PositionV.RelativeFrom||Props.PositionV.RelativeFrom!=OtherProps.PositionV.RelativeFrom)Props.PositionV.RelativeFrom=undefined;if(undefined===OtherProps.PositionV.UseAlign||Props.PositionV.UseAlign!=
OtherProps.PositionV.UseAlign)Props.PositionV.UseAlign=undefined;if(Props.PositionV.RelativeFrom===OtherProps.PositionV.RelativeFrom&&Props.PositionV.UseAlign===OtherProps.PositionV.UseAlign){if(true!=Props.PositionV.UseAlign&&.001>Math.abs(Props.PositionV.Value-OtherProps.PositionV.Value))Props.PositionV.Value=undefined;if(true===Props.PositionV.UseAlign&&Props.PositionV.Align!=OtherProps.PositionV.Align)Props.PositionV.Align=undefined}if(false===OtherProps.Locked)Props.Locked=false;if(false===OtherProps.CanBeFlow||
false===Props.CanBeFlow)Props.CanBeFlow=false;else Props.CanBeFlow=true;if(undefined===OtherProps.title||Props.title!==OtherProps.title)Props.title=undefined;if(undefined===OtherProps.description||Props.description!==OtherProps.description)Props.description=undefined}return Props};ParaDrawing.prototype.Is_UseInDocument=function(){if(this.Parent){var Run=this.Parent.Get_DrawingObjectRun(this.Id);if(Run)return Run.Is_UseInDocument(this.Get_Id())}return false};ParaDrawing.prototype.IsUseInDocument=function(){return this.Is_UseInDocument()};
ParaDrawing.prototype.CheckGroupSizes=function(){if(this.GraphicObj&&this.GraphicObj.CheckGroupSizes)this.GraphicObj.CheckGroupSizes()};ParaDrawing.prototype.Set_DrawingType=function(DrawingType){History.Add(new CChangesParaDrawingDrawingType(this,this.DrawingType,DrawingType));this.DrawingType=DrawingType};ParaDrawing.prototype.Set_WrappingType=function(WrapType){History.Add(new CChangesParaDrawingWrappingType(this,this.wrappingType,WrapType));this.wrappingType=WrapType};ParaDrawing.prototype.Set_Distance=
function(L,T,R,B){var oDistance=this.Get_Distance();if(!AscFormat.isRealNumber(L))L=oDistance.L;if(!AscFormat.isRealNumber(T))T=oDistance.T;if(!AscFormat.isRealNumber(R))R=oDistance.R;if(!AscFormat.isRealNumber(B))B=oDistance.B;History.Add(new CChangesParaDrawingDistance(this,{Left:this.Distance.L,Top:this.Distance.T,Right:this.Distance.R,Bottom:this.Distance.B},{Left:L,Top:T,Right:R,Bottom:B}));this.Distance.L=L;this.Distance.R=R;this.Distance.T=T;this.Distance.B=B};ParaDrawing.prototype.Set_AllowOverlap=
function(AllowOverlap){History.Add(new CChangesParaDrawingAllowOverlap(this,this.AllowOverlap,AllowOverlap));this.AllowOverlap=AllowOverlap};ParaDrawing.prototype.Set_PositionH=function(RelativeFrom,Align,Value,Percent){var _Value,_Percent;if(AscFormat.isRealNumber(Value)&&AscFormat.fApproxEqual(Value,0)&&true===Percent){_Value=0;_Percent=false}else{_Value=Value;_Percent=Percent}History.Add(new CChangesParaDrawingPositionH(this,{RelativeFrom:this.PositionH.RelativeFrom,Align:this.PositionH.Align,
Value:this.PositionH.Value,Percent:this.PositionH.Percent},{RelativeFrom:RelativeFrom,Align:Align,Value:_Value,Percent:_Percent}));this.PositionH.RelativeFrom=RelativeFrom;this.PositionH.Align=Align;this.PositionH.Value=_Value;this.PositionH.Percent=_Percent};ParaDrawing.prototype.Set_PositionV=function(RelativeFrom,Align,Value,Percent){var _Value,_Percent;if(AscFormat.isRealNumber(Value)&&AscFormat.fApproxEqual(Value,0)&&true===Percent){_Value=0;_Percent=false}else{_Value=Value;_Percent=Percent}History.Add(new CChangesParaDrawingPositionV(this,
{RelativeFrom:this.PositionV.RelativeFrom,Align:this.PositionV.Align,Value:this.PositionV.Value,Percent:this.PositionV.Percent},{RelativeFrom:RelativeFrom,Align:Align,Value:_Value,Percent:_Percent}));this.PositionV.RelativeFrom=RelativeFrom;this.PositionV.Align=Align;this.PositionV.Value=_Value;this.PositionV.Percent=_Percent};ParaDrawing.prototype.GetPositionH=function(){return{RelativeFrom:this.PositionH.RelativeFrom,Align:this.PositionH.Align,Value:this.PositionH.Value,Percent:this.PositionH.Percent}};
ParaDrawing.prototype.GetPositionV=function(){return{RelativeFrom:this.PositionV.RelativeFrom,Align:this.PositionV.Align,Value:this.PositionV.Value,Percent:this.PositionV.Percent}};ParaDrawing.prototype.Set_BehindDoc=function(BehindDoc){History.Add(new CChangesParaDrawingBehindDoc(this,this.behindDoc,BehindDoc));this.behindDoc=BehindDoc};ParaDrawing.prototype.Set_GraphicObject=function(graphicObject){var oldId=AscCommon.isRealObject(this.GraphicObj)?this.GraphicObj.Get_Id():null;var newId=AscCommon.isRealObject(graphicObject)?
graphicObject.Get_Id():null;History.Add(new CChangesParaDrawingGraphicObject(this,oldId,newId));if(graphicObject)graphicObject.handleUpdateExtents();this.GraphicObj=graphicObject};ParaDrawing.prototype.setSimplePos=function(use,x,y){History.Add(new CChangesParaDrawingSimplePos(this,{Use:this.SimplePos.Use,X:this.SimplePos.X,Y:this.SimplePos.Y},{Use:use,X:x,Y:y}));this.SimplePos.Use=use;this.SimplePos.X=x;this.SimplePos.Y=y};ParaDrawing.prototype.setExtent=function(extX,extY){History.Add(new CChangesParaDrawingExtent(this,
{W:this.Extent.W,H:this.Extent.H},{W:extX,H:extY}));this.Extent.W=extX;this.Extent.H=extY};ParaDrawing.prototype.addWrapPolygon=function(wrapPolygon){History.Add(new CChangesParaDrawingWrapPolygon(this,this.wrappingPolygon,wrapPolygon));this.wrappingPolygon=wrapPolygon};ParaDrawing.prototype.Set_Locked=function(bLocked){History.Add(new CChangesParaDrawingLocked(this,this.Locked,bLocked));this.Locked=bLocked};ParaDrawing.prototype.Set_RelativeHeight=function(nRelativeHeight){History.Add(new CChangesParaDrawingRelativeHeight(this,
this.RelativeHeight,nRelativeHeight));this.Set_RelativeHeight2(nRelativeHeight)};ParaDrawing.prototype.Set_RelativeHeight2=function(nRelativeHeight){this.RelativeHeight=nRelativeHeight;if(this.graphicObjects&&AscFormat.isRealNumber(nRelativeHeight)&&nRelativeHeight>this.graphicObjects.maximalGraphicObjectZIndex)this.graphicObjects.maximalGraphicObjectZIndex=nRelativeHeight};ParaDrawing.prototype.setEffectExtent=function(L,T,R,B){var oEE=this.EffectExtent;History.Add(new CChangesParaDrawingEffectExtent(this,
{L:oEE.L,T:oEE.T,R:oEE.R,B:oEE.B},{L:L,T:T,R:R,B:B}));this.EffectExtent.L=L;this.EffectExtent.T=T;this.EffectExtent.R=R;this.EffectExtent.B=B};ParaDrawing.prototype.Set_Parent=function(oParent){History.Add(new CChangesParaDrawingParent(this,this.Parent,oParent));this.Parent=oParent};ParaDrawing.prototype.IsWatermark=function(){if(!this.GraphicObj)return false;if(this.GraphicObj.getObjectType()!==AscDFH.historyitem_type_Shape&&this.GraphicObj.getObjectType()!==AscDFH.historyitem_type_ImageShape)return false;
if(this.Is_Inline())return false;var oParagraph=this.GetParagraph();if(!(oParagraph instanceof Paragraph))return false;var oContent=oParagraph.Parent;if(!oContent||oContent.Is_DrawingShape(false))return false;var oHdrFtr=oContent.IsHdrFtr(true);if(!oHdrFtr)return false;var oRun=this.Get_Run();if(!oRun)return false;var arrDocPos=oRun.GetDocumentPositionFromObject();for(var nIndex=0,nCount=arrDocPos.length;nIndex<nCount;++nIndex){var oClass=arrDocPos[nIndex].Class;var oSdt=null;if(oClass instanceof
CDocumentContent&&oClass.Parent instanceof CBlockLevelSdt)oSdt=oClass.Parent;else if(oClass instanceof CInlineLevelSdt)oSdt=oClass;if(oSdt){var oPr=oSdt.Pr;if(AscCommon.isRealObject(oPr)&&AscCommon.isRealObject(oPr.DocPartObj)&&oPr.DocPartObj.Gallery==="Watermarks")return true}}return false};ParaDrawing.prototype.Set_ParaMath=function(ParaMath){History.Add(new CChangesParaDrawingParaMath(this,this.ParaMath,ParaMath));this.ParaMath=ParaMath};ParaDrawing.prototype.Set_LayoutInCell=function(LayoutInCell){if(this.LayoutInCell===
LayoutInCell)return;History.Add(new CChangesParaDrawingLayoutInCell(this,this.LayoutInCell,LayoutInCell));this.LayoutInCell=LayoutInCell};ParaDrawing.prototype.SetSizeRelH=function(oSize){History.Add(new CChangesParaDrawingSizeRelH(this,this.SizeRelH,oSize));this.SizeRelH=oSize};ParaDrawing.prototype.SetSizeRelV=function(oSize){History.Add(new CChangesParaDrawingSizeRelV(this,this.SizeRelV,oSize));this.SizeRelV=oSize};ParaDrawing.prototype.getXfrmExtX=function(){if(AscCommon.isRealObject(this.GraphicObj)&&
AscCommon.isRealObject(this.GraphicObj.spPr)&&AscCommon.isRealObject(this.GraphicObj.spPr.xfrm)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extX))return this.GraphicObj.spPr.xfrm.extX;if(AscFormat.isRealNumber(this.Extent.W))return this.Extent.W;return 0};ParaDrawing.prototype.getXfrmExtY=function(){if(AscCommon.isRealObject(this.GraphicObj)&&AscCommon.isRealObject(this.GraphicObj.spPr)&&AscCommon.isRealObject(this.GraphicObj.spPr.xfrm)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extY))return this.GraphicObj.spPr.xfrm.extY;
if(AscFormat.isRealNumber(this.Extent.H))return this.Extent.H;return 0};ParaDrawing.prototype.getXfrmRot=function(){if(AscCommon.isRealObject(this.GraphicObj)&&AscCommon.isRealObject(this.GraphicObj.spPr)&&AscCommon.isRealObject(this.GraphicObj.spPr.xfrm)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.rot))return this.GraphicObj.spPr.xfrm.rot;return 0};ParaDrawing.prototype.Get_Bounds=function(){var InsL,InsT,InsR,InsB;InsL=0;InsT=0;InsR=0;InsB=0;if(!this.Is_Inline()){var oDistance=this.Get_Distance();
if(oDistance){InsL=oDistance.L;InsT=oDistance.T;InsR=oDistance.R;InsB=oDistance.B}}var ExtX=this.getXfrmExtX();var ExtY=this.getXfrmExtY();var Rot=this.getXfrmRot();var X,Y,W,H;if(AscFormat.checkNormalRotate(Rot)){X=this.X;Y=this.Y;W=ExtX;H=ExtY}else{X=this.X+ExtX/2-ExtY/2;Y=this.Y+ExtY/2-ExtX/2;W=ExtY;H=ExtX}return{Left:X-this.EffectExtent.L-InsL,Top:Y-this.EffectExtent.T-InsT,Bottom:Y+H+this.EffectExtent.B+InsB,Right:X+W+this.EffectExtent.R+InsR}};ParaDrawing.prototype.Search=function(Str,Props,
SearchEngine,Type){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.Search==="function")this.GraphicObj.Search(Str,Props,SearchEngine,Type)};ParaDrawing.prototype.Set_Props=function(Props){var bCheckWrapPolygon=false;var isPictureCC=false;var oRun=this.GetRun();if(oRun){var arrContentControls=oRun.GetParentContentControls();for(var nIndex=0,nCount=arrContentControls.length;nIndex<nCount;++nIndex)if(arrContentControls[nIndex].IsPicture()){isPictureCC=true;break}}if(undefined!=Props.WrappingStyle&&
!isPictureCC){if(drawing_Inline===this.DrawingType&&c_oAscWrapStyle2.Inline!=Props.WrappingStyle&&undefined===Props.Paddings)this.Set_Distance(3.2,0,3.2,0);this.Set_DrawingType(c_oAscWrapStyle2.Inline===Props.WrappingStyle?drawing_Inline:drawing_Anchor);if(c_oAscWrapStyle2.Inline===Props.WrappingStyle)if(AscCommon.isRealObject(this.GraphicObj.bounds)&&AscFormat.isRealNumber(this.GraphicObj.bounds.w)&&AscFormat.isRealNumber(this.GraphicObj.bounds.h))this.CheckWH();if(c_oAscWrapStyle2.Behind===Props.WrappingStyle||
c_oAscWrapStyle2.InFront===Props.WrappingStyle){this.Set_WrappingType(WRAPPING_TYPE_NONE);this.Set_BehindDoc(c_oAscWrapStyle2.Behind===Props.WrappingStyle?true:false)}else{switch(Props.WrappingStyle){case c_oAscWrapStyle2.Square:this.Set_WrappingType(WRAPPING_TYPE_SQUARE);break;case c_oAscWrapStyle2.Tight:{bCheckWrapPolygon=true;this.Set_WrappingType(WRAPPING_TYPE_TIGHT);break}case c_oAscWrapStyle2.Through:{this.Set_WrappingType(WRAPPING_TYPE_THROUGH);bCheckWrapPolygon=true;break}case c_oAscWrapStyle2.TopAndBottom:this.Set_WrappingType(WRAPPING_TYPE_TOP_AND_BOTTOM);
break;default:this.Set_WrappingType(WRAPPING_TYPE_SQUARE);break}this.Set_BehindDoc(false)}}if(undefined!=Props.Paddings)this.Set_Distance(Props.Paddings.Left,Props.Paddings.Top,Props.Paddings.Right,Props.Paddings.Bottom);if(undefined!=Props.AllowOverlap)this.Set_AllowOverlap(Props.AllowOverlap);if(undefined!=Props.PositionH)this.Set_PositionH(Props.PositionH.RelativeFrom,Props.PositionH.UseAlign,true===Props.PositionH.UseAlign?Props.PositionH.Align:Props.PositionH.Value,Props.PositionH.Percent);if(undefined!=
Props.PositionV)this.Set_PositionV(Props.PositionV.RelativeFrom,Props.PositionV.UseAlign,true===Props.PositionV.UseAlign?Props.PositionV.Align:Props.PositionV.Value,Props.PositionV.Percent);if(undefined!=Props.SizeRelH)this.SetSizeRelH({RelativeFrom:AscFormat.ConvertRelPositionHToRelSize(Props.SizeRelH.RelativeFrom),Percent:Props.SizeRelH.Value/100});if(undefined!=Props.SizeRelV)this.SetSizeRelV({RelativeFrom:AscFormat.ConvertRelPositionVToRelSize(Props.SizeRelV.RelativeFrom),Percent:Props.SizeRelV.Value/
100});if(this.SizeRelH&&!this.SizeRelV)this.SetSizeRelV({RelativeFrom:AscCommon.c_oAscSizeRelFromV.sizerelfromvPage,Percent:0});if(this.SizeRelV&&!this.SizeRelH)this.SetSizeRelH({RelativeFrom:AscCommon.c_oAscSizeRelFromH.sizerelfromhPage,Percent:0});if(bCheckWrapPolygon)this.Check_WrapPolygon();if(undefined!=Props.description)this.docPr.setDescr(Props.description);if(undefined!=Props.title)this.docPr.setTitle(Props.title)};ParaDrawing.prototype.CheckWH=function(){if(!this.GraphicObj)return;var oldExtW=
this.Extent.W;var oldExtH=this.Extent.H;if(this.GraphicObj.spPr&&this.GraphicObj.spPr.xfrm&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extX)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extY)){this.Extent.W=this.GraphicObj.spPr.xfrm.extX;this.Extent.H=this.GraphicObj.spPr.xfrm.extY}this.GraphicObj.recalculate();this.Extent.W=oldExtW;this.Extent.H=oldExtH;var extX,extY,rot;if(this.GraphicObj.spPr&&this.GraphicObj.spPr.xfrm){if(AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extX)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extY)){extX=
this.GraphicObj.spPr.xfrm.extX;extY=this.GraphicObj.spPr.xfrm.extY}else{extX=5;extY=5}if(AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.rot))rot=this.GraphicObj.spPr.xfrm.rot;else rot=0}else{extX=5;extY=5;rot=0}this.setExtent(extX,extY);var EEL=0,EET=0,EER=0,EEB=0;{var xc=this.GraphicObj.localTransform.TransformPointX(this.GraphicObj.extX/2,this.GraphicObj.extY/2);var yc=this.GraphicObj.localTransform.TransformPointY(this.GraphicObj.extX/2,this.GraphicObj.extY/2);var oBounds=this.GraphicObj.bounds;
var LineCorrect=0;if(this.GraphicObj.pen&&this.GraphicObj.pen.Fill&&this.GraphicObj.pen.Fill.fill){LineCorrect=this.GraphicObj.pen.w==null?12700:parseInt(this.GraphicObj.pen.w);LineCorrect/=72E3}var l=oBounds.x;var r=l+oBounds.w;var t=oBounds.y;var b=t+oBounds.h;var startX,startY;if(!AscFormat.checkNormalRotate(rot)){var temp=extX;extX=extY;extY=temp}startX=xc-extX/2;startY=yc-extY/2;if(l>startX)l=startX;if(r<startX+extX)r=startX+extX;if(t>startY)t=startY;if(b<startY+extY)b=startY+extY;EEL=xc-extX/
2-l+LineCorrect;EET=yc-extY/2-t+LineCorrect;EER=r+LineCorrect-(xc+extX/2);EEB=b+LineCorrect-(yc+extY/2)}this.setEffectExtent(EEL,EET,EER,EEB);this.Check_WrapPolygon()};ParaDrawing.prototype.Check_WrapPolygon=function(){if((this.wrappingType===WRAPPING_TYPE_TIGHT||this.wrappingType===WRAPPING_TYPE_THROUGH)&&this.wrappingPolygon&&!this.wrappingPolygon.edited){this.GraphicObj.recalculate();this.wrappingPolygon.setArrRelPoints(this.wrappingPolygon.calculate(this.GraphicObj))}};ParaDrawing.prototype.Draw=
function(X,Y,pGraphics,PDSE){var nPageIndex=null;if(AscCommon.isRealObject(PDSE))nPageIndex=PDSE.Page;if(pGraphics.Start_Command){pGraphics.m_aDrawings.push(new AscFormat.ParaDrawingStruct(undefined,this));return}if(this.Is_Inline()){pGraphics.shapePageIndex=nPageIndex;this.draw(pGraphics,PDSE);pGraphics.shapePageIndex=null}if(pGraphics.End_Command)pGraphics.End_Command()};ParaDrawing.prototype.Measure=function(){if(!this.GraphicObj){this.Width=0;this.Height=0;return}if(AscFormat.isRealNumber(this.Extent.W)&&
AscFormat.isRealNumber(this.Extent.H)&&(!this.GraphicObj.checkAutofit||!this.GraphicObj.checkAutofit())&&!this.SizeRelH&&!this.SizeRelV){var oEffectExtent=this.EffectExtent;var W,H;if(AscFormat.isRealNumber(this.GraphicObj.rot))if(AscFormat.checkNormalRotate(this.GraphicObj.rot)){W=this.Extent.W;H=this.Extent.H}else{W=this.Extent.H;H=this.Extent.W}else{W=this.Extent.W;H=this.Extent.H}this.Width=W+AscFormat.getValOrDefault(oEffectExtent.L,0)+AscFormat.getValOrDefault(oEffectExtent.R,0);this.Height=
H+AscFormat.getValOrDefault(oEffectExtent.T,0)+AscFormat.getValOrDefault(oEffectExtent.B,0);this.WidthVisible=this.Width}else{this.GraphicObj.recalculate();if(this.GraphicObj.recalculateText)this.GraphicObj.recalculateText();if(this.PositionH.UseAlign||this.Is_Inline())this.Width=this.GraphicObj.bounds.w;else this.Width=this.GraphicObj.extX;this.WidthVisible=this.Width;if(this.PositionV.UseAlign||this.Is_Inline())this.Height=this.GraphicObj.bounds.h;else this.Height=this.GraphicObj.extY}};ParaDrawing.prototype.SaveRecalculateObject=
function(Copy){var DrawingObj={};DrawingObj.Type=this.Type;DrawingObj.DrawingType=this.DrawingType;DrawingObj.WrappingType=this.wrappingType;if(drawing_Anchor===this.Get_DrawingType()&&true===this.Use_TextWrap()){var oDistance=this.Get_Distance();DrawingObj.FlowPos={X:this.X-oDistance.L,Y:this.Y-oDistance.T,W:this.Width+oDistance.R,H:this.Height+oDistance.B}}DrawingObj.PageNum=this.PageNum;DrawingObj.X=this.X;DrawingObj.Y=this.Y;DrawingObj.spRecaclcObject=this.GraphicObj.getRecalcObject();return DrawingObj};
ParaDrawing.prototype.LoadRecalculateObject=function(RecalcObj){this.updatePosition3(RecalcObj.PageNum,RecalcObj.X,RecalcObj.Y);this.GraphicObj.setRecalcObject(RecalcObj.spRecaclcObject)};ParaDrawing.prototype.Reassign_ImageUrls=function(mapUrls){if(this.GraphicObj)this.GraphicObj.Reassign_ImageUrls(mapUrls)};ParaDrawing.prototype.PrepareRecalculateObject=function(){};ParaDrawing.prototype.Is_RealContent=function(){return true};ParaDrawing.prototype.Can_AddNumbering=function(){if(drawing_Inline===
this.DrawingType)return true;return false};ParaDrawing.prototype.Copy=function(oPr){var c=new ParaDrawing(this.Extent.W,this.Extent.H,null,editor.WordControl.m_oLogicDocument.DrawingDocument,null,null);c.Set_DrawingType(this.DrawingType);if(AscCommon.isRealObject(this.GraphicObj)){var oCopyPr=new AscFormat.CCopyObjectProperties;oCopyPr.contentCopyPr=oPr;c.Set_GraphicObject(this.GraphicObj.copy(oCopyPr));c.GraphicObj.setParent(c)}var d=this.Distance;c.Set_PositionH(this.PositionH.RelativeFrom,this.PositionH.Align,
this.PositionH.Value,this.PositionH.Percent);c.Set_PositionV(this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent);c.Set_Distance(d.L,d.T,d.R,d.B);c.Set_AllowOverlap(this.AllowOverlap);c.Set_WrappingType(this.wrappingType);if(this.wrappingPolygon)c.wrappingPolygon.fromOther(this.wrappingPolygon);c.Set_BehindDoc(this.behindDoc);c.Set_RelativeHeight(this.RelativeHeight);if(this.SizeRelH)c.SetSizeRelH({RelativeFrom:this.SizeRelH.RelativeFrom,Percent:this.SizeRelH.Percent});
if(this.SizeRelV)c.SetSizeRelV({RelativeFrom:this.SizeRelV.RelativeFrom,Percent:this.SizeRelV.Percent});if(AscFormat.isRealNumber(this.Extent.W)&&AscFormat.isRealNumber(this.Extent.H))c.setExtent(this.Extent.W,this.Extent.H);var EE=this.EffectExtent;if(EE.L>0||EE.T>0||EE.R>0||EE.B>0)c.setEffectExtent(EE.L,EE.T,EE.R,EE.B);c.docPr.setFromOther(this.docPr);if(this.ParaMath)c.Set_ParaMath(this.ParaMath.Copy());return c};ParaDrawing.prototype.IsEqual=function(oElement){return false};ParaDrawing.prototype.Get_Id=
function(){return this.Id};ParaDrawing.prototype.GetId=function(){return this.Id};ParaDrawing.prototype.setParagraphTabs=function(tabs){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphTabs==="function")this.GraphicObj.setParagraphTabs(tabs)};ParaDrawing.prototype.IsMovingTableBorder=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.IsMovingTableBorder==="function")return this.GraphicObj.IsMovingTableBorder();return false};ParaDrawing.prototype.SetVerticalClip=
function(Top,Bottom){this.LineTop=Top;this.LineBottom=Bottom};ParaDrawing.prototype.Update_Position=function(Paragraph,ParaLayout,PageLimits,PageLimitsOrigin,LineNum){if(undefined!=this.PositionH_Old){this.PositionH.RelativeFrom=this.PositionH_Old.RelativeFrom2;this.PositionH.Align=this.PositionH_Old.Align2;this.PositionH.Value=this.PositionH_Old.Value2;this.PositionH.Percent=this.PositionH_Old.Percent2}if(undefined!=this.PositionV_Old){this.PositionV.RelativeFrom=this.PositionV_Old.RelativeFrom2;
this.PositionV.Align=this.PositionV_Old.Align2;this.PositionV.Value=this.PositionV_Old.Value2;this.PositionV.Percent=this.PositionV_Old.Percent2}var oDocumentContent=this.Parent&&this.Parent.Parent;if(oDocumentContent&&oDocumentContent.IsBlockLevelSdtContent())oDocumentContent=oDocumentContent.Parent.Parent;this.Parent=Paragraph;this.DocumentContent=oDocumentContent;var PageNum=ParaLayout.PageNum;var OtherFlowObjects=editor.WordControl.m_oLogicDocument.DrawingObjects.getAllFloatObjectsOnPage(PageNum,
this.Parent.Parent);var bInline=this.Is_Inline();this.Internal_Position.Set(this.GraphicObj.extX,this.GraphicObj.extY,this.getXfrmRot(),this.EffectExtent,this.YOffset,ParaLayout,PageLimits);this.Internal_Position.Calculate_X(bInline,this.PositionH.RelativeFrom,this.PositionH.Align,this.PositionH.Value,this.PositionH.Percent);this.Internal_Position.Calculate_Y(bInline,this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent);var bCorrect=false;if(oDocumentContent&&
oDocumentContent.IsTableCellContent&&oDocumentContent.IsTableCellContent(false))bCorrect=true;if(this.PositionH.RelativeFrom!==c_oAscRelativeFromH.Page||this.PositionV.RelativeFrom!==c_oAscRelativeFromV.Page)bCorrect=true;this.Internal_Position.Correct_Values(bInline,PageLimits,this.AllowOverlap,this.Use_TextWrap(),OtherFlowObjects,bCorrect);this.GraphicObj.bounds.l=this.GraphicObj.bounds.x+this.Internal_Position.CalcX;this.GraphicObj.bounds.r=this.GraphicObj.bounds.x+this.GraphicObj.bounds.w+this.Internal_Position.CalcX;
this.GraphicObj.bounds.t=this.GraphicObj.bounds.y+this.Internal_Position.CalcY;this.GraphicObj.bounds.b=this.GraphicObj.bounds.y+this.GraphicObj.bounds.h+this.Internal_Position.CalcY;var OldPageNum=this.PageNum;this.PageNum=PageNum;this.LineNum=LineNum;this.X=this.Internal_Position.CalcX;this.Y=this.Internal_Position.CalcY;if(undefined!=this.PositionH_Old){this.PositionH.RelativeFrom=this.PositionH_Old.RelativeFrom;this.PositionH.Align=this.PositionH_Old.Align;this.PositionH.Value=this.PositionH_Old.Value;
this.PositionH.Percent=this.PositionH_Old.Percent;var Value=this.Internal_Position.Calculate_X_Value(this.PositionH_Old.RelativeFrom);this.Set_PositionH(this.PositionH_Old.RelativeFrom,false,Value,false);this.X=this.Internal_Position.Calculate_X(bInline,this.PositionH.RelativeFrom,this.PositionH.Align,this.PositionH.Value,this.PositionH.Percent)}if(undefined!=this.PositionV_Old){this.PositionV.RelativeFrom=this.PositionV_Old.RelativeFrom;this.PositionV.Align=this.PositionV_Old.Align;this.PositionV.Value=
this.PositionV_Old.Value;this.PositionV.Percent=this.PositionV_Old.Percent;var Value=this.Internal_Position.Calculate_Y_Value(this.PositionV_Old.RelativeFrom);this.Set_PositionV(this.PositionV_Old.RelativeFrom,false,Value,false);this.Y=this.Internal_Position.Calculate_Y(bInline,this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent)}this.OrigX=this.X;this.OrigY=this.Y;this.ShiftX=0;this.ShiftY=0;this.updatePosition3(this.PageNum,this.X,this.Y,OldPageNum);this.useWrap=
this.Use_TextWrap()};ParaDrawing.prototype.GetClipRect=function(){if(this.Is_Inline()||this.Use_TextWrap()){var oCell;if(this.DocumentContent&&(oCell=this.DocumentContent.IsTableCellContent(true))){var arrPages=oCell.GetCurPageByAbsolutePage(this.PageNum);for(var nIndex=0,nCount=arrPages.length;nIndex<nCount;++nIndex){var oPageBounds=oCell.GetPageBounds(arrPages[nIndex]);if(this.GraphicObj.bounds.isIntersect(oPageBounds.Left,oPageBounds.Top,oPageBounds.Right,oPageBounds.Bottom))return new AscFormat.CGraphicBounds(oPageBounds.Left,
oPageBounds.Top,oPageBounds.Right,oPageBounds.Bottom)}}}return null};ParaDrawing.prototype.Update_PositionYHeaderFooter=function(TopMarginY,BottomMarginY){this.Internal_Position.Update_PositionYHeaderFooter(TopMarginY,BottomMarginY);this.Internal_Position.Calculate_Y(this.Is_Inline(),this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent);this.OrigY=this.Internal_Position.CalcY;this.Y=this.OrigY+this.ShiftY;this.updatePosition3(this.PageNum,this.X,this.Y,this.PageNum)};
ParaDrawing.prototype.Reset_SavedPosition=function(){this.PositionV_Old=undefined;this.PositionH_Old=undefined};ParaDrawing.prototype.setParagraphBorders=function(val){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphBorders==="function")this.GraphicObj.setParagraphBorders(val)};ParaDrawing.prototype.deselect=function(){this.selected=false;if(this.GraphicObj&&this.GraphicObj.deselect)this.GraphicObj.deselect()};ParaDrawing.prototype.updatePosition3=function(pageIndex,
x,y,oldPageNum){var _x=x,_y=y;this.graphicObjects.removeById(pageIndex,this.Get_Id());if(AscFormat.isRealNumber(oldPageNum))this.graphicObjects.removeById(oldPageNum,this.Get_Id());var bChangePageIndex=this.pageIndex!==pageIndex;this.setPageIndex(pageIndex);if(typeof this.GraphicObj.setStartPage==="function"){var bIsHfdFtr=this.DocumentContent&&this.DocumentContent.IsHdrFtr();this.GraphicObj.setStartPage(pageIndex,bIsHfdFtr,bIsHfdFtr||bChangePageIndex)}if(!(this.DocumentContent&&this.DocumentContent.IsHdrFtr()&&
this.DocumentContent.Get_StartPage_Absolute()!==pageIndex)){this.graphicObjects.addObjectOnPage(pageIndex,this.GraphicObj);this.bNoNeedToAdd=false}else this.bNoNeedToAdd=true;if(this.GraphicObj.bNeedUpdatePosition||!(AscFormat.isRealNumber(this.GraphicObj.posX)&&AscFormat.isRealNumber(this.GraphicObj.posY))||!(Math.abs(this.GraphicObj.posX-_x)<MOVE_DELTA&&Math.abs(this.GraphicObj.posY-_y)<MOVE_DELTA))this.GraphicObj.updatePosition(_x,_y);if(this.GraphicObj.bNeedUpdatePosition||!(AscFormat.isRealNumber(this.wrappingPolygon.posX)&&
AscFormat.isRealNumber(this.wrappingPolygon.posY))||!(Math.abs(this.wrappingPolygon.posX-_x)<MOVE_DELTA&&Math.abs(this.wrappingPolygon.posY-_y)<MOVE_DELTA))this.wrappingPolygon.updatePosition(_x,_y);this.calculateSnapArrays()};ParaDrawing.prototype.calculateAfterChangeTheme=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.calculateAfterChangeTheme==="function")this.GraphicObj.calculateAfterChangeTheme()};ParaDrawing.prototype.selectionIsEmpty=function(){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.selectionIsEmpty==="function")return this.GraphicObj.selectionIsEmpty();return false};ParaDrawing.prototype.recalculateDocContent=function(){};ParaDrawing.prototype.Shift=function(Dx,Dy){this.ShiftX=Dx;this.ShiftY=Dy;this.X=this.OrigX+Dx;this.Y=this.OrigY+Dy;this.updatePosition3(this.PageNum,this.X,this.Y)};ParaDrawing.prototype.IsLayoutInCell=function(){if(this.LogicDocument&&this.LogicDocument.GetCompatibilityMode()>=AscCommon.document_compatibility_mode_Word15)return true;
return this.LayoutInCell};ParaDrawing.prototype.Get_Distance=function(){var oDist=this.Distance;return new AscFormat.CDistance(AscFormat.getValOrDefault(oDist.L,AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT),AscFormat.getValOrDefault(oDist.T,0),AscFormat.getValOrDefault(oDist.R,AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT),AscFormat.getValOrDefault(oDist.B,0))};ParaDrawing.prototype.Set_XYForAdd=function(X,Y,NearPos,PageNum){if(null!==NearPos){var Layout=NearPos.Paragraph.Get_Layout(NearPos.ContentPos,this);this.private_SetXYByLayout(X,
Y,PageNum,Layout,true,true);var nRecalcIndex=null;var oLogicDocument=this.document;if(oLogicDocument){nRecalcIndex=oLogicDocument.Get_History().GetRecalculateIndex();this.SetSkipOnRecalculate(true);oLogicDocument.TurnOff_InterfaceEvents();oLogicDocument.Recalculate();oLogicDocument.TurnOn_InterfaceEvents(false);this.SetSkipOnRecalculate(false)}if(null!==nRecalcIndex)oLogicDocument.Get_History().SetRecalculateIndex(nRecalcIndex);Layout=NearPos.Paragraph.Get_Layout(NearPos.ContentPos,this);this.private_SetXYByLayout(X,
Y,PageNum,Layout,true,true)}};ParaDrawing.prototype.SetSkipOnRecalculate=function(isSkip){this.SkipOnRecalculate=isSkip};ParaDrawing.prototype.IsSkipOnRecalculate=function(){return this.SkipOnRecalculate};ParaDrawing.prototype.Set_XY=function(X,Y,Paragraph,PageNum,bResetAlign){if(Paragraph){var PageNumOld=this.PageNum;var ContentPos=Paragraph.Get_DrawingObjectContentPos(this.Get_Id());if(null===ContentPos)return;var Layout=Paragraph.Get_Layout(ContentPos,this);this.private_SetXYByLayout(X,Y,PageNum,
Layout,bResetAlign||true!==this.PositionH.Align?true:false,bResetAlign||true!==this.PositionV.Align?true:false);var nRecalcIndex=null;var oLogicDocument=this.document;if(oLogicDocument){nRecalcIndex=oLogicDocument.Get_History().GetRecalculateIndex();this.SetSkipOnRecalculate(true);oLogicDocument.Recalculate();this.SetSkipOnRecalculate(false)}if(null!==nRecalcIndex)oLogicDocument.Get_History().SetRecalculateIndex(nRecalcIndex);if(!this.LogicDocument||null===this.LogicDocument.FullRecalc.Id||PageNum<
this.LogicDocument.FullRecalc.PageIndex&&PageNumOld<this.LogicDocument.FullRecalc.PageIndex)Layout=Paragraph.Get_Layout(ContentPos,this);this.private_SetXYByLayout(X,Y,PageNum,Layout,bResetAlign||true!==this.PositionH.Align?true:false,bResetAlign||true!==this.PositionV.Align?true:false)}};ParaDrawing.prototype.private_SetXYByLayout=function(X,Y,PageNum,Layout,bChangeX,bChangeY){if(!Layout)return;this.PageNum=PageNum;this.Internal_Position.Set(this.GraphicObj.extX,this.GraphicObj.extY,this.getXfrmRot(),
this.EffectExtent,this.YOffset,Layout.ParagraphLayout,Layout.PageLimitsOrigin);this.Internal_Position.Calculate_X(false,c_oAscRelativeFromH.Page,false,X-Layout.PageLimitsOrigin.X,false);this.Internal_Position.Calculate_Y(false,c_oAscRelativeFromV.Page,false,Y-Layout.PageLimitsOrigin.Y,false);var bCorrect=false;if(this.DocumentContent&&this.DocumentContent.IsTableCellContent&&this.DocumentContent.IsTableCellContent(false))bCorrect=true;if(this.PositionH.RelativeFrom!==c_oAscRelativeFromH.Page||this.PositionV.RelativeFrom!==
c_oAscRelativeFromV.Page)bCorrect=true;this.Internal_Position.Correct_Values(false,Layout.PageLimits,this.AllowOverlap,this.Use_TextWrap(),[],bCorrect);if(true===bChangeX){this.X=this.Internal_Position.CalcX;var ValueX=this.Internal_Position.Calculate_X_Value(this.PositionH.RelativeFrom);this.Set_PositionH(this.PositionH.RelativeFrom,false,ValueX,false);this.X=this.Internal_Position.Calculate_X(false,this.PositionH.RelativeFrom,this.PositionH.Align,this.PositionH.Value,this.PositionH.Percent)}if(true===
bChangeY){this.Y=this.Internal_Position.CalcY;var ValueY=this.Internal_Position.Calculate_Y_Value(this.PositionV.RelativeFrom);this.Set_PositionV(this.PositionV.RelativeFrom,false,ValueY,false);this.Y=this.Internal_Position.Calculate_Y(false,this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent)}};ParaDrawing.prototype.Get_DrawingType=function(){return this.DrawingType};ParaDrawing.prototype.Is_Inline=function(){if(this.Parent&&this.Parent.Get_ParentTextTransform&&
this.Parent.Get_ParentTextTransform())return true;return drawing_Inline===this.DrawingType?true:false};ParaDrawing.prototype.IsInline=function(){return this.Is_Inline()};ParaDrawing.prototype.Use_TextWrap=function(){if(!this.Parent||!this.Parent.Get_FramePr||null!==this.Parent.Get_FramePr()&&undefined!==this.Parent.Get_FramePr())return false;return drawing_Anchor===this.DrawingType&&!(this.wrappingType===WRAPPING_TYPE_NONE)};ParaDrawing.prototype.IsUseTextWrap=function(){return this.Use_TextWrap()};
ParaDrawing.prototype.Draw_Selection=function(){var Padding=this.DrawingDocument.GetMMPerDot(6);var extX,extY;if(this.GraphicObj){extX=this.GraphicObj.extX;extY=this.GraphicObj.extY}else{extX=this.getXfrmExtX();extY=this.getXfrmExtY()}var rot=this.getXfrmRot();if(AscFormat.checkNormalRotate(rot))this.DrawingDocument.AddPageSelection(this.PageNum,this.X-this.EffectExtent.L-Padding,this.Y-this.EffectExtent.T-Padding,this.EffectExtent.L+extX+this.EffectExtent.R+2*Padding,this.EffectExtent.T+extY+this.EffectExtent.B+
2*Padding);else this.DrawingDocument.AddPageSelection(this.PageNum,this.X+extX/2-extY/2-this.EffectExtent.L-Padding,this.Y+extY/2-extX/2-this.EffectExtent.T-Padding,this.EffectExtent.L+extY+this.EffectExtent.R+2*Padding,this.EffectExtent.T+extX+this.EffectExtent.B+2*Padding)};ParaDrawing.prototype.CanInsertToPos=function(oAnchorPos){if(!oAnchorPos||!oAnchorPos.Paragraph||!oAnchorPos.Paragraph.Parent)return false;return!((this.IsShape()||this.IsGroup())&&(true===oAnchorPos.Paragraph.Parent.Is_DrawingShape()||
true===oAnchorPos.Paragraph.Parent.IsFootnote()))};ParaDrawing.prototype.OnEnd_MoveInline=function(NearPos){if(!this.Parent)return;NearPos.Paragraph.Check_NearestPos(NearPos);var oRun=this.GetRun();var oPictureCC=false;if(oRun){var arrContentControls=oRun.GetParentContentControls();for(var nIndex=arrContentControls.length-1;nIndex>=0;--nIndex)if(arrContentControls[nIndex].IsPicture()){oPictureCC=arrContentControls[nIndex];break}}var oDstRun=null;var arrClasses=NearPos.Paragraph.GetClassesByPos(NearPos.ContentPos);
for(var nIndex=arrClasses.length-1;nIndex>=0;--nIndex)if(arrClasses[nIndex]instanceof ParaRun){oDstRun=arrClasses[nIndex];break}if(!oDstRun||oPictureCC&&oDstRun===oRun||oDstRun.GetParentForm()){NearPos.Paragraph.Clear_NearestPosArray();return}var NewParaDrawing=this.Copy();var RunPr=this.Remove_FromDocument(false);this.DocumentContent.Select_DrawingObject(NewParaDrawing.GetId());NewParaDrawing.Add_ToDocument(NearPos,true,RunPr,undefined,oPictureCC)};ParaDrawing.prototype.Get_ParentTextTransform=function(){if(this.Parent)return this.Parent.Get_ParentTextTransform();
return null};ParaDrawing.prototype.GoTo_Text=function(bBefore,bUpdateStates){var Paragraph=this.Get_ParentParagraph();if(Paragraph){Paragraph.MoveCursorToDrawing(this.Id,bBefore);Paragraph.Document_SetThisElementCurrent(undefined===bUpdateStates?true:bUpdateStates)}};ParaDrawing.prototype.Remove_FromDocument=function(bRecalculate){var oResult=null;if(!this.Parent)return oResult;var oRun=this.Parent.Get_DrawingObjectRun(this.Id);if(oRun){var oGrObject=this.GraphicObj;if(oGrObject&&oGrObject.getObjectType()===
AscDFH.historyitem_type_Shape)if(oGrObject.signatureLine)oGrObject.setSignature(oGrObject.signatureLine);var oPictureCC=null;var arrContentControls=oRun.GetParentContentControls();for(var nIndex=arrContentControls.length-1;nIndex>=0;--nIndex)if(arrContentControls[nIndex].IsPicture()){oPictureCC=arrContentControls[nIndex];break}if(oPictureCC)oPictureCC.RemoveContentControlWrapper();oRun.Remove_DrawingObject(this.Id);if(oRun.IsInHyperlink())oResult=new CTextPr;else oResult=oRun.GetTextPr();if(oGrObject&&
oGrObject.getObjectType()===AscDFH.historyitem_type_Shape)if(oGrObject.signatureLine){editor.sendEvent("asc_onRemoveSignature",oGrObject.signatureLine.id);oGrObject.setSignature(oGrObject.signatureLine)}}if(false!=bRecalculate)editor.WordControl.m_oLogicDocument.Recalculate();return oResult};ParaDrawing.prototype.Get_ParentParagraph=function(){if(this.Parent instanceof Paragraph)return this.Parent;if(this.Parent instanceof ParaRun)return this.Parent.Paragraph;if(this.Parent&&this.Parent.GetParagraph())return this.Parent.GetParagraph();
return null};ParaDrawing.prototype.SelectAsText=function(){var oParagraph=this.GetParagraph();var oRun=this.GetRun();if(!oParagraph||!oRun)return;var oDocument=oParagraph.GetLogicDocument();if(!oDocument)return;oDocument.RemoveSelection();oRun.Make_ThisElementCurrent(false);oRun.SetCursorPosition(oRun.GetElementPosition(this));var oStartPos=oDocument.GetContentPosition(false);oRun.SetCursorPosition(oRun.GetElementPosition(this)+1);var oEndPos=oDocument.GetContentPosition(false);oDocument.RemoveSelection();
oDocument.SetSelectionByContentPositions(oStartPos,oEndPos)};ParaDrawing.prototype.Add_ToDocument=function(NearPos,bRecalculate,RunPr,Run,oPictureCC){NearPos.Paragraph.Check_NearestPos(NearPos);var LogicDocument=this.DrawingDocument.m_oLogicDocument;var Para=new Paragraph(this.DrawingDocument,LogicDocument);var DrawingRun=new ParaRun(Para);DrawingRun.Add_ToContent(0,this);if(RunPr)DrawingRun.Set_Pr(RunPr.Copy());if(Run)DrawingRun.SetReviewTypeWithInfo(Run.GetReviewType(),Run.GetReviewInfo());if(oPictureCC){var oSdt=
new CInlineLevelSdt;oSdt.SetPicturePr(true);oSdt.ReplacePlaceHolderWithContent();oSdt.AddToContent(0,DrawingRun);Para.Add_ToContent(0,oSdt);var oFormPr=oPictureCC.GetFormPr();if(oFormPr)oSdt.SetFormPr(oFormPr.Copy())}else Para.Add_ToContent(0,DrawingRun);var SelectedElement=new CSelectedElement(Para,false);var SelectedContent=new CSelectedContent;SelectedContent.Add(SelectedElement);SelectedContent.SetMoveDrawing(true);SelectedContent.DrawingObjects.push(this);NearPos.Paragraph.Parent.InsertContent(SelectedContent,
NearPos);NearPos.Paragraph.Clear_NearestPosArray();NearPos.Paragraph.Correct_Content();this.Set_Parent(NearPos.Paragraph);if(false!=bRecalculate)LogicDocument.Recalculate()};ParaDrawing.prototype.Add_ToDocument2=function(Paragraph){var DrawingRun=new ParaRun(Paragraph);DrawingRun.Add_ToContent(0,this);Paragraph.Add_ToContent(0,DrawingRun);this.Set_Parent(Paragraph)};ParaDrawing.prototype.UpdateCursorType=function(X,Y,PageIndex){this.DrawingDocument.SetCursorType("move",new AscCommon.CMouseMoveData);
if(null!=this.Parent){var Lock=this.Parent.Lock;if(true===Lock.Is_Locked()){var PNum=Math.max(0,Math.min(PageIndex-this.Parent.PageNum,this.Parent.Pages.length-1));var _X=this.Parent.Pages[PNum].X;var _Y=this.Parent.Pages[PNum].Y;var MMData=new AscCommon.CMouseMoveData;var Coords=this.DrawingDocument.ConvertCoordsToCursorWR(_X,_Y,this.Parent.Get_StartPage_Absolute()+(PageIndex-this.Parent.PageNum));MMData.X_abs=Coords.X-5;MMData.Y_abs=Coords.Y;MMData.Type=Asc.c_oAscMouseMoveDataTypes.LockedObject;
MMData.UserId=Lock.Get_UserId();MMData.HaveChanges=Lock.Have_Changes();MMData.LockedObjectType=c_oAscMouseMoveLockedObjectType.Common;editor.sync_MouseMoveCallback(MMData)}}};ParaDrawing.prototype.Get_AnchorPos=function(){if(!this.Parent)return null;return this.Parent.Get_AnchorPos(this)};ParaDrawing.prototype.CheckRecalcAutoFit=function(oSectPr){if(this.GraphicObj&&this.GraphicObj.CheckNeedRecalcAutoFit)if(this.GraphicObj.CheckNeedRecalcAutoFit(oSectPr)){if(this.GraphicObj)this.GraphicObj.recalcWrapPolygon&&
this.GraphicObj.recalcWrapPolygon();this.Measure()}};ParaDrawing.prototype.Get_ParentObject_or_DocumentPos=function(){if(this.Parent!=null)return this.Parent.Get_ParentObject_or_DocumentPos()};ParaDrawing.prototype.Refresh_RecalcData=function(Data){var oRun=this.GetRun();if(oRun){if(AscCommon.isRealObject(Data))switch(Data.Type){case AscDFH.historyitem_Drawing_Distance:{if(this.GraphicObj){this.GraphicObj.recalcWrapPolygon&&this.GraphicObj.recalcWrapPolygon();this.GraphicObj.addToRecalculate()}break}case AscDFH.historyitem_Drawing_SetExtent:{oRun.RecalcInfo.Measure=
true;break}case AscDFH.historyitem_Drawing_SetSizeRelH:case AscDFH.historyitem_Drawing_SetSizeRelV:case AscDFH.historyitem_Drawing_SetGraphicObject:{if(this.GraphicObj){this.GraphicObj.handleUpdateExtents&&this.GraphicObj.handleUpdateExtents();this.GraphicObj.addToRecalculate()}oRun.RecalcInfo.Measure=true;break}case AscDFH.historyitem_Drawing_WrappingType:{if(this.GraphicObj){this.GraphicObj.recalcWrapPolygon&&this.GraphicObj.recalcWrapPolygon();this.GraphicObj.addToRecalculate()}break}}return oRun.Refresh_RecalcData2()}};
ParaDrawing.prototype.Refresh_RecalcData2=function(Data){var oRun=this.GetRun();if(oRun)return oRun.Refresh_RecalcData2()};ParaDrawing.prototype.hyperlinkCheck=function(bCheck){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkCheck==="function")return this.GraphicObj.hyperlinkCheck(bCheck);return null};ParaDrawing.prototype.hyperlinkCanAdd=function(bCheckInHyperlink){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkCanAdd==="function")return this.GraphicObj.hyperlinkCanAdd(bCheckInHyperlink);
return false};ParaDrawing.prototype.hyperlinkRemove=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkCanAdd==="function")return this.GraphicObj.hyperlinkRemove();return false};ParaDrawing.prototype.hyperlinkModify=function(HyperProps){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkModify==="function")return this.GraphicObj.hyperlinkModify(HyperProps)};ParaDrawing.prototype.hyperlinkAdd=function(HyperProps){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.hyperlinkAdd==="function")return this.GraphicObj.hyperlinkAdd(HyperProps)};ParaDrawing.prototype.documentStatistics=function(stat){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.documentStatistics==="function")this.GraphicObj.documentStatistics(stat)};ParaDrawing.prototype.documentCreateFontCharMap=function(fontMap){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.documentCreateFontCharMap==="function")this.GraphicObj.documentCreateFontCharMap(fontMap)};
ParaDrawing.prototype.documentCreateFontMap=function(fontMap){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.documentCreateFontMap==="function")this.GraphicObj.documentCreateFontMap(fontMap)};ParaDrawing.prototype.tableCheckSplit=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableCheckSplit==="function")return this.GraphicObj.tableCheckSplit();return false};ParaDrawing.prototype.tableCheckMerge=function(){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.tableCheckMerge==="function")return this.GraphicObj.tableCheckMerge();return false};ParaDrawing.prototype.tableSelect=function(Type){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableSelect==="function")return this.GraphicObj.tableSelect(Type)};ParaDrawing.prototype.tableRemoveTable=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableRemoveTable==="function")return this.GraphicObj.tableRemoveTable()};ParaDrawing.prototype.tableSplitCell=
function(Cols,Rows){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableSplitCell==="function")return this.GraphicObj.tableSplitCell(Cols,Rows)};ParaDrawing.prototype.tableMergeCells=function(Cols,Rows){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableMergeCells==="function")return this.GraphicObj.tableMergeCells(Cols,Rows)};ParaDrawing.prototype.tableRemoveCol=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableRemoveCol===
"function")return this.GraphicObj.tableRemoveCol()};ParaDrawing.prototype.tableAddCol=function(bBefore,nCount){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableAddCol==="function")return this.GraphicObj.tableAddCol(bBefore,nCount)};ParaDrawing.prototype.tableRemoveRow=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableRemoveRow==="function")return this.GraphicObj.tableRemoveRow()};ParaDrawing.prototype.tableAddRow=function(bBefore,nCount){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.tableAddRow==="function")return this.GraphicObj.tableAddRow(bBefore,nCount)};ParaDrawing.prototype.getCurrentParagraph=function(bIgnoreSelection,arrSelectedParagraphs){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getCurrentParagraph==="function")return this.GraphicObj.getCurrentParagraph(bIgnoreSelection,arrSelectedParagraphs);if(this.Parent instanceof Paragraph)return this.Parent};ParaDrawing.prototype.GetSelectedText=function(bClearText,oPr){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.GetSelectedText==="function")return this.GraphicObj.GetSelectedText(bClearText,oPr);return""};ParaDrawing.prototype.getCurPosXY=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getCurPosXY==="function")return this.GraphicObj.getCurPosXY();return{X:0,Y:0}};ParaDrawing.prototype.setParagraphKeepLines=function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphKeepLines==="function")return this.GraphicObj.setParagraphKeepLines(Value)};
ParaDrawing.prototype.setParagraphKeepNext=function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphKeepNext==="function")return this.GraphicObj.setParagraphKeepNext(Value)};ParaDrawing.prototype.setParagraphWidowControl=function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphWidowControl==="function")return this.GraphicObj.setParagraphWidowControl(Value)};ParaDrawing.prototype.setParagraphPageBreakBefore=function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.setParagraphPageBreakBefore==="function")return this.GraphicObj.setParagraphPageBreakBefore(Value)};ParaDrawing.prototype.isTextSelectionUse=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.isTextSelectionUse==="function")return this.GraphicObj.isTextSelectionUse();return false};ParaDrawing.prototype.paragraphFormatPaste=function(CopyTextPr,CopyParaPr,Bool){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.isTextSelectionUse==="function")return this.GraphicObj.paragraphFormatPaste(CopyTextPr,
CopyParaPr,Bool)};ParaDrawing.prototype.getNearestPos=function(x,y,pageIndex){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getNearestPos==="function")return this.GraphicObj.getNearestPos(x,y,pageIndex);return null};ParaDrawing.prototype.Write_ToBinary=function(Writer){Writer.WriteLong(this.Type);Writer.WriteString2(this.Id)};ParaDrawing.prototype.Write_ToBinary2=function(Writer){Writer.WriteLong(AscDFH.historyitem_type_Drawing);Writer.WriteString2(this.Id);AscFormat.writeDouble(Writer,
this.Extent.W);AscFormat.writeDouble(Writer,this.Extent.H);AscFormat.writeObject(Writer,this.GraphicObj);AscFormat.writeObject(Writer,this.DocumentContent);AscFormat.writeObject(Writer,this.Parent);AscFormat.writeObject(Writer,this.wrappingPolygon);AscFormat.writeLong(Writer,this.RelativeHeight);AscFormat.writeObject(Writer,this.docPr)};ParaDrawing.prototype.Read_FromBinary2=function(Reader){this.Id=Reader.GetString2();this.DrawingDocument=editor.WordControl.m_oLogicDocument.DrawingDocument;this.LogicDocument=
this.DrawingDocument?this.DrawingDocument.m_oLogicDocument:null;this.Extent.W=AscFormat.readDouble(Reader);this.Extent.H=AscFormat.readDouble(Reader);this.GraphicObj=AscFormat.readObject(Reader);this.DocumentContent=AscFormat.readObject(Reader);this.Parent=AscFormat.readObject(Reader);this.wrappingPolygon=AscFormat.readObject(Reader);this.RelativeHeight=AscFormat.readLong(Reader);this.docPr=AscFormat.readObject(Reader);if(this.wrappingPolygon)this.wrappingPolygon.wordGraphicObject=this;this.drawingDocument=
editor.WordControl.m_oLogicDocument.DrawingDocument;this.document=editor.WordControl.m_oLogicDocument;this.graphicObjects=editor.WordControl.m_oLogicDocument.DrawingObjects;this.graphicObjects.addGraphicObject(this);g_oTableId.Add(this,this.Id)};ParaDrawing.prototype.Load_LinkData=function(){};ParaDrawing.prototype.draw=function(graphics,PDSE){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.draw==="function"){graphics.SaveGrState();var bInline=this.Is_Inline();if(bInline&&AscCommon.isRealObject(PDSE)&&
AscFormat.isRealNumber(this.LineTop)&&AscFormat.isRealNumber(this.LineBottom)&&AscCommon.isRealObject(this.GraphicObj.bounds)){var x,y,w,h;var oEffectExtent=this.EffectExtent;x=PDSE.X;y=this.LineTop;w=this.GraphicObj.bounds.r-this.GraphicObj.bounds.l+AscFormat.getValOrDefault(oEffectExtent.R,0)+AscFormat.getValOrDefault(oEffectExtent.L,0);h=this.LineBottom-this.LineTop;graphics.AddClipRect(x,y,w,h)}this.GraphicObj.draw(graphics);graphics.RestoreGrState()}};ParaDrawing.prototype.drawAdjustments=function(){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.drawAdjustments==="function")this.GraphicObj.drawAdjustments()};ParaDrawing.prototype.getTransformMatrix=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getTransformMatrix==="function")return this.GraphicObj.getTransformMatrix();return null};ParaDrawing.prototype.getExtensions=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getExtensions==="function")return this.GraphicObj.getExtensions();return null};ParaDrawing.prototype.isGroup=
function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.isGroup==="function")return this.GraphicObj.isGroup();return false};ParaDrawing.prototype.isShapeChild=function(bRetShape){if(!this.Is_Inline()||!this.DocumentContent)return bRetShape?null:false;var cur_doc_content=this.DocumentContent;var oCell;while(oCell=cur_doc_content.IsTableCellContent(true))cur_doc_content=oCell.Row.Table.Parent;if(AscCommon.isRealObject(cur_doc_content.Parent)&&typeof cur_doc_content.Parent.getObjectType===
"function"&&cur_doc_content.Parent.getObjectType()===AscDFH.historyitem_type_Shape)return bRetShape?cur_doc_content.Parent:true;return bRetShape?null:false};ParaDrawing.prototype.checkShapeChildAndGetTopParagraph=function(paragraph){var parent_paragraph=!paragraph?this.Get_ParentParagraph():paragraph;var parent_doc_content=parent_paragraph.Parent;if(parent_doc_content.Parent instanceof AscFormat.CShape)if(!parent_doc_content.Parent.group)return parent_doc_content.Parent.parent.Get_ParentParagraph();
else{var top_group=parent_doc_content.Parent.group;while(top_group.group)top_group=top_group.group;return top_group.parent.Get_ParentParagraph()}else if(parent_doc_content.IsTableCellContent()){var top_doc_content=parent_doc_content;var oCell;while(oCell=top_doc_content.IsTableCellContent(true))top_doc_content=oCell.Row.Table.Parent;if(top_doc_content.Parent instanceof AscFormat.CShape)if(!top_doc_content.Parent.group)return top_doc_content.Parent.parent.Get_ParentParagraph();else{var top_group=top_doc_content.Parent.group;
while(top_group.group)top_group=top_group.group;return top_group.parent.Get_ParentParagraph()}else return parent_paragraph}return parent_paragraph};ParaDrawing.prototype.hit=function(x,y){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hit==="function")return this.GraphicObj.hit(x,y);return false};ParaDrawing.prototype.hitToTextRect=function(x,y){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hitToTextRect==="function")return this.GraphicObj.hitToTextRect(x,
y);return false};ParaDrawing.prototype.cursorGetPos=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.cursorGetPos==="function")return this.GraphicObj.cursorGetPos();return{X:0,Y:0}};ParaDrawing.prototype.getResizeCoefficients=function(handleNum,x,y){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getResizeCoefficients==="function")return this.GraphicObj.getResizeCoefficients(handleNum,x,y);return{kd1:1,kd2:1}};ParaDrawing.prototype.getParagraphParaPr=

@ -779,19 +779,19 @@ true;if(nTTRemainder<=0){sResult=sGroup+sResult;if(nRemValue<=0)break;continue}v
false}else if(!isPrevZero){sGroup+=arrChinese[0];isPrevZero=true}if(nRemainder<=0){sResult=sGroup+sResult;if(nRemValue<=0)break;continue}nQuotient=nRemainder/10|0;nRemainder=nRemainder-nQuotient*10;if(0!==nQuotient){sGroup+=arrChinese[nQuotient]+arrChinese[10];isPrevZero=false}else if(!isPrevZero){sGroup+=arrChinese[0];isPrevZero=true}if(0!==nRemainder)sGroup+=arrChinese[nRemainder];sResult=sGroup+sResult;if(nRemValue<=0)break}break}}return sResult}var c_oAscSpaces=[];c_oAscSpaces[10]=1;c_oAscSpaces[32]=
1;c_oAscSpaces[8194]=1;c_oAscSpaces[8195]=1;c_oAscSpaces[8197]=1;c_oAscSpaces[12288]=1;function IsSpace(nUnicode){return!!c_oAscSpaces[nUnicode]}function private_IsAbbreviation(sWord){if(sWord.toUpperCase()===sWord){for(var nPos=0,nLen=sWord.length;nPos<nLen;++nPos){var nCharCode=sWord.charCodeAt(nPos);if(44032<=nCharCode&&nCharCode<=55203||4352<=nCharCode&&nCharCode<=4607||12592<=nCharCode&&nCharCode<=12687||43360<=nCharCode&&nCharCode<=43391||55216<=nCharCode&&nCharCode<=55295||19968<=nCharCode&&
nCharCode<=40959||13312<=nCharCode&&nCharCode<=19903||131072<=nCharCode&&nCharCode<=173791||173824<=nCharCode&&nCharCode<=177983||177984<=nCharCode&&nCharCode<=178207||178208<=nCharCode&&nCharCode<=183983||63744<=nCharCode&&nCharCode<=64255||194560<=nCharCode&&nCharCode<=195103)return false}return true}return false}var g_oUserColorById={},g_oUserNextColorIndex=0;function getUserColorById(userId,userName,isDark,isNumericValue){if(window.parent.APP&&window.parent.APP.getUserColor)try{var CPColor=window.parent.APP.getUserColor(userId);
if(CPColor)return true===isNumericValue?CPColor.r<<16&16711680|CPColor.g<<8&65280|CPColor.b&255:CPColor}catch(e){}if((!userId||""===userId)&&(!userName||""===userName))return new CColor(0,0,0,255);var res;if(g_oUserColorById.hasOwnProperty(userId))res=g_oUserColorById[userId];else if(g_oUserColorById.hasOwnProperty(userName))res=g_oUserColorById[userName];else{var nColor=Asc.c_oAscArrUserColors[g_oUserNextColorIndex%Asc.c_oAscArrUserColors.length];++g_oUserNextColorIndex;res=g_oUserColorById[userId||
userName]=new CUserCacheColor(nColor)}if(!res)return new CColor(0,0,0,255);var oColor=true===isDark?res.Dark:res.Light;return true===isNumericValue?oColor.r<<16&16711680|oColor.g<<8&65280|oColor.b&255:oColor}function isNullOrEmptyString(str){return str==undefined||str==null||str==""}function unleakString(s){return(" "+s).substr(1)}function readValAttr(attr){if(attr()){var val=attr()["val"];return val?val:null}return null}function getNumFromXml(val){return val?val-0:null}function getColorFromXml(attr){if(attr()){var vals=
attr();if(null!=vals["theme"])return AscCommonExcel.g_oColorManager.getThemeColor(getNumFromXml(vals["theme"]),getNumFromXml(vals["tint"]));else if(null!=vals["rgb"])return new AscCommonExcel.RgbColor(16777215&getNumFromXml(vals["rgb"]))}return null}function getBoolFromXml(val){return"0"!==val&&"false"!==val&&"off"!==val}function CUserCacheColor(nColor){this.Light=null;this.Dark=null;this.init(nColor)}CUserCacheColor.prototype.init=function(nColor){var r=nColor>>16&255;var g=nColor>>8&255;var b=nColor&
255;var Y=Math.max(0,Math.min(255,.299*r+.587*g+.114*b));var Cb=Math.max(0,Math.min(255,128-.168736*r-.331264*g+.5*b));var Cr=Math.max(0,Math.min(255,128+.5*r-.418688*g-.081312*b));if(Y>63)Y=63;var R=Math.max(0,Math.min(255,Y+1.402*(Cr-128)))|0;var G=Math.max(0,Math.min(255,Y-.34414*(Cb-128)-.71414*(Cr-128)))|0;var B=Math.max(0,Math.min(255,Y+1.772*(Cb-128)))|0;this.Light=new CColor(r,g,b,255);this.Dark=new CColor(R,G,B,255)};function loadScript(url,onSuccess,onError){if(window["NATIVE_EDITOR_ENJINE"]===
true||window["Native"]!==undefined){onSuccess();return}if(window["AscDesktopEditor"]&&window["local_load_add"]){var _context={"completeLoad":function(){return onSuccess()}};window["local_load_add"](_context,"sdk-all-from-min",url);var _ret_param=window["AscDesktopEditor"]["LoadJS"](url);if(2!=_ret_param)window["local_load_remove"](url);if(_ret_param==1){setTimeout(onSuccess,1);return}else if(_ret_param==2)return}var backoff=new AscCommon.Backoff(AscCommon.g_oBackoffDefaults);loadScriptWithBackoff(backoff,
url,onSuccess,onError)}function loadScriptWithBackoff(backoff,url,onSuccess,onError){var script=document.createElement("script");script.type="text/javascript";script.src=url;script.onload=onSuccess;script.onerror=function(){backoff.attempt(onError,function(){loadScriptWithBackoff(backoff,url,onSuccess,onError)})};document.head.appendChild(script)}function loadSdk(sdkName,onSuccess,onError){if(window["AscNotLoadAllScript"])onSuccess();else{var urlArgs=window.parent&&window.parent.APP&&window.parent.APP.urlArgs||
"";loadScript("./../../../../sdkjs/"+sdkName+"/sdk-all.js?"+urlArgs,onSuccess,onError)}}function getAltGr(e){var ctrlKey=e.metaKey||e.ctrlKey;var altKey=e.altKey;return altKey&&(AscBrowser.isMacOs?!ctrlKey:ctrlKey)}function getColorSchemeByName(sName){for(var i=0;i<AscCommon.g_oUserColorScheme.length;++i){var tmp=AscCommon.g_oUserColorScheme[i];if(tmp&&tmp.name===sName)return getColorSchemeByIdx(i)}return null}function getColorSchemeByIdx(idx){var tmp=AscCommon.g_oUserColorScheme[idx];if(tmp){var scheme=
new AscFormat.ClrScheme,_c;scheme.name=tmp.name;_c=tmp.get_dk1();scheme.colors[8]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_lt1();scheme.colors[12]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_dk2();scheme.colors[9]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_lt2();scheme.colors[13]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent1();scheme.colors[0]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent2();scheme.colors[1]=AscFormat.CreateUniColorRGB(_c.r,
_c.g,_c.b);_c=tmp.get_accent3();scheme.colors[2]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent4();scheme.colors[3]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent5();scheme.colors[4]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent6();scheme.colors[5]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_hlink();scheme.colors[11]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_folHlink();scheme.colors[10]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);
return scheme}return null}function getAscColorScheme(_scheme,theme){var elem,_c;var _rgba={R:0,G:0,B:0,A:255};elem=new AscCommon.CAscColorScheme;elem.scheme=_scheme;elem.name=_scheme.name;_scheme.colors[8].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[8].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[12].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[12].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[9].Calculate(theme,null,null,
null,_rgba);_c=_scheme.colors[9].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[13].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[13].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[0].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[0].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[1].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[1].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[2].Calculate(theme,
null,null,null,_rgba);_c=_scheme.colors[2].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[3].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[3].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[4].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[4].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[5].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[5].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));
_scheme.colors[11].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[11].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[10].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[10].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));return elem}function getIndexColorSchemeInArray(result,asc_color_scheme){for(var j=0;j<result.length;++j)if(result[j].isEqual(asc_color_scheme))return j;return-1}function checkAddColorScheme(result,asc_color_scheme,nStartIndex){var nIndex=
if(CPColor)return true===isNumericValue?CPColor.r<<16&16711680|CPColor.g<<8&65280|CPColor.b&255:new CColor(CPColor.r,CPColor.g,CPColor.b,CPColor.a)}catch(e){}if((!userId||""===userId)&&(!userName||""===userName))return new CColor(0,0,0,255);var res;if(g_oUserColorById.hasOwnProperty(userId))res=g_oUserColorById[userId];else if(g_oUserColorById.hasOwnProperty(userName))res=g_oUserColorById[userName];else{var nColor=Asc.c_oAscArrUserColors[g_oUserNextColorIndex%Asc.c_oAscArrUserColors.length];++g_oUserNextColorIndex;
res=g_oUserColorById[userId||userName]=new CUserCacheColor(nColor)}if(!res)return new CColor(0,0,0,255);var oColor=true===isDark?res.Dark:res.Light;return true===isNumericValue?oColor.r<<16&16711680|oColor.g<<8&65280|oColor.b&255:oColor}function isNullOrEmptyString(str){return str==undefined||str==null||str==""}function unleakString(s){return(" "+s).substr(1)}function readValAttr(attr){if(attr()){var val=attr()["val"];return val?val:null}return null}function getNumFromXml(val){return val?val-0:null}
function getColorFromXml(attr){if(attr()){var vals=attr();if(null!=vals["theme"])return AscCommonExcel.g_oColorManager.getThemeColor(getNumFromXml(vals["theme"]),getNumFromXml(vals["tint"]));else if(null!=vals["rgb"])return new AscCommonExcel.RgbColor(16777215&getNumFromXml(vals["rgb"]))}return null}function getBoolFromXml(val){return"0"!==val&&"false"!==val&&"off"!==val}function CUserCacheColor(nColor){this.Light=null;this.Dark=null;this.init(nColor)}CUserCacheColor.prototype.init=function(nColor){var r=
nColor>>16&255;var g=nColor>>8&255;var b=nColor&255;var Y=Math.max(0,Math.min(255,.299*r+.587*g+.114*b));var Cb=Math.max(0,Math.min(255,128-.168736*r-.331264*g+.5*b));var Cr=Math.max(0,Math.min(255,128+.5*r-.418688*g-.081312*b));if(Y>63)Y=63;var R=Math.max(0,Math.min(255,Y+1.402*(Cr-128)))|0;var G=Math.max(0,Math.min(255,Y-.34414*(Cb-128)-.71414*(Cr-128)))|0;var B=Math.max(0,Math.min(255,Y+1.772*(Cb-128)))|0;this.Light=new CColor(r,g,b,255);this.Dark=new CColor(R,G,B,255)};function loadScript(url,
onSuccess,onError){if(window["NATIVE_EDITOR_ENJINE"]===true||window["Native"]!==undefined){onSuccess();return}if(window["AscDesktopEditor"]&&window["local_load_add"]){var _context={"completeLoad":function(){return onSuccess()}};window["local_load_add"](_context,"sdk-all-from-min",url);var _ret_param=window["AscDesktopEditor"]["LoadJS"](url);if(2!=_ret_param)window["local_load_remove"](url);if(_ret_param==1){setTimeout(onSuccess,1);return}else if(_ret_param==2)return}var backoff=new AscCommon.Backoff(AscCommon.g_oBackoffDefaults);
loadScriptWithBackoff(backoff,url,onSuccess,onError)}function loadScriptWithBackoff(backoff,url,onSuccess,onError){var script=document.createElement("script");script.type="text/javascript";script.src=url;script.onload=onSuccess;script.onerror=function(){backoff.attempt(onError,function(){loadScriptWithBackoff(backoff,url,onSuccess,onError)})};document.head.appendChild(script)}function loadSdk(sdkName,onSuccess,onError){if(window["AscNotLoadAllScript"])onSuccess();else{var urlArgs=window.parent&&window.parent.APP&&
window.parent.APP.urlArgs||"";loadScript("./../../../../sdkjs/"+sdkName+"/sdk-all.js?"+urlArgs,onSuccess,onError)}}function getAltGr(e){var ctrlKey=e.metaKey||e.ctrlKey;var altKey=e.altKey;return altKey&&(AscBrowser.isMacOs?!ctrlKey:ctrlKey)}function getColorSchemeByName(sName){for(var i=0;i<AscCommon.g_oUserColorScheme.length;++i){var tmp=AscCommon.g_oUserColorScheme[i];if(tmp&&tmp.name===sName)return getColorSchemeByIdx(i)}return null}function getColorSchemeByIdx(idx){var tmp=AscCommon.g_oUserColorScheme[idx];
if(tmp){var scheme=new AscFormat.ClrScheme,_c;scheme.name=tmp.name;_c=tmp.get_dk1();scheme.colors[8]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_lt1();scheme.colors[12]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_dk2();scheme.colors[9]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_lt2();scheme.colors[13]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent1();scheme.colors[0]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent2();scheme.colors[1]=
AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent3();scheme.colors[2]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent4();scheme.colors[3]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent5();scheme.colors[4]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent6();scheme.colors[5]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_hlink();scheme.colors[11]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_folHlink();scheme.colors[10]=AscFormat.CreateUniColorRGB(_c.r,
_c.g,_c.b);return scheme}return null}function getAscColorScheme(_scheme,theme){var elem,_c;var _rgba={R:0,G:0,B:0,A:255};elem=new AscCommon.CAscColorScheme;elem.scheme=_scheme;elem.name=_scheme.name;_scheme.colors[8].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[8].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[12].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[12].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[9].Calculate(theme,
null,null,null,_rgba);_c=_scheme.colors[9].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[13].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[13].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[0].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[0].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[1].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[1].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));
_scheme.colors[2].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[2].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[3].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[3].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[4].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[4].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[5].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[5].RGBA;elem.putColor(new AscCommon.CColor(_c.R,
_c.G,_c.B));_scheme.colors[11].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[11].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[10].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[10].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));return elem}function getIndexColorSchemeInArray(result,asc_color_scheme){for(var j=0;j<result.length;++j)if(result[j].isEqual(asc_color_scheme))return j;return-1}function checkAddColorScheme(result,asc_color_scheme,nStartIndex){var nIndex=
getIndexColorSchemeInArray(result,asc_color_scheme);if(nIndex>-1)return nIndex;var nStartIndex_=nStartIndex;if(nStartIndex===null)nStartIndex_=result.length;result.splice(nStartIndex_,0,asc_color_scheme);return nStartIndex_}function isEastAsianScript(value){return 12544<=value&&value<=12591||12704<=value&&value<=12735||19968<=value&&value<=40938||13312<=value&&value<=19893||131072<=value&&value<=173782||173824<=value&&value<=177972||177984<=value&&value<=178205||178208<=value&&value<=183969||183984<=
value&&value<=191456||63744<=value&&value<=64255||194560<=value&&value<=195103||12032<=value&&value<=12255||11904<=value&&value<=12031||12736<=value&&value<=12783||12272<=value&&value<=12287||4352<=value&&value<=4607||43360<=value&&value<=43391||55216<=value&&value<=55295||12592<=value&&value<=12687||65280<=value&&value<=65519||44032<=value&&value<=55215||12352<=value&&value<=12447||110848<=value&&value<=110895||110592<=value&&value<=110847||12688<=value&&value<=12703||12448<=value&&value<=12543||
12784<=value&&value<=12799||42192<=value&&value<=42239||93952<=value&&value<=94111||110960<=value&&value<=111359||94208<=value&&value<=100332||100352<=value&&value<=101119||40960<=value&&value<=42127||42128<=value&&value<=42191}var g_oIdCounter=new CIdCounter;window.Asc.g_signature_drawer=null;function CSignatureDrawer(id,api,w,h){window.Asc.g_signature_drawer=this;this.Api=api;this.CanvasParent=document.getElementById(id);this.Canvas=document.createElement("canvas");this.Canvas.style.position="absolute";

@ -8409,10 +8409,10 @@ oThis.Api.SendOpenProgress()}if(!oThis.bIsLoadDocumentImagesNoByOrder){oThis.ima
oThis._LoadImages()}else if(oThis.nNoByOrderCounter==oThis.images_loading.length){oThis.images_loading=[];oThis._LoadImages()}};AscCommon.backoffOnErrorImg(oImage.Image,function(img){oThis.loadImageByUrl(img,img.src)});oThis.loadImageByUrl(oImage.Image,oImage.src);if(!oThis.bIsLoadDocumentImagesNoByOrder)return}};this.LoadImage=function(src,Type){var _image=this.map_image_index[src];if(undefined!=_image)return _image;this.Api.asyncImageStartLoaded();var oImage=new CImage(src);oImage.Type=Type;oImage.Image=
new Image;oImage.Status=ImageLoadStatus.Loading;oThis.map_image_index[oImage.src]=oImage;oImage.Image.onload=function(){oImage.Status=ImageLoadStatus.Complete;oThis.Api.asyncImageEndLoaded(oImage)};oImage.Image.onerror=function(){oImage.Image=null;oImage.Status=ImageLoadStatus.Complete;oThis.Api.asyncImageEndLoaded(oImage)};AscCommon.backoffOnErrorImg(oImage.Image,function(img){oThis.loadImageByUrl(img,img.src)});this.loadImageByUrl(oImage.Image,oImage.src);return null};this.LoadImageAsync=function(i,
cb){var _id=oThis.images_loading[i];var oImage=new CImage(_id);oImage.Status=ImageLoadStatus.Loading;oImage.Image=new Image;oThis.map_image_index[oImage.src]=oImage;var oThat=oThis;oImage.Image.onload=function(){oImage.Status=ImageLoadStatus.Complete;oThat.Api.asyncImageEndLoadedBackground(oImage)};oImage.Image.onerror=function(){oImage.Status=ImageLoadStatus.Complete;oImage.Image=null;oThat.Api.asyncImageEndLoadedBackground(oImage)};AscCommon.backoffOnErrorImg(oImage.Image,function(img){oThis.loadImageByUrl(img,
img.src)});console.log("Loading image "+i);console.log(oImage);window.parent.APP.getImageURL(oImage.src,function(url){if(url=="")oThis.loadImageByUrl(oImage.Image,oImage.src);else{oThis.loadImageByUrl(oImage.Image,url);oThis.map_image_index[url]=oImage}if(typeof cb==="function")cb()})};this.LoadImagesWithCallback=function(arr,loadImageCallBack,loadImageCallBackArgs){var arrAsync=[];var i=0;for(i=0;i<arr.length;i++)if(this.map_image_index[arr[i]]===undefined)arrAsync.push(arr[i]);if(arrAsync.length==
0){loadImageCallBack.call(this.Api,loadImageCallBackArgs);return}this.loadImageCallBackCounter=0;this.loadImageCallBackCounterMax=arrAsync.length;this.loadImageCallBack=loadImageCallBack;this.loadImageCallBackArgs=loadImageCallBackArgs;for(i=0;i<arrAsync.length;i++){var oImage=new CImage(arrAsync[i]);oImage.Image=new Image;oImage.Image.parentImage=oImage;oImage.Status=ImageLoadStatus.Loading;this.map_image_index[oImage.src]=oImage;oImage.Image.onload=function(){this.parentImage.Status=ImageLoadStatus.Complete;
oThis.loadImageCallBackCounter++;if(oThis.loadImageCallBackCounter==oThis.loadImageCallBackCounterMax)oThis.LoadImagesWithCallbackEnd()};oImage.Image.onerror=function(){this.parentImage.Image=null;this.parentImage.Status=ImageLoadStatus.Complete;oThis.loadImageCallBackCounter++;if(oThis.loadImageCallBackCounter==oThis.loadImageCallBackCounterMax)oThis.LoadImagesWithCallbackEnd()};AscCommon.backoffOnErrorImg(oImage.Image,function(img){oThis.loadImageByUrl(img,img.src)});this.loadImageByUrl(oImage.Image,
oImage.src)}};this.LoadImagesWithCallbackEnd=function(){this.loadImageCallBack.call(this.Api,this.loadImageCallBackArgs);this.loadImageCallBack=null;this.loadImageCallBackArgs=null;this.loadImageCallBackCounterMax=0;this.loadImageCallBackCounter=0}}var g_flow_anchor=new Image;g_flow_anchor.asc_complete=false;g_flow_anchor.onload=function(){g_flow_anchor.asc_complete=true};g_flow_anchor.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAPBAMAAADNDVhEAAAAIVBMVEUAAAANDQ0NDQ0NDQ0NDQ0NDQ0AAAANDQ0NDQ0NDQ0NDQ1jk7YPAAAACnRSTlMAGkD4mb9c5s9TDghpXQAAAFZJREFUCNdjYGBgW8YABlxcIBLBZ1gAEfZa5QWiGRkWMAIpAaA4iHQE0YwODEtANMsChkIwv4BBWQBICyswMC1iWADEDAzKoUuDFUAGNC9uABvIaQkkABpxD6lFb9lRAAAAAElFTkSuQmCC";
img.src)});window.parent.APP.getImageURL(oImage.src,function(url){if(url=="")oThis.loadImageByUrl(oImage.Image,oImage.src);else{oThis.loadImageByUrl(oImage.Image,url);oThis.map_image_index[url]=oImage}if(typeof cb==="function")cb()})};this.LoadImagesWithCallback=function(arr,loadImageCallBack,loadImageCallBackArgs){var arrAsync=[];var i=0;for(i=0;i<arr.length;i++)if(this.map_image_index[arr[i]]===undefined)arrAsync.push(arr[i]);if(arrAsync.length==0){loadImageCallBack.call(this.Api,loadImageCallBackArgs);
return}this.loadImageCallBackCounter=0;this.loadImageCallBackCounterMax=arrAsync.length;this.loadImageCallBack=loadImageCallBack;this.loadImageCallBackArgs=loadImageCallBackArgs;for(i=0;i<arrAsync.length;i++){var oImage=new CImage(arrAsync[i]);oImage.Image=new Image;oImage.Image.parentImage=oImage;oImage.Status=ImageLoadStatus.Loading;this.map_image_index[oImage.src]=oImage;oImage.Image.onload=function(){this.parentImage.Status=ImageLoadStatus.Complete;oThis.loadImageCallBackCounter++;if(oThis.loadImageCallBackCounter==
oThis.loadImageCallBackCounterMax)oThis.LoadImagesWithCallbackEnd()};oImage.Image.onerror=function(){this.parentImage.Image=null;this.parentImage.Status=ImageLoadStatus.Complete;oThis.loadImageCallBackCounter++;if(oThis.loadImageCallBackCounter==oThis.loadImageCallBackCounterMax)oThis.LoadImagesWithCallbackEnd()};AscCommon.backoffOnErrorImg(oImage.Image,function(img){oThis.loadImageByUrl(img,img.src)});this.loadImageByUrl(oImage.Image,oImage.src)}};this.LoadImagesWithCallbackEnd=function(){this.loadImageCallBack.call(this.Api,
this.loadImageCallBackArgs);this.loadImageCallBack=null;this.loadImageCallBackArgs=null;this.loadImageCallBackCounterMax=0;this.loadImageCallBackCounter=0}}var g_flow_anchor=new Image;g_flow_anchor.asc_complete=false;g_flow_anchor.onload=function(){g_flow_anchor.asc_complete=true};g_flow_anchor.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAPBAMAAADNDVhEAAAAIVBMVEUAAAANDQ0NDQ0NDQ0NDQ0NDQ0AAAANDQ0NDQ0NDQ0NDQ1jk7YPAAAACnRSTlMAGkD4mb9c5s9TDghpXQAAAFZJREFUCNdjYGBgW8YABlxcIBLBZ1gAEfZa5QWiGRkWMAIpAaA4iHQE0YwODEtANMsChkIwv4BBWQBICyswMC1iWADEDAzKoUuDFUAGNC9uABvIaQkkABpxD6lFb9lRAAAAAElFTkSuQmCC";
var g_flow_anchor2=new Image;g_flow_anchor2.asc_complete=false;g_flow_anchor2.onload=function(){g_flow_anchor2.asc_complete=true};g_flow_anchor2.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAeCAMAAAAFBf7qAAAAOVBMVEUAAAAAAAAAAAAAAAAJCQkAAAAJCQkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJCQknI0ZQAAAAEnRSTlMAx9ITlAfyPHxn68yecTAl5qt6y0BvAAAAt0lEQVQoz8WS0QrDIAxFk0ajtlXb+/8fuzAprltg7Gnn4aIcvAgJTSSoBiGPoIAGV60qoquvIIL110IJgPONmKIlMI73MiwGRoZvahbKVSizcDKU8QeVPDXEIr6ShVB9VUEn2FOMkwL8VwjUtuypvDWiHeVTFeyWkZHfVQZHGm4XMhKQyJB9GKMxuHQSBlioF7u2q7kzgO2AcWwW3F8mWRmGKgyu91mK1Tzh4ixVVkBzJI/EnGjyACbfCaO3eIWRAAAAAElFTkSuQmCC";
window["AscCommon"]=window["AscCommon"]||{};window["AscCommon"].g_font_loader=new CGlobalFontLoader;window["AscCommon"].g_image_loader=new CGlobalImageLoader;window["AscCommon"].g_flow_anchor=g_flow_anchor;window["AscCommon"].g_flow_anchor2=g_flow_anchor2})(window,window.document);"use strict";(function(window,undefined){var g_dKoef_mm_to_pix=AscCommon.g_dKoef_mm_to_pix;function CBounds(){this.L=0;this.T=0;this.R=0;this.B=0;this.isAbsL=false;this.isAbsT=false;this.isAbsR=false;this.isAbsB=false;this.AbsW=
-1;this.AbsH=-1;this.SetParams=function(_l,_t,_r,_b,abs_l,abs_t,abs_r,abs_b,absW,absH){this.L=_l;this.T=_t;this.R=_r;this.B=_b;this.isAbsL=abs_l;this.isAbsT=abs_t;this.isAbsR=abs_r;this.isAbsB=abs_b;this.AbsW=absW;this.AbsH=absH}}function CAbsolutePosition(){this.L=0;this.T=0;this.R=0;this.B=0}var g_anchor_left=1;var g_anchor_top=2;var g_anchor_right=4;var g_anchor_bottom=8;function CControl(){this.Bounds=new CBounds;this.Anchor=g_anchor_left|g_anchor_top;this.Name=null;this.Parent=null;this.TabIndex=
@ -16494,8 +16494,8 @@ LineIndex+1}var RangeOffset=1+this.Lines[0]+this.Lines[LineIndex+1]+RangeIndex*2
function(LineIndex,RangeIndex,EndPos){var RangeOffset=this.protected_GetRangeOffset(LineIndex,RangeIndex);this.Lines[RangeOffset+1]=EndPos};CParagraphContentWithContentBase.prototype.private_UpdateSpellChecking=function(){if(this.Paragraph&&this.Paragraph.SpellChecker){this.Paragraph.SpellChecker.ClearPausedEngine();this.Paragraph.RecalcInfo.Set_Type_0_Spell(pararecalc_0_Spell_All)}};CParagraphContentWithContentBase.prototype.Is_UseInDocument=function(Id){if(this.Paragraph){for(var i=0;i<this.Content.length;++i)if(this.Content[i].Get_Id&&
this.Content[i].Get_Id()===Id)break;if(i<this.Content.length)return this.Paragraph.Is_UseInDocument(this.Get_Id())}return false};CParagraphContentWithContentBase.prototype.IsUseInDocument=function(sId){return this.Is_UseInDocument(sId)};CParagraphContentWithContentBase.prototype.protected_GetPrevRangeEndPos=function(LineIndex,RangeIndex){var RangeCount=this.protected_GetRangesCount(LineIndex-1);var RangeOffset=this.protected_GetRangeOffset(LineIndex-1,RangeCount-1);return LineIndex==0&&RangeIndex==
0?0:this.Lines[RangeOffset+1]};CParagraphContentWithContentBase.prototype.private_UpdateTrackRevisions=function(){if(this.Paragraph&&this.Paragraph.LogicDocument&&this.Paragraph.LogicDocument.GetTrackRevisionsManager){var RevisionsManager=this.Paragraph.LogicDocument.GetTrackRevisionsManager();RevisionsManager.CheckElement(this.Paragraph)}};CParagraphContentWithContentBase.prototype.CanSplit=function(){return true};CParagraphContentWithContentBase.prototype.PreDelete=function(){};CParagraphContentWithContentBase.prototype.private_UpdateDocumentOutline=
function(){if(this.Paragraph)this.Paragraph.UpdateDocumentOutline()};CParagraphContentWithContentBase.prototype.IsSolid=function(){return false};CParagraphContentWithContentBase.prototype.ConvertParaContentPosToRangePos=function(oContentPos,nDepth){return 0};CParagraphContentWithContentBase.prototype.ProcessNotInlineObjectCheck=function(oChecker){oChecker.Result=false;oChecker.Found=true};function CParagraphContentWithParagraphLikeContent(){CParagraphContentWithContentBase.call(this);this.Type=undefined;
this.Paragraph=null;this.m_oContentChanges=new AscCommon.CContentChanges;this.Content=[];this.State=new CParaRunState;this.Selection=this.State.Selection;this.NearPosArray=[];this.SearchMarks=[]}CParagraphContentWithParagraphLikeContent.prototype=Object.create(CParagraphContentWithContentBase.prototype);CParagraphContentWithParagraphLikeContent.prototype.constructor=CParagraphContentWithParagraphLikeContent;CParagraphContentWithParagraphLikeContent.prototype.Get_Type=function(){return this.Type};
function(){if(this.Paragraph&&this.Paragraph.UpdateDocumentOutline)this.Paragraph.UpdateDocumentOutline()};CParagraphContentWithContentBase.prototype.IsSolid=function(){return false};CParagraphContentWithContentBase.prototype.ConvertParaContentPosToRangePos=function(oContentPos,nDepth){return 0};CParagraphContentWithContentBase.prototype.ProcessNotInlineObjectCheck=function(oChecker){oChecker.Result=false;oChecker.Found=true};function CParagraphContentWithParagraphLikeContent(){CParagraphContentWithContentBase.call(this);
this.Type=undefined;this.Paragraph=null;this.m_oContentChanges=new AscCommon.CContentChanges;this.Content=[];this.State=new CParaRunState;this.Selection=this.State.Selection;this.NearPosArray=[];this.SearchMarks=[]}CParagraphContentWithParagraphLikeContent.prototype=Object.create(CParagraphContentWithContentBase.prototype);CParagraphContentWithParagraphLikeContent.prototype.constructor=CParagraphContentWithParagraphLikeContent;CParagraphContentWithParagraphLikeContent.prototype.Get_Type=function(){return this.Type};
CParagraphContentWithParagraphLikeContent.prototype.Copy=function(Selected,oPr){var NewElement=new this.constructor;var StartPos=0;var EndPos=this.Content.length-1;if(true===Selected&&true===this.State.Selection.Use){StartPos=this.State.Selection.StartPos;EndPos=this.State.Selection.EndPos;if(StartPos>EndPos){StartPos=this.State.Selection.EndPos;EndPos=this.State.Selection.StartPos}}for(var CurPos=StartPos;CurPos<=EndPos;CurPos++){var Item=this.Content[CurPos];if(StartPos===CurPos||EndPos===CurPos)NewElement.Add_ToContent(CurPos-
StartPos,Item.Copy(Selected,oPr));else NewElement.Add_ToContent(CurPos-StartPos,Item.Copy(false,oPr))}return NewElement};CParagraphContentWithParagraphLikeContent.prototype.GetSelectedContent=function(oSelectedContent){var oNewElement=new this.constructor;var nStartPos=this.State.Selection.StartPos;var nEndPos=this.State.Selection.EndPos;if(nStartPos>nEndPos){nStartPos=this.State.Selection.EndPos;nEndPos=this.State.Selection.StartPos}var nItemPos=0;for(var nPos=nStartPos,nItemPos=0;nPos<=nEndPos;++nPos){var oNewItem=
this.Content[nPos].GetSelectedContent(oSelectedContent);if(oNewItem){oNewElement.AddToContent(nItemPos,oNewItem);nItemPos++}}if(0===nItemPos)return null;return oNewElement};CParagraphContentWithParagraphLikeContent.prototype.CopyContent=function(Selected){var CopyContent=[];var StartPos=0;var EndPos=this.Content.length-1;if(true===Selected&&true===this.State.Selection.Use){StartPos=this.State.Selection.StartPos;EndPos=this.State.Selection.EndPos;if(StartPos>EndPos){StartPos=this.State.Selection.EndPos;
@ -16697,155 +16697,156 @@ CChangesParaTextPrUnderline.prototype.private_SetValue=function(Value){this.Clas
AscDFH.historyitem_TextPr_FontSize;CChangesParaTextPrFontSize.prototype.private_SetValue=function(Value){this.Class.Value.FontSize=Value};CChangesParaTextPrFontSize.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrColor(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrColor.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrColor.prototype.constructor=CChangesParaTextPrColor;
CChangesParaTextPrColor.prototype.Type=AscDFH.historyitem_TextPr_Color;CChangesParaTextPrColor.prototype.private_SetValue=function(Value){this.Class.Value.Color=Value};CChangesParaTextPrColor.prototype.private_CreateObject=function(){return new CDocumentColor(0,0,0,false)};CChangesParaTextPrColor.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrVertAlign(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrVertAlign.prototype=
Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrVertAlign.prototype.constructor=CChangesParaTextPrVertAlign;CChangesParaTextPrVertAlign.prototype.Type=AscDFH.historyitem_TextPr_VertAlign;CChangesParaTextPrVertAlign.prototype.private_SetValue=function(Value){this.Class.Value.VertAlign=Value};CChangesParaTextPrVertAlign.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrHighLight(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,
Old,New,Color)}CChangesParaTextPrHighLight.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrHighLight.prototype.constructor=CChangesParaTextPrHighLight;CChangesParaTextPrHighLight.prototype.Type=AscDFH.historyitem_TextPr_HighLight;CChangesParaTextPrHighLight.prototype.private_SetValue=function(Value){this.Class.Value.HighLight=Value};CChangesParaTextPrHighLight.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=
2;else if(highlight_None===this.New)nFlags|=4;if(undefined===this.Old)nFlags|=8;else if(highlight_None===this.Old)nFlags|=16;Writer.WriteLong(nFlags);if(undefined!==this.New&&highlight_None!==this.New)this.New.Write_ToBinary(Writer);if(undefined!==this.Old&&highlight_None!==this.Old)this.Old.Write_ToBinary(Writer)};CChangesParaTextPrHighLight.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else if(nFlags&
4)this.New=highlight_None;else{this.New=new CDocumentColor(0,0,0);this.New.Read_FromBinary(Reader)}if(nFlags&8)this.Old=undefined;else if(nFlags&16)this.Old=highlight_None;else{this.Old=new CDocumentColor(0,0,0);this.Old.Read_FromBinary(Reader)}};CChangesParaTextPrHighLight.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrRStyle(Class,Old,New,Color){AscDFH.CChangesBaseStringProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRStyle.prototype=Object.create(AscDFH.CChangesBaseStringProperty.prototype);
CChangesParaTextPrRStyle.prototype.constructor=CChangesParaTextPrRStyle;CChangesParaTextPrRStyle.prototype.Type=AscDFH.historyitem_TextPr_RStyle;CChangesParaTextPrRStyle.prototype.private_SetValue=function(Value){this.Class.Value.RStyle=Value};CChangesParaTextPrRStyle.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrSpacing(Class,Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrSpacing.prototype=Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);
CChangesParaTextPrSpacing.prototype.constructor=CChangesParaTextPrSpacing;CChangesParaTextPrSpacing.prototype.Type=AscDFH.historyitem_TextPr_Spacing;CChangesParaTextPrSpacing.prototype.private_SetValue=function(Value){this.Class.Value.Spacing=Value};CChangesParaTextPrSpacing.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrDStrikeout(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrDStrikeout.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);
CChangesParaTextPrDStrikeout.prototype.constructor=CChangesParaTextPrDStrikeout;CChangesParaTextPrDStrikeout.prototype.Type=AscDFH.historyitem_TextPr_DStrikeout;CChangesParaTextPrDStrikeout.prototype.private_SetValue=function(Value){this.Class.Value.DStrikeout=Value};CChangesParaTextPrDStrikeout.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrCaps(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrCaps.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);
CChangesParaTextPrCaps.prototype.constructor=CChangesParaTextPrCaps;CChangesParaTextPrCaps.prototype.Type=AscDFH.historyitem_TextPr_Caps;CChangesParaTextPrCaps.prototype.private_SetValue=function(Value){this.Class.Value.Caps=Value};CChangesParaTextPrCaps.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrSmallCaps(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrSmallCaps.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);
CChangesParaTextPrSmallCaps.prototype.constructor=CChangesParaTextPrSmallCaps;CChangesParaTextPrSmallCaps.prototype.Type=AscDFH.historyitem_TextPr_SmallCaps;CChangesParaTextPrSmallCaps.prototype.private_SetValue=function(Value){this.Class.Value.SmallCaps=Value};CChangesParaTextPrSmallCaps.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrPosition(Class,Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrPosition.prototype=
Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);CChangesParaTextPrPosition.prototype.constructor=CChangesParaTextPrPosition;CChangesParaTextPrPosition.prototype.Type=AscDFH.historyitem_TextPr_Position;CChangesParaTextPrPosition.prototype.private_SetValue=function(Value){this.Class.Value.Position=Value};CChangesParaTextPrPosition.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrValue(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,
New,Color)}CChangesParaTextPrValue.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrValue.prototype.constructor=CChangesParaTextPrValue;CChangesParaTextPrValue.prototype.Type=AscDFH.historyitem_TextPr_Value;CChangesParaTextPrValue.prototype.private_SetValue=function(Value){this.Class.Value=Value};CChangesParaTextPrValue.prototype.private_CreateObject=function(){return new CTextPr};CChangesParaTextPrValue.prototype.private_IsCreateEmptyObject=function(){return true};
CChangesParaTextPrValue.prototype.Merge=function(oChange){if(oChange.Class!==this.Class)return true;if(oChange.Type===this.Type)return false;if(!this.New)this.New=new CTextPr;switch(oChange.Type){case AscDFH.historyitem_TextPr_Bold:{this.New.Bold=oChange.New;break}case AscDFH.historyitem_TextPr_Italic:{this.New.Italic=oChange.New;break}case AscDFH.historyitem_TextPr_Strikeout:{this.New.Strikeout=oChange.New;break}case AscDFH.historyitem_TextPr_Underline:{this.New.Underline=oChange.New;break}case AscDFH.historyitem_TextPr_FontSize:{this.New.FontSize=
oChange.New;break}case AscDFH.historyitem_TextPr_Color:{this.New.Color=oChange.New;break}case AscDFH.historyitem_TextPr_VertAlign:{this.New.VertAlign=oChange.New;break}case AscDFH.historyitem_TextPr_HighLight:{this.New.HighLight=oChange.New;break}case AscDFH.historyitem_TextPr_RStyle:{this.New.RStyle=oChange.New;break}case AscDFH.historyitem_TextPr_Spacing:{this.New.Spacing=oChange.New;break}case AscDFH.historyitem_TextPr_DStrikeout:{this.New.DStrikeout=oChange.New;break}case AscDFH.historyitem_TextPr_Caps:{this.New.Caps=
oChange.New;break}case AscDFH.historyitem_TextPr_SmallCaps:{this.New.SmallCaps=oChange.New;break}case AscDFH.historyitem_TextPr_Position:{this.New.Position=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts:{this.New.RFonts=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_Ascii:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.Ascii=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_HAnsi:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.HAnsi=oChange.New;
break}case AscDFH.historyitem_TextPr_RFonts_CS:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.CS=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_EastAsia:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_Hint:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.Hint=oChange.New;break}case AscDFH.historyitem_TextPr_Lang:{this.New.Lang=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_Bidi:{if(!this.New.Lang)this.New.Lang=
new CLang;this.New.Lang.Bidi=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_EastAsia:{if(!this.New.Lang)this.New.Lang=new CLang;this.New.Lang.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_Val:{if(!this.New.Lang)this.New.Lang=new CLang;this.New.Lang.Val=oChange.New;break}case AscDFH.historyitem_TextPr_Unifill:{this.New.Unifill=oChange.New;break}case AscDFH.historyitem_TextPr_FontSizeCS:{this.New.FontSizeCS=oChange.New;break}case AscDFH.historyitem_TextPr_Outline:{this.New.TextOutline=
oChange.New;break}case AscDFH.historyitem_TextPr_Fill:{this.New.TextFill=oChange.New;break}}return true};function CChangesParaTextPrRFonts(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFonts.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrRFonts.prototype.constructor=CChangesParaTextPrRFonts;CChangesParaTextPrRFonts.prototype.Type=AscDFH.historyitem_TextPr_RFonts;CChangesParaTextPrRFonts.prototype.private_SetValue=
function(Value){this.Class.Value.RFonts=Value};CChangesParaTextPrRFonts.prototype.private_CreateObject=function(){return new CRFonts};CChangesParaTextPrRFonts.prototype.private_IsCreateEmptyObject=function(){return true};CChangesParaTextPrRFonts.prototype.Merge=function(oChange){if(this.Class!==oChange.Class)return true;if(this.Type===oChange.Type||oChange.Type===AscDFH.historyitem_TextPr_Value)return false;if(!this.New)this.New=new CRFonts;switch(oChange.Type){case AscDFH.historyitem_TextPr_RFonts_Ascii:{this.New.Ascii=
oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_HAnsi:{this.New.HAnsi=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_CS:{this.New.CS=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_EastAsia:{this.New.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_Hint:{this.New.Hint=oChange.New;break}}return true};function CChangesParaTextPrRFontsAscii(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsAscii.prototype=
Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsAscii.prototype.constructor=CChangesParaTextPrRFontsAscii;CChangesParaTextPrRFontsAscii.prototype.Type=AscDFH.historyitem_TextPr_RFonts_Ascii;CChangesParaTextPrRFontsAscii.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==
this.Old)Writer.WriteString2(this.Old.Name)};CChangesParaTextPrRFontsAscii.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;else this.Old={Name:Reader.GetString2(),Index:-1}};CChangesParaTextPrRFontsAscii.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.Ascii=Value};CChangesParaTextPrRFontsAscii.prototype.Merge=
private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrRFontsHAnsi(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsHAnsi.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsHAnsi.prototype.constructor=CChangesParaTextPrRFontsHAnsi;CChangesParaTextPrRFontsHAnsi.prototype.Type=AscDFH.historyitem_TextPr_RFonts_HAnsi;CChangesParaTextPrRFontsHAnsi.prototype.WriteToBinary=function(Writer){var nFlags=
0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==this.Old)Writer.WriteString2(this.Old.Name)};CChangesParaTextPrRFontsHAnsi.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;
else this.Old={Name:Reader.GetString2(),Index:-1}};CChangesParaTextPrRFontsHAnsi.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.HAnsi=Value};CChangesParaTextPrRFontsHAnsi.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrRFontsCS(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsCS.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsCS.prototype.constructor=
CChangesParaTextPrRFontsCS;CChangesParaTextPrRFontsCS.prototype.Type=AscDFH.historyitem_TextPr_RFonts_CS;CChangesParaTextPrRFontsCS.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==this.Old)Writer.WriteString2(this.Old.Name)};CChangesParaTextPrRFontsCS.prototype.ReadFromBinary=function(Reader){var nFlags=
Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;else this.Old={Name:Reader.GetString2(),Index:-1}};CChangesParaTextPrRFontsCS.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.CS=Value};CChangesParaTextPrRFontsCS.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrRFontsEastAsia(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,
Class,Old,New,Color)}CChangesParaTextPrRFontsEastAsia.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsEastAsia.prototype.constructor=CChangesParaTextPrRFontsEastAsia;CChangesParaTextPrRFontsEastAsia.prototype.Type=AscDFH.historyitem_TextPr_RFonts_EastAsia;CChangesParaTextPrRFontsEastAsia.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);
if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==this.Old)Writer.WriteString2(this.Old.Name)};CChangesParaTextPrRFontsEastAsia.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;else this.Old={Name:Reader.GetString2(),Index:-1}};CChangesParaTextPrRFontsEastAsia.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.EastAsia=
Value};CChangesParaTextPrRFontsEastAsia.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrRFontsHint(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsHint.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrRFontsHint.prototype.constructor=CChangesParaTextPrRFontsHint;CChangesParaTextPrRFontsHint.prototype.Type=AscDFH.historyitem_TextPr_RFonts_Hint;CChangesParaTextPrRFontsHint.prototype.private_SetValue=
function(Value){this.Class.Value.RFonts.Hint=Value};CChangesParaTextPrRFontsHint.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrLang(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrLang.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrLang.prototype.constructor=CChangesParaTextPrLang;CChangesParaTextPrLang.prototype.Type=AscDFH.historyitem_TextPr_Lang;CChangesParaTextPrLang.prototype.private_SetValue=
function(Value){this.Class.Value.Lang=Value};CChangesParaTextPrLang.prototype.private_CreateObject=function(){return new CLang};CChangesParaTextPrLang.prototype.private_IsCreateEmptyObject=function(){return true};CChangesParaTextPrLang.prototype.Merge=function(oChange){if(this.Class!==oChange.Class)return true;if(AscDFH.historyitem_TextPr_Lang===oChange.Type||AscDFH.historyitem_TextPr_Value===oChange.Type)return false;if(!this.New)this.New=new CLang;switch(oChange.Type){case AscDFH.historyitem_TextPr_Lang_Bidi:{this.New.Bidi=
oChange.New;break}case AscDFH.historyitem_TextPr_Lang_EastAsia:{this.New.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_Val:{this.New.Val=oChange.New;break}}return true};function CChangesParaTextPrLangBidi(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrLangBidi.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrLangBidi.prototype.constructor=CChangesParaTextPrLangBidi;CChangesParaTextPrLangBidi.prototype.Type=
AscDFH.historyitem_TextPr_Lang_Bidi;CChangesParaTextPrLangBidi.prototype.private_SetValue=function(Value){this.Class.Value.Lang.Bidi=Value};CChangesParaTextPrLangBidi.prototype.Merge=private_ParaTextPrChangesOnMergeLangValue;function CChangesParaTextPrLangEastAsia(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrLangEastAsia.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrLangEastAsia.prototype.constructor=CChangesParaTextPrLangEastAsia;
CChangesParaTextPrLangEastAsia.prototype.Type=AscDFH.historyitem_TextPr_Lang_EastAsia;CChangesParaTextPrLangEastAsia.prototype.private_SetValue=function(Value){this.Class.Value.Lang.EastAsia=Value};CChangesParaTextPrLangEastAsia.prototype.Merge=private_ParaTextPrChangesOnMergeLangValue;function CChangesParaTextPrLangVal(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrLangVal.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrLangVal.prototype.constructor=
CChangesParaTextPrLangVal;CChangesParaTextPrLangVal.prototype.Type=AscDFH.historyitem_TextPr_Lang_Val;CChangesParaTextPrLangVal.prototype.private_SetValue=function(Value){this.Class.Value.Lang.Val=Value};CChangesParaTextPrLangVal.prototype.Merge=private_ParaTextPrChangesOnMergeLangValue;function CChangesParaTextPrUnifill(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrUnifill.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);
CChangesParaTextPrUnifill.prototype.constructor=CChangesParaTextPrUnifill;CChangesParaTextPrUnifill.prototype.Type=AscDFH.historyitem_TextPr_Unifill;CChangesParaTextPrUnifill.prototype.private_SetValue=function(Value){this.Class.Value.Unifill=Value};CChangesParaTextPrUnifill.prototype.private_CreateObject=function(){return new AscFormat.CUniFill};CChangesParaTextPrUnifill.prototype.Load=function(Color){this.Redo();var Unifill=this.Class.Value.Unifill;if(AscCommon.CollaborativeEditing&&Unifill&&Unifill.fill&&
Unifill.fill.type===Asc.c_oAscFill.FILL_TYPE_BLIP&&typeof Unifill.fill.RasterImageId==="string"&&Unifill.fill.RasterImageId.length>0)AscCommon.CollaborativeEditing.Add_NewImage(Unifill.fill.RasterImageId)};CChangesParaTextPrUnifill.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrFontSizeCS(Class,Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrFontSizeCS.prototype=Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);
CChangesParaTextPrFontSizeCS.prototype.constructor=CChangesParaTextPrFontSizeCS;CChangesParaTextPrFontSizeCS.prototype.Type=AscDFH.historyitem_TextPr_FontSizeCS;CChangesParaTextPrFontSizeCS.prototype.private_SetValue=function(Value){this.Class.Value.FontSizeCS=Value};CChangesParaTextPrFontSizeCS.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrTextOutline(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrTextOutline.prototype=
Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrTextOutline.prototype.constructor=CChangesParaTextPrTextOutline;CChangesParaTextPrTextOutline.prototype.Type=AscDFH.historyitem_TextPr_Outline;CChangesParaTextPrTextOutline.prototype.private_SetValue=function(Value){this.Class.Value.TextOutline=Value};CChangesParaTextPrTextOutline.prototype.private_CreateObject=function(){return new AscFormat.CLn};CChangesParaTextPrTextOutline.prototype.Merge=private_ParaTextPrChangesOnMergeValue;
function CChangesParaTextPrTextFill(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrTextFill.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrTextFill.prototype.constructor=CChangesParaTextPrTextFill;CChangesParaTextPrTextFill.prototype.Type=AscDFH.historyitem_TextPr_Fill;CChangesParaTextPrTextFill.prototype.private_SetValue=function(Value){this.Class.Value.TextFill=Value};CChangesParaTextPrTextFill.prototype.private_CreateObject=
function(){return new AscFormat.CUniFill};CChangesParaTextPrTextFill.prototype.Merge=private_ParaTextPrChangesOnMergeValue;"use strict";var drawing_Inline=1;var drawing_Anchor=2;var WRAPPING_TYPE_NONE=0;var WRAPPING_TYPE_SQUARE=1;var WRAPPING_TYPE_THROUGH=2;var WRAPPING_TYPE_TIGHT=3;var WRAPPING_TYPE_TOP_AND_BOTTOM=4;var WRAP_HIT_TYPE_POINT=0;var WRAP_HIT_TYPE_SECTION=1;var c_oAscAlignH=Asc.c_oAscAlignH;var c_oAscAlignV=Asc.c_oAscAlignV;function ParaDrawing(W,H,GraphicObj,DrawingDocument,DocumentContent,
Parent){CRunElementBase.call(this);this.Id=AscCommon.g_oIdCounter.Get_NewId();this.DrawingType=drawing_Inline;this.GraphicObj=GraphicObj;this.X=0;this.Y=0;this.Width=0;this.Height=0;this.OrigX=0;this.OrigY=0;this.ShiftX=0;this.ShiftY=0;this.PageNum=0;this.LineNum=0;this.YOffset=0;this.DocumentContent=DocumentContent;this.DrawingDocument=DrawingDocument;this.Parent=Parent;this.LogicDocument=DrawingDocument?DrawingDocument.m_oLogicDocument:null;this.Distance={T:0,B:0,L:0,R:0};this.LayoutInCell=true;
this.RelativeHeight=undefined;this.SimplePos={Use:false,X:0,Y:0};this.Extent={W:W,H:H};this.EffectExtent={L:0,T:0,R:0,B:0};this.docPr=new AscFormat.CNvPr;this.SizeRelH=undefined;this.SizeRelV=undefined;this.AllowOverlap=true;this.Locked=null;this.Hidden=null;this.PositionH={RelativeFrom:c_oAscRelativeFromH.Column,Align:false,Value:0,Percent:false};this.PositionV={RelativeFrom:c_oAscRelativeFromV.Paragraph,Align:false,Value:0,Percent:false};this.PositionH_Old=undefined;this.PositionV_Old=undefined;
this.Internal_Position=new CAnchorPosition;this.wrappingType=WRAPPING_TYPE_THROUGH;this.useWrap=true;if(typeof CWrapPolygon!=="undefined")this.wrappingPolygon=new CWrapPolygon(this);this.document=editor.WordControl.m_oLogicDocument;this.drawingDocument=DrawingDocument;this.graphicObjects=editor.WordControl.m_oLogicDocument.DrawingObjects;this.selected=false;this.behindDoc=false;this.bNoNeedToAdd=false;this.pageIndex=-1;this.Lock=new AscCommon.CLock;this.ParaMath=null;this.SkipOnRecalculate=false;
this.LineTop=null;this.LineBottom=null;g_oTableId.Add(this,this.Id);if(this.graphicObjects){this.Set_RelativeHeight(this.graphicObjects.getZIndex());if(History.Is_On()&&!g_oTableId.m_bTurnOff)this.graphicObjects.addGraphicObject(this)}}ParaDrawing.prototype=Object.create(CRunElementBase.prototype);ParaDrawing.prototype.constructor=ParaDrawing;ParaDrawing.prototype.Type=para_Drawing;ParaDrawing.prototype.Get_Type=function(){return this.Type};ParaDrawing.prototype.Get_Width=function(){return this.Width};
ParaDrawing.prototype.Get_WidthVisible=function(){return this.WidthVisible};ParaDrawing.prototype.Set_WidthVisible=function(WidthVisible){this.WidthVisible=WidthVisible};ParaDrawing.prototype.GetSelectedContent=function(SelectedContent){if(this.GraphicObj&&this.GraphicObj.GetSelectedContent)this.GraphicObj.GetSelectedContent(SelectedContent)};ParaDrawing.prototype.GetSearchElementId=function(bNext,bCurrent){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.GetSearchElementId==="function")return this.GraphicObj.GetSearchElementId(bNext,
bCurrent);return null};ParaDrawing.prototype.CheckCorrect=function(){if(!this.GraphicObj)return false;if(this.GraphicObj&&this.GraphicObj.checkCorrect)return this.GraphicObj.checkCorrect();return true};ParaDrawing.prototype.GetAllDrawingObjects=function(DrawingObjects){if(null==DrawingObjects)DrawingObjects=[];if(this.GraphicObj.GetAllDrawingObjects)this.GraphicObj.GetAllDrawingObjects(DrawingObjects)};ParaDrawing.prototype.canRotate=function(){return AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.canRotate==
"function"&&this.GraphicObj.canRotate()};ParaDrawing.prototype.GetParagraph=function(){return this.Get_ParentParagraph()};ParaDrawing.prototype.GetRun=function(){return this.Get_Run()};ParaDrawing.prototype.Get_Run=function(){var oParagraph=this.Get_ParentParagraph();if(oParagraph)return oParagraph.Get_DrawingObjectRun(this.Id);return null};ParaDrawing.prototype.Get_Props=function(OtherProps){var Props={};Props.Width=this.GraphicObj.extX;Props.Height=this.GraphicObj.extY;if(drawing_Inline===this.DrawingType)Props.WrappingStyle=
c_oAscWrapStyle2.Inline;else if(WRAPPING_TYPE_NONE===this.wrappingType)Props.WrappingStyle=this.behindDoc===true?c_oAscWrapStyle2.Behind:c_oAscWrapStyle2.InFront;else switch(this.wrappingType){case WRAPPING_TYPE_SQUARE:Props.WrappingStyle=c_oAscWrapStyle2.Square;break;case WRAPPING_TYPE_TIGHT:Props.WrappingStyle=c_oAscWrapStyle2.Tight;break;case WRAPPING_TYPE_THROUGH:Props.WrappingStyle=c_oAscWrapStyle2.Through;break;case WRAPPING_TYPE_TOP_AND_BOTTOM:Props.WrappingStyle=c_oAscWrapStyle2.TopAndBottom;
break;default:Props.WrappingStyle=c_oAscWrapStyle2.Inline;break}if(drawing_Inline===this.DrawingType)Props.Paddings={Left:AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT,Right:AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT,Top:0,Bottom:0};else{var oDistance=this.Get_Distance();Props.Paddings={Left:oDistance.L,Right:oDistance.R,Top:oDistance.T,Bottom:oDistance.B}}Props.AllowOverlap=this.AllowOverlap;Props.Position={X:this.X,Y:this.Y};Props.PositionH={RelativeFrom:this.PositionH.RelativeFrom,UseAlign:this.PositionH.Align,
Align:true===this.PositionH.Align?this.PositionH.Value:undefined,Value:true===this.PositionH.Align?0:this.PositionH.Value,Percent:this.PositionH.Percent};Props.PositionV={RelativeFrom:this.PositionV.RelativeFrom,UseAlign:this.PositionV.Align,Align:true===this.PositionV.Align?this.PositionV.Value:undefined,Value:true===this.PositionV.Align?0:this.PositionV.Value,Percent:this.PositionV.Percent};if(this.SizeRelH&&this.SizeRelH.Percent>0)Props.SizeRelH={RelativeFrom:AscFormat.ConvertRelSizeHToRelPosition(this.SizeRelH.RelativeFrom),
Value:this.SizeRelH.Percent*100>>0};if(this.SizeRelV&&this.SizeRelV.Percent>0)Props.SizeRelV={RelativeFrom:AscFormat.ConvertRelSizeVToRelPosition(this.SizeRelV.RelativeFrom),Value:this.SizeRelV.Percent*100>>0};Props.Internal_Position=this.Internal_Position;Props.Locked=this.Lock.Is_Locked();var ParentParagraph=this.Get_ParentParagraph();if(ParentParagraph&&undefined!==ParentParagraph.Parent){var DocContent=ParentParagraph.Parent;if(true===DocContent.Is_DrawingShape()||DocContent.GetTopDocumentContent()instanceof
CFootEndnote)Props.CanBeFlow=false}Props.title=this.docPr.title!==null?this.docPr.title:undefined;Props.description=this.docPr.descr!==null?this.docPr.descr:undefined;if(null!=OtherProps&&undefined!=OtherProps){if(undefined===OtherProps.Width||.001>Math.abs(Props.Width-OtherProps.Width))Props.Width=undefined;if(undefined===OtherProps.Height||.001>Math.abs(Props.Height-OtherProps.Height))Props.Height=undefined;if(undefined===OtherProps.WrappingStyle||Props.WrappingStyle!=OtherProps.WrappingStyle)Props.WrappingStyle=
undefined;if(undefined===OtherProps.ImageUrl||Props.ImageUrl!=OtherProps.ImageUrl)Props.ImageUrl=undefined;if(undefined===OtherProps.Paddings.Left||.001>Math.abs(Props.Paddings.Left-OtherProps.Paddings.Left))Props.Paddings.Left=undefined;if(undefined===OtherProps.Paddings.Right||.001>Math.abs(Props.Paddings.Right-OtherProps.Paddings.Right))Props.Paddings.Right=undefined;if(undefined===OtherProps.Paddings.Top||.001>Math.abs(Props.Paddings.Top-OtherProps.Paddings.Top))Props.Paddings.Top=undefined;if(undefined===
OtherProps.Paddings.Bottom||.001>Math.abs(Props.Paddings.Bottom-OtherProps.Paddings.Bottom))Props.Paddings.Bottom=undefined;if(undefined===OtherProps.AllowOverlap||Props.AllowOverlap!=OtherProps.AllowOverlap)Props.AllowOverlap=undefined;if(undefined===OtherProps.Position.X||.001>Math.abs(Props.Position.X-OtherProps.Position.X))Props.Position.X=undefined;if(undefined===OtherProps.Position.Y||.001>Math.abs(Props.Position.Y-OtherProps.Position.Y))Props.Position.Y=undefined;if(undefined===OtherProps.PositionH.RelativeFrom||
Props.PositionH.RelativeFrom!=OtherProps.PositionH.RelativeFrom)Props.PositionH.RelativeFrom=undefined;if(undefined===OtherProps.PositionH.UseAlign||Props.PositionH.UseAlign!=OtherProps.PositionH.UseAlign)Props.PositionH.UseAlign=undefined;if(Props.PositionH.RelativeFrom===OtherProps.PositionH.RelativeFrom&&Props.PositionH.UseAlign===OtherProps.PositionH.UseAlign){if(true!=Props.PositionH.UseAlign&&.001>Math.abs(Props.PositionH.Value-OtherProps.PositionH.Value))Props.PositionH.Value=undefined;if(true===
Props.PositionH.UseAlign&&Props.PositionH.Align!=OtherProps.PositionH.Align)Props.PositionH.Align=undefined}if(undefined===OtherProps.PositionV.RelativeFrom||Props.PositionV.RelativeFrom!=OtherProps.PositionV.RelativeFrom)Props.PositionV.RelativeFrom=undefined;if(undefined===OtherProps.PositionV.UseAlign||Props.PositionV.UseAlign!=OtherProps.PositionV.UseAlign)Props.PositionV.UseAlign=undefined;if(Props.PositionV.RelativeFrom===OtherProps.PositionV.RelativeFrom&&Props.PositionV.UseAlign===OtherProps.PositionV.UseAlign){if(true!=
Props.PositionV.UseAlign&&.001>Math.abs(Props.PositionV.Value-OtherProps.PositionV.Value))Props.PositionV.Value=undefined;if(true===Props.PositionV.UseAlign&&Props.PositionV.Align!=OtherProps.PositionV.Align)Props.PositionV.Align=undefined}if(false===OtherProps.Locked)Props.Locked=false;if(false===OtherProps.CanBeFlow||false===Props.CanBeFlow)Props.CanBeFlow=false;else Props.CanBeFlow=true;if(undefined===OtherProps.title||Props.title!==OtherProps.title)Props.title=undefined;if(undefined===OtherProps.description||
Props.description!==OtherProps.description)Props.description=undefined}return Props};ParaDrawing.prototype.Is_UseInDocument=function(){if(this.Parent){var Run=this.Parent.Get_DrawingObjectRun(this.Id);if(Run)return Run.Is_UseInDocument(this.Get_Id())}return false};ParaDrawing.prototype.IsUseInDocument=function(){return this.Is_UseInDocument()};ParaDrawing.prototype.CheckGroupSizes=function(){if(this.GraphicObj&&this.GraphicObj.CheckGroupSizes)this.GraphicObj.CheckGroupSizes()};ParaDrawing.prototype.Set_DrawingType=
function(DrawingType){History.Add(new CChangesParaDrawingDrawingType(this,this.DrawingType,DrawingType));this.DrawingType=DrawingType};ParaDrawing.prototype.Set_WrappingType=function(WrapType){History.Add(new CChangesParaDrawingWrappingType(this,this.wrappingType,WrapType));this.wrappingType=WrapType};ParaDrawing.prototype.Set_Distance=function(L,T,R,B){var oDistance=this.Get_Distance();if(!AscFormat.isRealNumber(L))L=oDistance.L;if(!AscFormat.isRealNumber(T))T=oDistance.T;if(!AscFormat.isRealNumber(R))R=
oDistance.R;if(!AscFormat.isRealNumber(B))B=oDistance.B;History.Add(new CChangesParaDrawingDistance(this,{Left:this.Distance.L,Top:this.Distance.T,Right:this.Distance.R,Bottom:this.Distance.B},{Left:L,Top:T,Right:R,Bottom:B}));this.Distance.L=L;this.Distance.R=R;this.Distance.T=T;this.Distance.B=B};ParaDrawing.prototype.Set_AllowOverlap=function(AllowOverlap){History.Add(new CChangesParaDrawingAllowOverlap(this,this.AllowOverlap,AllowOverlap));this.AllowOverlap=AllowOverlap};ParaDrawing.prototype.Set_PositionH=
function(RelativeFrom,Align,Value,Percent){var _Value,_Percent;if(AscFormat.isRealNumber(Value)&&AscFormat.fApproxEqual(Value,0)&&true===Percent){_Value=0;_Percent=false}else{_Value=Value;_Percent=Percent}History.Add(new CChangesParaDrawingPositionH(this,{RelativeFrom:this.PositionH.RelativeFrom,Align:this.PositionH.Align,Value:this.PositionH.Value,Percent:this.PositionH.Percent},{RelativeFrom:RelativeFrom,Align:Align,Value:_Value,Percent:_Percent}));this.PositionH.RelativeFrom=RelativeFrom;this.PositionH.Align=
Align;this.PositionH.Value=_Value;this.PositionH.Percent=_Percent};ParaDrawing.prototype.Set_PositionV=function(RelativeFrom,Align,Value,Percent){var _Value,_Percent;if(AscFormat.isRealNumber(Value)&&AscFormat.fApproxEqual(Value,0)&&true===Percent){_Value=0;_Percent=false}else{_Value=Value;_Percent=Percent}History.Add(new CChangesParaDrawingPositionV(this,{RelativeFrom:this.PositionV.RelativeFrom,Align:this.PositionV.Align,Value:this.PositionV.Value,Percent:this.PositionV.Percent},{RelativeFrom:RelativeFrom,
Align:Align,Value:_Value,Percent:_Percent}));this.PositionV.RelativeFrom=RelativeFrom;this.PositionV.Align=Align;this.PositionV.Value=_Value;this.PositionV.Percent=_Percent};ParaDrawing.prototype.GetPositionH=function(){return{RelativeFrom:this.PositionH.RelativeFrom,Align:this.PositionH.Align,Value:this.PositionH.Value,Percent:this.PositionH.Percent}};ParaDrawing.prototype.GetPositionV=function(){return{RelativeFrom:this.PositionV.RelativeFrom,Align:this.PositionV.Align,Value:this.PositionV.Value,
Percent:this.PositionV.Percent}};ParaDrawing.prototype.Set_BehindDoc=function(BehindDoc){History.Add(new CChangesParaDrawingBehindDoc(this,this.behindDoc,BehindDoc));this.behindDoc=BehindDoc};ParaDrawing.prototype.Set_GraphicObject=function(graphicObject){var oldId=AscCommon.isRealObject(this.GraphicObj)?this.GraphicObj.Get_Id():null;var newId=AscCommon.isRealObject(graphicObject)?graphicObject.Get_Id():null;History.Add(new CChangesParaDrawingGraphicObject(this,oldId,newId));if(graphicObject)graphicObject.handleUpdateExtents();
this.GraphicObj=graphicObject};ParaDrawing.prototype.setSimplePos=function(use,x,y){History.Add(new CChangesParaDrawingSimplePos(this,{Use:this.SimplePos.Use,X:this.SimplePos.X,Y:this.SimplePos.Y},{Use:use,X:x,Y:y}));this.SimplePos.Use=use;this.SimplePos.X=x;this.SimplePos.Y=y};ParaDrawing.prototype.setExtent=function(extX,extY){History.Add(new CChangesParaDrawingExtent(this,{W:this.Extent.W,H:this.Extent.H},{W:extX,H:extY}));this.Extent.W=extX;this.Extent.H=extY};ParaDrawing.prototype.addWrapPolygon=
function(wrapPolygon){History.Add(new CChangesParaDrawingWrapPolygon(this,this.wrappingPolygon,wrapPolygon));this.wrappingPolygon=wrapPolygon};ParaDrawing.prototype.Set_Locked=function(bLocked){History.Add(new CChangesParaDrawingLocked(this,this.Locked,bLocked));this.Locked=bLocked};ParaDrawing.prototype.Set_RelativeHeight=function(nRelativeHeight){History.Add(new CChangesParaDrawingRelativeHeight(this,this.RelativeHeight,nRelativeHeight));this.Set_RelativeHeight2(nRelativeHeight)};ParaDrawing.prototype.Set_RelativeHeight2=
function(nRelativeHeight){this.RelativeHeight=nRelativeHeight;if(this.graphicObjects&&AscFormat.isRealNumber(nRelativeHeight)&&nRelativeHeight>this.graphicObjects.maximalGraphicObjectZIndex)this.graphicObjects.maximalGraphicObjectZIndex=nRelativeHeight};ParaDrawing.prototype.setEffectExtent=function(L,T,R,B){var oEE=this.EffectExtent;History.Add(new CChangesParaDrawingEffectExtent(this,{L:oEE.L,T:oEE.T,R:oEE.R,B:oEE.B},{L:L,T:T,R:R,B:B}));this.EffectExtent.L=L;this.EffectExtent.T=T;this.EffectExtent.R=
R;this.EffectExtent.B=B};ParaDrawing.prototype.Set_Parent=function(oParent){History.Add(new CChangesParaDrawingParent(this,this.Parent,oParent));this.Parent=oParent};ParaDrawing.prototype.IsWatermark=function(){if(!this.GraphicObj)return false;if(this.GraphicObj.getObjectType()!==AscDFH.historyitem_type_Shape&&this.GraphicObj.getObjectType()!==AscDFH.historyitem_type_ImageShape)return false;if(this.Is_Inline())return false;var oParagraph=this.GetParagraph();if(!(oParagraph instanceof Paragraph))return false;
var oContent=oParagraph.Parent;if(!oContent||oContent.Is_DrawingShape(false))return false;var oHdrFtr=oContent.IsHdrFtr(true);if(!oHdrFtr)return false;var oRun=this.Get_Run();if(!oRun)return false;var arrDocPos=oRun.GetDocumentPositionFromObject();for(var nIndex=0,nCount=arrDocPos.length;nIndex<nCount;++nIndex){var oClass=arrDocPos[nIndex].Class;var oSdt=null;if(oClass instanceof CDocumentContent&&oClass.Parent instanceof CBlockLevelSdt)oSdt=oClass.Parent;else if(oClass instanceof CInlineLevelSdt)oSdt=
oClass;if(oSdt){var oPr=oSdt.Pr;if(AscCommon.isRealObject(oPr)&&AscCommon.isRealObject(oPr.DocPartObj)&&oPr.DocPartObj.Gallery==="Watermarks")return true}}return false};ParaDrawing.prototype.Set_ParaMath=function(ParaMath){History.Add(new CChangesParaDrawingParaMath(this,this.ParaMath,ParaMath));this.ParaMath=ParaMath};ParaDrawing.prototype.Set_LayoutInCell=function(LayoutInCell){if(this.LayoutInCell===LayoutInCell)return;History.Add(new CChangesParaDrawingLayoutInCell(this,this.LayoutInCell,LayoutInCell));
this.LayoutInCell=LayoutInCell};ParaDrawing.prototype.SetSizeRelH=function(oSize){History.Add(new CChangesParaDrawingSizeRelH(this,this.SizeRelH,oSize));this.SizeRelH=oSize};ParaDrawing.prototype.SetSizeRelV=function(oSize){History.Add(new CChangesParaDrawingSizeRelV(this,this.SizeRelV,oSize));this.SizeRelV=oSize};ParaDrawing.prototype.getXfrmExtX=function(){if(AscCommon.isRealObject(this.GraphicObj)&&AscCommon.isRealObject(this.GraphicObj.spPr)&&AscCommon.isRealObject(this.GraphicObj.spPr.xfrm)&&
AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extX))return this.GraphicObj.spPr.xfrm.extX;if(AscFormat.isRealNumber(this.Extent.W))return this.Extent.W;return 0};ParaDrawing.prototype.getXfrmExtY=function(){if(AscCommon.isRealObject(this.GraphicObj)&&AscCommon.isRealObject(this.GraphicObj.spPr)&&AscCommon.isRealObject(this.GraphicObj.spPr.xfrm)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extY))return this.GraphicObj.spPr.xfrm.extY;if(AscFormat.isRealNumber(this.Extent.H))return this.Extent.H;
return 0};ParaDrawing.prototype.getXfrmRot=function(){if(AscCommon.isRealObject(this.GraphicObj)&&AscCommon.isRealObject(this.GraphicObj.spPr)&&AscCommon.isRealObject(this.GraphicObj.spPr.xfrm)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.rot))return this.GraphicObj.spPr.xfrm.rot;return 0};ParaDrawing.prototype.Get_Bounds=function(){var InsL,InsT,InsR,InsB;InsL=0;InsT=0;InsR=0;InsB=0;if(!this.Is_Inline()){var oDistance=this.Get_Distance();if(oDistance){InsL=oDistance.L;InsT=oDistance.T;InsR=
oDistance.R;InsB=oDistance.B}}var ExtX=this.getXfrmExtX();var ExtY=this.getXfrmExtY();var Rot=this.getXfrmRot();var X,Y,W,H;if(AscFormat.checkNormalRotate(Rot)){X=this.X;Y=this.Y;W=ExtX;H=ExtY}else{X=this.X+ExtX/2-ExtY/2;Y=this.Y+ExtY/2-ExtX/2;W=ExtY;H=ExtX}return{Left:X-this.EffectExtent.L-InsL,Top:Y-this.EffectExtent.T-InsT,Bottom:Y+H+this.EffectExtent.B+InsB,Right:X+W+this.EffectExtent.R+InsR}};ParaDrawing.prototype.Search=function(Str,Props,SearchEngine,Type){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.Search==="function")this.GraphicObj.Search(Str,Props,SearchEngine,Type)};ParaDrawing.prototype.Set_Props=function(Props){var bCheckWrapPolygon=false;var isPictureCC=false;var oRun=this.GetRun();if(oRun){var arrContentControls=oRun.GetParentContentControls();for(var nIndex=0,nCount=arrContentControls.length;nIndex<nCount;++nIndex)if(arrContentControls[nIndex].IsPicture()){isPictureCC=true;break}}if(undefined!=Props.WrappingStyle&&!isPictureCC){if(drawing_Inline===this.DrawingType&&
c_oAscWrapStyle2.Inline!=Props.WrappingStyle&&undefined===Props.Paddings)this.Set_Distance(3.2,0,3.2,0);this.Set_DrawingType(c_oAscWrapStyle2.Inline===Props.WrappingStyle?drawing_Inline:drawing_Anchor);if(c_oAscWrapStyle2.Inline===Props.WrappingStyle)if(AscCommon.isRealObject(this.GraphicObj.bounds)&&AscFormat.isRealNumber(this.GraphicObj.bounds.w)&&AscFormat.isRealNumber(this.GraphicObj.bounds.h))this.CheckWH();if(c_oAscWrapStyle2.Behind===Props.WrappingStyle||c_oAscWrapStyle2.InFront===Props.WrappingStyle){this.Set_WrappingType(WRAPPING_TYPE_NONE);
this.Set_BehindDoc(c_oAscWrapStyle2.Behind===Props.WrappingStyle?true:false)}else{switch(Props.WrappingStyle){case c_oAscWrapStyle2.Square:this.Set_WrappingType(WRAPPING_TYPE_SQUARE);break;case c_oAscWrapStyle2.Tight:{bCheckWrapPolygon=true;this.Set_WrappingType(WRAPPING_TYPE_TIGHT);break}case c_oAscWrapStyle2.Through:{this.Set_WrappingType(WRAPPING_TYPE_THROUGH);bCheckWrapPolygon=true;break}case c_oAscWrapStyle2.TopAndBottom:this.Set_WrappingType(WRAPPING_TYPE_TOP_AND_BOTTOM);break;default:this.Set_WrappingType(WRAPPING_TYPE_SQUARE);
break}this.Set_BehindDoc(false)}}if(undefined!=Props.Paddings)this.Set_Distance(Props.Paddings.Left,Props.Paddings.Top,Props.Paddings.Right,Props.Paddings.Bottom);if(undefined!=Props.AllowOverlap)this.Set_AllowOverlap(Props.AllowOverlap);if(undefined!=Props.PositionH)this.Set_PositionH(Props.PositionH.RelativeFrom,Props.PositionH.UseAlign,true===Props.PositionH.UseAlign?Props.PositionH.Align:Props.PositionH.Value,Props.PositionH.Percent);if(undefined!=Props.PositionV)this.Set_PositionV(Props.PositionV.RelativeFrom,
Props.PositionV.UseAlign,true===Props.PositionV.UseAlign?Props.PositionV.Align:Props.PositionV.Value,Props.PositionV.Percent);if(undefined!=Props.SizeRelH)this.SetSizeRelH({RelativeFrom:AscFormat.ConvertRelPositionHToRelSize(Props.SizeRelH.RelativeFrom),Percent:Props.SizeRelH.Value/100});if(undefined!=Props.SizeRelV)this.SetSizeRelV({RelativeFrom:AscFormat.ConvertRelPositionVToRelSize(Props.SizeRelV.RelativeFrom),Percent:Props.SizeRelV.Value/100});if(this.SizeRelH&&!this.SizeRelV)this.SetSizeRelV({RelativeFrom:AscCommon.c_oAscSizeRelFromV.sizerelfromvPage,
Percent:0});if(this.SizeRelV&&!this.SizeRelH)this.SetSizeRelH({RelativeFrom:AscCommon.c_oAscSizeRelFromH.sizerelfromhPage,Percent:0});if(bCheckWrapPolygon)this.Check_WrapPolygon();if(undefined!=Props.description)this.docPr.setDescr(Props.description);if(undefined!=Props.title)this.docPr.setTitle(Props.title)};ParaDrawing.prototype.CheckWH=function(){if(!this.GraphicObj)return;var oldExtW=this.Extent.W;var oldExtH=this.Extent.H;if(this.GraphicObj.spPr&&this.GraphicObj.spPr.xfrm&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extX)&&
AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extY)){this.Extent.W=this.GraphicObj.spPr.xfrm.extX;this.Extent.H=this.GraphicObj.spPr.xfrm.extY}this.GraphicObj.recalculate();this.Extent.W=oldExtW;this.Extent.H=oldExtH;var extX,extY,rot;if(this.GraphicObj.spPr&&this.GraphicObj.spPr.xfrm){if(AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extX)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extY)){extX=this.GraphicObj.spPr.xfrm.extX;extY=this.GraphicObj.spPr.xfrm.extY}else{extX=5;extY=5}if(AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.rot))rot=
this.GraphicObj.spPr.xfrm.rot;else rot=0}else{extX=5;extY=5;rot=0}this.setExtent(extX,extY);var EEL=0,EET=0,EER=0,EEB=0;{var xc=this.GraphicObj.localTransform.TransformPointX(this.GraphicObj.extX/2,this.GraphicObj.extY/2);var yc=this.GraphicObj.localTransform.TransformPointY(this.GraphicObj.extX/2,this.GraphicObj.extY/2);var oBounds=this.GraphicObj.bounds;var LineCorrect=0;if(this.GraphicObj.pen&&this.GraphicObj.pen.Fill&&this.GraphicObj.pen.Fill.fill){LineCorrect=this.GraphicObj.pen.w==null?12700:
parseInt(this.GraphicObj.pen.w);LineCorrect/=72E3}var l=oBounds.x;var r=l+oBounds.w;var t=oBounds.y;var b=t+oBounds.h;var startX,startY;if(!AscFormat.checkNormalRotate(rot)){var temp=extX;extX=extY;extY=temp}startX=xc-extX/2;startY=yc-extY/2;if(l>startX)l=startX;if(r<startX+extX)r=startX+extX;if(t>startY)t=startY;if(b<startY+extY)b=startY+extY;EEL=xc-extX/2-l+LineCorrect;EET=yc-extY/2-t+LineCorrect;EER=r+LineCorrect-(xc+extX/2);EEB=b+LineCorrect-(yc+extY/2)}this.setEffectExtent(EEL,EET,EER,EEB);this.Check_WrapPolygon()};
ParaDrawing.prototype.Check_WrapPolygon=function(){if((this.wrappingType===WRAPPING_TYPE_TIGHT||this.wrappingType===WRAPPING_TYPE_THROUGH)&&this.wrappingPolygon&&!this.wrappingPolygon.edited){this.GraphicObj.recalculate();this.wrappingPolygon.setArrRelPoints(this.wrappingPolygon.calculate(this.GraphicObj))}};ParaDrawing.prototype.Draw=function(X,Y,pGraphics,PDSE){var nPageIndex=null;if(AscCommon.isRealObject(PDSE))nPageIndex=PDSE.Page;if(pGraphics.Start_Command){pGraphics.m_aDrawings.push(new AscFormat.ParaDrawingStruct(undefined,
this));return}if(this.Is_Inline()){pGraphics.shapePageIndex=nPageIndex;this.draw(pGraphics,PDSE);pGraphics.shapePageIndex=null}if(pGraphics.End_Command)pGraphics.End_Command()};ParaDrawing.prototype.Measure=function(){if(!this.GraphicObj){this.Width=0;this.Height=0;return}if(AscFormat.isRealNumber(this.Extent.W)&&AscFormat.isRealNumber(this.Extent.H)&&(!this.GraphicObj.checkAutofit||!this.GraphicObj.checkAutofit())&&!this.SizeRelH&&!this.SizeRelV){var oEffectExtent=this.EffectExtent;var W,H;if(AscFormat.isRealNumber(this.GraphicObj.rot))if(AscFormat.checkNormalRotate(this.GraphicObj.rot)){W=
this.Extent.W;H=this.Extent.H}else{W=this.Extent.H;H=this.Extent.W}else{W=this.Extent.W;H=this.Extent.H}this.Width=W+AscFormat.getValOrDefault(oEffectExtent.L,0)+AscFormat.getValOrDefault(oEffectExtent.R,0);this.Height=H+AscFormat.getValOrDefault(oEffectExtent.T,0)+AscFormat.getValOrDefault(oEffectExtent.B,0);this.WidthVisible=this.Width}else{this.GraphicObj.recalculate();if(this.GraphicObj.recalculateText)this.GraphicObj.recalculateText();if(this.PositionH.UseAlign||this.Is_Inline())this.Width=this.GraphicObj.bounds.w;
else this.Width=this.GraphicObj.extX;this.WidthVisible=this.Width;if(this.PositionV.UseAlign||this.Is_Inline())this.Height=this.GraphicObj.bounds.h;else this.Height=this.GraphicObj.extY}};ParaDrawing.prototype.SaveRecalculateObject=function(Copy){var DrawingObj={};DrawingObj.Type=this.Type;DrawingObj.DrawingType=this.DrawingType;DrawingObj.WrappingType=this.wrappingType;if(drawing_Anchor===this.Get_DrawingType()&&true===this.Use_TextWrap()){var oDistance=this.Get_Distance();DrawingObj.FlowPos={X:this.X-
oDistance.L,Y:this.Y-oDistance.T,W:this.Width+oDistance.R,H:this.Height+oDistance.B}}DrawingObj.PageNum=this.PageNum;DrawingObj.X=this.X;DrawingObj.Y=this.Y;DrawingObj.spRecaclcObject=this.GraphicObj.getRecalcObject();return DrawingObj};ParaDrawing.prototype.LoadRecalculateObject=function(RecalcObj){this.updatePosition3(RecalcObj.PageNum,RecalcObj.X,RecalcObj.Y);this.GraphicObj.setRecalcObject(RecalcObj.spRecaclcObject)};ParaDrawing.prototype.Reassign_ImageUrls=function(mapUrls){if(this.GraphicObj)this.GraphicObj.Reassign_ImageUrls(mapUrls)};
ParaDrawing.prototype.PrepareRecalculateObject=function(){};ParaDrawing.prototype.Is_RealContent=function(){return true};ParaDrawing.prototype.Can_AddNumbering=function(){if(drawing_Inline===this.DrawingType)return true;return false};ParaDrawing.prototype.Copy=function(oPr){var c=new ParaDrawing(this.Extent.W,this.Extent.H,null,editor.WordControl.m_oLogicDocument.DrawingDocument,null,null);c.Set_DrawingType(this.DrawingType);if(AscCommon.isRealObject(this.GraphicObj)){var oCopyPr=new AscFormat.CCopyObjectProperties;
oCopyPr.contentCopyPr=oPr;c.Set_GraphicObject(this.GraphicObj.copy(oCopyPr));c.GraphicObj.setParent(c)}var d=this.Distance;c.Set_PositionH(this.PositionH.RelativeFrom,this.PositionH.Align,this.PositionH.Value,this.PositionH.Percent);c.Set_PositionV(this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent);c.Set_Distance(d.L,d.T,d.R,d.B);c.Set_AllowOverlap(this.AllowOverlap);c.Set_WrappingType(this.wrappingType);if(this.wrappingPolygon)c.wrappingPolygon.fromOther(this.wrappingPolygon);
c.Set_BehindDoc(this.behindDoc);c.Set_RelativeHeight(this.RelativeHeight);if(this.SizeRelH)c.SetSizeRelH({RelativeFrom:this.SizeRelH.RelativeFrom,Percent:this.SizeRelH.Percent});if(this.SizeRelV)c.SetSizeRelV({RelativeFrom:this.SizeRelV.RelativeFrom,Percent:this.SizeRelV.Percent});if(AscFormat.isRealNumber(this.Extent.W)&&AscFormat.isRealNumber(this.Extent.H))c.setExtent(this.Extent.W,this.Extent.H);var EE=this.EffectExtent;if(EE.L>0||EE.T>0||EE.R>0||EE.B>0)c.setEffectExtent(EE.L,EE.T,EE.R,EE.B);
c.docPr.setFromOther(this.docPr);if(this.ParaMath)c.Set_ParaMath(this.ParaMath.Copy());return c};ParaDrawing.prototype.IsEqual=function(oElement){return false};ParaDrawing.prototype.Get_Id=function(){return this.Id};ParaDrawing.prototype.GetId=function(){return this.Id};ParaDrawing.prototype.setParagraphTabs=function(tabs){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphTabs==="function")this.GraphicObj.setParagraphTabs(tabs)};ParaDrawing.prototype.IsMovingTableBorder=
function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.IsMovingTableBorder==="function")return this.GraphicObj.IsMovingTableBorder();return false};ParaDrawing.prototype.SetVerticalClip=function(Top,Bottom){this.LineTop=Top;this.LineBottom=Bottom};ParaDrawing.prototype.Update_Position=function(Paragraph,ParaLayout,PageLimits,PageLimitsOrigin,LineNum){if(undefined!=this.PositionH_Old){this.PositionH.RelativeFrom=this.PositionH_Old.RelativeFrom2;this.PositionH.Align=this.PositionH_Old.Align2;
this.PositionH.Value=this.PositionH_Old.Value2;this.PositionH.Percent=this.PositionH_Old.Percent2}if(undefined!=this.PositionV_Old){this.PositionV.RelativeFrom=this.PositionV_Old.RelativeFrom2;this.PositionV.Align=this.PositionV_Old.Align2;this.PositionV.Value=this.PositionV_Old.Value2;this.PositionV.Percent=this.PositionV_Old.Percent2}var oDocumentContent=this.Parent&&this.Parent.Parent;if(oDocumentContent&&oDocumentContent.IsBlockLevelSdtContent())oDocumentContent=oDocumentContent.Parent.Parent;
this.Parent=Paragraph;this.DocumentContent=oDocumentContent;var PageNum=ParaLayout.PageNum;var OtherFlowObjects=editor.WordControl.m_oLogicDocument.DrawingObjects.getAllFloatObjectsOnPage(PageNum,this.Parent.Parent);var bInline=this.Is_Inline();this.Internal_Position.Set(this.GraphicObj.extX,this.GraphicObj.extY,this.getXfrmRot(),this.EffectExtent,this.YOffset,ParaLayout,PageLimits);this.Internal_Position.Calculate_X(bInline,this.PositionH.RelativeFrom,this.PositionH.Align,this.PositionH.Value,this.PositionH.Percent);
this.Internal_Position.Calculate_Y(bInline,this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent);var bCorrect=false;if(oDocumentContent&&oDocumentContent.IsTableCellContent&&oDocumentContent.IsTableCellContent(false))bCorrect=true;if(this.PositionH.RelativeFrom!==c_oAscRelativeFromH.Page||this.PositionV.RelativeFrom!==c_oAscRelativeFromV.Page)bCorrect=true;this.Internal_Position.Correct_Values(bInline,PageLimits,this.AllowOverlap,this.Use_TextWrap(),OtherFlowObjects,
bCorrect);this.GraphicObj.bounds.l=this.GraphicObj.bounds.x+this.Internal_Position.CalcX;this.GraphicObj.bounds.r=this.GraphicObj.bounds.x+this.GraphicObj.bounds.w+this.Internal_Position.CalcX;this.GraphicObj.bounds.t=this.GraphicObj.bounds.y+this.Internal_Position.CalcY;this.GraphicObj.bounds.b=this.GraphicObj.bounds.y+this.GraphicObj.bounds.h+this.Internal_Position.CalcY;var OldPageNum=this.PageNum;this.PageNum=PageNum;this.LineNum=LineNum;this.X=this.Internal_Position.CalcX;this.Y=this.Internal_Position.CalcY;
if(undefined!=this.PositionH_Old){this.PositionH.RelativeFrom=this.PositionH_Old.RelativeFrom;this.PositionH.Align=this.PositionH_Old.Align;this.PositionH.Value=this.PositionH_Old.Value;this.PositionH.Percent=this.PositionH_Old.Percent;var Value=this.Internal_Position.Calculate_X_Value(this.PositionH_Old.RelativeFrom);this.Set_PositionH(this.PositionH_Old.RelativeFrom,false,Value,false);this.X=this.Internal_Position.Calculate_X(bInline,this.PositionH.RelativeFrom,this.PositionH.Align,this.PositionH.Value,
this.PositionH.Percent)}if(undefined!=this.PositionV_Old){this.PositionV.RelativeFrom=this.PositionV_Old.RelativeFrom;this.PositionV.Align=this.PositionV_Old.Align;this.PositionV.Value=this.PositionV_Old.Value;this.PositionV.Percent=this.PositionV_Old.Percent;var Value=this.Internal_Position.Calculate_Y_Value(this.PositionV_Old.RelativeFrom);this.Set_PositionV(this.PositionV_Old.RelativeFrom,false,Value,false);this.Y=this.Internal_Position.Calculate_Y(bInline,this.PositionV.RelativeFrom,this.PositionV.Align,
this.PositionV.Value,this.PositionV.Percent)}this.OrigX=this.X;this.OrigY=this.Y;this.ShiftX=0;this.ShiftY=0;this.updatePosition3(this.PageNum,this.X,this.Y,OldPageNum);this.useWrap=this.Use_TextWrap()};ParaDrawing.prototype.GetClipRect=function(){if(this.Is_Inline()||this.Use_TextWrap()){var oCell;if(this.DocumentContent&&(oCell=this.DocumentContent.IsTableCellContent(true))){var arrPages=oCell.GetCurPageByAbsolutePage(this.PageNum);for(var nIndex=0,nCount=arrPages.length;nIndex<nCount;++nIndex){var oPageBounds=
oCell.GetPageBounds(arrPages[nIndex]);if(this.GraphicObj.bounds.isIntersect(oPageBounds.Left,oPageBounds.Top,oPageBounds.Right,oPageBounds.Bottom))return new AscFormat.CGraphicBounds(oPageBounds.Left,oPageBounds.Top,oPageBounds.Right,oPageBounds.Bottom)}}}return null};ParaDrawing.prototype.Update_PositionYHeaderFooter=function(TopMarginY,BottomMarginY){this.Internal_Position.Update_PositionYHeaderFooter(TopMarginY,BottomMarginY);this.Internal_Position.Calculate_Y(this.Is_Inline(),this.PositionV.RelativeFrom,
this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent);this.OrigY=this.Internal_Position.CalcY;this.Y=this.OrigY+this.ShiftY;this.updatePosition3(this.PageNum,this.X,this.Y,this.PageNum)};ParaDrawing.prototype.Reset_SavedPosition=function(){this.PositionV_Old=undefined;this.PositionH_Old=undefined};ParaDrawing.prototype.setParagraphBorders=function(val){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphBorders==="function")this.GraphicObj.setParagraphBorders(val)};
ParaDrawing.prototype.deselect=function(){this.selected=false;if(this.GraphicObj&&this.GraphicObj.deselect)this.GraphicObj.deselect()};ParaDrawing.prototype.updatePosition3=function(pageIndex,x,y,oldPageNum){var _x=x,_y=y;this.graphicObjects.removeById(pageIndex,this.Get_Id());if(AscFormat.isRealNumber(oldPageNum))this.graphicObjects.removeById(oldPageNum,this.Get_Id());var bChangePageIndex=this.pageIndex!==pageIndex;this.setPageIndex(pageIndex);if(typeof this.GraphicObj.setStartPage==="function"){var bIsHfdFtr=
this.DocumentContent&&this.DocumentContent.IsHdrFtr();this.GraphicObj.setStartPage(pageIndex,bIsHfdFtr,bIsHfdFtr||bChangePageIndex)}if(!(this.DocumentContent&&this.DocumentContent.IsHdrFtr()&&this.DocumentContent.Get_StartPage_Absolute()!==pageIndex)){this.graphicObjects.addObjectOnPage(pageIndex,this.GraphicObj);this.bNoNeedToAdd=false}else this.bNoNeedToAdd=true;if(this.GraphicObj.bNeedUpdatePosition||!(AscFormat.isRealNumber(this.GraphicObj.posX)&&AscFormat.isRealNumber(this.GraphicObj.posY))||
!(Math.abs(this.GraphicObj.posX-_x)<MOVE_DELTA&&Math.abs(this.GraphicObj.posY-_y)<MOVE_DELTA))this.GraphicObj.updatePosition(_x,_y);if(this.GraphicObj.bNeedUpdatePosition||!(AscFormat.isRealNumber(this.wrappingPolygon.posX)&&AscFormat.isRealNumber(this.wrappingPolygon.posY))||!(Math.abs(this.wrappingPolygon.posX-_x)<MOVE_DELTA&&Math.abs(this.wrappingPolygon.posY-_y)<MOVE_DELTA))this.wrappingPolygon.updatePosition(_x,_y);this.calculateSnapArrays()};ParaDrawing.prototype.calculateAfterChangeTheme=function(){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.calculateAfterChangeTheme==="function")this.GraphicObj.calculateAfterChangeTheme()};ParaDrawing.prototype.selectionIsEmpty=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.selectionIsEmpty==="function")return this.GraphicObj.selectionIsEmpty();return false};ParaDrawing.prototype.recalculateDocContent=function(){};ParaDrawing.prototype.Shift=function(Dx,Dy){this.ShiftX=Dx;this.ShiftY=Dy;this.X=this.OrigX+Dx;this.Y=this.OrigY+Dy;this.updatePosition3(this.PageNum,
this.X,this.Y)};ParaDrawing.prototype.IsLayoutInCell=function(){if(this.LogicDocument&&this.LogicDocument.GetCompatibilityMode()>=AscCommon.document_compatibility_mode_Word15)return true;return this.LayoutInCell};ParaDrawing.prototype.Get_Distance=function(){var oDist=this.Distance;return new AscFormat.CDistance(AscFormat.getValOrDefault(oDist.L,AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT),AscFormat.getValOrDefault(oDist.T,0),AscFormat.getValOrDefault(oDist.R,AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT),AscFormat.getValOrDefault(oDist.B,
0))};ParaDrawing.prototype.Set_XYForAdd=function(X,Y,NearPos,PageNum){if(null!==NearPos){var Layout=NearPos.Paragraph.Get_Layout(NearPos.ContentPos,this);this.private_SetXYByLayout(X,Y,PageNum,Layout,true,true);var nRecalcIndex=null;var oLogicDocument=this.document;if(oLogicDocument){nRecalcIndex=oLogicDocument.Get_History().GetRecalculateIndex();this.SetSkipOnRecalculate(true);oLogicDocument.TurnOff_InterfaceEvents();oLogicDocument.Recalculate();oLogicDocument.TurnOn_InterfaceEvents(false);this.SetSkipOnRecalculate(false)}if(null!==
nRecalcIndex)oLogicDocument.Get_History().SetRecalculateIndex(nRecalcIndex);Layout=NearPos.Paragraph.Get_Layout(NearPos.ContentPos,this);this.private_SetXYByLayout(X,Y,PageNum,Layout,true,true)}};ParaDrawing.prototype.SetSkipOnRecalculate=function(isSkip){this.SkipOnRecalculate=isSkip};ParaDrawing.prototype.IsSkipOnRecalculate=function(){return this.SkipOnRecalculate};ParaDrawing.prototype.Set_XY=function(X,Y,Paragraph,PageNum,bResetAlign){if(Paragraph){var PageNumOld=this.PageNum;var ContentPos=
Paragraph.Get_DrawingObjectContentPos(this.Get_Id());if(null===ContentPos)return;var Layout=Paragraph.Get_Layout(ContentPos,this);this.private_SetXYByLayout(X,Y,PageNum,Layout,bResetAlign||true!==this.PositionH.Align?true:false,bResetAlign||true!==this.PositionV.Align?true:false);var nRecalcIndex=null;var oLogicDocument=this.document;if(oLogicDocument){nRecalcIndex=oLogicDocument.Get_History().GetRecalculateIndex();this.SetSkipOnRecalculate(true);oLogicDocument.Recalculate();this.SetSkipOnRecalculate(false)}if(null!==
nRecalcIndex)oLogicDocument.Get_History().SetRecalculateIndex(nRecalcIndex);if(!this.LogicDocument||null===this.LogicDocument.FullRecalc.Id||PageNum<this.LogicDocument.FullRecalc.PageIndex&&PageNumOld<this.LogicDocument.FullRecalc.PageIndex)Layout=Paragraph.Get_Layout(ContentPos,this);this.private_SetXYByLayout(X,Y,PageNum,Layout,bResetAlign||true!==this.PositionH.Align?true:false,bResetAlign||true!==this.PositionV.Align?true:false)}};ParaDrawing.prototype.private_SetXYByLayout=function(X,Y,PageNum,
Layout,bChangeX,bChangeY){if(!Layout)return;this.PageNum=PageNum;this.Internal_Position.Set(this.GraphicObj.extX,this.GraphicObj.extY,this.getXfrmRot(),this.EffectExtent,this.YOffset,Layout.ParagraphLayout,Layout.PageLimitsOrigin);this.Internal_Position.Calculate_X(false,c_oAscRelativeFromH.Page,false,X-Layout.PageLimitsOrigin.X,false);this.Internal_Position.Calculate_Y(false,c_oAscRelativeFromV.Page,false,Y-Layout.PageLimitsOrigin.Y,false);var bCorrect=false;if(this.DocumentContent&&this.DocumentContent.IsTableCellContent&&
this.DocumentContent.IsTableCellContent(false))bCorrect=true;if(this.PositionH.RelativeFrom!==c_oAscRelativeFromH.Page||this.PositionV.RelativeFrom!==c_oAscRelativeFromV.Page)bCorrect=true;this.Internal_Position.Correct_Values(false,Layout.PageLimits,this.AllowOverlap,this.Use_TextWrap(),[],bCorrect);if(true===bChangeX){this.X=this.Internal_Position.CalcX;var ValueX=this.Internal_Position.Calculate_X_Value(this.PositionH.RelativeFrom);this.Set_PositionH(this.PositionH.RelativeFrom,false,ValueX,false);
this.X=this.Internal_Position.Calculate_X(false,this.PositionH.RelativeFrom,this.PositionH.Align,this.PositionH.Value,this.PositionH.Percent)}if(true===bChangeY){this.Y=this.Internal_Position.CalcY;var ValueY=this.Internal_Position.Calculate_Y_Value(this.PositionV.RelativeFrom);this.Set_PositionV(this.PositionV.RelativeFrom,false,ValueY,false);this.Y=this.Internal_Position.Calculate_Y(false,this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent)}};ParaDrawing.prototype.Get_DrawingType=
function(){return this.DrawingType};ParaDrawing.prototype.Is_Inline=function(){if(this.Parent&&this.Parent.Get_ParentTextTransform&&this.Parent.Get_ParentTextTransform())return true;return drawing_Inline===this.DrawingType?true:false};ParaDrawing.prototype.IsInline=function(){return this.Is_Inline()};ParaDrawing.prototype.Use_TextWrap=function(){if(!this.Parent||!this.Parent.Get_FramePr||null!==this.Parent.Get_FramePr()&&undefined!==this.Parent.Get_FramePr())return false;return drawing_Anchor===this.DrawingType&&
!(this.wrappingType===WRAPPING_TYPE_NONE)};ParaDrawing.prototype.IsUseTextWrap=function(){return this.Use_TextWrap()};ParaDrawing.prototype.Draw_Selection=function(){var Padding=this.DrawingDocument.GetMMPerDot(6);var extX,extY;if(this.GraphicObj){extX=this.GraphicObj.extX;extY=this.GraphicObj.extY}else{extX=this.getXfrmExtX();extY=this.getXfrmExtY()}var rot=this.getXfrmRot();if(AscFormat.checkNormalRotate(rot))this.DrawingDocument.AddPageSelection(this.PageNum,this.X-this.EffectExtent.L-Padding,
this.Y-this.EffectExtent.T-Padding,this.EffectExtent.L+extX+this.EffectExtent.R+2*Padding,this.EffectExtent.T+extY+this.EffectExtent.B+2*Padding);else this.DrawingDocument.AddPageSelection(this.PageNum,this.X+extX/2-extY/2-this.EffectExtent.L-Padding,this.Y+extY/2-extX/2-this.EffectExtent.T-Padding,this.EffectExtent.L+extY+this.EffectExtent.R+2*Padding,this.EffectExtent.T+extX+this.EffectExtent.B+2*Padding)};ParaDrawing.prototype.CanInsertToPos=function(oAnchorPos){if(!oAnchorPos||!oAnchorPos.Paragraph||
!oAnchorPos.Paragraph.Parent)return false;return!((this.IsShape()||this.IsGroup())&&(true===oAnchorPos.Paragraph.Parent.Is_DrawingShape()||true===oAnchorPos.Paragraph.Parent.IsFootnote()))};ParaDrawing.prototype.OnEnd_MoveInline=function(NearPos){if(!this.Parent)return;NearPos.Paragraph.Check_NearestPos(NearPos);var oRun=this.GetRun();var oPictureCC=false;if(oRun){var arrContentControls=oRun.GetParentContentControls();for(var nIndex=arrContentControls.length-1;nIndex>=0;--nIndex)if(arrContentControls[nIndex].IsPicture()){oPictureCC=
arrContentControls[nIndex];break}}var oDstRun=null;var arrClasses=NearPos.Paragraph.GetClassesByPos(NearPos.ContentPos);for(var nIndex=arrClasses.length-1;nIndex>=0;--nIndex)if(arrClasses[nIndex]instanceof ParaRun){oDstRun=arrClasses[nIndex];break}if(!oDstRun||oPictureCC&&oDstRun===oRun||oDstRun.GetParentForm()){NearPos.Paragraph.Clear_NearestPosArray();return}var NewParaDrawing=this.Copy();var RunPr=this.Remove_FromDocument(false);this.DocumentContent.Select_DrawingObject(NewParaDrawing.GetId());
NewParaDrawing.Add_ToDocument(NearPos,true,RunPr,undefined,oPictureCC)};ParaDrawing.prototype.Get_ParentTextTransform=function(){if(this.Parent)return this.Parent.Get_ParentTextTransform();return null};ParaDrawing.prototype.GoTo_Text=function(bBefore,bUpdateStates){var Paragraph=this.Get_ParentParagraph();if(Paragraph){Paragraph.MoveCursorToDrawing(this.Id,bBefore);Paragraph.Document_SetThisElementCurrent(undefined===bUpdateStates?true:bUpdateStates)}};ParaDrawing.prototype.Remove_FromDocument=function(bRecalculate){var oResult=
null;if(!this.Parent)return oResult;var oRun=this.Parent.Get_DrawingObjectRun(this.Id);if(oRun){var oGrObject=this.GraphicObj;if(oGrObject&&oGrObject.getObjectType()===AscDFH.historyitem_type_Shape)if(oGrObject.signatureLine)oGrObject.setSignature(oGrObject.signatureLine);var oPictureCC=null;var arrContentControls=oRun.GetParentContentControls();for(var nIndex=arrContentControls.length-1;nIndex>=0;--nIndex)if(arrContentControls[nIndex].IsPicture()){oPictureCC=arrContentControls[nIndex];break}if(oPictureCC)oPictureCC.RemoveContentControlWrapper();
oRun.Remove_DrawingObject(this.Id);if(oRun.IsInHyperlink())oResult=new CTextPr;else oResult=oRun.GetTextPr();if(oGrObject&&oGrObject.getObjectType()===AscDFH.historyitem_type_Shape)if(oGrObject.signatureLine){editor.sendEvent("asc_onRemoveSignature",oGrObject.signatureLine.id);oGrObject.setSignature(oGrObject.signatureLine)}}if(false!=bRecalculate)editor.WordControl.m_oLogicDocument.Recalculate();return oResult};ParaDrawing.prototype.Get_ParentParagraph=function(){if(this.Parent instanceof Paragraph)return this.Parent;
if(this.Parent instanceof ParaRun)return this.Parent.Paragraph;if(this.Parent&&this.Parent.GetParagraph())return this.Parent.GetParagraph();return null};ParaDrawing.prototype.SelectAsText=function(){var oParagraph=this.GetParagraph();var oRun=this.GetRun();if(!oParagraph||!oRun)return;var oDocument=oParagraph.GetLogicDocument();if(!oDocument)return;oDocument.RemoveSelection();oRun.Make_ThisElementCurrent(false);oRun.SetCursorPosition(oRun.GetElementPosition(this));var oStartPos=oDocument.GetContentPosition(false);
oRun.SetCursorPosition(oRun.GetElementPosition(this)+1);var oEndPos=oDocument.GetContentPosition(false);oDocument.RemoveSelection();oDocument.SetSelectionByContentPositions(oStartPos,oEndPos)};ParaDrawing.prototype.Add_ToDocument=function(NearPos,bRecalculate,RunPr,Run,oPictureCC){NearPos.Paragraph.Check_NearestPos(NearPos);var LogicDocument=this.DrawingDocument.m_oLogicDocument;var Para=new Paragraph(this.DrawingDocument,LogicDocument);var DrawingRun=new ParaRun(Para);DrawingRun.Add_ToContent(0,
this);if(RunPr)DrawingRun.Set_Pr(RunPr.Copy());if(Run)DrawingRun.SetReviewTypeWithInfo(Run.GetReviewType(),Run.GetReviewInfo());if(oPictureCC){var oSdt=new CInlineLevelSdt;oSdt.SetPicturePr(true);oSdt.ReplacePlaceHolderWithContent();oSdt.AddToContent(0,DrawingRun);Para.Add_ToContent(0,oSdt);var oFormPr=oPictureCC.GetFormPr();if(oFormPr)oSdt.SetFormPr(oFormPr.Copy())}else Para.Add_ToContent(0,DrawingRun);var SelectedElement=new CSelectedElement(Para,false);var SelectedContent=new CSelectedContent;
SelectedContent.Add(SelectedElement);SelectedContent.SetMoveDrawing(true);SelectedContent.DrawingObjects.push(this);NearPos.Paragraph.Parent.InsertContent(SelectedContent,NearPos);NearPos.Paragraph.Clear_NearestPosArray();NearPos.Paragraph.Correct_Content();this.Set_Parent(NearPos.Paragraph);if(false!=bRecalculate)LogicDocument.Recalculate()};ParaDrawing.prototype.Add_ToDocument2=function(Paragraph){var DrawingRun=new ParaRun(Paragraph);DrawingRun.Add_ToContent(0,this);Paragraph.Add_ToContent(0,DrawingRun);
this.Set_Parent(Paragraph)};ParaDrawing.prototype.UpdateCursorType=function(X,Y,PageIndex){this.DrawingDocument.SetCursorType("move",new AscCommon.CMouseMoveData);if(null!=this.Parent){var Lock=this.Parent.Lock;if(true===Lock.Is_Locked()){var PNum=Math.max(0,Math.min(PageIndex-this.Parent.PageNum,this.Parent.Pages.length-1));var _X=this.Parent.Pages[PNum].X;var _Y=this.Parent.Pages[PNum].Y;var MMData=new AscCommon.CMouseMoveData;var Coords=this.DrawingDocument.ConvertCoordsToCursorWR(_X,_Y,this.Parent.Get_StartPage_Absolute()+
(PageIndex-this.Parent.PageNum));MMData.X_abs=Coords.X-5;MMData.Y_abs=Coords.Y;MMData.Type=Asc.c_oAscMouseMoveDataTypes.LockedObject;MMData.UserId=Lock.Get_UserId();MMData.HaveChanges=Lock.Have_Changes();MMData.LockedObjectType=c_oAscMouseMoveLockedObjectType.Common;editor.sync_MouseMoveCallback(MMData)}}};ParaDrawing.prototype.Get_AnchorPos=function(){if(!this.Parent)return null;return this.Parent.Get_AnchorPos(this)};ParaDrawing.prototype.CheckRecalcAutoFit=function(oSectPr){if(this.GraphicObj&&
this.GraphicObj.CheckNeedRecalcAutoFit)if(this.GraphicObj.CheckNeedRecalcAutoFit(oSectPr)){if(this.GraphicObj)this.GraphicObj.recalcWrapPolygon&&this.GraphicObj.recalcWrapPolygon();this.Measure()}};ParaDrawing.prototype.Get_ParentObject_or_DocumentPos=function(){if(this.Parent!=null)return this.Parent.Get_ParentObject_or_DocumentPos()};ParaDrawing.prototype.Refresh_RecalcData=function(Data){var oRun=this.GetRun();if(oRun){if(AscCommon.isRealObject(Data))switch(Data.Type){case AscDFH.historyitem_Drawing_Distance:{if(this.GraphicObj){this.GraphicObj.recalcWrapPolygon&&
this.GraphicObj.recalcWrapPolygon();this.GraphicObj.addToRecalculate()}break}case AscDFH.historyitem_Drawing_SetExtent:{oRun.RecalcInfo.Measure=true;break}case AscDFH.historyitem_Drawing_SetSizeRelH:case AscDFH.historyitem_Drawing_SetSizeRelV:case AscDFH.historyitem_Drawing_SetGraphicObject:{if(this.GraphicObj){this.GraphicObj.handleUpdateExtents&&this.GraphicObj.handleUpdateExtents();this.GraphicObj.addToRecalculate()}oRun.RecalcInfo.Measure=true;break}case AscDFH.historyitem_Drawing_WrappingType:{if(this.GraphicObj){this.GraphicObj.recalcWrapPolygon&&
this.GraphicObj.recalcWrapPolygon();this.GraphicObj.addToRecalculate()}break}}return oRun.Refresh_RecalcData2()}};ParaDrawing.prototype.Refresh_RecalcData2=function(Data){var oRun=this.GetRun();if(oRun)return oRun.Refresh_RecalcData2()};ParaDrawing.prototype.hyperlinkCheck=function(bCheck){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkCheck==="function")return this.GraphicObj.hyperlinkCheck(bCheck);return null};ParaDrawing.prototype.hyperlinkCanAdd=function(bCheckInHyperlink){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.hyperlinkCanAdd==="function")return this.GraphicObj.hyperlinkCanAdd(bCheckInHyperlink);return false};ParaDrawing.prototype.hyperlinkRemove=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkCanAdd==="function")return this.GraphicObj.hyperlinkRemove();return false};ParaDrawing.prototype.hyperlinkModify=function(HyperProps){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkModify==="function")return this.GraphicObj.hyperlinkModify(HyperProps)};
ParaDrawing.prototype.hyperlinkAdd=function(HyperProps){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkAdd==="function")return this.GraphicObj.hyperlinkAdd(HyperProps)};ParaDrawing.prototype.documentStatistics=function(stat){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.documentStatistics==="function")this.GraphicObj.documentStatistics(stat)};ParaDrawing.prototype.documentCreateFontCharMap=function(fontMap){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.documentCreateFontCharMap==="function")this.GraphicObj.documentCreateFontCharMap(fontMap)};ParaDrawing.prototype.documentCreateFontMap=function(fontMap){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.documentCreateFontMap==="function")this.GraphicObj.documentCreateFontMap(fontMap)};ParaDrawing.prototype.tableCheckSplit=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableCheckSplit==="function")return this.GraphicObj.tableCheckSplit();
return false};ParaDrawing.prototype.tableCheckMerge=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableCheckMerge==="function")return this.GraphicObj.tableCheckMerge();return false};ParaDrawing.prototype.tableSelect=function(Type){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableSelect==="function")return this.GraphicObj.tableSelect(Type)};ParaDrawing.prototype.tableRemoveTable=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableRemoveTable===
"function")return this.GraphicObj.tableRemoveTable()};ParaDrawing.prototype.tableSplitCell=function(Cols,Rows){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableSplitCell==="function")return this.GraphicObj.tableSplitCell(Cols,Rows)};ParaDrawing.prototype.tableMergeCells=function(Cols,Rows){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableMergeCells==="function")return this.GraphicObj.tableMergeCells(Cols,Rows)};ParaDrawing.prototype.tableRemoveCol=function(){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.tableRemoveCol==="function")return this.GraphicObj.tableRemoveCol()};ParaDrawing.prototype.tableAddCol=function(bBefore,nCount){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableAddCol==="function")return this.GraphicObj.tableAddCol(bBefore,nCount)};ParaDrawing.prototype.tableRemoveRow=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableRemoveRow==="function")return this.GraphicObj.tableRemoveRow()};ParaDrawing.prototype.tableAddRow=
function(bBefore,nCount){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableAddRow==="function")return this.GraphicObj.tableAddRow(bBefore,nCount)};ParaDrawing.prototype.getCurrentParagraph=function(bIgnoreSelection,arrSelectedParagraphs){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getCurrentParagraph==="function")return this.GraphicObj.getCurrentParagraph(bIgnoreSelection,arrSelectedParagraphs);if(this.Parent instanceof Paragraph)return this.Parent};ParaDrawing.prototype.GetSelectedText=
function(bClearText,oPr){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.GetSelectedText==="function")return this.GraphicObj.GetSelectedText(bClearText,oPr);return""};ParaDrawing.prototype.getCurPosXY=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getCurPosXY==="function")return this.GraphicObj.getCurPosXY();return{X:0,Y:0}};ParaDrawing.prototype.setParagraphKeepLines=function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphKeepLines===
"function")return this.GraphicObj.setParagraphKeepLines(Value)};ParaDrawing.prototype.setParagraphKeepNext=function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphKeepNext==="function")return this.GraphicObj.setParagraphKeepNext(Value)};ParaDrawing.prototype.setParagraphWidowControl=function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphWidowControl==="function")return this.GraphicObj.setParagraphWidowControl(Value)};ParaDrawing.prototype.setParagraphPageBreakBefore=
function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphPageBreakBefore==="function")return this.GraphicObj.setParagraphPageBreakBefore(Value)};ParaDrawing.prototype.isTextSelectionUse=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.isTextSelectionUse==="function")return this.GraphicObj.isTextSelectionUse();return false};ParaDrawing.prototype.paragraphFormatPaste=function(CopyTextPr,CopyParaPr,Bool){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.isTextSelectionUse==="function")return this.GraphicObj.paragraphFormatPaste(CopyTextPr,CopyParaPr,Bool)};ParaDrawing.prototype.getNearestPos=function(x,y,pageIndex){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getNearestPos==="function")return this.GraphicObj.getNearestPos(x,y,pageIndex);return null};ParaDrawing.prototype.Write_ToBinary=function(Writer){Writer.WriteLong(this.Type);Writer.WriteString2(this.Id)};ParaDrawing.prototype.Write_ToBinary2=function(Writer){Writer.WriteLong(AscDFH.historyitem_type_Drawing);
Writer.WriteString2(this.Id);AscFormat.writeDouble(Writer,this.Extent.W);AscFormat.writeDouble(Writer,this.Extent.H);AscFormat.writeObject(Writer,this.GraphicObj);AscFormat.writeObject(Writer,this.DocumentContent);AscFormat.writeObject(Writer,this.Parent);AscFormat.writeObject(Writer,this.wrappingPolygon);AscFormat.writeLong(Writer,this.RelativeHeight);AscFormat.writeObject(Writer,this.docPr)};ParaDrawing.prototype.Read_FromBinary2=function(Reader){this.Id=Reader.GetString2();this.DrawingDocument=
editor.WordControl.m_oLogicDocument.DrawingDocument;this.LogicDocument=this.DrawingDocument?this.DrawingDocument.m_oLogicDocument:null;this.Extent.W=AscFormat.readDouble(Reader);this.Extent.H=AscFormat.readDouble(Reader);this.GraphicObj=AscFormat.readObject(Reader);this.DocumentContent=AscFormat.readObject(Reader);this.Parent=AscFormat.readObject(Reader);this.wrappingPolygon=AscFormat.readObject(Reader);this.RelativeHeight=AscFormat.readLong(Reader);this.docPr=AscFormat.readObject(Reader);if(this.wrappingPolygon)this.wrappingPolygon.wordGraphicObject=
this;this.drawingDocument=editor.WordControl.m_oLogicDocument.DrawingDocument;this.document=editor.WordControl.m_oLogicDocument;this.graphicObjects=editor.WordControl.m_oLogicDocument.DrawingObjects;this.graphicObjects.addGraphicObject(this);g_oTableId.Add(this,this.Id)};ParaDrawing.prototype.Load_LinkData=function(){};ParaDrawing.prototype.draw=function(graphics,PDSE){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.draw==="function"){graphics.SaveGrState();var bInline=this.Is_Inline();
if(bInline&&AscCommon.isRealObject(PDSE)&&AscFormat.isRealNumber(this.LineTop)&&AscFormat.isRealNumber(this.LineBottom)&&AscCommon.isRealObject(this.GraphicObj.bounds)){var x,y,w,h;var oEffectExtent=this.EffectExtent;x=PDSE.X;y=this.LineTop;w=this.GraphicObj.bounds.r-this.GraphicObj.bounds.l+AscFormat.getValOrDefault(oEffectExtent.R,0)+AscFormat.getValOrDefault(oEffectExtent.L,0);h=this.LineBottom-this.LineTop;graphics.AddClipRect(x,y,w,h)}this.GraphicObj.draw(graphics);graphics.RestoreGrState()}};
ParaDrawing.prototype.drawAdjustments=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.drawAdjustments==="function")this.GraphicObj.drawAdjustments()};ParaDrawing.prototype.getTransformMatrix=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getTransformMatrix==="function")return this.GraphicObj.getTransformMatrix();return null};ParaDrawing.prototype.getExtensions=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getExtensions===
"function")return this.GraphicObj.getExtensions();return null};ParaDrawing.prototype.isGroup=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.isGroup==="function")return this.GraphicObj.isGroup();return false};ParaDrawing.prototype.isShapeChild=function(bRetShape){if(!this.Is_Inline()||!this.DocumentContent)return bRetShape?null:false;var cur_doc_content=this.DocumentContent;var oCell;while(oCell=cur_doc_content.IsTableCellContent(true))cur_doc_content=oCell.Row.Table.Parent;
if(AscCommon.isRealObject(cur_doc_content.Parent)&&typeof cur_doc_content.Parent.getObjectType==="function"&&cur_doc_content.Parent.getObjectType()===AscDFH.historyitem_type_Shape)return bRetShape?cur_doc_content.Parent:true;return bRetShape?null:false};ParaDrawing.prototype.checkShapeChildAndGetTopParagraph=function(paragraph){var parent_paragraph=!paragraph?this.Get_ParentParagraph():paragraph;var parent_doc_content=parent_paragraph.Parent;if(parent_doc_content.Parent instanceof AscFormat.CShape)if(!parent_doc_content.Parent.group)return parent_doc_content.Parent.parent.Get_ParentParagraph();
Old,New,Color)}CChangesParaTextPrHighLight.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrHighLight.prototype.constructor=CChangesParaTextPrHighLight;CChangesParaTextPrHighLight.prototype.Type=AscDFH.historyitem_TextPr_HighLight;CChangesParaTextPrHighLight.prototype.private_SetValue=function(Value){if(this.Class.Value)this.Class.Value.HighLight=Value};CChangesParaTextPrHighLight.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;
if(undefined===this.New)nFlags|=2;else if(highlight_None===this.New)nFlags|=4;if(undefined===this.Old)nFlags|=8;else if(highlight_None===this.Old)nFlags|=16;Writer.WriteLong(nFlags);if(undefined!==this.New&&highlight_None!==this.New)this.New.Write_ToBinary(Writer);if(undefined!==this.Old&&highlight_None!==this.Old)this.Old.Write_ToBinary(Writer)};CChangesParaTextPrHighLight.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&
2)this.New=undefined;else if(nFlags&4)this.New=highlight_None;else{this.New=new CDocumentColor(0,0,0);this.New.Read_FromBinary(Reader)}if(nFlags&8)this.Old=undefined;else if(nFlags&16)this.Old=highlight_None;else{this.Old=new CDocumentColor(0,0,0);this.Old.Read_FromBinary(Reader)}};CChangesParaTextPrHighLight.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrRStyle(Class,Old,New,Color){AscDFH.CChangesBaseStringProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRStyle.prototype=
Object.create(AscDFH.CChangesBaseStringProperty.prototype);CChangesParaTextPrRStyle.prototype.constructor=CChangesParaTextPrRStyle;CChangesParaTextPrRStyle.prototype.Type=AscDFH.historyitem_TextPr_RStyle;CChangesParaTextPrRStyle.prototype.private_SetValue=function(Value){this.Class.Value.RStyle=Value};CChangesParaTextPrRStyle.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrSpacing(Class,Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,Class,Old,New,Color)}
CChangesParaTextPrSpacing.prototype=Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);CChangesParaTextPrSpacing.prototype.constructor=CChangesParaTextPrSpacing;CChangesParaTextPrSpacing.prototype.Type=AscDFH.historyitem_TextPr_Spacing;CChangesParaTextPrSpacing.prototype.private_SetValue=function(Value){this.Class.Value.Spacing=Value};CChangesParaTextPrSpacing.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrDStrikeout(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,
Class,Old,New,Color)}CChangesParaTextPrDStrikeout.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesParaTextPrDStrikeout.prototype.constructor=CChangesParaTextPrDStrikeout;CChangesParaTextPrDStrikeout.prototype.Type=AscDFH.historyitem_TextPr_DStrikeout;CChangesParaTextPrDStrikeout.prototype.private_SetValue=function(Value){this.Class.Value.DStrikeout=Value};CChangesParaTextPrDStrikeout.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrCaps(Class,
Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrCaps.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesParaTextPrCaps.prototype.constructor=CChangesParaTextPrCaps;CChangesParaTextPrCaps.prototype.Type=AscDFH.historyitem_TextPr_Caps;CChangesParaTextPrCaps.prototype.private_SetValue=function(Value){this.Class.Value.Caps=Value};CChangesParaTextPrCaps.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrSmallCaps(Class,
Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrSmallCaps.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesParaTextPrSmallCaps.prototype.constructor=CChangesParaTextPrSmallCaps;CChangesParaTextPrSmallCaps.prototype.Type=AscDFH.historyitem_TextPr_SmallCaps;CChangesParaTextPrSmallCaps.prototype.private_SetValue=function(Value){this.Class.Value.SmallCaps=Value};CChangesParaTextPrSmallCaps.prototype.Merge=private_ParaTextPrChangesOnMergeValue;
function CChangesParaTextPrPosition(Class,Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrPosition.prototype=Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);CChangesParaTextPrPosition.prototype.constructor=CChangesParaTextPrPosition;CChangesParaTextPrPosition.prototype.Type=AscDFH.historyitem_TextPr_Position;CChangesParaTextPrPosition.prototype.private_SetValue=function(Value){this.Class.Value.Position=Value};CChangesParaTextPrPosition.prototype.Merge=
private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrValue(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrValue.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrValue.prototype.constructor=CChangesParaTextPrValue;CChangesParaTextPrValue.prototype.Type=AscDFH.historyitem_TextPr_Value;CChangesParaTextPrValue.prototype.private_SetValue=function(Value){this.Class.Value=Value};CChangesParaTextPrValue.prototype.private_CreateObject=
function(){return new CTextPr};CChangesParaTextPrValue.prototype.private_IsCreateEmptyObject=function(){return true};CChangesParaTextPrValue.prototype.Merge=function(oChange){if(oChange.Class!==this.Class)return true;if(oChange.Type===this.Type)return false;if(!this.New)this.New=new CTextPr;switch(oChange.Type){case AscDFH.historyitem_TextPr_Bold:{this.New.Bold=oChange.New;break}case AscDFH.historyitem_TextPr_Italic:{this.New.Italic=oChange.New;break}case AscDFH.historyitem_TextPr_Strikeout:{this.New.Strikeout=
oChange.New;break}case AscDFH.historyitem_TextPr_Underline:{this.New.Underline=oChange.New;break}case AscDFH.historyitem_TextPr_FontSize:{this.New.FontSize=oChange.New;break}case AscDFH.historyitem_TextPr_Color:{this.New.Color=oChange.New;break}case AscDFH.historyitem_TextPr_VertAlign:{this.New.VertAlign=oChange.New;break}case AscDFH.historyitem_TextPr_HighLight:{this.New.HighLight=oChange.New;break}case AscDFH.historyitem_TextPr_RStyle:{this.New.RStyle=oChange.New;break}case AscDFH.historyitem_TextPr_Spacing:{this.New.Spacing=
oChange.New;break}case AscDFH.historyitem_TextPr_DStrikeout:{this.New.DStrikeout=oChange.New;break}case AscDFH.historyitem_TextPr_Caps:{this.New.Caps=oChange.New;break}case AscDFH.historyitem_TextPr_SmallCaps:{this.New.SmallCaps=oChange.New;break}case AscDFH.historyitem_TextPr_Position:{this.New.Position=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts:{this.New.RFonts=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_Ascii:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.Ascii=
oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_HAnsi:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.HAnsi=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_CS:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.CS=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_EastAsia:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_Hint:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;
this.New.RFonts.Hint=oChange.New;break}case AscDFH.historyitem_TextPr_Lang:{this.New.Lang=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_Bidi:{if(!this.New.Lang)this.New.Lang=new CLang;this.New.Lang.Bidi=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_EastAsia:{if(!this.New.Lang)this.New.Lang=new CLang;this.New.Lang.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_Val:{if(!this.New.Lang)this.New.Lang=new CLang;this.New.Lang.Val=oChange.New;break}case AscDFH.historyitem_TextPr_Unifill:{this.New.Unifill=
oChange.New;break}case AscDFH.historyitem_TextPr_FontSizeCS:{this.New.FontSizeCS=oChange.New;break}case AscDFH.historyitem_TextPr_Outline:{this.New.TextOutline=oChange.New;break}case AscDFH.historyitem_TextPr_Fill:{this.New.TextFill=oChange.New;break}}return true};function CChangesParaTextPrRFonts(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFonts.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrRFonts.prototype.constructor=
CChangesParaTextPrRFonts;CChangesParaTextPrRFonts.prototype.Type=AscDFH.historyitem_TextPr_RFonts;CChangesParaTextPrRFonts.prototype.private_SetValue=function(Value){this.Class.Value.RFonts=Value};CChangesParaTextPrRFonts.prototype.private_CreateObject=function(){return new CRFonts};CChangesParaTextPrRFonts.prototype.private_IsCreateEmptyObject=function(){return true};CChangesParaTextPrRFonts.prototype.Merge=function(oChange){if(this.Class!==oChange.Class)return true;if(this.Type===oChange.Type||
oChange.Type===AscDFH.historyitem_TextPr_Value)return false;if(!this.New)this.New=new CRFonts;switch(oChange.Type){case AscDFH.historyitem_TextPr_RFonts_Ascii:{this.New.Ascii=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_HAnsi:{this.New.HAnsi=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_CS:{this.New.CS=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_EastAsia:{this.New.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_Hint:{this.New.Hint=oChange.New;break}}return true};
function CChangesParaTextPrRFontsAscii(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsAscii.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsAscii.prototype.constructor=CChangesParaTextPrRFontsAscii;CChangesParaTextPrRFontsAscii.prototype.Type=AscDFH.historyitem_TextPr_RFonts_Ascii;CChangesParaTextPrRFontsAscii.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===
this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==this.Old)Writer.WriteString2(this.Old.Name)};CChangesParaTextPrRFontsAscii.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;else this.Old={Name:Reader.GetString2(),Index:-1}};
CChangesParaTextPrRFontsAscii.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.Ascii=Value};CChangesParaTextPrRFontsAscii.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrRFontsHAnsi(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsHAnsi.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsHAnsi.prototype.constructor=CChangesParaTextPrRFontsHAnsi;CChangesParaTextPrRFontsHAnsi.prototype.Type=
AscDFH.historyitem_TextPr_RFonts_HAnsi;CChangesParaTextPrRFontsHAnsi.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==this.Old)Writer.WriteString2(this.Old.Name)};CChangesParaTextPrRFontsHAnsi.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=
false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;else this.Old={Name:Reader.GetString2(),Index:-1}};CChangesParaTextPrRFontsHAnsi.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.HAnsi=Value};CChangesParaTextPrRFontsHAnsi.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrRFontsCS(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsCS.prototype=
Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsCS.prototype.constructor=CChangesParaTextPrRFontsCS;CChangesParaTextPrRFontsCS.prototype.Type=AscDFH.historyitem_TextPr_RFonts_CS;CChangesParaTextPrRFontsCS.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==this.Old)Writer.WriteString2(this.Old.Name)};
CChangesParaTextPrRFontsCS.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;else this.Old={Name:Reader.GetString2(),Index:-1}};CChangesParaTextPrRFontsCS.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.CS=Value};CChangesParaTextPrRFontsCS.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;
function CChangesParaTextPrRFontsEastAsia(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsEastAsia.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsEastAsia.prototype.constructor=CChangesParaTextPrRFontsEastAsia;CChangesParaTextPrRFontsEastAsia.prototype.Type=AscDFH.historyitem_TextPr_RFonts_EastAsia;CChangesParaTextPrRFontsEastAsia.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=
1;if(undefined===this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==this.Old)Writer.WriteString2(this.Old.Name)};CChangesParaTextPrRFontsEastAsia.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;else this.Old={Name:Reader.GetString2(),
Index:-1}};CChangesParaTextPrRFontsEastAsia.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.EastAsia=Value};CChangesParaTextPrRFontsEastAsia.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrRFontsHint(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsHint.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrRFontsHint.prototype.constructor=CChangesParaTextPrRFontsHint;
CChangesParaTextPrRFontsHint.prototype.Type=AscDFH.historyitem_TextPr_RFonts_Hint;CChangesParaTextPrRFontsHint.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.Hint=Value};CChangesParaTextPrRFontsHint.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrLang(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrLang.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrLang.prototype.constructor=
CChangesParaTextPrLang;CChangesParaTextPrLang.prototype.Type=AscDFH.historyitem_TextPr_Lang;CChangesParaTextPrLang.prototype.private_SetValue=function(Value){this.Class.Value.Lang=Value};CChangesParaTextPrLang.prototype.private_CreateObject=function(){return new CLang};CChangesParaTextPrLang.prototype.private_IsCreateEmptyObject=function(){return true};CChangesParaTextPrLang.prototype.Merge=function(oChange){if(this.Class!==oChange.Class)return true;if(AscDFH.historyitem_TextPr_Lang===oChange.Type||
AscDFH.historyitem_TextPr_Value===oChange.Type)return false;if(!this.New)this.New=new CLang;switch(oChange.Type){case AscDFH.historyitem_TextPr_Lang_Bidi:{this.New.Bidi=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_EastAsia:{this.New.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_Val:{this.New.Val=oChange.New;break}}return true};function CChangesParaTextPrLangBidi(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrLangBidi.prototype=
Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrLangBidi.prototype.constructor=CChangesParaTextPrLangBidi;CChangesParaTextPrLangBidi.prototype.Type=AscDFH.historyitem_TextPr_Lang_Bidi;CChangesParaTextPrLangBidi.prototype.private_SetValue=function(Value){this.Class.Value.Lang.Bidi=Value};CChangesParaTextPrLangBidi.prototype.Merge=private_ParaTextPrChangesOnMergeLangValue;function CChangesParaTextPrLangEastAsia(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,
Class,Old,New,Color)}CChangesParaTextPrLangEastAsia.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrLangEastAsia.prototype.constructor=CChangesParaTextPrLangEastAsia;CChangesParaTextPrLangEastAsia.prototype.Type=AscDFH.historyitem_TextPr_Lang_EastAsia;CChangesParaTextPrLangEastAsia.prototype.private_SetValue=function(Value){this.Class.Value.Lang.EastAsia=Value};CChangesParaTextPrLangEastAsia.prototype.Merge=private_ParaTextPrChangesOnMergeLangValue;function CChangesParaTextPrLangVal(Class,
Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrLangVal.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrLangVal.prototype.constructor=CChangesParaTextPrLangVal;CChangesParaTextPrLangVal.prototype.Type=AscDFH.historyitem_TextPr_Lang_Val;CChangesParaTextPrLangVal.prototype.private_SetValue=function(Value){this.Class.Value.Lang.Val=Value};CChangesParaTextPrLangVal.prototype.Merge=private_ParaTextPrChangesOnMergeLangValue;
function CChangesParaTextPrUnifill(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrUnifill.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrUnifill.prototype.constructor=CChangesParaTextPrUnifill;CChangesParaTextPrUnifill.prototype.Type=AscDFH.historyitem_TextPr_Unifill;CChangesParaTextPrUnifill.prototype.private_SetValue=function(Value){this.Class.Value.Unifill=Value};CChangesParaTextPrUnifill.prototype.private_CreateObject=
function(){return new AscFormat.CUniFill};CChangesParaTextPrUnifill.prototype.Load=function(Color){this.Redo();var Unifill=this.Class.Value.Unifill;if(AscCommon.CollaborativeEditing&&Unifill&&Unifill.fill&&Unifill.fill.type===Asc.c_oAscFill.FILL_TYPE_BLIP&&typeof Unifill.fill.RasterImageId==="string"&&Unifill.fill.RasterImageId.length>0)AscCommon.CollaborativeEditing.Add_NewImage(Unifill.fill.RasterImageId)};CChangesParaTextPrUnifill.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrFontSizeCS(Class,
Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrFontSizeCS.prototype=Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);CChangesParaTextPrFontSizeCS.prototype.constructor=CChangesParaTextPrFontSizeCS;CChangesParaTextPrFontSizeCS.prototype.Type=AscDFH.historyitem_TextPr_FontSizeCS;CChangesParaTextPrFontSizeCS.prototype.private_SetValue=function(Value){this.Class.Value.FontSizeCS=Value};CChangesParaTextPrFontSizeCS.prototype.Merge=private_ParaTextPrChangesOnMergeValue;
function CChangesParaTextPrTextOutline(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrTextOutline.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrTextOutline.prototype.constructor=CChangesParaTextPrTextOutline;CChangesParaTextPrTextOutline.prototype.Type=AscDFH.historyitem_TextPr_Outline;CChangesParaTextPrTextOutline.prototype.private_SetValue=function(Value){this.Class.Value.TextOutline=Value};CChangesParaTextPrTextOutline.prototype.private_CreateObject=
function(){return new AscFormat.CLn};CChangesParaTextPrTextOutline.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrTextFill(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrTextFill.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrTextFill.prototype.constructor=CChangesParaTextPrTextFill;CChangesParaTextPrTextFill.prototype.Type=AscDFH.historyitem_TextPr_Fill;CChangesParaTextPrTextFill.prototype.private_SetValue=
function(Value){this.Class.Value.TextFill=Value};CChangesParaTextPrTextFill.prototype.private_CreateObject=function(){return new AscFormat.CUniFill};CChangesParaTextPrTextFill.prototype.Merge=private_ParaTextPrChangesOnMergeValue;"use strict";var drawing_Inline=1;var drawing_Anchor=2;var WRAPPING_TYPE_NONE=0;var WRAPPING_TYPE_SQUARE=1;var WRAPPING_TYPE_THROUGH=2;var WRAPPING_TYPE_TIGHT=3;var WRAPPING_TYPE_TOP_AND_BOTTOM=4;var WRAP_HIT_TYPE_POINT=0;var WRAP_HIT_TYPE_SECTION=1;var c_oAscAlignH=Asc.c_oAscAlignH;
var c_oAscAlignV=Asc.c_oAscAlignV;function ParaDrawing(W,H,GraphicObj,DrawingDocument,DocumentContent,Parent){CRunElementBase.call(this);this.Id=AscCommon.g_oIdCounter.Get_NewId();this.DrawingType=drawing_Inline;this.GraphicObj=GraphicObj;this.X=0;this.Y=0;this.Width=0;this.Height=0;this.OrigX=0;this.OrigY=0;this.ShiftX=0;this.ShiftY=0;this.PageNum=0;this.LineNum=0;this.YOffset=0;this.DocumentContent=DocumentContent;this.DrawingDocument=DrawingDocument;this.Parent=Parent;this.LogicDocument=DrawingDocument?
DrawingDocument.m_oLogicDocument:null;this.Distance={T:0,B:0,L:0,R:0};this.LayoutInCell=true;this.RelativeHeight=undefined;this.SimplePos={Use:false,X:0,Y:0};this.Extent={W:W,H:H};this.EffectExtent={L:0,T:0,R:0,B:0};this.docPr=new AscFormat.CNvPr;this.SizeRelH=undefined;this.SizeRelV=undefined;this.AllowOverlap=true;this.Locked=null;this.Hidden=null;this.PositionH={RelativeFrom:c_oAscRelativeFromH.Column,Align:false,Value:0,Percent:false};this.PositionV={RelativeFrom:c_oAscRelativeFromV.Paragraph,
Align:false,Value:0,Percent:false};this.PositionH_Old=undefined;this.PositionV_Old=undefined;this.Internal_Position=new CAnchorPosition;this.wrappingType=WRAPPING_TYPE_THROUGH;this.useWrap=true;if(typeof CWrapPolygon!=="undefined")this.wrappingPolygon=new CWrapPolygon(this);this.document=editor.WordControl.m_oLogicDocument;this.drawingDocument=DrawingDocument;this.graphicObjects=editor.WordControl.m_oLogicDocument.DrawingObjects;this.selected=false;this.behindDoc=false;this.bNoNeedToAdd=false;this.pageIndex=
-1;this.Lock=new AscCommon.CLock;this.ParaMath=null;this.SkipOnRecalculate=false;this.LineTop=null;this.LineBottom=null;g_oTableId.Add(this,this.Id);if(this.graphicObjects){this.Set_RelativeHeight(this.graphicObjects.getZIndex());if(History.Is_On()&&!g_oTableId.m_bTurnOff)this.graphicObjects.addGraphicObject(this)}}ParaDrawing.prototype=Object.create(CRunElementBase.prototype);ParaDrawing.prototype.constructor=ParaDrawing;ParaDrawing.prototype.Type=para_Drawing;ParaDrawing.prototype.Get_Type=function(){return this.Type};
ParaDrawing.prototype.Get_Width=function(){return this.Width};ParaDrawing.prototype.Get_WidthVisible=function(){return this.WidthVisible};ParaDrawing.prototype.Set_WidthVisible=function(WidthVisible){this.WidthVisible=WidthVisible};ParaDrawing.prototype.GetSelectedContent=function(SelectedContent){if(this.GraphicObj&&this.GraphicObj.GetSelectedContent)this.GraphicObj.GetSelectedContent(SelectedContent)};ParaDrawing.prototype.GetSearchElementId=function(bNext,bCurrent){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.GetSearchElementId==="function")return this.GraphicObj.GetSearchElementId(bNext,bCurrent);return null};ParaDrawing.prototype.CheckCorrect=function(){if(!this.GraphicObj)return false;if(this.GraphicObj&&this.GraphicObj.checkCorrect)return this.GraphicObj.checkCorrect();return true};ParaDrawing.prototype.GetAllDrawingObjects=function(DrawingObjects){if(null==DrawingObjects)DrawingObjects=[];if(this.GraphicObj.GetAllDrawingObjects)this.GraphicObj.GetAllDrawingObjects(DrawingObjects)};
ParaDrawing.prototype.canRotate=function(){return AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.canRotate=="function"&&this.GraphicObj.canRotate()};ParaDrawing.prototype.GetParagraph=function(){return this.Get_ParentParagraph()};ParaDrawing.prototype.GetRun=function(){return this.Get_Run()};ParaDrawing.prototype.Get_Run=function(){var oParagraph=this.Get_ParentParagraph();if(oParagraph)return oParagraph.Get_DrawingObjectRun(this.Id);return null};ParaDrawing.prototype.Get_Props=function(OtherProps){var Props=
{};Props.Width=this.GraphicObj.extX;Props.Height=this.GraphicObj.extY;if(drawing_Inline===this.DrawingType)Props.WrappingStyle=c_oAscWrapStyle2.Inline;else if(WRAPPING_TYPE_NONE===this.wrappingType)Props.WrappingStyle=this.behindDoc===true?c_oAscWrapStyle2.Behind:c_oAscWrapStyle2.InFront;else switch(this.wrappingType){case WRAPPING_TYPE_SQUARE:Props.WrappingStyle=c_oAscWrapStyle2.Square;break;case WRAPPING_TYPE_TIGHT:Props.WrappingStyle=c_oAscWrapStyle2.Tight;break;case WRAPPING_TYPE_THROUGH:Props.WrappingStyle=
c_oAscWrapStyle2.Through;break;case WRAPPING_TYPE_TOP_AND_BOTTOM:Props.WrappingStyle=c_oAscWrapStyle2.TopAndBottom;break;default:Props.WrappingStyle=c_oAscWrapStyle2.Inline;break}if(drawing_Inline===this.DrawingType)Props.Paddings={Left:AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT,Right:AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT,Top:0,Bottom:0};else{var oDistance=this.Get_Distance();Props.Paddings={Left:oDistance.L,Right:oDistance.R,Top:oDistance.T,Bottom:oDistance.B}}Props.AllowOverlap=this.AllowOverlap;Props.Position=
{X:this.X,Y:this.Y};Props.PositionH={RelativeFrom:this.PositionH.RelativeFrom,UseAlign:this.PositionH.Align,Align:true===this.PositionH.Align?this.PositionH.Value:undefined,Value:true===this.PositionH.Align?0:this.PositionH.Value,Percent:this.PositionH.Percent};Props.PositionV={RelativeFrom:this.PositionV.RelativeFrom,UseAlign:this.PositionV.Align,Align:true===this.PositionV.Align?this.PositionV.Value:undefined,Value:true===this.PositionV.Align?0:this.PositionV.Value,Percent:this.PositionV.Percent};
if(this.SizeRelH&&this.SizeRelH.Percent>0)Props.SizeRelH={RelativeFrom:AscFormat.ConvertRelSizeHToRelPosition(this.SizeRelH.RelativeFrom),Value:this.SizeRelH.Percent*100>>0};if(this.SizeRelV&&this.SizeRelV.Percent>0)Props.SizeRelV={RelativeFrom:AscFormat.ConvertRelSizeVToRelPosition(this.SizeRelV.RelativeFrom),Value:this.SizeRelV.Percent*100>>0};Props.Internal_Position=this.Internal_Position;Props.Locked=this.Lock.Is_Locked();var ParentParagraph=this.Get_ParentParagraph();if(ParentParagraph&&undefined!==
ParentParagraph.Parent){var DocContent=ParentParagraph.Parent;if(true===DocContent.Is_DrawingShape()||DocContent.GetTopDocumentContent()instanceof CFootEndnote)Props.CanBeFlow=false}Props.title=this.docPr.title!==null?this.docPr.title:undefined;Props.description=this.docPr.descr!==null?this.docPr.descr:undefined;if(null!=OtherProps&&undefined!=OtherProps){if(undefined===OtherProps.Width||.001>Math.abs(Props.Width-OtherProps.Width))Props.Width=undefined;if(undefined===OtherProps.Height||.001>Math.abs(Props.Height-
OtherProps.Height))Props.Height=undefined;if(undefined===OtherProps.WrappingStyle||Props.WrappingStyle!=OtherProps.WrappingStyle)Props.WrappingStyle=undefined;if(undefined===OtherProps.ImageUrl||Props.ImageUrl!=OtherProps.ImageUrl)Props.ImageUrl=undefined;if(undefined===OtherProps.Paddings.Left||.001>Math.abs(Props.Paddings.Left-OtherProps.Paddings.Left))Props.Paddings.Left=undefined;if(undefined===OtherProps.Paddings.Right||.001>Math.abs(Props.Paddings.Right-OtherProps.Paddings.Right))Props.Paddings.Right=
undefined;if(undefined===OtherProps.Paddings.Top||.001>Math.abs(Props.Paddings.Top-OtherProps.Paddings.Top))Props.Paddings.Top=undefined;if(undefined===OtherProps.Paddings.Bottom||.001>Math.abs(Props.Paddings.Bottom-OtherProps.Paddings.Bottom))Props.Paddings.Bottom=undefined;if(undefined===OtherProps.AllowOverlap||Props.AllowOverlap!=OtherProps.AllowOverlap)Props.AllowOverlap=undefined;if(undefined===OtherProps.Position.X||.001>Math.abs(Props.Position.X-OtherProps.Position.X))Props.Position.X=undefined;
if(undefined===OtherProps.Position.Y||.001>Math.abs(Props.Position.Y-OtherProps.Position.Y))Props.Position.Y=undefined;if(undefined===OtherProps.PositionH.RelativeFrom||Props.PositionH.RelativeFrom!=OtherProps.PositionH.RelativeFrom)Props.PositionH.RelativeFrom=undefined;if(undefined===OtherProps.PositionH.UseAlign||Props.PositionH.UseAlign!=OtherProps.PositionH.UseAlign)Props.PositionH.UseAlign=undefined;if(Props.PositionH.RelativeFrom===OtherProps.PositionH.RelativeFrom&&Props.PositionH.UseAlign===
OtherProps.PositionH.UseAlign){if(true!=Props.PositionH.UseAlign&&.001>Math.abs(Props.PositionH.Value-OtherProps.PositionH.Value))Props.PositionH.Value=undefined;if(true===Props.PositionH.UseAlign&&Props.PositionH.Align!=OtherProps.PositionH.Align)Props.PositionH.Align=undefined}if(undefined===OtherProps.PositionV.RelativeFrom||Props.PositionV.RelativeFrom!=OtherProps.PositionV.RelativeFrom)Props.PositionV.RelativeFrom=undefined;if(undefined===OtherProps.PositionV.UseAlign||Props.PositionV.UseAlign!=
OtherProps.PositionV.UseAlign)Props.PositionV.UseAlign=undefined;if(Props.PositionV.RelativeFrom===OtherProps.PositionV.RelativeFrom&&Props.PositionV.UseAlign===OtherProps.PositionV.UseAlign){if(true!=Props.PositionV.UseAlign&&.001>Math.abs(Props.PositionV.Value-OtherProps.PositionV.Value))Props.PositionV.Value=undefined;if(true===Props.PositionV.UseAlign&&Props.PositionV.Align!=OtherProps.PositionV.Align)Props.PositionV.Align=undefined}if(false===OtherProps.Locked)Props.Locked=false;if(false===OtherProps.CanBeFlow||
false===Props.CanBeFlow)Props.CanBeFlow=false;else Props.CanBeFlow=true;if(undefined===OtherProps.title||Props.title!==OtherProps.title)Props.title=undefined;if(undefined===OtherProps.description||Props.description!==OtherProps.description)Props.description=undefined}return Props};ParaDrawing.prototype.Is_UseInDocument=function(){if(this.Parent){var Run=this.Parent.Get_DrawingObjectRun(this.Id);if(Run)return Run.Is_UseInDocument(this.Get_Id())}return false};ParaDrawing.prototype.IsUseInDocument=function(){return this.Is_UseInDocument()};
ParaDrawing.prototype.CheckGroupSizes=function(){if(this.GraphicObj&&this.GraphicObj.CheckGroupSizes)this.GraphicObj.CheckGroupSizes()};ParaDrawing.prototype.Set_DrawingType=function(DrawingType){History.Add(new CChangesParaDrawingDrawingType(this,this.DrawingType,DrawingType));this.DrawingType=DrawingType};ParaDrawing.prototype.Set_WrappingType=function(WrapType){History.Add(new CChangesParaDrawingWrappingType(this,this.wrappingType,WrapType));this.wrappingType=WrapType};ParaDrawing.prototype.Set_Distance=
function(L,T,R,B){var oDistance=this.Get_Distance();if(!AscFormat.isRealNumber(L))L=oDistance.L;if(!AscFormat.isRealNumber(T))T=oDistance.T;if(!AscFormat.isRealNumber(R))R=oDistance.R;if(!AscFormat.isRealNumber(B))B=oDistance.B;History.Add(new CChangesParaDrawingDistance(this,{Left:this.Distance.L,Top:this.Distance.T,Right:this.Distance.R,Bottom:this.Distance.B},{Left:L,Top:T,Right:R,Bottom:B}));this.Distance.L=L;this.Distance.R=R;this.Distance.T=T;this.Distance.B=B};ParaDrawing.prototype.Set_AllowOverlap=
function(AllowOverlap){History.Add(new CChangesParaDrawingAllowOverlap(this,this.AllowOverlap,AllowOverlap));this.AllowOverlap=AllowOverlap};ParaDrawing.prototype.Set_PositionH=function(RelativeFrom,Align,Value,Percent){var _Value,_Percent;if(AscFormat.isRealNumber(Value)&&AscFormat.fApproxEqual(Value,0)&&true===Percent){_Value=0;_Percent=false}else{_Value=Value;_Percent=Percent}History.Add(new CChangesParaDrawingPositionH(this,{RelativeFrom:this.PositionH.RelativeFrom,Align:this.PositionH.Align,
Value:this.PositionH.Value,Percent:this.PositionH.Percent},{RelativeFrom:RelativeFrom,Align:Align,Value:_Value,Percent:_Percent}));this.PositionH.RelativeFrom=RelativeFrom;this.PositionH.Align=Align;this.PositionH.Value=_Value;this.PositionH.Percent=_Percent};ParaDrawing.prototype.Set_PositionV=function(RelativeFrom,Align,Value,Percent){var _Value,_Percent;if(AscFormat.isRealNumber(Value)&&AscFormat.fApproxEqual(Value,0)&&true===Percent){_Value=0;_Percent=false}else{_Value=Value;_Percent=Percent}History.Add(new CChangesParaDrawingPositionV(this,
{RelativeFrom:this.PositionV.RelativeFrom,Align:this.PositionV.Align,Value:this.PositionV.Value,Percent:this.PositionV.Percent},{RelativeFrom:RelativeFrom,Align:Align,Value:_Value,Percent:_Percent}));this.PositionV.RelativeFrom=RelativeFrom;this.PositionV.Align=Align;this.PositionV.Value=_Value;this.PositionV.Percent=_Percent};ParaDrawing.prototype.GetPositionH=function(){return{RelativeFrom:this.PositionH.RelativeFrom,Align:this.PositionH.Align,Value:this.PositionH.Value,Percent:this.PositionH.Percent}};
ParaDrawing.prototype.GetPositionV=function(){return{RelativeFrom:this.PositionV.RelativeFrom,Align:this.PositionV.Align,Value:this.PositionV.Value,Percent:this.PositionV.Percent}};ParaDrawing.prototype.Set_BehindDoc=function(BehindDoc){History.Add(new CChangesParaDrawingBehindDoc(this,this.behindDoc,BehindDoc));this.behindDoc=BehindDoc};ParaDrawing.prototype.Set_GraphicObject=function(graphicObject){var oldId=AscCommon.isRealObject(this.GraphicObj)?this.GraphicObj.Get_Id():null;var newId=AscCommon.isRealObject(graphicObject)?
graphicObject.Get_Id():null;History.Add(new CChangesParaDrawingGraphicObject(this,oldId,newId));if(graphicObject)graphicObject.handleUpdateExtents();this.GraphicObj=graphicObject};ParaDrawing.prototype.setSimplePos=function(use,x,y){History.Add(new CChangesParaDrawingSimplePos(this,{Use:this.SimplePos.Use,X:this.SimplePos.X,Y:this.SimplePos.Y},{Use:use,X:x,Y:y}));this.SimplePos.Use=use;this.SimplePos.X=x;this.SimplePos.Y=y};ParaDrawing.prototype.setExtent=function(extX,extY){History.Add(new CChangesParaDrawingExtent(this,
{W:this.Extent.W,H:this.Extent.H},{W:extX,H:extY}));this.Extent.W=extX;this.Extent.H=extY};ParaDrawing.prototype.addWrapPolygon=function(wrapPolygon){History.Add(new CChangesParaDrawingWrapPolygon(this,this.wrappingPolygon,wrapPolygon));this.wrappingPolygon=wrapPolygon};ParaDrawing.prototype.Set_Locked=function(bLocked){History.Add(new CChangesParaDrawingLocked(this,this.Locked,bLocked));this.Locked=bLocked};ParaDrawing.prototype.Set_RelativeHeight=function(nRelativeHeight){History.Add(new CChangesParaDrawingRelativeHeight(this,
this.RelativeHeight,nRelativeHeight));this.Set_RelativeHeight2(nRelativeHeight)};ParaDrawing.prototype.Set_RelativeHeight2=function(nRelativeHeight){this.RelativeHeight=nRelativeHeight;if(this.graphicObjects&&AscFormat.isRealNumber(nRelativeHeight)&&nRelativeHeight>this.graphicObjects.maximalGraphicObjectZIndex)this.graphicObjects.maximalGraphicObjectZIndex=nRelativeHeight};ParaDrawing.prototype.setEffectExtent=function(L,T,R,B){var oEE=this.EffectExtent;History.Add(new CChangesParaDrawingEffectExtent(this,
{L:oEE.L,T:oEE.T,R:oEE.R,B:oEE.B},{L:L,T:T,R:R,B:B}));this.EffectExtent.L=L;this.EffectExtent.T=T;this.EffectExtent.R=R;this.EffectExtent.B=B};ParaDrawing.prototype.Set_Parent=function(oParent){History.Add(new CChangesParaDrawingParent(this,this.Parent,oParent));this.Parent=oParent};ParaDrawing.prototype.IsWatermark=function(){if(!this.GraphicObj)return false;if(this.GraphicObj.getObjectType()!==AscDFH.historyitem_type_Shape&&this.GraphicObj.getObjectType()!==AscDFH.historyitem_type_ImageShape)return false;
if(this.Is_Inline())return false;var oParagraph=this.GetParagraph();if(!(oParagraph instanceof Paragraph))return false;var oContent=oParagraph.Parent;if(!oContent||oContent.Is_DrawingShape(false))return false;var oHdrFtr=oContent.IsHdrFtr(true);if(!oHdrFtr)return false;var oRun=this.Get_Run();if(!oRun)return false;var arrDocPos=oRun.GetDocumentPositionFromObject();for(var nIndex=0,nCount=arrDocPos.length;nIndex<nCount;++nIndex){var oClass=arrDocPos[nIndex].Class;var oSdt=null;if(oClass instanceof
CDocumentContent&&oClass.Parent instanceof CBlockLevelSdt)oSdt=oClass.Parent;else if(oClass instanceof CInlineLevelSdt)oSdt=oClass;if(oSdt){var oPr=oSdt.Pr;if(AscCommon.isRealObject(oPr)&&AscCommon.isRealObject(oPr.DocPartObj)&&oPr.DocPartObj.Gallery==="Watermarks")return true}}return false};ParaDrawing.prototype.Set_ParaMath=function(ParaMath){History.Add(new CChangesParaDrawingParaMath(this,this.ParaMath,ParaMath));this.ParaMath=ParaMath};ParaDrawing.prototype.Set_LayoutInCell=function(LayoutInCell){if(this.LayoutInCell===
LayoutInCell)return;History.Add(new CChangesParaDrawingLayoutInCell(this,this.LayoutInCell,LayoutInCell));this.LayoutInCell=LayoutInCell};ParaDrawing.prototype.SetSizeRelH=function(oSize){History.Add(new CChangesParaDrawingSizeRelH(this,this.SizeRelH,oSize));this.SizeRelH=oSize};ParaDrawing.prototype.SetSizeRelV=function(oSize){History.Add(new CChangesParaDrawingSizeRelV(this,this.SizeRelV,oSize));this.SizeRelV=oSize};ParaDrawing.prototype.getXfrmExtX=function(){if(AscCommon.isRealObject(this.GraphicObj)&&
AscCommon.isRealObject(this.GraphicObj.spPr)&&AscCommon.isRealObject(this.GraphicObj.spPr.xfrm)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extX))return this.GraphicObj.spPr.xfrm.extX;if(AscFormat.isRealNumber(this.Extent.W))return this.Extent.W;return 0};ParaDrawing.prototype.getXfrmExtY=function(){if(AscCommon.isRealObject(this.GraphicObj)&&AscCommon.isRealObject(this.GraphicObj.spPr)&&AscCommon.isRealObject(this.GraphicObj.spPr.xfrm)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extY))return this.GraphicObj.spPr.xfrm.extY;
if(AscFormat.isRealNumber(this.Extent.H))return this.Extent.H;return 0};ParaDrawing.prototype.getXfrmRot=function(){if(AscCommon.isRealObject(this.GraphicObj)&&AscCommon.isRealObject(this.GraphicObj.spPr)&&AscCommon.isRealObject(this.GraphicObj.spPr.xfrm)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.rot))return this.GraphicObj.spPr.xfrm.rot;return 0};ParaDrawing.prototype.Get_Bounds=function(){var InsL,InsT,InsR,InsB;InsL=0;InsT=0;InsR=0;InsB=0;if(!this.Is_Inline()){var oDistance=this.Get_Distance();
if(oDistance){InsL=oDistance.L;InsT=oDistance.T;InsR=oDistance.R;InsB=oDistance.B}}var ExtX=this.getXfrmExtX();var ExtY=this.getXfrmExtY();var Rot=this.getXfrmRot();var X,Y,W,H;if(AscFormat.checkNormalRotate(Rot)){X=this.X;Y=this.Y;W=ExtX;H=ExtY}else{X=this.X+ExtX/2-ExtY/2;Y=this.Y+ExtY/2-ExtX/2;W=ExtY;H=ExtX}return{Left:X-this.EffectExtent.L-InsL,Top:Y-this.EffectExtent.T-InsT,Bottom:Y+H+this.EffectExtent.B+InsB,Right:X+W+this.EffectExtent.R+InsR}};ParaDrawing.prototype.Search=function(Str,Props,
SearchEngine,Type){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.Search==="function")this.GraphicObj.Search(Str,Props,SearchEngine,Type)};ParaDrawing.prototype.Set_Props=function(Props){var bCheckWrapPolygon=false;var isPictureCC=false;var oRun=this.GetRun();if(oRun){var arrContentControls=oRun.GetParentContentControls();for(var nIndex=0,nCount=arrContentControls.length;nIndex<nCount;++nIndex)if(arrContentControls[nIndex].IsPicture()){isPictureCC=true;break}}if(undefined!=Props.WrappingStyle&&
!isPictureCC){if(drawing_Inline===this.DrawingType&&c_oAscWrapStyle2.Inline!=Props.WrappingStyle&&undefined===Props.Paddings)this.Set_Distance(3.2,0,3.2,0);this.Set_DrawingType(c_oAscWrapStyle2.Inline===Props.WrappingStyle?drawing_Inline:drawing_Anchor);if(c_oAscWrapStyle2.Inline===Props.WrappingStyle)if(AscCommon.isRealObject(this.GraphicObj.bounds)&&AscFormat.isRealNumber(this.GraphicObj.bounds.w)&&AscFormat.isRealNumber(this.GraphicObj.bounds.h))this.CheckWH();if(c_oAscWrapStyle2.Behind===Props.WrappingStyle||
c_oAscWrapStyle2.InFront===Props.WrappingStyle){this.Set_WrappingType(WRAPPING_TYPE_NONE);this.Set_BehindDoc(c_oAscWrapStyle2.Behind===Props.WrappingStyle?true:false)}else{switch(Props.WrappingStyle){case c_oAscWrapStyle2.Square:this.Set_WrappingType(WRAPPING_TYPE_SQUARE);break;case c_oAscWrapStyle2.Tight:{bCheckWrapPolygon=true;this.Set_WrappingType(WRAPPING_TYPE_TIGHT);break}case c_oAscWrapStyle2.Through:{this.Set_WrappingType(WRAPPING_TYPE_THROUGH);bCheckWrapPolygon=true;break}case c_oAscWrapStyle2.TopAndBottom:this.Set_WrappingType(WRAPPING_TYPE_TOP_AND_BOTTOM);
break;default:this.Set_WrappingType(WRAPPING_TYPE_SQUARE);break}this.Set_BehindDoc(false)}}if(undefined!=Props.Paddings)this.Set_Distance(Props.Paddings.Left,Props.Paddings.Top,Props.Paddings.Right,Props.Paddings.Bottom);if(undefined!=Props.AllowOverlap)this.Set_AllowOverlap(Props.AllowOverlap);if(undefined!=Props.PositionH)this.Set_PositionH(Props.PositionH.RelativeFrom,Props.PositionH.UseAlign,true===Props.PositionH.UseAlign?Props.PositionH.Align:Props.PositionH.Value,Props.PositionH.Percent);if(undefined!=
Props.PositionV)this.Set_PositionV(Props.PositionV.RelativeFrom,Props.PositionV.UseAlign,true===Props.PositionV.UseAlign?Props.PositionV.Align:Props.PositionV.Value,Props.PositionV.Percent);if(undefined!=Props.SizeRelH)this.SetSizeRelH({RelativeFrom:AscFormat.ConvertRelPositionHToRelSize(Props.SizeRelH.RelativeFrom),Percent:Props.SizeRelH.Value/100});if(undefined!=Props.SizeRelV)this.SetSizeRelV({RelativeFrom:AscFormat.ConvertRelPositionVToRelSize(Props.SizeRelV.RelativeFrom),Percent:Props.SizeRelV.Value/
100});if(this.SizeRelH&&!this.SizeRelV)this.SetSizeRelV({RelativeFrom:AscCommon.c_oAscSizeRelFromV.sizerelfromvPage,Percent:0});if(this.SizeRelV&&!this.SizeRelH)this.SetSizeRelH({RelativeFrom:AscCommon.c_oAscSizeRelFromH.sizerelfromhPage,Percent:0});if(bCheckWrapPolygon)this.Check_WrapPolygon();if(undefined!=Props.description)this.docPr.setDescr(Props.description);if(undefined!=Props.title)this.docPr.setTitle(Props.title)};ParaDrawing.prototype.CheckWH=function(){if(!this.GraphicObj)return;var oldExtW=
this.Extent.W;var oldExtH=this.Extent.H;if(this.GraphicObj.spPr&&this.GraphicObj.spPr.xfrm&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extX)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extY)){this.Extent.W=this.GraphicObj.spPr.xfrm.extX;this.Extent.H=this.GraphicObj.spPr.xfrm.extY}this.GraphicObj.recalculate();this.Extent.W=oldExtW;this.Extent.H=oldExtH;var extX,extY,rot;if(this.GraphicObj.spPr&&this.GraphicObj.spPr.xfrm){if(AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extX)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extY)){extX=
this.GraphicObj.spPr.xfrm.extX;extY=this.GraphicObj.spPr.xfrm.extY}else{extX=5;extY=5}if(AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.rot))rot=this.GraphicObj.spPr.xfrm.rot;else rot=0}else{extX=5;extY=5;rot=0}this.setExtent(extX,extY);var EEL=0,EET=0,EER=0,EEB=0;{var xc=this.GraphicObj.localTransform.TransformPointX(this.GraphicObj.extX/2,this.GraphicObj.extY/2);var yc=this.GraphicObj.localTransform.TransformPointY(this.GraphicObj.extX/2,this.GraphicObj.extY/2);var oBounds=this.GraphicObj.bounds;
var LineCorrect=0;if(this.GraphicObj.pen&&this.GraphicObj.pen.Fill&&this.GraphicObj.pen.Fill.fill){LineCorrect=this.GraphicObj.pen.w==null?12700:parseInt(this.GraphicObj.pen.w);LineCorrect/=72E3}var l=oBounds.x;var r=l+oBounds.w;var t=oBounds.y;var b=t+oBounds.h;var startX,startY;if(!AscFormat.checkNormalRotate(rot)){var temp=extX;extX=extY;extY=temp}startX=xc-extX/2;startY=yc-extY/2;if(l>startX)l=startX;if(r<startX+extX)r=startX+extX;if(t>startY)t=startY;if(b<startY+extY)b=startY+extY;EEL=xc-extX/
2-l+LineCorrect;EET=yc-extY/2-t+LineCorrect;EER=r+LineCorrect-(xc+extX/2);EEB=b+LineCorrect-(yc+extY/2)}this.setEffectExtent(EEL,EET,EER,EEB);this.Check_WrapPolygon()};ParaDrawing.prototype.Check_WrapPolygon=function(){if((this.wrappingType===WRAPPING_TYPE_TIGHT||this.wrappingType===WRAPPING_TYPE_THROUGH)&&this.wrappingPolygon&&!this.wrappingPolygon.edited){this.GraphicObj.recalculate();this.wrappingPolygon.setArrRelPoints(this.wrappingPolygon.calculate(this.GraphicObj))}};ParaDrawing.prototype.Draw=
function(X,Y,pGraphics,PDSE){var nPageIndex=null;if(AscCommon.isRealObject(PDSE))nPageIndex=PDSE.Page;if(pGraphics.Start_Command){pGraphics.m_aDrawings.push(new AscFormat.ParaDrawingStruct(undefined,this));return}if(this.Is_Inline()){pGraphics.shapePageIndex=nPageIndex;this.draw(pGraphics,PDSE);pGraphics.shapePageIndex=null}if(pGraphics.End_Command)pGraphics.End_Command()};ParaDrawing.prototype.Measure=function(){if(!this.GraphicObj){this.Width=0;this.Height=0;return}if(AscFormat.isRealNumber(this.Extent.W)&&
AscFormat.isRealNumber(this.Extent.H)&&(!this.GraphicObj.checkAutofit||!this.GraphicObj.checkAutofit())&&!this.SizeRelH&&!this.SizeRelV){var oEffectExtent=this.EffectExtent;var W,H;if(AscFormat.isRealNumber(this.GraphicObj.rot))if(AscFormat.checkNormalRotate(this.GraphicObj.rot)){W=this.Extent.W;H=this.Extent.H}else{W=this.Extent.H;H=this.Extent.W}else{W=this.Extent.W;H=this.Extent.H}this.Width=W+AscFormat.getValOrDefault(oEffectExtent.L,0)+AscFormat.getValOrDefault(oEffectExtent.R,0);this.Height=
H+AscFormat.getValOrDefault(oEffectExtent.T,0)+AscFormat.getValOrDefault(oEffectExtent.B,0);this.WidthVisible=this.Width}else{this.GraphicObj.recalculate();if(this.GraphicObj.recalculateText)this.GraphicObj.recalculateText();if(this.PositionH.UseAlign||this.Is_Inline())this.Width=this.GraphicObj.bounds.w;else this.Width=this.GraphicObj.extX;this.WidthVisible=this.Width;if(this.PositionV.UseAlign||this.Is_Inline())this.Height=this.GraphicObj.bounds.h;else this.Height=this.GraphicObj.extY}};ParaDrawing.prototype.SaveRecalculateObject=
function(Copy){var DrawingObj={};DrawingObj.Type=this.Type;DrawingObj.DrawingType=this.DrawingType;DrawingObj.WrappingType=this.wrappingType;if(drawing_Anchor===this.Get_DrawingType()&&true===this.Use_TextWrap()){var oDistance=this.Get_Distance();DrawingObj.FlowPos={X:this.X-oDistance.L,Y:this.Y-oDistance.T,W:this.Width+oDistance.R,H:this.Height+oDistance.B}}DrawingObj.PageNum=this.PageNum;DrawingObj.X=this.X;DrawingObj.Y=this.Y;DrawingObj.spRecaclcObject=this.GraphicObj.getRecalcObject();return DrawingObj};
ParaDrawing.prototype.LoadRecalculateObject=function(RecalcObj){this.updatePosition3(RecalcObj.PageNum,RecalcObj.X,RecalcObj.Y);this.GraphicObj.setRecalcObject(RecalcObj.spRecaclcObject)};ParaDrawing.prototype.Reassign_ImageUrls=function(mapUrls){if(this.GraphicObj)this.GraphicObj.Reassign_ImageUrls(mapUrls)};ParaDrawing.prototype.PrepareRecalculateObject=function(){};ParaDrawing.prototype.Is_RealContent=function(){return true};ParaDrawing.prototype.Can_AddNumbering=function(){if(drawing_Inline===
this.DrawingType)return true;return false};ParaDrawing.prototype.Copy=function(oPr){var c=new ParaDrawing(this.Extent.W,this.Extent.H,null,editor.WordControl.m_oLogicDocument.DrawingDocument,null,null);c.Set_DrawingType(this.DrawingType);if(AscCommon.isRealObject(this.GraphicObj)){var oCopyPr=new AscFormat.CCopyObjectProperties;oCopyPr.contentCopyPr=oPr;c.Set_GraphicObject(this.GraphicObj.copy(oCopyPr));c.GraphicObj.setParent(c)}var d=this.Distance;c.Set_PositionH(this.PositionH.RelativeFrom,this.PositionH.Align,
this.PositionH.Value,this.PositionH.Percent);c.Set_PositionV(this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent);c.Set_Distance(d.L,d.T,d.R,d.B);c.Set_AllowOverlap(this.AllowOverlap);c.Set_WrappingType(this.wrappingType);if(this.wrappingPolygon)c.wrappingPolygon.fromOther(this.wrappingPolygon);c.Set_BehindDoc(this.behindDoc);c.Set_RelativeHeight(this.RelativeHeight);if(this.SizeRelH)c.SetSizeRelH({RelativeFrom:this.SizeRelH.RelativeFrom,Percent:this.SizeRelH.Percent});
if(this.SizeRelV)c.SetSizeRelV({RelativeFrom:this.SizeRelV.RelativeFrom,Percent:this.SizeRelV.Percent});if(AscFormat.isRealNumber(this.Extent.W)&&AscFormat.isRealNumber(this.Extent.H))c.setExtent(this.Extent.W,this.Extent.H);var EE=this.EffectExtent;if(EE.L>0||EE.T>0||EE.R>0||EE.B>0)c.setEffectExtent(EE.L,EE.T,EE.R,EE.B);c.docPr.setFromOther(this.docPr);if(this.ParaMath)c.Set_ParaMath(this.ParaMath.Copy());return c};ParaDrawing.prototype.IsEqual=function(oElement){return false};ParaDrawing.prototype.Get_Id=
function(){return this.Id};ParaDrawing.prototype.GetId=function(){return this.Id};ParaDrawing.prototype.setParagraphTabs=function(tabs){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphTabs==="function")this.GraphicObj.setParagraphTabs(tabs)};ParaDrawing.prototype.IsMovingTableBorder=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.IsMovingTableBorder==="function")return this.GraphicObj.IsMovingTableBorder();return false};ParaDrawing.prototype.SetVerticalClip=
function(Top,Bottom){this.LineTop=Top;this.LineBottom=Bottom};ParaDrawing.prototype.Update_Position=function(Paragraph,ParaLayout,PageLimits,PageLimitsOrigin,LineNum){if(undefined!=this.PositionH_Old){this.PositionH.RelativeFrom=this.PositionH_Old.RelativeFrom2;this.PositionH.Align=this.PositionH_Old.Align2;this.PositionH.Value=this.PositionH_Old.Value2;this.PositionH.Percent=this.PositionH_Old.Percent2}if(undefined!=this.PositionV_Old){this.PositionV.RelativeFrom=this.PositionV_Old.RelativeFrom2;
this.PositionV.Align=this.PositionV_Old.Align2;this.PositionV.Value=this.PositionV_Old.Value2;this.PositionV.Percent=this.PositionV_Old.Percent2}var oDocumentContent=this.Parent&&this.Parent.Parent;if(oDocumentContent&&oDocumentContent.IsBlockLevelSdtContent())oDocumentContent=oDocumentContent.Parent.Parent;this.Parent=Paragraph;this.DocumentContent=oDocumentContent;var PageNum=ParaLayout.PageNum;var OtherFlowObjects=editor.WordControl.m_oLogicDocument.DrawingObjects.getAllFloatObjectsOnPage(PageNum,
this.Parent.Parent);var bInline=this.Is_Inline();this.Internal_Position.Set(this.GraphicObj.extX,this.GraphicObj.extY,this.getXfrmRot(),this.EffectExtent,this.YOffset,ParaLayout,PageLimits);this.Internal_Position.Calculate_X(bInline,this.PositionH.RelativeFrom,this.PositionH.Align,this.PositionH.Value,this.PositionH.Percent);this.Internal_Position.Calculate_Y(bInline,this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent);var bCorrect=false;if(oDocumentContent&&
oDocumentContent.IsTableCellContent&&oDocumentContent.IsTableCellContent(false))bCorrect=true;if(this.PositionH.RelativeFrom!==c_oAscRelativeFromH.Page||this.PositionV.RelativeFrom!==c_oAscRelativeFromV.Page)bCorrect=true;this.Internal_Position.Correct_Values(bInline,PageLimits,this.AllowOverlap,this.Use_TextWrap(),OtherFlowObjects,bCorrect);this.GraphicObj.bounds.l=this.GraphicObj.bounds.x+this.Internal_Position.CalcX;this.GraphicObj.bounds.r=this.GraphicObj.bounds.x+this.GraphicObj.bounds.w+this.Internal_Position.CalcX;
this.GraphicObj.bounds.t=this.GraphicObj.bounds.y+this.Internal_Position.CalcY;this.GraphicObj.bounds.b=this.GraphicObj.bounds.y+this.GraphicObj.bounds.h+this.Internal_Position.CalcY;var OldPageNum=this.PageNum;this.PageNum=PageNum;this.LineNum=LineNum;this.X=this.Internal_Position.CalcX;this.Y=this.Internal_Position.CalcY;if(undefined!=this.PositionH_Old){this.PositionH.RelativeFrom=this.PositionH_Old.RelativeFrom;this.PositionH.Align=this.PositionH_Old.Align;this.PositionH.Value=this.PositionH_Old.Value;
this.PositionH.Percent=this.PositionH_Old.Percent;var Value=this.Internal_Position.Calculate_X_Value(this.PositionH_Old.RelativeFrom);this.Set_PositionH(this.PositionH_Old.RelativeFrom,false,Value,false);this.X=this.Internal_Position.Calculate_X(bInline,this.PositionH.RelativeFrom,this.PositionH.Align,this.PositionH.Value,this.PositionH.Percent)}if(undefined!=this.PositionV_Old){this.PositionV.RelativeFrom=this.PositionV_Old.RelativeFrom;this.PositionV.Align=this.PositionV_Old.Align;this.PositionV.Value=
this.PositionV_Old.Value;this.PositionV.Percent=this.PositionV_Old.Percent;var Value=this.Internal_Position.Calculate_Y_Value(this.PositionV_Old.RelativeFrom);this.Set_PositionV(this.PositionV_Old.RelativeFrom,false,Value,false);this.Y=this.Internal_Position.Calculate_Y(bInline,this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent)}this.OrigX=this.X;this.OrigY=this.Y;this.ShiftX=0;this.ShiftY=0;this.updatePosition3(this.PageNum,this.X,this.Y,OldPageNum);this.useWrap=
this.Use_TextWrap()};ParaDrawing.prototype.GetClipRect=function(){if(this.Is_Inline()||this.Use_TextWrap()){var oCell;if(this.DocumentContent&&(oCell=this.DocumentContent.IsTableCellContent(true))){var arrPages=oCell.GetCurPageByAbsolutePage(this.PageNum);for(var nIndex=0,nCount=arrPages.length;nIndex<nCount;++nIndex){var oPageBounds=oCell.GetPageBounds(arrPages[nIndex]);if(this.GraphicObj.bounds.isIntersect(oPageBounds.Left,oPageBounds.Top,oPageBounds.Right,oPageBounds.Bottom))return new AscFormat.CGraphicBounds(oPageBounds.Left,
oPageBounds.Top,oPageBounds.Right,oPageBounds.Bottom)}}}return null};ParaDrawing.prototype.Update_PositionYHeaderFooter=function(TopMarginY,BottomMarginY){this.Internal_Position.Update_PositionYHeaderFooter(TopMarginY,BottomMarginY);this.Internal_Position.Calculate_Y(this.Is_Inline(),this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent);this.OrigY=this.Internal_Position.CalcY;this.Y=this.OrigY+this.ShiftY;this.updatePosition3(this.PageNum,this.X,this.Y,this.PageNum)};
ParaDrawing.prototype.Reset_SavedPosition=function(){this.PositionV_Old=undefined;this.PositionH_Old=undefined};ParaDrawing.prototype.setParagraphBorders=function(val){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphBorders==="function")this.GraphicObj.setParagraphBorders(val)};ParaDrawing.prototype.deselect=function(){this.selected=false;if(this.GraphicObj&&this.GraphicObj.deselect)this.GraphicObj.deselect()};ParaDrawing.prototype.updatePosition3=function(pageIndex,
x,y,oldPageNum){var _x=x,_y=y;this.graphicObjects.removeById(pageIndex,this.Get_Id());if(AscFormat.isRealNumber(oldPageNum))this.graphicObjects.removeById(oldPageNum,this.Get_Id());var bChangePageIndex=this.pageIndex!==pageIndex;this.setPageIndex(pageIndex);if(typeof this.GraphicObj.setStartPage==="function"){var bIsHfdFtr=this.DocumentContent&&this.DocumentContent.IsHdrFtr();this.GraphicObj.setStartPage(pageIndex,bIsHfdFtr,bIsHfdFtr||bChangePageIndex)}if(!(this.DocumentContent&&this.DocumentContent.IsHdrFtr()&&
this.DocumentContent.Get_StartPage_Absolute()!==pageIndex)){this.graphicObjects.addObjectOnPage(pageIndex,this.GraphicObj);this.bNoNeedToAdd=false}else this.bNoNeedToAdd=true;if(this.GraphicObj.bNeedUpdatePosition||!(AscFormat.isRealNumber(this.GraphicObj.posX)&&AscFormat.isRealNumber(this.GraphicObj.posY))||!(Math.abs(this.GraphicObj.posX-_x)<MOVE_DELTA&&Math.abs(this.GraphicObj.posY-_y)<MOVE_DELTA))this.GraphicObj.updatePosition(_x,_y);if(this.GraphicObj.bNeedUpdatePosition||!(AscFormat.isRealNumber(this.wrappingPolygon.posX)&&
AscFormat.isRealNumber(this.wrappingPolygon.posY))||!(Math.abs(this.wrappingPolygon.posX-_x)<MOVE_DELTA&&Math.abs(this.wrappingPolygon.posY-_y)<MOVE_DELTA))this.wrappingPolygon.updatePosition(_x,_y);this.calculateSnapArrays()};ParaDrawing.prototype.calculateAfterChangeTheme=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.calculateAfterChangeTheme==="function")this.GraphicObj.calculateAfterChangeTheme()};ParaDrawing.prototype.selectionIsEmpty=function(){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.selectionIsEmpty==="function")return this.GraphicObj.selectionIsEmpty();return false};ParaDrawing.prototype.recalculateDocContent=function(){};ParaDrawing.prototype.Shift=function(Dx,Dy){this.ShiftX=Dx;this.ShiftY=Dy;this.X=this.OrigX+Dx;this.Y=this.OrigY+Dy;this.updatePosition3(this.PageNum,this.X,this.Y)};ParaDrawing.prototype.IsLayoutInCell=function(){if(this.LogicDocument&&this.LogicDocument.GetCompatibilityMode()>=AscCommon.document_compatibility_mode_Word15)return true;
return this.LayoutInCell};ParaDrawing.prototype.Get_Distance=function(){var oDist=this.Distance;return new AscFormat.CDistance(AscFormat.getValOrDefault(oDist.L,AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT),AscFormat.getValOrDefault(oDist.T,0),AscFormat.getValOrDefault(oDist.R,AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT),AscFormat.getValOrDefault(oDist.B,0))};ParaDrawing.prototype.Set_XYForAdd=function(X,Y,NearPos,PageNum){if(null!==NearPos){var Layout=NearPos.Paragraph.Get_Layout(NearPos.ContentPos,this);this.private_SetXYByLayout(X,
Y,PageNum,Layout,true,true);var nRecalcIndex=null;var oLogicDocument=this.document;if(oLogicDocument){nRecalcIndex=oLogicDocument.Get_History().GetRecalculateIndex();this.SetSkipOnRecalculate(true);oLogicDocument.TurnOff_InterfaceEvents();oLogicDocument.Recalculate();oLogicDocument.TurnOn_InterfaceEvents(false);this.SetSkipOnRecalculate(false)}if(null!==nRecalcIndex)oLogicDocument.Get_History().SetRecalculateIndex(nRecalcIndex);Layout=NearPos.Paragraph.Get_Layout(NearPos.ContentPos,this);this.private_SetXYByLayout(X,
Y,PageNum,Layout,true,true)}};ParaDrawing.prototype.SetSkipOnRecalculate=function(isSkip){this.SkipOnRecalculate=isSkip};ParaDrawing.prototype.IsSkipOnRecalculate=function(){return this.SkipOnRecalculate};ParaDrawing.prototype.Set_XY=function(X,Y,Paragraph,PageNum,bResetAlign){if(Paragraph){var PageNumOld=this.PageNum;var ContentPos=Paragraph.Get_DrawingObjectContentPos(this.Get_Id());if(null===ContentPos)return;var Layout=Paragraph.Get_Layout(ContentPos,this);this.private_SetXYByLayout(X,Y,PageNum,
Layout,bResetAlign||true!==this.PositionH.Align?true:false,bResetAlign||true!==this.PositionV.Align?true:false);var nRecalcIndex=null;var oLogicDocument=this.document;if(oLogicDocument){nRecalcIndex=oLogicDocument.Get_History().GetRecalculateIndex();this.SetSkipOnRecalculate(true);oLogicDocument.Recalculate();this.SetSkipOnRecalculate(false)}if(null!==nRecalcIndex)oLogicDocument.Get_History().SetRecalculateIndex(nRecalcIndex);if(!this.LogicDocument||null===this.LogicDocument.FullRecalc.Id||PageNum<
this.LogicDocument.FullRecalc.PageIndex&&PageNumOld<this.LogicDocument.FullRecalc.PageIndex)Layout=Paragraph.Get_Layout(ContentPos,this);this.private_SetXYByLayout(X,Y,PageNum,Layout,bResetAlign||true!==this.PositionH.Align?true:false,bResetAlign||true!==this.PositionV.Align?true:false)}};ParaDrawing.prototype.private_SetXYByLayout=function(X,Y,PageNum,Layout,bChangeX,bChangeY){if(!Layout)return;this.PageNum=PageNum;this.Internal_Position.Set(this.GraphicObj.extX,this.GraphicObj.extY,this.getXfrmRot(),
this.EffectExtent,this.YOffset,Layout.ParagraphLayout,Layout.PageLimitsOrigin);this.Internal_Position.Calculate_X(false,c_oAscRelativeFromH.Page,false,X-Layout.PageLimitsOrigin.X,false);this.Internal_Position.Calculate_Y(false,c_oAscRelativeFromV.Page,false,Y-Layout.PageLimitsOrigin.Y,false);var bCorrect=false;if(this.DocumentContent&&this.DocumentContent.IsTableCellContent&&this.DocumentContent.IsTableCellContent(false))bCorrect=true;if(this.PositionH.RelativeFrom!==c_oAscRelativeFromH.Page||this.PositionV.RelativeFrom!==
c_oAscRelativeFromV.Page)bCorrect=true;this.Internal_Position.Correct_Values(false,Layout.PageLimits,this.AllowOverlap,this.Use_TextWrap(),[],bCorrect);if(true===bChangeX){this.X=this.Internal_Position.CalcX;var ValueX=this.Internal_Position.Calculate_X_Value(this.PositionH.RelativeFrom);this.Set_PositionH(this.PositionH.RelativeFrom,false,ValueX,false);this.X=this.Internal_Position.Calculate_X(false,this.PositionH.RelativeFrom,this.PositionH.Align,this.PositionH.Value,this.PositionH.Percent)}if(true===
bChangeY){this.Y=this.Internal_Position.CalcY;var ValueY=this.Internal_Position.Calculate_Y_Value(this.PositionV.RelativeFrom);this.Set_PositionV(this.PositionV.RelativeFrom,false,ValueY,false);this.Y=this.Internal_Position.Calculate_Y(false,this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent)}};ParaDrawing.prototype.Get_DrawingType=function(){return this.DrawingType};ParaDrawing.prototype.Is_Inline=function(){if(this.Parent&&this.Parent.Get_ParentTextTransform&&
this.Parent.Get_ParentTextTransform())return true;return drawing_Inline===this.DrawingType?true:false};ParaDrawing.prototype.IsInline=function(){return this.Is_Inline()};ParaDrawing.prototype.Use_TextWrap=function(){if(!this.Parent||!this.Parent.Get_FramePr||null!==this.Parent.Get_FramePr()&&undefined!==this.Parent.Get_FramePr())return false;return drawing_Anchor===this.DrawingType&&!(this.wrappingType===WRAPPING_TYPE_NONE)};ParaDrawing.prototype.IsUseTextWrap=function(){return this.Use_TextWrap()};
ParaDrawing.prototype.Draw_Selection=function(){var Padding=this.DrawingDocument.GetMMPerDot(6);var extX,extY;if(this.GraphicObj){extX=this.GraphicObj.extX;extY=this.GraphicObj.extY}else{extX=this.getXfrmExtX();extY=this.getXfrmExtY()}var rot=this.getXfrmRot();if(AscFormat.checkNormalRotate(rot))this.DrawingDocument.AddPageSelection(this.PageNum,this.X-this.EffectExtent.L-Padding,this.Y-this.EffectExtent.T-Padding,this.EffectExtent.L+extX+this.EffectExtent.R+2*Padding,this.EffectExtent.T+extY+this.EffectExtent.B+
2*Padding);else this.DrawingDocument.AddPageSelection(this.PageNum,this.X+extX/2-extY/2-this.EffectExtent.L-Padding,this.Y+extY/2-extX/2-this.EffectExtent.T-Padding,this.EffectExtent.L+extY+this.EffectExtent.R+2*Padding,this.EffectExtent.T+extX+this.EffectExtent.B+2*Padding)};ParaDrawing.prototype.CanInsertToPos=function(oAnchorPos){if(!oAnchorPos||!oAnchorPos.Paragraph||!oAnchorPos.Paragraph.Parent)return false;return!((this.IsShape()||this.IsGroup())&&(true===oAnchorPos.Paragraph.Parent.Is_DrawingShape()||
true===oAnchorPos.Paragraph.Parent.IsFootnote()))};ParaDrawing.prototype.OnEnd_MoveInline=function(NearPos){if(!this.Parent)return;NearPos.Paragraph.Check_NearestPos(NearPos);var oRun=this.GetRun();var oPictureCC=false;if(oRun){var arrContentControls=oRun.GetParentContentControls();for(var nIndex=arrContentControls.length-1;nIndex>=0;--nIndex)if(arrContentControls[nIndex].IsPicture()){oPictureCC=arrContentControls[nIndex];break}}var oDstRun=null;var arrClasses=NearPos.Paragraph.GetClassesByPos(NearPos.ContentPos);
for(var nIndex=arrClasses.length-1;nIndex>=0;--nIndex)if(arrClasses[nIndex]instanceof ParaRun){oDstRun=arrClasses[nIndex];break}if(!oDstRun||oPictureCC&&oDstRun===oRun||oDstRun.GetParentForm()){NearPos.Paragraph.Clear_NearestPosArray();return}var NewParaDrawing=this.Copy();var RunPr=this.Remove_FromDocument(false);this.DocumentContent.Select_DrawingObject(NewParaDrawing.GetId());NewParaDrawing.Add_ToDocument(NearPos,true,RunPr,undefined,oPictureCC)};ParaDrawing.prototype.Get_ParentTextTransform=function(){if(this.Parent)return this.Parent.Get_ParentTextTransform();
return null};ParaDrawing.prototype.GoTo_Text=function(bBefore,bUpdateStates){var Paragraph=this.Get_ParentParagraph();if(Paragraph){Paragraph.MoveCursorToDrawing(this.Id,bBefore);Paragraph.Document_SetThisElementCurrent(undefined===bUpdateStates?true:bUpdateStates)}};ParaDrawing.prototype.Remove_FromDocument=function(bRecalculate){var oResult=null;if(!this.Parent)return oResult;var oRun=this.Parent.Get_DrawingObjectRun(this.Id);if(oRun){var oGrObject=this.GraphicObj;if(oGrObject&&oGrObject.getObjectType()===
AscDFH.historyitem_type_Shape)if(oGrObject.signatureLine)oGrObject.setSignature(oGrObject.signatureLine);var oPictureCC=null;var arrContentControls=oRun.GetParentContentControls();for(var nIndex=arrContentControls.length-1;nIndex>=0;--nIndex)if(arrContentControls[nIndex].IsPicture()){oPictureCC=arrContentControls[nIndex];break}if(oPictureCC)oPictureCC.RemoveContentControlWrapper();oRun.Remove_DrawingObject(this.Id);if(oRun.IsInHyperlink())oResult=new CTextPr;else oResult=oRun.GetTextPr();if(oGrObject&&
oGrObject.getObjectType()===AscDFH.historyitem_type_Shape)if(oGrObject.signatureLine){editor.sendEvent("asc_onRemoveSignature",oGrObject.signatureLine.id);oGrObject.setSignature(oGrObject.signatureLine)}}if(false!=bRecalculate)editor.WordControl.m_oLogicDocument.Recalculate();return oResult};ParaDrawing.prototype.Get_ParentParagraph=function(){if(this.Parent instanceof Paragraph)return this.Parent;if(this.Parent instanceof ParaRun)return this.Parent.Paragraph;if(this.Parent&&this.Parent.GetParagraph())return this.Parent.GetParagraph();
return null};ParaDrawing.prototype.SelectAsText=function(){var oParagraph=this.GetParagraph();var oRun=this.GetRun();if(!oParagraph||!oRun)return;var oDocument=oParagraph.GetLogicDocument();if(!oDocument)return;oDocument.RemoveSelection();oRun.Make_ThisElementCurrent(false);oRun.SetCursorPosition(oRun.GetElementPosition(this));var oStartPos=oDocument.GetContentPosition(false);oRun.SetCursorPosition(oRun.GetElementPosition(this)+1);var oEndPos=oDocument.GetContentPosition(false);oDocument.RemoveSelection();
oDocument.SetSelectionByContentPositions(oStartPos,oEndPos)};ParaDrawing.prototype.Add_ToDocument=function(NearPos,bRecalculate,RunPr,Run,oPictureCC){NearPos.Paragraph.Check_NearestPos(NearPos);var LogicDocument=this.DrawingDocument.m_oLogicDocument;var Para=new Paragraph(this.DrawingDocument,LogicDocument);var DrawingRun=new ParaRun(Para);DrawingRun.Add_ToContent(0,this);if(RunPr)DrawingRun.Set_Pr(RunPr.Copy());if(Run)DrawingRun.SetReviewTypeWithInfo(Run.GetReviewType(),Run.GetReviewInfo());if(oPictureCC){var oSdt=
new CInlineLevelSdt;oSdt.SetPicturePr(true);oSdt.ReplacePlaceHolderWithContent();oSdt.AddToContent(0,DrawingRun);Para.Add_ToContent(0,oSdt);var oFormPr=oPictureCC.GetFormPr();if(oFormPr)oSdt.SetFormPr(oFormPr.Copy())}else Para.Add_ToContent(0,DrawingRun);var SelectedElement=new CSelectedElement(Para,false);var SelectedContent=new CSelectedContent;SelectedContent.Add(SelectedElement);SelectedContent.SetMoveDrawing(true);SelectedContent.DrawingObjects.push(this);NearPos.Paragraph.Parent.InsertContent(SelectedContent,
NearPos);NearPos.Paragraph.Clear_NearestPosArray();NearPos.Paragraph.Correct_Content();this.Set_Parent(NearPos.Paragraph);if(false!=bRecalculate)LogicDocument.Recalculate()};ParaDrawing.prototype.Add_ToDocument2=function(Paragraph){var DrawingRun=new ParaRun(Paragraph);DrawingRun.Add_ToContent(0,this);Paragraph.Add_ToContent(0,DrawingRun);this.Set_Parent(Paragraph)};ParaDrawing.prototype.UpdateCursorType=function(X,Y,PageIndex){this.DrawingDocument.SetCursorType("move",new AscCommon.CMouseMoveData);
if(null!=this.Parent){var Lock=this.Parent.Lock;if(true===Lock.Is_Locked()){var PNum=Math.max(0,Math.min(PageIndex-this.Parent.PageNum,this.Parent.Pages.length-1));var _X=this.Parent.Pages[PNum].X;var _Y=this.Parent.Pages[PNum].Y;var MMData=new AscCommon.CMouseMoveData;var Coords=this.DrawingDocument.ConvertCoordsToCursorWR(_X,_Y,this.Parent.Get_StartPage_Absolute()+(PageIndex-this.Parent.PageNum));MMData.X_abs=Coords.X-5;MMData.Y_abs=Coords.Y;MMData.Type=Asc.c_oAscMouseMoveDataTypes.LockedObject;
MMData.UserId=Lock.Get_UserId();MMData.HaveChanges=Lock.Have_Changes();MMData.LockedObjectType=c_oAscMouseMoveLockedObjectType.Common;editor.sync_MouseMoveCallback(MMData)}}};ParaDrawing.prototype.Get_AnchorPos=function(){if(!this.Parent)return null;return this.Parent.Get_AnchorPos(this)};ParaDrawing.prototype.CheckRecalcAutoFit=function(oSectPr){if(this.GraphicObj&&this.GraphicObj.CheckNeedRecalcAutoFit)if(this.GraphicObj.CheckNeedRecalcAutoFit(oSectPr)){if(this.GraphicObj)this.GraphicObj.recalcWrapPolygon&&
this.GraphicObj.recalcWrapPolygon();this.Measure()}};ParaDrawing.prototype.Get_ParentObject_or_DocumentPos=function(){if(this.Parent!=null)return this.Parent.Get_ParentObject_or_DocumentPos()};ParaDrawing.prototype.Refresh_RecalcData=function(Data){var oRun=this.GetRun();if(oRun){if(AscCommon.isRealObject(Data))switch(Data.Type){case AscDFH.historyitem_Drawing_Distance:{if(this.GraphicObj){this.GraphicObj.recalcWrapPolygon&&this.GraphicObj.recalcWrapPolygon();this.GraphicObj.addToRecalculate()}break}case AscDFH.historyitem_Drawing_SetExtent:{oRun.RecalcInfo.Measure=
true;break}case AscDFH.historyitem_Drawing_SetSizeRelH:case AscDFH.historyitem_Drawing_SetSizeRelV:case AscDFH.historyitem_Drawing_SetGraphicObject:{if(this.GraphicObj){this.GraphicObj.handleUpdateExtents&&this.GraphicObj.handleUpdateExtents();this.GraphicObj.addToRecalculate()}oRun.RecalcInfo.Measure=true;break}case AscDFH.historyitem_Drawing_WrappingType:{if(this.GraphicObj){this.GraphicObj.recalcWrapPolygon&&this.GraphicObj.recalcWrapPolygon();this.GraphicObj.addToRecalculate()}break}}return oRun.Refresh_RecalcData2()}};
ParaDrawing.prototype.Refresh_RecalcData2=function(Data){var oRun=this.GetRun();if(oRun)return oRun.Refresh_RecalcData2()};ParaDrawing.prototype.hyperlinkCheck=function(bCheck){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkCheck==="function")return this.GraphicObj.hyperlinkCheck(bCheck);return null};ParaDrawing.prototype.hyperlinkCanAdd=function(bCheckInHyperlink){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkCanAdd==="function")return this.GraphicObj.hyperlinkCanAdd(bCheckInHyperlink);
return false};ParaDrawing.prototype.hyperlinkRemove=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkCanAdd==="function")return this.GraphicObj.hyperlinkRemove();return false};ParaDrawing.prototype.hyperlinkModify=function(HyperProps){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkModify==="function")return this.GraphicObj.hyperlinkModify(HyperProps)};ParaDrawing.prototype.hyperlinkAdd=function(HyperProps){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.hyperlinkAdd==="function")return this.GraphicObj.hyperlinkAdd(HyperProps)};ParaDrawing.prototype.documentStatistics=function(stat){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.documentStatistics==="function")this.GraphicObj.documentStatistics(stat)};ParaDrawing.prototype.documentCreateFontCharMap=function(fontMap){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.documentCreateFontCharMap==="function")this.GraphicObj.documentCreateFontCharMap(fontMap)};
ParaDrawing.prototype.documentCreateFontMap=function(fontMap){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.documentCreateFontMap==="function")this.GraphicObj.documentCreateFontMap(fontMap)};ParaDrawing.prototype.tableCheckSplit=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableCheckSplit==="function")return this.GraphicObj.tableCheckSplit();return false};ParaDrawing.prototype.tableCheckMerge=function(){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.tableCheckMerge==="function")return this.GraphicObj.tableCheckMerge();return false};ParaDrawing.prototype.tableSelect=function(Type){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableSelect==="function")return this.GraphicObj.tableSelect(Type)};ParaDrawing.prototype.tableRemoveTable=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableRemoveTable==="function")return this.GraphicObj.tableRemoveTable()};ParaDrawing.prototype.tableSplitCell=
function(Cols,Rows){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableSplitCell==="function")return this.GraphicObj.tableSplitCell(Cols,Rows)};ParaDrawing.prototype.tableMergeCells=function(Cols,Rows){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableMergeCells==="function")return this.GraphicObj.tableMergeCells(Cols,Rows)};ParaDrawing.prototype.tableRemoveCol=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableRemoveCol===
"function")return this.GraphicObj.tableRemoveCol()};ParaDrawing.prototype.tableAddCol=function(bBefore,nCount){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableAddCol==="function")return this.GraphicObj.tableAddCol(bBefore,nCount)};ParaDrawing.prototype.tableRemoveRow=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableRemoveRow==="function")return this.GraphicObj.tableRemoveRow()};ParaDrawing.prototype.tableAddRow=function(bBefore,nCount){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.tableAddRow==="function")return this.GraphicObj.tableAddRow(bBefore,nCount)};ParaDrawing.prototype.getCurrentParagraph=function(bIgnoreSelection,arrSelectedParagraphs){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getCurrentParagraph==="function")return this.GraphicObj.getCurrentParagraph(bIgnoreSelection,arrSelectedParagraphs);if(this.Parent instanceof Paragraph)return this.Parent};ParaDrawing.prototype.GetSelectedText=function(bClearText,oPr){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.GetSelectedText==="function")return this.GraphicObj.GetSelectedText(bClearText,oPr);return""};ParaDrawing.prototype.getCurPosXY=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getCurPosXY==="function")return this.GraphicObj.getCurPosXY();return{X:0,Y:0}};ParaDrawing.prototype.setParagraphKeepLines=function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphKeepLines==="function")return this.GraphicObj.setParagraphKeepLines(Value)};
ParaDrawing.prototype.setParagraphKeepNext=function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphKeepNext==="function")return this.GraphicObj.setParagraphKeepNext(Value)};ParaDrawing.prototype.setParagraphWidowControl=function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphWidowControl==="function")return this.GraphicObj.setParagraphWidowControl(Value)};ParaDrawing.prototype.setParagraphPageBreakBefore=function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.setParagraphPageBreakBefore==="function")return this.GraphicObj.setParagraphPageBreakBefore(Value)};ParaDrawing.prototype.isTextSelectionUse=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.isTextSelectionUse==="function")return this.GraphicObj.isTextSelectionUse();return false};ParaDrawing.prototype.paragraphFormatPaste=function(CopyTextPr,CopyParaPr,Bool){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.isTextSelectionUse==="function")return this.GraphicObj.paragraphFormatPaste(CopyTextPr,
CopyParaPr,Bool)};ParaDrawing.prototype.getNearestPos=function(x,y,pageIndex){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getNearestPos==="function")return this.GraphicObj.getNearestPos(x,y,pageIndex);return null};ParaDrawing.prototype.Write_ToBinary=function(Writer){Writer.WriteLong(this.Type);Writer.WriteString2(this.Id)};ParaDrawing.prototype.Write_ToBinary2=function(Writer){Writer.WriteLong(AscDFH.historyitem_type_Drawing);Writer.WriteString2(this.Id);AscFormat.writeDouble(Writer,
this.Extent.W);AscFormat.writeDouble(Writer,this.Extent.H);AscFormat.writeObject(Writer,this.GraphicObj);AscFormat.writeObject(Writer,this.DocumentContent);AscFormat.writeObject(Writer,this.Parent);AscFormat.writeObject(Writer,this.wrappingPolygon);AscFormat.writeLong(Writer,this.RelativeHeight);AscFormat.writeObject(Writer,this.docPr)};ParaDrawing.prototype.Read_FromBinary2=function(Reader){this.Id=Reader.GetString2();this.DrawingDocument=editor.WordControl.m_oLogicDocument.DrawingDocument;this.LogicDocument=
this.DrawingDocument?this.DrawingDocument.m_oLogicDocument:null;this.Extent.W=AscFormat.readDouble(Reader);this.Extent.H=AscFormat.readDouble(Reader);this.GraphicObj=AscFormat.readObject(Reader);this.DocumentContent=AscFormat.readObject(Reader);this.Parent=AscFormat.readObject(Reader);this.wrappingPolygon=AscFormat.readObject(Reader);this.RelativeHeight=AscFormat.readLong(Reader);this.docPr=AscFormat.readObject(Reader);if(this.wrappingPolygon)this.wrappingPolygon.wordGraphicObject=this;this.drawingDocument=
editor.WordControl.m_oLogicDocument.DrawingDocument;this.document=editor.WordControl.m_oLogicDocument;this.graphicObjects=editor.WordControl.m_oLogicDocument.DrawingObjects;this.graphicObjects.addGraphicObject(this);g_oTableId.Add(this,this.Id)};ParaDrawing.prototype.Load_LinkData=function(){};ParaDrawing.prototype.draw=function(graphics,PDSE){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.draw==="function"){graphics.SaveGrState();var bInline=this.Is_Inline();if(bInline&&AscCommon.isRealObject(PDSE)&&
AscFormat.isRealNumber(this.LineTop)&&AscFormat.isRealNumber(this.LineBottom)&&AscCommon.isRealObject(this.GraphicObj.bounds)){var x,y,w,h;var oEffectExtent=this.EffectExtent;x=PDSE.X;y=this.LineTop;w=this.GraphicObj.bounds.r-this.GraphicObj.bounds.l+AscFormat.getValOrDefault(oEffectExtent.R,0)+AscFormat.getValOrDefault(oEffectExtent.L,0);h=this.LineBottom-this.LineTop;graphics.AddClipRect(x,y,w,h)}this.GraphicObj.draw(graphics);graphics.RestoreGrState()}};ParaDrawing.prototype.drawAdjustments=function(){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.drawAdjustments==="function")this.GraphicObj.drawAdjustments()};ParaDrawing.prototype.getTransformMatrix=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getTransformMatrix==="function")return this.GraphicObj.getTransformMatrix();return null};ParaDrawing.prototype.getExtensions=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getExtensions==="function")return this.GraphicObj.getExtensions();return null};ParaDrawing.prototype.isGroup=
function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.isGroup==="function")return this.GraphicObj.isGroup();return false};ParaDrawing.prototype.isShapeChild=function(bRetShape){if(!this.Is_Inline()||!this.DocumentContent)return bRetShape?null:false;var cur_doc_content=this.DocumentContent;var oCell;while(oCell=cur_doc_content.IsTableCellContent(true))cur_doc_content=oCell.Row.Table.Parent;if(AscCommon.isRealObject(cur_doc_content.Parent)&&typeof cur_doc_content.Parent.getObjectType===
"function"&&cur_doc_content.Parent.getObjectType()===AscDFH.historyitem_type_Shape)return bRetShape?cur_doc_content.Parent:true;return bRetShape?null:false};ParaDrawing.prototype.checkShapeChildAndGetTopParagraph=function(paragraph){var parent_paragraph=!paragraph?this.Get_ParentParagraph():paragraph;var parent_doc_content=parent_paragraph.Parent;if(parent_doc_content.Parent instanceof AscFormat.CShape)if(!parent_doc_content.Parent.group)return parent_doc_content.Parent.parent.Get_ParentParagraph();
else{var top_group=parent_doc_content.Parent.group;while(top_group.group)top_group=top_group.group;return top_group.parent.Get_ParentParagraph()}else if(parent_doc_content.IsTableCellContent()){var top_doc_content=parent_doc_content;var oCell;while(oCell=top_doc_content.IsTableCellContent(true))top_doc_content=oCell.Row.Table.Parent;if(top_doc_content.Parent instanceof AscFormat.CShape)if(!top_doc_content.Parent.group)return top_doc_content.Parent.parent.Get_ParentParagraph();else{var top_group=top_doc_content.Parent.group;
while(top_group.group)top_group=top_group.group;return top_group.parent.Get_ParentParagraph()}else return parent_paragraph}return parent_paragraph};ParaDrawing.prototype.hit=function(x,y){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hit==="function")return this.GraphicObj.hit(x,y);return false};ParaDrawing.prototype.hitToTextRect=function(x,y){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hitToTextRect==="function")return this.GraphicObj.hitToTextRect(x,
y);return false};ParaDrawing.prototype.cursorGetPos=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.cursorGetPos==="function")return this.GraphicObj.cursorGetPos();return{X:0,Y:0}};ParaDrawing.prototype.getResizeCoefficients=function(handleNum,x,y){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getResizeCoefficients==="function")return this.GraphicObj.getResizeCoefficients(handleNum,x,y);return{kd1:1,kd2:1}};ParaDrawing.prototype.getParagraphParaPr=

@ -779,19 +779,19 @@ true;if(nTTRemainder<=0){sResult=sGroup+sResult;if(nRemValue<=0)break;continue}v
false}else if(!isPrevZero){sGroup+=arrChinese[0];isPrevZero=true}if(nRemainder<=0){sResult=sGroup+sResult;if(nRemValue<=0)break;continue}nQuotient=nRemainder/10|0;nRemainder=nRemainder-nQuotient*10;if(0!==nQuotient){sGroup+=arrChinese[nQuotient]+arrChinese[10];isPrevZero=false}else if(!isPrevZero){sGroup+=arrChinese[0];isPrevZero=true}if(0!==nRemainder)sGroup+=arrChinese[nRemainder];sResult=sGroup+sResult;if(nRemValue<=0)break}break}}return sResult}var c_oAscSpaces=[];c_oAscSpaces[10]=1;c_oAscSpaces[32]=
1;c_oAscSpaces[8194]=1;c_oAscSpaces[8195]=1;c_oAscSpaces[8197]=1;c_oAscSpaces[12288]=1;function IsSpace(nUnicode){return!!c_oAscSpaces[nUnicode]}function private_IsAbbreviation(sWord){if(sWord.toUpperCase()===sWord){for(var nPos=0,nLen=sWord.length;nPos<nLen;++nPos){var nCharCode=sWord.charCodeAt(nPos);if(44032<=nCharCode&&nCharCode<=55203||4352<=nCharCode&&nCharCode<=4607||12592<=nCharCode&&nCharCode<=12687||43360<=nCharCode&&nCharCode<=43391||55216<=nCharCode&&nCharCode<=55295||19968<=nCharCode&&
nCharCode<=40959||13312<=nCharCode&&nCharCode<=19903||131072<=nCharCode&&nCharCode<=173791||173824<=nCharCode&&nCharCode<=177983||177984<=nCharCode&&nCharCode<=178207||178208<=nCharCode&&nCharCode<=183983||63744<=nCharCode&&nCharCode<=64255||194560<=nCharCode&&nCharCode<=195103)return false}return true}return false}var g_oUserColorById={},g_oUserNextColorIndex=0;function getUserColorById(userId,userName,isDark,isNumericValue){if(window.parent.APP&&window.parent.APP.getUserColor)try{var CPColor=window.parent.APP.getUserColor(userId);
if(CPColor)return true===isNumericValue?CPColor.r<<16&16711680|CPColor.g<<8&65280|CPColor.b&255:CPColor}catch(e){}if((!userId||""===userId)&&(!userName||""===userName))return new CColor(0,0,0,255);var res;if(g_oUserColorById.hasOwnProperty(userId))res=g_oUserColorById[userId];else if(g_oUserColorById.hasOwnProperty(userName))res=g_oUserColorById[userName];else{var nColor=Asc.c_oAscArrUserColors[g_oUserNextColorIndex%Asc.c_oAscArrUserColors.length];++g_oUserNextColorIndex;res=g_oUserColorById[userId||
userName]=new CUserCacheColor(nColor)}if(!res)return new CColor(0,0,0,255);var oColor=true===isDark?res.Dark:res.Light;return true===isNumericValue?oColor.r<<16&16711680|oColor.g<<8&65280|oColor.b&255:oColor}function isNullOrEmptyString(str){return str==undefined||str==null||str==""}function unleakString(s){return(" "+s).substr(1)}function readValAttr(attr){if(attr()){var val=attr()["val"];return val?val:null}return null}function getNumFromXml(val){return val?val-0:null}function getColorFromXml(attr){if(attr()){var vals=
attr();if(null!=vals["theme"])return AscCommonExcel.g_oColorManager.getThemeColor(getNumFromXml(vals["theme"]),getNumFromXml(vals["tint"]));else if(null!=vals["rgb"])return new AscCommonExcel.RgbColor(16777215&getNumFromXml(vals["rgb"]))}return null}function getBoolFromXml(val){return"0"!==val&&"false"!==val&&"off"!==val}function CUserCacheColor(nColor){this.Light=null;this.Dark=null;this.init(nColor)}CUserCacheColor.prototype.init=function(nColor){var r=nColor>>16&255;var g=nColor>>8&255;var b=nColor&
255;var Y=Math.max(0,Math.min(255,.299*r+.587*g+.114*b));var Cb=Math.max(0,Math.min(255,128-.168736*r-.331264*g+.5*b));var Cr=Math.max(0,Math.min(255,128+.5*r-.418688*g-.081312*b));if(Y>63)Y=63;var R=Math.max(0,Math.min(255,Y+1.402*(Cr-128)))|0;var G=Math.max(0,Math.min(255,Y-.34414*(Cb-128)-.71414*(Cr-128)))|0;var B=Math.max(0,Math.min(255,Y+1.772*(Cb-128)))|0;this.Light=new CColor(r,g,b,255);this.Dark=new CColor(R,G,B,255)};function loadScript(url,onSuccess,onError){if(window["NATIVE_EDITOR_ENJINE"]===
true||window["Native"]!==undefined){onSuccess();return}if(window["AscDesktopEditor"]&&window["local_load_add"]){var _context={"completeLoad":function(){return onSuccess()}};window["local_load_add"](_context,"sdk-all-from-min",url);var _ret_param=window["AscDesktopEditor"]["LoadJS"](url);if(2!=_ret_param)window["local_load_remove"](url);if(_ret_param==1){setTimeout(onSuccess,1);return}else if(_ret_param==2)return}var backoff=new AscCommon.Backoff(AscCommon.g_oBackoffDefaults);loadScriptWithBackoff(backoff,
url,onSuccess,onError)}function loadScriptWithBackoff(backoff,url,onSuccess,onError){var script=document.createElement("script");script.type="text/javascript";script.src=url;script.onload=onSuccess;script.onerror=function(){backoff.attempt(onError,function(){loadScriptWithBackoff(backoff,url,onSuccess,onError)})};document.head.appendChild(script)}function loadSdk(sdkName,onSuccess,onError){if(window["AscNotLoadAllScript"])onSuccess();else{var urlArgs=window.parent&&window.parent.APP&&window.parent.APP.urlArgs||
"";loadScript("./../../../../sdkjs/"+sdkName+"/sdk-all.js?"+urlArgs,onSuccess,onError)}}function getAltGr(e){var ctrlKey=e.metaKey||e.ctrlKey;var altKey=e.altKey;return altKey&&(AscBrowser.isMacOs?!ctrlKey:ctrlKey)}function getColorSchemeByName(sName){for(var i=0;i<AscCommon.g_oUserColorScheme.length;++i){var tmp=AscCommon.g_oUserColorScheme[i];if(tmp&&tmp.name===sName)return getColorSchemeByIdx(i)}return null}function getColorSchemeByIdx(idx){var tmp=AscCommon.g_oUserColorScheme[idx];if(tmp){var scheme=
new AscFormat.ClrScheme,_c;scheme.name=tmp.name;_c=tmp.get_dk1();scheme.colors[8]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_lt1();scheme.colors[12]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_dk2();scheme.colors[9]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_lt2();scheme.colors[13]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent1();scheme.colors[0]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent2();scheme.colors[1]=AscFormat.CreateUniColorRGB(_c.r,
_c.g,_c.b);_c=tmp.get_accent3();scheme.colors[2]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent4();scheme.colors[3]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent5();scheme.colors[4]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent6();scheme.colors[5]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_hlink();scheme.colors[11]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_folHlink();scheme.colors[10]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);
return scheme}return null}function getAscColorScheme(_scheme,theme){var elem,_c;var _rgba={R:0,G:0,B:0,A:255};elem=new AscCommon.CAscColorScheme;elem.scheme=_scheme;elem.name=_scheme.name;_scheme.colors[8].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[8].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[12].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[12].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[9].Calculate(theme,null,null,
null,_rgba);_c=_scheme.colors[9].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[13].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[13].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[0].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[0].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[1].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[1].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[2].Calculate(theme,
null,null,null,_rgba);_c=_scheme.colors[2].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[3].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[3].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[4].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[4].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[5].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[5].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));
_scheme.colors[11].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[11].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[10].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[10].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));return elem}function getIndexColorSchemeInArray(result,asc_color_scheme){for(var j=0;j<result.length;++j)if(result[j].isEqual(asc_color_scheme))return j;return-1}function checkAddColorScheme(result,asc_color_scheme,nStartIndex){var nIndex=
if(CPColor)return true===isNumericValue?CPColor.r<<16&16711680|CPColor.g<<8&65280|CPColor.b&255:new CColor(CPColor.r,CPColor.g,CPColor.b,CPColor.a)}catch(e){}if((!userId||""===userId)&&(!userName||""===userName))return new CColor(0,0,0,255);var res;if(g_oUserColorById.hasOwnProperty(userId))res=g_oUserColorById[userId];else if(g_oUserColorById.hasOwnProperty(userName))res=g_oUserColorById[userName];else{var nColor=Asc.c_oAscArrUserColors[g_oUserNextColorIndex%Asc.c_oAscArrUserColors.length];++g_oUserNextColorIndex;
res=g_oUserColorById[userId||userName]=new CUserCacheColor(nColor)}if(!res)return new CColor(0,0,0,255);var oColor=true===isDark?res.Dark:res.Light;return true===isNumericValue?oColor.r<<16&16711680|oColor.g<<8&65280|oColor.b&255:oColor}function isNullOrEmptyString(str){return str==undefined||str==null||str==""}function unleakString(s){return(" "+s).substr(1)}function readValAttr(attr){if(attr()){var val=attr()["val"];return val?val:null}return null}function getNumFromXml(val){return val?val-0:null}
function getColorFromXml(attr){if(attr()){var vals=attr();if(null!=vals["theme"])return AscCommonExcel.g_oColorManager.getThemeColor(getNumFromXml(vals["theme"]),getNumFromXml(vals["tint"]));else if(null!=vals["rgb"])return new AscCommonExcel.RgbColor(16777215&getNumFromXml(vals["rgb"]))}return null}function getBoolFromXml(val){return"0"!==val&&"false"!==val&&"off"!==val}function CUserCacheColor(nColor){this.Light=null;this.Dark=null;this.init(nColor)}CUserCacheColor.prototype.init=function(nColor){var r=
nColor>>16&255;var g=nColor>>8&255;var b=nColor&255;var Y=Math.max(0,Math.min(255,.299*r+.587*g+.114*b));var Cb=Math.max(0,Math.min(255,128-.168736*r-.331264*g+.5*b));var Cr=Math.max(0,Math.min(255,128+.5*r-.418688*g-.081312*b));if(Y>63)Y=63;var R=Math.max(0,Math.min(255,Y+1.402*(Cr-128)))|0;var G=Math.max(0,Math.min(255,Y-.34414*(Cb-128)-.71414*(Cr-128)))|0;var B=Math.max(0,Math.min(255,Y+1.772*(Cb-128)))|0;this.Light=new CColor(r,g,b,255);this.Dark=new CColor(R,G,B,255)};function loadScript(url,
onSuccess,onError){if(window["NATIVE_EDITOR_ENJINE"]===true||window["Native"]!==undefined){onSuccess();return}if(window["AscDesktopEditor"]&&window["local_load_add"]){var _context={"completeLoad":function(){return onSuccess()}};window["local_load_add"](_context,"sdk-all-from-min",url);var _ret_param=window["AscDesktopEditor"]["LoadJS"](url);if(2!=_ret_param)window["local_load_remove"](url);if(_ret_param==1){setTimeout(onSuccess,1);return}else if(_ret_param==2)return}var backoff=new AscCommon.Backoff(AscCommon.g_oBackoffDefaults);
loadScriptWithBackoff(backoff,url,onSuccess,onError)}function loadScriptWithBackoff(backoff,url,onSuccess,onError){var script=document.createElement("script");script.type="text/javascript";script.src=url;script.onload=onSuccess;script.onerror=function(){backoff.attempt(onError,function(){loadScriptWithBackoff(backoff,url,onSuccess,onError)})};document.head.appendChild(script)}function loadSdk(sdkName,onSuccess,onError){if(window["AscNotLoadAllScript"])onSuccess();else{var urlArgs=window.parent&&window.parent.APP&&
window.parent.APP.urlArgs||"";loadScript("./../../../../sdkjs/"+sdkName+"/sdk-all.js?"+urlArgs,onSuccess,onError)}}function getAltGr(e){var ctrlKey=e.metaKey||e.ctrlKey;var altKey=e.altKey;return altKey&&(AscBrowser.isMacOs?!ctrlKey:ctrlKey)}function getColorSchemeByName(sName){for(var i=0;i<AscCommon.g_oUserColorScheme.length;++i){var tmp=AscCommon.g_oUserColorScheme[i];if(tmp&&tmp.name===sName)return getColorSchemeByIdx(i)}return null}function getColorSchemeByIdx(idx){var tmp=AscCommon.g_oUserColorScheme[idx];
if(tmp){var scheme=new AscFormat.ClrScheme,_c;scheme.name=tmp.name;_c=tmp.get_dk1();scheme.colors[8]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_lt1();scheme.colors[12]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_dk2();scheme.colors[9]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_lt2();scheme.colors[13]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent1();scheme.colors[0]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent2();scheme.colors[1]=
AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent3();scheme.colors[2]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent4();scheme.colors[3]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent5();scheme.colors[4]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent6();scheme.colors[5]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_hlink();scheme.colors[11]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_folHlink();scheme.colors[10]=AscFormat.CreateUniColorRGB(_c.r,
_c.g,_c.b);return scheme}return null}function getAscColorScheme(_scheme,theme){var elem,_c;var _rgba={R:0,G:0,B:0,A:255};elem=new AscCommon.CAscColorScheme;elem.scheme=_scheme;elem.name=_scheme.name;_scheme.colors[8].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[8].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[12].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[12].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[9].Calculate(theme,
null,null,null,_rgba);_c=_scheme.colors[9].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[13].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[13].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[0].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[0].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[1].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[1].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));
_scheme.colors[2].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[2].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[3].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[3].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[4].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[4].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[5].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[5].RGBA;elem.putColor(new AscCommon.CColor(_c.R,
_c.G,_c.B));_scheme.colors[11].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[11].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[10].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[10].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));return elem}function getIndexColorSchemeInArray(result,asc_color_scheme){for(var j=0;j<result.length;++j)if(result[j].isEqual(asc_color_scheme))return j;return-1}function checkAddColorScheme(result,asc_color_scheme,nStartIndex){var nIndex=
getIndexColorSchemeInArray(result,asc_color_scheme);if(nIndex>-1)return nIndex;var nStartIndex_=nStartIndex;if(nStartIndex===null)nStartIndex_=result.length;result.splice(nStartIndex_,0,asc_color_scheme);return nStartIndex_}function isEastAsianScript(value){return 12544<=value&&value<=12591||12704<=value&&value<=12735||19968<=value&&value<=40938||13312<=value&&value<=19893||131072<=value&&value<=173782||173824<=value&&value<=177972||177984<=value&&value<=178205||178208<=value&&value<=183969||183984<=
value&&value<=191456||63744<=value&&value<=64255||194560<=value&&value<=195103||12032<=value&&value<=12255||11904<=value&&value<=12031||12736<=value&&value<=12783||12272<=value&&value<=12287||4352<=value&&value<=4607||43360<=value&&value<=43391||55216<=value&&value<=55295||12592<=value&&value<=12687||65280<=value&&value<=65519||44032<=value&&value<=55215||12352<=value&&value<=12447||110848<=value&&value<=110895||110592<=value&&value<=110847||12688<=value&&value<=12703||12448<=value&&value<=12543||
12784<=value&&value<=12799||42192<=value&&value<=42239||93952<=value&&value<=94111||110960<=value&&value<=111359||94208<=value&&value<=100332||100352<=value&&value<=101119||40960<=value&&value<=42127||42128<=value&&value<=42191}var g_oIdCounter=new CIdCounter;window.Asc.g_signature_drawer=null;function CSignatureDrawer(id,api,w,h){window.Asc.g_signature_drawer=this;this.Api=api;this.CanvasParent=document.getElementById(id);this.Canvas=document.createElement("canvas");this.Canvas.style.position="absolute";

@ -8378,10 +8378,10 @@ oThis.Api.SendOpenProgress()}if(!oThis.bIsLoadDocumentImagesNoByOrder){oThis.ima
oThis._LoadImages()}else if(oThis.nNoByOrderCounter==oThis.images_loading.length){oThis.images_loading=[];oThis._LoadImages()}};AscCommon.backoffOnErrorImg(oImage.Image,function(img){oThis.loadImageByUrl(img,img.src)});oThis.loadImageByUrl(oImage.Image,oImage.src);if(!oThis.bIsLoadDocumentImagesNoByOrder)return}};this.LoadImage=function(src,Type){var _image=this.map_image_index[src];if(undefined!=_image)return _image;this.Api.asyncImageStartLoaded();var oImage=new CImage(src);oImage.Type=Type;oImage.Image=
new Image;oImage.Status=ImageLoadStatus.Loading;oThis.map_image_index[oImage.src]=oImage;oImage.Image.onload=function(){oImage.Status=ImageLoadStatus.Complete;oThis.Api.asyncImageEndLoaded(oImage)};oImage.Image.onerror=function(){oImage.Image=null;oImage.Status=ImageLoadStatus.Complete;oThis.Api.asyncImageEndLoaded(oImage)};AscCommon.backoffOnErrorImg(oImage.Image,function(img){oThis.loadImageByUrl(img,img.src)});this.loadImageByUrl(oImage.Image,oImage.src);return null};this.LoadImageAsync=function(i,
cb){var _id=oThis.images_loading[i];var oImage=new CImage(_id);oImage.Status=ImageLoadStatus.Loading;oImage.Image=new Image;oThis.map_image_index[oImage.src]=oImage;var oThat=oThis;oImage.Image.onload=function(){oImage.Status=ImageLoadStatus.Complete;oThat.Api.asyncImageEndLoadedBackground(oImage)};oImage.Image.onerror=function(){oImage.Status=ImageLoadStatus.Complete;oImage.Image=null;oThat.Api.asyncImageEndLoadedBackground(oImage)};AscCommon.backoffOnErrorImg(oImage.Image,function(img){oThis.loadImageByUrl(img,
img.src)});console.log("Loading image "+i);console.log(oImage);window.parent.APP.getImageURL(oImage.src,function(url){if(url=="")oThis.loadImageByUrl(oImage.Image,oImage.src);else{oThis.loadImageByUrl(oImage.Image,url);oThis.map_image_index[url]=oImage}if(typeof cb==="function")cb()})};this.LoadImagesWithCallback=function(arr,loadImageCallBack,loadImageCallBackArgs){var arrAsync=[];var i=0;for(i=0;i<arr.length;i++)if(this.map_image_index[arr[i]]===undefined)arrAsync.push(arr[i]);if(arrAsync.length==
0){loadImageCallBack.call(this.Api,loadImageCallBackArgs);return}this.loadImageCallBackCounter=0;this.loadImageCallBackCounterMax=arrAsync.length;this.loadImageCallBack=loadImageCallBack;this.loadImageCallBackArgs=loadImageCallBackArgs;for(i=0;i<arrAsync.length;i++){var oImage=new CImage(arrAsync[i]);oImage.Image=new Image;oImage.Image.parentImage=oImage;oImage.Status=ImageLoadStatus.Loading;this.map_image_index[oImage.src]=oImage;oImage.Image.onload=function(){this.parentImage.Status=ImageLoadStatus.Complete;
oThis.loadImageCallBackCounter++;if(oThis.loadImageCallBackCounter==oThis.loadImageCallBackCounterMax)oThis.LoadImagesWithCallbackEnd()};oImage.Image.onerror=function(){this.parentImage.Image=null;this.parentImage.Status=ImageLoadStatus.Complete;oThis.loadImageCallBackCounter++;if(oThis.loadImageCallBackCounter==oThis.loadImageCallBackCounterMax)oThis.LoadImagesWithCallbackEnd()};AscCommon.backoffOnErrorImg(oImage.Image,function(img){oThis.loadImageByUrl(img,img.src)});this.loadImageByUrl(oImage.Image,
oImage.src)}};this.LoadImagesWithCallbackEnd=function(){this.loadImageCallBack.call(this.Api,this.loadImageCallBackArgs);this.loadImageCallBack=null;this.loadImageCallBackArgs=null;this.loadImageCallBackCounterMax=0;this.loadImageCallBackCounter=0}}var g_flow_anchor=new Image;g_flow_anchor.asc_complete=false;g_flow_anchor.onload=function(){g_flow_anchor.asc_complete=true};g_flow_anchor.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAPBAMAAADNDVhEAAAAIVBMVEUAAAANDQ0NDQ0NDQ0NDQ0NDQ0AAAANDQ0NDQ0NDQ0NDQ1jk7YPAAAACnRSTlMAGkD4mb9c5s9TDghpXQAAAFZJREFUCNdjYGBgW8YABlxcIBLBZ1gAEfZa5QWiGRkWMAIpAaA4iHQE0YwODEtANMsChkIwv4BBWQBICyswMC1iWADEDAzKoUuDFUAGNC9uABvIaQkkABpxD6lFb9lRAAAAAElFTkSuQmCC";
img.src)});window.parent.APP.getImageURL(oImage.src,function(url){if(url=="")oThis.loadImageByUrl(oImage.Image,oImage.src);else{oThis.loadImageByUrl(oImage.Image,url);oThis.map_image_index[url]=oImage}if(typeof cb==="function")cb()})};this.LoadImagesWithCallback=function(arr,loadImageCallBack,loadImageCallBackArgs){var arrAsync=[];var i=0;for(i=0;i<arr.length;i++)if(this.map_image_index[arr[i]]===undefined)arrAsync.push(arr[i]);if(arrAsync.length==0){loadImageCallBack.call(this.Api,loadImageCallBackArgs);
return}this.loadImageCallBackCounter=0;this.loadImageCallBackCounterMax=arrAsync.length;this.loadImageCallBack=loadImageCallBack;this.loadImageCallBackArgs=loadImageCallBackArgs;for(i=0;i<arrAsync.length;i++){var oImage=new CImage(arrAsync[i]);oImage.Image=new Image;oImage.Image.parentImage=oImage;oImage.Status=ImageLoadStatus.Loading;this.map_image_index[oImage.src]=oImage;oImage.Image.onload=function(){this.parentImage.Status=ImageLoadStatus.Complete;oThis.loadImageCallBackCounter++;if(oThis.loadImageCallBackCounter==
oThis.loadImageCallBackCounterMax)oThis.LoadImagesWithCallbackEnd()};oImage.Image.onerror=function(){this.parentImage.Image=null;this.parentImage.Status=ImageLoadStatus.Complete;oThis.loadImageCallBackCounter++;if(oThis.loadImageCallBackCounter==oThis.loadImageCallBackCounterMax)oThis.LoadImagesWithCallbackEnd()};AscCommon.backoffOnErrorImg(oImage.Image,function(img){oThis.loadImageByUrl(img,img.src)});this.loadImageByUrl(oImage.Image,oImage.src)}};this.LoadImagesWithCallbackEnd=function(){this.loadImageCallBack.call(this.Api,
this.loadImageCallBackArgs);this.loadImageCallBack=null;this.loadImageCallBackArgs=null;this.loadImageCallBackCounterMax=0;this.loadImageCallBackCounter=0}}var g_flow_anchor=new Image;g_flow_anchor.asc_complete=false;g_flow_anchor.onload=function(){g_flow_anchor.asc_complete=true};g_flow_anchor.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAPBAMAAADNDVhEAAAAIVBMVEUAAAANDQ0NDQ0NDQ0NDQ0NDQ0AAAANDQ0NDQ0NDQ0NDQ1jk7YPAAAACnRSTlMAGkD4mb9c5s9TDghpXQAAAFZJREFUCNdjYGBgW8YABlxcIBLBZ1gAEfZa5QWiGRkWMAIpAaA4iHQE0YwODEtANMsChkIwv4BBWQBICyswMC1iWADEDAzKoUuDFUAGNC9uABvIaQkkABpxD6lFb9lRAAAAAElFTkSuQmCC";
var g_flow_anchor2=new Image;g_flow_anchor2.asc_complete=false;g_flow_anchor2.onload=function(){g_flow_anchor2.asc_complete=true};g_flow_anchor2.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAeCAMAAAAFBf7qAAAAOVBMVEUAAAAAAAAAAAAAAAAJCQkAAAAJCQkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJCQknI0ZQAAAAEnRSTlMAx9ITlAfyPHxn68yecTAl5qt6y0BvAAAAt0lEQVQoz8WS0QrDIAxFk0ajtlXb+/8fuzAprltg7Gnn4aIcvAgJTSSoBiGPoIAGV60qoquvIIL110IJgPONmKIlMI73MiwGRoZvahbKVSizcDKU8QeVPDXEIr6ShVB9VUEn2FOMkwL8VwjUtuypvDWiHeVTFeyWkZHfVQZHGm4XMhKQyJB9GKMxuHQSBlioF7u2q7kzgO2AcWwW3F8mWRmGKgyu91mK1Tzh4ixVVkBzJI/EnGjyACbfCaO3eIWRAAAAAElFTkSuQmCC";
window["AscCommon"]=window["AscCommon"]||{};window["AscCommon"].g_font_loader=new CGlobalFontLoader;window["AscCommon"].g_image_loader=new CGlobalImageLoader;window["AscCommon"].g_flow_anchor=g_flow_anchor;window["AscCommon"].g_flow_anchor2=g_flow_anchor2})(window,window.document);"use strict";(function(window,undefined){var g_dKoef_mm_to_pix=AscCommon.g_dKoef_mm_to_pix;function CBounds(){this.L=0;this.T=0;this.R=0;this.B=0;this.isAbsL=false;this.isAbsT=false;this.isAbsR=false;this.isAbsB=false;this.AbsW=
-1;this.AbsH=-1;this.SetParams=function(_l,_t,_r,_b,abs_l,abs_t,abs_r,abs_b,absW,absH){this.L=_l;this.T=_t;this.R=_r;this.B=_b;this.isAbsL=abs_l;this.isAbsT=abs_t;this.isAbsR=abs_r;this.isAbsB=abs_b;this.AbsW=absW;this.AbsH=absH}}function CAbsolutePosition(){this.L=0;this.T=0;this.R=0;this.B=0}var g_anchor_left=1;var g_anchor_top=2;var g_anchor_right=4;var g_anchor_bottom=8;function CControl(){this.Bounds=new CBounds;this.Anchor=g_anchor_left|g_anchor_top;this.Name=null;this.Parent=null;this.TabIndex=
@ -11749,8 +11749,8 @@ LineIndex+1}var RangeOffset=1+this.Lines[0]+this.Lines[LineIndex+1]+RangeIndex*2
function(LineIndex,RangeIndex,EndPos){var RangeOffset=this.protected_GetRangeOffset(LineIndex,RangeIndex);this.Lines[RangeOffset+1]=EndPos};CParagraphContentWithContentBase.prototype.private_UpdateSpellChecking=function(){if(this.Paragraph&&this.Paragraph.SpellChecker){this.Paragraph.SpellChecker.ClearPausedEngine();this.Paragraph.RecalcInfo.Set_Type_0_Spell(pararecalc_0_Spell_All)}};CParagraphContentWithContentBase.prototype.Is_UseInDocument=function(Id){if(this.Paragraph){for(var i=0;i<this.Content.length;++i)if(this.Content[i].Get_Id&&
this.Content[i].Get_Id()===Id)break;if(i<this.Content.length)return this.Paragraph.Is_UseInDocument(this.Get_Id())}return false};CParagraphContentWithContentBase.prototype.IsUseInDocument=function(sId){return this.Is_UseInDocument(sId)};CParagraphContentWithContentBase.prototype.protected_GetPrevRangeEndPos=function(LineIndex,RangeIndex){var RangeCount=this.protected_GetRangesCount(LineIndex-1);var RangeOffset=this.protected_GetRangeOffset(LineIndex-1,RangeCount-1);return LineIndex==0&&RangeIndex==
0?0:this.Lines[RangeOffset+1]};CParagraphContentWithContentBase.prototype.private_UpdateTrackRevisions=function(){if(this.Paragraph&&this.Paragraph.LogicDocument&&this.Paragraph.LogicDocument.GetTrackRevisionsManager){var RevisionsManager=this.Paragraph.LogicDocument.GetTrackRevisionsManager();RevisionsManager.CheckElement(this.Paragraph)}};CParagraphContentWithContentBase.prototype.CanSplit=function(){return true};CParagraphContentWithContentBase.prototype.PreDelete=function(){};CParagraphContentWithContentBase.prototype.private_UpdateDocumentOutline=
function(){if(this.Paragraph)this.Paragraph.UpdateDocumentOutline()};CParagraphContentWithContentBase.prototype.IsSolid=function(){return false};CParagraphContentWithContentBase.prototype.ConvertParaContentPosToRangePos=function(oContentPos,nDepth){return 0};CParagraphContentWithContentBase.prototype.ProcessNotInlineObjectCheck=function(oChecker){oChecker.Result=false;oChecker.Found=true};function CParagraphContentWithParagraphLikeContent(){CParagraphContentWithContentBase.call(this);this.Type=undefined;
this.Paragraph=null;this.m_oContentChanges=new AscCommon.CContentChanges;this.Content=[];this.State=new CParaRunState;this.Selection=this.State.Selection;this.NearPosArray=[];this.SearchMarks=[]}CParagraphContentWithParagraphLikeContent.prototype=Object.create(CParagraphContentWithContentBase.prototype);CParagraphContentWithParagraphLikeContent.prototype.constructor=CParagraphContentWithParagraphLikeContent;CParagraphContentWithParagraphLikeContent.prototype.Get_Type=function(){return this.Type};
function(){if(this.Paragraph&&this.Paragraph.UpdateDocumentOutline)this.Paragraph.UpdateDocumentOutline()};CParagraphContentWithContentBase.prototype.IsSolid=function(){return false};CParagraphContentWithContentBase.prototype.ConvertParaContentPosToRangePos=function(oContentPos,nDepth){return 0};CParagraphContentWithContentBase.prototype.ProcessNotInlineObjectCheck=function(oChecker){oChecker.Result=false;oChecker.Found=true};function CParagraphContentWithParagraphLikeContent(){CParagraphContentWithContentBase.call(this);
this.Type=undefined;this.Paragraph=null;this.m_oContentChanges=new AscCommon.CContentChanges;this.Content=[];this.State=new CParaRunState;this.Selection=this.State.Selection;this.NearPosArray=[];this.SearchMarks=[]}CParagraphContentWithParagraphLikeContent.prototype=Object.create(CParagraphContentWithContentBase.prototype);CParagraphContentWithParagraphLikeContent.prototype.constructor=CParagraphContentWithParagraphLikeContent;CParagraphContentWithParagraphLikeContent.prototype.Get_Type=function(){return this.Type};
CParagraphContentWithParagraphLikeContent.prototype.Copy=function(Selected,oPr){var NewElement=new this.constructor;var StartPos=0;var EndPos=this.Content.length-1;if(true===Selected&&true===this.State.Selection.Use){StartPos=this.State.Selection.StartPos;EndPos=this.State.Selection.EndPos;if(StartPos>EndPos){StartPos=this.State.Selection.EndPos;EndPos=this.State.Selection.StartPos}}for(var CurPos=StartPos;CurPos<=EndPos;CurPos++){var Item=this.Content[CurPos];if(StartPos===CurPos||EndPos===CurPos)NewElement.Add_ToContent(CurPos-
StartPos,Item.Copy(Selected,oPr));else NewElement.Add_ToContent(CurPos-StartPos,Item.Copy(false,oPr))}return NewElement};CParagraphContentWithParagraphLikeContent.prototype.GetSelectedContent=function(oSelectedContent){var oNewElement=new this.constructor;var nStartPos=this.State.Selection.StartPos;var nEndPos=this.State.Selection.EndPos;if(nStartPos>nEndPos){nStartPos=this.State.Selection.EndPos;nEndPos=this.State.Selection.StartPos}var nItemPos=0;for(var nPos=nStartPos,nItemPos=0;nPos<=nEndPos;++nPos){var oNewItem=
this.Content[nPos].GetSelectedContent(oSelectedContent);if(oNewItem){oNewElement.AddToContent(nItemPos,oNewItem);nItemPos++}}if(0===nItemPos)return null;return oNewElement};CParagraphContentWithParagraphLikeContent.prototype.CopyContent=function(Selected){var CopyContent=[];var StartPos=0;var EndPos=this.Content.length-1;if(true===Selected&&true===this.State.Selection.Use){StartPos=this.State.Selection.StartPos;EndPos=this.State.Selection.EndPos;if(StartPos>EndPos){StartPos=this.State.Selection.EndPos;
@ -12847,155 +12847,156 @@ CChangesParaTextPrUnderline.prototype.private_SetValue=function(Value){this.Clas
AscDFH.historyitem_TextPr_FontSize;CChangesParaTextPrFontSize.prototype.private_SetValue=function(Value){this.Class.Value.FontSize=Value};CChangesParaTextPrFontSize.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrColor(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrColor.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrColor.prototype.constructor=CChangesParaTextPrColor;
CChangesParaTextPrColor.prototype.Type=AscDFH.historyitem_TextPr_Color;CChangesParaTextPrColor.prototype.private_SetValue=function(Value){this.Class.Value.Color=Value};CChangesParaTextPrColor.prototype.private_CreateObject=function(){return new CDocumentColor(0,0,0,false)};CChangesParaTextPrColor.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrVertAlign(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrVertAlign.prototype=
Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrVertAlign.prototype.constructor=CChangesParaTextPrVertAlign;CChangesParaTextPrVertAlign.prototype.Type=AscDFH.historyitem_TextPr_VertAlign;CChangesParaTextPrVertAlign.prototype.private_SetValue=function(Value){this.Class.Value.VertAlign=Value};CChangesParaTextPrVertAlign.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrHighLight(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,
Old,New,Color)}CChangesParaTextPrHighLight.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrHighLight.prototype.constructor=CChangesParaTextPrHighLight;CChangesParaTextPrHighLight.prototype.Type=AscDFH.historyitem_TextPr_HighLight;CChangesParaTextPrHighLight.prototype.private_SetValue=function(Value){this.Class.Value.HighLight=Value};CChangesParaTextPrHighLight.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=
2;else if(highlight_None===this.New)nFlags|=4;if(undefined===this.Old)nFlags|=8;else if(highlight_None===this.Old)nFlags|=16;Writer.WriteLong(nFlags);if(undefined!==this.New&&highlight_None!==this.New)this.New.Write_ToBinary(Writer);if(undefined!==this.Old&&highlight_None!==this.Old)this.Old.Write_ToBinary(Writer)};CChangesParaTextPrHighLight.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else if(nFlags&
4)this.New=highlight_None;else{this.New=new CDocumentColor(0,0,0);this.New.Read_FromBinary(Reader)}if(nFlags&8)this.Old=undefined;else if(nFlags&16)this.Old=highlight_None;else{this.Old=new CDocumentColor(0,0,0);this.Old.Read_FromBinary(Reader)}};CChangesParaTextPrHighLight.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrRStyle(Class,Old,New,Color){AscDFH.CChangesBaseStringProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRStyle.prototype=Object.create(AscDFH.CChangesBaseStringProperty.prototype);
CChangesParaTextPrRStyle.prototype.constructor=CChangesParaTextPrRStyle;CChangesParaTextPrRStyle.prototype.Type=AscDFH.historyitem_TextPr_RStyle;CChangesParaTextPrRStyle.prototype.private_SetValue=function(Value){this.Class.Value.RStyle=Value};CChangesParaTextPrRStyle.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrSpacing(Class,Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrSpacing.prototype=Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);
CChangesParaTextPrSpacing.prototype.constructor=CChangesParaTextPrSpacing;CChangesParaTextPrSpacing.prototype.Type=AscDFH.historyitem_TextPr_Spacing;CChangesParaTextPrSpacing.prototype.private_SetValue=function(Value){this.Class.Value.Spacing=Value};CChangesParaTextPrSpacing.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrDStrikeout(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrDStrikeout.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);
CChangesParaTextPrDStrikeout.prototype.constructor=CChangesParaTextPrDStrikeout;CChangesParaTextPrDStrikeout.prototype.Type=AscDFH.historyitem_TextPr_DStrikeout;CChangesParaTextPrDStrikeout.prototype.private_SetValue=function(Value){this.Class.Value.DStrikeout=Value};CChangesParaTextPrDStrikeout.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrCaps(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrCaps.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);
CChangesParaTextPrCaps.prototype.constructor=CChangesParaTextPrCaps;CChangesParaTextPrCaps.prototype.Type=AscDFH.historyitem_TextPr_Caps;CChangesParaTextPrCaps.prototype.private_SetValue=function(Value){this.Class.Value.Caps=Value};CChangesParaTextPrCaps.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrSmallCaps(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrSmallCaps.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);
CChangesParaTextPrSmallCaps.prototype.constructor=CChangesParaTextPrSmallCaps;CChangesParaTextPrSmallCaps.prototype.Type=AscDFH.historyitem_TextPr_SmallCaps;CChangesParaTextPrSmallCaps.prototype.private_SetValue=function(Value){this.Class.Value.SmallCaps=Value};CChangesParaTextPrSmallCaps.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrPosition(Class,Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrPosition.prototype=
Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);CChangesParaTextPrPosition.prototype.constructor=CChangesParaTextPrPosition;CChangesParaTextPrPosition.prototype.Type=AscDFH.historyitem_TextPr_Position;CChangesParaTextPrPosition.prototype.private_SetValue=function(Value){this.Class.Value.Position=Value};CChangesParaTextPrPosition.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrValue(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,
New,Color)}CChangesParaTextPrValue.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrValue.prototype.constructor=CChangesParaTextPrValue;CChangesParaTextPrValue.prototype.Type=AscDFH.historyitem_TextPr_Value;CChangesParaTextPrValue.prototype.private_SetValue=function(Value){this.Class.Value=Value};CChangesParaTextPrValue.prototype.private_CreateObject=function(){return new CTextPr};CChangesParaTextPrValue.prototype.private_IsCreateEmptyObject=function(){return true};
CChangesParaTextPrValue.prototype.Merge=function(oChange){if(oChange.Class!==this.Class)return true;if(oChange.Type===this.Type)return false;if(!this.New)this.New=new CTextPr;switch(oChange.Type){case AscDFH.historyitem_TextPr_Bold:{this.New.Bold=oChange.New;break}case AscDFH.historyitem_TextPr_Italic:{this.New.Italic=oChange.New;break}case AscDFH.historyitem_TextPr_Strikeout:{this.New.Strikeout=oChange.New;break}case AscDFH.historyitem_TextPr_Underline:{this.New.Underline=oChange.New;break}case AscDFH.historyitem_TextPr_FontSize:{this.New.FontSize=
oChange.New;break}case AscDFH.historyitem_TextPr_Color:{this.New.Color=oChange.New;break}case AscDFH.historyitem_TextPr_VertAlign:{this.New.VertAlign=oChange.New;break}case AscDFH.historyitem_TextPr_HighLight:{this.New.HighLight=oChange.New;break}case AscDFH.historyitem_TextPr_RStyle:{this.New.RStyle=oChange.New;break}case AscDFH.historyitem_TextPr_Spacing:{this.New.Spacing=oChange.New;break}case AscDFH.historyitem_TextPr_DStrikeout:{this.New.DStrikeout=oChange.New;break}case AscDFH.historyitem_TextPr_Caps:{this.New.Caps=
oChange.New;break}case AscDFH.historyitem_TextPr_SmallCaps:{this.New.SmallCaps=oChange.New;break}case AscDFH.historyitem_TextPr_Position:{this.New.Position=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts:{this.New.RFonts=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_Ascii:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.Ascii=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_HAnsi:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.HAnsi=oChange.New;
break}case AscDFH.historyitem_TextPr_RFonts_CS:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.CS=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_EastAsia:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_Hint:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.Hint=oChange.New;break}case AscDFH.historyitem_TextPr_Lang:{this.New.Lang=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_Bidi:{if(!this.New.Lang)this.New.Lang=
new CLang;this.New.Lang.Bidi=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_EastAsia:{if(!this.New.Lang)this.New.Lang=new CLang;this.New.Lang.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_Val:{if(!this.New.Lang)this.New.Lang=new CLang;this.New.Lang.Val=oChange.New;break}case AscDFH.historyitem_TextPr_Unifill:{this.New.Unifill=oChange.New;break}case AscDFH.historyitem_TextPr_FontSizeCS:{this.New.FontSizeCS=oChange.New;break}case AscDFH.historyitem_TextPr_Outline:{this.New.TextOutline=
oChange.New;break}case AscDFH.historyitem_TextPr_Fill:{this.New.TextFill=oChange.New;break}}return true};function CChangesParaTextPrRFonts(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFonts.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrRFonts.prototype.constructor=CChangesParaTextPrRFonts;CChangesParaTextPrRFonts.prototype.Type=AscDFH.historyitem_TextPr_RFonts;CChangesParaTextPrRFonts.prototype.private_SetValue=
function(Value){this.Class.Value.RFonts=Value};CChangesParaTextPrRFonts.prototype.private_CreateObject=function(){return new CRFonts};CChangesParaTextPrRFonts.prototype.private_IsCreateEmptyObject=function(){return true};CChangesParaTextPrRFonts.prototype.Merge=function(oChange){if(this.Class!==oChange.Class)return true;if(this.Type===oChange.Type||oChange.Type===AscDFH.historyitem_TextPr_Value)return false;if(!this.New)this.New=new CRFonts;switch(oChange.Type){case AscDFH.historyitem_TextPr_RFonts_Ascii:{this.New.Ascii=
oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_HAnsi:{this.New.HAnsi=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_CS:{this.New.CS=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_EastAsia:{this.New.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_Hint:{this.New.Hint=oChange.New;break}}return true};function CChangesParaTextPrRFontsAscii(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsAscii.prototype=
Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsAscii.prototype.constructor=CChangesParaTextPrRFontsAscii;CChangesParaTextPrRFontsAscii.prototype.Type=AscDFH.historyitem_TextPr_RFonts_Ascii;CChangesParaTextPrRFontsAscii.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==
this.Old)Writer.WriteString2(this.Old.Name)};CChangesParaTextPrRFontsAscii.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;else this.Old={Name:Reader.GetString2(),Index:-1}};CChangesParaTextPrRFontsAscii.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.Ascii=Value};CChangesParaTextPrRFontsAscii.prototype.Merge=
private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrRFontsHAnsi(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsHAnsi.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsHAnsi.prototype.constructor=CChangesParaTextPrRFontsHAnsi;CChangesParaTextPrRFontsHAnsi.prototype.Type=AscDFH.historyitem_TextPr_RFonts_HAnsi;CChangesParaTextPrRFontsHAnsi.prototype.WriteToBinary=function(Writer){var nFlags=
0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==this.Old)Writer.WriteString2(this.Old.Name)};CChangesParaTextPrRFontsHAnsi.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;
else this.Old={Name:Reader.GetString2(),Index:-1}};CChangesParaTextPrRFontsHAnsi.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.HAnsi=Value};CChangesParaTextPrRFontsHAnsi.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrRFontsCS(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsCS.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsCS.prototype.constructor=
CChangesParaTextPrRFontsCS;CChangesParaTextPrRFontsCS.prototype.Type=AscDFH.historyitem_TextPr_RFonts_CS;CChangesParaTextPrRFontsCS.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==this.Old)Writer.WriteString2(this.Old.Name)};CChangesParaTextPrRFontsCS.prototype.ReadFromBinary=function(Reader){var nFlags=
Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;else this.Old={Name:Reader.GetString2(),Index:-1}};CChangesParaTextPrRFontsCS.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.CS=Value};CChangesParaTextPrRFontsCS.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrRFontsEastAsia(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,
Class,Old,New,Color)}CChangesParaTextPrRFontsEastAsia.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsEastAsia.prototype.constructor=CChangesParaTextPrRFontsEastAsia;CChangesParaTextPrRFontsEastAsia.prototype.Type=AscDFH.historyitem_TextPr_RFonts_EastAsia;CChangesParaTextPrRFontsEastAsia.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);
if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==this.Old)Writer.WriteString2(this.Old.Name)};CChangesParaTextPrRFontsEastAsia.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;else this.Old={Name:Reader.GetString2(),Index:-1}};CChangesParaTextPrRFontsEastAsia.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.EastAsia=
Value};CChangesParaTextPrRFontsEastAsia.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrRFontsHint(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsHint.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrRFontsHint.prototype.constructor=CChangesParaTextPrRFontsHint;CChangesParaTextPrRFontsHint.prototype.Type=AscDFH.historyitem_TextPr_RFonts_Hint;CChangesParaTextPrRFontsHint.prototype.private_SetValue=
function(Value){this.Class.Value.RFonts.Hint=Value};CChangesParaTextPrRFontsHint.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrLang(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrLang.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrLang.prototype.constructor=CChangesParaTextPrLang;CChangesParaTextPrLang.prototype.Type=AscDFH.historyitem_TextPr_Lang;CChangesParaTextPrLang.prototype.private_SetValue=
function(Value){this.Class.Value.Lang=Value};CChangesParaTextPrLang.prototype.private_CreateObject=function(){return new CLang};CChangesParaTextPrLang.prototype.private_IsCreateEmptyObject=function(){return true};CChangesParaTextPrLang.prototype.Merge=function(oChange){if(this.Class!==oChange.Class)return true;if(AscDFH.historyitem_TextPr_Lang===oChange.Type||AscDFH.historyitem_TextPr_Value===oChange.Type)return false;if(!this.New)this.New=new CLang;switch(oChange.Type){case AscDFH.historyitem_TextPr_Lang_Bidi:{this.New.Bidi=
oChange.New;break}case AscDFH.historyitem_TextPr_Lang_EastAsia:{this.New.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_Val:{this.New.Val=oChange.New;break}}return true};function CChangesParaTextPrLangBidi(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrLangBidi.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrLangBidi.prototype.constructor=CChangesParaTextPrLangBidi;CChangesParaTextPrLangBidi.prototype.Type=
AscDFH.historyitem_TextPr_Lang_Bidi;CChangesParaTextPrLangBidi.prototype.private_SetValue=function(Value){this.Class.Value.Lang.Bidi=Value};CChangesParaTextPrLangBidi.prototype.Merge=private_ParaTextPrChangesOnMergeLangValue;function CChangesParaTextPrLangEastAsia(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrLangEastAsia.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrLangEastAsia.prototype.constructor=CChangesParaTextPrLangEastAsia;
CChangesParaTextPrLangEastAsia.prototype.Type=AscDFH.historyitem_TextPr_Lang_EastAsia;CChangesParaTextPrLangEastAsia.prototype.private_SetValue=function(Value){this.Class.Value.Lang.EastAsia=Value};CChangesParaTextPrLangEastAsia.prototype.Merge=private_ParaTextPrChangesOnMergeLangValue;function CChangesParaTextPrLangVal(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrLangVal.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrLangVal.prototype.constructor=
CChangesParaTextPrLangVal;CChangesParaTextPrLangVal.prototype.Type=AscDFH.historyitem_TextPr_Lang_Val;CChangesParaTextPrLangVal.prototype.private_SetValue=function(Value){this.Class.Value.Lang.Val=Value};CChangesParaTextPrLangVal.prototype.Merge=private_ParaTextPrChangesOnMergeLangValue;function CChangesParaTextPrUnifill(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrUnifill.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);
CChangesParaTextPrUnifill.prototype.constructor=CChangesParaTextPrUnifill;CChangesParaTextPrUnifill.prototype.Type=AscDFH.historyitem_TextPr_Unifill;CChangesParaTextPrUnifill.prototype.private_SetValue=function(Value){this.Class.Value.Unifill=Value};CChangesParaTextPrUnifill.prototype.private_CreateObject=function(){return new AscFormat.CUniFill};CChangesParaTextPrUnifill.prototype.Load=function(Color){this.Redo();var Unifill=this.Class.Value.Unifill;if(AscCommon.CollaborativeEditing&&Unifill&&Unifill.fill&&
Unifill.fill.type===Asc.c_oAscFill.FILL_TYPE_BLIP&&typeof Unifill.fill.RasterImageId==="string"&&Unifill.fill.RasterImageId.length>0)AscCommon.CollaborativeEditing.Add_NewImage(Unifill.fill.RasterImageId)};CChangesParaTextPrUnifill.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrFontSizeCS(Class,Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrFontSizeCS.prototype=Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);
CChangesParaTextPrFontSizeCS.prototype.constructor=CChangesParaTextPrFontSizeCS;CChangesParaTextPrFontSizeCS.prototype.Type=AscDFH.historyitem_TextPr_FontSizeCS;CChangesParaTextPrFontSizeCS.prototype.private_SetValue=function(Value){this.Class.Value.FontSizeCS=Value};CChangesParaTextPrFontSizeCS.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrTextOutline(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrTextOutline.prototype=
Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrTextOutline.prototype.constructor=CChangesParaTextPrTextOutline;CChangesParaTextPrTextOutline.prototype.Type=AscDFH.historyitem_TextPr_Outline;CChangesParaTextPrTextOutline.prototype.private_SetValue=function(Value){this.Class.Value.TextOutline=Value};CChangesParaTextPrTextOutline.prototype.private_CreateObject=function(){return new AscFormat.CLn};CChangesParaTextPrTextOutline.prototype.Merge=private_ParaTextPrChangesOnMergeValue;
function CChangesParaTextPrTextFill(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrTextFill.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrTextFill.prototype.constructor=CChangesParaTextPrTextFill;CChangesParaTextPrTextFill.prototype.Type=AscDFH.historyitem_TextPr_Fill;CChangesParaTextPrTextFill.prototype.private_SetValue=function(Value){this.Class.Value.TextFill=Value};CChangesParaTextPrTextFill.prototype.private_CreateObject=
function(){return new AscFormat.CUniFill};CChangesParaTextPrTextFill.prototype.Merge=private_ParaTextPrChangesOnMergeValue;"use strict";var drawing_Inline=1;var drawing_Anchor=2;var WRAPPING_TYPE_NONE=0;var WRAPPING_TYPE_SQUARE=1;var WRAPPING_TYPE_THROUGH=2;var WRAPPING_TYPE_TIGHT=3;var WRAPPING_TYPE_TOP_AND_BOTTOM=4;var WRAP_HIT_TYPE_POINT=0;var WRAP_HIT_TYPE_SECTION=1;var c_oAscAlignH=Asc.c_oAscAlignH;var c_oAscAlignV=Asc.c_oAscAlignV;function ParaDrawing(W,H,GraphicObj,DrawingDocument,DocumentContent,
Parent){CRunElementBase.call(this);this.Id=AscCommon.g_oIdCounter.Get_NewId();this.DrawingType=drawing_Inline;this.GraphicObj=GraphicObj;this.X=0;this.Y=0;this.Width=0;this.Height=0;this.OrigX=0;this.OrigY=0;this.ShiftX=0;this.ShiftY=0;this.PageNum=0;this.LineNum=0;this.YOffset=0;this.DocumentContent=DocumentContent;this.DrawingDocument=DrawingDocument;this.Parent=Parent;this.LogicDocument=DrawingDocument?DrawingDocument.m_oLogicDocument:null;this.Distance={T:0,B:0,L:0,R:0};this.LayoutInCell=true;
this.RelativeHeight=undefined;this.SimplePos={Use:false,X:0,Y:0};this.Extent={W:W,H:H};this.EffectExtent={L:0,T:0,R:0,B:0};this.docPr=new AscFormat.CNvPr;this.SizeRelH=undefined;this.SizeRelV=undefined;this.AllowOverlap=true;this.Locked=null;this.Hidden=null;this.PositionH={RelativeFrom:c_oAscRelativeFromH.Column,Align:false,Value:0,Percent:false};this.PositionV={RelativeFrom:c_oAscRelativeFromV.Paragraph,Align:false,Value:0,Percent:false};this.PositionH_Old=undefined;this.PositionV_Old=undefined;
this.Internal_Position=new CAnchorPosition;this.wrappingType=WRAPPING_TYPE_THROUGH;this.useWrap=true;if(typeof CWrapPolygon!=="undefined")this.wrappingPolygon=new CWrapPolygon(this);this.document=editor.WordControl.m_oLogicDocument;this.drawingDocument=DrawingDocument;this.graphicObjects=editor.WordControl.m_oLogicDocument.DrawingObjects;this.selected=false;this.behindDoc=false;this.bNoNeedToAdd=false;this.pageIndex=-1;this.Lock=new AscCommon.CLock;this.ParaMath=null;this.SkipOnRecalculate=false;
this.LineTop=null;this.LineBottom=null;g_oTableId.Add(this,this.Id);if(this.graphicObjects){this.Set_RelativeHeight(this.graphicObjects.getZIndex());if(History.Is_On()&&!g_oTableId.m_bTurnOff)this.graphicObjects.addGraphicObject(this)}}ParaDrawing.prototype=Object.create(CRunElementBase.prototype);ParaDrawing.prototype.constructor=ParaDrawing;ParaDrawing.prototype.Type=para_Drawing;ParaDrawing.prototype.Get_Type=function(){return this.Type};ParaDrawing.prototype.Get_Width=function(){return this.Width};
ParaDrawing.prototype.Get_WidthVisible=function(){return this.WidthVisible};ParaDrawing.prototype.Set_WidthVisible=function(WidthVisible){this.WidthVisible=WidthVisible};ParaDrawing.prototype.GetSelectedContent=function(SelectedContent){if(this.GraphicObj&&this.GraphicObj.GetSelectedContent)this.GraphicObj.GetSelectedContent(SelectedContent)};ParaDrawing.prototype.GetSearchElementId=function(bNext,bCurrent){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.GetSearchElementId==="function")return this.GraphicObj.GetSearchElementId(bNext,
bCurrent);return null};ParaDrawing.prototype.CheckCorrect=function(){if(!this.GraphicObj)return false;if(this.GraphicObj&&this.GraphicObj.checkCorrect)return this.GraphicObj.checkCorrect();return true};ParaDrawing.prototype.GetAllDrawingObjects=function(DrawingObjects){if(null==DrawingObjects)DrawingObjects=[];if(this.GraphicObj.GetAllDrawingObjects)this.GraphicObj.GetAllDrawingObjects(DrawingObjects)};ParaDrawing.prototype.canRotate=function(){return AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.canRotate==
"function"&&this.GraphicObj.canRotate()};ParaDrawing.prototype.GetParagraph=function(){return this.Get_ParentParagraph()};ParaDrawing.prototype.GetRun=function(){return this.Get_Run()};ParaDrawing.prototype.Get_Run=function(){var oParagraph=this.Get_ParentParagraph();if(oParagraph)return oParagraph.Get_DrawingObjectRun(this.Id);return null};ParaDrawing.prototype.Get_Props=function(OtherProps){var Props={};Props.Width=this.GraphicObj.extX;Props.Height=this.GraphicObj.extY;if(drawing_Inline===this.DrawingType)Props.WrappingStyle=
c_oAscWrapStyle2.Inline;else if(WRAPPING_TYPE_NONE===this.wrappingType)Props.WrappingStyle=this.behindDoc===true?c_oAscWrapStyle2.Behind:c_oAscWrapStyle2.InFront;else switch(this.wrappingType){case WRAPPING_TYPE_SQUARE:Props.WrappingStyle=c_oAscWrapStyle2.Square;break;case WRAPPING_TYPE_TIGHT:Props.WrappingStyle=c_oAscWrapStyle2.Tight;break;case WRAPPING_TYPE_THROUGH:Props.WrappingStyle=c_oAscWrapStyle2.Through;break;case WRAPPING_TYPE_TOP_AND_BOTTOM:Props.WrappingStyle=c_oAscWrapStyle2.TopAndBottom;
break;default:Props.WrappingStyle=c_oAscWrapStyle2.Inline;break}if(drawing_Inline===this.DrawingType)Props.Paddings={Left:AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT,Right:AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT,Top:0,Bottom:0};else{var oDistance=this.Get_Distance();Props.Paddings={Left:oDistance.L,Right:oDistance.R,Top:oDistance.T,Bottom:oDistance.B}}Props.AllowOverlap=this.AllowOverlap;Props.Position={X:this.X,Y:this.Y};Props.PositionH={RelativeFrom:this.PositionH.RelativeFrom,UseAlign:this.PositionH.Align,
Align:true===this.PositionH.Align?this.PositionH.Value:undefined,Value:true===this.PositionH.Align?0:this.PositionH.Value,Percent:this.PositionH.Percent};Props.PositionV={RelativeFrom:this.PositionV.RelativeFrom,UseAlign:this.PositionV.Align,Align:true===this.PositionV.Align?this.PositionV.Value:undefined,Value:true===this.PositionV.Align?0:this.PositionV.Value,Percent:this.PositionV.Percent};if(this.SizeRelH&&this.SizeRelH.Percent>0)Props.SizeRelH={RelativeFrom:AscFormat.ConvertRelSizeHToRelPosition(this.SizeRelH.RelativeFrom),
Value:this.SizeRelH.Percent*100>>0};if(this.SizeRelV&&this.SizeRelV.Percent>0)Props.SizeRelV={RelativeFrom:AscFormat.ConvertRelSizeVToRelPosition(this.SizeRelV.RelativeFrom),Value:this.SizeRelV.Percent*100>>0};Props.Internal_Position=this.Internal_Position;Props.Locked=this.Lock.Is_Locked();var ParentParagraph=this.Get_ParentParagraph();if(ParentParagraph&&undefined!==ParentParagraph.Parent){var DocContent=ParentParagraph.Parent;if(true===DocContent.Is_DrawingShape()||DocContent.GetTopDocumentContent()instanceof
CFootEndnote)Props.CanBeFlow=false}Props.title=this.docPr.title!==null?this.docPr.title:undefined;Props.description=this.docPr.descr!==null?this.docPr.descr:undefined;if(null!=OtherProps&&undefined!=OtherProps){if(undefined===OtherProps.Width||.001>Math.abs(Props.Width-OtherProps.Width))Props.Width=undefined;if(undefined===OtherProps.Height||.001>Math.abs(Props.Height-OtherProps.Height))Props.Height=undefined;if(undefined===OtherProps.WrappingStyle||Props.WrappingStyle!=OtherProps.WrappingStyle)Props.WrappingStyle=
undefined;if(undefined===OtherProps.ImageUrl||Props.ImageUrl!=OtherProps.ImageUrl)Props.ImageUrl=undefined;if(undefined===OtherProps.Paddings.Left||.001>Math.abs(Props.Paddings.Left-OtherProps.Paddings.Left))Props.Paddings.Left=undefined;if(undefined===OtherProps.Paddings.Right||.001>Math.abs(Props.Paddings.Right-OtherProps.Paddings.Right))Props.Paddings.Right=undefined;if(undefined===OtherProps.Paddings.Top||.001>Math.abs(Props.Paddings.Top-OtherProps.Paddings.Top))Props.Paddings.Top=undefined;if(undefined===
OtherProps.Paddings.Bottom||.001>Math.abs(Props.Paddings.Bottom-OtherProps.Paddings.Bottom))Props.Paddings.Bottom=undefined;if(undefined===OtherProps.AllowOverlap||Props.AllowOverlap!=OtherProps.AllowOverlap)Props.AllowOverlap=undefined;if(undefined===OtherProps.Position.X||.001>Math.abs(Props.Position.X-OtherProps.Position.X))Props.Position.X=undefined;if(undefined===OtherProps.Position.Y||.001>Math.abs(Props.Position.Y-OtherProps.Position.Y))Props.Position.Y=undefined;if(undefined===OtherProps.PositionH.RelativeFrom||
Props.PositionH.RelativeFrom!=OtherProps.PositionH.RelativeFrom)Props.PositionH.RelativeFrom=undefined;if(undefined===OtherProps.PositionH.UseAlign||Props.PositionH.UseAlign!=OtherProps.PositionH.UseAlign)Props.PositionH.UseAlign=undefined;if(Props.PositionH.RelativeFrom===OtherProps.PositionH.RelativeFrom&&Props.PositionH.UseAlign===OtherProps.PositionH.UseAlign){if(true!=Props.PositionH.UseAlign&&.001>Math.abs(Props.PositionH.Value-OtherProps.PositionH.Value))Props.PositionH.Value=undefined;if(true===
Props.PositionH.UseAlign&&Props.PositionH.Align!=OtherProps.PositionH.Align)Props.PositionH.Align=undefined}if(undefined===OtherProps.PositionV.RelativeFrom||Props.PositionV.RelativeFrom!=OtherProps.PositionV.RelativeFrom)Props.PositionV.RelativeFrom=undefined;if(undefined===OtherProps.PositionV.UseAlign||Props.PositionV.UseAlign!=OtherProps.PositionV.UseAlign)Props.PositionV.UseAlign=undefined;if(Props.PositionV.RelativeFrom===OtherProps.PositionV.RelativeFrom&&Props.PositionV.UseAlign===OtherProps.PositionV.UseAlign){if(true!=
Props.PositionV.UseAlign&&.001>Math.abs(Props.PositionV.Value-OtherProps.PositionV.Value))Props.PositionV.Value=undefined;if(true===Props.PositionV.UseAlign&&Props.PositionV.Align!=OtherProps.PositionV.Align)Props.PositionV.Align=undefined}if(false===OtherProps.Locked)Props.Locked=false;if(false===OtherProps.CanBeFlow||false===Props.CanBeFlow)Props.CanBeFlow=false;else Props.CanBeFlow=true;if(undefined===OtherProps.title||Props.title!==OtherProps.title)Props.title=undefined;if(undefined===OtherProps.description||
Props.description!==OtherProps.description)Props.description=undefined}return Props};ParaDrawing.prototype.Is_UseInDocument=function(){if(this.Parent){var Run=this.Parent.Get_DrawingObjectRun(this.Id);if(Run)return Run.Is_UseInDocument(this.Get_Id())}return false};ParaDrawing.prototype.IsUseInDocument=function(){return this.Is_UseInDocument()};ParaDrawing.prototype.CheckGroupSizes=function(){if(this.GraphicObj&&this.GraphicObj.CheckGroupSizes)this.GraphicObj.CheckGroupSizes()};ParaDrawing.prototype.Set_DrawingType=
function(DrawingType){History.Add(new CChangesParaDrawingDrawingType(this,this.DrawingType,DrawingType));this.DrawingType=DrawingType};ParaDrawing.prototype.Set_WrappingType=function(WrapType){History.Add(new CChangesParaDrawingWrappingType(this,this.wrappingType,WrapType));this.wrappingType=WrapType};ParaDrawing.prototype.Set_Distance=function(L,T,R,B){var oDistance=this.Get_Distance();if(!AscFormat.isRealNumber(L))L=oDistance.L;if(!AscFormat.isRealNumber(T))T=oDistance.T;if(!AscFormat.isRealNumber(R))R=
oDistance.R;if(!AscFormat.isRealNumber(B))B=oDistance.B;History.Add(new CChangesParaDrawingDistance(this,{Left:this.Distance.L,Top:this.Distance.T,Right:this.Distance.R,Bottom:this.Distance.B},{Left:L,Top:T,Right:R,Bottom:B}));this.Distance.L=L;this.Distance.R=R;this.Distance.T=T;this.Distance.B=B};ParaDrawing.prototype.Set_AllowOverlap=function(AllowOverlap){History.Add(new CChangesParaDrawingAllowOverlap(this,this.AllowOverlap,AllowOverlap));this.AllowOverlap=AllowOverlap};ParaDrawing.prototype.Set_PositionH=
function(RelativeFrom,Align,Value,Percent){var _Value,_Percent;if(AscFormat.isRealNumber(Value)&&AscFormat.fApproxEqual(Value,0)&&true===Percent){_Value=0;_Percent=false}else{_Value=Value;_Percent=Percent}History.Add(new CChangesParaDrawingPositionH(this,{RelativeFrom:this.PositionH.RelativeFrom,Align:this.PositionH.Align,Value:this.PositionH.Value,Percent:this.PositionH.Percent},{RelativeFrom:RelativeFrom,Align:Align,Value:_Value,Percent:_Percent}));this.PositionH.RelativeFrom=RelativeFrom;this.PositionH.Align=
Align;this.PositionH.Value=_Value;this.PositionH.Percent=_Percent};ParaDrawing.prototype.Set_PositionV=function(RelativeFrom,Align,Value,Percent){var _Value,_Percent;if(AscFormat.isRealNumber(Value)&&AscFormat.fApproxEqual(Value,0)&&true===Percent){_Value=0;_Percent=false}else{_Value=Value;_Percent=Percent}History.Add(new CChangesParaDrawingPositionV(this,{RelativeFrom:this.PositionV.RelativeFrom,Align:this.PositionV.Align,Value:this.PositionV.Value,Percent:this.PositionV.Percent},{RelativeFrom:RelativeFrom,
Align:Align,Value:_Value,Percent:_Percent}));this.PositionV.RelativeFrom=RelativeFrom;this.PositionV.Align=Align;this.PositionV.Value=_Value;this.PositionV.Percent=_Percent};ParaDrawing.prototype.GetPositionH=function(){return{RelativeFrom:this.PositionH.RelativeFrom,Align:this.PositionH.Align,Value:this.PositionH.Value,Percent:this.PositionH.Percent}};ParaDrawing.prototype.GetPositionV=function(){return{RelativeFrom:this.PositionV.RelativeFrom,Align:this.PositionV.Align,Value:this.PositionV.Value,
Percent:this.PositionV.Percent}};ParaDrawing.prototype.Set_BehindDoc=function(BehindDoc){History.Add(new CChangesParaDrawingBehindDoc(this,this.behindDoc,BehindDoc));this.behindDoc=BehindDoc};ParaDrawing.prototype.Set_GraphicObject=function(graphicObject){var oldId=AscCommon.isRealObject(this.GraphicObj)?this.GraphicObj.Get_Id():null;var newId=AscCommon.isRealObject(graphicObject)?graphicObject.Get_Id():null;History.Add(new CChangesParaDrawingGraphicObject(this,oldId,newId));if(graphicObject)graphicObject.handleUpdateExtents();
this.GraphicObj=graphicObject};ParaDrawing.prototype.setSimplePos=function(use,x,y){History.Add(new CChangesParaDrawingSimplePos(this,{Use:this.SimplePos.Use,X:this.SimplePos.X,Y:this.SimplePos.Y},{Use:use,X:x,Y:y}));this.SimplePos.Use=use;this.SimplePos.X=x;this.SimplePos.Y=y};ParaDrawing.prototype.setExtent=function(extX,extY){History.Add(new CChangesParaDrawingExtent(this,{W:this.Extent.W,H:this.Extent.H},{W:extX,H:extY}));this.Extent.W=extX;this.Extent.H=extY};ParaDrawing.prototype.addWrapPolygon=
function(wrapPolygon){History.Add(new CChangesParaDrawingWrapPolygon(this,this.wrappingPolygon,wrapPolygon));this.wrappingPolygon=wrapPolygon};ParaDrawing.prototype.Set_Locked=function(bLocked){History.Add(new CChangesParaDrawingLocked(this,this.Locked,bLocked));this.Locked=bLocked};ParaDrawing.prototype.Set_RelativeHeight=function(nRelativeHeight){History.Add(new CChangesParaDrawingRelativeHeight(this,this.RelativeHeight,nRelativeHeight));this.Set_RelativeHeight2(nRelativeHeight)};ParaDrawing.prototype.Set_RelativeHeight2=
function(nRelativeHeight){this.RelativeHeight=nRelativeHeight;if(this.graphicObjects&&AscFormat.isRealNumber(nRelativeHeight)&&nRelativeHeight>this.graphicObjects.maximalGraphicObjectZIndex)this.graphicObjects.maximalGraphicObjectZIndex=nRelativeHeight};ParaDrawing.prototype.setEffectExtent=function(L,T,R,B){var oEE=this.EffectExtent;History.Add(new CChangesParaDrawingEffectExtent(this,{L:oEE.L,T:oEE.T,R:oEE.R,B:oEE.B},{L:L,T:T,R:R,B:B}));this.EffectExtent.L=L;this.EffectExtent.T=T;this.EffectExtent.R=
R;this.EffectExtent.B=B};ParaDrawing.prototype.Set_Parent=function(oParent){History.Add(new CChangesParaDrawingParent(this,this.Parent,oParent));this.Parent=oParent};ParaDrawing.prototype.IsWatermark=function(){if(!this.GraphicObj)return false;if(this.GraphicObj.getObjectType()!==AscDFH.historyitem_type_Shape&&this.GraphicObj.getObjectType()!==AscDFH.historyitem_type_ImageShape)return false;if(this.Is_Inline())return false;var oParagraph=this.GetParagraph();if(!(oParagraph instanceof Paragraph))return false;
var oContent=oParagraph.Parent;if(!oContent||oContent.Is_DrawingShape(false))return false;var oHdrFtr=oContent.IsHdrFtr(true);if(!oHdrFtr)return false;var oRun=this.Get_Run();if(!oRun)return false;var arrDocPos=oRun.GetDocumentPositionFromObject();for(var nIndex=0,nCount=arrDocPos.length;nIndex<nCount;++nIndex){var oClass=arrDocPos[nIndex].Class;var oSdt=null;if(oClass instanceof CDocumentContent&&oClass.Parent instanceof CBlockLevelSdt)oSdt=oClass.Parent;else if(oClass instanceof CInlineLevelSdt)oSdt=
oClass;if(oSdt){var oPr=oSdt.Pr;if(AscCommon.isRealObject(oPr)&&AscCommon.isRealObject(oPr.DocPartObj)&&oPr.DocPartObj.Gallery==="Watermarks")return true}}return false};ParaDrawing.prototype.Set_ParaMath=function(ParaMath){History.Add(new CChangesParaDrawingParaMath(this,this.ParaMath,ParaMath));this.ParaMath=ParaMath};ParaDrawing.prototype.Set_LayoutInCell=function(LayoutInCell){if(this.LayoutInCell===LayoutInCell)return;History.Add(new CChangesParaDrawingLayoutInCell(this,this.LayoutInCell,LayoutInCell));
this.LayoutInCell=LayoutInCell};ParaDrawing.prototype.SetSizeRelH=function(oSize){History.Add(new CChangesParaDrawingSizeRelH(this,this.SizeRelH,oSize));this.SizeRelH=oSize};ParaDrawing.prototype.SetSizeRelV=function(oSize){History.Add(new CChangesParaDrawingSizeRelV(this,this.SizeRelV,oSize));this.SizeRelV=oSize};ParaDrawing.prototype.getXfrmExtX=function(){if(AscCommon.isRealObject(this.GraphicObj)&&AscCommon.isRealObject(this.GraphicObj.spPr)&&AscCommon.isRealObject(this.GraphicObj.spPr.xfrm)&&
AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extX))return this.GraphicObj.spPr.xfrm.extX;if(AscFormat.isRealNumber(this.Extent.W))return this.Extent.W;return 0};ParaDrawing.prototype.getXfrmExtY=function(){if(AscCommon.isRealObject(this.GraphicObj)&&AscCommon.isRealObject(this.GraphicObj.spPr)&&AscCommon.isRealObject(this.GraphicObj.spPr.xfrm)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extY))return this.GraphicObj.spPr.xfrm.extY;if(AscFormat.isRealNumber(this.Extent.H))return this.Extent.H;
return 0};ParaDrawing.prototype.getXfrmRot=function(){if(AscCommon.isRealObject(this.GraphicObj)&&AscCommon.isRealObject(this.GraphicObj.spPr)&&AscCommon.isRealObject(this.GraphicObj.spPr.xfrm)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.rot))return this.GraphicObj.spPr.xfrm.rot;return 0};ParaDrawing.prototype.Get_Bounds=function(){var InsL,InsT,InsR,InsB;InsL=0;InsT=0;InsR=0;InsB=0;if(!this.Is_Inline()){var oDistance=this.Get_Distance();if(oDistance){InsL=oDistance.L;InsT=oDistance.T;InsR=
oDistance.R;InsB=oDistance.B}}var ExtX=this.getXfrmExtX();var ExtY=this.getXfrmExtY();var Rot=this.getXfrmRot();var X,Y,W,H;if(AscFormat.checkNormalRotate(Rot)){X=this.X;Y=this.Y;W=ExtX;H=ExtY}else{X=this.X+ExtX/2-ExtY/2;Y=this.Y+ExtY/2-ExtX/2;W=ExtY;H=ExtX}return{Left:X-this.EffectExtent.L-InsL,Top:Y-this.EffectExtent.T-InsT,Bottom:Y+H+this.EffectExtent.B+InsB,Right:X+W+this.EffectExtent.R+InsR}};ParaDrawing.prototype.Search=function(Str,Props,SearchEngine,Type){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.Search==="function")this.GraphicObj.Search(Str,Props,SearchEngine,Type)};ParaDrawing.prototype.Set_Props=function(Props){var bCheckWrapPolygon=false;var isPictureCC=false;var oRun=this.GetRun();if(oRun){var arrContentControls=oRun.GetParentContentControls();for(var nIndex=0,nCount=arrContentControls.length;nIndex<nCount;++nIndex)if(arrContentControls[nIndex].IsPicture()){isPictureCC=true;break}}if(undefined!=Props.WrappingStyle&&!isPictureCC){if(drawing_Inline===this.DrawingType&&
c_oAscWrapStyle2.Inline!=Props.WrappingStyle&&undefined===Props.Paddings)this.Set_Distance(3.2,0,3.2,0);this.Set_DrawingType(c_oAscWrapStyle2.Inline===Props.WrappingStyle?drawing_Inline:drawing_Anchor);if(c_oAscWrapStyle2.Inline===Props.WrappingStyle)if(AscCommon.isRealObject(this.GraphicObj.bounds)&&AscFormat.isRealNumber(this.GraphicObj.bounds.w)&&AscFormat.isRealNumber(this.GraphicObj.bounds.h))this.CheckWH();if(c_oAscWrapStyle2.Behind===Props.WrappingStyle||c_oAscWrapStyle2.InFront===Props.WrappingStyle){this.Set_WrappingType(WRAPPING_TYPE_NONE);
this.Set_BehindDoc(c_oAscWrapStyle2.Behind===Props.WrappingStyle?true:false)}else{switch(Props.WrappingStyle){case c_oAscWrapStyle2.Square:this.Set_WrappingType(WRAPPING_TYPE_SQUARE);break;case c_oAscWrapStyle2.Tight:{bCheckWrapPolygon=true;this.Set_WrappingType(WRAPPING_TYPE_TIGHT);break}case c_oAscWrapStyle2.Through:{this.Set_WrappingType(WRAPPING_TYPE_THROUGH);bCheckWrapPolygon=true;break}case c_oAscWrapStyle2.TopAndBottom:this.Set_WrappingType(WRAPPING_TYPE_TOP_AND_BOTTOM);break;default:this.Set_WrappingType(WRAPPING_TYPE_SQUARE);
break}this.Set_BehindDoc(false)}}if(undefined!=Props.Paddings)this.Set_Distance(Props.Paddings.Left,Props.Paddings.Top,Props.Paddings.Right,Props.Paddings.Bottom);if(undefined!=Props.AllowOverlap)this.Set_AllowOverlap(Props.AllowOverlap);if(undefined!=Props.PositionH)this.Set_PositionH(Props.PositionH.RelativeFrom,Props.PositionH.UseAlign,true===Props.PositionH.UseAlign?Props.PositionH.Align:Props.PositionH.Value,Props.PositionH.Percent);if(undefined!=Props.PositionV)this.Set_PositionV(Props.PositionV.RelativeFrom,
Props.PositionV.UseAlign,true===Props.PositionV.UseAlign?Props.PositionV.Align:Props.PositionV.Value,Props.PositionV.Percent);if(undefined!=Props.SizeRelH)this.SetSizeRelH({RelativeFrom:AscFormat.ConvertRelPositionHToRelSize(Props.SizeRelH.RelativeFrom),Percent:Props.SizeRelH.Value/100});if(undefined!=Props.SizeRelV)this.SetSizeRelV({RelativeFrom:AscFormat.ConvertRelPositionVToRelSize(Props.SizeRelV.RelativeFrom),Percent:Props.SizeRelV.Value/100});if(this.SizeRelH&&!this.SizeRelV)this.SetSizeRelV({RelativeFrom:AscCommon.c_oAscSizeRelFromV.sizerelfromvPage,
Percent:0});if(this.SizeRelV&&!this.SizeRelH)this.SetSizeRelH({RelativeFrom:AscCommon.c_oAscSizeRelFromH.sizerelfromhPage,Percent:0});if(bCheckWrapPolygon)this.Check_WrapPolygon();if(undefined!=Props.description)this.docPr.setDescr(Props.description);if(undefined!=Props.title)this.docPr.setTitle(Props.title)};ParaDrawing.prototype.CheckWH=function(){if(!this.GraphicObj)return;var oldExtW=this.Extent.W;var oldExtH=this.Extent.H;if(this.GraphicObj.spPr&&this.GraphicObj.spPr.xfrm&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extX)&&
AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extY)){this.Extent.W=this.GraphicObj.spPr.xfrm.extX;this.Extent.H=this.GraphicObj.spPr.xfrm.extY}this.GraphicObj.recalculate();this.Extent.W=oldExtW;this.Extent.H=oldExtH;var extX,extY,rot;if(this.GraphicObj.spPr&&this.GraphicObj.spPr.xfrm){if(AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extX)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extY)){extX=this.GraphicObj.spPr.xfrm.extX;extY=this.GraphicObj.spPr.xfrm.extY}else{extX=5;extY=5}if(AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.rot))rot=
this.GraphicObj.spPr.xfrm.rot;else rot=0}else{extX=5;extY=5;rot=0}this.setExtent(extX,extY);var EEL=0,EET=0,EER=0,EEB=0;{var xc=this.GraphicObj.localTransform.TransformPointX(this.GraphicObj.extX/2,this.GraphicObj.extY/2);var yc=this.GraphicObj.localTransform.TransformPointY(this.GraphicObj.extX/2,this.GraphicObj.extY/2);var oBounds=this.GraphicObj.bounds;var LineCorrect=0;if(this.GraphicObj.pen&&this.GraphicObj.pen.Fill&&this.GraphicObj.pen.Fill.fill){LineCorrect=this.GraphicObj.pen.w==null?12700:
parseInt(this.GraphicObj.pen.w);LineCorrect/=72E3}var l=oBounds.x;var r=l+oBounds.w;var t=oBounds.y;var b=t+oBounds.h;var startX,startY;if(!AscFormat.checkNormalRotate(rot)){var temp=extX;extX=extY;extY=temp}startX=xc-extX/2;startY=yc-extY/2;if(l>startX)l=startX;if(r<startX+extX)r=startX+extX;if(t>startY)t=startY;if(b<startY+extY)b=startY+extY;EEL=xc-extX/2-l+LineCorrect;EET=yc-extY/2-t+LineCorrect;EER=r+LineCorrect-(xc+extX/2);EEB=b+LineCorrect-(yc+extY/2)}this.setEffectExtent(EEL,EET,EER,EEB);this.Check_WrapPolygon()};
ParaDrawing.prototype.Check_WrapPolygon=function(){if((this.wrappingType===WRAPPING_TYPE_TIGHT||this.wrappingType===WRAPPING_TYPE_THROUGH)&&this.wrappingPolygon&&!this.wrappingPolygon.edited){this.GraphicObj.recalculate();this.wrappingPolygon.setArrRelPoints(this.wrappingPolygon.calculate(this.GraphicObj))}};ParaDrawing.prototype.Draw=function(X,Y,pGraphics,PDSE){var nPageIndex=null;if(AscCommon.isRealObject(PDSE))nPageIndex=PDSE.Page;if(pGraphics.Start_Command){pGraphics.m_aDrawings.push(new AscFormat.ParaDrawingStruct(undefined,
this));return}if(this.Is_Inline()){pGraphics.shapePageIndex=nPageIndex;this.draw(pGraphics,PDSE);pGraphics.shapePageIndex=null}if(pGraphics.End_Command)pGraphics.End_Command()};ParaDrawing.prototype.Measure=function(){if(!this.GraphicObj){this.Width=0;this.Height=0;return}if(AscFormat.isRealNumber(this.Extent.W)&&AscFormat.isRealNumber(this.Extent.H)&&(!this.GraphicObj.checkAutofit||!this.GraphicObj.checkAutofit())&&!this.SizeRelH&&!this.SizeRelV){var oEffectExtent=this.EffectExtent;var W,H;if(AscFormat.isRealNumber(this.GraphicObj.rot))if(AscFormat.checkNormalRotate(this.GraphicObj.rot)){W=
this.Extent.W;H=this.Extent.H}else{W=this.Extent.H;H=this.Extent.W}else{W=this.Extent.W;H=this.Extent.H}this.Width=W+AscFormat.getValOrDefault(oEffectExtent.L,0)+AscFormat.getValOrDefault(oEffectExtent.R,0);this.Height=H+AscFormat.getValOrDefault(oEffectExtent.T,0)+AscFormat.getValOrDefault(oEffectExtent.B,0);this.WidthVisible=this.Width}else{this.GraphicObj.recalculate();if(this.GraphicObj.recalculateText)this.GraphicObj.recalculateText();if(this.PositionH.UseAlign||this.Is_Inline())this.Width=this.GraphicObj.bounds.w;
else this.Width=this.GraphicObj.extX;this.WidthVisible=this.Width;if(this.PositionV.UseAlign||this.Is_Inline())this.Height=this.GraphicObj.bounds.h;else this.Height=this.GraphicObj.extY}};ParaDrawing.prototype.SaveRecalculateObject=function(Copy){var DrawingObj={};DrawingObj.Type=this.Type;DrawingObj.DrawingType=this.DrawingType;DrawingObj.WrappingType=this.wrappingType;if(drawing_Anchor===this.Get_DrawingType()&&true===this.Use_TextWrap()){var oDistance=this.Get_Distance();DrawingObj.FlowPos={X:this.X-
oDistance.L,Y:this.Y-oDistance.T,W:this.Width+oDistance.R,H:this.Height+oDistance.B}}DrawingObj.PageNum=this.PageNum;DrawingObj.X=this.X;DrawingObj.Y=this.Y;DrawingObj.spRecaclcObject=this.GraphicObj.getRecalcObject();return DrawingObj};ParaDrawing.prototype.LoadRecalculateObject=function(RecalcObj){this.updatePosition3(RecalcObj.PageNum,RecalcObj.X,RecalcObj.Y);this.GraphicObj.setRecalcObject(RecalcObj.spRecaclcObject)};ParaDrawing.prototype.Reassign_ImageUrls=function(mapUrls){if(this.GraphicObj)this.GraphicObj.Reassign_ImageUrls(mapUrls)};
ParaDrawing.prototype.PrepareRecalculateObject=function(){};ParaDrawing.prototype.Is_RealContent=function(){return true};ParaDrawing.prototype.Can_AddNumbering=function(){if(drawing_Inline===this.DrawingType)return true;return false};ParaDrawing.prototype.Copy=function(oPr){var c=new ParaDrawing(this.Extent.W,this.Extent.H,null,editor.WordControl.m_oLogicDocument.DrawingDocument,null,null);c.Set_DrawingType(this.DrawingType);if(AscCommon.isRealObject(this.GraphicObj)){var oCopyPr=new AscFormat.CCopyObjectProperties;
oCopyPr.contentCopyPr=oPr;c.Set_GraphicObject(this.GraphicObj.copy(oCopyPr));c.GraphicObj.setParent(c)}var d=this.Distance;c.Set_PositionH(this.PositionH.RelativeFrom,this.PositionH.Align,this.PositionH.Value,this.PositionH.Percent);c.Set_PositionV(this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent);c.Set_Distance(d.L,d.T,d.R,d.B);c.Set_AllowOverlap(this.AllowOverlap);c.Set_WrappingType(this.wrappingType);if(this.wrappingPolygon)c.wrappingPolygon.fromOther(this.wrappingPolygon);
c.Set_BehindDoc(this.behindDoc);c.Set_RelativeHeight(this.RelativeHeight);if(this.SizeRelH)c.SetSizeRelH({RelativeFrom:this.SizeRelH.RelativeFrom,Percent:this.SizeRelH.Percent});if(this.SizeRelV)c.SetSizeRelV({RelativeFrom:this.SizeRelV.RelativeFrom,Percent:this.SizeRelV.Percent});if(AscFormat.isRealNumber(this.Extent.W)&&AscFormat.isRealNumber(this.Extent.H))c.setExtent(this.Extent.W,this.Extent.H);var EE=this.EffectExtent;if(EE.L>0||EE.T>0||EE.R>0||EE.B>0)c.setEffectExtent(EE.L,EE.T,EE.R,EE.B);
c.docPr.setFromOther(this.docPr);if(this.ParaMath)c.Set_ParaMath(this.ParaMath.Copy());return c};ParaDrawing.prototype.IsEqual=function(oElement){return false};ParaDrawing.prototype.Get_Id=function(){return this.Id};ParaDrawing.prototype.GetId=function(){return this.Id};ParaDrawing.prototype.setParagraphTabs=function(tabs){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphTabs==="function")this.GraphicObj.setParagraphTabs(tabs)};ParaDrawing.prototype.IsMovingTableBorder=
function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.IsMovingTableBorder==="function")return this.GraphicObj.IsMovingTableBorder();return false};ParaDrawing.prototype.SetVerticalClip=function(Top,Bottom){this.LineTop=Top;this.LineBottom=Bottom};ParaDrawing.prototype.Update_Position=function(Paragraph,ParaLayout,PageLimits,PageLimitsOrigin,LineNum){if(undefined!=this.PositionH_Old){this.PositionH.RelativeFrom=this.PositionH_Old.RelativeFrom2;this.PositionH.Align=this.PositionH_Old.Align2;
this.PositionH.Value=this.PositionH_Old.Value2;this.PositionH.Percent=this.PositionH_Old.Percent2}if(undefined!=this.PositionV_Old){this.PositionV.RelativeFrom=this.PositionV_Old.RelativeFrom2;this.PositionV.Align=this.PositionV_Old.Align2;this.PositionV.Value=this.PositionV_Old.Value2;this.PositionV.Percent=this.PositionV_Old.Percent2}var oDocumentContent=this.Parent&&this.Parent.Parent;if(oDocumentContent&&oDocumentContent.IsBlockLevelSdtContent())oDocumentContent=oDocumentContent.Parent.Parent;
this.Parent=Paragraph;this.DocumentContent=oDocumentContent;var PageNum=ParaLayout.PageNum;var OtherFlowObjects=editor.WordControl.m_oLogicDocument.DrawingObjects.getAllFloatObjectsOnPage(PageNum,this.Parent.Parent);var bInline=this.Is_Inline();this.Internal_Position.Set(this.GraphicObj.extX,this.GraphicObj.extY,this.getXfrmRot(),this.EffectExtent,this.YOffset,ParaLayout,PageLimits);this.Internal_Position.Calculate_X(bInline,this.PositionH.RelativeFrom,this.PositionH.Align,this.PositionH.Value,this.PositionH.Percent);
this.Internal_Position.Calculate_Y(bInline,this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent);var bCorrect=false;if(oDocumentContent&&oDocumentContent.IsTableCellContent&&oDocumentContent.IsTableCellContent(false))bCorrect=true;if(this.PositionH.RelativeFrom!==c_oAscRelativeFromH.Page||this.PositionV.RelativeFrom!==c_oAscRelativeFromV.Page)bCorrect=true;this.Internal_Position.Correct_Values(bInline,PageLimits,this.AllowOverlap,this.Use_TextWrap(),OtherFlowObjects,
bCorrect);this.GraphicObj.bounds.l=this.GraphicObj.bounds.x+this.Internal_Position.CalcX;this.GraphicObj.bounds.r=this.GraphicObj.bounds.x+this.GraphicObj.bounds.w+this.Internal_Position.CalcX;this.GraphicObj.bounds.t=this.GraphicObj.bounds.y+this.Internal_Position.CalcY;this.GraphicObj.bounds.b=this.GraphicObj.bounds.y+this.GraphicObj.bounds.h+this.Internal_Position.CalcY;var OldPageNum=this.PageNum;this.PageNum=PageNum;this.LineNum=LineNum;this.X=this.Internal_Position.CalcX;this.Y=this.Internal_Position.CalcY;
if(undefined!=this.PositionH_Old){this.PositionH.RelativeFrom=this.PositionH_Old.RelativeFrom;this.PositionH.Align=this.PositionH_Old.Align;this.PositionH.Value=this.PositionH_Old.Value;this.PositionH.Percent=this.PositionH_Old.Percent;var Value=this.Internal_Position.Calculate_X_Value(this.PositionH_Old.RelativeFrom);this.Set_PositionH(this.PositionH_Old.RelativeFrom,false,Value,false);this.X=this.Internal_Position.Calculate_X(bInline,this.PositionH.RelativeFrom,this.PositionH.Align,this.PositionH.Value,
this.PositionH.Percent)}if(undefined!=this.PositionV_Old){this.PositionV.RelativeFrom=this.PositionV_Old.RelativeFrom;this.PositionV.Align=this.PositionV_Old.Align;this.PositionV.Value=this.PositionV_Old.Value;this.PositionV.Percent=this.PositionV_Old.Percent;var Value=this.Internal_Position.Calculate_Y_Value(this.PositionV_Old.RelativeFrom);this.Set_PositionV(this.PositionV_Old.RelativeFrom,false,Value,false);this.Y=this.Internal_Position.Calculate_Y(bInline,this.PositionV.RelativeFrom,this.PositionV.Align,
this.PositionV.Value,this.PositionV.Percent)}this.OrigX=this.X;this.OrigY=this.Y;this.ShiftX=0;this.ShiftY=0;this.updatePosition3(this.PageNum,this.X,this.Y,OldPageNum);this.useWrap=this.Use_TextWrap()};ParaDrawing.prototype.GetClipRect=function(){if(this.Is_Inline()||this.Use_TextWrap()){var oCell;if(this.DocumentContent&&(oCell=this.DocumentContent.IsTableCellContent(true))){var arrPages=oCell.GetCurPageByAbsolutePage(this.PageNum);for(var nIndex=0,nCount=arrPages.length;nIndex<nCount;++nIndex){var oPageBounds=
oCell.GetPageBounds(arrPages[nIndex]);if(this.GraphicObj.bounds.isIntersect(oPageBounds.Left,oPageBounds.Top,oPageBounds.Right,oPageBounds.Bottom))return new AscFormat.CGraphicBounds(oPageBounds.Left,oPageBounds.Top,oPageBounds.Right,oPageBounds.Bottom)}}}return null};ParaDrawing.prototype.Update_PositionYHeaderFooter=function(TopMarginY,BottomMarginY){this.Internal_Position.Update_PositionYHeaderFooter(TopMarginY,BottomMarginY);this.Internal_Position.Calculate_Y(this.Is_Inline(),this.PositionV.RelativeFrom,
this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent);this.OrigY=this.Internal_Position.CalcY;this.Y=this.OrigY+this.ShiftY;this.updatePosition3(this.PageNum,this.X,this.Y,this.PageNum)};ParaDrawing.prototype.Reset_SavedPosition=function(){this.PositionV_Old=undefined;this.PositionH_Old=undefined};ParaDrawing.prototype.setParagraphBorders=function(val){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphBorders==="function")this.GraphicObj.setParagraphBorders(val)};
ParaDrawing.prototype.deselect=function(){this.selected=false;if(this.GraphicObj&&this.GraphicObj.deselect)this.GraphicObj.deselect()};ParaDrawing.prototype.updatePosition3=function(pageIndex,x,y,oldPageNum){var _x=x,_y=y;this.graphicObjects.removeById(pageIndex,this.Get_Id());if(AscFormat.isRealNumber(oldPageNum))this.graphicObjects.removeById(oldPageNum,this.Get_Id());var bChangePageIndex=this.pageIndex!==pageIndex;this.setPageIndex(pageIndex);if(typeof this.GraphicObj.setStartPage==="function"){var bIsHfdFtr=
this.DocumentContent&&this.DocumentContent.IsHdrFtr();this.GraphicObj.setStartPage(pageIndex,bIsHfdFtr,bIsHfdFtr||bChangePageIndex)}if(!(this.DocumentContent&&this.DocumentContent.IsHdrFtr()&&this.DocumentContent.Get_StartPage_Absolute()!==pageIndex)){this.graphicObjects.addObjectOnPage(pageIndex,this.GraphicObj);this.bNoNeedToAdd=false}else this.bNoNeedToAdd=true;if(this.GraphicObj.bNeedUpdatePosition||!(AscFormat.isRealNumber(this.GraphicObj.posX)&&AscFormat.isRealNumber(this.GraphicObj.posY))||
!(Math.abs(this.GraphicObj.posX-_x)<MOVE_DELTA&&Math.abs(this.GraphicObj.posY-_y)<MOVE_DELTA))this.GraphicObj.updatePosition(_x,_y);if(this.GraphicObj.bNeedUpdatePosition||!(AscFormat.isRealNumber(this.wrappingPolygon.posX)&&AscFormat.isRealNumber(this.wrappingPolygon.posY))||!(Math.abs(this.wrappingPolygon.posX-_x)<MOVE_DELTA&&Math.abs(this.wrappingPolygon.posY-_y)<MOVE_DELTA))this.wrappingPolygon.updatePosition(_x,_y);this.calculateSnapArrays()};ParaDrawing.prototype.calculateAfterChangeTheme=function(){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.calculateAfterChangeTheme==="function")this.GraphicObj.calculateAfterChangeTheme()};ParaDrawing.prototype.selectionIsEmpty=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.selectionIsEmpty==="function")return this.GraphicObj.selectionIsEmpty();return false};ParaDrawing.prototype.recalculateDocContent=function(){};ParaDrawing.prototype.Shift=function(Dx,Dy){this.ShiftX=Dx;this.ShiftY=Dy;this.X=this.OrigX+Dx;this.Y=this.OrigY+Dy;this.updatePosition3(this.PageNum,
this.X,this.Y)};ParaDrawing.prototype.IsLayoutInCell=function(){if(this.LogicDocument&&this.LogicDocument.GetCompatibilityMode()>=AscCommon.document_compatibility_mode_Word15)return true;return this.LayoutInCell};ParaDrawing.prototype.Get_Distance=function(){var oDist=this.Distance;return new AscFormat.CDistance(AscFormat.getValOrDefault(oDist.L,AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT),AscFormat.getValOrDefault(oDist.T,0),AscFormat.getValOrDefault(oDist.R,AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT),AscFormat.getValOrDefault(oDist.B,
0))};ParaDrawing.prototype.Set_XYForAdd=function(X,Y,NearPos,PageNum){if(null!==NearPos){var Layout=NearPos.Paragraph.Get_Layout(NearPos.ContentPos,this);this.private_SetXYByLayout(X,Y,PageNum,Layout,true,true);var nRecalcIndex=null;var oLogicDocument=this.document;if(oLogicDocument){nRecalcIndex=oLogicDocument.Get_History().GetRecalculateIndex();this.SetSkipOnRecalculate(true);oLogicDocument.TurnOff_InterfaceEvents();oLogicDocument.Recalculate();oLogicDocument.TurnOn_InterfaceEvents(false);this.SetSkipOnRecalculate(false)}if(null!==
nRecalcIndex)oLogicDocument.Get_History().SetRecalculateIndex(nRecalcIndex);Layout=NearPos.Paragraph.Get_Layout(NearPos.ContentPos,this);this.private_SetXYByLayout(X,Y,PageNum,Layout,true,true)}};ParaDrawing.prototype.SetSkipOnRecalculate=function(isSkip){this.SkipOnRecalculate=isSkip};ParaDrawing.prototype.IsSkipOnRecalculate=function(){return this.SkipOnRecalculate};ParaDrawing.prototype.Set_XY=function(X,Y,Paragraph,PageNum,bResetAlign){if(Paragraph){var PageNumOld=this.PageNum;var ContentPos=
Paragraph.Get_DrawingObjectContentPos(this.Get_Id());if(null===ContentPos)return;var Layout=Paragraph.Get_Layout(ContentPos,this);this.private_SetXYByLayout(X,Y,PageNum,Layout,bResetAlign||true!==this.PositionH.Align?true:false,bResetAlign||true!==this.PositionV.Align?true:false);var nRecalcIndex=null;var oLogicDocument=this.document;if(oLogicDocument){nRecalcIndex=oLogicDocument.Get_History().GetRecalculateIndex();this.SetSkipOnRecalculate(true);oLogicDocument.Recalculate();this.SetSkipOnRecalculate(false)}if(null!==
nRecalcIndex)oLogicDocument.Get_History().SetRecalculateIndex(nRecalcIndex);if(!this.LogicDocument||null===this.LogicDocument.FullRecalc.Id||PageNum<this.LogicDocument.FullRecalc.PageIndex&&PageNumOld<this.LogicDocument.FullRecalc.PageIndex)Layout=Paragraph.Get_Layout(ContentPos,this);this.private_SetXYByLayout(X,Y,PageNum,Layout,bResetAlign||true!==this.PositionH.Align?true:false,bResetAlign||true!==this.PositionV.Align?true:false)}};ParaDrawing.prototype.private_SetXYByLayout=function(X,Y,PageNum,
Layout,bChangeX,bChangeY){if(!Layout)return;this.PageNum=PageNum;this.Internal_Position.Set(this.GraphicObj.extX,this.GraphicObj.extY,this.getXfrmRot(),this.EffectExtent,this.YOffset,Layout.ParagraphLayout,Layout.PageLimitsOrigin);this.Internal_Position.Calculate_X(false,c_oAscRelativeFromH.Page,false,X-Layout.PageLimitsOrigin.X,false);this.Internal_Position.Calculate_Y(false,c_oAscRelativeFromV.Page,false,Y-Layout.PageLimitsOrigin.Y,false);var bCorrect=false;if(this.DocumentContent&&this.DocumentContent.IsTableCellContent&&
this.DocumentContent.IsTableCellContent(false))bCorrect=true;if(this.PositionH.RelativeFrom!==c_oAscRelativeFromH.Page||this.PositionV.RelativeFrom!==c_oAscRelativeFromV.Page)bCorrect=true;this.Internal_Position.Correct_Values(false,Layout.PageLimits,this.AllowOverlap,this.Use_TextWrap(),[],bCorrect);if(true===bChangeX){this.X=this.Internal_Position.CalcX;var ValueX=this.Internal_Position.Calculate_X_Value(this.PositionH.RelativeFrom);this.Set_PositionH(this.PositionH.RelativeFrom,false,ValueX,false);
this.X=this.Internal_Position.Calculate_X(false,this.PositionH.RelativeFrom,this.PositionH.Align,this.PositionH.Value,this.PositionH.Percent)}if(true===bChangeY){this.Y=this.Internal_Position.CalcY;var ValueY=this.Internal_Position.Calculate_Y_Value(this.PositionV.RelativeFrom);this.Set_PositionV(this.PositionV.RelativeFrom,false,ValueY,false);this.Y=this.Internal_Position.Calculate_Y(false,this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent)}};ParaDrawing.prototype.Get_DrawingType=
function(){return this.DrawingType};ParaDrawing.prototype.Is_Inline=function(){if(this.Parent&&this.Parent.Get_ParentTextTransform&&this.Parent.Get_ParentTextTransform())return true;return drawing_Inline===this.DrawingType?true:false};ParaDrawing.prototype.IsInline=function(){return this.Is_Inline()};ParaDrawing.prototype.Use_TextWrap=function(){if(!this.Parent||!this.Parent.Get_FramePr||null!==this.Parent.Get_FramePr()&&undefined!==this.Parent.Get_FramePr())return false;return drawing_Anchor===this.DrawingType&&
!(this.wrappingType===WRAPPING_TYPE_NONE)};ParaDrawing.prototype.IsUseTextWrap=function(){return this.Use_TextWrap()};ParaDrawing.prototype.Draw_Selection=function(){var Padding=this.DrawingDocument.GetMMPerDot(6);var extX,extY;if(this.GraphicObj){extX=this.GraphicObj.extX;extY=this.GraphicObj.extY}else{extX=this.getXfrmExtX();extY=this.getXfrmExtY()}var rot=this.getXfrmRot();if(AscFormat.checkNormalRotate(rot))this.DrawingDocument.AddPageSelection(this.PageNum,this.X-this.EffectExtent.L-Padding,
this.Y-this.EffectExtent.T-Padding,this.EffectExtent.L+extX+this.EffectExtent.R+2*Padding,this.EffectExtent.T+extY+this.EffectExtent.B+2*Padding);else this.DrawingDocument.AddPageSelection(this.PageNum,this.X+extX/2-extY/2-this.EffectExtent.L-Padding,this.Y+extY/2-extX/2-this.EffectExtent.T-Padding,this.EffectExtent.L+extY+this.EffectExtent.R+2*Padding,this.EffectExtent.T+extX+this.EffectExtent.B+2*Padding)};ParaDrawing.prototype.CanInsertToPos=function(oAnchorPos){if(!oAnchorPos||!oAnchorPos.Paragraph||
!oAnchorPos.Paragraph.Parent)return false;return!((this.IsShape()||this.IsGroup())&&(true===oAnchorPos.Paragraph.Parent.Is_DrawingShape()||true===oAnchorPos.Paragraph.Parent.IsFootnote()))};ParaDrawing.prototype.OnEnd_MoveInline=function(NearPos){if(!this.Parent)return;NearPos.Paragraph.Check_NearestPos(NearPos);var oRun=this.GetRun();var oPictureCC=false;if(oRun){var arrContentControls=oRun.GetParentContentControls();for(var nIndex=arrContentControls.length-1;nIndex>=0;--nIndex)if(arrContentControls[nIndex].IsPicture()){oPictureCC=
arrContentControls[nIndex];break}}var oDstRun=null;var arrClasses=NearPos.Paragraph.GetClassesByPos(NearPos.ContentPos);for(var nIndex=arrClasses.length-1;nIndex>=0;--nIndex)if(arrClasses[nIndex]instanceof ParaRun){oDstRun=arrClasses[nIndex];break}if(!oDstRun||oPictureCC&&oDstRun===oRun||oDstRun.GetParentForm()){NearPos.Paragraph.Clear_NearestPosArray();return}var NewParaDrawing=this.Copy();var RunPr=this.Remove_FromDocument(false);this.DocumentContent.Select_DrawingObject(NewParaDrawing.GetId());
NewParaDrawing.Add_ToDocument(NearPos,true,RunPr,undefined,oPictureCC)};ParaDrawing.prototype.Get_ParentTextTransform=function(){if(this.Parent)return this.Parent.Get_ParentTextTransform();return null};ParaDrawing.prototype.GoTo_Text=function(bBefore,bUpdateStates){var Paragraph=this.Get_ParentParagraph();if(Paragraph){Paragraph.MoveCursorToDrawing(this.Id,bBefore);Paragraph.Document_SetThisElementCurrent(undefined===bUpdateStates?true:bUpdateStates)}};ParaDrawing.prototype.Remove_FromDocument=function(bRecalculate){var oResult=
null;if(!this.Parent)return oResult;var oRun=this.Parent.Get_DrawingObjectRun(this.Id);if(oRun){var oGrObject=this.GraphicObj;if(oGrObject&&oGrObject.getObjectType()===AscDFH.historyitem_type_Shape)if(oGrObject.signatureLine)oGrObject.setSignature(oGrObject.signatureLine);var oPictureCC=null;var arrContentControls=oRun.GetParentContentControls();for(var nIndex=arrContentControls.length-1;nIndex>=0;--nIndex)if(arrContentControls[nIndex].IsPicture()){oPictureCC=arrContentControls[nIndex];break}if(oPictureCC)oPictureCC.RemoveContentControlWrapper();
oRun.Remove_DrawingObject(this.Id);if(oRun.IsInHyperlink())oResult=new CTextPr;else oResult=oRun.GetTextPr();if(oGrObject&&oGrObject.getObjectType()===AscDFH.historyitem_type_Shape)if(oGrObject.signatureLine){editor.sendEvent("asc_onRemoveSignature",oGrObject.signatureLine.id);oGrObject.setSignature(oGrObject.signatureLine)}}if(false!=bRecalculate)editor.WordControl.m_oLogicDocument.Recalculate();return oResult};ParaDrawing.prototype.Get_ParentParagraph=function(){if(this.Parent instanceof Paragraph)return this.Parent;
if(this.Parent instanceof ParaRun)return this.Parent.Paragraph;if(this.Parent&&this.Parent.GetParagraph())return this.Parent.GetParagraph();return null};ParaDrawing.prototype.SelectAsText=function(){var oParagraph=this.GetParagraph();var oRun=this.GetRun();if(!oParagraph||!oRun)return;var oDocument=oParagraph.GetLogicDocument();if(!oDocument)return;oDocument.RemoveSelection();oRun.Make_ThisElementCurrent(false);oRun.SetCursorPosition(oRun.GetElementPosition(this));var oStartPos=oDocument.GetContentPosition(false);
oRun.SetCursorPosition(oRun.GetElementPosition(this)+1);var oEndPos=oDocument.GetContentPosition(false);oDocument.RemoveSelection();oDocument.SetSelectionByContentPositions(oStartPos,oEndPos)};ParaDrawing.prototype.Add_ToDocument=function(NearPos,bRecalculate,RunPr,Run,oPictureCC){NearPos.Paragraph.Check_NearestPos(NearPos);var LogicDocument=this.DrawingDocument.m_oLogicDocument;var Para=new Paragraph(this.DrawingDocument,LogicDocument);var DrawingRun=new ParaRun(Para);DrawingRun.Add_ToContent(0,
this);if(RunPr)DrawingRun.Set_Pr(RunPr.Copy());if(Run)DrawingRun.SetReviewTypeWithInfo(Run.GetReviewType(),Run.GetReviewInfo());if(oPictureCC){var oSdt=new CInlineLevelSdt;oSdt.SetPicturePr(true);oSdt.ReplacePlaceHolderWithContent();oSdt.AddToContent(0,DrawingRun);Para.Add_ToContent(0,oSdt);var oFormPr=oPictureCC.GetFormPr();if(oFormPr)oSdt.SetFormPr(oFormPr.Copy())}else Para.Add_ToContent(0,DrawingRun);var SelectedElement=new CSelectedElement(Para,false);var SelectedContent=new CSelectedContent;
SelectedContent.Add(SelectedElement);SelectedContent.SetMoveDrawing(true);SelectedContent.DrawingObjects.push(this);NearPos.Paragraph.Parent.InsertContent(SelectedContent,NearPos);NearPos.Paragraph.Clear_NearestPosArray();NearPos.Paragraph.Correct_Content();this.Set_Parent(NearPos.Paragraph);if(false!=bRecalculate)LogicDocument.Recalculate()};ParaDrawing.prototype.Add_ToDocument2=function(Paragraph){var DrawingRun=new ParaRun(Paragraph);DrawingRun.Add_ToContent(0,this);Paragraph.Add_ToContent(0,DrawingRun);
this.Set_Parent(Paragraph)};ParaDrawing.prototype.UpdateCursorType=function(X,Y,PageIndex){this.DrawingDocument.SetCursorType("move",new AscCommon.CMouseMoveData);if(null!=this.Parent){var Lock=this.Parent.Lock;if(true===Lock.Is_Locked()){var PNum=Math.max(0,Math.min(PageIndex-this.Parent.PageNum,this.Parent.Pages.length-1));var _X=this.Parent.Pages[PNum].X;var _Y=this.Parent.Pages[PNum].Y;var MMData=new AscCommon.CMouseMoveData;var Coords=this.DrawingDocument.ConvertCoordsToCursorWR(_X,_Y,this.Parent.Get_StartPage_Absolute()+
(PageIndex-this.Parent.PageNum));MMData.X_abs=Coords.X-5;MMData.Y_abs=Coords.Y;MMData.Type=Asc.c_oAscMouseMoveDataTypes.LockedObject;MMData.UserId=Lock.Get_UserId();MMData.HaveChanges=Lock.Have_Changes();MMData.LockedObjectType=c_oAscMouseMoveLockedObjectType.Common;editor.sync_MouseMoveCallback(MMData)}}};ParaDrawing.prototype.Get_AnchorPos=function(){if(!this.Parent)return null;return this.Parent.Get_AnchorPos(this)};ParaDrawing.prototype.CheckRecalcAutoFit=function(oSectPr){if(this.GraphicObj&&
this.GraphicObj.CheckNeedRecalcAutoFit)if(this.GraphicObj.CheckNeedRecalcAutoFit(oSectPr)){if(this.GraphicObj)this.GraphicObj.recalcWrapPolygon&&this.GraphicObj.recalcWrapPolygon();this.Measure()}};ParaDrawing.prototype.Get_ParentObject_or_DocumentPos=function(){if(this.Parent!=null)return this.Parent.Get_ParentObject_or_DocumentPos()};ParaDrawing.prototype.Refresh_RecalcData=function(Data){var oRun=this.GetRun();if(oRun){if(AscCommon.isRealObject(Data))switch(Data.Type){case AscDFH.historyitem_Drawing_Distance:{if(this.GraphicObj){this.GraphicObj.recalcWrapPolygon&&
this.GraphicObj.recalcWrapPolygon();this.GraphicObj.addToRecalculate()}break}case AscDFH.historyitem_Drawing_SetExtent:{oRun.RecalcInfo.Measure=true;break}case AscDFH.historyitem_Drawing_SetSizeRelH:case AscDFH.historyitem_Drawing_SetSizeRelV:case AscDFH.historyitem_Drawing_SetGraphicObject:{if(this.GraphicObj){this.GraphicObj.handleUpdateExtents&&this.GraphicObj.handleUpdateExtents();this.GraphicObj.addToRecalculate()}oRun.RecalcInfo.Measure=true;break}case AscDFH.historyitem_Drawing_WrappingType:{if(this.GraphicObj){this.GraphicObj.recalcWrapPolygon&&
this.GraphicObj.recalcWrapPolygon();this.GraphicObj.addToRecalculate()}break}}return oRun.Refresh_RecalcData2()}};ParaDrawing.prototype.Refresh_RecalcData2=function(Data){var oRun=this.GetRun();if(oRun)return oRun.Refresh_RecalcData2()};ParaDrawing.prototype.hyperlinkCheck=function(bCheck){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkCheck==="function")return this.GraphicObj.hyperlinkCheck(bCheck);return null};ParaDrawing.prototype.hyperlinkCanAdd=function(bCheckInHyperlink){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.hyperlinkCanAdd==="function")return this.GraphicObj.hyperlinkCanAdd(bCheckInHyperlink);return false};ParaDrawing.prototype.hyperlinkRemove=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkCanAdd==="function")return this.GraphicObj.hyperlinkRemove();return false};ParaDrawing.prototype.hyperlinkModify=function(HyperProps){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkModify==="function")return this.GraphicObj.hyperlinkModify(HyperProps)};
ParaDrawing.prototype.hyperlinkAdd=function(HyperProps){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkAdd==="function")return this.GraphicObj.hyperlinkAdd(HyperProps)};ParaDrawing.prototype.documentStatistics=function(stat){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.documentStatistics==="function")this.GraphicObj.documentStatistics(stat)};ParaDrawing.prototype.documentCreateFontCharMap=function(fontMap){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.documentCreateFontCharMap==="function")this.GraphicObj.documentCreateFontCharMap(fontMap)};ParaDrawing.prototype.documentCreateFontMap=function(fontMap){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.documentCreateFontMap==="function")this.GraphicObj.documentCreateFontMap(fontMap)};ParaDrawing.prototype.tableCheckSplit=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableCheckSplit==="function")return this.GraphicObj.tableCheckSplit();
return false};ParaDrawing.prototype.tableCheckMerge=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableCheckMerge==="function")return this.GraphicObj.tableCheckMerge();return false};ParaDrawing.prototype.tableSelect=function(Type){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableSelect==="function")return this.GraphicObj.tableSelect(Type)};ParaDrawing.prototype.tableRemoveTable=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableRemoveTable===
"function")return this.GraphicObj.tableRemoveTable()};ParaDrawing.prototype.tableSplitCell=function(Cols,Rows){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableSplitCell==="function")return this.GraphicObj.tableSplitCell(Cols,Rows)};ParaDrawing.prototype.tableMergeCells=function(Cols,Rows){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableMergeCells==="function")return this.GraphicObj.tableMergeCells(Cols,Rows)};ParaDrawing.prototype.tableRemoveCol=function(){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.tableRemoveCol==="function")return this.GraphicObj.tableRemoveCol()};ParaDrawing.prototype.tableAddCol=function(bBefore,nCount){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableAddCol==="function")return this.GraphicObj.tableAddCol(bBefore,nCount)};ParaDrawing.prototype.tableRemoveRow=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableRemoveRow==="function")return this.GraphicObj.tableRemoveRow()};ParaDrawing.prototype.tableAddRow=
function(bBefore,nCount){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableAddRow==="function")return this.GraphicObj.tableAddRow(bBefore,nCount)};ParaDrawing.prototype.getCurrentParagraph=function(bIgnoreSelection,arrSelectedParagraphs){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getCurrentParagraph==="function")return this.GraphicObj.getCurrentParagraph(bIgnoreSelection,arrSelectedParagraphs);if(this.Parent instanceof Paragraph)return this.Parent};ParaDrawing.prototype.GetSelectedText=
function(bClearText,oPr){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.GetSelectedText==="function")return this.GraphicObj.GetSelectedText(bClearText,oPr);return""};ParaDrawing.prototype.getCurPosXY=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getCurPosXY==="function")return this.GraphicObj.getCurPosXY();return{X:0,Y:0}};ParaDrawing.prototype.setParagraphKeepLines=function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphKeepLines===
"function")return this.GraphicObj.setParagraphKeepLines(Value)};ParaDrawing.prototype.setParagraphKeepNext=function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphKeepNext==="function")return this.GraphicObj.setParagraphKeepNext(Value)};ParaDrawing.prototype.setParagraphWidowControl=function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphWidowControl==="function")return this.GraphicObj.setParagraphWidowControl(Value)};ParaDrawing.prototype.setParagraphPageBreakBefore=
function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphPageBreakBefore==="function")return this.GraphicObj.setParagraphPageBreakBefore(Value)};ParaDrawing.prototype.isTextSelectionUse=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.isTextSelectionUse==="function")return this.GraphicObj.isTextSelectionUse();return false};ParaDrawing.prototype.paragraphFormatPaste=function(CopyTextPr,CopyParaPr,Bool){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.isTextSelectionUse==="function")return this.GraphicObj.paragraphFormatPaste(CopyTextPr,CopyParaPr,Bool)};ParaDrawing.prototype.getNearestPos=function(x,y,pageIndex){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getNearestPos==="function")return this.GraphicObj.getNearestPos(x,y,pageIndex);return null};ParaDrawing.prototype.Write_ToBinary=function(Writer){Writer.WriteLong(this.Type);Writer.WriteString2(this.Id)};ParaDrawing.prototype.Write_ToBinary2=function(Writer){Writer.WriteLong(AscDFH.historyitem_type_Drawing);
Writer.WriteString2(this.Id);AscFormat.writeDouble(Writer,this.Extent.W);AscFormat.writeDouble(Writer,this.Extent.H);AscFormat.writeObject(Writer,this.GraphicObj);AscFormat.writeObject(Writer,this.DocumentContent);AscFormat.writeObject(Writer,this.Parent);AscFormat.writeObject(Writer,this.wrappingPolygon);AscFormat.writeLong(Writer,this.RelativeHeight);AscFormat.writeObject(Writer,this.docPr)};ParaDrawing.prototype.Read_FromBinary2=function(Reader){this.Id=Reader.GetString2();this.DrawingDocument=
editor.WordControl.m_oLogicDocument.DrawingDocument;this.LogicDocument=this.DrawingDocument?this.DrawingDocument.m_oLogicDocument:null;this.Extent.W=AscFormat.readDouble(Reader);this.Extent.H=AscFormat.readDouble(Reader);this.GraphicObj=AscFormat.readObject(Reader);this.DocumentContent=AscFormat.readObject(Reader);this.Parent=AscFormat.readObject(Reader);this.wrappingPolygon=AscFormat.readObject(Reader);this.RelativeHeight=AscFormat.readLong(Reader);this.docPr=AscFormat.readObject(Reader);if(this.wrappingPolygon)this.wrappingPolygon.wordGraphicObject=
this;this.drawingDocument=editor.WordControl.m_oLogicDocument.DrawingDocument;this.document=editor.WordControl.m_oLogicDocument;this.graphicObjects=editor.WordControl.m_oLogicDocument.DrawingObjects;this.graphicObjects.addGraphicObject(this);g_oTableId.Add(this,this.Id)};ParaDrawing.prototype.Load_LinkData=function(){};ParaDrawing.prototype.draw=function(graphics,PDSE){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.draw==="function"){graphics.SaveGrState();var bInline=this.Is_Inline();
if(bInline&&AscCommon.isRealObject(PDSE)&&AscFormat.isRealNumber(this.LineTop)&&AscFormat.isRealNumber(this.LineBottom)&&AscCommon.isRealObject(this.GraphicObj.bounds)){var x,y,w,h;var oEffectExtent=this.EffectExtent;x=PDSE.X;y=this.LineTop;w=this.GraphicObj.bounds.r-this.GraphicObj.bounds.l+AscFormat.getValOrDefault(oEffectExtent.R,0)+AscFormat.getValOrDefault(oEffectExtent.L,0);h=this.LineBottom-this.LineTop;graphics.AddClipRect(x,y,w,h)}this.GraphicObj.draw(graphics);graphics.RestoreGrState()}};
ParaDrawing.prototype.drawAdjustments=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.drawAdjustments==="function")this.GraphicObj.drawAdjustments()};ParaDrawing.prototype.getTransformMatrix=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getTransformMatrix==="function")return this.GraphicObj.getTransformMatrix();return null};ParaDrawing.prototype.getExtensions=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getExtensions===
"function")return this.GraphicObj.getExtensions();return null};ParaDrawing.prototype.isGroup=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.isGroup==="function")return this.GraphicObj.isGroup();return false};ParaDrawing.prototype.isShapeChild=function(bRetShape){if(!this.Is_Inline()||!this.DocumentContent)return bRetShape?null:false;var cur_doc_content=this.DocumentContent;var oCell;while(oCell=cur_doc_content.IsTableCellContent(true))cur_doc_content=oCell.Row.Table.Parent;
if(AscCommon.isRealObject(cur_doc_content.Parent)&&typeof cur_doc_content.Parent.getObjectType==="function"&&cur_doc_content.Parent.getObjectType()===AscDFH.historyitem_type_Shape)return bRetShape?cur_doc_content.Parent:true;return bRetShape?null:false};ParaDrawing.prototype.checkShapeChildAndGetTopParagraph=function(paragraph){var parent_paragraph=!paragraph?this.Get_ParentParagraph():paragraph;var parent_doc_content=parent_paragraph.Parent;if(parent_doc_content.Parent instanceof AscFormat.CShape)if(!parent_doc_content.Parent.group)return parent_doc_content.Parent.parent.Get_ParentParagraph();
Old,New,Color)}CChangesParaTextPrHighLight.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrHighLight.prototype.constructor=CChangesParaTextPrHighLight;CChangesParaTextPrHighLight.prototype.Type=AscDFH.historyitem_TextPr_HighLight;CChangesParaTextPrHighLight.prototype.private_SetValue=function(Value){if(this.Class.Value)this.Class.Value.HighLight=Value};CChangesParaTextPrHighLight.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;
if(undefined===this.New)nFlags|=2;else if(highlight_None===this.New)nFlags|=4;if(undefined===this.Old)nFlags|=8;else if(highlight_None===this.Old)nFlags|=16;Writer.WriteLong(nFlags);if(undefined!==this.New&&highlight_None!==this.New)this.New.Write_ToBinary(Writer);if(undefined!==this.Old&&highlight_None!==this.Old)this.Old.Write_ToBinary(Writer)};CChangesParaTextPrHighLight.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&
2)this.New=undefined;else if(nFlags&4)this.New=highlight_None;else{this.New=new CDocumentColor(0,0,0);this.New.Read_FromBinary(Reader)}if(nFlags&8)this.Old=undefined;else if(nFlags&16)this.Old=highlight_None;else{this.Old=new CDocumentColor(0,0,0);this.Old.Read_FromBinary(Reader)}};CChangesParaTextPrHighLight.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrRStyle(Class,Old,New,Color){AscDFH.CChangesBaseStringProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRStyle.prototype=
Object.create(AscDFH.CChangesBaseStringProperty.prototype);CChangesParaTextPrRStyle.prototype.constructor=CChangesParaTextPrRStyle;CChangesParaTextPrRStyle.prototype.Type=AscDFH.historyitem_TextPr_RStyle;CChangesParaTextPrRStyle.prototype.private_SetValue=function(Value){this.Class.Value.RStyle=Value};CChangesParaTextPrRStyle.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrSpacing(Class,Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,Class,Old,New,Color)}
CChangesParaTextPrSpacing.prototype=Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);CChangesParaTextPrSpacing.prototype.constructor=CChangesParaTextPrSpacing;CChangesParaTextPrSpacing.prototype.Type=AscDFH.historyitem_TextPr_Spacing;CChangesParaTextPrSpacing.prototype.private_SetValue=function(Value){this.Class.Value.Spacing=Value};CChangesParaTextPrSpacing.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrDStrikeout(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,
Class,Old,New,Color)}CChangesParaTextPrDStrikeout.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesParaTextPrDStrikeout.prototype.constructor=CChangesParaTextPrDStrikeout;CChangesParaTextPrDStrikeout.prototype.Type=AscDFH.historyitem_TextPr_DStrikeout;CChangesParaTextPrDStrikeout.prototype.private_SetValue=function(Value){this.Class.Value.DStrikeout=Value};CChangesParaTextPrDStrikeout.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrCaps(Class,
Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrCaps.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesParaTextPrCaps.prototype.constructor=CChangesParaTextPrCaps;CChangesParaTextPrCaps.prototype.Type=AscDFH.historyitem_TextPr_Caps;CChangesParaTextPrCaps.prototype.private_SetValue=function(Value){this.Class.Value.Caps=Value};CChangesParaTextPrCaps.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrSmallCaps(Class,
Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrSmallCaps.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesParaTextPrSmallCaps.prototype.constructor=CChangesParaTextPrSmallCaps;CChangesParaTextPrSmallCaps.prototype.Type=AscDFH.historyitem_TextPr_SmallCaps;CChangesParaTextPrSmallCaps.prototype.private_SetValue=function(Value){this.Class.Value.SmallCaps=Value};CChangesParaTextPrSmallCaps.prototype.Merge=private_ParaTextPrChangesOnMergeValue;
function CChangesParaTextPrPosition(Class,Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrPosition.prototype=Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);CChangesParaTextPrPosition.prototype.constructor=CChangesParaTextPrPosition;CChangesParaTextPrPosition.prototype.Type=AscDFH.historyitem_TextPr_Position;CChangesParaTextPrPosition.prototype.private_SetValue=function(Value){this.Class.Value.Position=Value};CChangesParaTextPrPosition.prototype.Merge=
private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrValue(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrValue.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrValue.prototype.constructor=CChangesParaTextPrValue;CChangesParaTextPrValue.prototype.Type=AscDFH.historyitem_TextPr_Value;CChangesParaTextPrValue.prototype.private_SetValue=function(Value){this.Class.Value=Value};CChangesParaTextPrValue.prototype.private_CreateObject=
function(){return new CTextPr};CChangesParaTextPrValue.prototype.private_IsCreateEmptyObject=function(){return true};CChangesParaTextPrValue.prototype.Merge=function(oChange){if(oChange.Class!==this.Class)return true;if(oChange.Type===this.Type)return false;if(!this.New)this.New=new CTextPr;switch(oChange.Type){case AscDFH.historyitem_TextPr_Bold:{this.New.Bold=oChange.New;break}case AscDFH.historyitem_TextPr_Italic:{this.New.Italic=oChange.New;break}case AscDFH.historyitem_TextPr_Strikeout:{this.New.Strikeout=
oChange.New;break}case AscDFH.historyitem_TextPr_Underline:{this.New.Underline=oChange.New;break}case AscDFH.historyitem_TextPr_FontSize:{this.New.FontSize=oChange.New;break}case AscDFH.historyitem_TextPr_Color:{this.New.Color=oChange.New;break}case AscDFH.historyitem_TextPr_VertAlign:{this.New.VertAlign=oChange.New;break}case AscDFH.historyitem_TextPr_HighLight:{this.New.HighLight=oChange.New;break}case AscDFH.historyitem_TextPr_RStyle:{this.New.RStyle=oChange.New;break}case AscDFH.historyitem_TextPr_Spacing:{this.New.Spacing=
oChange.New;break}case AscDFH.historyitem_TextPr_DStrikeout:{this.New.DStrikeout=oChange.New;break}case AscDFH.historyitem_TextPr_Caps:{this.New.Caps=oChange.New;break}case AscDFH.historyitem_TextPr_SmallCaps:{this.New.SmallCaps=oChange.New;break}case AscDFH.historyitem_TextPr_Position:{this.New.Position=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts:{this.New.RFonts=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_Ascii:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.Ascii=
oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_HAnsi:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.HAnsi=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_CS:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.CS=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_EastAsia:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;this.New.RFonts.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_Hint:{if(!this.New.RFonts)this.New.RFonts=new CRFonts;
this.New.RFonts.Hint=oChange.New;break}case AscDFH.historyitem_TextPr_Lang:{this.New.Lang=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_Bidi:{if(!this.New.Lang)this.New.Lang=new CLang;this.New.Lang.Bidi=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_EastAsia:{if(!this.New.Lang)this.New.Lang=new CLang;this.New.Lang.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_Val:{if(!this.New.Lang)this.New.Lang=new CLang;this.New.Lang.Val=oChange.New;break}case AscDFH.historyitem_TextPr_Unifill:{this.New.Unifill=
oChange.New;break}case AscDFH.historyitem_TextPr_FontSizeCS:{this.New.FontSizeCS=oChange.New;break}case AscDFH.historyitem_TextPr_Outline:{this.New.TextOutline=oChange.New;break}case AscDFH.historyitem_TextPr_Fill:{this.New.TextFill=oChange.New;break}}return true};function CChangesParaTextPrRFonts(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFonts.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrRFonts.prototype.constructor=
CChangesParaTextPrRFonts;CChangesParaTextPrRFonts.prototype.Type=AscDFH.historyitem_TextPr_RFonts;CChangesParaTextPrRFonts.prototype.private_SetValue=function(Value){this.Class.Value.RFonts=Value};CChangesParaTextPrRFonts.prototype.private_CreateObject=function(){return new CRFonts};CChangesParaTextPrRFonts.prototype.private_IsCreateEmptyObject=function(){return true};CChangesParaTextPrRFonts.prototype.Merge=function(oChange){if(this.Class!==oChange.Class)return true;if(this.Type===oChange.Type||
oChange.Type===AscDFH.historyitem_TextPr_Value)return false;if(!this.New)this.New=new CRFonts;switch(oChange.Type){case AscDFH.historyitem_TextPr_RFonts_Ascii:{this.New.Ascii=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_HAnsi:{this.New.HAnsi=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_CS:{this.New.CS=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_EastAsia:{this.New.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_RFonts_Hint:{this.New.Hint=oChange.New;break}}return true};
function CChangesParaTextPrRFontsAscii(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsAscii.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsAscii.prototype.constructor=CChangesParaTextPrRFontsAscii;CChangesParaTextPrRFontsAscii.prototype.Type=AscDFH.historyitem_TextPr_RFonts_Ascii;CChangesParaTextPrRFontsAscii.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===
this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==this.Old)Writer.WriteString2(this.Old.Name)};CChangesParaTextPrRFontsAscii.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;else this.Old={Name:Reader.GetString2(),Index:-1}};
CChangesParaTextPrRFontsAscii.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.Ascii=Value};CChangesParaTextPrRFontsAscii.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrRFontsHAnsi(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsHAnsi.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsHAnsi.prototype.constructor=CChangesParaTextPrRFontsHAnsi;CChangesParaTextPrRFontsHAnsi.prototype.Type=
AscDFH.historyitem_TextPr_RFonts_HAnsi;CChangesParaTextPrRFontsHAnsi.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==this.Old)Writer.WriteString2(this.Old.Name)};CChangesParaTextPrRFontsHAnsi.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=
false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;else this.Old={Name:Reader.GetString2(),Index:-1}};CChangesParaTextPrRFontsHAnsi.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.HAnsi=Value};CChangesParaTextPrRFontsHAnsi.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrRFontsCS(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsCS.prototype=
Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsCS.prototype.constructor=CChangesParaTextPrRFontsCS;CChangesParaTextPrRFontsCS.prototype.Type=AscDFH.historyitem_TextPr_RFonts_CS;CChangesParaTextPrRFontsCS.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==this.Old)Writer.WriteString2(this.Old.Name)};
CChangesParaTextPrRFontsCS.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;else this.Old={Name:Reader.GetString2(),Index:-1}};CChangesParaTextPrRFontsCS.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.CS=Value};CChangesParaTextPrRFontsCS.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;
function CChangesParaTextPrRFontsEastAsia(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsEastAsia.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesParaTextPrRFontsEastAsia.prototype.constructor=CChangesParaTextPrRFontsEastAsia;CChangesParaTextPrRFontsEastAsia.prototype.Type=AscDFH.historyitem_TextPr_RFonts_EastAsia;CChangesParaTextPrRFontsEastAsia.prototype.WriteToBinary=function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=
1;if(undefined===this.New)nFlags|=2;if(undefined===this.Old)nFlags|=4;Writer.WriteLong(nFlags);if(undefined!==this.New)Writer.WriteString2(this.New.Name);if(undefined!==this.Old)Writer.WriteString2(this.Old.Name)};CChangesParaTextPrRFontsEastAsia.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else this.New={Name:Reader.GetString2(),Index:-1};if(nFlags&4)this.Old=undefined;else this.Old={Name:Reader.GetString2(),
Index:-1}};CChangesParaTextPrRFontsEastAsia.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.EastAsia=Value};CChangesParaTextPrRFontsEastAsia.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrRFontsHint(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrRFontsHint.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrRFontsHint.prototype.constructor=CChangesParaTextPrRFontsHint;
CChangesParaTextPrRFontsHint.prototype.Type=AscDFH.historyitem_TextPr_RFonts_Hint;CChangesParaTextPrRFontsHint.prototype.private_SetValue=function(Value){this.Class.Value.RFonts.Hint=Value};CChangesParaTextPrRFontsHint.prototype.Merge=private_ParaTextPrChangesOnMergeRFontsValue;function CChangesParaTextPrLang(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrLang.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrLang.prototype.constructor=
CChangesParaTextPrLang;CChangesParaTextPrLang.prototype.Type=AscDFH.historyitem_TextPr_Lang;CChangesParaTextPrLang.prototype.private_SetValue=function(Value){this.Class.Value.Lang=Value};CChangesParaTextPrLang.prototype.private_CreateObject=function(){return new CLang};CChangesParaTextPrLang.prototype.private_IsCreateEmptyObject=function(){return true};CChangesParaTextPrLang.prototype.Merge=function(oChange){if(this.Class!==oChange.Class)return true;if(AscDFH.historyitem_TextPr_Lang===oChange.Type||
AscDFH.historyitem_TextPr_Value===oChange.Type)return false;if(!this.New)this.New=new CLang;switch(oChange.Type){case AscDFH.historyitem_TextPr_Lang_Bidi:{this.New.Bidi=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_EastAsia:{this.New.EastAsia=oChange.New;break}case AscDFH.historyitem_TextPr_Lang_Val:{this.New.Val=oChange.New;break}}return true};function CChangesParaTextPrLangBidi(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrLangBidi.prototype=
Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrLangBidi.prototype.constructor=CChangesParaTextPrLangBidi;CChangesParaTextPrLangBidi.prototype.Type=AscDFH.historyitem_TextPr_Lang_Bidi;CChangesParaTextPrLangBidi.prototype.private_SetValue=function(Value){this.Class.Value.Lang.Bidi=Value};CChangesParaTextPrLangBidi.prototype.Merge=private_ParaTextPrChangesOnMergeLangValue;function CChangesParaTextPrLangEastAsia(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,
Class,Old,New,Color)}CChangesParaTextPrLangEastAsia.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrLangEastAsia.prototype.constructor=CChangesParaTextPrLangEastAsia;CChangesParaTextPrLangEastAsia.prototype.Type=AscDFH.historyitem_TextPr_Lang_EastAsia;CChangesParaTextPrLangEastAsia.prototype.private_SetValue=function(Value){this.Class.Value.Lang.EastAsia=Value};CChangesParaTextPrLangEastAsia.prototype.Merge=private_ParaTextPrChangesOnMergeLangValue;function CChangesParaTextPrLangVal(Class,
Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrLangVal.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesParaTextPrLangVal.prototype.constructor=CChangesParaTextPrLangVal;CChangesParaTextPrLangVal.prototype.Type=AscDFH.historyitem_TextPr_Lang_Val;CChangesParaTextPrLangVal.prototype.private_SetValue=function(Value){this.Class.Value.Lang.Val=Value};CChangesParaTextPrLangVal.prototype.Merge=private_ParaTextPrChangesOnMergeLangValue;
function CChangesParaTextPrUnifill(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrUnifill.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrUnifill.prototype.constructor=CChangesParaTextPrUnifill;CChangesParaTextPrUnifill.prototype.Type=AscDFH.historyitem_TextPr_Unifill;CChangesParaTextPrUnifill.prototype.private_SetValue=function(Value){this.Class.Value.Unifill=Value};CChangesParaTextPrUnifill.prototype.private_CreateObject=
function(){return new AscFormat.CUniFill};CChangesParaTextPrUnifill.prototype.Load=function(Color){this.Redo();var Unifill=this.Class.Value.Unifill;if(AscCommon.CollaborativeEditing&&Unifill&&Unifill.fill&&Unifill.fill.type===Asc.c_oAscFill.FILL_TYPE_BLIP&&typeof Unifill.fill.RasterImageId==="string"&&Unifill.fill.RasterImageId.length>0)AscCommon.CollaborativeEditing.Add_NewImage(Unifill.fill.RasterImageId)};CChangesParaTextPrUnifill.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrFontSizeCS(Class,
Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrFontSizeCS.prototype=Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);CChangesParaTextPrFontSizeCS.prototype.constructor=CChangesParaTextPrFontSizeCS;CChangesParaTextPrFontSizeCS.prototype.Type=AscDFH.historyitem_TextPr_FontSizeCS;CChangesParaTextPrFontSizeCS.prototype.private_SetValue=function(Value){this.Class.Value.FontSizeCS=Value};CChangesParaTextPrFontSizeCS.prototype.Merge=private_ParaTextPrChangesOnMergeValue;
function CChangesParaTextPrTextOutline(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrTextOutline.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrTextOutline.prototype.constructor=CChangesParaTextPrTextOutline;CChangesParaTextPrTextOutline.prototype.Type=AscDFH.historyitem_TextPr_Outline;CChangesParaTextPrTextOutline.prototype.private_SetValue=function(Value){this.Class.Value.TextOutline=Value};CChangesParaTextPrTextOutline.prototype.private_CreateObject=
function(){return new AscFormat.CLn};CChangesParaTextPrTextOutline.prototype.Merge=private_ParaTextPrChangesOnMergeValue;function CChangesParaTextPrTextFill(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesParaTextPrTextFill.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesParaTextPrTextFill.prototype.constructor=CChangesParaTextPrTextFill;CChangesParaTextPrTextFill.prototype.Type=AscDFH.historyitem_TextPr_Fill;CChangesParaTextPrTextFill.prototype.private_SetValue=
function(Value){this.Class.Value.TextFill=Value};CChangesParaTextPrTextFill.prototype.private_CreateObject=function(){return new AscFormat.CUniFill};CChangesParaTextPrTextFill.prototype.Merge=private_ParaTextPrChangesOnMergeValue;"use strict";var drawing_Inline=1;var drawing_Anchor=2;var WRAPPING_TYPE_NONE=0;var WRAPPING_TYPE_SQUARE=1;var WRAPPING_TYPE_THROUGH=2;var WRAPPING_TYPE_TIGHT=3;var WRAPPING_TYPE_TOP_AND_BOTTOM=4;var WRAP_HIT_TYPE_POINT=0;var WRAP_HIT_TYPE_SECTION=1;var c_oAscAlignH=Asc.c_oAscAlignH;
var c_oAscAlignV=Asc.c_oAscAlignV;function ParaDrawing(W,H,GraphicObj,DrawingDocument,DocumentContent,Parent){CRunElementBase.call(this);this.Id=AscCommon.g_oIdCounter.Get_NewId();this.DrawingType=drawing_Inline;this.GraphicObj=GraphicObj;this.X=0;this.Y=0;this.Width=0;this.Height=0;this.OrigX=0;this.OrigY=0;this.ShiftX=0;this.ShiftY=0;this.PageNum=0;this.LineNum=0;this.YOffset=0;this.DocumentContent=DocumentContent;this.DrawingDocument=DrawingDocument;this.Parent=Parent;this.LogicDocument=DrawingDocument?
DrawingDocument.m_oLogicDocument:null;this.Distance={T:0,B:0,L:0,R:0};this.LayoutInCell=true;this.RelativeHeight=undefined;this.SimplePos={Use:false,X:0,Y:0};this.Extent={W:W,H:H};this.EffectExtent={L:0,T:0,R:0,B:0};this.docPr=new AscFormat.CNvPr;this.SizeRelH=undefined;this.SizeRelV=undefined;this.AllowOverlap=true;this.Locked=null;this.Hidden=null;this.PositionH={RelativeFrom:c_oAscRelativeFromH.Column,Align:false,Value:0,Percent:false};this.PositionV={RelativeFrom:c_oAscRelativeFromV.Paragraph,
Align:false,Value:0,Percent:false};this.PositionH_Old=undefined;this.PositionV_Old=undefined;this.Internal_Position=new CAnchorPosition;this.wrappingType=WRAPPING_TYPE_THROUGH;this.useWrap=true;if(typeof CWrapPolygon!=="undefined")this.wrappingPolygon=new CWrapPolygon(this);this.document=editor.WordControl.m_oLogicDocument;this.drawingDocument=DrawingDocument;this.graphicObjects=editor.WordControl.m_oLogicDocument.DrawingObjects;this.selected=false;this.behindDoc=false;this.bNoNeedToAdd=false;this.pageIndex=
-1;this.Lock=new AscCommon.CLock;this.ParaMath=null;this.SkipOnRecalculate=false;this.LineTop=null;this.LineBottom=null;g_oTableId.Add(this,this.Id);if(this.graphicObjects){this.Set_RelativeHeight(this.graphicObjects.getZIndex());if(History.Is_On()&&!g_oTableId.m_bTurnOff)this.graphicObjects.addGraphicObject(this)}}ParaDrawing.prototype=Object.create(CRunElementBase.prototype);ParaDrawing.prototype.constructor=ParaDrawing;ParaDrawing.prototype.Type=para_Drawing;ParaDrawing.prototype.Get_Type=function(){return this.Type};
ParaDrawing.prototype.Get_Width=function(){return this.Width};ParaDrawing.prototype.Get_WidthVisible=function(){return this.WidthVisible};ParaDrawing.prototype.Set_WidthVisible=function(WidthVisible){this.WidthVisible=WidthVisible};ParaDrawing.prototype.GetSelectedContent=function(SelectedContent){if(this.GraphicObj&&this.GraphicObj.GetSelectedContent)this.GraphicObj.GetSelectedContent(SelectedContent)};ParaDrawing.prototype.GetSearchElementId=function(bNext,bCurrent){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.GetSearchElementId==="function")return this.GraphicObj.GetSearchElementId(bNext,bCurrent);return null};ParaDrawing.prototype.CheckCorrect=function(){if(!this.GraphicObj)return false;if(this.GraphicObj&&this.GraphicObj.checkCorrect)return this.GraphicObj.checkCorrect();return true};ParaDrawing.prototype.GetAllDrawingObjects=function(DrawingObjects){if(null==DrawingObjects)DrawingObjects=[];if(this.GraphicObj.GetAllDrawingObjects)this.GraphicObj.GetAllDrawingObjects(DrawingObjects)};
ParaDrawing.prototype.canRotate=function(){return AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.canRotate=="function"&&this.GraphicObj.canRotate()};ParaDrawing.prototype.GetParagraph=function(){return this.Get_ParentParagraph()};ParaDrawing.prototype.GetRun=function(){return this.Get_Run()};ParaDrawing.prototype.Get_Run=function(){var oParagraph=this.Get_ParentParagraph();if(oParagraph)return oParagraph.Get_DrawingObjectRun(this.Id);return null};ParaDrawing.prototype.Get_Props=function(OtherProps){var Props=
{};Props.Width=this.GraphicObj.extX;Props.Height=this.GraphicObj.extY;if(drawing_Inline===this.DrawingType)Props.WrappingStyle=c_oAscWrapStyle2.Inline;else if(WRAPPING_TYPE_NONE===this.wrappingType)Props.WrappingStyle=this.behindDoc===true?c_oAscWrapStyle2.Behind:c_oAscWrapStyle2.InFront;else switch(this.wrappingType){case WRAPPING_TYPE_SQUARE:Props.WrappingStyle=c_oAscWrapStyle2.Square;break;case WRAPPING_TYPE_TIGHT:Props.WrappingStyle=c_oAscWrapStyle2.Tight;break;case WRAPPING_TYPE_THROUGH:Props.WrappingStyle=
c_oAscWrapStyle2.Through;break;case WRAPPING_TYPE_TOP_AND_BOTTOM:Props.WrappingStyle=c_oAscWrapStyle2.TopAndBottom;break;default:Props.WrappingStyle=c_oAscWrapStyle2.Inline;break}if(drawing_Inline===this.DrawingType)Props.Paddings={Left:AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT,Right:AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT,Top:0,Bottom:0};else{var oDistance=this.Get_Distance();Props.Paddings={Left:oDistance.L,Right:oDistance.R,Top:oDistance.T,Bottom:oDistance.B}}Props.AllowOverlap=this.AllowOverlap;Props.Position=
{X:this.X,Y:this.Y};Props.PositionH={RelativeFrom:this.PositionH.RelativeFrom,UseAlign:this.PositionH.Align,Align:true===this.PositionH.Align?this.PositionH.Value:undefined,Value:true===this.PositionH.Align?0:this.PositionH.Value,Percent:this.PositionH.Percent};Props.PositionV={RelativeFrom:this.PositionV.RelativeFrom,UseAlign:this.PositionV.Align,Align:true===this.PositionV.Align?this.PositionV.Value:undefined,Value:true===this.PositionV.Align?0:this.PositionV.Value,Percent:this.PositionV.Percent};
if(this.SizeRelH&&this.SizeRelH.Percent>0)Props.SizeRelH={RelativeFrom:AscFormat.ConvertRelSizeHToRelPosition(this.SizeRelH.RelativeFrom),Value:this.SizeRelH.Percent*100>>0};if(this.SizeRelV&&this.SizeRelV.Percent>0)Props.SizeRelV={RelativeFrom:AscFormat.ConvertRelSizeVToRelPosition(this.SizeRelV.RelativeFrom),Value:this.SizeRelV.Percent*100>>0};Props.Internal_Position=this.Internal_Position;Props.Locked=this.Lock.Is_Locked();var ParentParagraph=this.Get_ParentParagraph();if(ParentParagraph&&undefined!==
ParentParagraph.Parent){var DocContent=ParentParagraph.Parent;if(true===DocContent.Is_DrawingShape()||DocContent.GetTopDocumentContent()instanceof CFootEndnote)Props.CanBeFlow=false}Props.title=this.docPr.title!==null?this.docPr.title:undefined;Props.description=this.docPr.descr!==null?this.docPr.descr:undefined;if(null!=OtherProps&&undefined!=OtherProps){if(undefined===OtherProps.Width||.001>Math.abs(Props.Width-OtherProps.Width))Props.Width=undefined;if(undefined===OtherProps.Height||.001>Math.abs(Props.Height-
OtherProps.Height))Props.Height=undefined;if(undefined===OtherProps.WrappingStyle||Props.WrappingStyle!=OtherProps.WrappingStyle)Props.WrappingStyle=undefined;if(undefined===OtherProps.ImageUrl||Props.ImageUrl!=OtherProps.ImageUrl)Props.ImageUrl=undefined;if(undefined===OtherProps.Paddings.Left||.001>Math.abs(Props.Paddings.Left-OtherProps.Paddings.Left))Props.Paddings.Left=undefined;if(undefined===OtherProps.Paddings.Right||.001>Math.abs(Props.Paddings.Right-OtherProps.Paddings.Right))Props.Paddings.Right=
undefined;if(undefined===OtherProps.Paddings.Top||.001>Math.abs(Props.Paddings.Top-OtherProps.Paddings.Top))Props.Paddings.Top=undefined;if(undefined===OtherProps.Paddings.Bottom||.001>Math.abs(Props.Paddings.Bottom-OtherProps.Paddings.Bottom))Props.Paddings.Bottom=undefined;if(undefined===OtherProps.AllowOverlap||Props.AllowOverlap!=OtherProps.AllowOverlap)Props.AllowOverlap=undefined;if(undefined===OtherProps.Position.X||.001>Math.abs(Props.Position.X-OtherProps.Position.X))Props.Position.X=undefined;
if(undefined===OtherProps.Position.Y||.001>Math.abs(Props.Position.Y-OtherProps.Position.Y))Props.Position.Y=undefined;if(undefined===OtherProps.PositionH.RelativeFrom||Props.PositionH.RelativeFrom!=OtherProps.PositionH.RelativeFrom)Props.PositionH.RelativeFrom=undefined;if(undefined===OtherProps.PositionH.UseAlign||Props.PositionH.UseAlign!=OtherProps.PositionH.UseAlign)Props.PositionH.UseAlign=undefined;if(Props.PositionH.RelativeFrom===OtherProps.PositionH.RelativeFrom&&Props.PositionH.UseAlign===
OtherProps.PositionH.UseAlign){if(true!=Props.PositionH.UseAlign&&.001>Math.abs(Props.PositionH.Value-OtherProps.PositionH.Value))Props.PositionH.Value=undefined;if(true===Props.PositionH.UseAlign&&Props.PositionH.Align!=OtherProps.PositionH.Align)Props.PositionH.Align=undefined}if(undefined===OtherProps.PositionV.RelativeFrom||Props.PositionV.RelativeFrom!=OtherProps.PositionV.RelativeFrom)Props.PositionV.RelativeFrom=undefined;if(undefined===OtherProps.PositionV.UseAlign||Props.PositionV.UseAlign!=
OtherProps.PositionV.UseAlign)Props.PositionV.UseAlign=undefined;if(Props.PositionV.RelativeFrom===OtherProps.PositionV.RelativeFrom&&Props.PositionV.UseAlign===OtherProps.PositionV.UseAlign){if(true!=Props.PositionV.UseAlign&&.001>Math.abs(Props.PositionV.Value-OtherProps.PositionV.Value))Props.PositionV.Value=undefined;if(true===Props.PositionV.UseAlign&&Props.PositionV.Align!=OtherProps.PositionV.Align)Props.PositionV.Align=undefined}if(false===OtherProps.Locked)Props.Locked=false;if(false===OtherProps.CanBeFlow||
false===Props.CanBeFlow)Props.CanBeFlow=false;else Props.CanBeFlow=true;if(undefined===OtherProps.title||Props.title!==OtherProps.title)Props.title=undefined;if(undefined===OtherProps.description||Props.description!==OtherProps.description)Props.description=undefined}return Props};ParaDrawing.prototype.Is_UseInDocument=function(){if(this.Parent){var Run=this.Parent.Get_DrawingObjectRun(this.Id);if(Run)return Run.Is_UseInDocument(this.Get_Id())}return false};ParaDrawing.prototype.IsUseInDocument=function(){return this.Is_UseInDocument()};
ParaDrawing.prototype.CheckGroupSizes=function(){if(this.GraphicObj&&this.GraphicObj.CheckGroupSizes)this.GraphicObj.CheckGroupSizes()};ParaDrawing.prototype.Set_DrawingType=function(DrawingType){History.Add(new CChangesParaDrawingDrawingType(this,this.DrawingType,DrawingType));this.DrawingType=DrawingType};ParaDrawing.prototype.Set_WrappingType=function(WrapType){History.Add(new CChangesParaDrawingWrappingType(this,this.wrappingType,WrapType));this.wrappingType=WrapType};ParaDrawing.prototype.Set_Distance=
function(L,T,R,B){var oDistance=this.Get_Distance();if(!AscFormat.isRealNumber(L))L=oDistance.L;if(!AscFormat.isRealNumber(T))T=oDistance.T;if(!AscFormat.isRealNumber(R))R=oDistance.R;if(!AscFormat.isRealNumber(B))B=oDistance.B;History.Add(new CChangesParaDrawingDistance(this,{Left:this.Distance.L,Top:this.Distance.T,Right:this.Distance.R,Bottom:this.Distance.B},{Left:L,Top:T,Right:R,Bottom:B}));this.Distance.L=L;this.Distance.R=R;this.Distance.T=T;this.Distance.B=B};ParaDrawing.prototype.Set_AllowOverlap=
function(AllowOverlap){History.Add(new CChangesParaDrawingAllowOverlap(this,this.AllowOverlap,AllowOverlap));this.AllowOverlap=AllowOverlap};ParaDrawing.prototype.Set_PositionH=function(RelativeFrom,Align,Value,Percent){var _Value,_Percent;if(AscFormat.isRealNumber(Value)&&AscFormat.fApproxEqual(Value,0)&&true===Percent){_Value=0;_Percent=false}else{_Value=Value;_Percent=Percent}History.Add(new CChangesParaDrawingPositionH(this,{RelativeFrom:this.PositionH.RelativeFrom,Align:this.PositionH.Align,
Value:this.PositionH.Value,Percent:this.PositionH.Percent},{RelativeFrom:RelativeFrom,Align:Align,Value:_Value,Percent:_Percent}));this.PositionH.RelativeFrom=RelativeFrom;this.PositionH.Align=Align;this.PositionH.Value=_Value;this.PositionH.Percent=_Percent};ParaDrawing.prototype.Set_PositionV=function(RelativeFrom,Align,Value,Percent){var _Value,_Percent;if(AscFormat.isRealNumber(Value)&&AscFormat.fApproxEqual(Value,0)&&true===Percent){_Value=0;_Percent=false}else{_Value=Value;_Percent=Percent}History.Add(new CChangesParaDrawingPositionV(this,
{RelativeFrom:this.PositionV.RelativeFrom,Align:this.PositionV.Align,Value:this.PositionV.Value,Percent:this.PositionV.Percent},{RelativeFrom:RelativeFrom,Align:Align,Value:_Value,Percent:_Percent}));this.PositionV.RelativeFrom=RelativeFrom;this.PositionV.Align=Align;this.PositionV.Value=_Value;this.PositionV.Percent=_Percent};ParaDrawing.prototype.GetPositionH=function(){return{RelativeFrom:this.PositionH.RelativeFrom,Align:this.PositionH.Align,Value:this.PositionH.Value,Percent:this.PositionH.Percent}};
ParaDrawing.prototype.GetPositionV=function(){return{RelativeFrom:this.PositionV.RelativeFrom,Align:this.PositionV.Align,Value:this.PositionV.Value,Percent:this.PositionV.Percent}};ParaDrawing.prototype.Set_BehindDoc=function(BehindDoc){History.Add(new CChangesParaDrawingBehindDoc(this,this.behindDoc,BehindDoc));this.behindDoc=BehindDoc};ParaDrawing.prototype.Set_GraphicObject=function(graphicObject){var oldId=AscCommon.isRealObject(this.GraphicObj)?this.GraphicObj.Get_Id():null;var newId=AscCommon.isRealObject(graphicObject)?
graphicObject.Get_Id():null;History.Add(new CChangesParaDrawingGraphicObject(this,oldId,newId));if(graphicObject)graphicObject.handleUpdateExtents();this.GraphicObj=graphicObject};ParaDrawing.prototype.setSimplePos=function(use,x,y){History.Add(new CChangesParaDrawingSimplePos(this,{Use:this.SimplePos.Use,X:this.SimplePos.X,Y:this.SimplePos.Y},{Use:use,X:x,Y:y}));this.SimplePos.Use=use;this.SimplePos.X=x;this.SimplePos.Y=y};ParaDrawing.prototype.setExtent=function(extX,extY){History.Add(new CChangesParaDrawingExtent(this,
{W:this.Extent.W,H:this.Extent.H},{W:extX,H:extY}));this.Extent.W=extX;this.Extent.H=extY};ParaDrawing.prototype.addWrapPolygon=function(wrapPolygon){History.Add(new CChangesParaDrawingWrapPolygon(this,this.wrappingPolygon,wrapPolygon));this.wrappingPolygon=wrapPolygon};ParaDrawing.prototype.Set_Locked=function(bLocked){History.Add(new CChangesParaDrawingLocked(this,this.Locked,bLocked));this.Locked=bLocked};ParaDrawing.prototype.Set_RelativeHeight=function(nRelativeHeight){History.Add(new CChangesParaDrawingRelativeHeight(this,
this.RelativeHeight,nRelativeHeight));this.Set_RelativeHeight2(nRelativeHeight)};ParaDrawing.prototype.Set_RelativeHeight2=function(nRelativeHeight){this.RelativeHeight=nRelativeHeight;if(this.graphicObjects&&AscFormat.isRealNumber(nRelativeHeight)&&nRelativeHeight>this.graphicObjects.maximalGraphicObjectZIndex)this.graphicObjects.maximalGraphicObjectZIndex=nRelativeHeight};ParaDrawing.prototype.setEffectExtent=function(L,T,R,B){var oEE=this.EffectExtent;History.Add(new CChangesParaDrawingEffectExtent(this,
{L:oEE.L,T:oEE.T,R:oEE.R,B:oEE.B},{L:L,T:T,R:R,B:B}));this.EffectExtent.L=L;this.EffectExtent.T=T;this.EffectExtent.R=R;this.EffectExtent.B=B};ParaDrawing.prototype.Set_Parent=function(oParent){History.Add(new CChangesParaDrawingParent(this,this.Parent,oParent));this.Parent=oParent};ParaDrawing.prototype.IsWatermark=function(){if(!this.GraphicObj)return false;if(this.GraphicObj.getObjectType()!==AscDFH.historyitem_type_Shape&&this.GraphicObj.getObjectType()!==AscDFH.historyitem_type_ImageShape)return false;
if(this.Is_Inline())return false;var oParagraph=this.GetParagraph();if(!(oParagraph instanceof Paragraph))return false;var oContent=oParagraph.Parent;if(!oContent||oContent.Is_DrawingShape(false))return false;var oHdrFtr=oContent.IsHdrFtr(true);if(!oHdrFtr)return false;var oRun=this.Get_Run();if(!oRun)return false;var arrDocPos=oRun.GetDocumentPositionFromObject();for(var nIndex=0,nCount=arrDocPos.length;nIndex<nCount;++nIndex){var oClass=arrDocPos[nIndex].Class;var oSdt=null;if(oClass instanceof
CDocumentContent&&oClass.Parent instanceof CBlockLevelSdt)oSdt=oClass.Parent;else if(oClass instanceof CInlineLevelSdt)oSdt=oClass;if(oSdt){var oPr=oSdt.Pr;if(AscCommon.isRealObject(oPr)&&AscCommon.isRealObject(oPr.DocPartObj)&&oPr.DocPartObj.Gallery==="Watermarks")return true}}return false};ParaDrawing.prototype.Set_ParaMath=function(ParaMath){History.Add(new CChangesParaDrawingParaMath(this,this.ParaMath,ParaMath));this.ParaMath=ParaMath};ParaDrawing.prototype.Set_LayoutInCell=function(LayoutInCell){if(this.LayoutInCell===
LayoutInCell)return;History.Add(new CChangesParaDrawingLayoutInCell(this,this.LayoutInCell,LayoutInCell));this.LayoutInCell=LayoutInCell};ParaDrawing.prototype.SetSizeRelH=function(oSize){History.Add(new CChangesParaDrawingSizeRelH(this,this.SizeRelH,oSize));this.SizeRelH=oSize};ParaDrawing.prototype.SetSizeRelV=function(oSize){History.Add(new CChangesParaDrawingSizeRelV(this,this.SizeRelV,oSize));this.SizeRelV=oSize};ParaDrawing.prototype.getXfrmExtX=function(){if(AscCommon.isRealObject(this.GraphicObj)&&
AscCommon.isRealObject(this.GraphicObj.spPr)&&AscCommon.isRealObject(this.GraphicObj.spPr.xfrm)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extX))return this.GraphicObj.spPr.xfrm.extX;if(AscFormat.isRealNumber(this.Extent.W))return this.Extent.W;return 0};ParaDrawing.prototype.getXfrmExtY=function(){if(AscCommon.isRealObject(this.GraphicObj)&&AscCommon.isRealObject(this.GraphicObj.spPr)&&AscCommon.isRealObject(this.GraphicObj.spPr.xfrm)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extY))return this.GraphicObj.spPr.xfrm.extY;
if(AscFormat.isRealNumber(this.Extent.H))return this.Extent.H;return 0};ParaDrawing.prototype.getXfrmRot=function(){if(AscCommon.isRealObject(this.GraphicObj)&&AscCommon.isRealObject(this.GraphicObj.spPr)&&AscCommon.isRealObject(this.GraphicObj.spPr.xfrm)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.rot))return this.GraphicObj.spPr.xfrm.rot;return 0};ParaDrawing.prototype.Get_Bounds=function(){var InsL,InsT,InsR,InsB;InsL=0;InsT=0;InsR=0;InsB=0;if(!this.Is_Inline()){var oDistance=this.Get_Distance();
if(oDistance){InsL=oDistance.L;InsT=oDistance.T;InsR=oDistance.R;InsB=oDistance.B}}var ExtX=this.getXfrmExtX();var ExtY=this.getXfrmExtY();var Rot=this.getXfrmRot();var X,Y,W,H;if(AscFormat.checkNormalRotate(Rot)){X=this.X;Y=this.Y;W=ExtX;H=ExtY}else{X=this.X+ExtX/2-ExtY/2;Y=this.Y+ExtY/2-ExtX/2;W=ExtY;H=ExtX}return{Left:X-this.EffectExtent.L-InsL,Top:Y-this.EffectExtent.T-InsT,Bottom:Y+H+this.EffectExtent.B+InsB,Right:X+W+this.EffectExtent.R+InsR}};ParaDrawing.prototype.Search=function(Str,Props,
SearchEngine,Type){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.Search==="function")this.GraphicObj.Search(Str,Props,SearchEngine,Type)};ParaDrawing.prototype.Set_Props=function(Props){var bCheckWrapPolygon=false;var isPictureCC=false;var oRun=this.GetRun();if(oRun){var arrContentControls=oRun.GetParentContentControls();for(var nIndex=0,nCount=arrContentControls.length;nIndex<nCount;++nIndex)if(arrContentControls[nIndex].IsPicture()){isPictureCC=true;break}}if(undefined!=Props.WrappingStyle&&
!isPictureCC){if(drawing_Inline===this.DrawingType&&c_oAscWrapStyle2.Inline!=Props.WrappingStyle&&undefined===Props.Paddings)this.Set_Distance(3.2,0,3.2,0);this.Set_DrawingType(c_oAscWrapStyle2.Inline===Props.WrappingStyle?drawing_Inline:drawing_Anchor);if(c_oAscWrapStyle2.Inline===Props.WrappingStyle)if(AscCommon.isRealObject(this.GraphicObj.bounds)&&AscFormat.isRealNumber(this.GraphicObj.bounds.w)&&AscFormat.isRealNumber(this.GraphicObj.bounds.h))this.CheckWH();if(c_oAscWrapStyle2.Behind===Props.WrappingStyle||
c_oAscWrapStyle2.InFront===Props.WrappingStyle){this.Set_WrappingType(WRAPPING_TYPE_NONE);this.Set_BehindDoc(c_oAscWrapStyle2.Behind===Props.WrappingStyle?true:false)}else{switch(Props.WrappingStyle){case c_oAscWrapStyle2.Square:this.Set_WrappingType(WRAPPING_TYPE_SQUARE);break;case c_oAscWrapStyle2.Tight:{bCheckWrapPolygon=true;this.Set_WrappingType(WRAPPING_TYPE_TIGHT);break}case c_oAscWrapStyle2.Through:{this.Set_WrappingType(WRAPPING_TYPE_THROUGH);bCheckWrapPolygon=true;break}case c_oAscWrapStyle2.TopAndBottom:this.Set_WrappingType(WRAPPING_TYPE_TOP_AND_BOTTOM);
break;default:this.Set_WrappingType(WRAPPING_TYPE_SQUARE);break}this.Set_BehindDoc(false)}}if(undefined!=Props.Paddings)this.Set_Distance(Props.Paddings.Left,Props.Paddings.Top,Props.Paddings.Right,Props.Paddings.Bottom);if(undefined!=Props.AllowOverlap)this.Set_AllowOverlap(Props.AllowOverlap);if(undefined!=Props.PositionH)this.Set_PositionH(Props.PositionH.RelativeFrom,Props.PositionH.UseAlign,true===Props.PositionH.UseAlign?Props.PositionH.Align:Props.PositionH.Value,Props.PositionH.Percent);if(undefined!=
Props.PositionV)this.Set_PositionV(Props.PositionV.RelativeFrom,Props.PositionV.UseAlign,true===Props.PositionV.UseAlign?Props.PositionV.Align:Props.PositionV.Value,Props.PositionV.Percent);if(undefined!=Props.SizeRelH)this.SetSizeRelH({RelativeFrom:AscFormat.ConvertRelPositionHToRelSize(Props.SizeRelH.RelativeFrom),Percent:Props.SizeRelH.Value/100});if(undefined!=Props.SizeRelV)this.SetSizeRelV({RelativeFrom:AscFormat.ConvertRelPositionVToRelSize(Props.SizeRelV.RelativeFrom),Percent:Props.SizeRelV.Value/
100});if(this.SizeRelH&&!this.SizeRelV)this.SetSizeRelV({RelativeFrom:AscCommon.c_oAscSizeRelFromV.sizerelfromvPage,Percent:0});if(this.SizeRelV&&!this.SizeRelH)this.SetSizeRelH({RelativeFrom:AscCommon.c_oAscSizeRelFromH.sizerelfromhPage,Percent:0});if(bCheckWrapPolygon)this.Check_WrapPolygon();if(undefined!=Props.description)this.docPr.setDescr(Props.description);if(undefined!=Props.title)this.docPr.setTitle(Props.title)};ParaDrawing.prototype.CheckWH=function(){if(!this.GraphicObj)return;var oldExtW=
this.Extent.W;var oldExtH=this.Extent.H;if(this.GraphicObj.spPr&&this.GraphicObj.spPr.xfrm&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extX)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extY)){this.Extent.W=this.GraphicObj.spPr.xfrm.extX;this.Extent.H=this.GraphicObj.spPr.xfrm.extY}this.GraphicObj.recalculate();this.Extent.W=oldExtW;this.Extent.H=oldExtH;var extX,extY,rot;if(this.GraphicObj.spPr&&this.GraphicObj.spPr.xfrm){if(AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extX)&&AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extY)){extX=
this.GraphicObj.spPr.xfrm.extX;extY=this.GraphicObj.spPr.xfrm.extY}else{extX=5;extY=5}if(AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.rot))rot=this.GraphicObj.spPr.xfrm.rot;else rot=0}else{extX=5;extY=5;rot=0}this.setExtent(extX,extY);var EEL=0,EET=0,EER=0,EEB=0;{var xc=this.GraphicObj.localTransform.TransformPointX(this.GraphicObj.extX/2,this.GraphicObj.extY/2);var yc=this.GraphicObj.localTransform.TransformPointY(this.GraphicObj.extX/2,this.GraphicObj.extY/2);var oBounds=this.GraphicObj.bounds;
var LineCorrect=0;if(this.GraphicObj.pen&&this.GraphicObj.pen.Fill&&this.GraphicObj.pen.Fill.fill){LineCorrect=this.GraphicObj.pen.w==null?12700:parseInt(this.GraphicObj.pen.w);LineCorrect/=72E3}var l=oBounds.x;var r=l+oBounds.w;var t=oBounds.y;var b=t+oBounds.h;var startX,startY;if(!AscFormat.checkNormalRotate(rot)){var temp=extX;extX=extY;extY=temp}startX=xc-extX/2;startY=yc-extY/2;if(l>startX)l=startX;if(r<startX+extX)r=startX+extX;if(t>startY)t=startY;if(b<startY+extY)b=startY+extY;EEL=xc-extX/
2-l+LineCorrect;EET=yc-extY/2-t+LineCorrect;EER=r+LineCorrect-(xc+extX/2);EEB=b+LineCorrect-(yc+extY/2)}this.setEffectExtent(EEL,EET,EER,EEB);this.Check_WrapPolygon()};ParaDrawing.prototype.Check_WrapPolygon=function(){if((this.wrappingType===WRAPPING_TYPE_TIGHT||this.wrappingType===WRAPPING_TYPE_THROUGH)&&this.wrappingPolygon&&!this.wrappingPolygon.edited){this.GraphicObj.recalculate();this.wrappingPolygon.setArrRelPoints(this.wrappingPolygon.calculate(this.GraphicObj))}};ParaDrawing.prototype.Draw=
function(X,Y,pGraphics,PDSE){var nPageIndex=null;if(AscCommon.isRealObject(PDSE))nPageIndex=PDSE.Page;if(pGraphics.Start_Command){pGraphics.m_aDrawings.push(new AscFormat.ParaDrawingStruct(undefined,this));return}if(this.Is_Inline()){pGraphics.shapePageIndex=nPageIndex;this.draw(pGraphics,PDSE);pGraphics.shapePageIndex=null}if(pGraphics.End_Command)pGraphics.End_Command()};ParaDrawing.prototype.Measure=function(){if(!this.GraphicObj){this.Width=0;this.Height=0;return}if(AscFormat.isRealNumber(this.Extent.W)&&
AscFormat.isRealNumber(this.Extent.H)&&(!this.GraphicObj.checkAutofit||!this.GraphicObj.checkAutofit())&&!this.SizeRelH&&!this.SizeRelV){var oEffectExtent=this.EffectExtent;var W,H;if(AscFormat.isRealNumber(this.GraphicObj.rot))if(AscFormat.checkNormalRotate(this.GraphicObj.rot)){W=this.Extent.W;H=this.Extent.H}else{W=this.Extent.H;H=this.Extent.W}else{W=this.Extent.W;H=this.Extent.H}this.Width=W+AscFormat.getValOrDefault(oEffectExtent.L,0)+AscFormat.getValOrDefault(oEffectExtent.R,0);this.Height=
H+AscFormat.getValOrDefault(oEffectExtent.T,0)+AscFormat.getValOrDefault(oEffectExtent.B,0);this.WidthVisible=this.Width}else{this.GraphicObj.recalculate();if(this.GraphicObj.recalculateText)this.GraphicObj.recalculateText();if(this.PositionH.UseAlign||this.Is_Inline())this.Width=this.GraphicObj.bounds.w;else this.Width=this.GraphicObj.extX;this.WidthVisible=this.Width;if(this.PositionV.UseAlign||this.Is_Inline())this.Height=this.GraphicObj.bounds.h;else this.Height=this.GraphicObj.extY}};ParaDrawing.prototype.SaveRecalculateObject=
function(Copy){var DrawingObj={};DrawingObj.Type=this.Type;DrawingObj.DrawingType=this.DrawingType;DrawingObj.WrappingType=this.wrappingType;if(drawing_Anchor===this.Get_DrawingType()&&true===this.Use_TextWrap()){var oDistance=this.Get_Distance();DrawingObj.FlowPos={X:this.X-oDistance.L,Y:this.Y-oDistance.T,W:this.Width+oDistance.R,H:this.Height+oDistance.B}}DrawingObj.PageNum=this.PageNum;DrawingObj.X=this.X;DrawingObj.Y=this.Y;DrawingObj.spRecaclcObject=this.GraphicObj.getRecalcObject();return DrawingObj};
ParaDrawing.prototype.LoadRecalculateObject=function(RecalcObj){this.updatePosition3(RecalcObj.PageNum,RecalcObj.X,RecalcObj.Y);this.GraphicObj.setRecalcObject(RecalcObj.spRecaclcObject)};ParaDrawing.prototype.Reassign_ImageUrls=function(mapUrls){if(this.GraphicObj)this.GraphicObj.Reassign_ImageUrls(mapUrls)};ParaDrawing.prototype.PrepareRecalculateObject=function(){};ParaDrawing.prototype.Is_RealContent=function(){return true};ParaDrawing.prototype.Can_AddNumbering=function(){if(drawing_Inline===
this.DrawingType)return true;return false};ParaDrawing.prototype.Copy=function(oPr){var c=new ParaDrawing(this.Extent.W,this.Extent.H,null,editor.WordControl.m_oLogicDocument.DrawingDocument,null,null);c.Set_DrawingType(this.DrawingType);if(AscCommon.isRealObject(this.GraphicObj)){var oCopyPr=new AscFormat.CCopyObjectProperties;oCopyPr.contentCopyPr=oPr;c.Set_GraphicObject(this.GraphicObj.copy(oCopyPr));c.GraphicObj.setParent(c)}var d=this.Distance;c.Set_PositionH(this.PositionH.RelativeFrom,this.PositionH.Align,
this.PositionH.Value,this.PositionH.Percent);c.Set_PositionV(this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent);c.Set_Distance(d.L,d.T,d.R,d.B);c.Set_AllowOverlap(this.AllowOverlap);c.Set_WrappingType(this.wrappingType);if(this.wrappingPolygon)c.wrappingPolygon.fromOther(this.wrappingPolygon);c.Set_BehindDoc(this.behindDoc);c.Set_RelativeHeight(this.RelativeHeight);if(this.SizeRelH)c.SetSizeRelH({RelativeFrom:this.SizeRelH.RelativeFrom,Percent:this.SizeRelH.Percent});
if(this.SizeRelV)c.SetSizeRelV({RelativeFrom:this.SizeRelV.RelativeFrom,Percent:this.SizeRelV.Percent});if(AscFormat.isRealNumber(this.Extent.W)&&AscFormat.isRealNumber(this.Extent.H))c.setExtent(this.Extent.W,this.Extent.H);var EE=this.EffectExtent;if(EE.L>0||EE.T>0||EE.R>0||EE.B>0)c.setEffectExtent(EE.L,EE.T,EE.R,EE.B);c.docPr.setFromOther(this.docPr);if(this.ParaMath)c.Set_ParaMath(this.ParaMath.Copy());return c};ParaDrawing.prototype.IsEqual=function(oElement){return false};ParaDrawing.prototype.Get_Id=
function(){return this.Id};ParaDrawing.prototype.GetId=function(){return this.Id};ParaDrawing.prototype.setParagraphTabs=function(tabs){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphTabs==="function")this.GraphicObj.setParagraphTabs(tabs)};ParaDrawing.prototype.IsMovingTableBorder=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.IsMovingTableBorder==="function")return this.GraphicObj.IsMovingTableBorder();return false};ParaDrawing.prototype.SetVerticalClip=
function(Top,Bottom){this.LineTop=Top;this.LineBottom=Bottom};ParaDrawing.prototype.Update_Position=function(Paragraph,ParaLayout,PageLimits,PageLimitsOrigin,LineNum){if(undefined!=this.PositionH_Old){this.PositionH.RelativeFrom=this.PositionH_Old.RelativeFrom2;this.PositionH.Align=this.PositionH_Old.Align2;this.PositionH.Value=this.PositionH_Old.Value2;this.PositionH.Percent=this.PositionH_Old.Percent2}if(undefined!=this.PositionV_Old){this.PositionV.RelativeFrom=this.PositionV_Old.RelativeFrom2;
this.PositionV.Align=this.PositionV_Old.Align2;this.PositionV.Value=this.PositionV_Old.Value2;this.PositionV.Percent=this.PositionV_Old.Percent2}var oDocumentContent=this.Parent&&this.Parent.Parent;if(oDocumentContent&&oDocumentContent.IsBlockLevelSdtContent())oDocumentContent=oDocumentContent.Parent.Parent;this.Parent=Paragraph;this.DocumentContent=oDocumentContent;var PageNum=ParaLayout.PageNum;var OtherFlowObjects=editor.WordControl.m_oLogicDocument.DrawingObjects.getAllFloatObjectsOnPage(PageNum,
this.Parent.Parent);var bInline=this.Is_Inline();this.Internal_Position.Set(this.GraphicObj.extX,this.GraphicObj.extY,this.getXfrmRot(),this.EffectExtent,this.YOffset,ParaLayout,PageLimits);this.Internal_Position.Calculate_X(bInline,this.PositionH.RelativeFrom,this.PositionH.Align,this.PositionH.Value,this.PositionH.Percent);this.Internal_Position.Calculate_Y(bInline,this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent);var bCorrect=false;if(oDocumentContent&&
oDocumentContent.IsTableCellContent&&oDocumentContent.IsTableCellContent(false))bCorrect=true;if(this.PositionH.RelativeFrom!==c_oAscRelativeFromH.Page||this.PositionV.RelativeFrom!==c_oAscRelativeFromV.Page)bCorrect=true;this.Internal_Position.Correct_Values(bInline,PageLimits,this.AllowOverlap,this.Use_TextWrap(),OtherFlowObjects,bCorrect);this.GraphicObj.bounds.l=this.GraphicObj.bounds.x+this.Internal_Position.CalcX;this.GraphicObj.bounds.r=this.GraphicObj.bounds.x+this.GraphicObj.bounds.w+this.Internal_Position.CalcX;
this.GraphicObj.bounds.t=this.GraphicObj.bounds.y+this.Internal_Position.CalcY;this.GraphicObj.bounds.b=this.GraphicObj.bounds.y+this.GraphicObj.bounds.h+this.Internal_Position.CalcY;var OldPageNum=this.PageNum;this.PageNum=PageNum;this.LineNum=LineNum;this.X=this.Internal_Position.CalcX;this.Y=this.Internal_Position.CalcY;if(undefined!=this.PositionH_Old){this.PositionH.RelativeFrom=this.PositionH_Old.RelativeFrom;this.PositionH.Align=this.PositionH_Old.Align;this.PositionH.Value=this.PositionH_Old.Value;
this.PositionH.Percent=this.PositionH_Old.Percent;var Value=this.Internal_Position.Calculate_X_Value(this.PositionH_Old.RelativeFrom);this.Set_PositionH(this.PositionH_Old.RelativeFrom,false,Value,false);this.X=this.Internal_Position.Calculate_X(bInline,this.PositionH.RelativeFrom,this.PositionH.Align,this.PositionH.Value,this.PositionH.Percent)}if(undefined!=this.PositionV_Old){this.PositionV.RelativeFrom=this.PositionV_Old.RelativeFrom;this.PositionV.Align=this.PositionV_Old.Align;this.PositionV.Value=
this.PositionV_Old.Value;this.PositionV.Percent=this.PositionV_Old.Percent;var Value=this.Internal_Position.Calculate_Y_Value(this.PositionV_Old.RelativeFrom);this.Set_PositionV(this.PositionV_Old.RelativeFrom,false,Value,false);this.Y=this.Internal_Position.Calculate_Y(bInline,this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent)}this.OrigX=this.X;this.OrigY=this.Y;this.ShiftX=0;this.ShiftY=0;this.updatePosition3(this.PageNum,this.X,this.Y,OldPageNum);this.useWrap=
this.Use_TextWrap()};ParaDrawing.prototype.GetClipRect=function(){if(this.Is_Inline()||this.Use_TextWrap()){var oCell;if(this.DocumentContent&&(oCell=this.DocumentContent.IsTableCellContent(true))){var arrPages=oCell.GetCurPageByAbsolutePage(this.PageNum);for(var nIndex=0,nCount=arrPages.length;nIndex<nCount;++nIndex){var oPageBounds=oCell.GetPageBounds(arrPages[nIndex]);if(this.GraphicObj.bounds.isIntersect(oPageBounds.Left,oPageBounds.Top,oPageBounds.Right,oPageBounds.Bottom))return new AscFormat.CGraphicBounds(oPageBounds.Left,
oPageBounds.Top,oPageBounds.Right,oPageBounds.Bottom)}}}return null};ParaDrawing.prototype.Update_PositionYHeaderFooter=function(TopMarginY,BottomMarginY){this.Internal_Position.Update_PositionYHeaderFooter(TopMarginY,BottomMarginY);this.Internal_Position.Calculate_Y(this.Is_Inline(),this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent);this.OrigY=this.Internal_Position.CalcY;this.Y=this.OrigY+this.ShiftY;this.updatePosition3(this.PageNum,this.X,this.Y,this.PageNum)};
ParaDrawing.prototype.Reset_SavedPosition=function(){this.PositionV_Old=undefined;this.PositionH_Old=undefined};ParaDrawing.prototype.setParagraphBorders=function(val){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphBorders==="function")this.GraphicObj.setParagraphBorders(val)};ParaDrawing.prototype.deselect=function(){this.selected=false;if(this.GraphicObj&&this.GraphicObj.deselect)this.GraphicObj.deselect()};ParaDrawing.prototype.updatePosition3=function(pageIndex,
x,y,oldPageNum){var _x=x,_y=y;this.graphicObjects.removeById(pageIndex,this.Get_Id());if(AscFormat.isRealNumber(oldPageNum))this.graphicObjects.removeById(oldPageNum,this.Get_Id());var bChangePageIndex=this.pageIndex!==pageIndex;this.setPageIndex(pageIndex);if(typeof this.GraphicObj.setStartPage==="function"){var bIsHfdFtr=this.DocumentContent&&this.DocumentContent.IsHdrFtr();this.GraphicObj.setStartPage(pageIndex,bIsHfdFtr,bIsHfdFtr||bChangePageIndex)}if(!(this.DocumentContent&&this.DocumentContent.IsHdrFtr()&&
this.DocumentContent.Get_StartPage_Absolute()!==pageIndex)){this.graphicObjects.addObjectOnPage(pageIndex,this.GraphicObj);this.bNoNeedToAdd=false}else this.bNoNeedToAdd=true;if(this.GraphicObj.bNeedUpdatePosition||!(AscFormat.isRealNumber(this.GraphicObj.posX)&&AscFormat.isRealNumber(this.GraphicObj.posY))||!(Math.abs(this.GraphicObj.posX-_x)<MOVE_DELTA&&Math.abs(this.GraphicObj.posY-_y)<MOVE_DELTA))this.GraphicObj.updatePosition(_x,_y);if(this.GraphicObj.bNeedUpdatePosition||!(AscFormat.isRealNumber(this.wrappingPolygon.posX)&&
AscFormat.isRealNumber(this.wrappingPolygon.posY))||!(Math.abs(this.wrappingPolygon.posX-_x)<MOVE_DELTA&&Math.abs(this.wrappingPolygon.posY-_y)<MOVE_DELTA))this.wrappingPolygon.updatePosition(_x,_y);this.calculateSnapArrays()};ParaDrawing.prototype.calculateAfterChangeTheme=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.calculateAfterChangeTheme==="function")this.GraphicObj.calculateAfterChangeTheme()};ParaDrawing.prototype.selectionIsEmpty=function(){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.selectionIsEmpty==="function")return this.GraphicObj.selectionIsEmpty();return false};ParaDrawing.prototype.recalculateDocContent=function(){};ParaDrawing.prototype.Shift=function(Dx,Dy){this.ShiftX=Dx;this.ShiftY=Dy;this.X=this.OrigX+Dx;this.Y=this.OrigY+Dy;this.updatePosition3(this.PageNum,this.X,this.Y)};ParaDrawing.prototype.IsLayoutInCell=function(){if(this.LogicDocument&&this.LogicDocument.GetCompatibilityMode()>=AscCommon.document_compatibility_mode_Word15)return true;
return this.LayoutInCell};ParaDrawing.prototype.Get_Distance=function(){var oDist=this.Distance;return new AscFormat.CDistance(AscFormat.getValOrDefault(oDist.L,AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT),AscFormat.getValOrDefault(oDist.T,0),AscFormat.getValOrDefault(oDist.R,AscFormat.DISTANCE_TO_TEXT_LEFTRIGHT),AscFormat.getValOrDefault(oDist.B,0))};ParaDrawing.prototype.Set_XYForAdd=function(X,Y,NearPos,PageNum){if(null!==NearPos){var Layout=NearPos.Paragraph.Get_Layout(NearPos.ContentPos,this);this.private_SetXYByLayout(X,
Y,PageNum,Layout,true,true);var nRecalcIndex=null;var oLogicDocument=this.document;if(oLogicDocument){nRecalcIndex=oLogicDocument.Get_History().GetRecalculateIndex();this.SetSkipOnRecalculate(true);oLogicDocument.TurnOff_InterfaceEvents();oLogicDocument.Recalculate();oLogicDocument.TurnOn_InterfaceEvents(false);this.SetSkipOnRecalculate(false)}if(null!==nRecalcIndex)oLogicDocument.Get_History().SetRecalculateIndex(nRecalcIndex);Layout=NearPos.Paragraph.Get_Layout(NearPos.ContentPos,this);this.private_SetXYByLayout(X,
Y,PageNum,Layout,true,true)}};ParaDrawing.prototype.SetSkipOnRecalculate=function(isSkip){this.SkipOnRecalculate=isSkip};ParaDrawing.prototype.IsSkipOnRecalculate=function(){return this.SkipOnRecalculate};ParaDrawing.prototype.Set_XY=function(X,Y,Paragraph,PageNum,bResetAlign){if(Paragraph){var PageNumOld=this.PageNum;var ContentPos=Paragraph.Get_DrawingObjectContentPos(this.Get_Id());if(null===ContentPos)return;var Layout=Paragraph.Get_Layout(ContentPos,this);this.private_SetXYByLayout(X,Y,PageNum,
Layout,bResetAlign||true!==this.PositionH.Align?true:false,bResetAlign||true!==this.PositionV.Align?true:false);var nRecalcIndex=null;var oLogicDocument=this.document;if(oLogicDocument){nRecalcIndex=oLogicDocument.Get_History().GetRecalculateIndex();this.SetSkipOnRecalculate(true);oLogicDocument.Recalculate();this.SetSkipOnRecalculate(false)}if(null!==nRecalcIndex)oLogicDocument.Get_History().SetRecalculateIndex(nRecalcIndex);if(!this.LogicDocument||null===this.LogicDocument.FullRecalc.Id||PageNum<
this.LogicDocument.FullRecalc.PageIndex&&PageNumOld<this.LogicDocument.FullRecalc.PageIndex)Layout=Paragraph.Get_Layout(ContentPos,this);this.private_SetXYByLayout(X,Y,PageNum,Layout,bResetAlign||true!==this.PositionH.Align?true:false,bResetAlign||true!==this.PositionV.Align?true:false)}};ParaDrawing.prototype.private_SetXYByLayout=function(X,Y,PageNum,Layout,bChangeX,bChangeY){if(!Layout)return;this.PageNum=PageNum;this.Internal_Position.Set(this.GraphicObj.extX,this.GraphicObj.extY,this.getXfrmRot(),
this.EffectExtent,this.YOffset,Layout.ParagraphLayout,Layout.PageLimitsOrigin);this.Internal_Position.Calculate_X(false,c_oAscRelativeFromH.Page,false,X-Layout.PageLimitsOrigin.X,false);this.Internal_Position.Calculate_Y(false,c_oAscRelativeFromV.Page,false,Y-Layout.PageLimitsOrigin.Y,false);var bCorrect=false;if(this.DocumentContent&&this.DocumentContent.IsTableCellContent&&this.DocumentContent.IsTableCellContent(false))bCorrect=true;if(this.PositionH.RelativeFrom!==c_oAscRelativeFromH.Page||this.PositionV.RelativeFrom!==
c_oAscRelativeFromV.Page)bCorrect=true;this.Internal_Position.Correct_Values(false,Layout.PageLimits,this.AllowOverlap,this.Use_TextWrap(),[],bCorrect);if(true===bChangeX){this.X=this.Internal_Position.CalcX;var ValueX=this.Internal_Position.Calculate_X_Value(this.PositionH.RelativeFrom);this.Set_PositionH(this.PositionH.RelativeFrom,false,ValueX,false);this.X=this.Internal_Position.Calculate_X(false,this.PositionH.RelativeFrom,this.PositionH.Align,this.PositionH.Value,this.PositionH.Percent)}if(true===
bChangeY){this.Y=this.Internal_Position.CalcY;var ValueY=this.Internal_Position.Calculate_Y_Value(this.PositionV.RelativeFrom);this.Set_PositionV(this.PositionV.RelativeFrom,false,ValueY,false);this.Y=this.Internal_Position.Calculate_Y(false,this.PositionV.RelativeFrom,this.PositionV.Align,this.PositionV.Value,this.PositionV.Percent)}};ParaDrawing.prototype.Get_DrawingType=function(){return this.DrawingType};ParaDrawing.prototype.Is_Inline=function(){if(this.Parent&&this.Parent.Get_ParentTextTransform&&
this.Parent.Get_ParentTextTransform())return true;return drawing_Inline===this.DrawingType?true:false};ParaDrawing.prototype.IsInline=function(){return this.Is_Inline()};ParaDrawing.prototype.Use_TextWrap=function(){if(!this.Parent||!this.Parent.Get_FramePr||null!==this.Parent.Get_FramePr()&&undefined!==this.Parent.Get_FramePr())return false;return drawing_Anchor===this.DrawingType&&!(this.wrappingType===WRAPPING_TYPE_NONE)};ParaDrawing.prototype.IsUseTextWrap=function(){return this.Use_TextWrap()};
ParaDrawing.prototype.Draw_Selection=function(){var Padding=this.DrawingDocument.GetMMPerDot(6);var extX,extY;if(this.GraphicObj){extX=this.GraphicObj.extX;extY=this.GraphicObj.extY}else{extX=this.getXfrmExtX();extY=this.getXfrmExtY()}var rot=this.getXfrmRot();if(AscFormat.checkNormalRotate(rot))this.DrawingDocument.AddPageSelection(this.PageNum,this.X-this.EffectExtent.L-Padding,this.Y-this.EffectExtent.T-Padding,this.EffectExtent.L+extX+this.EffectExtent.R+2*Padding,this.EffectExtent.T+extY+this.EffectExtent.B+
2*Padding);else this.DrawingDocument.AddPageSelection(this.PageNum,this.X+extX/2-extY/2-this.EffectExtent.L-Padding,this.Y+extY/2-extX/2-this.EffectExtent.T-Padding,this.EffectExtent.L+extY+this.EffectExtent.R+2*Padding,this.EffectExtent.T+extX+this.EffectExtent.B+2*Padding)};ParaDrawing.prototype.CanInsertToPos=function(oAnchorPos){if(!oAnchorPos||!oAnchorPos.Paragraph||!oAnchorPos.Paragraph.Parent)return false;return!((this.IsShape()||this.IsGroup())&&(true===oAnchorPos.Paragraph.Parent.Is_DrawingShape()||
true===oAnchorPos.Paragraph.Parent.IsFootnote()))};ParaDrawing.prototype.OnEnd_MoveInline=function(NearPos){if(!this.Parent)return;NearPos.Paragraph.Check_NearestPos(NearPos);var oRun=this.GetRun();var oPictureCC=false;if(oRun){var arrContentControls=oRun.GetParentContentControls();for(var nIndex=arrContentControls.length-1;nIndex>=0;--nIndex)if(arrContentControls[nIndex].IsPicture()){oPictureCC=arrContentControls[nIndex];break}}var oDstRun=null;var arrClasses=NearPos.Paragraph.GetClassesByPos(NearPos.ContentPos);
for(var nIndex=arrClasses.length-1;nIndex>=0;--nIndex)if(arrClasses[nIndex]instanceof ParaRun){oDstRun=arrClasses[nIndex];break}if(!oDstRun||oPictureCC&&oDstRun===oRun||oDstRun.GetParentForm()){NearPos.Paragraph.Clear_NearestPosArray();return}var NewParaDrawing=this.Copy();var RunPr=this.Remove_FromDocument(false);this.DocumentContent.Select_DrawingObject(NewParaDrawing.GetId());NewParaDrawing.Add_ToDocument(NearPos,true,RunPr,undefined,oPictureCC)};ParaDrawing.prototype.Get_ParentTextTransform=function(){if(this.Parent)return this.Parent.Get_ParentTextTransform();
return null};ParaDrawing.prototype.GoTo_Text=function(bBefore,bUpdateStates){var Paragraph=this.Get_ParentParagraph();if(Paragraph){Paragraph.MoveCursorToDrawing(this.Id,bBefore);Paragraph.Document_SetThisElementCurrent(undefined===bUpdateStates?true:bUpdateStates)}};ParaDrawing.prototype.Remove_FromDocument=function(bRecalculate){var oResult=null;if(!this.Parent)return oResult;var oRun=this.Parent.Get_DrawingObjectRun(this.Id);if(oRun){var oGrObject=this.GraphicObj;if(oGrObject&&oGrObject.getObjectType()===
AscDFH.historyitem_type_Shape)if(oGrObject.signatureLine)oGrObject.setSignature(oGrObject.signatureLine);var oPictureCC=null;var arrContentControls=oRun.GetParentContentControls();for(var nIndex=arrContentControls.length-1;nIndex>=0;--nIndex)if(arrContentControls[nIndex].IsPicture()){oPictureCC=arrContentControls[nIndex];break}if(oPictureCC)oPictureCC.RemoveContentControlWrapper();oRun.Remove_DrawingObject(this.Id);if(oRun.IsInHyperlink())oResult=new CTextPr;else oResult=oRun.GetTextPr();if(oGrObject&&
oGrObject.getObjectType()===AscDFH.historyitem_type_Shape)if(oGrObject.signatureLine){editor.sendEvent("asc_onRemoveSignature",oGrObject.signatureLine.id);oGrObject.setSignature(oGrObject.signatureLine)}}if(false!=bRecalculate)editor.WordControl.m_oLogicDocument.Recalculate();return oResult};ParaDrawing.prototype.Get_ParentParagraph=function(){if(this.Parent instanceof Paragraph)return this.Parent;if(this.Parent instanceof ParaRun)return this.Parent.Paragraph;if(this.Parent&&this.Parent.GetParagraph())return this.Parent.GetParagraph();
return null};ParaDrawing.prototype.SelectAsText=function(){var oParagraph=this.GetParagraph();var oRun=this.GetRun();if(!oParagraph||!oRun)return;var oDocument=oParagraph.GetLogicDocument();if(!oDocument)return;oDocument.RemoveSelection();oRun.Make_ThisElementCurrent(false);oRun.SetCursorPosition(oRun.GetElementPosition(this));var oStartPos=oDocument.GetContentPosition(false);oRun.SetCursorPosition(oRun.GetElementPosition(this)+1);var oEndPos=oDocument.GetContentPosition(false);oDocument.RemoveSelection();
oDocument.SetSelectionByContentPositions(oStartPos,oEndPos)};ParaDrawing.prototype.Add_ToDocument=function(NearPos,bRecalculate,RunPr,Run,oPictureCC){NearPos.Paragraph.Check_NearestPos(NearPos);var LogicDocument=this.DrawingDocument.m_oLogicDocument;var Para=new Paragraph(this.DrawingDocument,LogicDocument);var DrawingRun=new ParaRun(Para);DrawingRun.Add_ToContent(0,this);if(RunPr)DrawingRun.Set_Pr(RunPr.Copy());if(Run)DrawingRun.SetReviewTypeWithInfo(Run.GetReviewType(),Run.GetReviewInfo());if(oPictureCC){var oSdt=
new CInlineLevelSdt;oSdt.SetPicturePr(true);oSdt.ReplacePlaceHolderWithContent();oSdt.AddToContent(0,DrawingRun);Para.Add_ToContent(0,oSdt);var oFormPr=oPictureCC.GetFormPr();if(oFormPr)oSdt.SetFormPr(oFormPr.Copy())}else Para.Add_ToContent(0,DrawingRun);var SelectedElement=new CSelectedElement(Para,false);var SelectedContent=new CSelectedContent;SelectedContent.Add(SelectedElement);SelectedContent.SetMoveDrawing(true);SelectedContent.DrawingObjects.push(this);NearPos.Paragraph.Parent.InsertContent(SelectedContent,
NearPos);NearPos.Paragraph.Clear_NearestPosArray();NearPos.Paragraph.Correct_Content();this.Set_Parent(NearPos.Paragraph);if(false!=bRecalculate)LogicDocument.Recalculate()};ParaDrawing.prototype.Add_ToDocument2=function(Paragraph){var DrawingRun=new ParaRun(Paragraph);DrawingRun.Add_ToContent(0,this);Paragraph.Add_ToContent(0,DrawingRun);this.Set_Parent(Paragraph)};ParaDrawing.prototype.UpdateCursorType=function(X,Y,PageIndex){this.DrawingDocument.SetCursorType("move",new AscCommon.CMouseMoveData);
if(null!=this.Parent){var Lock=this.Parent.Lock;if(true===Lock.Is_Locked()){var PNum=Math.max(0,Math.min(PageIndex-this.Parent.PageNum,this.Parent.Pages.length-1));var _X=this.Parent.Pages[PNum].X;var _Y=this.Parent.Pages[PNum].Y;var MMData=new AscCommon.CMouseMoveData;var Coords=this.DrawingDocument.ConvertCoordsToCursorWR(_X,_Y,this.Parent.Get_StartPage_Absolute()+(PageIndex-this.Parent.PageNum));MMData.X_abs=Coords.X-5;MMData.Y_abs=Coords.Y;MMData.Type=Asc.c_oAscMouseMoveDataTypes.LockedObject;
MMData.UserId=Lock.Get_UserId();MMData.HaveChanges=Lock.Have_Changes();MMData.LockedObjectType=c_oAscMouseMoveLockedObjectType.Common;editor.sync_MouseMoveCallback(MMData)}}};ParaDrawing.prototype.Get_AnchorPos=function(){if(!this.Parent)return null;return this.Parent.Get_AnchorPos(this)};ParaDrawing.prototype.CheckRecalcAutoFit=function(oSectPr){if(this.GraphicObj&&this.GraphicObj.CheckNeedRecalcAutoFit)if(this.GraphicObj.CheckNeedRecalcAutoFit(oSectPr)){if(this.GraphicObj)this.GraphicObj.recalcWrapPolygon&&
this.GraphicObj.recalcWrapPolygon();this.Measure()}};ParaDrawing.prototype.Get_ParentObject_or_DocumentPos=function(){if(this.Parent!=null)return this.Parent.Get_ParentObject_or_DocumentPos()};ParaDrawing.prototype.Refresh_RecalcData=function(Data){var oRun=this.GetRun();if(oRun){if(AscCommon.isRealObject(Data))switch(Data.Type){case AscDFH.historyitem_Drawing_Distance:{if(this.GraphicObj){this.GraphicObj.recalcWrapPolygon&&this.GraphicObj.recalcWrapPolygon();this.GraphicObj.addToRecalculate()}break}case AscDFH.historyitem_Drawing_SetExtent:{oRun.RecalcInfo.Measure=
true;break}case AscDFH.historyitem_Drawing_SetSizeRelH:case AscDFH.historyitem_Drawing_SetSizeRelV:case AscDFH.historyitem_Drawing_SetGraphicObject:{if(this.GraphicObj){this.GraphicObj.handleUpdateExtents&&this.GraphicObj.handleUpdateExtents();this.GraphicObj.addToRecalculate()}oRun.RecalcInfo.Measure=true;break}case AscDFH.historyitem_Drawing_WrappingType:{if(this.GraphicObj){this.GraphicObj.recalcWrapPolygon&&this.GraphicObj.recalcWrapPolygon();this.GraphicObj.addToRecalculate()}break}}return oRun.Refresh_RecalcData2()}};
ParaDrawing.prototype.Refresh_RecalcData2=function(Data){var oRun=this.GetRun();if(oRun)return oRun.Refresh_RecalcData2()};ParaDrawing.prototype.hyperlinkCheck=function(bCheck){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkCheck==="function")return this.GraphicObj.hyperlinkCheck(bCheck);return null};ParaDrawing.prototype.hyperlinkCanAdd=function(bCheckInHyperlink){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkCanAdd==="function")return this.GraphicObj.hyperlinkCanAdd(bCheckInHyperlink);
return false};ParaDrawing.prototype.hyperlinkRemove=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkCanAdd==="function")return this.GraphicObj.hyperlinkRemove();return false};ParaDrawing.prototype.hyperlinkModify=function(HyperProps){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hyperlinkModify==="function")return this.GraphicObj.hyperlinkModify(HyperProps)};ParaDrawing.prototype.hyperlinkAdd=function(HyperProps){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.hyperlinkAdd==="function")return this.GraphicObj.hyperlinkAdd(HyperProps)};ParaDrawing.prototype.documentStatistics=function(stat){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.documentStatistics==="function")this.GraphicObj.documentStatistics(stat)};ParaDrawing.prototype.documentCreateFontCharMap=function(fontMap){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.documentCreateFontCharMap==="function")this.GraphicObj.documentCreateFontCharMap(fontMap)};
ParaDrawing.prototype.documentCreateFontMap=function(fontMap){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.documentCreateFontMap==="function")this.GraphicObj.documentCreateFontMap(fontMap)};ParaDrawing.prototype.tableCheckSplit=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableCheckSplit==="function")return this.GraphicObj.tableCheckSplit();return false};ParaDrawing.prototype.tableCheckMerge=function(){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.tableCheckMerge==="function")return this.GraphicObj.tableCheckMerge();return false};ParaDrawing.prototype.tableSelect=function(Type){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableSelect==="function")return this.GraphicObj.tableSelect(Type)};ParaDrawing.prototype.tableRemoveTable=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableRemoveTable==="function")return this.GraphicObj.tableRemoveTable()};ParaDrawing.prototype.tableSplitCell=
function(Cols,Rows){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableSplitCell==="function")return this.GraphicObj.tableSplitCell(Cols,Rows)};ParaDrawing.prototype.tableMergeCells=function(Cols,Rows){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableMergeCells==="function")return this.GraphicObj.tableMergeCells(Cols,Rows)};ParaDrawing.prototype.tableRemoveCol=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableRemoveCol===
"function")return this.GraphicObj.tableRemoveCol()};ParaDrawing.prototype.tableAddCol=function(bBefore,nCount){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableAddCol==="function")return this.GraphicObj.tableAddCol(bBefore,nCount)};ParaDrawing.prototype.tableRemoveRow=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.tableRemoveRow==="function")return this.GraphicObj.tableRemoveRow()};ParaDrawing.prototype.tableAddRow=function(bBefore,nCount){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.tableAddRow==="function")return this.GraphicObj.tableAddRow(bBefore,nCount)};ParaDrawing.prototype.getCurrentParagraph=function(bIgnoreSelection,arrSelectedParagraphs){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getCurrentParagraph==="function")return this.GraphicObj.getCurrentParagraph(bIgnoreSelection,arrSelectedParagraphs);if(this.Parent instanceof Paragraph)return this.Parent};ParaDrawing.prototype.GetSelectedText=function(bClearText,oPr){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.GetSelectedText==="function")return this.GraphicObj.GetSelectedText(bClearText,oPr);return""};ParaDrawing.prototype.getCurPosXY=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getCurPosXY==="function")return this.GraphicObj.getCurPosXY();return{X:0,Y:0}};ParaDrawing.prototype.setParagraphKeepLines=function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphKeepLines==="function")return this.GraphicObj.setParagraphKeepLines(Value)};
ParaDrawing.prototype.setParagraphKeepNext=function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphKeepNext==="function")return this.GraphicObj.setParagraphKeepNext(Value)};ParaDrawing.prototype.setParagraphWidowControl=function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.setParagraphWidowControl==="function")return this.GraphicObj.setParagraphWidowControl(Value)};ParaDrawing.prototype.setParagraphPageBreakBefore=function(Value){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.setParagraphPageBreakBefore==="function")return this.GraphicObj.setParagraphPageBreakBefore(Value)};ParaDrawing.prototype.isTextSelectionUse=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.isTextSelectionUse==="function")return this.GraphicObj.isTextSelectionUse();return false};ParaDrawing.prototype.paragraphFormatPaste=function(CopyTextPr,CopyParaPr,Bool){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.isTextSelectionUse==="function")return this.GraphicObj.paragraphFormatPaste(CopyTextPr,
CopyParaPr,Bool)};ParaDrawing.prototype.getNearestPos=function(x,y,pageIndex){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getNearestPos==="function")return this.GraphicObj.getNearestPos(x,y,pageIndex);return null};ParaDrawing.prototype.Write_ToBinary=function(Writer){Writer.WriteLong(this.Type);Writer.WriteString2(this.Id)};ParaDrawing.prototype.Write_ToBinary2=function(Writer){Writer.WriteLong(AscDFH.historyitem_type_Drawing);Writer.WriteString2(this.Id);AscFormat.writeDouble(Writer,
this.Extent.W);AscFormat.writeDouble(Writer,this.Extent.H);AscFormat.writeObject(Writer,this.GraphicObj);AscFormat.writeObject(Writer,this.DocumentContent);AscFormat.writeObject(Writer,this.Parent);AscFormat.writeObject(Writer,this.wrappingPolygon);AscFormat.writeLong(Writer,this.RelativeHeight);AscFormat.writeObject(Writer,this.docPr)};ParaDrawing.prototype.Read_FromBinary2=function(Reader){this.Id=Reader.GetString2();this.DrawingDocument=editor.WordControl.m_oLogicDocument.DrawingDocument;this.LogicDocument=
this.DrawingDocument?this.DrawingDocument.m_oLogicDocument:null;this.Extent.W=AscFormat.readDouble(Reader);this.Extent.H=AscFormat.readDouble(Reader);this.GraphicObj=AscFormat.readObject(Reader);this.DocumentContent=AscFormat.readObject(Reader);this.Parent=AscFormat.readObject(Reader);this.wrappingPolygon=AscFormat.readObject(Reader);this.RelativeHeight=AscFormat.readLong(Reader);this.docPr=AscFormat.readObject(Reader);if(this.wrappingPolygon)this.wrappingPolygon.wordGraphicObject=this;this.drawingDocument=
editor.WordControl.m_oLogicDocument.DrawingDocument;this.document=editor.WordControl.m_oLogicDocument;this.graphicObjects=editor.WordControl.m_oLogicDocument.DrawingObjects;this.graphicObjects.addGraphicObject(this);g_oTableId.Add(this,this.Id)};ParaDrawing.prototype.Load_LinkData=function(){};ParaDrawing.prototype.draw=function(graphics,PDSE){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.draw==="function"){graphics.SaveGrState();var bInline=this.Is_Inline();if(bInline&&AscCommon.isRealObject(PDSE)&&
AscFormat.isRealNumber(this.LineTop)&&AscFormat.isRealNumber(this.LineBottom)&&AscCommon.isRealObject(this.GraphicObj.bounds)){var x,y,w,h;var oEffectExtent=this.EffectExtent;x=PDSE.X;y=this.LineTop;w=this.GraphicObj.bounds.r-this.GraphicObj.bounds.l+AscFormat.getValOrDefault(oEffectExtent.R,0)+AscFormat.getValOrDefault(oEffectExtent.L,0);h=this.LineBottom-this.LineTop;graphics.AddClipRect(x,y,w,h)}this.GraphicObj.draw(graphics);graphics.RestoreGrState()}};ParaDrawing.prototype.drawAdjustments=function(){if(AscCommon.isRealObject(this.GraphicObj)&&
typeof this.GraphicObj.drawAdjustments==="function")this.GraphicObj.drawAdjustments()};ParaDrawing.prototype.getTransformMatrix=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getTransformMatrix==="function")return this.GraphicObj.getTransformMatrix();return null};ParaDrawing.prototype.getExtensions=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getExtensions==="function")return this.GraphicObj.getExtensions();return null};ParaDrawing.prototype.isGroup=
function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.isGroup==="function")return this.GraphicObj.isGroup();return false};ParaDrawing.prototype.isShapeChild=function(bRetShape){if(!this.Is_Inline()||!this.DocumentContent)return bRetShape?null:false;var cur_doc_content=this.DocumentContent;var oCell;while(oCell=cur_doc_content.IsTableCellContent(true))cur_doc_content=oCell.Row.Table.Parent;if(AscCommon.isRealObject(cur_doc_content.Parent)&&typeof cur_doc_content.Parent.getObjectType===
"function"&&cur_doc_content.Parent.getObjectType()===AscDFH.historyitem_type_Shape)return bRetShape?cur_doc_content.Parent:true;return bRetShape?null:false};ParaDrawing.prototype.checkShapeChildAndGetTopParagraph=function(paragraph){var parent_paragraph=!paragraph?this.Get_ParentParagraph():paragraph;var parent_doc_content=parent_paragraph.Parent;if(parent_doc_content.Parent instanceof AscFormat.CShape)if(!parent_doc_content.Parent.group)return parent_doc_content.Parent.parent.Get_ParentParagraph();
else{var top_group=parent_doc_content.Parent.group;while(top_group.group)top_group=top_group.group;return top_group.parent.Get_ParentParagraph()}else if(parent_doc_content.IsTableCellContent()){var top_doc_content=parent_doc_content;var oCell;while(oCell=top_doc_content.IsTableCellContent(true))top_doc_content=oCell.Row.Table.Parent;if(top_doc_content.Parent instanceof AscFormat.CShape)if(!top_doc_content.Parent.group)return top_doc_content.Parent.parent.Get_ParentParagraph();else{var top_group=top_doc_content.Parent.group;
while(top_group.group)top_group=top_group.group;return top_group.parent.Get_ParentParagraph()}else return parent_paragraph}return parent_paragraph};ParaDrawing.prototype.hit=function(x,y){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hit==="function")return this.GraphicObj.hit(x,y);return false};ParaDrawing.prototype.hitToTextRect=function(x,y){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.hitToTextRect==="function")return this.GraphicObj.hitToTextRect(x,
y);return false};ParaDrawing.prototype.cursorGetPos=function(){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.cursorGetPos==="function")return this.GraphicObj.cursorGetPos();return{X:0,Y:0}};ParaDrawing.prototype.getResizeCoefficients=function(handleNum,x,y){if(AscCommon.isRealObject(this.GraphicObj)&&typeof this.GraphicObj.getResizeCoefficients==="function")return this.GraphicObj.getResizeCoefficients(handleNum,x,y);return{kd1:1,kd2:1}};ParaDrawing.prototype.getParagraphParaPr=

@ -807,11 +807,14 @@
isSafari_mobile = !isIE && !isChrome && check(/safari/) && (navigator.maxTouchPoints>0);
path += app + "/";
path += "main"; /* (config.type === "mobile" || isSafari_mobile)
/*
path += (config.type === "mobile" || isSafari_mobile)
? "mobile"
: config.type === "embedded"
? "embed"
: "main"; */
: "main";
*/
path += "main";
var index = "/index.html";
if (config.editorConfig) {

@ -19,6 +19,7 @@ define([
'/common/outer/team.js',
'/common/outer/messenger.js',
'/common/outer/history.js',
'/common/outer/calendar.js',
'/common/outer/network-config.js',
'/customize/application_config.js',
@ -32,7 +33,7 @@ define([
], function (Sortify, UserObject, ProxyManager, Migrate, Hash, Util, Constants, Feedback,
Realtime, Messaging, Pinpad, Cache,
SF, Cursor, OnlyOffice, Mailbox, Profile, Team, Messenger, History,
NetConfig, AppConfig,
Calendar, NetConfig, AppConfig,
Crypto, ChainPad, CpNetflux, Listmap, Netflux, nThen, Saferphore) {
var onReadyEvt = Util.mkEvent(true);
@ -104,6 +105,7 @@ define([
Store.get = function (clientId, data, cb) {
var s = getStore(data.teamId);
if (!s) { return void cb({ error: 'ENOTFOUND' }); }
if (!s.proxy) { return void cb({ error: 'ENODRIVE' }); }
cb(Util.find(s.proxy, data.key));
};
Store.set = function (clientId, data, cb) {
@ -177,6 +179,24 @@ define([
typeof(store.proxy.curvePublic) === 'string';
};
Store.isOwned = function (owners) {
var edPublic = store.proxy.edPublic;
// Not logged in? false
if (!edPublic) { return false; }
// No owners? false
if (!Array.isArray(owners) || !owners.length) { return false; }
if (owners.indexOf(edPublic) !== -1) { return true; }
// No team
var teams = store.proxy.teams;
if (!teams) { return false; }
return Object.keys(teams).some(function (id) {
var ed = Util.find(teams[id], ['keys', 'drive', 'edPublic']);
return ed && owners.indexOf(ed) !== -1;
});
};
var getUserChannelList = function () {
var userChannel = store.driveChannel;
if (!userChannel) { return null; }
@ -211,6 +231,13 @@ define([
list = list.concat(mList);
}
if (store.proxy.calendars) {
var cList = Object.keys(store.proxy.calendars).map(function (c) {
return store.proxy.calendars[c].channel;
});
list = list.concat(cList);
}
list.push(userChannel);
list.sort();
@ -566,18 +593,10 @@ define([
};
// Get or create the user color for the cursor position
var getRandomColor = function () {
var getColor = function () {
return Math.floor(Math.random() * 156) + 70;
};
return '#' + getColor().toString(16) +
getColor().toString(16) +
getColor().toString(16);
};
var getUserColor = function () {
Store.getUserColor = function () {
var color = Util.find(store, ['proxy', 'settings', 'general', 'cursor', 'color']);
if (!color) {
color = getRandomColor();
color = Util.getRandomColor(true);
Store.setAttribute(null, {
attr: ['general', 'cursor', 'color'],
value: color
@ -601,7 +620,7 @@ define([
uid: proxy.uid || store.noDriveUid, // Random uid in nodrive mode
avatar: Util.find(proxy, ['profile', 'avatar']),
profile: Util.find(proxy, ['profile', 'view']),
color: getUserColor(),
color: Store.getUserColor(),
notifications: Util.find(proxy, ['mailboxes', 'notifications', 'channel']),
curvePublic: proxy.curvePublic,
},
@ -626,6 +645,46 @@ define([
cb(JSON.parse(JSON.stringify(metadata)));
};
Store.onMaintenanceUpdate = function (uid) {
// use uid in /api/broadcast so that all connected users will use the same cached
// version on the server
require(['/api/broadcast?'+uid], function (Broadcast) {
if (!Broadcast) { return; }
broadcast([], 'UNIVERSAL_EVENT', {
type: 'broadcast',
data: {
ev: 'MAINTENANCE',
data: Broadcast.maintenance
}
});
setTimeout(function () {
try {
var ctx = require.s.contexts._;
var defined = ctx.defined;
Object.keys(defined).forEach(function (href) {
if (/^\/api\/broadcast\?[a-z0-9]+/.test(href)) {
delete defined[href];
return;
}
});
} catch (e) {}
});
});
};
Store.onSurveyUpdate = function (uid) {
// use uid in /api/broadcast so that all connected users will use the same cached
// version on the server
require(['/api/broadcast?'+uid], function (Broadcast) {
broadcast([], 'UNIVERSAL_EVENT', {
type: 'broadcast',
data: {
ev: 'SURVEY',
data: Broadcast.surveyURL
}
});
});
};
var makePad = function (href, roHref, title) {
var now = +new Date();
return {
@ -820,38 +879,6 @@ define([
});
};
/**
* add a "What is CryptPad?" pad in the drive
* data
* - driveReadme
* - driveReadmeTitle
*/
Store.createReadme = function (clientId, data, cb) {
require(['/common/cryptget.js'], function (Crypt) {
var hash = Hash.createRandomHash('pad');
Crypt.put(hash, data.driveReadme, function (e) {
if (e) {
return void cb({ error: "Error while creating the default pad:"+ e});
}
var href = '/pad/#' + hash;
var channel = Hash.hrefToHexChannelId(href, null);
var fileData = {
href: href,
channel: channel,
title: data.driveReadmeTitle,
owners: [ store.proxy.edPublic ],
readme: true
};
Store.addPad(clientId, fileData, cb);
}, {
metadata: {
owners: [ store.proxy.edPublic ],
},
});
});
};
/**
* Merge the anonymous drive into the user drive at registration
* data
@ -1467,7 +1494,7 @@ define([
}
};
// Teams support offline/cache mode
if (obj.type === "team") { return void todo(); }
if (['team', 'calendar'].indexOf(obj.type) !== -1) { return void todo(); }
// If we're in "noDrive" mode
if (!store.proxy) { return void todo(); }
// Other modules should wait for the ready event
@ -1487,6 +1514,7 @@ define([
broadcast([], "UPDATE_METADATA");
},
pinPads: function (data, cb) { Store.pinPads(null, data, cb); },
unpinPads: function (data, cb) { Store.unpinPads(null, data, cb); },
}, waitFor, function (ev, data, clients) {
clients.forEach(function (cId) {
postMessage(cId, 'UNIVERSAL_EVENT', {
@ -1513,7 +1541,6 @@ define([
execCommand: function (clientId, data, cb) {
// The mailbox can only be used when the store is ready
onReadyEvt.reg(function () {
if (!store.loggedIn) { return void cb(); }
if (!store.mailbox) { return void cb ({error: 'Mailbox is disabled'}); }
store.mailbox.execCommand(clientId, data, cb);
});
@ -1661,6 +1688,9 @@ define([
if (data.versionHash) {
return void getVersionHash(clientId, data);
}
if (!Hash.isValidChannel(data.channel)) {
return void postMessage(clientId, "PAD_ERROR", 'INVALID_CHAN');
}
var isNew = typeof channels[data.channel] === "undefined";
var channel = channels[data.channel] = channels[data.channel] || {
queue: [],
@ -2043,6 +2073,10 @@ define([
if (store.offline || !store.anon_rpc) { return void cb({ error: 'OFFLINE' }); }
if (!data.channel) { return void cb({ error: 'ENOTFOUND'}); }
if (data.channel.length !== 32) { return void cb({ error: 'EINVAL'}); }
if (!Hash.isValidChannel(data.channel)) {
Feedback.send('METADATA_INVALID_CHAN');
return void cb({ error: 'EINVAL' });
}
store.anon_rpc.send('GET_METADATA', data.channel, function (err, obj) {
if (err) { return void cb({error: err}); }
var metadata = (obj && obj[0]) || {};
@ -2537,9 +2571,6 @@ define([
};
var loadMailbox = function (waitFor) {
if (!store.loggedIn || !store.proxy.edPublic) {
return;
}
store.mailbox = Mailbox.init({
Store: Store,
store: store,
@ -2621,6 +2652,8 @@ define([
}, true);
}).nThen(function (waitFor) {
loadUniversal(Team, 'team', waitFor, clientId);
}).nThen(function (waitFor) {
loadUniversal(Calendar, 'calendar', waitFor);
}).nThen(function () {
cb();
});
@ -2682,6 +2715,7 @@ define([
loadUniversal(Messenger, 'messenger', waitFor);
store.messenger = store.modules['messenger'];
loadUniversal(Profile, 'profile', waitFor);
loadUniversal(Calendar, 'calendar', waitFor);
if (store.modules['team']) { store.modules['team'].onReady(waitFor); }
loadUniversal(History, 'history', waitFor);
}).nThen(function () {

@ -0,0 +1,831 @@
define([
'/common/common-util.js',
'/common/common-hash.js',
'/common/common-constants.js',
'/common/common-realtime.js',
'/common/outer/cache-store.js',
'/customize/messages.js',
'/bower_components/nthen/index.js',
'/bower_components/chainpad-listmap/chainpad-listmap.js',
'/bower_components/chainpad-crypto/crypto.js',
'/bower_components/chainpad/chainpad.dist.js',
], function (Util, Hash, Constants, Realtime, Cache, Messages, nThen, Listmap, Crypto, ChainPad) {
var Calendar = {};
/* TODO
* Calendar
{
href,
roHref,
channel, (pinning)
title, (when created from the UI, own calendar has no title)
color
}
* Own drive
{
calendars: {
uid: calendar,
uid: calendar
}
}
* Team drive
{
calendars: {
uid: calendar,
uid: calendar
}
}
* Calendars are listmap
{
content: {},
metadata: {
title: "pewpewpew"
}
}
ctx.calendars[channel] = {
lm: lm,
proxy: lm.proxy?
stores: [teamId, teamId, 1]
}
* calendar app can subscribe to this module
* when a listmap changes, push an update for this calendar to subscribed tabs
* Ability to open a calendar not stored in the stores but from its URL directly
* No "userlist" visible in the UI
* No framework
*/
var getStore = function (ctx, id) {
if (!id || id === 1) {
return ctx.store;
}
var m = ctx.store.modules && ctx.store.modules.team;
if (!m) { return; }
return m.getTeam(id);
};
var makeCalendar = function () {
var hash = Hash.createRandomHash('calendar');
var secret = Hash.getSecrets('calendar', hash);
var roHash = Hash.getViewHashFromKeys(secret);
var href = Hash.hashToHref(hash, 'calendar');
var roHref = Hash.hashToHref(roHash, 'calendar');
return {
href: href,
roHref: roHref,
channel: secret.channel,
};
};
var initializeCalendars = function (ctx, cb) {
var proxy = ctx.store.proxy;
proxy.calendars = proxy.calendars || {};
setTimeout(cb);
};
var sendUpdate = function (ctx, c) {
ctx.emit('UPDATE', {
teams: c.stores,
roTeams: c.roStores,
id: c.channel,
loading: !c.ready && !c.cacheready,
readOnly: c.readOnly || (!c.ready && c.cacheready) || c.offline,
offline: c.offline,
deleted: !c.stores.length,
restricted: c.restricted,
owned: ctx.Store.isOwned(c.owners),
content: Util.clone(c.proxy),
hashes: c.hashes
}, ctx.clients);
};
var closeCalendar = function (ctx, id) {
var ctxCal = ctx.calendars[id];
if (!ctxCal) { return; }
// If the calendar doesn't exist in any other team, stop it and delete it from ctx
if (!ctxCal.stores.length) {
ctxCal.lm.stop();
delete ctx.calendars[id];
}
};
var updateLocalCalendars = function (ctx, c, data) {
// Also update local data
c.stores.forEach(function (id) {
var s = getStore(ctx, id);
if (!s || !s.proxy) { return; }
if (!s.rpc) { return; } // team viewer
if (!s.proxy.calendars) { return; }
var cal = s.proxy.calendars[c.channel];
if (!cal) { return; }
if (cal.color !== data.color) { cal.color = data.color; }
if (cal.title !== data.title) { cal.title = data.title; }
});
};
var openChannel = function (ctx, cfg, _cb) {
var cb = Util.once(Util.mkAsync(_cb || function () {}));
var teamId = cfg.storeId;
var data = cfg.data;
var channel = data.channel;
console.error(cfg);
if (!channel) { return; }
var c = ctx.calendars[channel];
var update = function () {
sendUpdate(ctx, c);
};
if (c) {
if (c.readOnly && data.href) {
// Upgrade readOnly calendar to editable
var upgradeParsed = Hash.parsePadUrl(data.href);
var upgradeSecret = Hash.getSecrets('calendar', upgradeParsed.hash, data.password);
var upgradeCrypto = Crypto.createEncryptor(upgradeSecret.keys);
c.hashes.editHash = Hash.getEditHashFromKeys(upgradeSecret);
c.lm.setReadOnly(false, upgradeCrypto);
c.readOnly = false;
} else if (teamId === 0) {
// Existing calendars can't be "temp calendars" (unless they are an upgrade)
return void cb();
}
// Remove from roStores when upgrading this store
if (c.roStores.indexOf(teamId) !== -1 && data.href) {
c.roStores.splice(c.roStores.indexOf(teamId), 1);
// If we've upgraded a stored calendar, remove the temp calendar
if (c.stores.indexOf(0) !== -1) {
c.stores.splice(c.stores.indexOf(0), 1);
}
update();
}
// Don't store duplicates
if (c.stores && c.stores.indexOf(teamId) !== -1) { return void cb(); }
// If we store a temp calendar to our account or team, remove this "temp calendar"
if (c.stores.indexOf(0) !== -1) { c.stores.splice(c.stores.indexOf(0), 1); }
c.stores.push(teamId);
if (!data.href) {
c.roStores.push(teamId);
}
update();
return void cb();
}
// Multiple teams can have the same calendar. Make sure we remember the list of stores
// that know it so that we don't close the calendar when leaving/deleting a team.
c = ctx.calendars[channel] = {
ready: false,
channel: channel,
readOnly: !data.href,
stores: [teamId],
roStores: data.href ? [] : [teamId],
hashes: {}
};
var parsed = Hash.parsePadUrl(data.href || data.roHref);
var secret = Hash.getSecrets('calendar', parsed.hash, data.password);
var crypto = Crypto.createEncryptor(secret.keys);
c.hashes.viewHash = Hash.getViewHashFromKeys(secret);
if (data.href) {
c.hashes.editHash = Hash.getEditHashFromKeys(secret);
}
c.proxy = {
metadata: {
color: data.color,
title: data.title
}
};
update();
var onDeleted = function () {
// Remove this calendar from all our teams
// XXX Maybe not? don't remove automatically so that we can tell the user to do so.
c.stores.forEach(function (storeId) {
var store = getStore(ctx, storeId);
if (!store || !store.rpc || !store.proxy.calendars) { return; }
delete store.proxy.calendars[channel];
// And unpin
var unpin = store.unpin || ctx.unpinPads;
unpin([channel], function (res) {
if (res && res.error) { console.error(res.error); }
});
});
// Close listmap, update the UI and clear the memory
if (c.lm) { c.lm.stop(); }
c.stores = [];
sendUpdate(ctx, c);
delete ctx.calendars[channel];
};
nThen(function (waitFor) {
if (!ctx.store.network || cfg.isNew) { return; }
// This is supposed to be an existing channel. Make sure it exists on the server
// before trying to load it.
// NOTE: if we can't check (error), we can skip this step. On "ready", we have
// another check to make sure we won't make a new calendar
ctx.Store.isNewChannel(null, channel, waitFor(function (obj) {
if (obj && obj.error) {
// If we can't check, skip this part
return;
}
if (obj && typeof(obj.isNew) === "boolean") {
if (obj.isNew) {
onDeleted();
cb({error: 'EDELETED'});
waitFor.abort();
return;
}
}
}));
}).nThen(function () {
// Set the owners as the first store opening it. We don't know yet if it's a new or
// existing calendar. "owners' will be ignored if the calendar already exists.
var edPublic;
if (teamId === 1 || !teamId) {
edPublic = ctx.store.proxy.edPublic;
} else {
var teams = ctx.store.modules.team && ctx.store.modules.team.getTeamsData();
var team = teams && teams[teamId];
edPublic = team ? team.edPublic : undefined;
}
var config = {
data: {},
network: ctx.store.network || ctx.store.networkPromise,
channel: secret.channel,
crypto: crypto,
owners: [edPublic],
ChainPad: ChainPad,
validateKey: secret.keys.validateKey || undefined,
userName: 'calendar',
Cache: Cache,
classic: true,
onRejected: ctx.Store && ctx.Store.onRejected
};
var lm = Listmap.create(config);
c.lm = lm;
var proxy = c.proxy = lm.proxy;
lm.proxy.on('cacheready', function () {
if (!proxy.metadata) { return; }
c.cacheready = true;
setTimeout(update);
if (cb) { cb(null, lm.proxy); }
}).on('ready', function (info) {
var md = info.metadata;
c.owners = md.owners || [];
c.ready = true;
if (!proxy.metadata) {
if (!cfg.isNew) {
// no metadata on an existing calendar: deleted calendar
return void onDeleted();
}
proxy.metadata = {
color: data.color,
title: data.title
};
}
setTimeout(update);
if (cb) { cb(null, lm.proxy); }
}).on('change', [], function () {
if (!c.ready) { return; }
setTimeout(update);
}).on('change', ['metadata'], function () {
// if title or color have changed, update our local values
var md = proxy.metadata;
if (!md || !md.title || !md.color) { return; }
updateLocalCalendars(ctx, c, md);
}).on('disconnect', function () {
c.offline = true;
setTimeout(update);
}).on('reconnect', function () {
c.offline = false;
setTimeout(update);
}).on('error', function (info) {
if (!info || !info.error) { return; }
if (info.error === "EDELETED" ) {
return void onDeleted();
}
if (info.error === "ERESTRICTED" ) {
c.restricted = true;
}
cb(info);
});
});
};
var decryptTeamCalendarHref = function (store, calData) {
if (!calData.href) { return; }
// Already decrypted? nothing to do
if (calData.href.indexOf('#') !== -1) { return; }
// href exists and is encrypted: decrypt if we can or ignore the href
if (store.secondaryKey) {
try {
calData.href = store.userObject.cryptor.decrypt(calData.href);
} catch (e) {
console.error(e);
delete calData.href;
}
} else {
delete calData.href;
}
};
var initializeStore = function (ctx, store) {
var c = store.proxy.calendars;
var storeId = store.id || 1;
// Add listeners
store.proxy.on('change', ['calendars'], function (o, n, p) {
if (p.length < 2) { return; }
// Handle deletions
if (o && !n) {
(function () {
var id = p[1];
var ctxCal = ctx.calendars[id];
if (!ctxCal) { return; }
var idx = ctxCal.stores.indexOf(storeId);
// Check if the team has loaded this calendar in memory
if (idx === -1) { return; }
// Remove the team from memory
ctxCal.stores.splice(idx, 1);
var roIdx = ctxCal.roStores.indexOf(storeId);
if (roIdx !== -1) { ctxCal.roStores.splice(roIdx, 1); }
// Check if we need to close listmap and update the UI
closeCalendar(ctx, id);
sendUpdate(ctx, ctxCal);
})();
}
// Handle additions
// NOTE: this also upgrade from readOnly to edit (add an "href" to the calendar)
if (!o && n) {
(function () {
var id = p[1];
var _cal = store.proxy.calendars[id];
if (!_cal) { return; }
var cal = Util.clone(_cal);
decryptTeamCalendarHref(store, cal);
openChannel(ctx, {
storeId: storeId,
data: cal
});
})();
}
});
// If this store contains existing calendars, open them
Object.keys(c || {}).forEach(function (channel) {
var cal = Util.clone(c[channel]);
decryptTeamCalendarHref(store, cal);
openChannel(ctx, {
storeId: storeId,
data: cal
});
});
};
var openChannels = function (ctx) {
// Personal drive
initializeStore(ctx, ctx.store);
var teams = ctx.store.modules.team && ctx.store.modules.team.getTeamsData();
if (!teams) { return; }
Object.keys(teams).forEach(function (id) {
var store = getStore(ctx, id);
initializeStore(ctx, store);
});
};
var subscribe = function (ctx, data, cId, cb) {
// Subscribe to new notifications
var idx = ctx.clients.indexOf(cId);
if (idx === -1) {
ctx.clients.push(cId);
}
cb({
empty: !Object.keys(ctx.calendars).length
});
Object.keys(ctx.calendars).forEach(function (channel) {
var c = ctx.calendars[channel] || {};
sendUpdate(ctx, c);
});
};
var openCalendar = function (ctx, data, cId, cb) {
var secret = Hash.getSecrets('calendar', data.hash, data.password);
var hash = Hash.getEditHashFromKeys(secret);
var roHash = Hash.getViewHashFromKeys(secret);
var cal = {
href: hash && Hash.hashToHref(hash, 'calendar'),
roHref: roHash && Hash.hashToHref(roHash, 'calendar'),
channel: secret.channel,
color: Util.getRandomColor(),
title: '...'
};
openChannel(ctx, {
storeId: 0,
data: cal
}, cb);
};
var importCalendar = function (ctx, data, cId, cb) {
var id = data.id;
var c = ctx.calendars[id];
if (!c) { return void cb({error: "ENOENT"}); }
if (!Array.isArray(c.stores) || c.stores.indexOf(data.teamId) === -1) {
return void cb({error: 'EINVAL'});
}
// Add to my calendars
var store = ctx.store;
var calendars = store.proxy.calendars = store.proxy.calendars || {};
var hash = c.hashes.editHash;
var roHash = c.hashes.viewHash;
calendars[id] = {
href: hash && Hash.hashToHref(hash, 'calendar'),
roHref: roHash && Hash.hashToHref(roHash, 'calendar'),
channel: id,
color: Util.find(c,['proxy', 'metadata', 'color']) || Util.getRandomColor(),
title: Util.find(c,['proxy', 'metadata', 'title']) || '...'
};
ctx.Store.onSync(null, cb);
// Make the change in memory
openChannel(ctx, {
storeId: 1,
data: {
href: calendars[id].href,
toHref: calendars[id].roHref,
channel: id
}
});
};
var addCalendar = function (ctx, data, cId, cb) {
var store = getStore(ctx, data.teamId);
if (!store) { return void cb({error: "NO_STORE"}); }
// Check team edit rights: viewers in teams don't have rpc
if (!store.rpc) { return void cb({error: "EFORBIDDEN"}); }
var c = store.proxy.calendars = store.proxy.calendars || {};
var parsed = Hash.parsePadUrl(data.href);
var secret = Hash.getSecrets(parsed.type, parsed.hash, data.password);
if (secret.channel !== data.channel) { return void cb({error: 'EINVAL'}); }
var hash = Hash.getEditHashFromKeys(secret);
var roHash = Hash.getViewHashFromKeys(secret);
var href = hash && Hash.hashToHref(hash, 'calendar');
var cal = {
href: href,
roHref: roHash && Hash.hashToHref(roHash, 'calendar'),
color: data.color,
title: data.title,
channel: data.channel
};
// If it already existed and it's not an upgrade, nothing to do
if (c[data.channel] && (c[data.channel].href || !cal.href)) { return void cb(); }
cal.color = data.color;
cal.title = data.title;
openChannel(ctx, {
storeId: store.id || 1,
data: Util.clone(cal)
}, function (err) {
if (err) {
// Can't open this channel, don't store it
console.error(err);
return void cb({error: err.error});
}
if (href && store.id && store.secondaryKey) {
try {
cal.href = store.userObject.cryptor.encrypt(href);
} catch (e) {
console.error(e);
}
}
// Add the calendar and call back
// If it already existed it means this is an upgrade
c[cal.channel] = cal;
var pin = store.pin || ctx.pinPads;
pin([cal.channel], function (res) {
if (res && res.error) { console.error(res.error); }
});
ctx.Store.onSync(store.id, cb);
});
};
var createCalendar = function (ctx, data, cId, cb) {
var store = getStore(ctx, data.teamId);
if (!store) { return void cb({error: "NO_STORE"}); }
// Check team edit rights: viewers in teams don't have rpc
if (!store.rpc) { return void cb({error: "EFORBIDDEN"}); }
var c = store.proxy.calendars = store.proxy.calendars || {};
var cal = makeCalendar();
cal.color = data.color;
cal.title = data.title;
openChannel(ctx, {
storeId: store.id || 1,
data: cal,
isNew: true
}, function (err) {
if (err) {
// Can't open this channel, don't store it
console.error(err);
return void cb({error: err.error});
}
// Add the calendar and call back
// Wait for the metadata to be stored (channel fully ready) before adding it
// to our store
var ctxCal = ctx.calendars[cal.channel];
Realtime.whenRealtimeSyncs(ctxCal.lm.realtime, function () {
c[cal.channel] = cal;
var pin = store.pin || ctx.pinPads;
pin([cal.channel], function (res) {
if (res && res.error) { console.error(res.error); }
});
ctx.Store.onSync(store.id, cb);
});
});
};
var updateCalendar = function (ctx, data, cId, cb) {
var id = data.id;
var c = ctx.calendars[id];
if (!c) { return void cb({error: "ENOENT"}); }
var md = Util.find(c, ['proxy', 'metadata']);
if (!md) { return void cb({error: 'EINVAL'}); }
md.title = data.title;
md.color = data.color;
Realtime.whenRealtimeSyncs(c.lm.realtime, cb);
sendUpdate(ctx, c);
updateLocalCalendars(ctx, c, data);
};
var deleteCalendar = function (ctx, data, cId, cb) {
var store = getStore(ctx, data.teamId);
if (!store) { return void cb({error: "NO_STORE"}); }
if (!store.rpc) { return void cb({error: "EFORBIDDEN"}); }
if (!store.proxy.calendars) { return; }
var id = data.id;
var cal = store.proxy.calendars[id];
if (!cal) { return void cb(); } // Already deleted
// Delete
delete store.proxy.calendars[id];
// Unpin
var unpin = store.unpin || ctx.unpinPads;
unpin([id], function (res) {
if (res && res.error) { console.error(res.error); }
});
// Clear/update ctx data
// Remove this store from the calendar's clients
var ctxCal = ctx.calendars[id];
var idx = ctxCal.stores.indexOf(store.id || 1);
ctxCal.stores.splice(idx, 1);
closeCalendar(ctx, id);
ctx.Store.onSync(store.id, function () {
sendUpdate(ctx, ctxCal);
cb();
});
};
var createEvent = function (ctx, data, cId, cb) {
var id = data.calendarId;
var c = ctx.calendars[id];
if (!c) { return void cb({error: "ENOENT"}); }
var startDate = new Date(data.start);
var endDate = new Date(data.end);
if (data.isAllDay) {
data.startDay = startDate.getFullYear() + '-' + (startDate.getMonth()+1) + '-' + startDate.getDate();
data.endDay = endDate.getFullYear() + '-' + (endDate.getMonth()+1) + '-' + endDate.getDate();
} else {
delete data.startDay;
delete data.endDay;
}
c.proxy.content = c.proxy.content || {};
c.proxy.content[data.id] = data;
Realtime.whenRealtimeSyncs(c.lm.realtime, function () {
sendUpdate(ctx, c);
cb();
});
};
var updateEvent = function (ctx, data, cId, cb) {
if (!data || !data.ev) { return void cb({error: 'EINVAL'}); }
var id = data.ev.calendarId;
var c = ctx.calendars[id];
if (!c || !c.proxy || !c.proxy.content) { return void cb({error: "ENOENT"}); }
// Find the event
var ev = c.proxy.content[data.ev.id];
if (!ev) { return void cb({error: "EINVAL"}); }
// update the event
var changes = data.changes || {};
var newC;
if (changes.calendarId) {
newC = ctx.calendars[changes.calendarId];
if (!newC || !newC.proxy) { return void cb({error: "ENOENT"}); }
newC.proxy.content = newC.proxy.content || {};
}
Object.keys(changes).forEach(function (key) {
ev[key] = changes[key];
});
var startDate = new Date(ev.start);
var endDate = new Date(ev.end);
if (ev.isAllDay) {
ev.startDay = startDate.getFullYear() + '-' + (startDate.getMonth()+1) + '-' + startDate.getDate();
ev.endDay = endDate.getFullYear() + '-' + (endDate.getMonth()+1) + '-' + endDate.getDate();
} else {
delete ev.startDay;
delete ev.endDay;
}
// Move to a different calendar?
if (changes.calendarId && newC) {
newC.proxy.content[data.ev.id] = Util.clone(ev);
delete c.proxy.content[data.ev.id];
}
nThen(function (waitFor) {
Realtime.whenRealtimeSyncs(c.lm.realtime, waitFor());
if (newC) { Realtime.whenRealtimeSyncs(newC.lm.realtime, waitFor()); }
}).nThen(function () {
sendUpdate(ctx, c);
if (newC) { sendUpdate(ctx, newC); }
cb();
});
};
var deleteEvent = function (ctx, data, cId, cb) {
var id = data.calendarId;
var c = ctx.calendars[id];
if (!c) { return void cb({error: "ENOENT"}); }
c.proxy.content = c.proxy.content || {};
delete c.proxy.content[data.id];
Realtime.whenRealtimeSyncs(c.lm.realtime, function () {
sendUpdate(ctx, c);
cb();
});
};
var removeClient = function (ctx, cId) {
var idx = ctx.clients.indexOf(cId);
ctx.clients.splice(idx, 1);
};
Calendar.init = function (cfg, waitFor, emit) {
var calendar = {};
var store = cfg.store;
if (!store.loggedIn || !store.proxy.edPublic) { return; } // XXX logged in only?
var ctx = {
store: store,
Store: cfg.Store,
pinPads: cfg.pinPads,
unpinPads: cfg.unpinPads,
updateMetadata: cfg.updateMetadata,
emit: emit,
onReady: Util.mkEvent(true),
calendars: {},
clients: [],
};
initializeCalendars(ctx, waitFor(function (err) {
if (err) { return; }
openChannels(ctx);
}));
calendar.closeTeam = function (teamId) {
Object.keys(ctx.calendars).forEach(function (id) {
var ctxCal = ctx.calendars[id];
var idx = ctxCal.stores.indexOf(teamId);
if (idx === -1) { return; }
ctxCal.stores.splice(idx, 1);
var roIdx = ctxCal.roStores.indexOf(teamId);
if (roIdx !== -1) { ctxCal.roStores.splice(roIdx, 1); }
closeCalendar(ctx, id);
sendUpdate(ctx, ctxCal);
});
};
calendar.openTeam = function (teamId) {
var store = getStore(ctx, teamId);
if (!store) { return; }
initializeStore(ctx, store);
};
calendar.upgradeTeam = function (teamId) {
if (!teamId) { return; }
var store = getStore(ctx, teamId);
if (!store) { return; }
Object.keys(ctx.calendars).forEach(function (id) {
var ctxCal = ctx.calendars[id];
var idx = ctxCal.stores.indexOf(teamId);
if (idx === -1) { return; }
var _cal = store.proxy.calendars[id];
var cal = Util.clone(_cal);
decryptTeamCalendarHref(store, cal);
openChannel(ctx, {
storeId: teamId,
data: cal
});
sendUpdate(ctx, ctxCal);
});
};
calendar.removeClient = function (clientId) {
removeClient(ctx, clientId);
};
calendar.execCommand = function (clientId, obj, cb) {
var cmd = obj.cmd;
var data = obj.data;
if (cmd === 'SUBSCRIBE') {
return void subscribe(ctx, data, clientId, cb);
}
if (cmd === 'OPEN') {
ctx.Store.onReadyEvt.reg(function () {
openCalendar(ctx, data, clientId, cb);
});
return;
}
if (cmd === 'IMPORT') {
if (ctx.store.offline) { return void cb({error: 'OFFLINE'}); }
return void importCalendar(ctx, data, clientId, cb);
}
if (cmd === 'ADD') {
if (ctx.store.offline) { return void cb({error: 'OFFLINE'}); }
return void addCalendar(ctx, data, clientId, cb);
}
if (cmd === 'CREATE') {
if (data.initialCalendar) {
return void ctx.Store.onReadyEvt.reg(function () {
createCalendar(ctx, data, clientId, cb);
});
}
if (ctx.store.offline) { return void cb({error: 'OFFLINE'}); }
return void createCalendar(ctx, data, clientId, cb);
}
if (cmd === 'UPDATE') {
if (ctx.store.offline) { return void cb({error: 'OFFLINE'}); }
return void updateCalendar(ctx, data, clientId, cb);
}
if (cmd === 'DELETE') {
if (ctx.store.offline) { return void cb({error: 'OFFLINE'}); }
return void deleteCalendar(ctx, data, clientId, cb);
}
if (cmd === 'CREATE_EVENT') {
if (ctx.store.offline) { return void cb({error: 'OFFLINE'}); }
return void createEvent(ctx, data, clientId, cb);
}
if (cmd === 'UPDATE_EVENT') {
if (ctx.store.offline) { return void cb({error: 'OFFLINE'}); }
return void updateEvent(ctx, data, clientId, cb);
}
if (cmd === 'DELETE_EVENT') {
if (ctx.store.offline) { return void cb({error: 'OFFLINE'}); }
return void deleteEvent(ctx, data, clientId, cb);
}
};
return calendar;
};
return Calendar;
});

@ -686,6 +686,54 @@ define([
};
// Broadcast
handlers['BROADCAST_MAINTENANCE'] = function (ctx, box, data, cb) {
var msg = data.msg;
var uid = msg.uid;
ctx.Store.onMaintenanceUpdate(uid);
cb(true);
};
var activeSurvey;
handlers['BROADCAST_SURVEY'] = function (ctx, box, data, cb) {
var msg = data.msg;
var content = msg.content;
var uid = msg.uid;
var old = activeSurvey;
activeSurvey = {
type: box.type,
hash: data.hash
};
ctx.Store.onSurveyUpdate(uid);
var dismiss = !content.url;
cb(dismiss, old);
};
var activeCustom;
handlers['BROADCAST_CUSTOM'] = function (ctx, box, data, cb) {
var msg = data.msg;
var uid = msg.uid;
var old = activeCustom;
activeCustom = {
uid: uid,
type: box.type,
hash: data.hash
};
cb(false, old);
};
handlers['BROADCAST_DELETE'] = function (ctx, box, data, cb) {
var msg = data.msg;
var content = msg.content;
var uid = content.uid; // uid of the message to delete
if (activeCustom && activeCustom.uid === uid) {
// We have the message in memory, remove it and don't keep the DELETE msg
cb(true, activeCustom);
activeCustom = undefined;
return;
}
// We don't have this message in memory, nothing to delete
cb(true);
};
return {
add: function (ctx, box, data, cb) {
/**

@ -1,4 +1,6 @@
define([
'/api/config',
'/api/broadcast',
'/common/common-util.js',
'/common/common-hash.js',
'/common/common-realtime.js',
@ -7,19 +9,22 @@ define([
'/common/outer/mailbox-handlers.js',
'/bower_components/chainpad-netflux/chainpad-netflux.js',
'/bower_components/chainpad-crypto/crypto.js',
], function (Util, Hash, Realtime, Messaging, Notify, Handlers, CpNetflux, Crypto) {
], function (Config, BCast, Util, Hash, Realtime, Messaging, Notify, Handlers, CpNetflux, Crypto) {
var Mailbox = {};
var TYPES = [
'notifications',
'supportadmin',
'support'
'support',
'broadcast'
];
var BLOCKING_TYPES = [
];
var BROADCAST_CHAN = '000000000000000000000000000000000'; // Admin channel, 33 characters
var initializeMailboxes = function (ctx, mailboxes) {
if (!mailboxes['notifications']) {
if (!mailboxes['notifications'] && ctx.loggedIn) {
mailboxes.notifications = {
channel: Hash.createChannelId(),
lastKnownHash: '',
@ -29,7 +34,7 @@ define([
if (res.error) { console.error(res); }
});
}
if (!mailboxes['support']) {
if (!mailboxes['support'] && ctx.loggedIn) {
mailboxes.support = {
channel: Hash.createChannelId(),
lastKnownHash: '',
@ -39,6 +44,15 @@ define([
if (res.error) { console.error(res); }
});
}
if (!mailboxes['broadcast']) {
mailboxes.broadcast = {
channel: BROADCAST_CHAN,
lastKnownHash: BCast.lastBroadcastHash,
decrypted: true,
viewed: []
};
}
};
/*
@ -80,33 +94,49 @@ proxy.mailboxes = {
// Send a message to someone else
var sendTo = Mailbox.sendTo = function (ctx, type, msg, user, _cb) {
user = user || {};
var cb = _cb || function (obj) {
if (obj && obj.error) {
console.error(obj.error);
}
};
if (!Crypto.Mailbox) {
return void cb({error: "chainpad-crypto is outdated and doesn't support mailboxes."});
}
var keys = getMyKeys(ctx);
if (!keys) { return void cb({error: "missing asymmetric encryption keys"}); }
if (!user || !user.channel || !user.curvePublic) { return void cb({error: "no notification channel"}); }
var anonRpc = Util.find(ctx, [ 'store', 'anon_rpc', ]);
if (!anonRpc) { return void cb({error: "anonymous rpc session not ready"}); }
var crypto = Crypto.Mailbox.createEncryptor(keys);
// Broadcast mailbox doesn't use encryption. Sending messages there is restricted
// to admins in the server directly
var crypto = { encrypt: function (x) { return x; } };
var channel = BROADCAST_CHAN;
var obj = {
uid: Util.uid(), // add uid at the beginning to have a unique server hash
type: type,
content: msg
};
// Always send your data
if (typeof(msg) === "object" && !msg.user) {
var myData = Messaging.createData(ctx.store.proxy, false);
msg.user = myData;
if (!/^BROADCAST/.test(type)) {
var keys = getMyKeys(ctx);
if (!keys) { return void cb({error: "missing asymmetric encryption keys"}); }
if (!user || !user.channel || !user.curvePublic) { return void cb({error: "no notification channel"}); }
channel = user.channel;
crypto = Crypto.Mailbox.createEncryptor(keys);
// Always send your data
if (typeof(msg) === "object" && !msg.user) {
var myData = Messaging.createData(ctx.store.proxy, false);
msg.user = myData;
}
obj = {
type: type,
content: msg
};
}
var text = JSON.stringify({
type: type,
content: msg
});
var text = JSON.stringify(obj);
var ciphertext = crypto.encrypt(text, user.curvePublic);
// If we've sent this message to one of our teams' mailbox, we may want to "dismiss" it
@ -121,7 +151,7 @@ proxy.mailboxes = {
}
anonRpc.send("WRITE_PRIVATE_MESSAGE", [
user.channel,
channel,
ciphertext
], function (err /*, response */) {
if (err) {
@ -129,7 +159,9 @@ proxy.mailboxes = {
error: err,
});
}
return void cb();
return void cb({
hash: ciphertext.slice(0,64)
});
});
};
@ -239,15 +271,18 @@ proxy.mailboxes = {
return void console.error("chainpad-crypto is outdated and doesn't support mailboxes.");
}
var keys = m.keys || getMyKeys(ctx);
if (!keys) { return void console.error("missing asymmetric encryption keys"); }
var crypto = Crypto.Mailbox.createEncryptor(keys);
if (!keys && !m.decrypted) { return void console.error("missing asymmetric encryption keys"); }
var crypto = m.decrypted ? {
encrypt: function (x) { return x; },
decrypt: function (x) { return x; }
} : Crypto.Mailbox.createEncryptor(keys);
box.encryptor = crypto;
var cfg = {
network: ctx.store.network,
channel: m.channel,
noChainPad: true,
crypto: crypto,
owners: opts.owners || [ctx.store.proxy.edPublic],
owners: type === 'broadcast' ? [] : (opts.owners || [ctx.store.proxy.edPublic]),
lastKnownHash: m.lastKnownHash
};
cfg.onConnectionChange = function () {}; // Allow reconnections in chainpad-netflux
@ -265,6 +300,7 @@ proxy.mailboxes = {
sendMessage(msg, function (err, hash) {
if (err) { return void console.error(err); }
box.history.push(hash);
_msg.ctime = +new Date();
box.content[hash] = _msg;
var message = {
msg: _msg,
@ -280,9 +316,10 @@ proxy.mailboxes = {
box.queue = [];
};
var lastReceivedHash; // Don't send a duplicate of the last known hash on reconnect
box.onMessage = cfg.onMessage = function (msg, user, vKey, isCp, hash, author) {
box.onMessage = cfg.onMessage = function (msg, user, vKey, isCp, hash, author, data) {
if (hash === m.lastKnownHash) { return; }
if (hash === lastReceivedHash) { return; }
var time = data && data.time;
lastReceivedHash = hash;
try {
msg = JSON.parse(msg);
@ -313,6 +350,7 @@ proxy.mailboxes = {
});
return;
}
msg.ctime = time || 0;
box.content[hash] = msg;
showMessage(ctx, type, message, null, function (obj) {
if (!obj || !obj.msg || !notify) { return; }
@ -389,12 +427,16 @@ proxy.mailboxes = {
if (type === 'HISTORY_RANGE') {
if (!Array.isArray(_msg)) { return; }
var message;
try {
var decrypted = box.encryptor.decrypt(_msg[4]);
message = JSON.parse(decrypted.content);
message.author = decrypted.author;
} catch (e) {
console.log(e);
if (req.box.type === 'broadcast') {
message = Util.tryParse(_msg[4]);
} else {
try {
var decrypted = box.encryptor.decrypt(_msg[4]);
message = JSON.parse(decrypted.content);
message.author = decrypted.author;
} catch (e) {
console.log(e);
}
}
ctx.emit('HISTORY', {
txid: txid,
@ -420,6 +462,13 @@ proxy.mailboxes = {
txid: data.txid
}
];
if (data.type === 'broadcast') {
msg = [ 'GET_HISTORY_RANGE', box.channel, {
to: data.lastKnownHash,
txid: data.txid
}
];
}
ctx.req[data.txid] = {
cId: clientId,
box: box
@ -458,22 +507,26 @@ proxy.mailboxes = {
Mailbox.init = function (cfg, waitFor, emit) {
var mailbox = {};
var store = cfg.store;
var mailboxes = store.proxy.mailboxes = store.proxy.mailboxes || {};
var ctx = {
Store: cfg.Store,
store: store,
pinPads: cfg.pinPads,
updateMetadata: cfg.updateMetadata,
updateDrive: cfg.updateDrive,
mailboxes: mailboxes,
emit: emit,
clients: [],
boxes: {},
req: {}
req: {},
loggedIn: store.loggedIn && store.proxy.edPublic
};
var mailboxes = store.proxy.mailboxes = store.proxy.mailboxes || {};
initializeMailboxes(ctx, mailboxes);
initializeHistory(ctx);
if (ctx.loggedIn) {
initializeHistory(ctx);
}
Object.keys(mailboxes).forEach(function (key) {
if (TYPES.indexOf(key) === -1) { return; }
@ -490,18 +543,20 @@ proxy.mailboxes = {
}
});
Object.keys(store.proxy.teams || {}).forEach(function (teamId) {
var team = store.proxy.teams[teamId];
if (!team) { return; }
var teamMailbox = team.keys.mailbox || {};
if (!teamMailbox.channel) { return; }
var opts = {
owners: [Util.find(team, ['keys', 'drive', 'edPublic'])]
};
openChannel(ctx, 'team-'+teamId, teamMailbox, function () {
//console.log('Mailbox team', teamId);
}, opts);
});
if (ctx.loggedIn) {
Object.keys(store.proxy.teams || {}).forEach(function (teamId) {
var team = store.proxy.teams[teamId];
if (!team) { return; }
var teamMailbox = team.keys.mailbox || {};
if (!teamMailbox.channel) { return; }
var opts = {
owners: [Util.find(team, ['keys', 'drive', 'edPublic'])]
};
openChannel(ctx, 'team-'+teamId, teamMailbox, function () {
//console.log('Mailbox team', teamId);
}, opts);
});
}
mailbox.post = function (box, type, content) {
var b = ctx.boxes[box];
@ -526,6 +581,7 @@ proxy.mailboxes = {
};
mailbox.sendTo = function (type, msg, user, cb) {
if (!ctx.loggedIn) { return void cb({error:'NOT_LOGGED_IN'}); }
sendTo(ctx, type, msg, user, cb);
};

@ -503,7 +503,8 @@ var factory = function (Util, Hash, CPNetflux, Sortify, nThen, Crypto, Feedback)
var channel = config.channel;
var lastKnownHash = config.lastKnownHash || -1;
if (config.newTeam) { // XXX
// make sure we don't send -1 (ask for full history) when we are trying to create a new team
if (config.newTeam) {
lastKnownHash = undefined;
}

@ -186,7 +186,7 @@ define([
ChainPad: ChainPad,
classic: true,
network: network,
Cache: Cache, // ICE shared-folder cache
Cache: Cache, // shared-folder cache
metadata: {
validateKey: secret.keys.validateKey || undefined,
owners: owners

@ -11,7 +11,6 @@ define([
// Ready
CONNECT: Store.init,
DISCONNECT: Store.disconnect,
CREATE_README: Store.createReadme,
MIGRATE_ANON_DRIVE: Store.migrateAnonDrive,
PING: function (cId, data, cb) { cb(); },
CACHE_DISABLE: Store.disableCache,

@ -130,6 +130,9 @@ define([
delete ctx.store.proxy.teams[teamId];
ctx.emit('LEAVE_TEAM', teamId, team.clients);
ctx.updateMetadata();
if (ctx.store.calendar) {
ctx.store.calendar.closeTeam(teamId);
}
if (ctx.store.mailbox) {
ctx.store.mailbox.close('team-'+teamId, function () {
// Close team mailbox
@ -154,6 +157,13 @@ define([
if (membersChannel) { list.push(membersChannel); }
if (mailboxChannel) { list.push(mailboxChannel); }
if (store.proxy.calendars) {
var cList = Object.keys(store.proxy.calendars).map(function (c) {
return store.proxy.calendars[c].channel;
});
list = list.concat(cList);
}
var state = store.roster.getState();
if (state.members) {
Object.keys(state.members).forEach(function (curve) {
@ -338,6 +348,7 @@ define([
});
}, true);
}).nThen(function () {
if (ctx.store.calendar) { ctx.store.calendar.openTeam(id); }
cb();
});
};
@ -1249,6 +1260,13 @@ define([
team.userObject.setReadOnly(!secret.keys.secondaryKey, secret.keys.secondaryKey);
}
// Upgrade? update calendar rights
if (secret.keys.secondaryKey) {
try {
ctx.store.modules.calendar.upgradeTeam(teamId);
} catch (e) { console.error(e); }
}
if (!secret.keys.secondaryKey && team.rpc) {
team.rpc.destroy();
}
@ -1364,15 +1382,15 @@ define([
// Viewer to editor
if (user.role === "VIEWER" && data.data.role !== "VIEWER") {
changeEditRights(ctx, teamId, user, true, function (err) {
return void cb({error: err});
changeEditRights(ctx, teamId, user, true, function (obj) {
return void cb(obj);
});
}
// Editor to viewer
if (user.role !== "VIEWER" && data.data.role === "VIEWER") {
changeEditRights(ctx, teamId, user, false, function (err) {
return void cb({error: err});
changeEditRights(ctx, teamId, user, false, function (obj) {
return void cb(obj);
});
}

@ -829,6 +829,11 @@ define([
console.error(e);
}
}
if (!Hash.isValidChannel(el.channel)) {
// XXX delete channel? replace with parsed.channel?
console.error('Remove invalid channel', el.channel, el);
// toClean.push(id);
}
if ((loggedIn || config.testMode) && rootFiles.indexOf(id) === -1) {
debug("An element in filesData was not in ROOT, TEMPLATE or TRASH.", id, el);

@ -15,7 +15,9 @@ define([
"json.sortify": "/bower_components/json.sortify/dist/JSON.sortify",
//"pdfjs-dist/build/pdf": "/bower_components/pdfjs-dist/build/pdf",
//"pdfjs-dist/build/pdf.worker": "/bower_components/pdfjs-dist/build/pdf.worker"
cm: '/bower_components/codemirror'
cm: '/bower_components/codemirror',
'tui-code-snippet': '/lib/calendar/tui-code-snippet.min',
'tui-date-picker': '/lib/calendar/date-picker',
},
map: {
'*': {

@ -10,10 +10,11 @@ define([
'/common/common-hash.js',
'/common/hyperscript.js',
'/customize/messages.js',
'/customize/pages.js',
'/bower_components/file-saver/FileSaver.min.js',
'/bower_components/tweetnacl/nacl-fast.min.js',
], function ($, ApiConfig, FileCrypto, MakeBackup, Thumb, UI, UIElements, Util, Hash, h, Messages) {
], function ($, ApiConfig, FileCrypto, MakeBackup, Thumb, UI, UIElements, Util, Hash, h, Messages, Pages) {
var Nacl = window.nacl;
var module = {};
@ -327,7 +328,7 @@ define([
style: 'display:flex;align-items:center;justify-content:space-between'
}, [
UI.createCheckbox('cp-upload-owned', Messages.upload_modal_owner, modalState.owned),
createHelper('https://docs.cryptpad.fr/en/user_guide/share_and_access.html#owners', Messages.creation_owned1)
createHelper(Pages.localizeDocsLink('https://docs.cryptpad.fr/en/user_guide/share_and_access.html#owners'), Messages.creation_owned1)
]),
manualStore
]);
@ -382,7 +383,7 @@ define([
style: 'display:flex;align-items:center;justify-content:space-between'
}, [
UI.createCheckbox('cp-upload-owned', Messages.uploadFolder_modal_owner, modalState.owned),
createHelper('https://docs.cryptpad.fr/en/user_guide/share_and_access.html#owners', Messages.creation_owned1)
createHelper(Pages.localizeDocsLink('https://docs.cryptpad.fr/en/user_guide/share_and_access.html#owners'), Messages.creation_owned1)
]),
manualStore
]);

@ -39,10 +39,10 @@ define([
type: type,
msg: content,
user: user
}, function (err, obj) {
cb(err || (obj && obj.error), obj);
if (err || (obj && obj.error)) {
return void console.error(err || obj.error);
}, function (obj) {
cb(obj && obj.error, obj);
if (obj && obj.error) {
return void console.error(obj.error);
}
});
};
@ -56,7 +56,16 @@ define([
var notif;
var avatar;
var userData = Util.find(data, ['content', 'msg', 'content', 'user']);
if (userData && typeof(userData) === "object" && userData.profile) {
if (Util.find(data, ['content', 'msg', 'type']) === 'BROADCAST_DELETE') {
return;
}
if (data.type === 'broadcast') {
avatar = h('i.fa.fa-bullhorn.cp-broadcast');
if (/^LOCAL\|/.test(data.content.hash)) {
$(avatar).addClass('preview');
}
} else if (userData && typeof(userData) === "object" && userData.profile) {
avatar = h('span.cp-avatar');
Common.displayAvatar($(avatar), userData.avatar, userData.displayName || userData.name);
$(avatar).click(function (e) {
@ -64,7 +73,9 @@ define([
Common.openURL(Hash.hashToHref(userData.profile, 'profile'));
});
}
var order = -Math.floor((Util.find(data, ['content', 'msg', 'ctime']) || 0) / 1000);
notif = h('div.cp-notification', {
style: 'order:'+order+';',
'data-hash': data.content.hash
}, [
avatar,
@ -106,7 +117,7 @@ define([
// Call the onMessage handlers
var isNotification = function (type) {
return type === "notifications" || /^team-/.test(type);
return type === "notifications" || /^team-/.test(type) || type === "broadcast";
};
var pushMessage = function (data, handler) {
var todo = function (f) {
@ -142,7 +153,7 @@ define([
removeFromHistory(data.type, data.hash);
};
var onMessage = function (data, cb) {
var onMessage = mailbox.onMessage = function (data, cb) {
// data = { type: 'type', content: {msg: 'msg', hash: 'hash'} }
pushMessage(data);
if (data.content && typeof (data.content.getFormatText) === "function") {
@ -160,6 +171,11 @@ define([
hash: data.content.hash,
type: data.type
};
if (/^LOCAL\|/.test(dataObj.hash)) {
onViewed(dataObj);
cb();
return;
}
execCommand('DISMISS', dataObj, function (obj) {
if (obj && obj.error) { return void cb(obj.error); }
onViewed(dataObj);
@ -183,7 +199,7 @@ define([
cfg.onViewed(data);
});
}
if (typeof(cfg.onMessage) === "function") {
if (typeof(cfg.onMessage) === "function" && !cfg.history) {
onMessageHandlers.push(function (data, el) {
var type = data.type;
if (types.indexOf(type) === -1 && !(teams && /^team-/.test(type))) { return; }
@ -201,11 +217,16 @@ define([
});
};
var historyState = false;
var onHistory = function () {};
var onHistoryEnd;
mailbox.getMoreHistory = function (type, count, lastKnownHash, cb) {
if (historyState) { return void cb("ALREADY_CALLED"); }
historyState = true;
if (type === "broadcast" && onHistoryEnd) {
onHistoryEnd.reg(cb);
return;
}
if (onHistoryEnd) { return void cb("ALREADY_CALLED"); }
onHistoryEnd = Util.mkEvent();
onHistoryEnd.reg(cb);
var txid = Util.uid();
execCommand('LOAD_HISTORY', {
type: type,
@ -221,8 +242,8 @@ define([
if (data.complete) {
onHistory = function () {};
var end = messages.length < count;
cb(null, messages, end);
historyState = false;
onHistoryEnd.fire(null, messages, end);
onHistoryEnd = undefined;
return;
}
if (data.hash !== lastKnownHash) {

@ -37,6 +37,7 @@ define([
var $i = $('<iframe>').attr('id', 'sbox-iframe').attr('src',
ApiConfig.httpSafeOrigin + (pathname || window.location.pathname) + 'inner.html?' +
requireConfig.urlArgs + '#' + encodeURIComponent(JSON.stringify(req)));
$i.attr('allowfullscreen', 'true');
$('iframe-placeholder').after($i).remove();
// This is a cheap trick to avoid loading sframe-channel in parallel with the
@ -211,7 +212,6 @@ define([
var options = parsed.getOptions();
if (options.loginOpts) {
var loginOpts = Utils.Hash.decodeDataOptions(options.loginOpts);
if (loginOpts.createReadme) { Cryptpad.createReadme = true; }
if (loginOpts.mergeAnonDrive) { Cryptpad.migrateAnonDrive = true; }
// Remove newPadOpts from the hash
delete options.loginOpts;
@ -570,7 +570,7 @@ define([
var defaultTitle = Utils.UserObject.getDefaultName(parsed);
var edPublic, curvePublic, notifications, isTemplate;
var settings = {};
var isSafe = ['debug', 'profile', 'drive', 'teams'].indexOf(currentPad.app) !== -1;
var isSafe = ['debug', 'profile', 'drive', 'teams', 'calendar'].indexOf(currentPad.app) !== -1;
var isDeleted = isNewFile && currentPad.hash.length > 0;
if (isDeleted) {

@ -1,5 +1,6 @@
define([
'jquery',
'/api/config',
'/bower_components/nthen/index.js',
'/customize/messages.js',
'/common/sframe-chainpad-netflux-inner.js',
@ -16,6 +17,7 @@ define([
'/common/metadata-manager.js',
'/customize/application_config.js',
'/customize/pages.js',
'/common/common-realtime.js',
'/common/common-util.js',
'/common/common-hash.js',
@ -23,9 +25,11 @@ define([
'/common/common-interface.js',
'/common/common-feedback.js',
'/common/common-language.js',
'/bower_components/localforage/dist/localforage.min.js'
'/bower_components/localforage/dist/localforage.min.js',
'/common/hyperscript.js',
], function (
$,
ApiConfig,
nThen,
Messages,
CpNfInner,
@ -41,6 +45,7 @@ define([
MT,
MetadataMgr,
AppConfig,
Pages,
CommonRealtime,
Util,
Hash,
@ -48,7 +53,8 @@ define([
UI,
Feedback,
Language,
localForage
localForage,
h
) {
// Chainpad Netflux Inner
var funcs = {};
@ -210,9 +216,8 @@ define([
var modules = {};
funcs.makeUniversal = function (type, cfg) {
if (cfg && cfg.onEvent) {
modules[type] = {
onEvent: cfg.onEvent || function () {}
};
modules[type] = modules[type] || Util.mkEvent();
modules[type].reg(cfg.onEvent);
}
var sframeChan = funcs.getSframeChannel();
return {
@ -703,6 +708,12 @@ define([
});
};
funcs.isAdmin = function () {
var privateData = ctx.metadataMgr.getPrivateData();
return privateData.edPublic && Array.isArray(ApiConfig.adminKeys) &&
ApiConfig.adminKeys.indexOf(privateData.edPublic) !== -1;
};
funcs.mailbox = {};
Object.freeze(funcs);
@ -765,7 +776,14 @@ define([
UI.addTooltips();
ctx.sframeChan.on("EV_PAD_NODATA", function () {
UI.errorLoadingScreen(Messages.safeLinks_error);
var error = Pages.setHTML(h('span'), Messages.safeLinks_error);
var i = error.querySelector('i');
if (i) { i.classList = 'fa fa-shhare-alt'; }
var a = error.querySelector('a');
if (a) {
a.setAttribute('href', Pages.localizeDocsLink("https://docs.cryptpad.fr/en/user_guide/user_account.html#confidentiality"));
}
UI.errorLoadingScreen(error);
});
ctx.sframeChan.on("EV_PAD_PASSWORD", function (cfg) {
@ -825,7 +843,7 @@ define([
ctx.sframeChan.on('EV_UNIVERSAL_EVENT', function (obj) {
var type = obj.type;
if (!type || !modules[type]) { return; }
modules[type].onEvent(obj.data);
modules[type].fire(obj.data);
});
ctx.cache = Cache.create(ctx.sframeChan);

@ -2,6 +2,7 @@ define([
'jquery',
'/customize/application_config.js',
'/api/config',
'/api/broadcast',
'/common/common-ui-elements.js',
'/common/common-interface.js',
'/common/common-hash.js',
@ -11,8 +12,9 @@ define([
'/common/hyperscript.js',
'/common/messenger-ui.js',
'/customize/messages.js',
], function ($, Config, ApiConfig, UIElements, UI, Hash, Util, Feedback, MT, h,
MessengerUI, Messages) {
'/customize/pages.js',
], function ($, Config, ApiConfig, Broadcast, UIElements, UI, Hash, Util, Feedback, MT, h,
MessengerUI, Messages, Pages) {
var Common;
var Bar = {
@ -45,6 +47,7 @@ MessengerUI, Messages) {
var TITLE_CLS = Bar.constants.title = "cp-toolbar-title";
var LINK_CLS = Bar.constants.link = "cp-toolbar-link";
var NOTIFICATIONS_CLS = Bar.constants.user = 'cp-toolbar-notifications';
var MAINTENANCE_CLS = Bar.constants.user = 'cp-toolbar-maintenance';
// User admin menu
var USERADMIN_CLS = Bar.constants.user = 'cp-toolbar-user-dropdown';
@ -78,6 +81,7 @@ MessengerUI, Messages) {
'class': USER_CLS
}).appendTo($topContainer);
$('<span>', {'class': LIMIT_CLS}).hide().appendTo($userContainer);
$('<span>', {'class': MAINTENANCE_CLS + ' cp-dropdown-container'}).hide().appendTo($userContainer);
$('<span>', {'class': NOTIFICATIONS_CLS + ' cp-dropdown-container'}).hide().appendTo($userContainer);
$('<span>', {'class': USERADMIN_CLS + ' cp-dropdown-container'}).hide().appendTo($userContainer);
@ -964,12 +968,19 @@ MessengerUI, Messages) {
var todo = function (e, overLimit) {
if (e) { return void console.error("Unable to get the pinned usage", e); }
if (overLimit) {
var key = 'pinLimitReachedAlert'; // Msg.pinLimitReachedAlert
if (!ApiConfig.allowSubscriptions) {
key = 'pinLimitReachedAlertNoAccounts'; // Msg.pinLimitReachedAlertNoAccounts
}
$limit.show().click(function () {
UI.alert(Messages._getKey(key, [encodeURIComponent(l.hostname)]), null, true);
if (ApiConfig.allowSubscriptions && Config.upgradeURL) {
var key = 'pinLimitReachedAlert'; // Msg.pinLimitReachedAlert
var msg = Pages.setHTML(h('span'), Messages.pinLimitReachedAlert);
$(msg).find('a').attr({
target: '_blank',
href: Config.upgradeURL,
});
UI.alert(msg);
} else {
UI.alert(Messages.pinLimitReachedAlertNoAccounts);
}
});
}
};
@ -1026,6 +1037,54 @@ MessengerUI, Messages) {
return $userAdmin;
};
var createMaintenance = function (toolbar, config) {
var $notif = toolbar.$top.find('.'+MAINTENANCE_CLS);
var button = h('button.cp-maintenance-wrench.fa.fa-wrench');
$notif.append(button);
var m = Broadcast.maintenance;
$(button).click(function () {
if (!m || !m.start || !m.end) { return; }
UI.alert(Messages._getKey('broadcast_maintenance', [
new Date(m.start).toLocaleString(),
new Date(m.end).toLocaleString(),
]), null, true);
});
var to;
Common.makeUniversal('broadcast', {
onEvent: function (obj) {
var cmd = obj.ev;
if (cmd !== "MAINTENANCE") { return; }
var data = obj.data;
if (!data) {
return void $notif.hide();
}
if ((+new Date()) > data.end) {
return void $notif.hide();
}
m = data;
clearTimeout(to);
to = setTimeout(function () {
m = undefined;
$notif.hide();
}, m.end-(+new Date()));
$notif.css('display', '');
}
});
if (m && m.start && m.end) {
$notif.css('display', '');
to = setTimeout(function () {
m = undefined;
$notif.hide();
}, m.end-(+new Date()));
} else {
$notif.hide();
}
};
var createNotifications = function (toolbar, config) {
var $notif = toolbar.$top.find('.'+NOTIFICATIONS_CLS).show();
var openNotifsApp = h('div.cp-notifications-gotoapp', h('p', Messages.openNotificationsApp || "Open notifications App"));
@ -1096,7 +1155,7 @@ MessengerUI, Messages) {
$button.addClass('fa-bell');
};
Common.mailbox.subscribe(['notifications', 'team'], {
Common.mailbox.subscribe(['notifications', 'team', 'broadcast'], {
onMessage: function (data, el) {
if (el) {
$(div).prepend(el);
@ -1287,6 +1346,7 @@ MessengerUI, Messages) {
tb['useradmin'] = createUserAdmin;
tb['unpinnedWarning'] = createUnpinnedWarning;
tb['notifications'] = createNotifications;
tb['maintenance'] = createMaintenance;
tb['pad'] = function () {
toolbar.$file.show();
@ -1323,6 +1383,7 @@ MessengerUI, Messages) {
};
addElement(config.displayed, {}, true);
addElement(['maintenance'], {}, true);
toolbar['linkToMain'] = createLinkToMain(toolbar, config);

@ -58,7 +58,6 @@
"editor": "persona editora",
"userlist_offline": "Esteu fora de línia, la llista de persones usuàries no està disponible.",
"language": "Llengua",
"newVersion": "<b>S'ha actualitzat CryptPad!</b><br>Comproveu les novetats d'aquesta versió:<br><a href=\"https://github.com/xwiki-labs/cryptpad/releases/tag/{0}\" target=\"_blank\">Notes de la versió de CryptPad {0}</a>",
"upgrade": "Actualitzeu-vos",
"upgradeAccount": "Actualitzeu el compte",
"MB": "MB",
@ -68,7 +67,7 @@
"formattedGB": "{0} GB",
"formattedKB": "{0} KB",
"pinLimitReached": "Heu arribat al límit del vostre emmagatzematge",
"pinLimitReachedAlert": "Heu arribat al límit del vostre espai. Els documents nous no es desaran al vostre CryptDrive.<br>Podeu eliminar documents del vostre CryptDrive o <a href=\"https://accounts.cryptpad.fr/#!on={0}\" target=\"_blank\">adquirir una oferta prèmium</a> per augmentar el vostre espai.",
"pinLimitReachedAlert": "Heu arribat al límit del vostre espai. Els documents nous no es desaran al vostre CryptDrive.<br>Podeu eliminar documents del vostre CryptDrive o <a>adquirir una oferta prèmium</a> per augmentar el vostre espai.",
"pinLimitReachedAlertNoAccounts": "Heu arribat al límit del vostre espai",
"pinLimitNotPinned": "Heu arribat al límit del vostre espai.<br>Aquest document no està desat al vostre CryptDrive.",
"pinLimitDrive": "Heu arribat al límit del vostre espai.<br>No podeu crear documents nous.",
@ -85,7 +84,7 @@
"saveTitle": "Deseu el títol (Enter)",
"forgetButton": "Esborrar",
"forgetPrompt": "Clicant D'acord, moureu aquest document a la paperera. Hi esteu d'acord?",
"movedToTrash": "Aquest document s'ha desplaçat a la paperera.<br><a href=\"/drive/\">Accedir a la meva Unitat</a>",
"movedToTrash": "Aquest document s'ha desplaçat a la paperera.<br><a>Accedir a la meva Unitat</a>",
"shareButton": "Compartir",
"shareSuccess": "L'enllaç s'ha copiat al porta-retalls",
"userListButton": "Llista de persones usuàries",
@ -244,7 +243,6 @@
"contacts_online": "En aquesta sala hi ha una altra persona en línia",
"fm_rootName": "Documents",
"fm_trashName": "Paperera",
"fm_unsortedName": "Fitxers desordenats",
"fm_filesDataName": "Tots els fitxers",
"fm_templateName": "Plantilles",
"fm_searchName": "Cerca",
@ -287,7 +285,6 @@
"fm_info_anonymous": "No heu iniciat la sessió, per tant, els vostres documents caducaran d'aquí a 3 mesos (<a href=\"https://blog.cryptpad.fr/2017/05/17/You-gotta-log-in/\" target=\"_blank\">saber-ne més</a>). Es desen al vostre navegador, per tant, si netegeu el vostre historial podríeu perdre'ls.<br><a href=\"/register/\">Registreu-vos</a> o <a href=\"/login/\">Inicieu la sessió</a> per mantenir-los accessibles.<br>",
"fm_info_sharedFolder": "Aquesta és una carpeta compartida. No heu iniciat cap sessió, pel que només podeu accedir en mode només de lectura.<br><a href=\"/register/\">Registreu-vos</a> o <a href=\"/login/\">Inicieu la sessió</a> per poder importar-ho al vostre CryptDrive i modificar-ho.",
"fm_info_owned": "Es documents que es mostren són de la vostra propietat. Això vol dir que podeu eliminar-los permanentment del servidor quan vulgueu. Si ho feu, la resta de persones no podran accedir-hi mai més.",
"fm_alert_anonymous": "Hola, esteu utilitzant CryptPad de forma anònima. Ja està bé, però els vostres documents poden perdre's després d'un temps d'inactivitat. Hem deshabilitat les funcions avançades de la unitat pels comptes anònims perquè volem deixar clar que aquest no és un lloc segur on desar res. Podeu <a href=\"https://blog.cryptpad.fr/2017/05/17/You-gotta-log-in/\" target=\"_blank\">conèixer més</a> sobre per què fem això i per què hauríeu de <a href=\"/register/\">Registrar-vos</a> i <a href=\"/login/\">Iniciar sessió</a>.",
"fm_error_cantPin": "Error intern del servidor. Si us plau, torneu a garregar la pàgina i torneu a provar-ho.",
"fm_viewListButton": "Vista de llista",
"fm_viewGridButton": "Vista de graella",
@ -334,7 +331,7 @@
"login_invalPass": "Cal introduir la contrasenya",
"login_unhandledError": "Hi ha hagut un error inesperat :(",
"register_importRecent": "Importeu els documents de la vostra sessió anònima",
"register_acceptTerms": "Accepto les <a href='/terms.html' tabindex='-1'>condicions del servei</a>",
"register_acceptTerms": "Accepto les <a>condicions del servei</a>",
"register_passwordsDontMatch": "Les contrasenyes no coincideixen!",
"register_passwordTooShort": "Les contrasenyes han de tenir, com a mínim, {0} caràcters.",
"register_mustAcceptTerms": "Cal que accepteu les condicions del servei.",
@ -484,7 +481,7 @@
"upload_mustLogin": "Cal que inicieu la sessió per carregar un fitxer",
"upload_up": "Carrega",
"download_mt_button": "Descarrega",
"home_host": "Aquesta és una instància comunitària independent de CryptPad. El codi font està disponible<a href=\"https://github.com/xwiki-labs/cryptpad\" target=\"_blank\" rel=\"noreferrer noopener\">a GitHub</a>.",
"home_host": "Aquesta és una instància comunitària independent de CryptPad.",
"mdToolbar_toc": "Taula de continguts",
"mdToolbar_code": "Codi",
"mdToolbar_check": "Llista de tasques",

@ -56,7 +56,6 @@
"editor": "Bearbeiter",
"userlist_offline": "Du bist aktuell offline, die Benutzerliste ist nicht verfügbar.",
"language": "Sprache",
"newVersion": "<b>CryptPad wurde aktualisiert!</b><br>Entdecke, was neu in dieser Version ist:<br><a href=\"https://github.com/xwiki-labs/cryptpad/releases/tag/{0}\" target=\"_blank\">Versionshinweise für CryptPad {0}</a>",
"upgrade": "Upgrade",
"upgradeAccount": "Account upgraden",
"MB": "MB",
@ -66,7 +65,7 @@
"formattedGB": "{0} GB",
"formattedKB": "{0} KB",
"pinLimitReached": "Du hast deine Speicherplatzbegrenzung erreicht",
"pinLimitReachedAlert": "Du hast deine Speicherplatzbegrenzung erreicht. Neue Pads werden nicht mehr in deinem CryptDrive gespeichert.<br>Du kannst entweder ein Pad von deinem CryptDrive entfernen oder <a href=\"https://accounts.cryptpad.fr/#!on={0}\" target=\"_blank\">ein Premiumangebot anfordern</a>, damit deine Begrenzung erhöht wird.",
"pinLimitReachedAlert": "Du hast deine Speicherplatzbegrenzung erreicht. Neue Pads werden nicht mehr in deinem CryptDrive gespeichert.<br>Du kannst entweder ein Pad von deinem CryptDrive entfernen oder <a>ein Premiumangebot anfordern</a>, damit deine Begrenzung erhöht wird.",
"pinLimitReachedAlertNoAccounts": "Du hast deine Speicherplatzbegrenzung erreicht",
"pinLimitNotPinned": "Du hast deine Speicherplatzbegrenzung erreicht.<br>Dieses Pad ist nicht in deinem CryptDrive gespeichert.",
"pinLimitDrive": "Du hast deine Speicherplatzbegrenzung erreicht.<br>Du kannst keine neuen Pads erstellen.",
@ -83,7 +82,7 @@
"saveTitle": "Den Titel speichern (Enter)",
"forgetButton": "Entfernen",
"forgetPrompt": "Mit dem Klick auf OK wird das Pad in den Papierkorb verschoben. Bist du sicher?",
"movedToTrash": "Dieses Dokument liegt im Papierkorb.<br>Du kannst <a href=\"/drive/\">zum CryptDrive</a> navigieren",
"movedToTrash": "Dieses Dokument liegt im Papierkorb.<br>Du kannst <a>zum CryptDrive</a> navigieren",
"shareButton": "Teilen",
"shareSuccess": "Die URL wurde in die Zwischenablage kopiert",
"userListButton": "Benutzerliste",
@ -240,7 +239,6 @@
"contacts_online": "Ein anderer Benutzer dieses Raumes ist online",
"fm_rootName": "Dokumente",
"fm_trashName": "Papierkorb",
"fm_unsortedName": "Unsortierte Dateien",
"fm_filesDataName": "Alle Dateien",
"fm_templateName": "Vorlagen",
"fm_searchName": "Suchen",
@ -283,7 +281,6 @@
"fm_info_anonymous": "Du bist nicht eingeloggt, daher laufen deine Dokumente nach {0} Tagen aus. Sie könnten durch Löschen des Browserverlaufs verloren gehen. <br><a href=\"/register/\">Registriere dich</a> (keine persönlichen Informationen benötigt) oder <a href=\"/login/\">logge dich ein</a>, um sie dauerhaft in deinem Drive zu speichern. <a href=\"https://docs.cryptpad.fr/de/user_guide/user_account.html#account-types\" target=\"_blank\">Mehr zu registrierten Accounts</a>.",
"fm_info_sharedFolder": "Dieser Ordner ist geteilt. Da du aber nicht eingeloggt bist, hast du nur einen schreibgeschützen Zugriff.<br><a href=\"/register/\">Registriere</a> oder <a href=\"/login/\">logge ich ein</a>, damit du diesen Ordner in dein CryptDrive importieren und bearbeiten kannst.",
"fm_info_owned": "Diese Pads sind deine eigenen. Das heißt, dass du sie jederzeit vom Server entfernen kannst. Wenn du das machst, dann sind sie auch für andere Nutzer nicht mehr zugänglich.",
"fm_alert_anonymous": "Hallo, du benutzt CryptPad anonym. Das ist in Ordnung, aber Dokumente können nach längerer Inaktivität gelöscht werden. Wir haben fortgeschrittene Funktionen in anonymen CryptDrives deaktiviert, weil wir deutlich machen wollen, dass es kein sicherer Platz zur Ablage von Daten ist. Du kannst <a href=\"https://blog.cryptpad.fr/2017/05/17/You-gotta-log-in/\" target=\"_blank\">nachlesen</a>, weshalb wir das machen und weshalb du dich wirklich <a href=\"/register/\">registrieren</a> oder <a href=\"/login/\">einloggen</a> solltest.",
"fm_error_cantPin": "Interner Serverfehler. Bitte lade die Seite neu und versuche es erneut.",
"fm_viewListButton": "Listenansicht",
"fm_viewGridButton": "Kachelansicht",
@ -329,7 +326,7 @@
"login_invalPass": "Der Passwort kann nicht leer sein",
"login_unhandledError": "Ein unerwarteter Fehler ist aufgetreten :(",
"register_importRecent": "Dokumente aus deiner nicht-registrierten Sitzung importieren",
"register_acceptTerms": "Ich bin mit den <a href='/terms.html' tabindex='-1'>Nutzungsbedingungen</a> einverstanden",
"register_acceptTerms": "Ich bin mit den <a>Nutzungsbedingungen</a> einverstanden",
"register_passwordsDontMatch": "Passwörter stimmen nicht überein!",
"register_passwordTooShort": "Passwörter müssen mindestens {0} Zeichen haben.",
"register_mustAcceptTerms": "Du musst mit den Nutzungsbedingungen einverstanden sein.",
@ -337,7 +334,7 @@
"register_header": "Registrieren",
"register_writtenPassword": "Ich habe meinen Benutzername und mein Passwort notiert. Weiter geht's",
"register_cancel": "Abbrechen",
"register_warning": "<i class='fa fa-warning'></i> Warnung",
"register_warning": "Warnung",
"register_alreadyRegistered": "Dieser Benutzer existiert bereits, möchtest du dich einloggen?",
"settings_cat_account": "Account",
"settings_cat_drive": "CryptDrive",
@ -495,21 +492,6 @@
"whatis_title": "Was ist CryptPad?",
"whatis_collaboration": "Vertrauliche Zusammenarbeit",
"whatis_drive": "Organisieren mit CryptDrive",
"policy_title": "Datenschutzerklärung für CryptPad",
"policy_whatweknow": "Was wir über dich wissen",
"policy_whatweknow_p1": "Als im Web gehostete Anwendung hat CryptPad Zugriff auf die Metadaten, die vom HTTP-Protokoll übertragen werden. Dies umfasst deine IP-Adresse und diverse andere HTTP-Header, die es ermöglichen, deinen Browser zu identifizieren. Um zu sehen, welche Daten dein Browser preisgibt, kannst du die Seite <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending\" title=\"Welche HTTP-Header sendet mein Browser\">WhatIsMyBrowser.com</a> besuchen.",
"policy_howweuse": "Wie wir das Wissen anwenden",
"policy_howweuse_p1": "Wir nutzen diese Informationen, um besser entscheiden zu können, wie CryptPad beworben werden kann und um derzeit genutzte Strategien zu evaluieren. Informationen über deinen Standort helfen uns bei der Abschätzung, welche Sprachen wir besser unterstützen sollten.",
"policy_howweuse_p2": "Informationen zu deinem Browser (ob du auf einem Desktop oder Smartphone arbeitest) helfen uns bei der Entscheidung, welche Funktionen priorisiert werden sollen. Unser Entwicklerteam ist klein, deshalb ist es uns wichtig, Entscheidungen derart zu treffen, dass möglichst viele Nutzer davon profitieren.",
"policy_whatwetell": "Was wir anderen über dich (nicht) erzählen",
"policy_whatwetell_p1": "Wir reichen keine von uns gesammelten Daten weiter, außer im Falle einer gerichtlichen Anordnung.",
"policy_links": "Links zu anderen Seiten",
"policy_links_p1": "Diese Seite beinhaltet Links zu anderen Seiten, teilweise werden diese von anderen Organisationen verwaltet. Wir sind nicht für den Umgang mit der Privatsphäre und die Inhalte der anderen Seiten verantwortlich. Generell werden Links zu externen Seiten in einem neuem Fenster geöffnet, um zu verdeutlichen, dass du CryptPad.fr verlässt.",
"policy_ads": "Werbung",
"policy_ads_p1": "Wir zeigen keine Onlinewerbung, können aber zu Organisationen verlinken, die unsere Forschung finanzieren.",
"policy_choices": "Deine Möglichkeiten",
"policy_choices_open": "Unser Code ist frei, deshalb kannst du jederzeit deine eigene CryptPad-Instanz hosten.",
"policy_choices_vpn": "Wenn du unsere gehostete Instanz nutzen möchtest, ohne deine IP-Adresse zu offenbaren, bitten wir dich darum, deine IP-Adresse zu verschleiern. Das ist zum Beispiel mit dem <a href=\"https://www.torproject.org/projects/torbrowser.html.en\" title=\"Downloads des Tor-Projekts\" target=\"_blank\" rel=\"noopener noreferrer\">Tor Browser</a> oder einem <a href=\"https://riseup.net/en/vpn\" title=\"Von Riseup bereitgestellte VPN-Dienste\" target=\"_blank\" rel=\"noopener noreferrer\">VPN-Zugang</a> möglich.",
"features": "Funktionen",
"features_title": "Funktionen",
"features_anon": "Nicht-registriert",
@ -558,28 +540,11 @@
"header_homeTitle": "Zur CryptPad-Hauptseite",
"help_genericMore": "Erfahre mehr über die Nutzung von CryptPad, indem du unsere <a>Documentation</a> liest.",
"driveReadmeTitle": "Was ist CryptPad?",
"readme_welcome": "Willkommen zu CryptPad!",
"readme_p1": "Willkommen zu CryptPad, hier kannst du deine Notizen aufschreiben, allein oder mit Kontakten.",
"readme_p2": "Dieses Dokument gibt dir einen kurzen Überblick, wie du CryptPad verwenden kannst, um Notizen zu schreiben, sie zu organisieren und mit anderen zusammen zu arbeiten.",
"readme_cat1": "Lerne dein CryptDrive kennen",
"readme_cat1_l1": "Ein Pad erstellen: Klicke in deinem CryptDrive auf {0} und dann auf {1}.",
"readme_cat1_l2": "Ein Pad deines CryptDrives öffnen: Doppelklicke auf das Symbol eines Pads, um es zu öffnen.",
"readme_cat1_l3": "Deine Pads organisieren: Wenn du eingeloggt bist, wird jedes geöffnete Pad im Bereich {0} deines CryptDrives angezeigt.",
"readme_cat1_l3_l1": "Im Bereich {0} deines CryptDrives kannst du Dateien zwischen Ordnern verschieben oder neue Ordner anlegen.",
"readme_cat1_l3_l2": "Ein Rechtsklick auf die Symbole zeigt zusätzliche Menüfunktionen.",
"readme_cat1_l4": "Verschiebe deine alten Pads in den Papierkorb: Du kannst deine Pads in den {0} verschieben, genauso wie du es bei einem Ordner machst.",
"readme_cat2": "Pads wie ein Profi gestalten",
"edit": "Bearbeiten",
"view": "Ansehen",
"readme_cat2_l1": "Die Schaltfläche {0} in deinem Pad erlaubt dir, anderen einen Zugang für die Mitarbeit zu geben (entweder zum {1} oder zum {2}).",
"readme_cat2_l2": "Der Titel eines Pads kann mit einem Klick auf den Stift geändert werden",
"readme_cat3": "Entdecke CryptPad-Anwendungen",
"readme_cat3_l1": "Mit dem CryptPad Codeeditor kannst du Code wie JavaScript, Markdown oder HTML bearbeiten",
"readme_cat3_l2": "Mit dem CryptPad Präsentationseditor kannst du schnell Vorträge mit Hilfe von Markdown gestalten",
"readme_cat3_l3": "Mit der CryptPad Umfrage kannst du schnell Abstimmungen durchführen, insbesondere, um Meetings zu planen, die in den Kalender von allen passen",
"feedback_about": "Wenn du das liest, fragst du dich wahrscheinlich, weshalb dein Browser bei der Ausführung mancher Aktionen Anfragen an Webseiten sendet",
"feedback_about": "Wenn du das liest, fragst du dich wahrscheinlich, weshalb dein Browser bei der Ausführung mancher Aktionen Anfragen an Webseiten sendet.",
"feedback_privacy": "Wir respektieren deine Datenschutz, aber gleichzeitig wollen wir, dass die Benutzung von CryptPad sehr leicht ist. Deshalb wollen wir erfahren, welche Funktion am wichtigsten für unsere Benutzer ist, indem wir diese mit einer genauen Parameterbeschreibung anfordern.",
"feedback_optout": "Wenn du das nicht möchtest, kannst du es in <a href='/settings/'>deinen Einstellungen</a> deaktivieren",
"feedback_optout": "Wenn du das nicht möchtest, kannst du es in <a>deinen Einstellungen</a> deaktivieren.",
"creation_404": "Dieses Pad existiert nicht mehr. Benutze das folgende Formular, um ein neues Pad zu erstellen.",
"creation_owned": "Eigenes Pad",
"creation_owned1": "Ein <b>eigenes</b> Element kann zerstört werden, wann immer der Eigentümer so entscheidet. Nach der Zerstörung eines eigenen Elementes ist es nicht mehr in CryptDrives anderer Nutzer verfügbar.",
@ -631,7 +596,7 @@
"autostore_sf": "Dieser Ordner",
"autostore_pad": "Dieses Dokument",
"autostore_notstored": "{0} ist nicht in deinem CryptDrive. Möchtest du es jetzt dort speichern?",
"autostore_settings": "Du kannst die automatische Speicherung in deinen <a href=\"/settings/\">Einstellungen</a> aktivieren!",
"autostore_settings": "Du kannst die automatische Speicherung in deinen <a>Einstellungen</a> aktivieren!",
"autostore_store": "Speichern",
"autostore_hide": "Nicht speichern",
"autostore_error": "Unerwarteter Fehler: Wir konnten das Pad nicht speichern, bitte versuche es nochmal.",
@ -639,7 +604,7 @@
"autostore_forceSave": "Speichere die Datei in deinem CryptDrive",
"autostore_notAvailable": "Du musst dieses Pad in deinem CryptDrive speichern, bevor du diese Funktion benutzen kannst.",
"crowdfunding_button": "Unterstütze CryptPad",
"crowdfunding_popup_text": "<h3>Wir brauchen deine Hilfe!</h3>Um sicherzustellen, dass CryptPad weiter aktiv entwickelt wird, unterstütze bitte das Projekt über die <a href=\"https://opencollective.com/cryptpad\">OpenCollective Seite</a>, wo du unsere <b>Roadmap</b> und <b>Funding-Ziele</b> lesen kannst.",
"crowdfunding_popup_text": "<h3>Wir brauchen deine Hilfe!</h3>Um sicherzustellen, dass CryptPad weiter aktiv entwickelt wird, unterstütze bitte das Projekt über die OpenCollective Seite, wo du unsere <b>Roadmap</b> und <b>Funding-Ziele</b> lesen kannst.",
"crowdfunding_popup_no": "Nicht jetzt",
"invalidHashError": "Das angeforderte Dokument hat eine ungültige URL.",
"oo_cantUpload": "Das Hochladen von Dateien ist nicht erlaubt, während andere Nutzer anwesend sind.",
@ -727,7 +692,7 @@
"support_disabledHint": "Diese CryptPad-Instanz wurde noch nicht für die Verwendung eines Support-Formulars konfiguriert.",
"support_cat_new": "Neues Ticket",
"support_formTitle": "Neues Ticket",
"support_formHint": "Mit diesem Formular kannst du bei Fragen oder Problemen die Administratoren auf sicherem Weg kontaktieren.<br>Bitte beachte, dass einige Fragen/Probleme mit Hilfe des <a href=\"https://docs.cryptpad.fr/de/user_guide/index.html\" rel=\"noopener noreferrer\" target=\"_blank\">CryptPad-Benutzerhandbuchs</a> gelöst werden können. Bitte eröffne kein neues Ticket, wenn du bereits ein offenes Ticket bezüglich des gleichen Problems hast. Antworte stattdessen auf deine ursprüngliche Nachricht, um weitere Informationen hinzuzufügen.",
"support_formHint": "Mit diesem Formular kannst du bei Fragen oder Problemen die Administratoren auf sicherem Weg kontaktieren.<br>Bitte beachte, dass einige Fragen/Probleme mit Hilfe des <a>CryptPad-Benutzerhandbuchs</a> gelöst werden können. Bitte eröffne kein neues Ticket, wenn du bereits ein offenes Ticket bezüglich des gleichen Problems hast. Antworte stattdessen auf deine ursprüngliche Nachricht, um weitere Informationen hinzuzufügen.",
"support_formButton": "Absenden",
"support_formTitleError": "Fehler: Titel ist leer",
"support_formContentError": "Fehler: Inhalt ist leer",
@ -923,7 +888,7 @@
"settings_safeLinksHint": "CryptPad fügt den Pad-Links die Schlüssel zum Entschlüsseln der Inhalte hinzu. Jeder, der Zugriff auf den Browserverlauf hat, kann möglicherweise die Daten lesen. Dazu gehören Browsererweiterungen und Browser, die den Verlauf geräteübergreifend synchronisieren. Die Aktivierung von \"sicheren Links\" verhindert, dass die Schlüssel in den Browserverlauf gelangen oder in der Adressleiste angezeigt werden, wann immer dies möglich ist. Wir empfehlen dringend, diese Funktion zu aktivieren und das Menü {0} Teilen zu verwenden.",
"dontShowAgain": "Nicht mehr anzeigen",
"profile_login": "Du musst dich einloggen, um diesen Benutzer zu deinen Kontakten hinzuzufügen",
"safeLinks_error": "Dieser Link wurde aus der Adresszeile des Browsers kopiert und ermöglicht keinen Zugriff auf das Dokument. Bitte verwende das Menü <i class=\"fa fa-shhare-alt\"></i> <b>Teilen</b>, um das Dokument direkt mit Kontakten zu teilen oder den Link zu kopieren. <a href=\"https://docs.cryptpad.fr/de/user_guide/user_account.html#confidentiality\">Mehr zu sicheren Links</a>.\n",
"safeLinks_error": "Dieser Link wurde aus der Adresszeile des Browsers kopiert und ermöglicht keinen Zugriff auf das Dokument. Bitte verwende das Menü <i></i> <b>Teilen</b>, um das Dokument direkt mit Kontakten zu teilen oder den Link zu kopieren. <a>Mehr zu sicheren Links</a>.",
"settings_safeLinksCheckbox": "Sichere Links aktivieren",
"settings_safeLinksTitle": "Sichere Links",
"settings_trimHistoryHint": "Spare Speicherplatz, indem du den Verlauf deines CryptDrives und der Benachrichtigungen löschst. Dies hat keinen Einfluss auf den Verlauf deiner Pads. Du kannst den Verlauf der Pads in deren Eigenschaften-Dialog löschen.",
@ -1005,7 +970,7 @@
"slide_backCol": "Hintergrundfarbe",
"slide_textCol": "Textfarbe",
"support_languagesPreamble": "Das Support-Team spricht die folgenden Sprachen:",
"settings_safeLinkDefault": "Sichere Links sind nun standardmäßig aktiviert. Bitte verwende zum Kopieren von Links das Menü <i class=\"fa fa-shhare-alt\"></i> <b>Teilen</b> und nicht die Adressleiste des Browsers.",
"settings_safeLinkDefault": "Sichere Links sind nun standardmäßig aktiviert. Bitte verwende zum Kopieren von Links das Menü <i></i> <b>Teilen</b> und nicht die Adressleiste des Browsers.",
"info_imprintFlavour": "<a>Rechtliche Informationen über die Administratoren dieses Servers</a>.",
"info_privacyFlavour": "Unsere <a>Datenschutzerklärung</a> beschreibt, wie wir deine Daten verarbeiten.",
"user_about": "Über CryptPad",
@ -1140,13 +1105,13 @@
"home_host_title": "Über diese Instanz",
"creation_helperText": "In Dokumentation öffnen",
"home_support_title": "CryptPad unterstützen",
"home_opensource": "Jeder kann eine CryptPad-Instanz betreiben und den Dienst privat oder professionell anbieten. Der Quellcode ist auf <a rel=\"noopener noreferrer\" target=\"_blank\" href=\"https://github.com/xwiki-labs/cryptpad\">Github</a> verfügbar.",
"home_opensource": "Jeder kann eine CryptPad-Instanz betreiben und den Dienst privat oder professionell anbieten. Der Quellcode ist auf <a>Github</a> verfügbar.",
"whatis_xwiki": "Entwickelt bei XWiki",
"whatis_collaboration_info": "<p>CryptPad wurde entwickelt, um gemeinsame Arbeit zu ermöglichen. Es synchronisiert Änderungen an Dokumenten in Echtzeit. Da alle Daten verschlüsselt sind, haben der Dienst und seine Administratoren keine Möglichkeit, die bearbeiteten und gespeicherten Inhalte einzusehen.</p>",
"register_warning_note": "Aufgrund der Verschlüsselung in CryptPad können die Administratoren des Dienstes deine Daten nicht wiederherstellen, falls du deinen Benutzernamen und/oder dein Passwort vergessen solltest. Bitte speichere diese an einem sicheren Ort.",
"whatis_xwiki_info": "<p>CryptPad wird bei <a rel=\"noopener noreferrer\" target=\"_blank\" href=\"https://xwiki.com\">XWiki</a> entwickelt, einem Unternehmen mit Sitz in Paris, Frankreich, das seit über 15 Jahren Open-Source-Software entwickelt. Wir haben umfangreiche Erfahrung in der Entwicklung von kollaborativer Software zur Organisation von Informationen. Unsere Erfolgsbilanz zeigt, dass wir uns der langfristigen Entwicklung und Wartung von CryptPad verpflichtet fühlen.</p>",
"whatis_xwiki_info": "<p>CryptPad wird bei <a>XWiki</a> entwickelt, einem Unternehmen mit Sitz in Paris, Frankreich, das seit über 15 Jahren Open-Source-Software entwickelt. Wir haben umfangreiche Erfahrung in der Entwicklung von kollaborativer Software zur Organisation von Informationen. Unsere Erfolgsbilanz zeigt, dass wir uns der langfristigen Entwicklung und Wartung von CryptPad verpflichtet fühlen.</p>",
"docs_link": "Dokumentation",
"home_support": "<p>Das Entwicklerteam profitiert in keiner Weise von Daten der Nutzer. Dies ist Teil einer Vision für Online-Dienste, die die Privatsphäre respektieren. Im Gegensatz zu den großen Plattformen, die vorgeben, \"kostenlos\" zu sein, während sie mit persönlichen Daten Profit machen, möchten wir ein nachhaltiges Modell aufbauen, das freiwillig von den Nutzern finanziert wird.</p><p>Du kannst das Projekt unterstützen, indem du eine einmalige oder regelmäßige Spende über Open Collective machst. Unser Budget ist transparent und wird regelmäßig aktualisiert. Es gibt auch mehrere <a href=\"https://docs.cryptpad.fr/de/how_to_contribute.html\" rel=\"noopener noreferrer\" target=\"_blank\">nicht-finanzielle Möglichkeiten, sich zu beteiligen</a>.</p>",
"home_support": "<p>Das Entwicklerteam profitiert in keiner Weise von Daten der Nutzer. Dies ist Teil einer Vision für Online-Dienste, die die Privatsphäre respektieren. Im Gegensatz zu den großen Plattformen, die vorgeben, \"kostenlos\" zu sein, während sie mit persönlichen Daten Profit machen, möchten wir ein nachhaltiges Modell aufbauen, das freiwillig von den Nutzern finanziert wird.</p><p>Du kannst das Projekt unterstützen, indem du eine einmalige oder regelmäßige Spende über Open Collective machst. Unser Budget ist transparent und wird regelmäßig aktualisiert. Es gibt auch mehrere <a>nicht-finanzielle Möglichkeiten, sich zu beteiligen</a>.</p>",
"home_privacy_text": "CryptPad wurde entwickelt, um Zusammenarbeit zu ermöglichen und gleichzeitig die Daten zu schützen. Alle Inhalte werden in deinem Browser verschlüsselt und entschlüsselt. Das bedeutet, dass Dokumente, Chats und Dateien außerhalb der Sitzung, in der du angemeldet bist, nicht lesbar sind. Selbst die Administratoren des Dienstes haben keinen Zugriff auf deine Daten.",
"home_privacy_title": "Eingebauter Datenschutz",
"home_opensource_title": "Open Source",
@ -1189,5 +1154,32 @@
"oo_lostEdits": "Leider konnten deine letzten ungespeicherten Bearbeitungen nach dem Synchronisieren neuer Inhalte nicht wiederhergestellt werden.",
"fm_cantUploadHere": "Hochladen hier nicht möglich",
"importError": "Import fehlgeschlagen (falsches Format)",
"toolbar_degraded": "Derzeit bearbeiten über {0} Benutzer dieses Dokument. Die Benutzerliste und der Chat wurden deaktiviert, um die Performance zu verbessern."
"toolbar_degraded": "Derzeit bearbeiten über {0} Benutzer dieses Dokument. Die Benutzerliste und der Chat wurden deaktiviert, um die Performance zu verbessern.",
"admin_maintenanceButton": "Wartungsarbeiten planen",
"admin_maintenanceTitle": "Wartungsarbeiten",
"broadcast_maintenance": "Zwischen <b>{0}</b> und <b>{1}</b> sind Wartungsarbeiten geplant. Zu dieser Zeit ist CryptPad möglicherweise nicht verfügbar.",
"broadcast_start": "Beginn",
"settings_deleteContinue": "Meinen Account löschen",
"settings_deleteWarning": "Warnung: Du hast derzeit ein Premium-Abo abgeschlossen (bezahlt oder von einem anderen Benutzer zur Verfügung gestellt). Bitte kündige dein Abo, bevor du dein Account löschst. Denn sobald dein Account gelöscht wurde, ist eine Kündigung nur noch über Kontaktaufnahme mit dem Support möglich.",
"broadcast_translations": "Übersetzungen",
"admin_broadcastButton": "Senden",
"broadcast_newSurvey": "Eine neue Umfrage ist verfügbar. Zum Öffnen anklicken.",
"admin_surveyTitle": "Umfrage",
"broadcast_end": "Ende",
"settings_deleteSubscription": "Meine Abonnements verwalten",
"broadcast_surveyURL": "Link zur Umfrage",
"admin_surveyActive": "Umfrage öffnen",
"admin_surveyCancel": "Entfernen",
"admin_surveyButton": "Umfrage speichern",
"broadcast_defaultLanguage": "Standardmäßig diese Sprache verwenden",
"admin_broadcastTitle": "Mitteilung",
"admin_cat_broadcast": "Ankündigungen",
"admin_surveyHint": "Eine externe Umfrage hinzufügen, ändern oder löschen. Die Benutzer werden eine Benachrichtigung erhalten und die Umfrage bleibt über das Benutzermenü verfügbar.",
"admin_maintenanceHint": "Plane Wartungsarbeiten auf dieser Instanz und benachrichtige alle Benutzer. Es kann maximal eine aktive Wartung geben.",
"broadcast_newCustom": "Mitteilung der Administratoren",
"admin_broadcastCancel": "Mitteilung löschen",
"admin_broadcastActive": "Aktive Mitteilung",
"admin_broadcastHint": "Sende eine Mitteilung an alle Benutzer auf dieser Instanz. Alle existierenden und neue Benutzer werden sie als Benachrichtigung erhalten. Du kannst sie mit <b>Vorschau der Benachrichtigung</b> überprüfen. Die Vorschau ist mit einem roten Symbol gekennzeichnet und nur für dich sichtbar.",
"broadcast_preview": "Vorschau der Benachrichtigung",
"admin_maintenanceCancel": "Wartungsarbeiten stornieren"
}

@ -40,7 +40,6 @@
"editor": "Συντάκτης",
"userlist_offline": "Είσαστε προς το παρόν εκτός σύνδεσης, η λίστα χρηστών δεν είναι διαθέσιμη.",
"language": "Γλώσσα",
"newVersion": "<b>To CryptPad αναβαθμίστηκε!</b><br>Δείτε τι καινούριο υπάρχει στην πιο πρόσφατη έκδοση:<br><a href=\"https://github.com/xwiki-labs/cryptpad/releases/tag/{0}\" target=\"_blank\">Σημειώσεις κυκλοφορίας του CryptPad {0}</a>",
"upgrade": "Αναβάθμιση",
"upgradeAccount": "Αναβάθμιση λογαριασμού",
"MB": "MB",
@ -192,7 +191,6 @@
"contacts_fetchHistory": "Ανάκτηση παλαιότερου ιστορικού",
"fm_rootName": "Έγγραφα",
"fm_trashName": "Σκουπίδια",
"fm_unsortedName": "Αταξινόμητα",
"fm_filesDataName": "Όλα τα αρχεία",
"fm_templateName": "Πρότυπα",
"fm_searchName": "Αναζήτηση",
@ -227,7 +225,6 @@
"fm_info_recent": "Λίστα των πρόσφατα τροποποιημένων ή ανοιγμένων pads.",
"fm_info_trash": "Αδειάστε τον κάδο σας για να απελευθερώσετε χώρο στο CryptDrive σας.",
"fm_info_anonymous": "Δεν έχετε συνδεθεί, οπότε τα pads σας θα διαγραφούν μετά από 3 μήνες (<a href=\"https://blog.cryptpad.fr/2017/05/17/You-gotta-log-in/\" target=\"_blank\">μάθετε περισσότερα</a>). <a href=\"/register/\">Εγγραφείτε</a> ή <a href=\"/login/\">Συνδεθείτε</a> για να τα κρατήσετε επ' αόριστον.",
"fm_alert_anonymous": "Γεια σας! Αυτή τη στιγμή χρησιμοποιείτε το CryptPad ανώνυμα, αυτό είναι ok αλλά τα pads σας ίσως διαγραφούν μετά από ένα διάστημα αδράνειας. Έχουμε απενεργοποιήσει προηγμένες λειτουργίες του αποθηκευτικού χώρου για τους ανώνυμους χρήστες επειδή θέλουμε να καταστήσουμε ξεκάθαρο πως δεν είναι ένα ασφαλές μέρος για να αποθηκεύετε πράγματα. Μπορείτε να <a href=\"https://blog.cryptpad.fr/2017/05/17/You-gotta-log-in/\" target=\"_blank\">διαβάσετε περισσότερα</a> σχετικά με το γιατί το κάνουμε αυτό και γιατί θα έπρεπε να <a href=\"/register/\">Εγγραφείτε</a> ή να <a href=\"/login/\">Συνδεθείτε</a>.",
"fm_error_cantPin": "Εσωτερικό σφάλμα διακομιστή. Παρακαλούμε επαναφορτώστε τη σελίδα και προσπαθήστε ξανά.",
"fm_viewListButton": "Προβολή λίστας",
"fm_viewGridButton": "Προβολή πλέγματος",
@ -352,20 +349,6 @@
"whatis_title": "Τι είναι το CryptPad",
"whatis_collaboration": "Γρήγορη, εύκολη συνεργασία",
"whatis_drive": "Οργάνωση με το CryptDrive",
"policy_title": "Πολιτική απορρήτου του CryptPad",
"policy_whatweknow": "Τι γνωρίζουμε για εσάς",
"policy_whatweknow_p1": "Ως εφαρμογή η οποία φιλοξενείται στο διαδίκτυο, το CryptPad έχει πρόσβαση στα μεταδεδομένα που είναι εκτεθειμένα από το πρωτόκολλο HTTP. Αυτό συμπεριλαμβάνει την διεύθυνση IP σας και ποικίλες HTTP κεφαλίδες που μπορούν να χρησιμοποιηθούν για να ταυτοποιήσουν τον συγκεκριμένο περιηγητή. Μπορείτε να δείτε τι πληροφορίες μοιράζεται ο περιηγητής σας με το να επισκεφθείτε <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending\" title=\"what http headers is my browser sending\">WhatIsMyBrowser.com</a>.",
"policy_howweuse": "Πώς χρησιμοποιούμε αυτά που μαθαίνουμε",
"policy_howweuse_p1": "Χρησιμοποιούμε αυτές τις πληροφορίες για να παίρνουμε καλύτερες αποφάσεις σχετικά με την προώθηση του CryptPad, εξετάζοντας ποιες από τις προηγούμενες προσπάθειές μας υπήρξαν επιτυχείς. Οι πληροφορίες σχετικά με την τοποθεσία σας μας βοηθούν στο να σκεφτούμε αν θα έπρεπε να παρέχουμε καλύτερη υποστήριξη για γλώσσες εκτός των Αγγλικών.",
"policy_howweuse_p2": "Οι πληροφορίες σχετικά με τον περιηγητή σας (είτε είναι επιτραπέζιου είτε φορητού λειτουργικού συστήματος) μας βοηθάνε να παίρνουμε αποφάσεις στο θέμα προτεραιοτήτων βελτίωσης χαρακτηριστικών. Η ομάδα προγραμματισμού μας είναι μικρή και προσπαθούμε να κάνουμε επιλογές οι οποίες θα βελτιώσουν την εμπειρία όσων το δυνατό περισσότερων χρηστών.",
"policy_whatwetell": "Τι λέμε σε άλλους για εσάς",
"policy_whatwetell_p1": "Δεν παρέχουμε σε τρίτους τις πληροφορίες που συλλέγουμε ή τις πληροφορίες που μας δίνετε εκτός κι αν είμαστε υποχρεωμένοι νομικά.",
"policy_links": "Σύνδεσμοι σε άλλες σελίδες",
"policy_links_p1": "Αυτή η ιστοσελίδα περιέχει συνδέσμους προς άλλες σελίδες, συμπεριλαμβανομένων αυτών που δημιουργήθηκαν από άλλους οργανισμούς. Δεν είμαστε υπεύθυνοι για την πολιτική απορρήτου ή το περιεχόμενο μιας εξωτερικής σελίδας. Ως γενικό κανόνα έχουμε πως οι σύνδεσμοι σε διαφορετικές σελίδες ανοίγουν σε καινούριο παράθυρο για να είναι ξεκάθαρο ότι φεύγετε από το CryptPad.fr.",
"policy_ads_p1": "Δεν προβάλουμε διαφημίσεις εντός της υπηρεσίας, όμως μπορεί να παρέχουμε συνδέσμους στους ανθρώπους που ενισχύουν οικονομικά την έρευνά μας.",
"policy_choices": "Οι επιλογές που έχετε",
"policy_choices_open": "Ο κώδικάς μας διατίθεται ελεύθερα, οπότε έχετε πάντα την επιλογή να φιλοξενήσετε το Cryptpad σε δικό σας διακομιστή.",
"policy_choices_vpn": "Εάν θέλετε να χρησιμοποιήσετε τη δική μας εκδοχή του Cryptpad, αλλά δεν θέλετε να φαίνεται η IP διεύθυνσή σας, μπορείτε να προστατέψετε την IP σας χρησιμοποιώντας το <a href=\"https://www.torproject.org/projects/torbrowser.html.en\" title=\"downloads from the Tor project\" target=\"_blank\" rel=\"noopener noreferrer\">Tor browser bundle</a>, ή ένα <a href=\"https://riseup.net/en/vpn\" title=\"VPNs provided by Riseup\" target=\"_blank\" rel=\"noopener noreferrer\">VPN</a>.",
"tos_title": " Όροι και Προϋποθέσεις του CryptPad",
"tos_legal": "Παρακαλούμε μην κάνετε κακή χρήση ή/και κατάχρηση της υπηρεσίας ή οτιδήποτε παράνομο.",
"tos_availability": "Ελπίζουμε να βρείτε χρήσιμη αυτή την υπηρεσία, αλλά η προσβασιμότητα κι η απόδοση δεν μπορούν να εγγυηθούν. Παρακαλούμε κάνετε εξαγωγή των δεδομένων σας συχνά.",
@ -376,25 +359,8 @@
"header_logoTitle": "Μετάβαση στο CryptDrive σας",
"header_homeTitle": "Μετάβαση στην αρχική σελίδα του CryptPad",
"driveReadmeTitle": "Τι είναι το CryptPad;",
"readme_welcome": "Καλωσήρθατε στο CryptPad!",
"readme_p1": "Καλωσήρθατε στο CryptPad, όπου μπορείτε να έχετε τις σημειώσεις σας μόνοι σας ή με φίλους.",
"readme_p2": "Αυτό το pad έχει έναν γρήγορο οδηγό χρήσης του πως να χρησιμοποιήσετε το CryptPad για να κρατάτε σημειώσεις, να τις έχετε οργανωμένες και να δουλέψετε πάνω τους συνεργατικά.",
"readme_cat1": "Μάθετε το CryptDrive σας",
"readme_cat1_l1": "Δημιούργηστε ένα pad: Στο CryptDrive σας, κάντε \"κλικ\" στο {0} και έπειτα στο {1} και μπορείτε να δημιουργήσετε ένα pad.",
"readme_cat1_l2": "Ανοίξτε pads από το CryptDrive σας: κάντε διπλό \"κλικ\" σε ένα εικονίδιο pad για να το ανοίξετε.",
"readme_cat1_l3": "Οργάνωστε τα pads σας: Όταν είσαστε συνδεδεμένοι, κάθε pad στο οποίο έχετε πρόσβαση θα εμφανίζεται ως {0} στο τμήμα του δίσκου σας.",
"readme_cat1_l3_l1": "Μπορείτε να κάνετε \"κλικ\" και να σύρετε αρχεία μέσα σε φακέλους στον τομέα {0} του δίσκου σας και να δημιουργήσετε καινούρια αρχεία.",
"readme_cat1_l3_l2": "Θυμηθείτε να δοκιμάζετε το δεξί \"κλικ\" στα εικονίδια διότι συχνά υπάρχουν επιπρόσθετα μενού.",
"readme_cat1_l4": "Πετάξτε τα παλιά pads στα σκουπίδια: Μπορείτε να κάνετε \"κλικ\" και να σύρετε τα pads μέσα στα {0} με τον ίδιο τρόπο που τα σύρετε μέσα στους φακέλους.",
"readme_cat2": "Δημιουργείστε pads σαν επαγγελματίας",
"edit": "επεξεργασία",
"view": "προβολή",
"readme_cat2_l1": "Το κουμπί {0} στο pad σας επιτρέπει να δίνετε πρόσβαση στους συνεργάτες σας είτε να κάνουν {1} είτε να κάνουν {2} το pad.",
"readme_cat2_l2": "Αλλάξτε τον τίτλο του pad κάνοντας \"κλικ\" στο μολύβι",
"readme_cat3": "Ανακαλύψτε CryptPad εφαρμογές",
"readme_cat3_l1": "Με το CryptPad code editor, μπορείτε να συνεργαστείτε σε κώδικα όπως οι γλώσσες προγραμματισμού Javascript και markdown ή HTML και Markdown",
"readme_cat3_l2": "Με το CryptPad slide editor, μπορείτε να κάνετε γρήγορες παρουσιάσεις χρησιμοποιώντας γλώσσα Markdown",
"readme_cat3_l3": "Με το CryptPoll μπορείτε να ψηφίζετε γρήγορα, ειδικά για να ορίζετε συναντήσεις σε ημερομηνίες που ταιριάζουν με το πρόγραμμα όλων",
"feedback_about": "Εάν το διαβάζετε αυτό, πιθανότατα ήσασταν περίεργοι για ποιο λόγο το CryptPad ζητά ιστοσελίδες όταν κάνετε συγκεκριμένες ενέργειες",
"feedback_privacy": "Ενδιαφερόμαστε για την ιδιωτικότητά σας και ταυτόχρονα θέλουμε το CryptPad να είναι πολύ εύκολο στην χρήση. Χρησιμοποιούμε αυτό το αρχείο για να καταλάβουμε ποια χαρακτηριστικά του περιβάλλοντος διάδρασης ενδιαφέρουν τους χρήστες μας, με το να το ζητήσουμε σε συνδυασμό με μια παράμετρο η οποία μας δείχνει συγκεκριμένα ποια ενέργεια έγινε.",
"feedback_optout": "Εάν θα θέλατε να απέχετε, επισκεφθείτε <a href='/settings/'>τη σελίδα ρυθμίσεων</a> του λογαριασμού σας, όπου θα βρείτε ένα κουτί στο οποίο μπορείτε να ενεργοποιήσετε ή να απενεργοποιήσετε την αναπληροφόρηση"

@ -51,21 +51,6 @@
"button_newcode": "Crear nuevo pad de código",
"button_newpoll": "Crear nueva encuesta",
"button_newslide": "Crear nueva presentación",
"policy_title": "Política de privacidad Cryptpad",
"policy_whatweknow": "Qué sabemos sobre tí",
"policy_whatweknow_p1": "Como cualquier aplicación que está en la red, Cryptpad tiene acceso a los metadatos expuestos por el protocolo HTTP. Esto incluye tu dirección IP, y otros headers HTTP que pueden ser utilizados para identificar a tu navegador propio. Puedes ver la información que comparte tu navegador visitando <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending\" title=\"Qué headers HTTP esta compartiendo mi navegador\">WhatIsMyBrowser.com</a> (página en inglés).",
"policy_howweuse": "Cómo usamos lo que aprendemos",
"policy_howweuse_p1": "Usamos esta información para tomar mejores decisiones para promocionar Cryptpad, para evaluar cuáles de nuestros esfuerzos han sido exitosos. La información sobre tu ubicación nos permite saber si deberíamos considerar mejor soporte para idiomas diferentes al inglés.",
"policy_howweuse_p2": "La información sobre tu navegador (en escritorio o móvil) nos ayuda a saber qué características que debemos mejorar. Nuestro equipo de desarrollo es pequeño, e intentamos tomar decisiones que beneficien a la experiencia de la mayoría de nuestros usuarios.",
"policy_whatwetell": "Lo que decimos a otros sobre tí",
"policy_whatwetell_p1": "No suministramos la información que recolectamos a terceros a menos de estar legalmente obligados a hacerlo.",
"policy_links": "Enlaces a otras páginas",
"policy_links_p1": "Esta web contiene enlaces a otros sitios, incluyendo algunos producidos por otras organizaciones. No somos responsables del tratamiento de la privacidad de los datos ni el contenido de páginas externas. Como regla general, los enlaces externos se abren en una nueva pestaña del navegador, para clarificar que estás abandonando a Cryptpad.fr.",
"policy_ads": "Anuncios",
"policy_ads_p1": "Nosotros no mostramos anuncios, pero podemos poner enlaces a las organizaciones que financian nuestro trabajo de investigación.",
"policy_choices": "Lo que puedes hacer",
"policy_choices_open": "Nuestro código fuente es abierto para que siempre tengas la opción de desplegar tu propia instancia de Cryptpad.",
"policy_choices_vpn": "Si deseas utilizar nuestra instancia, pero no deseas exponer tu dirección IP, puedes protegerla utilizando <a href=\"https://www.torproject.org/projects/torbrowser.html.en\" title=\"descargas Tor project\" target=\"_blank\" rel=\"noopener noreferrer\">el navegador Tor</a>, o un <a href=\"https://riseup.net/en/vpn\" title=\"VPNs por Riseup\" target=\"_blank\" rel=\"noopener noreferrer\">VPN</a>.",
"tos_title": "Condiciones de servicio Cryptpad",
"tos_legal": "Por favor, no seas malicioso, abusivo o hagas algo ilegal.",
"tos_availability": "Esperamos que este servicio te parezca útil, pero nuestra disponibilidad o rendimiento no pueden ser garantizados. Por favor, exporta tus datos regularmente.",
@ -90,7 +75,6 @@
"poll_commit": "Validar",
"fm_rootName": "Documentos",
"fm_trashName": "Papelera",
"fm_unsortedName": "Sin organizar",
"fm_filesDataName": "Todos los archivos",
"fm_templateName": "Plantilla",
"fm_newButton": "Nuevo",
@ -140,7 +124,7 @@
"login_invalPass": "Contraseña requerida",
"login_unhandledError": "Ha ocurrido un error inesperado :(",
"register_importRecent": "Importar documentos de su sesión no registrada",
"register_acceptTerms": "Acepto los <a href='/terms.html' tabindex='-1'>términos de servicio</a>",
"register_acceptTerms": "Acepto los <a>términos de servicio</a>",
"register_passwordsDontMatch": "Las contraseñas no corresponden",
"register_mustAcceptTerms": "Tienes que aceptar los términos de servicio",
"register_header": "Registrar",
@ -159,7 +143,7 @@
"privacy": "Política de privacidad",
"contact": "Contacto",
"terms": "Términos de Servicio",
"movedToTrash": "Este pad fue movido a la papelera.<br><a href\"/drive/\">Acceder a mi Drive</a>",
"movedToTrash": "Este pad fue movido a la papelera.<br><a>Acceder a mi Drive</a>",
"fm_newFile": "Nuevo pad",
"fm_type": "Tipo",
"fm_categoryError": "No se pudo abrir la categoría seleccionada, mostrando la raíz.",
@ -169,25 +153,8 @@
"settings_anonymous": "No has iniciado sesión. Tus ajustes se aplicarán sólo a este navegador.",
"blog": "Blog",
"driveReadmeTitle": "¿Qué es CryptPad?",
"readme_welcome": "¡Bienvenido a CryptPad!",
"readme_p1": "Bienvenido a CryptPad, aquí es donde puedes tomar nota de las cosas solo y con tus contactos.",
"readme_p2": "Este pad es una guía rápida para aprender a usar a CryptPad para tomar notas, organizarlas y trabajar con más personas.",
"readme_cat1": "Conoce tu CryptDrive",
"readme_cat1_l1": "Crea un pad: En CryptDrive, haz clic en {0} y luego en {1} para crear un pad.",
"readme_cat1_l2": "Abrir pads desde CryptDrive: haz doble clic en un icono para abrirlo.",
"readme_cat1_l3": "Organiza tus pads: Cuando has iniciado sesión, cada pad al que accedes se quedará en tu drive en {0}.",
"readme_cat1_l3_l1": "Puedes hacer clic y arrastrar archivos en carpetas desde {0}, y crear nuevas carpetas.",
"readme_cat1_l3_l2": "Recuerda hacer clic derecho en los iconos, ya que suele haber menús adicionales.",
"readme_cat1_l4": "Elimina tus viejos pads: Haz clic y arrastra tus pads en la {0} de la misma manera que lo harías con carpetas.",
"readme_cat2": "Haz pads como un pro",
"edit": "editar",
"view": "ver",
"readme_cat2_l1": "El botón {0} en tu pad te permite dar acceso a colaboradores para {1} o {2} el pad.",
"readme_cat2_l2": "Cambia el título del pad haciendo clic en el lápiz",
"readme_cat3": "Descubre las apps CryptPad",
"readme_cat3_l1": "Con el editor de código CryptPad, puedes colaborar en código fuente, como por ejemplo JavaScript y Markdown",
"readme_cat3_l2": "Con los slides CryptPad, puedes hacer presentaciones rápidas con Markdown",
"readme_cat3_l3": "Con CryptPoll puedes hacer una encuesta rápida, especialmente útil para programar un horario que conviene a todo el mundo",
"settings_resetError": "Verificación no válida. Tu CryptDrive no fue cambiado.",
"saved": "Guardado",
"printButton": "Imprimir",
@ -202,14 +169,14 @@
"settings_importDone": "Importación terminada",
"feedback_about": "Si estas leyendo esto, quizás sientas curiosidad por saber por qué CryptPad solicita páginas cuando realizas algunas acciones",
"feedback_privacy": "Nos importa tu privacidad, y al mismo tiempo queremos que CryptPad sea muy fácil de usar. Utilizamos este archivo para conocer las funcionalidades que importan a nuestros usuarios, pidiéndolo con un parametro que nos dice qué acción fue realizada.",
"feedback_optout": "Si quieres darte de baja, visita <a href='/settings/'>tus preferencias</a>, donde podrás activar o desactivar el feedback",
"feedback_optout": "Si quieres darte de baja, visita <a>tus preferencias</a>, donde podrás activar o desactivar el feedback.",
"fm_searchName": "Buscar",
"fm_searchPlaceholder": "Buscar...",
"fm_newButtonTitle": "Crear un nuevo documento o carpeta.",
"fm_openParent": "Mostrar en carpeta",
"register_writtenPassword": "He escrito mi usuario y contraseña, continuar",
"register_cancel": "Cancelar",
"register_warning": "<i class='fa fa-warning'></i> Advertencia",
"register_warning": "Advertencia",
"register_alreadyRegistered": "Este usuario ya existe, ¿iniciar sesión?",
"button_newwhiteboard": "Nueva Pizarra",
"saveTemplateButton": "Guardar como plantilla",
@ -248,11 +215,9 @@
"upload_serverError": "Error: no se pudo subir tu archivo en este momento.",
"upload_uploadPending": "Ya tienes una subida en progreso. ¿Cancelar y subir el nuevo archivo?",
"upload_success": "Tu archivo ({0}) ha sido subido con éxito y fue añadido a tu drive.",
"newVersion": "<b>CryptPad ha sido actualizado!</b><br>Puedes ver lo que ha cambiado aquí (en inglés):<br><a href=\"https://github.com/xwiki-labs/cryptpad/releases/tag/{0}\" target=\"_blank\">Notas de versión para CryptPad {0}</a>",
"pinLimitReachedAlertNoAccounts": "Has llegado a tu límite de espacio",
"previewButtonTitle": "Mostrar/esconder la vista previa Markdown",
"fm_info_anonymous": "No has iniciado sesión, por lo que tus documentos expirarán después de {0} días. Borrar el historial de tu navegador puede hacer que desaparezcan.<br><a href=\"/register/\">Inscríbete</a> (no se requieren datos personales) o <a href=\"/login/\">Ingresa</a> para almacenarlos en tu disco de forma indefinida. <a href=\"https://docs.cryptpad.fr/en/user_guide/user_account.html#account-types\" target=\"_blank\">Más información sobre las cuentas registradas</a>.",
"fm_alert_anonymous": "Hola, estás usando CryptPad anónimamente. Está bien, pero tus pads pueden ser borrados después de un périodo de inactividad. Hemos desactivado funciones avanzadas de CryptDrive para usuarios anónimos porque queremos dejar claro que no es un lugar seguro para almacenar cosas. Puedes <a href=\"https://blog.cryptpad.fr/2017/05/17/You-gotta-log-in/\" target=\"_blank\">leer este articulo</a> (en inglés) acerca de por qué hacemos esto y por qué deberías <a href=\"/register/\">Registrarte</a> e <a href=\"/login/\">Iniciar sesión</a>.",
"fm_error_cantPin": "Error del servidor. Por favor, recarga la página e inténtalo de nuevo.",
"upload_notEnoughSpace": "No tienes suficiente espacio para este archivo en tu CryptDrive",
"upload_tooLarge": "Este archivo supera el límite de carga permitido por tu cuenta.",
@ -265,7 +230,7 @@
"poll_locked": "Cerrado",
"poll_unlocked": "Abierto",
"common_connectionLost": "<b>Conexión perdida</b><br>El documento está ahora en modo sólo lectura hasta que la conexión vuelva.",
"pinLimitReachedAlert": "Has llegado a tu límite de espacio. Los nuevos pads no serán guardados en tu CryptDrive.<br>Puedes eliminar pads de tu CryptDrive o <a href=\"https://accounts.cryptpad.fr/#!on={0}\" target=\"_blank\">suscribirte a una oferta premium</a> para obtener más espacio.",
"pinLimitReachedAlert": "Has llegado a tu límite de espacio. Los nuevos pads no serán guardados en tu CryptDrive.<br>Puedes eliminar pads de tu CryptDrive o <a>suscribirte a una oferta premium</a> para obtener más espacio.",
"fm_info_trash": "Vacía tu papelera para liberar espacio en tu CryptDrive.",
"upload_mustLogin": "Tienes que estar conectado para subir archivos",
"uploadButton": "Subir",
@ -349,7 +314,7 @@
"invalidHashError": "El documento que has solicitado tiene una URL invalida.",
"errorCopy": " Aún puedes acceder al contenido presionando <em>Esc</em>.<br>Una vez que cierres esta ventana no te será posible acceder a ella nuevamente.",
"errorRedirectToHome": "Presiona<em>Esc</em>para ser redirigido a tu Cryptdrive.",
"newVersionError": "Una nueva versión de CryptPad está disponible.<br><a href='#'>Recargar</a> para usar la nueva versión, o presiona escape para acceder a tu contenido en <b>modo offline</>.",
"newVersionError": "Una nueva versión de CryptPad está disponible.<br><a href='#'>Recargar</a> para usar la nueva versión, o presiona escape para acceder a tu contenido en <b>modo offline</b>.",
"deletedFromServer": "Nota borrada",
"mustLogin": "Debes haber ingresado a tu cuenta para acceder a esta página",
"disabledApp": "Esta nota ha sido eliminada por inactividad. Presione Esc para crear una nueva nota.",
@ -372,7 +337,7 @@
"tags_title": "Etiquetas (sólo para tí)",
"tags_add": "Actualizar las etiquetas para los pads seleccionados",
"tags_notShared": "Tus etiquetas no están compartidas con otros usuarios",
"tags_duplicate": "Duplicar etiquetas:{0}",
"tags_duplicate": "Duplicar etiquetas: {0}",
"tags_noentry": "No puedes etiquetar una nota eliminada!",
"slide_invalidLess": "Estilo personalizado no válido",
"ok": "OK",
@ -426,7 +391,7 @@
"fm_deleteOwnedPad": "Está seguro que quiere remover esta nota del servidor de manera permanente?",
"fm_deleteOwnedPads": "Está seguro que quiere remover estas notas del servidor de manera permanente?",
"fm_info_recent": "Estas notas han sido abiertas o modificadas recientemente por ti o por tus colaboradores.",
"fm_info_sharedFolder": "Esta es una carpeta compartida. Usted no ha ingresado a su cuenta por lo que solo tiene acceso en modo solo lectura. <br><a href=\"/registrarse/\">ingresar</a> o <a href=\"/ingresar/\">ingresar</a> para poder importarla a su Cryptdrive y modificarla.",
"fm_info_sharedFolder": "Esta es una carpeta compartida. Usted no ha ingresado a su cuenta por lo que solo tiene acceso en modo solo lectura. <br><a href=\"/register/\">ingresar</a> o <a href=\"/login/\">ingresar</a> para poder importarla a su Cryptdrive y modificarla.",
"fm_info_owned": "Usted es el dueño de las notas que se presentan. Esto significa que puede removerlas de manera permanente del servidor cuando lo desee. Si lo hace, los otros usuarios no podrán acceder a ellas nunca más.",
"fm_renamedPad": "Ha definido un nombre personalizado para esta nota. El título que se comparte es: br><b>{0}</b>",
"fm_canBeShared": "Esta carpeta puede ser compartida",

@ -59,7 +59,6 @@
"editor": "muokkaaja",
"userlist_offline": "Olet offline-tilassa. Käyttäjälista ei ole saatavilla.",
"language": "Kieli",
"newVersion": "<b>CryptPad on päivitetty!</b><br>Tutustu uusimman version muutoksiin:<br>a href=\"https://github.com/xwiki-labs/cryptpad/releases/tag/{0}\" target=\"_blank\">Julkaisutiedot: CryptPad {0}</a>",
"upgrade": "Päivitä",
"upgradeAccount": "Päivitä tili",
"storageStatus": "Tallennustila:<br /><b>{0}</b> käytetty <b>{1}</b>",
@ -70,7 +69,7 @@
"formattedGB": "{0} Gt",
"formattedKB": "{0} Kt",
"pinLimitReached": "Olet saavuttanut tallennustilarajoituksesi",
"pinLimitReachedAlert": "Olet saavuttanut tallennustilarajoituksesi. Luomiasi uusia padeja ei tallenneta CryptDriveesi. <br> Voit joko poistaa olemassaolevia padeja CryptDrivestasi tai <a href=\"https://accounts.cryptpad.fr/#!on={0}\" target=\"_blank\">päivittää premium-tiliin</a> nostaaksesi tallennustilarajoitusta.",
"pinLimitReachedAlert": "Olet saavuttanut tallennustilarajoituksesi. Luomiasi uusia padeja ei tallenneta CryptDriveesi. <br> Voit joko poistaa olemassaolevia padeja CryptDrivestasi tai <a>päivittää premium-tiliin</a> nostaaksesi tallennustilarajoitusta.",
"pinLimitReachedAlertNoAccounts": "Olet saavuttanut tallennustilarajoituksesi",
"pinLimitNotPinned": "Olet saavuttanut tallennustilarajoituksesi.<br>Tätä padia ei tallenneta CryptDriveesi.",
"pinLimitDrive": "Olet saavuttanut tallennustilarajoituksesi.<br>Et voi luoda uusia padeja.",
@ -87,7 +86,7 @@
"saveTitle": "Tallenna otsikko (Enter)",
"forgetButton": "Poista",
"forgetPrompt": "OK:n napsauttaminen siirtää padin roskakoriin. Oletko varma?",
"movedToTrash": "Padi on siirretty roskakoriin.<br><a href=\"/drive/\">Siirry Driveen</a>",
"movedToTrash": "Padi on siirretty roskakoriin.<br><a>Siirry Driveen</a>",
"shareButton": "Jaa",
"shareSuccess": "Linkki kopioitu leikepöydälle",
"userListButton": "Käyttäjälista",
@ -247,7 +246,6 @@
"contacts_online": "Toinen käyttäjä tästä keskusteluhuoneesta on online-tilassa",
"fm_rootName": "Asiakirjat",
"fm_trashName": "Roskakori",
"fm_unsortedName": "Järjestelemättömät tiedostot",
"fm_filesDataName": "Kaikki tiedostot",
"fm_templateName": "Mallipohjat",
"fm_searchName": "Haku",
@ -291,7 +289,6 @@
"fm_info_anonymous": "Et ole kirjautunut sisään, joten luomasi asiakirjat vanhenevat {0} päivän päästä. Selaushistorian tyhjentäminen saattaa myös hävittää ne.<br><a href=\"/register/\">Rekisteröidy</a> (henkilötietoja ei tarvita) tai <a href=\"/login/\">kirjaudu sisään</a> säilyttääksesi luomasi asiakirjat pysyvästi CryptDrivessa. <a href=\"https://docs.cryptpad.fr/en/user_guide/user_account.html#account-types\" target=\"_blank\">Lue lisää rekisteröitymisestä ja käyttäjätileistä</a>.",
"fm_info_sharedFolder": "Tämä on jaettu kansio. Et ole kirjautunut sisään, joten voit käyttää sitä ainoastaan vain luku-tilassa.<br><a href=\"/register/\">Rekisteröidy</a> tai <a href=\"/login/\">kirjaudu sisään</a> tuodaksesi kansion omaan CryptDriveesi ja muokataksesi sen sisältöä.",
"fm_info_owned": "Omistat tässä näytetyt padit. Se tarkoittaa, että voit halutessasi poistaa ne palvelimelta. Jos teet niin, muut käyttäjät eivät voi enää käyttää niitä.",
"fm_alert_anonymous": "Hei, käytät tällä hetkellä CryptPadia anonyyminä. Voit tietenkin tehdä niin, mutta padisi voidaan poistaa käyttämättömyyden seurauksena. Jotkin Driven edistyneet toiminnot eivät ole saatavilla anonyymeille käyttäjille, koska haluamme tehdä selväksi, ettei se ole turvallinen paikka tiedostojen säilytykseen. Voit <a href=\"https://blog.cryptpad.fr/2017/05/17/You-gotta-log-in/\" target=\"_blank\">lukea lisää</a> tästä linjauksesta ja siitä, miksi palveluun kannattaa <a href=\"/register/\">rekisteröityä</a> ja <a href=\"/login/\">kirjautua sisään</a>.",
"fm_error_cantPin": "Sisäinen palvelinvirhe. Ole hyvä ja lataa sivu uudelleen.",
"fm_viewListButton": "Listanäkymä",
"fm_viewGridButton": "Ruudukkonäkymä",
@ -342,7 +339,7 @@
"login_invalPass": "Salasana vaaditaan",
"login_unhandledError": "Tapahtui odottamaton virhe :(",
"register_importRecent": "Tuo rekisteröitymättömänä luodut asiakirjat CryptDriveen",
"register_acceptTerms": "Hyväksyn <a href='/terms.html' tabindex='-1'>käyttöehdot</a>",
"register_acceptTerms": "Hyväksyn <a>käyttöehdot</a>",
"register_passwordsDontMatch": "Salasanat eivät täsmää!",
"register_passwordTooShort": "Salasanan täytyy olla vähintään {0} merkkiä pitkä.",
"register_mustAcceptTerms": "Sinun täytyy hyväksyä käyttöehdot.",
@ -350,7 +347,7 @@
"register_header": "Rekisteröidy",
"register_writtenPassword": "Olen kirjoittanut ylös käyttäjätunnukseni ja salasanani, jatka",
"register_cancel": "Peruuta",
"register_warning": ".<i class='fa fa-warning'></i> Varoitus",
"register_warning": "Varoitus",
"register_alreadyRegistered": "Tämä käyttäjä on jo olemassa, haluatko kirjautua sisään?",
"register_emailWarning0": "Näyttää siltä, että lähetit sähköpostiosoitteesi käyttäjätunnuksenasi.",
"register_emailWarning1": "Voit halutessasi tehdä niin, mutta sitä ei lähetetä palvelimellemme.",
@ -670,20 +667,6 @@
"team_quota": "Tiimisi tallennustilakiintiö",
"settings_codeBrackets": "Sulje sulkeet automaattisesti",
"team_viewers": "Katselijat",
"policy_title": "CryptPad-tietosuojakäytäntö",
"policy_whatweknow": "Mitä tiedämme sinusta",
"policy_whatweknow_p1": "Web-sovelluksena CryptPad voi käyttää HTTP-protokollan paljastamia metatietoja. Nämä sisältävät IP-osoitteesi ja joitakin muita HTTP-otsikoita, joista selaimesi voidaan tunnistaa. Voit selvittää selaimesi jakamat tiedot <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending\" title=\"what http headers is my browser sending\">WhatIsMyBrowser.com-palvelussa</a>.",
"policy_howweuse": "Miten käytämme oppimaamme",
"policy_howweuse_p2": "Tiedot selaimestasi (onko kyseessä työpöytä- vai mobiilikäyttöjärjestelmä) auttavat meitä ominaisuuksien kehittämisen priorisointiin liittyvässä päätöksenteossa. Kehitystiimimme on pieni, ja pyrimme tekemään ratkaisuja, jotka hyödyttävät mahdollisimman suurta osaa käyttäjäkunnastamme.",
"policy_whatwetell": "Mitä kerromme muille sinusta",
"policy_whatwetell_p1": "Emme anna keräämiämme tai antamiasi tietoja kolmansille osapuolille, ellei meillä ole lakisääteistä velvollisuutta tehdä niin.",
"policy_links": "Linkit muille sivuille",
"policy_links_p1": "Tämä sivu sisältää linkkejä muiden organisaatioiden tuottamille sivuille. Emme ole vastuussa ulkopuolisten sivujen yksityisyyskäytännöistä tai sisällöstä. Linkit ulkopuolisille sivustoille avataan pääsääntöisesti uuteen selainikkunaan, jotta CryptPad.fr-sivustolta poistuminen on selkeämpi havaita.",
"policy_ads": "Mainokset",
"policy_ads_p1": "Emme näytä sivustollamme lainkaan verkkomainontaa, mutta voimme sisällyttää linkkejä tutkimustamme rahoittavien tahojen sivuille.",
"policy_choices": "Vaihtoehtosi",
"policy_choices_open": "Lähdekoodimme on avointa, joten voit halutessasi perustaa oman CryptPad-instanssisi.",
"policy_choices_vpn": "Jos haluat käyttää ylläpitämäämme CryptPad-instanssia, mutta et paljastaa IP-osoitettasi, voit suojata sen käyttämällä <a href=\"https://www.torproject.org/projects/torbrowser.html.en\" title=\"downloads from the Tor project\" target=\"_blank\" rel=\"noopener noreferrer\">Tor-selainpakettia</a> tai <a href=\"https://riseup.net/en/vpn\" title=\"VPNs provided by Riseup\" target=\"_blank\" rel=\"noopener noreferrer\">VPN-palvelua</a>.",
"features": "Ominaisuudet",
"features_title": "Ominaisuudet",
"features_anon": "Rekisteröitymätön",
@ -721,7 +704,6 @@
"features_f_supporter_note": "Auta CryptPadia nousemaan taloudellisesti kannattavaksi ja näytä, että yksityisyyttä korostavan, asiakkaiden omasta tahdostaan rahoittaman ohjelmiston tulisi olla normi",
"features_f_subscribe": "Tilaa",
"features_f_subscribe_note": "Tilaamiseen tarvitaan rekisteröity käyttäjätili",
"policy_howweuse_p1": "Käytämme näitä tietoja suunnitellaksemme CryptPadin mainostusta ja arvioidaksemme aiempien kampanjoiden onnistumista. Sijaintitietosi puolestaan kertovat meille, mitä kieliä CryptPadin tulisi mahdollisesti tukea englannin lisäksi.",
"tos_title": "CryptPad-käyttöehdot",
"tos_legal": "Älä ole pahantahtoinen, väärinkäyttäjä tai tee mitään laitonta.",
"tos_availability": "Toivomme sinun pitävän tätä palvelua hyödyllisenä, mutta emme voi taata sen saatavuutta tai suorituskykyä. Viethän tietosi säännöllisesti muualle talteen.",
@ -733,8 +715,6 @@
"header_homeTitle": "Siirry CryptPad-kotisivulle",
"help_genericMore": "Tutustu CryptPadin toimintaan ja ominaisuuksiin <a>dokumentaatiosivuillamme</a>.",
"driveReadmeTitle": "Mikä on CryptPad?",
"readme_welcome": "Tervetuloa CryptPadiin!",
"readme_p1": "Tervetuloa CryptPadiin, täällä voit tehdä muistiinpanoja yksin tai yhteystietojesi kanssa.",
"settings_kanbanTagsOr": "TAI",
"settings_kanbanTagsAnd": "JA",
"settings_kanbanTagsHint": "Valitse, miten haluat tunnistesuodattimen toimivan useita tunnisteita käytettäessä: näytä kortit, jotka sisältävät kaikki valitut tunnisteet (JA) tai näytä kortit, jotka sisältävät jonkun tai jotkin valituista tunnisteista (TAI)",
@ -759,7 +739,7 @@
"info_privacyFlavour": "<a>Tietosuojakäytäntömme</a> kertoo, miten kohtelemme tietojasi.",
"user_about": "Tietoja CryptPadista",
"info_imprintFlavour": "<a>Oikeudellisia tietoja tämän instanssin ylläpitäjistä</a>.",
"settings_safeLinkDefault": "Turvalliset linkit on nyt otettu käyttöön oletusarvoisesti. Käytä <i class=\"fa fa-shhare-alt\"></i> <b>Jaa</b>-valikkoa linkkien kopiointiin selaimesi osoiterivin sijaan.",
"settings_safeLinkDefault": "Turvalliset linkit on nyt otettu käyttöön oletusarvoisesti. Käytä <i></i> <b>Jaa</b>-valikkoa linkkien kopiointiin selaimesi osoiterivin sijaan.",
"support_languagesPreamble": "Tukitiimi puhuu seuraavia kieliä:",
"slide_textCol": "Tekstin väri",
"slide_backCol": "Taustaväri",
@ -869,7 +849,7 @@
"support_formContentError": "Virhe: sisältö on tyhjä",
"support_formTitleError": "Virhe: otsikko on tyhjä",
"support_formButton": "Lähetä",
"support_formHint": "Käytä tätä lomaketta ottaaksesi ylläpitäjiin yhteyttä ongelmatilanteissa tai kysyäksesi kysymyksiä turvallisella tavalla. <br>Joihinkin ongelmiin ja kysymyksiin voi löytyä vastaus <a href=\"https://docs.cryptpad.fr/en/user_guide/index.html\" rel=\"noopener noreferrer\" target=\"_blank\">CryptPad-käyttäjäoppaasta (englanniksi)</a>. Ethän luo uusia tukipyyntöjä, jos sinulla on jo samaan ongelmaan liittyvä avoin tukipyyntö. Kommentoi sen sijaan alkuperäistä tukipyyntöäsi.",
"support_formHint": "Käytä tätä lomaketta ottaaksesi ylläpitäjiin yhteyttä ongelmatilanteissa tai kysyäksesi kysymyksiä turvallisella tavalla. <br>Joihinkin ongelmiin ja kysymyksiin voi löytyä vastaus <a>CryptPad-käyttäjäoppaasta (englanniksi)</a>. Ethän luo uusia tukipyyntöjä, jos sinulla on jo samaan ongelmaan liittyvä avoin tukipyyntö. Kommentoi sen sijaan alkuperäistä tukipyyntöäsi.",
"support_formTitle": "Uusi palvelupyyntö",
"support_cat_new": "Uusi palvelupyyntö",
"support_disabledHint": "Tätä CryptPad-instanssia ei ole konfiguroitu tukilomaketta varten.",
@ -939,7 +919,7 @@
"markdown_toc": "Sisältö",
"survey": "CryptPad-kysely",
"crowdfunding_popup_no": "Ei nyt",
"crowdfunding_popup_text": "<h3>Tarvitsemme apuasi!</h3>Haluatko tukea CryptPadin aktiivista kehitystä? Harkitse projektin tukemista <a href=\"https://opencollective.com/cryptpad\">OpenCollective-sivullamme</a>, jossa voit nähdä <b>tiekarttamme</b> ja <b>rahoitustavoitteemme</b>.",
"crowdfunding_popup_text": "<h3>Tarvitsemme apuasi!</h3>Haluatko tukea CryptPadin aktiivista kehitystä? Harkitse projektin tukemista OpenCollective-sivullamme, jossa voit nähdä <b>tiekarttamme</b> ja <b>rahoitustavoitteemme</b>.",
"crowdfunding_button2": "Auta CryptPadia",
"crowdfunding_button": "Tue CryptPadia",
"autostore_notAvailable": "Sinun täytyy tallentaa tämä padi CryptDriveesi käyttääksesi tätä toimintoa.",
@ -948,7 +928,7 @@
"autostore_error": "Odottamaton virhe: emme voineet tallentaa padia, ole hyvä ja yritä uudestaan.",
"autostore_hide": "Älä tallenna",
"autostore_store": "Tallenna",
"autostore_settings": "Voit ottaa automaattisen padien tallennuksen käyttöön <a href=\"/settings/\">Asetukset</a>-sivulta!",
"autostore_settings": "Voit ottaa automaattisen padien tallennuksen käyttöön <a>Asetukset</a>-sivulta!",
"autostore_notstored": "Tämä {0} ei ole tallennettuna CryptDrivessasi. Haluatko tallentaa sen nyt?",
"autostore_pad": "padi",
"autostore_sf": "kansio",
@ -1004,33 +984,18 @@
"creation_owned1": "<b>Omistettu</b> asiakirja voidaan poistaa palvelimelta omistajan niin halutessa. Omistetun asiakirjan poistaminen poistaa sen myös muiden käyttäjien CryptDriveista.",
"creation_owned": "Omistettu padi",
"creation_404": "Tätä padia ei ole enää olemassa. Käytä seuraavaa lomaketta uuden padin luontiin.",
"feedback_optout": "Jos haluat jättäytyä pois tästä toiminnallisuudesta, voit tehdä sen <a href='/settings/'>Käyttäjäasetukset</a>-sivulta löytyvän käyttäjäpalautevalintaruudun avulla",
"feedback_optout": "Jos haluat jättäytyä pois tästä toiminnallisuudesta, voit tehdä sen <a>Käyttäjäasetukset</a>-sivulta löytyvän käyttäjäpalautevalintaruudun avulla.",
"feedback_privacy": "Välitämme yksityisyydestäsi, ja haluamme samalla tehdä CryptPadista mahdollisimman helppokäyttöisen. Käytämme tätä tiedostoa selvittääksemme, mitkä käyttöliittymätoiminnot ovat tärkeitä käyttäjillemme, pyytämällä sitä tehdyn toiminnon kertovan parametrin yhteydessä.",
"feedback_about": "Jos luet tätä, haluat todennäköisesti tietää, miksi CryptPad lähettää pyyntöjä web-sivuille tiettyjen toimintojen yhteydessä",
"readme_cat3_l3": "CryptPad-kyselyilä voit pitää nopeita äänestyksiä esimerkiksi kokouksien aikataulujen yhteensovittamiseksi",
"readme_cat3_l2": "CryptPad-diaeditorilla voit luoda nopeasti diaesityksiä Markdown-kielellä",
"readme_cat3_l1": "CryptPad-koodieditorilla voit työskennellä yhdessä muiden kanssa koodin, kuten Javascriptin ja Markdownin parissa",
"settings_cat_kanban": "Kanban",
"kanban_body": "Sisältö",
"logoutEverywhere": "Kirjaudu ulos kaikkialta",
"restrictedError": "Sinulla ei ole oikeutta käyttää tätä asiakirjaa",
"safeLinks_error": "Tämä linkki kopioitiin selaimen osoiteriviltä, eikä se anna käyttöoikeutta asiakirjaan. Ole hyvä ja käytä <i class=\"fa fa-shhare-alt\"></i> <b>Jaa</b> -valikkoa jakaaksesi yhteystietojen kanssa tai kopioidaksesi linkin. <a href=\"https://docs.cryptpad.fr/en/user_guide/user_account.html#confidentiality\"> Lue lisää Turvalliset linkit-ominaisuudesta</a>.\n",
"safeLinks_error": "Tämä linkki kopioitiin selaimen osoiteriviltä, eikä se anna käyttöoikeutta asiakirjaan. Ole hyvä ja käytä <i></i> <b>Jaa</b> -valikkoa jakaaksesi yhteystietojen kanssa tai kopioidaksesi linkin. <a> Lue lisää Turvalliset linkit-ominaisuudesta</a>.",
"burnAfterReading_warningAccess": "Tämä asiakirja tuhoaa itsensä. Kun napsautat allaolevaa painiketta, näet sisällön kerran, jonka jälkeen se poistetaan pysyvästi. Kun suljet tämän ikkunan, et pääse enää käyttämään asiakirjan sisältöä. Jos et ole valmis jatkamaan, voit sulkea tämän ikkunan ja tulla myöhemmin takaisin.",
"profile_info": "Muut käyttäjät voivat löytää käyttäjäprofiilisi asiakirjojen käyttäjälistoissa näkyvän avatarin avulla.",
"readme_cat3": "Löydä CryptPad-sovellukset",
"readme_cat2_l2": "Vaihda padin otsikkoa napsauttamalla lyijykynää",
"readme_cat2_l1": "Padistasi löytyvä {0}-painike antaa sinun jakaa yhteistyökumppaneillesi oikeuden [1} tai {2} padia.",
"edit": "muokata",
"view": "katsella",
"readme_cat2": "Luo padeja kuin ammattilainen",
"readme_cat1_l4": "Laita vanhat padit roskakoriin: Voit napsauttaa ja raahata padeja {0}in samalla tavalla kuin raahaisit niitä kansioihin.",
"readme_cat1_l3_l2": "Muista kokeilla hiiren oikeaa painiketta kuvakkeiden päällä, sillä niistä aukeaa usein lisävalikoita.",
"readme_cat1_l3_l1": "Voit napsauttaa ja raahata tiedostoja kansioihin CryptDrivesi {0}-osiossa ja luoda uusia kansioita.",
"readme_cat1_l3": "Järjestele padejasi: Kun olet kirjautuneena sisään, kaikki käyttämäsi padit näytetään CryptDrivesi {0}-osiossa.",
"readme_cat1_l2": "Avaa padeja CryptDrivestasi: kaksoisnapsauta padin kuvaketta avataksesi sen.",
"readme_cat1_l1": "Luo padi: Siirry CryptDriveesi, napsauta {0} ja sitten {1}, ja voit luoda padin.",
"readme_cat1": "Tutustu CryptDriveesi",
"readme_p2": "Tämä padi toimii pikaisena perehdytyksenä CryptPadin ominaisuuksiin - kuinka tehdä muistiinpanoja, järjestellä niitä ja tehdä yhteistyötä niiden parissa.",
"fm_shareFolderPassword": "Suojaa kansio salasanalla (vapaaehtoinen)",
"access_destroyPad": "Tuhoa tämä asiakirja tai kansio lopullisesti",
"fm_deletedFolder": "Poistettu kansio",
@ -1097,7 +1062,7 @@
"loading_state_0": "Rakenna käyttöliittymä",
"register_notes_title": "Tärkeät huomiot",
"home_support_title": "Tue CryptPadia",
"home_opensource": "Kuka tahansa voi ylläpitää omaa henkilökohtaista tai ammattimaista CryptPad-instanssia. Lähdekoodi on saatavilla <a rel=\"noopener noreferrer\" target=\"_blank\" href=\"https://github.com/xwiki-labs/cryptpad\">GitHubissa</a>.",
"home_opensource": "Kuka tahansa voi ylläpitää omaa henkilökohtaista tai ammattimaista CryptPad-instanssia. Lähdekoodi on saatavilla <a>GitHubissa</a>.",
"home_opensource_title": "Avoin lähdekoodi",
"home_host_title": "Tietoja tästä instanssista",
"home_privacy_text": "CryptPad on luotu helpottamaan yhteistyötä ja pitämään samalla tietosi yksityisinä. Kaikki sisällön salaus ja purku tapahtuu omassa selaimessasi. Tämä tarkoittaa, että asiakirjat, keskustelut ja tiedostot ovat lukukelvottomia istuntosi ulkopuolella. Edes palvelun ylläpitäjät eivät pääse käyttämään tietojasi.",

@ -57,7 +57,6 @@
"editor": "éditeur",
"userlist_offline": "Vous êtes actuellement hors-ligne, la liste des utilisateurs n'est pas disponible.",
"language": "Langue",
"newVersion": "<b>CryptPad a été mis à jour !</b><br>Découvrez les nouveautés de la dernière version :<br><a href=\"https://github.com/xwiki-labs/cryptpad/releases/tag/{0}\" target=\"_blank\">Notes de version pour CryptPad {0}</a>",
"upgrade": "Augmenter votre limite",
"upgradeAccount": "Améliorer le compte",
"MB": "Mo",
@ -67,7 +66,7 @@
"formattedGB": "{0} Go",
"formattedKB": "{0} Ko",
"pinLimitReached": "Vous avez atteint votre limite de stockage",
"pinLimitReachedAlert": "Vous avez atteint votre limite de stockage. Les nouveaux pads ne seront pas enregistrés dans votre CryptDrive.<br>Vous pouvez soit supprimer des pads de votre CryptDrive, soit vous <a href=\"https://accounts.cryptpad.fr/#!on={0}\" target=\"_blank\">abonner à une offre premium</a> pour augmenter la limite maximale.",
"pinLimitReachedAlert": "Vous avez atteint votre limite de stockage. Les nouveaux pads ne seront pas enregistrés dans votre CryptDrive.<br>Vous pouvez soit supprimer des pads de votre CryptDrive, soit vous <a>abonner à une offre premium</a> pour augmenter la limite maximale.",
"pinLimitReachedAlertNoAccounts": "Vous avez atteint votre limite de stockage",
"pinLimitNotPinned": "Vous avez atteint votre limite de stockage.<br>Ce pad n'est pas enregistré dans votre CryptDrive.",
"pinLimitDrive": "Vous avez atteint votre limite de stockage.<br>Vous ne pouvez pas créer de nouveaux pads.",
@ -84,7 +83,7 @@
"saveTitle": "Enregistrer le titre (Entrée)",
"forgetButton": "Supprimer",
"forgetPrompt": "Cliquer sur OK déplacera ce pad vers la corbeille de votre CryptDrive, êtes-vous sûr ?",
"movedToTrash": "Ce pad a été déplacé vers la corbeille.<br><a href=\"/drive/\">Accéder à mon Drive</a>",
"movedToTrash": "Ce pad a été déplacé vers la corbeille.<br><a>Accéder à mon Drive</a>",
"shareButton": "Partager",
"shareSuccess": "Lien copié dans le presse-papiers",
"userListButton": "Liste d'utilisateurs",
@ -244,7 +243,6 @@
"contacts_online": "Un autre utilisateur est en ligne dans ce salon",
"fm_rootName": "Documents",
"fm_trashName": "Corbeille",
"fm_unsortedName": "Fichiers non triés",
"fm_filesDataName": "Tous les fichiers",
"fm_templateName": "Modèles",
"fm_searchName": "Recherche",
@ -287,7 +285,6 @@
"fm_info_anonymous": "Vous n'êtes pas connecté, ces documents seront donc supprimés après {0} jours. Nettoyer l'historique de votre navigateur peut les faire disparaître.<br><a href=\"/register/\">Enregistrez vous</a> (aucune information personelle requise) ou <a href=\"/login/\">Connectez vous</a> pour les stocker de manière permanente dans votre drive. <a href=\"https://docs.cryptpad.fr/fr/user_guide/user_account.html#account-types\" target=\"_blank\">En lire plus sur les comptes utilisateurs</a>.",
"fm_info_sharedFolder": "Voici le contenu d'un dossier partagé. Il n'est accessible qu'en lecture seule car vous n'êtes pas connecté.<br><a href=\"/register/\">Inscrivez-vous</a> ou <a href=\"/login/\">connectez-vous</a> pour pouvoir l'importer dans votre CryptDrive et le modifier.",
"fm_info_owned": "Vous êtes propriétaire des pads affichés dans cette catégorie. Cela signifie que vous pouvez choisir de les supprimer définitivement du serveur à n'importe quel moment. Ils seront alors inaccessibles pour tous les autres utilisateurs.",
"fm_alert_anonymous": "Bonjour ! Vous utilisez actuellement CryptPad de manière anonyme, ce qui ne pose pas de problème mais vos pads peuvent être supprimés après un certain temps d'inactivité. Nous avons désactivé certaines fonctionnalités avancées de CryptDrive pour les utilisateurs anonymes afin de rendre clair le fait que ce n'est pas un endroit sûr pour le stockage des documents. Vous pouvez <a href=\"https://blog.cryptpad.fr/2017/05/17/You-gotta-log-in/\" target=\"_blank\">en lire plus</a> concernant nos raisons pour ces changements et pourquoi vous devriez vraiment <a href=\"/register/\">vous enregistrer</a> et <a href=\"/login/\">vous connecter</a>.",
"fm_error_cantPin": "Erreur interne du serveur. Veuillez recharger la page et essayer de nouveau.",
"fm_viewListButton": "Liste",
"fm_viewGridButton": "Grille",
@ -336,13 +333,13 @@
"login_invalPass": "Mot de passe requis",
"login_unhandledError": "Une erreur inattendue s'est produite :(",
"register_importRecent": "Importer les documents de votre session non-enregistrée",
"register_acceptTerms": "J'accepte <a href='/terms.html' tabindex='-1'>les conditions d'utilisation</a>",
"register_acceptTerms": "J'accepte <a>les conditions d'utilisation</a>",
"register_passwordsDontMatch": "Les mots de passe doivent être identiques !",
"register_passwordTooShort": "Les mots de passe doivent contenir au moins {0} caractères.",
"register_mustAcceptTerms": "Vous devez accepter les conditions d'utilisation.",
"register_writtenPassword": "J'ai bien noté mon nom d'utilisateur et mon mot de passe, continuer",
"register_cancel": "Annuler",
"register_warning": "<i class='fa fa-warning'></i> Attention",
"register_warning": "Attention",
"register_alreadyRegistered": "Cet utilisateur existe déjà, souhaitez-vous vous connecter ?",
"register_whyRegister": "Pourquoi s'inscrire ?",
"register_header": "Créer un compte",
@ -502,21 +499,6 @@
"whatis_title": "Qu'est-ce que CryptPad ?",
"whatis_collaboration": "Collaboration Privée",
"whatis_drive": "Organisation avec CryptDrive",
"policy_title": "Politique de confidentialité de CryptPad",
"policy_whatweknow": "Ce que nous savons de vous",
"policy_whatweknow_p1": "En tant qu'application hébergée sur le web, CryptPad a accès aux meta-données exposées par le protocole HTTP. Ceci inclus votre adresse IP et d'autres en-têtes HTTP qui peuvent être utilisées pour identifier votre propre navigateur. Vous pouvez voir quelles informations votre navigateur partage en visitant <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending\" title=\"what http headers is my browser sending\">WhatIsMyBrowser.com</a>.",
"policy_howweuse": "Comment nous utilisons ce que nous apprenons",
"policy_howweuse_p1": "Nous utilisons ces informations pour prendre de meilleures décisions concernant la communication autour de CryptPad, en évaluant le succès de ce qui a été réalisé par le passé. Les informations concernant votre localisation nous permettent de savoir si nous devons considérer l'ajout de traductions de CryptPad dans d'autres langues que l'anglais.",
"policy_howweuse_p2": "Les informations concernant votre navigateur (que ce soit un système d'exploitation de bureau ou d'appareil portable) nous aident à prendre des décisions lors de la priorisation des ajouts et améliorations de fonctionnalités. Notre équipe de développement est petite, et nous essayons de prendre des décisions qui amélioreront l'expérience du plus grand nombre d'utilisateurs possible.",
"policy_whatwetell": "Ce que nous dévoilons à d'autres à propos de vous",
"policy_whatwetell_p1": "Nous ne fournissons aucune information que nous récoltons ou que vous nous fournissez à des tierces parties à moins d'y être contraints par la loi.",
"policy_links": "Liens vers d'autres sites",
"policy_links_p1": "Ce site contient des liens vers d'autres sites, certains étant produits par d'autres organisations. Nous ne sommes responsables des pratiques de confidentialité ou du contenu d'aucun site externe. De manière générale, les liens vers des sites externes sont lancés dans une nouvelle fenêtre (ou onglet) du navigateur, pour rendre clair le fait que vous quittez CryptPad.fr.",
"policy_ads": "Publicité",
"policy_ads_p1": "Nous n'affichons pas de publicité en ligne, bien que nous puissions afficher des liens vers les sites des organisations qui financent nos recherches.",
"policy_choices": "Vos choix",
"policy_choices_open": "Notre code est open source, ce qui signifie que vous avez toujours la possibilité d'héberger votre propre instance de CryptPad.",
"policy_choices_vpn": "Si vous souhaitez utiliser notre instance hébergée (cryptpad.fr) mais que vous ne souhaitez pas exposer votre adresse IP, vous pouvez la protéger en utilisant le <a href=\"https://www.torproject.org/projects/torbrowser.html.en\" title=\"téléchargements du projet Tor\" target=\"_blank\" rel=\"noopener noreferrer\">navigateur Tor</a>, ou un <a href=\"https://riseup.net/fr/vpn\" title=\"VPNs fournis par Riseup\" target=\"_blank\" rel=\"noopener noreferrer\">VPN</a>.",
"features": "Fonctionnalités",
"features_title": "Fonctionnalités",
"features_anon": "Non-enregistré",
@ -565,28 +547,11 @@
"header_homeTitle": "Aller sur la page d'accueil",
"help_genericMore": "Découvrez toutes les fonctionalités de CryptPad en lisant la <a>Documentation</a>.",
"driveReadmeTitle": "Qu'est-ce que CryptPad ?",
"readme_welcome": "Bienvenue dans CryptPad !",
"readme_p1": "Bienvenue dans CryptPad, le lieu où vous pouvez prendre des notes seul ou avec des contacts.",
"readme_p2": "Ce pad va vous donner un aperçu de la manière dont vous pouvez utiliser CryptPad pour prendre des notes, les organiser et travailler en groupe sur celles-ci.",
"readme_cat1": "Découvrez votre CryptDrive",
"readme_cat1_l1": "Créer un pad : Dans votre CryptDrive, cliquez sur {0} puis {1} et vous obtenez un nouveau pad.",
"readme_cat1_l2": "Ouvrir des pads depuis votre CryptDrive : Double-cliquez sur l'icone d'un pad pour l'ouvrir.",
"readme_cat1_l3": "Organiser vos pads : Quand vous êtes connecté, tous les pads auquel vous accédez sont ajoutés dans la section {0} de votre CryptDrive.",
"readme_cat1_l3_l1": "Vous pouvez cliquer et faire glisser des fichiers dans des dossiers dans la section {0} de votre CryptDrive, et créer de nouveaux dossiers.",
"readme_cat1_l3_l2": "N'hésitez pas à utiliser le clic droit sur les icones puisque des menus sont souvent disponibles.",
"readme_cat1_l4": "Déplacer des pads vers la corbeille : Vous pouvez cliquer et faire glisser vos pads dans la {0} de la même manière que vous pouvez les déposer dans des dossiers.",
"readme_cat2": "Créer des pads comme un pro",
"edit": "éditer",
"view": "voir",
"readme_cat2_l1": "Le bouton {0} dans votre pad vous permet de donner l'accès à vos collaborateurs que ce soit pour l'{1} ou pour le {2}.",
"readme_cat2_l2": "Vous pouvez changer le titre d'un pad en cliquant sur le crayon",
"readme_cat3": "Découvrez les autres applications CryptPad",
"readme_cat3_l1": "Avec l'éditeur de code de CryptPad, vous pouvez collaborer sur du code comme JavaScript ou des langages comme HTML ou Markdown",
"readme_cat3_l2": "Avec l'éditeur de présentations de CryptPad, vous pouvez réaliser des présentations rapides en utilisant Markdown",
"readme_cat3_l3": "Avec CryptPoll vous pouvez créer rapidement des sondages, et en particulier plannifier des meetings qui rentrent dans l'agenda de tout ceux qui souhaitent participer",
"feedback_about": "Si vous lisez ceci, vous vous demandez probablement pourquoi CryptPad envoie des requêtes vers des pages web quand vous réalisez certaines actions",
"feedback_about": "Si vous lisez ceci, vous vous demandez probablement pourquoi CryptPad envoie des requêtes vers des pages web quand vous réalisez certaines actions.",
"feedback_privacy": "Nous prenons au sérieux le respect de votre vie privée, et en même temps nous souhaitons rendre CryptPad très simple à utiliser. Nous utilisons cette page pour comprendre quelles fonctionnalités dans l'interface comptent le plus pour les utilisateurs, en l'appelant avec un paramètre spécifiant quelle action a été réalisée.",
"feedback_optout": "Si vous le souhaitez, vous pouvez désactiver ces requêtes en vous rendant dans <a href='/settings/'>votre page de préférences</a>, où vous trouverez une case à cocher pour désactiver le retour d'expérience",
"feedback_optout": "Si vous le souhaitez, vous pouvez désactiver ces requêtes en vous rendant dans <a>votre page de préférences</a>, où vous trouverez une case à cocher pour désactiver le retour d'expérience.",
"creation_404": "Ce pad n'existe plus. Vous pouvez créer un nouveau pad en utilisant le formulaire suivant.",
"creation_owned": "Être propriétaire de ce pad",
"creation_owned1": "Être <b>propriétaire</b> d'un élément signifie que vous pouvez le détruire à tout moment. Une fois détruit, un élément devient inaccessible dans CryptDrive de tous les utilisateurs.",
@ -638,7 +603,7 @@
"autostore_sf": "dossier",
"autostore_pad": "pad",
"autostore_notstored": "Ce {0} n'est pas dans votre CryptDrive. Souhaitez-vous le stocker ?",
"autostore_settings": "Vous pouvez activer le stockage automatique des pads dans vos <a href=\"/settings/\">Préférences</a> !",
"autostore_settings": "Vous pouvez activer le stockage automatique des pads dans vos <a>Préférences</a> !",
"autostore_store": "Stocker",
"autostore_hide": "Ne pas stocker",
"autostore_error": "Erreur : nous n'avons pas réussi à stocker ce pad, veuillez ré-essayer.",
@ -647,7 +612,7 @@
"autostore_notAvailable": "Vous devez stocker ce pad dans votre CryptDrive avant de pouvoir utiliser cette fonctionnalité.",
"crowdfunding_button": "Soutenir CryptPad",
"crowdfunding_button2": "Aider CryptPad",
"crowdfunding_popup_text": "<h3>Aider CryptPad</h3>Pour vous assurer que CryptPad soit activement développé, nous vous invitons à supporter le projet via la <a href=\"https://opencollective.com/cryptpad\">page OpenCollective</a>, où vous pouvez trouver notre <b>Roadmap</b> et nos <b>objectifs de financement</b>.",
"crowdfunding_popup_text": "<h3>Aider CryptPad</h3>Pour vous assurer que CryptPad soit activement développé, nous vous invitons à supporter le projet via la page OpenCollective, où vous pouvez trouver notre <b>Roadmap</b> et nos <b>objectifs de financement</b>.",
"crowdfunding_popup_no": "Pas maintenant",
"survey": "Enquête CryptPad",
"markdown_toc": "Sommaire",
@ -750,7 +715,7 @@
"admin_supportInitPrivate": "Votre instance de CryptPad est configurée pour utiliser la messagerie de support mais votre compte utilisateur ne connaît pas la bonne clé privée nécessaire pour y avoir accès. Veuillez utiliser le formulaire suivant pour ajouter ou mettre à jour la clé dans votre compte.",
"admin_supportInitHint": "Vous pouvez configurer une messagerie de support afin de fournir aux utilisateurs de votre instance CryptPad un moyen de vous contacter de manière sécurisée en cas de problème avec leur compte.",
"admin_supportListHint": "Voici la liste des tickets envoyés par les utilisateurs au support. Tous les administrateurs peuvent voir les tickets et leurs réponses. Un ticket fermé ne peut pas être ré-ouvert. Vous ne pouvez supprimer (ou cacher) que les tickets fermés, et les tickets supprimés restent visible par les autres administrateurs.",
"support_formHint": "Utilisez ce formulaire pour contacter les administrateurs de manière sécurisée au sujet de problèmes ou de questions. <br>Veuillez noter que certains problèmes/questions peuvent déjà être traités dans le <a href=\"https://docs.cryptpad.fr/fr/user_guide/index.html\" rel=\"noopener noreferrer\" target=\"_blank\">Guide Utilisateur de CryptPad</a>. Veuillez ne pas créer de nouveau ticket si vous avez déjà un ticket ouvert concernant le même problème. Merci de répondre à votre message d'origine avec toute information supplémentaire.",
"support_formHint": "Utilisez ce formulaire pour contacter les administrateurs de manière sécurisée au sujet de problèmes ou de questions. <br>Veuillez noter que certains problèmes/questions peuvent déjà être traités dans le <a>Guide Utilisateur de CryptPad</a>. Veuillez ne pas créer de nouveau ticket si vous avez déjà un ticket ouvert concernant le même problème. Merci de répondre à votre message d'origine avec toute information supplémentaire.",
"support_listHint": "Voici la liste des tickets envoyés au support, ainsi que les réponses. Un ticket fermé ne peut pas être ré-ouvert, mais il est possible d'en créer un nouveau. Vous pouvez cacher les tickets qui ont été fermés.",
"support_notification": "Un administrateur a répondu à votre ticket de support",
"requestEdit_button": "Demander les droits d'édition",
@ -922,7 +887,7 @@
"settings_safeLinksHint": "CryptPad inclut dans ses liens les clés permettant de déchiffrer vos pads. Toute personne ayant accès à votre historique de navigation peut potentiellement lire vos données. Cela inclut les extensions de navigateur intrusives et les navigateurs qui synchronisent votre historique entre les appareils. L'activation des \"liens sécurisés\" empêche les clés d'entrer dans votre historique de navigation ou d'être affichées dans votre barre d'adresse quand cela est possible. Nous vous recommandons vivement d'activer cette fonction et d'utiliser le menu {0} Partager.",
"profile_login": "Vous devez vous connecter pour ajouter cet utilisateur à vos contacts",
"dontShowAgain": "Ne plus demander",
"safeLinks_error": "Ce lien a été copié depuis la barre d'adresse du navigateur et ne donne pas accès au document. Veuillez utiliser le menu <i class=\"fa fa-shhare-alt\"></i> <b>Partager</b> pour partager avec vos contacts ou copier un lien. <a href=\"https://docs.cryptpad.fr/fr/user_guide/user_account.html#confidentiality\"> En savoir plus sur les Liens Sécurisés</a>.\n",
"safeLinks_error": "Ce lien a été copié depuis la barre d'adresse du navigateur et ne donne pas accès au document. Veuillez utiliser le menu <i></i> <b>Partager</b> pour partager avec vos contacts ou copier un lien. <a> En savoir plus sur les Liens Sécurisés</a>.",
"settings_safeLinksCheckbox": "Activer les liens sécurisés",
"settings_safeLinksTitle": "Liens Sécurisés",
"settings_cat_security": "Confidentialité",
@ -1004,7 +969,7 @@
"toolbar_insert": "Insérer",
"toolbar_theme": "Thème",
"todo_move": "Votre liste de tâches est désormais dans le kanban <b>{0}</b> dans votre Drive.",
"settings_safeLinkDefault": "Les liens sécurisés sont désormais activés par défaut. Veuillez utiliser le menu <i class=\"fa fa-shhare-alt\"></i> <b>Partager</b> pour copier les liens plutôt que la barre d'adresse de votre navigateur.",
"settings_safeLinkDefault": "Les liens sécurisés sont désormais activés par défaut. Veuillez utiliser le menu <i></i> <b>Partager</b> pour copier les liens plutôt que la barre d'adresse de votre navigateur.",
"support_languagesPreamble": "L'équipe de support parle les langues suivantes :",
"info_privacyFlavour": "<a>Description de la confidentialité</a> de vos données.",
"user_about": "À propos de CryptPad",
@ -1136,7 +1101,7 @@
"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.",
"creation_helperText": "Ouvrir la documentation",
"creation_expiresIn": "Expirera dans",
"whatis_xwiki_info": "<p>CryptPad est fabriqué à <a rel=\"noopener noreferrer\" target=\"_blank\" href=\"https://xwiki.com\">XWiki</a>, une société basée à Paris, France, qui fabrique des logiciels open-source depuis plus de 15 ans. Nous avons une grande expérience dans la réalisation de logiciels collaboratifs pour organiser l'information. Notre histoire montre que nous sommes engagés dans le développement et la maintenance à long terme de CryptPad.</p>",
"whatis_xwiki_info": "<p>CryptPad est fabriqué à <a>XWiki</a>, une société basée à Paris, France, qui fabrique des logiciels open-source depuis plus de 15 ans. Nous avons une grande expérience dans la réalisation de logiciels collaboratifs pour organiser l'information. Notre histoire montre que nous sommes engagés dans le développement et la maintenance à long terme de CryptPad.</p>",
"whatis_xwiki": "Fabriqué à XWiki",
"whatis_model_info": "<p>Depuis 2016, CryptPad est soutenu par des bourses de recherche françaises et européennes telles que BPI France, NLNet Foundation, NGI Trust, Mozilla Open Source Support, ainsi que par des dons et des abonnements à cryptpad.fr. Nous pensons que l'argent public doit financer du code public, c'est pourquoi le service est entièrement open source. Cela signifie que tout le monde peut utiliser, héberger et modifier le logiciel.</p><p>CryptPad ne profite pas des données des utilisateurs. Cela fait partie d'une vision des services en ligne qui respectent la vie privée. Contrairement aux grandes plateformes qui prétendent être \"gratuites\" tout en tirant profit des informations personnelles, CryptPad vise à construire un modèle durable financé volontairement par les utilisateurs.</p><p>Nous offrons les fonctionnalités de CryptPad gratuitement parce que nous pensons que chacun a droit à la protection de sa vie privée, et pas seulement les personnes ayant un revenu suffisant. Si vous êtes en mesure de soutenir le projet, vous contribuerez aux nouvelles fonctionnalités, aux améliorations et à la maintenance qui profiteront à tous les utilisateurs.</p><p>Maintenant que la faisabilité du projet a été établie, le prochain objectif est de le rendre financièrement viable grâce au financement des utilisateurs. Si vous souhaitez soutenir CryptPad et contribuer à en faire une alternative durable aux grandes plateformes, veuillez envisager de faire un don unique ou récurrent.</p>",
"whatis_model": "Modèle économique",
@ -1147,9 +1112,9 @@
"register_warning_note": "En raison de la nature chiffrée de CryptPad, les administrateurs du service ne seront pas en mesure de récupérer les données au cas où vous oublieriez votre nom d'utilisateur et/ou votre mot de passe. Veuillez les sauvegarder dans un endroit sûr.",
"register_notes": "<ul class=\"cp-notes-list\"><li>Votre mot de passe est la clé secrète utilisée pour chiffrer tous vos documents. <span class=\"red\">Si vous le perdez, nous ne pourrons pas récupérer vos données.</span></li><li>Si vous utilisez un ordinateur partagé, <span class=\"red\">n'oubliez pas de vous déconnecter</span> après avoir terminé. La simple fermeture de la fenêtre du navigateur laisse votre compte exposé.</li><li>Pour conserver les documents que vous avez créés et/ou stockés sans être connecté, cochez \"Importer les documents de votre session anonyme\". </li></ul>",
"register_notes_title": "Notes importantes",
"home_support": "<p>L'équipe de développement ne tire aucun profit des données personnelles des utilisateurs. Cela s'inscrit dans une vision pour des services en ligne qui respectent la vie privée. Contrairement aux grandes plateformes qui prétendent être \"gratuites\" tout en tirant profit des informations personnelles, CryptPad vise à construire un modèle durable financé volontairement par les utilisateurs.</p><p>Vous pouvez soutenir le projet en faisant un don unique ou récurrent par le biais de notre Open Collective. Notre budget est transparent et des mises à jour sont publiées régulièrement. Il existe également un certain nombre de <a href=\"https://docs.cryptpad.fr/en/how_to_contribute.html\" rel=\"noopener noreferrer\" target=\"_blank\">moyens non financiers de contribuer</a>.</p>",
"home_support": "<p>L'équipe de développement ne tire aucun profit des données personnelles des utilisateurs. Cela s'inscrit dans une vision pour des services en ligne qui respectent la vie privée. Contrairement aux grandes plateformes qui prétendent être \"gratuites\" tout en tirant profit des informations personnelles, CryptPad vise à construire un modèle durable financé volontairement par les utilisateurs.</p><p>Vous pouvez soutenir le projet en faisant un don unique ou récurrent par le biais de notre Open Collective. Notre budget est transparent et des mises à jour sont publiées régulièrement. Il existe également un certain nombre de <a>moyens non financiers de contribuer</a>.</p>",
"home_support_title": "Soutenez CryptPad",
"home_opensource": "CryptPad est un logiciel libre. Il peut être installé par qui veut proposer ce service dans un cadre personnel ou professionnel. Le code source est disponible sur <a rel=\"noopener noreferrer\" target=\"_blank\" href=\"https://github.com/xwiki-labs/cryptpad\">Github</a>.",
"home_opensource": "CryptPad est un logiciel libre. Il peut être installé par qui veut proposer ce service dans un cadre personnel ou professionnel. Le code source est disponible sur <a>Github</a>.",
"home_opensource_title": "Open Source",
"home_host_title": "À propos de cette instance",
"home_privacy_text": "CryptPad est conçu pour permettre la collaboration tout en préservant la confidentialité des données. Tout le contenu est chiffré et déchiffré par votre navigateur. Cela signifie que les documents, les chats et les fichiers sont illisibles en dehors de la session à laquelle vous êtes connecté. Même les administrateurs du service n'ont pas accès à vos informations.",
@ -1189,5 +1154,32 @@
"fm_cantUploadHere": "Impossible d'importer un fichier ici",
"importError": "Impossible d'importer (mauvais format)",
"oo_lostEdits": "Vos récentes modifications non sauvegardées n'ont pas pu être récupérées après la synchronisation du nouveau contenu.",
"toolbar_degraded": "Au moins {0} éditeurs sont actuellement connectés à ce document. La liste des utilisateurs et le chat sont désactivés pour améliorer les performances."
"toolbar_degraded": "Au moins {0} éditeurs sont actuellement connectés à ce document. La liste des utilisateurs et le chat sont désactivés pour améliorer les performances.",
"settings_deleteSubscription": "Gérer mon abonnement",
"settings_deleteContinue": "Supprimer mon compte",
"settings_deleteWarning": "Attention : vous êtes actuellement abonné à un plan premium (payé ou offert par un autre utilisateur). Veuillez annuler votre plan avant de supprimer votre compte car cela ne sera plus possible sans contacter le support une fois votre compte supprimé.",
"broadcast_newCustom": "Message des administrateurs",
"broadcast_preview": "Aperçu de la notification",
"broadcast_defaultLanguage": "Langage par défaut",
"broadcast_translations": "Traductions",
"admin_broadcastCancel": "Effacer le message",
"admin_broadcastActive": "Message actif",
"admin_broadcastButton": "Envoyer",
"admin_broadcastHint": "Envoyez un message à tous les utilisateurs de cette instance. Tous les utilisateurs existants et nouveaux le recevront sous forme de notification. Prévisualisez les messages avant de les envoyer avec <b>Aperçu de la notification</b>. Les aperçus de notifications ont une icône rouge et ne sont visibles que par vous.",
"admin_broadcastTitle": "Message d'annonce",
"broadcast_surveyURL": "Lien vers l'enquête",
"admin_surveyActive": "Ouvrir l'enquête",
"admin_surveyCancel": "Supprimer",
"admin_surveyButton": "Enregistrer l'enquête",
"broadcast_newSurvey": "Une nouvelle enquête est disponible. Cliquer pour l'ouvrir.",
"admin_surveyHint": "Ajouter, mettre à jour ou supprimer un lien vers une enquête externe. Les utilisateurs recevront une notification et l'enquête restera disponible dans le menu utilisateur.",
"admin_surveyTitle": "Enquête",
"broadcast_maintenance": "Une maintenance est prévue entre <b>{0}</b> et <b>{1}</b>. CryptPad pourrait être inaccessible pendant ce temps.",
"broadcast_end": "Fin",
"broadcast_start": "Début",
"admin_maintenanceCancel": "Annuler maintenance",
"admin_maintenanceButton": "Planifier maintenance",
"admin_maintenanceHint": "Planifier une maintenance sur cette instance et avertir tous les utilisateurs. Limité à une maintenance active à la fois.",
"admin_maintenanceTitle": "Maintenance",
"admin_cat_broadcast": "Annonces"
}

@ -58,7 +58,6 @@
"editor": "editore",
"userlist_offline": "Sei offline, l'elenco degli utenti non è disponibile.",
"language": "Lingua",
"newVersion": "<b>CryptPad è stato aggiornato!</b><br>Scopri cosa c'è di nuovo nell'ultima versione:<br><a href=\"https://github.com/xwiki-labs/cryptpad/releases/tag/{0}\" target=\"_blank\">note di rilascio di CryptPad {0}</a>",
"upgrade": "Aumentare il limite",
"upgradeAccount": "Upgrade dell'account",
"MB": "MB",
@ -68,7 +67,7 @@
"formattedGB": "{0} GB",
"formattedKB": "{0} KB",
"pinLimitReached": "Hai raggiunto il limite di spazio",
"pinLimitReachedAlert": "Hai raggiunto il limite di spazio. I nuovi pad non saranno salvati nel tuo CryptDrive.<br>Puoi rimuovere dei pad dal tuo CryptDrive o <a href=\"https://accounts.cryptpad.fr/#!on={0}\" target=\"_blank\">sottoscrivere un'offerta premium</a> per incrementare il tuo limite.",
"pinLimitReachedAlert": "Hai raggiunto il limite di spazio. I nuovi pad non saranno salvati nel tuo CryptDrive.<br>Puoi rimuovere dei pad dal tuo CryptDrive o <a>sottoscrivere un'offerta premium</a> per incrementare il tuo limite.",
"pinLimitReachedAlertNoAccounts": "Hai raggiunto il limite di spazio",
"pinLimitNotPinned": "Hai raggiunto il limite di spazio.<br>Questo pad non è salvato nel tuo CryptDrive.",
"pinLimitDrive": "Hai raggiunto il limite di spazio.<br>Non puoi creare nuovi pad.",
@ -85,7 +84,7 @@
"saveTitle": "Salva il titolo (Invio)",
"forgetButton": "Elimina",
"forgetPrompt": "Cliccando OK questo pad sarà spostato nel cestino. Sei sicuro?",
"movedToTrash": "Questo pad è stato spostato nel cestino. <br><a href=\"/drive/\">Accedi al mio Drive</a>",
"movedToTrash": "Questo pad è stato spostato nel cestino. <br><a>Accedi al mio Drive</a>",
"shareButton": "Condividi",
"shareSuccess": "Link copiato negli appunti",
"userListButton": "Elenco degli utenti",
@ -244,7 +243,6 @@
"contacts_online": "Un altro utente di questa stanza è online",
"fm_rootName": "Documenti",
"fm_trashName": "Cestino",
"fm_unsortedName": "File non catalogati",
"fm_filesDataName": "Tutti i file",
"fm_templateName": "Modelli",
"fm_searchName": "Cerca",
@ -333,13 +331,12 @@
"login_invalPass": "Password richiesta",
"login_unhandledError": "Si è verificato un errore inaspettato :(",
"register_importRecent": "Importa i pad dalla tua sessione anonima",
"register_acceptTerms": "Accetto <a href='/terms.html' tabindex='-1'>i termini del servizio</a>",
"register_acceptTerms": "Accetto <a>i termini del servizio</a>",
"register_passwordsDontMatch": "Le password non corrispondono!",
"register_passwordTooShort": "Le password devono essere lunghe almeno {0} caratteri.",
"register_mustAcceptTerms": "Devi accettare i termini del servizio.",
"register_whyRegister": "Perché registrarsi?",
"register_header": "Benvenuto su CryptPad",
"fm_alert_anonymous": "Ciao! Stai attualmente utilizzando CryptPad in modalità anonima, questo non crea problemi ma i tuoi pad potrebbero essere eliminati dopo un periodo di inattività. Abbiamo disabilitato alcune funzioni avanzate di CryptDrive per gli utenti anonimi, per chiarire che non è un luogo sicuro per la conservazione di documenti. Puoi <a href=\"https://blog.cryptpad.fr/2017/05/17/You-gotta-log-in/\" target=\"_blank\">leggere di più</a> sul perché lo stiamo facendo e sul perché dovresti veramente <a href=\"/register/\">registrarti</a> e <a href=\"/login/\">accedere</a>.",
"register_writtenPassword": "Ho annotato il mio nome utente e la mia password, procedi",
"register_cancel": "Torna indietro",
"register_warning": "Zero Knowledge significa che non possiamo recuperare i tuoi dati se perdi la tua password.",
@ -417,28 +414,15 @@
"upload_mustLogin": "Devi eseguire l'accesso per poter caricare file",
"pad_base64": "Questo pad contiene immagini conservate in maniera inefficiente. Queste immagini aumenteranno significativamente le dimensioni del pad nel tuo CryptDrive, e lo renderanno più lento da caricare. Puoi convertire questi file in un nuovo formato che verrà conservato separatamente nel tuo CryptDrive. Vuoi convertire queste immagini ora?",
"mdToolbar_code": "Codice",
"home_host": "Questa è un'istanza di CryptPad gestita indipendentemente dalla community. Il suo codice sorgente è disponibile <a href=\"https://github.com/xwiki-labs/cryptpad\" target=\"_blank\" rel=\"noreferrer noopener\">su GitHub</a>.",
"policy_choices_open": "Il nostro codice sorgente è open source, così hai sempre la possibilità di ospitare la tua personale istanza di CryptPad.",
"home_host": "Questa è un'istanza di CryptPad gestita indipendentemente dalla community.",
"features_f_file0": "Apri i file",
"help_genericMore": "Impara di più su cosa può fare CryptPad per te leggendo le nostre <a>FAQ</a>",
"readme_cat3_l1": "Con l'editor di codice di CryptPad, puoi collaborare su linguaggi di programmazione come Javascript e linguaggi di markdown come HTML o Markdown",
"settings_codeSpellcheckLabel": "Abilita il controllo ortografico nell'editor di codice",
"team_inviteLinkError": "Si è verificato un errore durante la creazione del link.",
"register_emailWarning1": "Puoi farlo se vuoi, ma non verrà inviato ai nostri server.",
"register_emailWarning2": "Non sarai in grado di resettare la tua password usando la tua email, a differenza di come puoi fare con molti altri servizi.",
"register_emailWarning3": "Se hai capito, ma intendi comunque usare la tua email come nome utente, clicca OK.",
"oo_sheetMigration_anonymousEditor": "Le modifiche da parte di utenti anonimi a questo foglio di calcolo sono disabilitate finché un utente registrato non lo aggiorna all'ultima versione.",
"policy_howweuse": "Come usiamo i dati che raccogliamo",
"policy_whatweknow": "Cosa sappiamo di te",
"policy_title": "Informativa sulla privacy di CryptPad",
"policy_howweuse_p1": "Utilizziamo queste informazioni per migliorare le nostre decisioni in merito a come meglio pubblicizzare CryptPad, valutando quali dei nostri sforzi passati hanno avuto maggiore successo. Le informazioni sulla tua posizione ci permettono di sapere se dovremmo prendere in considerazione la possibilità di fornire un migliore supporto per lingue diverse dall'inglese.",
"policy_ads_p1": "Non mostriamo alcuna pubblicità online, anche se potremmo inserire link agli enti che finanziano la nostra ricerca.",
"policy_ads": "Pubblicità",
"policy_links_p1": "Questo sito contiene link ad altri siti, compresi quelli prodotti da altre organizzazioni. Non siamo responsabili delle pratiche relative alla privacy o dei contenuti di siti esterni. Come regola generale, i link a siti esterni vengono aperti in una nuova finestra del browser, per chiarire che si sta lasciando CryptPad.fr.",
"policy_links": "LInk ad altri siti",
"policy_whatwetell_p1": "Non forniamo a terzi le informazioni che raccogliamo o che ci fornite, a meno che non siamo legalmente obbligati a farlo.",
"policy_whatwetell": "Cosa comunichiamo a terzi riguardo a te",
"policy_howweuse_p2": "Le informazioni relative al tuo browser (sia che si tratti di un sistema operativo desktop che di uno mobile) ci aiutano a prendere decisioni quando si tratta di dare priorità ai miglioramenti delle funzionalità. Il nostro gruppo di sviluppo è piccolo e cerchiamo di fare scelte che migliorino l'esperienza del maggior numero di utenti possibile.",
"features_f_support": "Supporto più rapido",
"features_f_register": "Registrati gratuitamente",
"features_f_file1_note": "Condividi file con i tuoi contatti o incorporali nei tuoi pad",
@ -516,12 +500,9 @@
"features_f_file0_note": "Guarda e scarica file condivisi da altri utenti",
"features_f_core_note": "Modifica, Importa & Esporta, Cronologia, Elenco utenti, Chat",
"features_title": "Confronto delle funzionalità",
"policy_choices_vpn": "Se vuoi utilizzare la nostra istanza ma non vuoi esporre il tuo indirizzo IP puoi proteggerlo usando il <a href=\"https://www.torproject.org/projects/torbrowser.html.en\" title=\"downloads from the Tor project\" target=\"_blank\" rel=\"noopener noreferrer\">browser Tor</a>, oppure una <a href=\"https://riseup.net/en/vpn\" title=\"VPNs provided by Riseup\" target=\"_blank\" rel=\"noopener noreferrer\">VPN</a>.",
"policy_whatweknow_p1": "Come applicazione ospitata sul web, CryptPad ha accesso ai metadati esposti dal protocollo HTTP. Questo include il tuo indirizzo IP e altre intestazioni HTTP che possono essere usati per identificare il tuo browser. Puoi vedere quali informazioni condivide il tuo browser visitando <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending\" title=\"what http headers is my browser sending\">WhatIsMyBrowser.com</a>.",
"features_f_core": "Funzioni comuni delle applicazioni",
"features_f_apps": "Accesso alle applicazioni principali",
"features": "Funzionalità",
"policy_choices": "Le tue scelte",
"whatis_drive": "Organizzazione con CryptDrive",
"whatis_collaboration": "Collaborazione veloce, facile",
"terms": "Condizioni del servizio",
@ -721,10 +702,7 @@
"canvas_select": "Seleziona",
"logoutEverywhere": "Esci ovunque",
"driveReadmeTitle": "Cos'è CryptPad?",
"readme_welcome": "Benvenuto in CryptPad!",
"edit": "modifica",
"readme_cat2_l2": "Modifica il titolo del pad cliccando sulla matita",
"readme_cat3": "Scopri le app di CryptPad",
"creation_passwordValue": "Password",
"password_submit": "Invia",
"properties_changePassword": "Modifica la password",
@ -772,7 +750,6 @@
"burnAfterReading_generateLink": "Clicca sul pulsante sottostante per generare un link.",
"burnAfterReading_proceed": "visualizza ed elimina",
"oo_sheetMigration_complete": "Versione aggiornata disponibile, premi OK per ricaricare.",
"readme_cat2": "Realizza pad come un professionista",
"view": "visualizza",
"timeoutError": "Un errore ha interrotto la tua connessione al server. <br>Premi <em>Esc</em> per ricaricare la pagina.",
"support_disabledTitle": "Il supporto non è abilitato",
@ -787,30 +764,18 @@
"creation_expireHours": "Ora(e)",
"creation_create": "Crea",
"convertFolderToSF_confirm": "Questa cartella deve essere convertita in una cartella condivisa perché altri possano vederla. Continuare?",
"readme_p2": "Questo pad ti mostrerà come puoi utilizzare CryptPad per prendere note, tenerle organizzate e lavorarci in modo collaborativo.",
"readme_cat1_l1": "Crea un pad: nel tuo CryptDrive clicca {0} poi {1} e poi creare un pad.",
"readme_cat1_l2": "Apri i pad dal tuo CryptDrive: fai doppio clic sull'icona di un pad per aprirlo.",
"readme_cat1_l3": "Organizza i tuoi pad: quando sei connesso ogni pad al quale accedi sarà mostrato come nella sezione {0} del tuo drive.",
"readme_cat1_l3_l2": "Ricordati di provare a cliccare con il tasto destro del mouse sulle icone perché spesso ci sono menu aggiuntivi.",
"readme_cat1_l4": "Metti i vecchi pad nel cestino: puoi cliccare e trascinare i tuoi pad nel {0} nello stesso modo nel quale li trascini nelle cartelle.",
"readme_cat3_l3": "Con CryptPoll puoi fare veloci sondaggi, soprattutto per programmare riunioni con date che vadano bene a tutti",
"creation_expire": "Pad effimero",
"creation_newPadModalDescription": "Clicca su un tipo di pad per crearlo. Puoi anche premere <b>Tab</b> per selezionare il tipo e premere <b>Invio</b> per confermare.",
"password_info": "Il pad che stai cercando di aprire non esiste più o è protetto con una password. Inserisci la password corretta per accedere al suo contenuto.",
"access_main": "Accesso",
"readme_p1": "Benvenuto in CryptPad, qui è dove puoi prendere nota di qualcosa da solo e con i tuoi contatti.",
"readme_cat1_l3_l1": "Puoi cliccare e trascinare i file nelle cartelle nella sezione {0} del tuo drive e creare nuove cartelle.",
"readme_cat2_l1": "Il pulsante {0} nel tuo pad ti permette di dare accesso ai collaboratori per {1} o per {2} il pad.",
"readme_cat3_l2": "Con l'editor di diapositive puoi creare veloci presentazioni utilizzando il Markdown",
"creation_expireFalse": "Illimitato",
"creation_expiration": "Scadenza",
"password_error": "Pad non trovato!<br>Questo errore può essere causato da due fattori: o la password è sbagliata o il pad è stato eliminato dal server.",
"readme_cat1": "Andiamo a conoscere il tuo CryptDrive",
"feedback_privacy": "Ci teniamo alla tua privacy e contemporaneamente vogliamo che CryptPad sia molto facile da usare. Usiamo questo file per capire quali caratteristiche dell'interfaccia utente contano per i nostri utenti, richiedendolo insieme a un parametro che specifica quale azione sia stata intrapresa.",
"creation_owned": "Pad di proprietà",
"creation_owned1": "Un pad <b>di proprietà</b> può essere eliminato dal server quando il proprietario vuole. Eliminando un pad lo si rimuove anche dai CryptDrive degli altri utenti.",
"feedback_about": "Se stai leggendo questo, probabilmente sei curioso di sapere perché CryptPad richieda pagine internet quando attivi certe azioni",
"feedback_optout": "Se vuoi evitare di fornire questi dati visita <a href='/settings/'>la tua pagina delle impostazioni</a>, dove trovi una casella di controllo per abilitare o disabilitare il feedback utente",
"feedback_optout": "Se vuoi evitare di fornire questi dati visita <a>la tua pagina delle impostazioni</a>, dove trovi una casella di controllo per abilitare o disabilitare il feedback utente.",
"properties_confirmNew": "Sei sicuro? Aggiungendo una password modificherai l'URL di questo pad e rimuoverai la sua cronologia. Gli utenti che non hanno la password perderanno l'accesso a questo pad",
"properties_confirmChange": "Sei sicuro? Modificando la password rimuoverai la sua cronologia. Gli utenti che non hanno la nuova password perderanno l'accesso a questo pad",
"properties_passwordSuccess": "La password è stata modificata con successo.<br>Premi OK per ricaricare ed aggiornare i tuoi diritti d'accesso.",
@ -820,7 +785,7 @@
"autostore_notstored": "Questo {0} non è nel tuo CryptDrive. Vuoi archiviarlo adesso?",
"autostore_store": "Archivia",
"autostore_error": "Errore inaspettato: impossibile archiviare questo pad, riprova.",
"autostore_settings": "Puoi abilitare l'archiviazione automatica dei pad nella tua pagina delle <a href=\"/settings/\">Impostazioni</a>!",
"autostore_settings": "Puoi abilitare l'archiviazione automatica dei pad nella tua pagina delle <a>Impostazioni</a>!",
"autostore_saved": "Questo pad è stato archiviato con successo nel tuo CryptDrive!",
"sharedFolders_create_owned": "Cartella di proprietà",
"autostore_hide": "Non archiviare",
@ -941,7 +906,7 @@
"properties_passwordWarning": "La password è stata cambiata ma non siamo in grado di aggiornare il tuo CryptDrive con i nuovi dati. Devi rimuovere i vecchi pad manualmente.<br>Premi OK per ricaricare ed aggiornare i tuoi diritti di accesso.",
"share_embedCategory": "Incorporamento",
"chrome68": "Sembra che tu stia usando il browser Chrome o Chromium versione 68. Contiene un bug che si manifesta nella pagina che diventa completamente bianca dopo alcuni secondi o smette di rispondere ai clic. Per risolvere il problema puoi passare ad un'altra scheda e tornare a questa, o provare a scorrere la pagina. Questo problema sarà risolto nella prossima versione del tuo browser.",
"crowdfunding_popup_text": "<h3>Abbiamo bisogno del tuo aiuto!</h3>Per garantire che CryptPad sia attivamente sviluppato, valuta se aiutare il progetto sulla <a href=\"https://opencollective.com/cryptpad\">pagina OpenCollective</a>, dove potrai vedere la nostra <b>Roadmap</b> e gli <b>obiettivi di finanziamento</b>.",
"crowdfunding_popup_text": "<h3>Abbiamo bisogno del tuo aiuto!</h3>Per garantire che CryptPad sia attivamente sviluppato, valuta se aiutare il progetto sulla pagina OpenCollective, dove potrai vedere la nostra <b>Roadmap</b> e gli <b>obiettivi di finanziamento</b>.",
"admin_updateLimitHint": "Forzare un aggiornamento dei limiti dello spazio utente può essere fatto in qualsiasi momento, ma è necessario solo in caso di errori",
"admin_flushCacheTitle": "Svuota la cache HTTP",
"admin_flushCacheButton": "Svuota la cache",

@ -124,7 +124,6 @@
"login_invalUser": "ユーザー名を入力してください",
"register_importRecent": "匿名セッション中のパッドをインポート",
"importButton": "インポート",
"policy_title": "CryptPad プライバシーポリシー",
"main_catch_phrase": "コラボレーションスイート<br>暗号化されかつオープンソース",
"tos_3rdparties": "私たちは、法律で義務付けられている場合を除き、個別のデータを第三者に提供しません。",
"tos_logs": "あなたのブラウザからサーバーに送信されたメタデータは、サービスを維持するために記録される場合があります。",
@ -142,7 +141,6 @@
"privacy": "プライバシー",
"blog": "ブログ",
"driveReadmeTitle": "CryptPad とは?",
"readme_welcome": "CryptPad へようこそ!",
"register_header": "CryptPad へようこそ",
"login_confirm": "パスワードの確認",
"login_register": "新規登録",
@ -294,8 +292,6 @@
"features_f_file1": "ファイルのアップロードと共有",
"features_f_social_note": "プロフィールの作成、アバターの使用、連絡先とのチャット",
"features_f_social": "特別なアプリケーション",
"policy_whatweknow_p1": "ウェブ上でホストされるアプリケーションとして、CryptPad は HTTP プロトコルによって公開されるメタデータにアクセスできます。これには、IP アドレス、および特定のブラウザを識別するために使用可能なその他のさまざまな HTTP ヘッダーの情報が含まれます。ブラウザから共有される情報は、<a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending\" title=\"what http headers is my browser sending\">WhatIsMyBrowser.com</a> (外部サイト)にアクセスすると確認できます。",
"policy_whatweknow": "私たちが収集可能なあなたについての情報",
"tos_e2ee": "CryptPad のコンテンツは、パッドのフラグメント識別子を推測または取得できる人物なら誰でも閲覧や編集が行えます。エンドツーエンド暗号化(E2EE)を採用したメッセンジャーサービスなどを使用してリンクを共有し、リンク漏洩が発生しないよう対策を行ってください。",
"contact_chat": "チャット",
"contact_bug": "バグの報告",
@ -321,19 +317,7 @@
"oo_sheetMigration_loading": "あなたのスプレッドシートを最新バージョンにアップグレードしています",
"settings_ownDriveButton": "アカウントをアップグレード",
"features_f_file1_note": "連絡先とファイルを共有したり、パッドを埋め込む",
"policy_choices_open": "私たちのソフトウェアのコードはオープンソースなので、いつでも CryptPad を独自のインスタンスでホストすることが可能です。",
"policy_choices": "あなたの選択肢",
"policy_ads": "広告の掲載は行いません",
"policy_ads_p1": "私たちはいかなるオンライン広告も表示しませんが、私たちに資金を提供している団体へのリンクを掲載する可能性はあります。",
"policy_links_p1": "このサイトには、他の団体によって作成されたサイトを含む、外部サイトへのリンクが含まれています。私たちは、プライバシー上の取り扱いや外部サイトの内容について責任を負いません。一般的に、外部サイトへのリンクは、新しいブラウザウィンドウで起動され、CryptPad.fr を離れることを明確にします。",
"policy_links": "他のサイトへのリンク",
"policy_whatwetell": "私たちが第三者に共有する可能性のあるあなたの情報",
"policy_whatwetell_p1": "私たちは、法的に要求されない限り、私たちが収集した情報またはあなたから私たちに提供された情報を第三者に共有しません。",
"policy_howweuse_p2": "ブラウザに関する情報(デスクトップなのかモバイル端末の OS なのか)は、機能の改善に優先順位を付ける際に決定を下すのに役立ちます。私たちの開発チームは小さく、できる限り多くのユーザーのエクスペリエンスを向上させる選択を行います。",
"policy_howweuse": "私たちが収集した情報を何に使うか",
"policy_howweuse_p1": "収集した情報を使用して、過去の取り組みのうちどれが成功したかを評価することで、CryptPad の宣伝に関するより良い意思決定を行います。あなたの所在地に関する情報により、英語以外の言語に対するサポートの改善を検討すべきかどうかがわかります。",
"crowdfunding_button": "CryptPad を支援",
"policy_choices_vpn": "私たちがホストするインスタンスを使用したいが、IP アドレスを私たちに公開したくない場合は、<a href=\"https://www.torproject.org/projects/torbrowser.html.en\" title=\"downloads from the Tor project\" target=\"_blank\" rel=\"noopener noreferrer\">Tor Browser</a> または <a href=\"https://riseup.net/en/vpn\" title=\"VPNs provided by Riseup\" target=\"_blank\" rel=\"noopener noreferrer\">VPN</a> を使用してあなたの IP アドレスを保護できます。",
"contacts_removeHistoryTitle": "チャット履歴を削除",
"properties_passwordSuccessFile": "パスワードは正常に変更されました。",
"drive_sfPasswordError": "誤ったパスワードです",
@ -404,7 +388,7 @@
"whatis_model": "ビジネスモデル",
"whatis_collaboration": "プライベートコラボレーション",
"home_support_title": "CryptPad を支援する",
"home_opensource": "CryptPad は、個人やプロなど誰でもホストすることができます。ソースコードは <a rel=\"noopener noreferrer\" target=\"_blank\" href=\"https://github.com/xwiki-labs/cryptpad\">GitHub</a> で確認できます。",
"home_opensource": "CryptPad は、個人やプロなど誰でもホストすることができます。ソースコードは <a>GitHub</a> で確認できます。",
"home_opensource_title": "オープンソース",
"home_host_title": "このインスタンスについて",
"home_privacy_text": "CryptPad は、データをプライベートに保護しながらコラボレーションを可能にするように構築されています。すべてのコンテンツは、あなたのブラウザ上で暗号化および復号されます。つまり、ドキュメント、チャット、およびファイルは、あなたがログインしているセッション以外では読み取れません。サービス管理者でさえ、あなたの情報にアクセスすることはできません。",

@ -59,7 +59,6 @@
"editor": "editor",
"userlist_offline": "You're currently offline, the user list is not available.",
"language": "Language",
"newVersion": "<b>CryptPad has been updated!</b><br>Check out what's new in the latest version:<br><a href=\"https://github.com/xwiki-labs/cryptpad/releases/tag/{0}\" target=\"_blank\">Release notes for CryptPad {0}</a>",
"upgrade": "Upgrade",
"upgradeAccount": "Upgrade account",
"storageStatus": "Storage:<br /><b>{0}</b> used out of <b>{1}</b>",
@ -70,7 +69,7 @@
"formattedGB": "{0} GB",
"formattedKB": "{0} KB",
"pinLimitReached": "You've reached your storage limit",
"pinLimitReachedAlert": "You've reached your storage limit. New pads won't be stored in your CryptDrive.<br>You can either remove pads from your CryptDrive or <a href=\"https://accounts.cryptpad.fr/#!on={0}\" target=\"_blank\">subscribe to a premium offer</a> to increase your limit.",
"pinLimitReachedAlert": "You've reached your storage limit. New pads won't be stored in your CryptDrive.<br>You can either remove pads from your CryptDrive or <a>subscribe to a premium offer</a> to increase your limit.",
"pinLimitReachedAlertNoAccounts": "You've reached your storage limit",
"pinLimitNotPinned": "You've reached your storage limit.<br>This pad is not stored in your CryptDrive.",
"pinLimitDrive": "You've reached your storage limit.<br>You can't create new pads.",
@ -87,7 +86,7 @@
"saveTitle": "Save the title (enter)",
"forgetButton": "Delete",
"forgetPrompt": "Clicking OK will move this pad to your trash. Are you sure?",
"movedToTrash": "That pad has been moved to the trash.<br><a href=\"/drive/\">Access my Drive</a>",
"movedToTrash": "That pad has been moved to the trash.<br><a>Access my Drive</a>",
"shareButton": "Share",
"shareSuccess": "Copied link to clipboard",
"userListButton": "User list",
@ -247,7 +246,6 @@
"contacts_online": "Another user from this room is online",
"fm_rootName": "Documents",
"fm_trashName": "Trash",
"fm_unsortedName": "Unsorted files",
"fm_filesDataName": "All files",
"fm_templateName": "Templates",
"fm_searchName": "Search",
@ -291,7 +289,6 @@
"fm_info_anonymous": "You are not logged in so your documents will expire after {0} days. Clearing your browser's history may make them disappear.<br><a href=\"/register/\">Sign up</a> (no personal information required) or <a href=\"/login/\">Log in</a> to store them in your drive indefinitely. <a href=\"https://docs.cryptpad.fr/en/user_guide/user_account.html#account-types\" target=\"_blank\">Read more about registered accounts</a>.",
"fm_info_sharedFolder": "This is a shared folder. You're not logged in so you can only access it in read-only mode.<br><a href=\"/register/\">Sign up</a> or <a href=\"/login/\">Log in</a> to be able to import it to your CryptDrive and to modify it.",
"fm_info_owned": "You are the owner of the pads displayed here. This means you can remove them permanently from the server whenever you want. If you do so, other users won't be able to access them anymore.",
"fm_alert_anonymous": "Hello there, you are currently using CryptPad anonymously, that's ok but your pads may be deleted after a period of inactivity. We have disabled advanced features of the drive for anonymous users because we want to be clear that it is not a safe place to store things. You can <a href=\"https://blog.cryptpad.fr/2017/05/17/You-gotta-log-in/\" target=\"_blank\">read more</a> about why we are doing this and why you really should <a href=\"/register/\">Sign up</a> and <a href=\"/login/\">Log in</a>.",
"fm_error_cantPin": "Internal server error. Please reload the page and try again.",
"fm_viewListButton": "List view",
"fm_viewGridButton": "Grid view",
@ -342,7 +339,7 @@
"login_invalPass": "Password required",
"login_unhandledError": "An unexpected error occurred :(",
"register_importRecent": "Import documents from your unregistered session",
"register_acceptTerms": "I accept <a href='/terms.html' tabindex='-1'>the terms of service</a>",
"register_acceptTerms": "I accept <a>the terms of service</a>",
"register_passwordsDontMatch": "Passwords do not match!",
"register_passwordTooShort": "Passwords must be at least {0} characters long.",
"register_mustAcceptTerms": "You must accept the terms of service.",
@ -350,7 +347,7 @@
"register_header": "Register",
"register_writtenPassword": "I have written down my username and password, proceed",
"register_cancel": "Cancel",
"register_warning": "<i class='fa fa-warning'></i> Warning",
"register_warning": "Warning",
"register_alreadyRegistered": "This user already exists, do you want to log in?",
"register_emailWarning0": "It looks like you submitted your email as your username.",
"register_emailWarning1": "You can do that if you want, but it won't be sent to our server.",
@ -517,21 +514,6 @@
"whatis_title": "What is CryptPad?",
"whatis_collaboration": "Private Collaboration",
"whatis_drive": "Organization with CryptDrive",
"policy_title": "CryptPad Privacy Policy",
"policy_whatweknow": "What we know about you",
"policy_whatweknow_p1": "As an application that is hosted on the web, CryptPad has access to metadata exposed by the HTTP protocol. This includes your IP address, and various other HTTP headers that can be used to identify your particular browser. You can see what information your browser is sharing by visiting <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending\" title=\"what http headers is my browser sending\">WhatIsMyBrowser.com</a>.",
"policy_howweuse": "How we use what we learn",
"policy_howweuse_p1": "We use this information to make better decisions about promoting CryptPad, by evaluating which of our past efforts were successful. Information about your location lets us know whether we should consider providing better support for languages other than English.",
"policy_howweuse_p2": "Information about your browser (whether it's a desktop or mobile operating system) helps us make decisions when prioritizing feature improvements. Our development team is small, and we try to make choices that will improve as many users' experience as possible.",
"policy_whatwetell": "What we tell others about you",
"policy_whatwetell_p1": "We do not furnish to third parties the information that we gather or that you provide to us unless we are legally required to do so.",
"policy_links": "Links to other sites",
"policy_links_p1": "This site contains links to other sites, including those produced by other organizations. We are not responsible for the privacy practices or the contents of any outside sites. As a general rule, links to outside sites are launched in a new browser window, to make clear that you are leaving CryptPad.fr.",
"policy_ads": "Advertisement",
"policy_ads_p1": "We do not display any online advertising, though we may link to the bodies which are financing our research.",
"policy_choices": "Choices you have",
"policy_choices_open": "Our code is open source, so you always have the option of hosting your own instance of CryptPad.",
"policy_choices_vpn": "If you want to use our hosted instance, but don't want to expose your IP address, you can protect your IP using the <a href=\"https://www.torproject.org/projects/torbrowser.html.en\" title=\"downloads from the Tor project\" target=\"_blank\" rel=\"noopener noreferrer\">Tor browser bundle</a>, or a <a href=\"https://riseup.net/en/vpn\" title=\"VPNs provided by Riseup\" target=\"_blank\" rel=\"noopener noreferrer\">VPN</a>.",
"features": "Features",
"features_title": "Features",
"features_anon": "Non-registered",
@ -580,28 +562,11 @@
"header_homeTitle": "Go to CryptPad homepage",
"help_genericMore": "Learn more about how CryptPad can work for you by reading our <a>Documentation</a>.",
"driveReadmeTitle": "What is CryptPad?",
"readme_welcome": "Welcome to CryptPad !",
"readme_p1": "Welcome to CryptPad, this is where you can take note of things alone and with contacts.",
"readme_p2": "This pad will give you a quick walk through of how you can use CryptPad to take notes, keep them organized and work together on them.",
"readme_cat1": "Get to know your CryptDrive",
"readme_cat1_l1": "Make a pad: In your CryptDrive, click {0} then {1} and you can make a pad.",
"readme_cat1_l2": "Open Pads from your CryptDrive: double-click on a pad icon to open it.",
"readme_cat1_l3": "Organize your pads: When you are logged in, every pad you access will be shown as in the {0} section of your drive.",
"readme_cat1_l3_l1": "You can click and drag files into folders in the {0} section of your drive and make new folders.",
"readme_cat1_l3_l2": "Remember to try right clicking on icons because there are often additional menus.",
"readme_cat1_l4": "Put old pads in the trash: You can click and drag your pads into the {0} the same way you drag them into folders.",
"readme_cat2": "Make pads like a pro",
"edit": "edit",
"view": "view",
"readme_cat2_l1": "The {0} button in your pad allows you to give access to collaborators to either {1} or to {2} the pad.",
"readme_cat2_l2": "Change the title of the pad by clicking on the pencil",
"readme_cat3": "Discover CryptPad apps",
"readme_cat3_l1": "With CryptPad code editor, you can collaborate on code like Javascript and markdown like HTML and Markdown",
"readme_cat3_l2": "With CryptPad slide editor, you can make quick presentations using Markdown",
"readme_cat3_l3": "With CryptPoll you can take quick votes, especially for scheduling meetings which fit with everybody's calendar",
"feedback_about": "If you're reading this, you were probably curious why CryptPad is requesting web pages when you perform certain actions",
"feedback_about": "If you're reading this, you were probably curious why CryptPad is requesting web pages when you perform certain actions.",
"feedback_privacy": "We care about your privacy, and at the same time we want CryptPad to be very easy to use. We use this file to figure out which UI features matter to our users, by requesting it along with a parameter specifying which action was taken.",
"feedback_optout": "If you would like to opt out, visit <a href='/settings/'>your user settings page</a>, where you'll find a checkbox to enable or disable user feedback",
"feedback_optout": "If you would like to opt out, visit <a>your user settings page</a>, where you'll find a checkbox to enable or disable user feedback.",
"creation_404": "This pad no longer exists. Use the following form to create a new pad.",
"creation_owned": "Owned pad",
"creation_owned1": "An <b>owned</b> item can be destroyed whenever the owner wants. Destroying an owned item makes it unavailable from other users' CryptDrives.",
@ -657,7 +622,7 @@
"autostore_sf": "folder",
"autostore_pad": "pad",
"autostore_notstored": "This {0} is not in your CryptDrive. Do you want to store it now?",
"autostore_settings": "You can enable automatic pad storage in your <a href=\"/settings/\">Settings</a> page!",
"autostore_settings": "You can enable automatic pad storage in your <a>Settings</a> page!",
"autostore_store": "Store",
"autostore_hide": "Don't store",
"autostore_error": "Unexpected error: we were unable to store this pad, please try again.",
@ -666,7 +631,7 @@
"autostore_notAvailable": "You must store this pad in your CryptDrive before being able to use this feature.",
"crowdfunding_button": "Support CryptPad",
"crowdfunding_button2": "Help CryptPad",
"crowdfunding_popup_text": "<h3>We need your help!</h3>To ensure that CryptPad is actively developed, consider supporting the project via the <a href=\"https://opencollective.com/cryptpad\">OpenCollective page</a>, where you can see our <b>Roadmap</b> and <b>Funding goals</b>.",
"crowdfunding_popup_text": "<h3>We need your help!</h3>To ensure that CryptPad is actively developed, consider supporting the project via the OpenCollective page, where you can see our <b>Roadmap</b> and <b>Funding goals</b>.",
"crowdfunding_popup_no": "Not now",
"survey": "CryptPad survey",
"markdown_toc": "Contents",
@ -748,7 +713,7 @@
"support_disabledHint": "This CryptPad instance is not yet configured to use a support form.",
"support_cat_new": "New ticket",
"support_formTitle": "New Ticket",
"support_formHint": "Use this form to securely contact the administrators about issues and questions.<br>Please note that some issues/questions may already be addressed in the <a href=\"https://docs.cryptpad.fr/en/user_guide/index.html\" rel=\"noopener noreferrer\" target=\"_blank\">CryptPad User Guide</a>. Please do not create a new ticket if you already have an open ticket about the same issue. Instead, reply to your original message with any additional information.",
"support_formHint": "Use this form to securely contact the administrators about issues and questions.<br>Please note that some issues/questions may already be addressed in the <a>CryptPad User Guide</a>. Please do not create a new ticket if you already have an open ticket about the same issue. Instead, reply to your original message with any additional information.",
"support_formButton": "Send",
"support_formTitleError": "Error: title is empty",
"support_formContentError": "Error: content is empty",
@ -922,7 +887,7 @@
"settings_cat_security": "Confidentiality",
"settings_safeLinksTitle": "Safe Links",
"settings_safeLinksCheckbox": "Enable safe links",
"safeLinks_error": "This link was copied from the browser's address bar and does not provide access to the document. Please use the <i class=\"fa fa-shhare-alt\"></i> <b>Share</b> menu to share directly with contacts or copy the link. <a href=\"https://docs.cryptpad.fr/en/user_guide/user_account.html#confidentiality\"> Read more about the Safe Links feature</a>.\n",
"safeLinks_error": "This link was copied from the browser's address bar and does not provide access to the document. Please use the <i></i> <b>Share</b> menu to share directly with contacts or copy the link. <a> Read more about the Safe Links feature</a>.",
"dontShowAgain": "Don't show again",
"profile_login": "You need to log in to add this user to your contacts",
"settings_safeLinksHint": "CryptPad includes the keys to decrypt your pads in their links. Anyone with access to your browsing history can potentially read your data. This includes intrusive browser extensions and browsers that sync your history across devices. Enabling \"safe links\" prevents the keys from entering your browsing history or being displayed in your address bar whenever possible. We strongly recommend that you enable this feature and use the {0} Share menu.",
@ -1005,7 +970,7 @@
"slide_backCol": "Background color",
"slide_textCol": "Text color",
"support_languagesPreamble": "The support team speaks the following languages:",
"settings_safeLinkDefault": "Safe Links are now turned on by default. Please use the <i class=\"fa fa-shhare-alt\"></i> <b>Share</b> menu to copy links rather than your browser's address bar.",
"settings_safeLinkDefault": "Safe Links are now turned on by default. Please use the <i></i> <b>Share</b> menu to copy links rather than your browser's address bar.",
"info_imprintFlavour": "<a>Legal information about the administrators of this instance</a>.",
"user_about": "About CryptPad",
"info_privacyFlavour": "Our <a>privacy policy</a> describes how we treat your data.",
@ -1138,9 +1103,9 @@
"home_privacy_text": "CryptPad is built to enable collaboration while keeping data private. All content is encrypted and decrypted by your browser. This means documents, chats, and files are unreadable outside of the session where you are logged in. Even the service administrators do not have access to your information.",
"home_host_title": "About this instance",
"home_opensource_title": "Open Source",
"home_opensource": "Anyone can host CryptPad and offer the service in a personal or professional capacity. The source code is available on <a rel=\"noopener noreferrer\" target=\"_blank\" href=\"https://github.com/xwiki-labs/cryptpad\">Github</a>.",
"home_opensource": "Anyone can host CryptPad and offer the service in a personal or professional capacity. The source code is available on <a>Github</a>.",
"home_support_title": "Support CryptPad",
"home_support": "<p>The development team does not profit from user data in any way. This is part of a vision for online services that respect privacy. Unlike the big platforms that pretend to be \"free\" while making profits from personal information, we aim to build a sustainable model funded willingly by users.</p><p>You can support the project by making a one-time or recurring donation through our Open Collective. Our budget is transparent and updates are published regularly. There are also a number of <a href=\"https://docs.cryptpad.fr/en/how_to_contribute.html\" rel=\"noopener noreferrer\" target=\"_blank\">non-financial ways to contribute</a>.</p>",
"home_support": "<p>The development team does not profit from user data in any way. This is part of a vision for online services that respect privacy. Unlike the big platforms that pretend to be \"free\" while making profits from personal information, we aim to build a sustainable model funded willingly by users.</p><p>You can support the project by making a one-time or recurring donation through our Open Collective. Our budget is transparent and updates are published regularly. There are also a number of <a>non-financial ways to contribute</a>.</p>",
"register_notes_title": "Important notes",
"register_notes": "<ul class=\"cp-notes-list\"><li>Your password is the secret key that encrypts all of your documents. <span class=\"red\">If you lose it there is no way we can recover your data.</span></li><li>If you are using a shared computer, <span class=\"red\">remember to log out</span> when you are done. Only closing the browser window leaves your account exposed. </li><li>To keep the documents you created and/or stored without being logged in, tick \"Import documents from your anonymous session\". </li></ul>",
"register_warning_note": "Due to the encrypted nature of CryptPad, the service administrators will not be able to recover data in case you forget your username and/or password. Please save them in a safe place.",
@ -1151,7 +1116,7 @@
"whatis_model": "Business model",
"whatis_model_info": "<p>CryptPad has been supported since 2016 by French and European research grants such as BPI France, NLNet Foundation, NGI Trust, Mozilla Open Source Support, as well as donations and subscriptions to cryptpad.fr. We believe that public money should fund public code, so the service is fully open source. This means anyone can use, host, and modify the software.</p><p>CryptPad does not profit from user data. This is part of a vision for online services that respect privacy. Unlike the big platforms that pretend to be \"free\" while making profits from personal information, CryptPad aims to build a sustainable model funded willingly by users.</p><p>We offer CryptPad's functionality for free because we believe everyone deserves personal privacy, not just people with disposable income. If you are in a position to support the project, you will contribute new features, improvements and maintenance that benefit all users.</p><p>Now that the feasibility of the project has been established, the next goal is to make it financially sustainable through user funding. If you would like to support CryptPad and help make it a sustainable alternative to the big platforms, please consider making a one-time or recurring donation.</p>",
"whatis_xwiki": "Made at XWiki",
"whatis_xwiki_info": "<p>CryptPad is made at <a rel=\"noopener noreferrer\" target=\"_blank\" href=\"https://xwiki.com\">XWiki</a>, a company based in Paris, France that has been making open-source software for over 15 years. We have extensive experience making collaborative software to organise information. Our track record shows we are committed to the long-term development and maintenance of CryptPad.</p>",
"whatis_xwiki_info": "<p>CryptPad is made at <a>XWiki</a>, a company based in Paris, France that has been making open-source software for over 15 years. We have extensive experience making collaborative software to organise information. Our track record shows we are committed to the long-term development and maintenance of CryptPad.</p>",
"creation_expiresIn": "Expires in",
"creation_helperText": "Open in documentation",
"docs_link": "Documentation",
@ -1189,5 +1154,32 @@
"importError": "Failed to import (wrong format)",
"fm_cantUploadHere": "Can't upload a file here",
"oo_lostEdits": "Unfortunately your recent unsaved edits could not be recovered after synchronising new content.",
"toolbar_degraded": "Over {0} editors are currently present in this document. The user list and chat are disabled to improve performance."
"toolbar_degraded": "Over {0} editors are currently present in this document. The user list and chat are disabled to improve performance.",
"admin_cat_broadcast": "Broadcast",
"admin_maintenanceTitle": "Maintenance",
"admin_maintenanceHint": "Plan a maintenance on this instance and notify all users. Limited to one active maintenance at a given time.",
"admin_maintenanceButton": "Plan maintenance",
"admin_maintenanceCancel": "Cancel maintenance",
"broadcast_start": "Start",
"broadcast_end": "End",
"broadcast_maintenance": "A maintenance is planned between <b>{0}</b> and <b>{1}</b>. CryptPad may be unavailable at that time.",
"admin_surveyTitle": "Survey",
"admin_surveyHint": "Add, update or remove a link to an external survey. Users will receive a notification and the survey will remain available from the user menu.",
"broadcast_newSurvey": "A new survey is available. Click to open.",
"admin_surveyButton": "Save survey",
"admin_surveyCancel": "Remove",
"admin_surveyActive": "Open survey",
"broadcast_surveyURL": "Survey link",
"admin_broadcastTitle": "Broadcast message",
"admin_broadcastHint": "Send a message to all users on this instance. All existing and new users will receive it as a notification. Preview messages before sending them with <b>Preview notification</b>. Preview notifications have a red icon and are visible only to you.",
"admin_broadcastButton": "Send",
"admin_broadcastActive": "Active message",
"admin_broadcastCancel": "Delete message",
"broadcast_translations": "Translations",
"broadcast_defaultLanguage": "Fallback to this language",
"broadcast_preview": "Preview notification",
"broadcast_newCustom": "Message from the administrators",
"settings_deleteWarning": "Warning: you are currently subscribed to a premium plan (paid or given by another user). Please cancel your plan before deleting your account as will not be possible without contacting support once your account is deleted.",
"settings_deleteContinue": "Delete my account",
"settings_deleteSubscription": "Manage my subscription"
}

@ -7,47 +7,48 @@
"kanban": "Kanban",
"slide": "Presentasjon",
"file": "Fil",
"todo": "Oppgaver",
"todo": "Gjøremål",
"contacts": "Kontakter",
"sheet": "Regneark",
"teams": "Grupper",
"media": "Media",
"drive": "CryptDrive"
"drive": "CryptDrive",
"whiteboard": "Tavle"
},
"button_newpad": "Nytt tekstdokument",
"button_newcode": "Ny kode-pad",
"button_newcode": "Nytt kode-dokument",
"button_newpoll": "Ny avstemming",
"button_newslide": "Ny presentasjon",
"button_newwhiteboard": "Nytt whiteboard",
"button_newwhiteboard": "Ny tavle",
"button_newkanban": "Ny Kanban",
"button_newsheet": "Nytt regneark",
"common_connectionLost": "<b>Frakoblet server</b><br>Beklager, du er i lesemodus inntil vi har koblet deg opp igjen.",
"common_connectionLost": "<b>Tjener frakoblet</b><br>I lesemodus til tilkoblingen gjenopprettes.",
"typeError": "Dette dokumentet er ikke kompatibelt med det valgte programmet",
"onLogout": "Du er logget av, {0}klikk her{1} for å logge inn<br>eller trykk <em>Escape</em> for å se dokumentet i lesemodus.",
"padNotPinned": "Denne pad-en vil automatisk utgå på dato etter 3 måneder uten aktivitet, {0}logg inn{1} eller {2}registrer deg{3} for å ta vare på den.",
"anonymousStoreDisabled": "Beklager, denne CryptPad-en er ikke tilgjengelig for anonyme brukere. Vennligst logg inn for å bruke CryptDrive.",
"expiredError": "Vi beklager, denne paden har gått ut på dato og er ikke tilgjengelig.",
"deletedError": "Vi beklager, denne pad-en er sletta og er ikke lenger tilgjengelig.",
"inactiveError": "Vi beklager, denne pad-en har blitt sletta pga. inaktivitet. Vennligst trykk Esc for å lage en ny.",
"chainpadError": "Vi beklager, en kritisk feil oppstod. Denne siden er i lesemodus slik at du ikke mister arbeidet.<br>Trykk <em>Esc</em> for å fortsette, eller forsøk å laste inn sida på nytt.",
"invalidHashError": "Vi beklager, dokumentet du ba om har en ugyldig link.",
"errorCopy": " Du kan ta vare på dette innholdet ved å trykke <em>Esc</em>.<br>Om du forlater denne sida er innholdet borte!",
"errorRedirectToHome": "Trykk <em>Esc</em> for å videresendes til din CryptDrive.",
"newVersionError": "Jej, en en ny versjon av CryptPad er her.<br><a href='#'>Last inn</a> eller trykk Esc for å redigere innholdet i <b>offline modus</b>.",
"loading": "Laster…",
"onLogout": "Du er utlogget, {0}klikk her{1} for å logge inn<br>eller trykk <em>Esc</em> for å se dokumentet i lesemodus.",
"padNotPinned": "Dette dokumentet vil automatisk utløpe etter 3 måneder uten aktivitet, {0}logg inn{1} eller {2}registrer deg{3} for å ta vare på det.",
"anonymousStoreDisabled": "Beklager, denne CryptPad-dokumentet er ikke tilgjengelig for anonyme brukere. Logg inn for å bruke CryptDrive.",
"expiredError": "Dette dokumentet har utløpt, og er ikke tilgjengelig.",
"deletedError": "Dette dokumentet er slettet, og dermed ikke lenger tilgjengelig.",
"inactiveError": "Dette dokumentet har blitt har blitt slettet pga. inaktivitet. Trykk «Esc» for å lage en nytt dokument.",
"chainpadError": "En kritisk feil oppstod under oppdatering av innholdet. Denne siden er i lesemodus slik at du ikke mister arbeidet.<br>Trykk <em>Esc</em> for å fortsette, eller forsøk å laste inn siden på nytt.",
"invalidHashError": "Dokumentet du ba om har en ugyldig nettadresse.",
"errorCopy": " Du kan fremdeles bruke nåværende versjon i lesemodus ved å trykke <em>Esc</em>.",
"errorRedirectToHome": "Trykk <em>Esc</em> for bli videresendt til din CryptDrive.",
"newVersionError": "En ny versjon av CryptPad er her.<br><a href='#'>Gjeninnlast siden</a> eller trykk «Esc» for å redigere innholdet i <b>frakoblet modus</b>.",
"loading": "Laster …",
"error": "Feil",
"saved": "Lagret",
"deleted": "Sletta",
"deletedFromServer": "Dokumentet er sletta",
"mustLogin": "Du må være innlogga for å få tilgang til denne sida",
"disabledApp": "Vi beklager, denne applikasjon er slått av. Kontakt eieren av denne pad-en om du vil vite mer.",
"realtime_unrecoverableError": "Vi beklager, noe har gått skikkelig galt. Klikk OK for å laste innholdet på nytt.",
"deleted": "Slettet",
"deletedFromServer": "Dokument slettet",
"mustLogin": "Du må være innlogget for å få tilgang til denne siden",
"disabledApp": "Dette programmet har blitt avslått. Kontakt CryptPad-eieren om du vil vite mer.",
"realtime_unrecoverableError": "Noe har gått skikkelig galt. Klikk «OK» for å laste innholdet på nytt.",
"disconnected": "Frakoblet",
"synchronizing": "Synkroniserer",
"reconnecting": "Kobler opp igjen",
"typing": "Redigerer",
"initializing": "Setter i gang…",
"forgotten": "Flytta til papirkurven",
"synchronizing": "Synkroniserer",
"reconnecting": "Kobler opp igjen",
"typing": "Redigerer",
"initializing": "Setter i gang …",
"forgotten": "Flyttet til papirkurven",
"errorState": "Kritisk feil: {0}",
"readonly": "Skrivebeskyttet",
"anonymous": "Anonym",
@ -55,66 +56,65 @@
"viewer": "leser",
"viewers": "lesere",
"editor": "redigerer",
"userlist_offline": "Du er frakobla, brukerlista er ikke tilgjengelig.",
"userlist_offline": "Du er frakoblet, brukerlisten er ikke tilgjengelig.",
"language": "Språk",
"newVersion": "<b>CryptPad er oppdatert!</b><br>Sjekk siste nytt:<br><a href=\"https://github.com/xwiki-labs/cryptpad/releases/tag/{0}\" target=\"_blank\">Versjonsinnhold for CryptPad {0}</a>",
"upgrade": "Oppgrader",
"upgradeAccount": "Oppgrader kontoen",
"MB": "Megabyte",
"GB": "Gigabyte",
"KB": "Kilobyte",
"pinLimitReached": "Beklager, du har brukt lagringskvota di",
"pinLimitReachedAlert": "Beklager, du har brukt opp lagringskvota di. Nye pads kan ikke lagres i CryptDriven din.<br>Du kan enten slette eksisterende pads fra CryptDriven eller <a href=\"https://accounts.cryptpad.fr/#!on={0}\" target=\"_blank\">velge et premium abonnement</a> for å øke lagringskvota.",
"pinLimitReachedAlertNoAccounts": "Beklager, du har brukt lagringskvota di",
"pinLimitNotPinned": "Beklager, du har brukt opp lagringskvota di. <>Denne paden kan ikke lagres i din CryptDrive.",
"pinLimitDrive": "Beklager, du har brukt opp lagringskvota di. <br>Du kan desverre ikke lage nye pads.",
"upgradeAccount": "Oppgrader konto",
"MB": "MB",
"GB": "GB",
"KB": "KB",
"pinLimitReached": "Beklager, du har brukt lagringskvoten din",
"pinLimitReachedAlert": "Du har brukt opp lagringskvoten din. Nye dokumenter kan ikke lagres i din CryptDriven.<br>Du kan enten slette eksisterende dokumenter i den, eller <a>velge et premium-abonnement</a> for å øke lagringskvoten.",
"pinLimitReachedAlertNoAccounts": "Du har brukt opp lagringskvoten din",
"pinLimitNotPinned": "Du har brukt opp lagringskvoten din. <br>Dette dokumentet er ikke lagret i din CryptDrive.",
"pinLimitDrive": "Du har brukt opp lagringskvoten din. <br>Du kan ikke lage nye dokumenter.",
"importButton": "Importer",
"importButtonTitle": "Importer en pad fra en fil på maskina di",
"importButtonTitle": "Importer et dokument fra en fil på maskinen din",
"exportButton": "Eksporter",
"exportButtonTitle": "Eksporter denne paden til en fil lokalt på maskina di",
"exportPrompt": "Hva vil du kalle fila?",
"changeNamePrompt": "Endre navnet ditt (eller la stå blankt for å være anonym): ",
"exportButtonTitle": "Eksporter dette dokumentet til en lokal fil på datamaskinen din",
"exportPrompt": "Hva vil du kalle filen?",
"changeNamePrompt": "Endre navnet ditt (eller la det stå tomt for å være anonym): ",
"user_rename": "Endre visningsnavnet ditt",
"user_displayName": "Visningsnavn",
"user_accountName": "Kontonavn",
"clickToEdit": "Klikk for å redigere",
"saveTitle": "Lagre denne tittelen (enter)",
"forgetButton": "Slett",
"forgetPrompt": "Om du klikker OK vil denne paden bli flytta til papirkurven. Er du sikker på det?",
"movedToTrash": "Denne paden er flytta til papirkurven.<br><a href=\"/drive/\">Gå til Driven min</a>",
"forgetPrompt": "Om du klikker «OK» vil dette dokumentet bli flyttet til papirkurven. Er du sikker?",
"movedToTrash": "Dette dokumentet har blitt flyttet til papirkurven.<br><a>Gå til min CryptDrive</a>",
"shareButton": "Del",
"shareSuccess": "Linken er kopiert",
"shareSuccess": "Lenke kopiert til utklippstavle",
"userListButton": "Brukerliste",
"userAccountButton": "Kontoen din",
"newButton": "Ny",
"newButtonTitle": "Lag en ny pad",
"newButtonTitle": "Lag et nytt dokument",
"uploadButton": "Last opp filer",
"uploadButtonTitle": "Last opp en ny fil til CryptoDriven din",
"uploadButtonTitle": "Last opp en ny fil til din CryptDrive",
"saveTemplateButton": "Lagre som mal",
"saveTemplatePrompt": "Velg et navn på malen",
"templateSaved": "Malen er lagra!",
"selectTemplate": "Velg en mal eller trykk escape",
"useTemplate": "Vil du starte fra en mal?",
"saveTemplatePrompt": "Gi malen et navn",
"templateSaved": "Mal lagret.",
"selectTemplate": "Velg en mal eller trykk Esc",
"useTemplate": "Start med en mal?",
"useTemplateOK": "Velg en mal (Enter)",
"useTemplateCancel": "Start fra nytt (Esc)",
"useTemplateCancel": "Start med blanke ark (Esc)",
"template_import": "Importer en mal",
"template_empty": "Ingen mal du kan velge fra",
"previewButtonTitle": "Vis eller skjul Markdown forhåndsvisning",
"presentButtonTitle": "Gå i presentasjonsmodus",
"backgroundButtonTitle": "Endre bakgrunnsfargen til presentasjonen",
"template_empty": "Ingen maler tilgjengelig",
"previewButtonTitle": "Vis eller skjul Markdown-forhåndsvisning",
"presentButtonTitle": "Gå til presentasjonsmodus",
"backgroundButtonTitle": "Endre presentasjonens bakgrunnsfarge",
"colorButtonTitle": "Endre tekstfargen i presentasjonsmodus",
"propertiesButton": "Egenskaper",
"propertiesButtonTitle": "Se pad-egenskapene",
"propertiesButtonTitle": "Se dokument-egenskapene",
"printText": "Skriv ut",
"printButton": "Skriv ut (enter)",
"printButton": "Skriv ut (Enter)",
"printButtonTitle2": "Skriv ut dokumentet eller eksporter til PDF",
"printOptions": "Layout-valg",
"printSlideNumber": "Vis slide-nummeret",
"printOptions": "Visnings-valg",
"printSlideNumber": "Vis sidenummeret",
"printDate": "Vis datoen",
"printTitle": "Vis pad-tittelen",
"printCSS": "Egne stilformater (CSS):",
"printTitle": "Vis dokument-tittelen",
"printCSS": "Egne stilregler (CSS):",
"printTransition": "Slå på overgangsanimasjoner",
"printBackground": "Bruk som bakgrunnsbilde",
"printBackground": "Bruk bakgrunnsbilde",
"printBackgroundButton": "Velg et bilde",
"printBackgroundValue": "<b>Nåværende bakgrunn:</b> <em>{0}</em>",
"printBackgroundNoValue": "<em>Ingen bakgrunnsbilder å vise</em>",
@ -123,168 +123,498 @@
"filePicker_close": "Lukk",
"filePicker_description": "Legg til en fil fra din CryptDrive eller last opp en ny fil",
"filePicker_filter": "Filtrer filer basert på filnavn",
"tags_title": "Tags (kun for ditt bruk)",
"tags_add": "Oppdater tags for valgte pads",
"tags_notShared": "Dine tags deles ikke med andre brukerer",
"tags_duplicate": "Dupliser tag:{0}",
"tags_noentry": "Du kan ikke tagge en sletta pad!",
"tags_title": "Etiketter (kun for ditt bruk)",
"tags_add": "Oppdater etikettene for valgte dokumenter",
"tags_notShared": "Dine etiketter deles ikke med andre brukere",
"tags_duplicate": "Dupliser etikett: {0}",
"tags_noentry": "Du kan ikke etkettmerke et slettet dokument.",
"slideOptionsText": "Valg",
"slideOptionsTitle": "Mekk på dine slides",
"slide_invalidLess": "Ugyldig custom-stil",
"slideOptionsTitle": "Tilpass dine presentasjonssider",
"slide_invalidLess": "Ugyldig egendefinert-stil",
"languageButton": "Språk",
"languageButtonTitle": "Velg språket du vil bruke for kodefarge",
"themeButton": "Tema",
"themeButtonTitle": "Velg fargetema du vil bruke når du redigerer kode og presentasjoner",
"editShare": "Redigerer link",
"viewShare": "Linken kan bare leses",
"languageButtonTitle": "Velg språket du vil bruke for kodeframheving",
"themeButton": "Drakt",
"themeButtonTitle": "Angi draktvalg for redigering av kode og presentasjoner",
"editShare": "Redigerer linke",
"viewShare": "Lenken kan kun leses",
"canvas_width": "Bredde",
"canvas_opacity": "Gjennomsiktighet",
"canvas_opacityLabel": "Gjennomsiktighet:{0}",
"canvas_opacityLabel": "Gjennomsiktighet: {0}",
"canvas_widthLabel": "Bredde: {0}",
"canvas_saveToDrive": "Lagre dette bildet som en fil i CryptDriven",
"canvas_saveToDrive": "Lagre dette bildet som fil i din CryptDrive",
"canvas_currentBrush": "Gjeldende pensel",
"canvas_imageEmbed": "Legg til et bilde fra datamaskina di",
"canvas_imageEmbed": "Legg til et bilde fra datamaskinen din",
"profileButton": "Profil",
"profile_upload": " Last opp en ny avatar",
"profile_uploadSizeError": "Beklager, avataren må være mindre enn {0}",
"sharedFolders_share": "Del denne linken med andre registrerte brukere for å gi dem tilgang. Når de åpner linken så vil denne delte mappa legges i deres CryptDrive.",
"chrome68": "Det ser ut som du bruker Chrome eller Chromium versjon 68. Denne nettlesern inneholder en bug som gjør at enkelte sider blir hvite. Bytt til en annen fane eller forsøk å scrolle i siden.",
"profile_uploadSizeError": "Avataren må være mindre enn {0}",
"sharedFolders_share": "Del denne lenken med andre registrerte brukere for å gi dem tilgang. Når de åpner lenken så vil denne delte mappen legges i deres CryptDrive.",
"chrome68": "Det ser ut som du bruker Chrome eller Chromium versjon 68. Denne nettleseren inneholder en feil som gjør at enkelte sider blir hvite. Bytt til en annen fane eller forsøk å rulle i siden. Feilen bør være rettet i neste versjon av nettleseren din.",
"autostore_file": "fil",
"autostore_sf": "mappe",
"autostore_pad": "",
"autostore_notstored": "Denne {0} er ikke i CryptDriven din. Vil du lagre den?",
"autostore_settings": "Du kan slå på automatisk lagring i <a href=\"/settings/\">1Setting</a>2 sida!",
"autostore_store": "Lager",
"autostore_pad": "dokument",
"autostore_notstored": "Dette {0} er ikke i din CryptDriven. Vil du lagre det?",
"autostore_settings": "Du kan slå på automatisk lagring i dine <a>Innstillinger</a>.",
"autostore_store": "Lagre",
"autostore_hide": "Ikke lagre",
"autostore_error": "Beklager, vi greier ikke å lagre paden, vennligst forsøk igjen.",
"autostore_saved": "Denne paden ble lagra i CryptDriven din!",
"autostore_forceSave": "Lagre fila i CryptDriven",
"autostore_notAvailable": "Du må lagre paden i CryptDriven før du kan bruke denne funksjonen.",
"autostore_error": "Klarer ikke å lagre dette dokumentet. Prøv igjen senere.",
"autostore_saved": "",
"autostore_forceSave": "Lagre filen i din CryptDrive",
"autostore_notAvailable": "Du må lagre dokumentet i din CryptDrive før du kan bruke denne funksjonen.",
"crowdfunding_button": "Støtt CryptPad",
"crowdfunding_popup_no": "Ikke nå",
"markdown_toc": "Innhold",
"fm_expirablePad": "Denne paden vill utgå på dato den {0}",
"admin_authError": "Kun admin-tilgang",
"fm_expirablePad": "Utløper: {0}",
"admin_authError": "Kun administratorer har tilgang til denne siden",
"admin_cat_general": "Generelt",
"admin_cat_stats": "Statistikk",
"adminPage": "Administrasjon",
"admin_activeSessionsTitle": "Aktive tilkoblinger",
"admin_activeSessionsHint": "Antall aktive websockets (og unike IP-adresser tilkobla)",
"admin_activePadsTitle": "Aktive pads",
"admin_activeSessionsHint": "Antall aktive vevsockets (og unike tilkoblede IP-adresser)",
"admin_activePadsTitle": "Aktive dokumenter",
"admin_activePadsHint": "Antall unike dokumenter som er åpne akkurat nå",
"admin_registeredTitle": "Registrerte brukere",
"admin_registeredHint": "Antall registrerte brukere på din økt",
"admin_registeredHint": "Antall registrerte brukere på din instans",
"admin_updateLimitTitle": "Oppdater brukerkvoter",
"admin_updateLimitHint": "Å tvinge gjennom en oppdatering av lagringskvoter kan gjøres når som helst, men er kun nødvendig om det oppstår en feil",
"admin_updateLimitButton": "Oppdater kvoter",
"admin_updateLimitDone": "Oppdatering gjennomført",
"admin_flushCacheTitle": "Tøm HTTP cache",
"admin_flushCacheHint": "Tving brukerne til å laste ned siste oppdatering (kun hvis serveren er i \"fresh mode\")",
"admin_flushCacheButton": "Tøm mellomlager (cache)",
"admin_flushCacheDone": "Mellomlageret (cache) ble tømt",
"footer_product": "Produktet",
"footer_team": "Laget",
"admin_flushCacheTitle": "Tøm HTTP-hurtiglager",
"admin_flushCacheHint": "Tving brukerne til å laste ned siste oppdatering (kun hvis tjeneren er i ferskt modus)",
"admin_flushCacheButton": "Tøm hurtiglager",
"admin_flushCacheDone": "Hurtiglager tømt",
"footer_product": "Produkt",
"footer_team": "Bidragsytere",
"footer_donate": "Doner",
"footer_legal": "Juridisk",
"footer_tos": "Betingelser",
"footer_tos": "Tjenestevilkår",
"contact_admin": "Kontakt administratorne",
"contact_adminHint": "For problemer med kontoen, lagringsgrenser eller tilgang generelt.",
"contact_adminHint": "For problemer med kontoen, lagringsgrenser eller tjenestetilgang.\n",
"contact_dev": "Kontakt utviklerne",
"contact_devHint": "For å sende inn forslag, forbedringer eller takksigelser.",
"contact_devHint": "For å sende inn forslag, forbedringer eller takk.",
"contact_bug": "Feilrapport",
"contact_email": "Epost",
"profile_uploadTypeError": "Feilmelding: avatartypen er desverre ikke tillatt. Tillatte typer er: {0}",
"profile_error": "Det oppstod en feil med den nye profilen din: {0}",
"profile_register": "Vennligst logg inn for å lage en profil!",
"profile_viewMyProfile": "Se profilen min",
"userlist_addAsFriendTitle": "Legg til \"{0}\" som ny kontakt",
"contact_email": "E-post",
"profile_uploadTypeError": "Ugyldig avatartype. Tillatte typer er: {0}",
"profile_error": "Kunne ikke opprette profilen din: {0}",
"profile_register": "Logg inn for å lage en profil.",
"profile_viewMyProfile": "Vis profilen min.",
"userlist_addAsFriendTitle": "Send «{0}» en kontaktforespørsel",
"contacts_title": "Kontakter",
"contacts_added": "Kontaktinvitasjon er akseptert.",
"contacts_rejected": "Kontaktinvitasjonen ble avvist",
"contacts_request": "<em>{0}</em> vil legge deg til som ny kontakt. <b>Akseptere<b>?",
"contacts_added": "Kontaktinvitasjon godtatt.",
"contacts_rejected": "Kontaktinvitasjonen avvist",
"contacts_request": "<em>{0}</em> vil legge deg til som kontakt. <b>Aksepter<b>?",
"contacts_remove": "Fjern denne kontakten",
"contacts_confirmRemove": "Er du sikker på at du vil fjerne <em>{0}</em> fra kontaktlista di?",
"contacts_typeHere": "Skriv en melding her…",
"contacts_warning": "Alt du skriver her kan sees av alle fremtidige brukere av denne paden. Vær forsiktig med å dele sensitiv informasjon!",
"contacts_info1": "Dette er dine kontakter. Herfra kan du:",
"contacts_info2": "Klikk på en kontakt for å snakke",
"contacts_info3": "Dobbeltklikk for å se profilen",
"contacts_info4": "Alle deltagere kan slette meldingsloggen",
"contacts_removeHistoryTitle": "Slett meldingsloggen",
"contacts_confirmRemoveHistory": "Er du sikker på at du vil slette meldingsloggen? Du kan ikke få tilbake meldingene",
"contacts_removeHistoryServerError": "Beklager feil, vi greidde ikke å slette meldingsloggen, vennligst forsøk igjen",
"contacts_fetchHistory": "Hent mer historikk",
"contacts_confirmRemove": "Fjern <em>{0}</em> fra kontaktlisten din?",
"contacts_typeHere": "Skriv en melding her …",
"contacts_warning": "Alt du skriver her kan sees av alle fremtidige brukere av dokumentet. Vær forsiktig med å dele sensitiv info!",
"contacts_info1": "Dette er kontaktene dine. Herfra kan du:",
"contacts_info2": "Klikk på en kontakts ikon for å snakke med vedkommende",
"contacts_info3": "Dobbeltklikk for å vise profilen deres",
"contacts_info4": "Alle deltagere kan slette sludringshistorikkk for godt",
"contacts_removeHistoryTitle": "Tøm sludringshistorikk",
"contacts_confirmRemoveHistory": "Slett sludringshistorikk for godt? Du kan ikke få tilbake meldingene.",
"contacts_removeHistoryServerError": "Kunne ikke slette sludringshistorikken. Prøv igjen senere.",
"contacts_fetchHistory": "Hent eldre historikk",
"contacts_rooms": "Rom",
"contacts_leaveRoom": "Forlat rommet",
"contacts_online": "En annen romkamerat er online",
"contacts_online": "En annen bruker fra dette rommet er pålogget",
"fm_rootName": "Dokumenter",
"fm_trashName": "Papirkurv",
"fm_unsortedName": "Usorterte filer",
"fm_filesDataName": "Alle filer",
"fm_templateName": "Maler",
"fm_searchName": "Søk",
"fm_recentPadsName": "Nylig brukte pads",
"fm_recentPadsName": "Nylig brukte dokumenter",
"fm_ownedPadsName": "Dine",
"fm_tagsName": "Tagger",
"fm_tagsName": "Etiketter",
"fm_sharedFolderName": "Delt mappe",
"fm_searchPlaceholder": "Søk…",
"fm_searchPlaceholder": "Søk …",
"fm_newButton": "Ny",
"fm_newButtonTitle": "Lag en ny pad eller mappe, importer fila til denne mappa",
"fm_newButtonTitle": "Opprett nytt dokument eller mappe, importer filen til denne mappa",
"fm_newFolder": "Ny mappe",
"fm_newFile": "Ny pad",
"fm_newFile": "Nytt dokument",
"fm_folder": "Mappe",
"fm_sharedFolder": "Delt mappe",
"fm_folderName": "Mappenavn",
"fm_numberOfFolders": "# mapper",
"fm_numberOfFiles": "# filer",
"fm_fileName": "Filnavn",
"fm_lastAccess": "Siste tilgang",
"fm_lastAccess": "Sist brukt",
"fm_creation": "Opprettet",
"fm_forbidden": "Ulovlig handling",
"fm_originalPath": "Original filsti",
"fm_openParent": "Vis i mappe",
"fm_noname": "Dokument uten navn",
"fm_emptyTrashDialog": "Er du sikker på at du vil tømme papirkurven?",
"fm_removeSeveralPermanentlyDialog": "Er du helt sikker på at du vil slette {0} ting fra CryptDriven din?",
"fm_removePermanentlyDialog": "Er du helt sikker på at du vil slette den tingen fra CryptDriven din?",
"fm_deleteOwnedPad": "Er du helt sikker på at du vil slette denne paden fra serveren?",
"fm_deleteOwnedPads": "Er du helt sikker på at du vil fjerne disse padene fra serveren?",
"fm_restoreDialog": "Er du sikker på at du vil legge {0} tilbake?",
"fm_unknownFolderError": "Mappa du har valgt eksisterer desverre ikke lenger. Vi åpner mappa over…",
"fm_contextMenuError": "Beklager, vi får ikke til å åpne kontekstmenyen for den tingen. Om feilen vedvarer vennligst last inn nettsida på nytt.",
"fm_selectError": "Beklager vi får ikke til å velge elementet du ønsker. Om problemet vedvarer vennligst forsøk å laste inn sida på nytt.",
"fm_categoryError": "Beklager vi får ikke til å åpne kategorien du har valgt, vi viser rotmappa nå.",
"fm_info_root": "Her kan du lage så mange undermapper du ønsker.",
"settings_backup2Confirm": "Straks i gang med å laste ned alle filer og pads fra CryptDriven din. Velg et filnavn og trykk OK",
"settings_exportTitle": "Eksporter CryptDriven din",
"settings_exportDescription": "Vennligst vent mens vi laster ned og dekrypterer dokumentene dine. Lukker du fanen vil du avbryte nedlastingen.",
"settings_exportFailed": "Hvis paden trenger mer enn 1 minutt på nedlastingen så vil den desverre ikke inkluderes i eksporteringen. I stedet vil en linke til paden vises.",
"settings_exportWarning": "NB: denne funksjonen er beta og muligens ustabil. Vi anbefaler at du holder denne fanen i fokus.",
"settings_exportCancel": "Er du sikker på at du vil avbryte eksporteringen? I så fall må du starte på nytt neste gang.",
"fm_emptyTrashDialog": "Tøm papirkurven?",
"fm_removeSeveralPermanentlyDialog": "",
"fm_removePermanentlyDialog": "",
"fm_deleteOwnedPad": "Vil slette dette dokumentet fra tjeneren for godt?",
"fm_deleteOwnedPads": "Vil du slette disse dokumentene fra tjeneren for godt?",
"fm_restoreDialog": "",
"fm_unknownFolderError": "Valgt eller sist besøkte finnes ikke lenger. Åpner ovennevnt mappe …",
"fm_contextMenuError": "Kan ikke åpne bindeleddsmenyen dette elementet. Last inn siden på ny hvis problemet vedvarer.",
"fm_selectError": "",
"fm_categoryError": "Kunne ikke åpne valgt kategori. Viser rotmappen nå.",
"fm_info_root": "Her kan du lage så mange undermapper du ønsker for å sortere filene dine.",
"settings_backup2Confirm": "Straks i gang med å laste ned alle filer og dokumenter fra din CryptDrive. Velg et filnavn og trykk «OK».",
"settings_exportTitle": "Eksporter din CryptDrive",
"settings_exportDescription": "Vent mens dokumentene dine lastes ned og dekrypteres. Lukker du fanen vil du avbryte nedlastingen.",
"settings_exportFailed": "",
"settings_exportWarning": "Merk: denne funksjonen er beta og muligens ustabil. Det anbefales at du beholder denne fanen i fokus.",
"settings_exportCancel": "Avbryt eksporteringen? I så fall må du starte på nytt neste gang.",
"uploadFolderButton": "Last opp mappe",
"chatButton": "Chat",
"chatButton": "Sludring",
"formattedKB": "{0} KB",
"formattedGB": "{0} GB",
"formattedMB": "{0} MB",
"storageStatus": "Lagringsplass:<br /><b>{0}</b> brukt, av <b>{1}</b>",
"padNotPinnedVariable": "Denne pad-en utløper etter {4] dager med inaktivitet, {0}logg inn{1} eller {2}registrer deg{3} for å bevare regnearket.",
"padNotPinnedVariable": "Denne dokumentet utløper etter {4] dager med inaktivitet, {0}logg inn{1} eller {2}registrer deg{3} for å bevare det.",
"history_restoreTitle": "Gjenopprett den valgte dokumentversjonen",
"history_closeTitle": "Lukk historikk",
"history_closeTitle": "Lukk historikken",
"history_loadMore": "Vis mer historikk",
"history_prev": "Forrige versjon",
"history_next": "Neste versjon",
"historyButton": "Vis dokumenthistorikken",
"historyButton": "Vis dokumenthistorikk",
"historyText": "Historikk",
"help_button": "Hjelp",
"show_help_button": "Vis Hjelp",
"cancelButton": "Avslutt (esc)",
"show_help_button": "Vis hjelp",
"cancelButton": "Avslutt (Esc)",
"cancel": "Avslutt",
"okButton": "Ok (enter)",
"ok": "Ok",
"notifyLeft": "{0} har forlatt gruppeøkta",
"okButton": "Ok (Enter)",
"ok": "OK",
"notifyLeft": "{0} har forlatt gruppeøkten",
"notifyRenamed": "{0} er nå bedre kjent som {1}",
"notifyJoined": "{0} har blitt med i gruppeøkta",
"notifyJoined": "{0} har tatt del i gruppeøkten",
"fileEmbedTag": "Deretter plasserer du Media-taggen der du vil inkludere den:",
"fileEmbedScript": "For å inkludere denne fila, inkluder dette skriptet på nettsida di:",
"viewEmbedTag": "For å ta med denne pad-en, inkluder denne ifram på en nettside hvor du vil. Legg til stiler med CSS eller HTML."
"fileEmbedScript": "Inkluder dette skriptet på nettsiden din for å bygge inn denne filen:",
"viewEmbedTag": "Inkluder dette iframe-elementet for å bygge inn dette dokumentet på en nettside. Legg til stiler med CSS eller HTML.",
"sharedFolders_create_owned": "Eid mappe",
"sharedFolders_create_name": "Mappenavn",
"sharedFolders_create": "Opprett en delt mappe",
"share_mediatagCopy": "Kopier media-etikett til utklippstavle",
"share_embedCategory": "Innebygg",
"share_contactCategory": "Kontakter",
"share_linkCopy": "Kopier",
"share_linkOpen": "Forhåndsvis",
"share_linkView": "Vis",
"share_linkEdit": "Rediger",
"share_linkAccess": "Tilgangsrettigheter",
"share_linkCategory": "Lenke",
"properties_changePasswordButton": "Send inn",
"properties_changePassword": "Endre passordet",
"properties_addPassword": "Legg til et passord",
"password_submit": "Send inn",
"password_placeholder": "Skriv inn passordet her …",
"creation_passwordValue": "Passord",
"creation_expiration": "Utløpsdato",
"creation_noOwner": "Ingen eier",
"creation_owners": "Eiere",
"creation_create": "Opprett",
"creation_newTemplate": "Ny mal",
"creation_noTemplate": "Ingen mal",
"creation_password": "Passord\n",
"creation_expireMonths": "Måned(er)",
"creation_expireDays": "Dag(er)",
"creation_expireHours": "Time(r)",
"creation_expireFalse": "Ubegrenset",
"view": "vis",
"edit": "rediger",
"driveReadmeTitle": "Hva er CryptPad?",
"header_homeTitle": "Gå til CryptPad-hjemmesiden",
"header_logoTitle": "Gå til din CryptDrive",
"tos_title": "CryptPad-tjenestevilkår",
"features_f_subscribe": "Abonner",
"features_f_support": "Raskere brukerstøtte",
"features_f_file1": "Last opp og del filer",
"features_f_storage0": "Begrenset lagringstid",
"features_f_cryptdrive0": "Begrenset tilgang til CryptDrive",
"features_f_file0": "Åpne dokumenter",
"features_f_core": "Vanlige funksjoner",
"features_f_apps": "Tilgang til alle programmene",
"features_premium": "Premium",
"features_registered": "Registrert",
"features_anon": "Ikke-registrert",
"features_title": "Funksjoner",
"features": "Funksjoner",
"whatis_drive": "Organisering med CryptDrive",
"whatis_collaboration": "Privat samarbeid",
"whatis_title": "Hva er CryptPad?",
"topbar_whatIsCryptpad": "Hva er CryptPad",
"blog": "Blogg",
"terms": "Tjenestevilkår",
"contact": "Kontakt",
"privacy": "Personvernspraksis",
"about": "Om",
"footer_aboutUs": "Om oss",
"mdToolbar_quote": "Sitat",
"mdToolbar_link": "Lenke",
"mdToolbar_strikethrough": "Gjennomstrek",
"mdToolbar_italic": "Kursiv",
"mdToolbar_bold": "Fet",
"upload_size": "Størrelse",
"upload_cancelled": "Avbrutt",
"settings_cursorShareLabel": "Del posisjonen",
"settings_cursorShareTitle": "Del min pekerposisjon",
"settings_cursorColorTitle": "Pekerfarge",
"settings_changePasswordNewConfirm": "Bekreft nytt passord",
"settings_changePasswordNew": "Nytt passord",
"settings_changePasswordCurrent": "Nåværende passord",
"settings_changePasswordButton": "Endre passord",
"settings_changePasswordTitle": "Endre passord",
"settings_ownDriveTitle": "Oppdater konto",
"settings_ownDriveButton": "Oppgrader kontoen din",
"settings_padSpellcheckTitle": "Stavekontroll",
"settings_driveDuplicateLabel": "Skjul duplikater",
"settings_logoutEverywhereButton": "Logg ut",
"settings_publicSigningKey": "Offentlig signeringsnøkkel",
"settings_deleteButton": "Slett kontoen",
"settings_userFeedbackTitle": "Tilbakemelding",
"settings_autostoreYes": "Automatisk",
"settings_importDone": "Importert",
"settings_import": "Importer",
"settings_resetThumbnailsAction": "Tøm",
"settings_resetTips": "Tips",
"settings_resetTipsAction": "Tilbakestill",
"settings_resetButton": "Fjern",
"settings_export_download": "Laster ned og dekrypterer dokumentene dine …",
"register_passwordsDontMatch": "Passordene samsvarer ikke.",
"register_acceptTerms": "Jeg godtar <a>tjenestevilkårene</a>",
"login_unhandledError": "En uventet feil inntraff :(",
"login_invalPass": "Passord kreves",
"login_invalUser": "Brukernavn kreves",
"login_confirm": "Bekreft passordet ditt",
"login_password": "Passord",
"login_username": "Brukernavn",
"settingsButton": "Innstillinger",
"logoutButton": "Logg ut",
"login_register": "Registrer deg",
"login_login": "Logg inn",
"fc_hashtag": "Etiketter",
"fc_prop": "Egenskaper",
"fc_empty": "Tøm papirkurven",
"fc_remove_sharedfolder": "Fjern",
"fc_remove": "Fjern",
"fc_restore": "Gjenopprett",
"fc_delete_owned": "Ødelegg",
"fc_delete": "Flytt til papirkurv",
"fc_collapseAll": "Fold sammen alle",
"fc_expandAll": "Utvid alle",
"fc_openInCode": "Åpne i koderedigerer",
"fc_open_ro": "Åpne (skrivebeskyttet)",
"fc_open": "Åpne",
"fc_color": "Endre farge",
"fc_rename": "Gi nytt navn",
"fc_newsharedfolder": "Ny delt mappe",
"fc_newfolder": "Ny mappe",
"fm_tags_name": "Etikettnavn",
"fm_prop_tagsList": "Etiketter",
"fm_viewGridButton": "Rutenettsvisning",
"fm_viewListButton": "Listevisning",
"fm_type": "Type",
"fm_morePads": "Mer",
"contacts_padTitle": "Sludring",
"contacts_send": "Send",
"profile_avatar": "Avatar",
"canvas_delete": "Slett utvalg",
"canvas_clear": "Tøm",
"poll_comment_placeholder": "Din kommentar",
"poll_comment_remove": "Slett denne kommentaren",
"poll_comment_submit": "Send",
"poll_comment_add": "Legg til en kommentar",
"poll_comment_list": "Kommentarer",
"poll_total": "Totalt",
"poll_unlocked": "Opplåst",
"poll_locked": "Låst",
"poll_edit": "Rediger",
"poll_remove": "Fjern",
"poll_removeUser": "Fjern denne brukeren?",
"poll_removeOption": "Fjern dette valget?",
"poll_userPlaceholder": "Ditt navn",
"poll_optionPlaceholder": "Valg",
"poll_commit": "Send inn",
"poll_create_option": "Legg til et nytt valg",
"poll_create_user": "Legg til en ny bruker",
"poll_publish_button": "Offentliggjør",
"kanban_working": "Underveis",
"kanban_done": "Ferdig",
"kanban_todo": "Gjøremål",
"kanban_item": "Element {0}",
"pad_mediatagOptions": "Bildeegenskaper",
"pad_mediatagImport": "Lagre i din CryptDrive",
"pad_mediatagBorder": "Kantbredde (piksler)",
"pad_mediatagPreview": "Forhåndsvis",
"pad_mediatagRatio": "Behold sideforhold",
"pad_mediatagWidth": "Bredde (piksler)",
"pad_mediatagHeight": "Høyde (piksler)",
"openLinkInNewTab": "Åpne lenke i ny fane",
"history_restoreDone": "Dokument gjenopprettet",
"history_restorePrompt": "Erstatt nåværende versjon av dokumentet med vist versjon?",
"broadcast_newCustom": "Melding fra administratorene",
"settings_deleteContinue": "Slett konto",
"broadcast_translations": "Oversettelser",
"admin_broadcastCancel": "Slett melding",
"admin_surveyCancel": "Fjern",
"settings_colortheme_custom": "Egendefinert",
"pad_settings_show": "Vis",
"pad_settings_hide": "Skjul",
"pad_settings_width_large": "Full bredde",
"pad_settings_title": "Dokumentinnstillinger",
"admin_getquotaButton": "Sjekk",
"settings_colorthemeTitle": "Fargedrakt",
"settings_colortheme_light": "Lys",
"settings_colortheme_dark": "Mørk",
"settings_cat_style": "Utseende",
"admin_performanceTimeHeading": "Tid (sekunder)",
"admin_performanceKeyHeading": "Kommando",
"admin_performanceProfilingTitle": "Ytelse",
"admin_cat_performance": "Ytelse",
"redo": "Gjenta",
"undo": "Angre",
"settings_cacheTitle": "Hurtiglager",
"docs_link": "Dokumentasjon",
"home_support_title": "Støtt CryptPad",
"home_opensource_title": "Åpne kilde",
"admin_support_first": "Opprettet: ",
"admin_support_last": "Oppdatert: ",
"admin_support_collapse": "Fold sammen",
"admin_support_open": "Vis",
"settings_mediatagSizeTitle": "Automatisk nedlastingsgrense",
"mediatag_notReady": "Fullfør nedlastingen",
"pad_mediatagOpen": "Åpne fil",
"pad_mediatagShare": "Del fil",
"mediatag_saveButton": "Lagre",
"Offline": "Frakoblet",
"download_zip_file": "Fil {0}/{1}",
"fileTableHeader": "Nedlastinger og opplastinger",
"allowNotifications": "Tillat merknader",
"archivedFromServer": "Dokument arkivert",
"restoredFromServer": "Dokument gjenopprettet",
"admin_archiveInval": "Ugyldig dokument",
"admin_archiveInput2": "Dokumentpassord",
"admin_unarchiveButton": "Gjenopprett",
"admin_archiveInput": "Dokument-nettadresse",
"tag_edit": "Rediger",
"tag_add": "Legg til",
"fm_deletedFolder": "Slettet mappe",
"admin_invalLimit": "Ugyldig grenseverdi",
"admin_invalKey": "Ugyldig offentlig nøkkel",
"admin_limitPlan": "Abonnement: {0}",
"admin_getlimitsTitle": "Egendefinerte grenser",
"admin_limit": "Nåværende grense: {0}",
"admin_setlimitButton": "Sett grense",
"admin_registrationAllow": "Åpne",
"admin_registrationButton": "Lukk",
"oo_version": "Versjon: ",
"snapshots_delete": "Slett",
"snapshots_close": "Lukk",
"snapshots_restore": "Gjenopprett",
"snapshots_open": "Åpne",
"history_shareTitle": "Del en lenke til denne versjonen",
"history_close": "Lukk",
"history_restore": "Gjenopprett",
"share_bar": "Opprett lenke",
"settings_cat_kanban": "Kanban",
"settings_kanbanTagsOr": "ELLER",
"settings_kanbanTagsAnd": "OG",
"fm_noResult": "Resultatløst",
"fm_restricted": "Du har ikke tilgang",
"support_formCategoryError": "Feil: Kategorien er tom",
"support_category": "Velg en kategori",
"oo_refresh": "Gjenoppfrisk",
"support_cat_account": "Brukerkonto",
"user_about": "Om CryptPad",
"slide_textCol": "Tekstfarge",
"slide_backCol": "Bakgrunnsfarge",
"toolbar_file": "Fil",
"drive_treeButton": "Filer",
"toolbar_tools": "Verktøy",
"toolbar_savetodrive": "Lagre som bilde",
"toolbar_insert": "Sett inn",
"toolbar_theme": "Drakt",
"fm_sort": "Sorter",
"settings_padNotifTitle": "Kommentarmerknader",
"comments_comment": "Kommentar",
"comments_resolve": "Løs",
"comments_reply": "Svar",
"canvas_select": "Velg",
"canvas_brush": "Pensel",
"admin_openFilesTitle": "Åpne filer",
"kanban_editCard": "Rediger dette kortet",
"kanban_clearFilter": "Tøm filter",
"kanban_conflicts": "Redigerer nå:",
"kanban_noTags": "Ingen etiketter",
"kanban_tags": "Filtrer etter etikett",
"kanban_delete": "Slett",
"kanban_color": "Farge",
"kanban_body": "Innhold",
"kanban_title": "Tittel",
"team_invitePasswordLoading": "Dekrypterer invitasjon …",
"team_inviteFrom": "Fra:",
"team_inviteLinkCopy": "Kopier lenke",
"team_inviteLinkCreate": "Opprett lenke",
"team_inviteLinkLoading": "Genererer lenke …",
"team_inviteLinkNote": "Legg til en personlig melding",
"contacts_mutedUsers": "Forstummede kontoer",
"contacts_manageMuted": "Håndter forstummelse",
"contacts_unmute": "Opphev forstummelse",
"contacts_mute": "Forstum",
"share_copyProfileLink": "Kopier profillenke",
"passwordFaqLink": "Les mer om passord",
"pad_wordCount": "Ord: {0}",
"teams_table_role": "Rolle",
"teams_table_owners": "Håndter lag",
"teams_table_generic": "Roller og tilganger",
"teams_table": "Roller",
"drive_sfPasswordError": "Feil passord",
"team_viewers": "Seere",
"team_quota": "Ditt lags lagringsgrense",
"team_title": "Lag: {0}",
"team_pendingOwner": "(venter)",
"team_deleteButton": "Slett",
"team_deleteTitle": "Sletting av lag",
"team_pending": "Invitert",
"sent": "Melding sendt",
"team_listTitle": "Dine lag",
"team_nameTitle": "Lagnavn",
"team_members": "Medlemmer",
"team_admins": "Administratorer",
"team_owner": "Eiere",
"team_createName": "Lag navn",
"team_createLabel": "Opprett et nytt lag",
"team_infoLabel": "Om lag",
"team_cat_admin": "Administrasjon",
"team_cat_chat": "Sludring",
"team_cat_members": "Medlemmer",
"team_cat_back": "Tilbake til lag",
"team_cat_create": "Ny",
"team_cat_list": "Lag",
"team_cat_general": "Om",
"owner_unknownUser": "ukjent",
"owner_removePendingText": "Venter",
"owner_removeText": "Eiere",
"features_emailRequired": "E-postadresse kreves",
"requestEdit_sent": "Forespørsel sendt",
"requestEdit_button": "Forespør redigeringsrettigheter",
"notifications_cat_archived": "Historikk",
"notifications_cat_pads": "Delt med meg",
"notifications_cat_friends": "Kontaktforespørsler",
"support_formButton": "Send",
"support_cat_new": "",
"admin_supportAddError": "Ugyldig privat nøkkel",
"admin_supportAddKey": "Legg til privat nøkkel",
"admin_cat_support": "Støtte",
"supportPage": "Støtte",
"notifications_dismiss": "Avslå",
"share_withFriends": "Del",
"share_linkFriends": "Del med kontakter",
"drive_active28Days": "Siste 4 uker",
"drive_active7Days": "Siste 7 dager",
"drive_active1Day": "Siste 24 timer",
"settings_codeSpellcheckTitle": "Stavekontroll",
"admin_diskUsageButton": "Generer rapport",
"contact_chat": "Sludring",
"survey": "CryptPad-undersøkelse",
"crowdfunding_button2": "Hjelp CryptPad",
"support_addAttachment": "Legg til vedlegg",
"support_attachments": "Vedlegg",
"support_cat_all": "Alle",
"support_cat_bug": "Feilrapport"
}

@ -106,7 +106,7 @@
"userListButton": "Gebruikerslijst",
"shareSuccess": "De link is gekopieerd naar het klembord",
"shareButton": "Delen",
"movedToTrash": "De werkomgeving is verplaatst naar de prullenbak.<br><a href=\"/drive/\">Ga naar uw Drive</a>",
"movedToTrash": "De werkomgeving is verplaatst naar de prullenbak.<br><a>Ga naar uw Drive</a>",
"forgetPrompt": "Weet u zeker dat u deze werkomgeving wilt verplaatsen naar de prullenbak?",
"forgetButton": "Verwijderen",
"saveTitle": "Titel opslaan (enter)",
@ -123,7 +123,7 @@
"pinLimitDrive": "U heeft uw opslaglimiet bereikt.<br>U kunt geen nieuwe werkomgevingen aanmaken.",
"pinLimitNotPinned": "U heeft uw opslaglimiet bereikt.<br>Deze werkomgeving wordt niet opgeslagen op uw CryptDrive.",
"pinLimitReachedAlertNoAccounts": "U heeft uw opslaglimiet bereikt",
"pinLimitReachedAlert": "U heeft uw opslaglimiet bereikt. Nieuwe werkomgevingen worden niet opgeslagen in uw CryptDrive.<br>U kunt werkomgevingen verwijderen van uw CryptDrive of <a href=\"https://accounts.cryptpad.fr/#!on={0}\" target=\"_blank\">opwaarderen naar een premium-account</a> om uw opslaglimiet te verhogen.",
"pinLimitReachedAlert": "U heeft uw opslaglimiet bereikt. Nieuwe werkomgevingen worden niet opgeslagen in uw CryptDrive.<br>U kunt werkomgevingen verwijderen van uw CryptDrive of <a>opwaarderen naar een premium-account</a> om uw opslaglimiet te verhogen.",
"pinLimitReached": "U heeft uw opslaglimiet bereikt",
"formattedKB": "{0} KB",
"formattedGB": "{0} GB",
@ -134,7 +134,6 @@
"storageStatus": "Opslag:<br /><b>{0}</b> verbruikt van <b>{1}</b>",
"upgradeAccount": "Account opwaarderen",
"upgrade": "Opwaarderen",
"newVersion": "<b>CryptPad is bijgewerkt!</b><br>Bekijk wat er veranderd is in de nieuwste versie:<br><a href=\"https://github.com/xwiki-labs/cryptpad/releases/tag/{0}\" target=\"_blank\">CryptPad-wijzigingslog {0}</a>",
"language": "Taal",
"userlist_offline": "U bent momenteel offline. De gebruikerslijst is niet beschikbaar.",
"editor": "bewerker",
@ -253,7 +252,6 @@
"contacts_online": "Een andere gebruiker in deze kamer is online",
"fm_rootName": "Documenten",
"fm_trashName": "Prullenbak",
"fm_unsortedName": "Niet-gesorteerde bestanden",
"fm_filesDataName": "Alle bestanden",
"fm_templateName": "Sjablonen",
"fm_searchName": "Zoeken",
@ -382,7 +380,7 @@
"register_emailWarning1": "U kunt dat doen als u ervoor kiest, maar het zal niet naar onze server worden verzonden.",
"register_emailWarning0": "Het lijkt erop dat u uw emailadres als gebruikersnaam heeft ingevoerd.",
"register_alreadyRegistered": "Deze gebruiker bestaat al. Wilt u inloggen?",
"register_warning": "<i class='fa fa-warning'></i> Waarschuwing",
"register_warning": "Waarschuwing",
"register_cancel": "Annuleren",
"register_writtenPassword": "Ik heb mijn gebruikersnaam en wachtwoord opgeschreven, ga door",
"register_header": "Registreren",
@ -390,7 +388,7 @@
"register_mustAcceptTerms": "U moet akkoord gaan met de gebruikersvoorwaarden.",
"register_passwordTooShort": "Wachtwoorden moeten ten minste {0} tekenen lang zijn.",
"register_passwordsDontMatch": "Wachtwoorden komen niet overeen!",
"register_acceptTerms": "Ik ga akkoord met de <a href='/terms.html' tabindex='-1'>gebruikersvoorwaarden</a>",
"register_acceptTerms": "Ik ga akkoord met de <a>gebruikersvoorwaarden</a>",
"register_importRecent": "Importeer documenten van uw ongeregistreerde sessie",
"login_unhandledError": "Een onverwachte fout trad op :(",
"login_invalPass": "Wachtwoord vereist",
@ -414,7 +412,6 @@
"fm_renamedPad": "U hebt deze werkomgeving een naam gegeven. De gedeelde titel is:<br><b>{0}</b>",
"fm_viewGridButton": "Roosterweergave",
"fm_viewListButton": "Lijstweergave",
"fm_alert_anonymous": "Goedendag, momenteel gebruikt u CryptPad anoniem. Dat is geen probleem, maar uw werkomgevingen kunnen verwijderd worden na een inactieve periode. Wij hebben gevorderde functies uitgeschakeld voor anonieme gebruikers, om te benadrukken dat het een onveilige manier is om bestanden op te slaan. U kunt <a href=\"https://blog.cryptpad.fr/2017/05/17/You-gotta-log-in/\" target=\"_blank\">meer lezen</a> over waarom wij dit doen en waarom u echt beter kunt <a href=\"/register/\">registreren</a> of <a href=\"/login/\">inloggen</a>.",
"fm_info_owned": "U bent de eigenaar van de werkomgevingen die hier zijn weergegeven. Dit betekent dat u ze voorgoed van de server kunt verwijderen. Als u dat doet, zijn ze niet meer toegankelijk voor andere gebruikers.",
"fm_info_sharedFolder": "Dit is een gedeelde map. U bent niet ingelogd, dus u kunt de inhoud alleen lezen. U kunt zich <br><a href=\"/register/\">registreren</a> of <a href=\"/login/\">inloggen</a> om het in uw CryptDrive te importeren en het te wijzigen.",
"fm_info_anonymous": "U bent niet ingelogd, dus uw documenten zullen verlopen na {0} dagen. Ze kunnen ook verdwijnen als uw browsergeschiedenis gewist wordt. <br><a href=\"/register/\">Registreren</a> (geen persoonlijke gegevens vereist) of <a href=\"/login/\">Inloggen</a> om ze voor altijd in uw drive op te slaan. <a href=\"https://docs.cryptpad.fr/en/user_guide/user_account.html#account-types\" target=\"_blank\">Lees meer over geregistreerde accounts</a>.",

@ -46,21 +46,6 @@
"button_newcode": "STWÓRZ PAD DO KODU",
"button_newpoll": "STWÓRZ GŁOSOWANIE",
"button_newslide": "STWÓRZ PREZENTACJĘ",
"policy_title": "Polityka prywatności CryptPad",
"policy_whatweknow": "Co o tobie wiemy",
"policy_whatweknow_p1": "Jako aplikacja udostępniana w internecie, CryptPad ma dostęp do metadanych wystawianych przez protokół HTTP. W skład tych danych wchodzi adres IP oraz różne inne nagłówki HTTP które pozwalają na identyfikację twojej przeglądarki. Możesz podejrzeć jakie informacje udostępnia twoja przeglądarka odwiedzając <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending\" title=\"what http headers is my browser sending\">WhatIsMyBrowser.com</a>.",
"policy_howweuse": "Jak wykorzystujemy zebraną wiedzę",
"policy_howweuse_p1": "Dzieki tym informacjom możemy podejmować lepsze decyzje przy promocji CryptPad, poprzez ocenę które z podjętych przez nas prób okazały się udane. Informacja o twojej lokalizacji daje nam znać, czy powinniśmy zapewnić lepsze wsparcie dla języków poza Angielskim.",
"policy_howweuse_p2": "Informacje o twojej przeglądarce (czy jest to aplikacja desktopowa, czy działająca na systemie mobilnym) pozwalają nam na decydowanie przy priorytezowaniu ulepszeń funkcji. Nasz zespół deweloperski jest mały, a my staramy się dokonywać wyborów które poprawią doświadczenia jak największej liczby użytkowników.",
"policy_whatwetell": "Jakie dane przekazujemy innym",
"policy_whatwetell_p1": "Nie dostarczamy osobom trzecim żadnych danych które udało się nam zebrać, lub tych które nam przekazałeś sam, dopóki nie jesteśmy do tego zobligowani prawnie.",
"policy_links": "Adresy innych stron",
"policy_links_p1": "Ta witryna zawiera łącza do innych stron, włączając w to te stworzone przez inne organizacje. Nie jesteśmy odpowiedzialni za praktyki dotyczące prywatności oraz zawartość usługodawców poza tą witryną. Jako główną zasadę przyjmujemy, że łącza do stron zewnętrznych uruchamiane są w nowej karcie lub oknie, aby upewnić cię iż opuszczasz Cryptpad.",
"policy_ads": "Promocja i reklama",
"policy_ads_p1": "Nie wyświetlamy żadnej zawartości promocyjnej online, choć możemy udostępniać łącza do podmiotów finansujących nasze badania.",
"policy_choices": "Co możesz zrobić",
"policy_choices_open": "Nasz kod jest open source, więc zawsze masz możliwość hostowania swojej własnej wersji Cryptpad.",
"policy_choices_vpn": "Jeżeli chcesz korzystać z wersji udostępnianej przez nas, lecz nie chcesz pokazywać swojego adresu IP, możesz chronić swój adres wykorzystując <a href=\"https://www.torproject.org/projects/torbrowser.html.en\" title=\"downloads from the Tor project\" target=\"_blank\" rel=\"noopener noreferrer\">przeglądarki Tor</a>, lub <a href=\"https://riseup.net/en/vpn\" title=\"VPNs provided by Riseup\" target=\"_blank\" rel=\"noopener noreferrer\">VPN</a>.",
"tos_title": "Warunki korzystania z usług Cryptpad",
"tos_legal": "Prosimy abyś nie był złośliwy, obelżywy i nie wykorzystywał tego oprogramowania do celow niezgodnych z prawem.",
"tos_availability": "Mamy nadzieję iż uznasz tę usługę za przydatną, lecz dostępność i wydajność nie mogą być przez nas gwarantowane. Prosimy, abyś eksportował swoje dane regularnie.",

@ -37,7 +37,6 @@
"viewers": "leitores",
"editor": "editor",
"language": "Lingua",
"newVersion": "<b>O CryptPad foi atualizado!</b><br>Cheque as novidades na última versão:<br><a href=\"https://github.com/xwiki-labs/cryptpad/releases/tag/{0}\" target=\"_blank\">Notas da atualização do CryptPad {0}</a>",
"upgrade": "Upgrade",
"MB": "MB",
"GB": "GB",
@ -46,7 +45,7 @@
"formattedGB": "{0} GB",
"formattedKB": "{0} KB",
"pinLimitReached": "Você alcançou o limite de armazenamento",
"pinLimitReachedAlert": "Você alcançou o limite de armazenamento. Novos blocos não serão mais salvos no seu CryptDrive.<br>Você pode deletar blocos do seu CryptDrive ou <a href=\"https://accounts.cryptpad.fr/#!on={0}\" target=\"_blank\">se inscrever como premium</a> para aumentar o limite de espaço.",
"pinLimitReachedAlert": "Você alcançou o limite de armazenamento. Novos blocos não serão mais salvos no seu CryptDrive.<br>Você pode deletar blocos do seu CryptDrive ou <a>se inscrever como premium</a> para aumentar o limite de espaço.",
"pinLimitNotPinned": "Você alcançou o limite de armazenamento.<br>Este bloco não está armazenado no seu CryptDrive.",
"pinLimitDrive": "Você alcançou o limite de armazenamento.<br>Você não pode criar novos blocos.",
"importButtonTitle": "Importar um documento de um arquivo local",
@ -58,7 +57,7 @@
"user_accountName": "Nome da Conta",
"clickToEdit": "Clique para Editar",
"forgetPrompt": "Clicando OK você irá remover o endereço deste bloco de notas do armazenamento local, você tem certeza?",
"movedToTrash": "That pad has been moved to the trash.<br><a href=\"/drive/\">Access my Drive</a>",
"movedToTrash": "That pad has been moved to the trash.<br><a>Access my Drive</a>",
"shareButton": "Compartilhar",
"shareSuccess": "Endereço copiado para o clipboard",
"newButton": "Novo",
@ -109,7 +108,6 @@
"canvas_opacity": "Opacidade",
"fm_rootName": "Documentos",
"fm_trashName": "Lixeira",
"fm_unsortedName": "Arquivos não organizados",
"fm_filesDataName": "Todos os Arquivos",
"fm_templateName": "Temas",
"fm_searchName": "Busca",
@ -141,7 +139,6 @@
"fm_info_root": "Crie quantos diretórios aninhados aqui desejar para organizar seus arquivos..",
"fm_info_trash": "Empty your trash to free space in your CryptDrive.",
"fm_info_anonymous": "Você não está logado, então estes documentos vão expirar em {0} dias. Limpar o histórico do seu navegador pode fazê-los desaparecer. <br><a href=\"/register/\">Registre-se</a> (nenhuma informação pessoal será requerida) ou <a href=\"/login/\">Faça login</a> para guarda-lo no seu disco. <a href=\"https://docs.cryptpad.fr/en/user_guide/user_account.html#account-types\" target=\"_blank\">Leia mais sobre contas registradas</a>.",
"fm_alert_anonymous": "Ola! Você está utilizando o CryptPad anonimamente, isto é ok, mas seus blocos podem ser apagados se ficarem muito tempo inativo. Nós desativamos as funções avançadas nas contas anônimas para que isto fique claro para você Este não é um bom lugar apra salvar senhas! Entenda: <a href=\"https://blog.cryptpad.fr/2017/05/17/You-gotta-log-in/\" target=\"_blank\">Clicando aqui!</a> Porque estamos fazendo isso e porque você deveria criar uma onta? <a href=\"/register/\">Sign up</a> and <a href=\"/login/\">Clique e entenda!</a>.",
"fm_error_cantPin": "Erro interno do servidor. Por favor recarregue a página e tente novamente.",
"fc_newfolder": "Nova pasta",
"fc_rename": "Renomear",
@ -169,13 +166,13 @@
"login_invalPass": "É necessário uma senha",
"login_unhandledError": "Um erro não esperado ocorreu :(",
"register_importRecent": "Importar documentos da sua sessão não registrada",
"register_acceptTerms": "Eu aceito <a href='/terms.html'>os termos de serviço</a>",
"register_acceptTerms": "Eu aceito <a>os termos de serviço</a>",
"register_passwordsDontMatch": "Senhas não coincidem!",
"register_mustAcceptTerms": "Você precisa aceitar os termos de serviço.",
"register_header": "Registre-se",
"register_writtenPassword": "I have written down my username and password, proceed",
"register_cancel": "Cancelar",
"register_warning": "<i class='fa fa-warning'></i> Atenção",
"register_warning": "Atenção",
"register_alreadyRegistered": "This user already exists, do you want to log in?",
"settings_title": "Settings",
"settings_save": "Save",
@ -215,21 +212,6 @@
"contact": "Contact",
"terms": "ToS",
"blog": "Blog",
"policy_title": "Política de privacidade do Cryptpad",
"policy_whatweknow": "O que nós sabemos sobre você",
"policy_whatweknow_p1": "Por ser uma aplicação hospedada na web, O Cryptpad tem acesso aos metadados expostos pelo protocolo HTTP. Isso inclui seu endereço IP, e vários cabeçalhos do HTTP que podem ser usados para identificar seu browser particular. Você pode ver que informações seu navegador está compartilhando ao visitar <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending\" title=\"Que cabeçalhos meu navegador está disponibilizando\">WhatIsMyBrowser.com</a>.",
"policy_howweuse": "Como utilizamos o que nós aprendemos",
"policy_howweuse_p1": "Nos utilizamos estas informações para tomar melhores decisões sobre como promover o Cryptpad, ao avaliar quais dos nosso esforços passados foram mais bem sucedidos. Informações sobre sua localização nos ajudam a decidir se nós devemos considerar prover melhor suporte para idiomas além do inglês.",
"policy_howweuse_p2": "As informações sobre o seu navegador de internet (não importando se é um desktop ou um equipamento móvel) nos ajudam a tomar melhores decisões ao priorizar melhorias futuras. Nossa equipe de desenvolvimento é pequena, e nós tentamos fazer as melhores escolhas em pró de auxiliar a experiência de utilização do máximo de nossos usuários possíveis.",
"policy_whatwetell": "O que contamos a terceiros sobre você",
"policy_whatwetell_p1": "Nós não informamos terceiros a informação que armazenamos ou que provemos a você, salvo caso sejamos legalmente requisitados a faze-lo.",
"policy_links": "Links para outros sites",
"policy_links_p1": "Este site contém ligações para outros sites, incluindo aqueles produzidos por terceiros. Nós não nos responsabilizamos pelas práticas de privacidade ou o conteúdo destes sites. Como regra geral, links para páginas fora de nosso domínio são lançadas em novas janelas ou abas, para deixar claro a todos os visitantes que eles estão deixando o site Cryptpad.fr.",
"policy_ads": "Publicidade",
"policy_ads_p1": "Nós não disponibilizamos publicidade online, porém podemos prover links de acesso para obtenção de financiamento para auxiliar em nossa pesquisa e desenvolvimento.",
"policy_choices": "As escolhas que você tem",
"policy_choices_open": "Nosso código fonte é open source, portanto você sempre tem a opção de hospedar sua própria instância do Cryptpad.",
"policy_choices_vpn": "Se você deseja usar nosso site principal, porém não deseja expor seu endereço IP, Você pode se proteger utilizando o <a href=\"https://www.torproject.org/projects/torbrowser.html.en\" title=\"Baixe o tor\" target=\"_blank\" rel=\"noopener noreferrer\">Navegador seguro Tor</a>, ou uma <a href=\"https://riseup.net/en/vpn\" title=\"VPNs providas pelo Riseup\" target=\"_blank\" rel=\"noopener noreferrer\">VPN</a>.",
"tos_title": "Termos de serviço doCryptpad",
"tos_legal": "Pedimos encarecidamente que, como usuário desta plataforma, você evite a prática de quaisquer atos ilegais e que evite a utilização maliciosa e/ou abusiva desta plataforma.",
"tos_availability": "Nós esperamos que você ache este serviço útil, porém nós não podemos garantir a disponibilidade constante ou a alta performance do mesmo. Por favor, mantenha um backup dos seus dados como forma de segurança adicional.",
@ -238,28 +220,11 @@
"tos_3rdparties": "Nós não disponibilizamos dados individuais para terceiros, salvo quando requisitado legalmente.",
"header_logoTitle": "Go to the main page",
"driveReadmeTitle": "What is CryptPad?",
"readme_welcome": "Welcome to CryptPad !",
"readme_p1": "Bem vindo ao CryptPad, onde você pode fazer anotações sozinho e com contatos.",
"readme_p2": "This pad will give you a quick walk through of how you can use CryptPad to take notes, keep them organized and work together on them.",
"readme_cat1": "Get to know your CryptDrive",
"readme_cat1_l1": "Make a pad: In your CryptDrive, click {0} then {1} and you can make a pad.",
"readme_cat1_l2": "Open Pads from your CryptDrive: double-click on a pad icon to open it.",
"readme_cat1_l3": "Organize your pads: When you are logged in, every pad you access will be shown as in the {0} section of your drive.",
"readme_cat1_l3_l1": "You can click and drag files into folders in the {0} section of your drive and make new folders.",
"readme_cat1_l3_l2": "Remember to try right clicking on icons because there are often additional menus.",
"readme_cat1_l4": "Put old pads in the trash: You can click and drag your pads into the {0} the same way you drag them into folders.",
"readme_cat2": "Make pads like a pro",
"edit": "edit",
"view": "view",
"readme_cat2_l1": "The {0} button in your pad allows you to give access to collaborators to either {1} or to {2} the pad.",
"readme_cat2_l2": "Change the title of the pad by clicking on the pencil",
"readme_cat3": "Discover CryptPad apps",
"readme_cat3_l1": "With CryptPad code editor, you can collaborate on code like Javascript and markdown like HTML and Markdown",
"readme_cat3_l2": "With CryptPad slide editor, you can make quick presentations using Markdown",
"readme_cat3_l3": "With CryptPoll you can take quick votes, especially for scheduling meetings which fit with everybody's calendar",
"feedback_about": "If you're reading this, you were probably curious why CryptPad is requesting web pages when you perform certain actions",
"feedback_privacy": "We care about your privacy, and at the same time we want CryptPad to be very easy to use. We use this file to figure out which UI features matter to our users, by requesting it along with a parameter specifying which action was taken.",
"feedback_optout": "If you would like to opt out, visit <a href='/settings/'>your user settings page</a>, where you'll find a checkbox to enable or disable user feedback",
"feedback_optout": "If you would like to opt out, visit <a>your user settings page</a>, where you'll find a checkbox to enable or disable user feedback.",
"button_newkanban": "Novo Kanban",
"button_newsheet": "Nova Planilha",
"padNotPinned": "Esse pad vai expirar depois de 3 meses de inatividade. {0}login{1} ou {2}registrar-se{3} para preservá-lo.",
@ -528,7 +493,7 @@
"markdown_toc": "Conteúdo",
"survey": "CryptPad enquete",
"crowdfunding_popup_no": "Não agora",
"crowdfunding_popup_text": "<h3>Nós precisamos de sua ajuda!</h3> Para garantir que o CryptPad seja ativamente desenvolvido, considere dar suporte ao projeto pela página <a href=\"https://opencollective.com/cryptpad\">OpenCollective</a>, onde você poderá ver nosso <b>Roteiro</b> e <b>Metas de financiamento</b>.",
"crowdfunding_popup_text": "<h3>Nós precisamos de sua ajuda!</h3> Para garantir que o CryptPad seja ativamente desenvolvido, considere dar suporte ao projeto pela página OpenCollective, onde você poderá ver nosso <b>Roteiro</b> e <b>Metas de financiamento</b>.",
"crowdfunding_button2": "Ajuda CryptPad",
"crowdfunding_button": "CryptPad suporte",
"autostore_notAvailable": "Você precisa armazenar este bloco no seu CryptDrive antes de poder usar este recurso.",
@ -537,7 +502,7 @@
"autostore_error": "Erro inesperado: nós não conseguimos armazenar este bloco, por favor, tente novamente.",
"autostore_hide": "Não armazene",
"autostore_store": "Armazenamento",
"autostore_settings": "Você pode habilitar o armazenamento automático de bloco na página de <a href=\"/settings/\">Configurações</a>!",
"autostore_settings": "Você pode habilitar o armazenamento automático de bloco na página de <a>Configurações</a>!",
"autostore_notstored": "Isto {0} não está no seu CryptDrive. Quer armazena-lo agora?",
"autostore_pad": "bloco",
"autostore_sf": "Pasta",
@ -812,7 +777,7 @@
"support_formContentError": "Erro: conteúdo está vazio",
"support_formTitleError": "Erro: Título está vazio",
"support_formButton": "Enviar",
"support_formHint": "Use este formulário para entrar em contato com os administradores com segurança sobre questões e dúvidas. <br> Observe que algumas dúvidas/questões já podem ter sido abordadas no <a href = \"https://docs.cryptpad.fr/en/user_guide/index. html \"rel =\" noopener noreferrer \"target =\" _ blank \"> Guia do usuário do CryptPad </a>. Por favor, não crie um novo tíquete se você já tem um tíquete aberto sobre o mesmo problema. Em vez disso, responda à sua mensagem original com informações adicionais.",
"support_formHint": "Use este formulário para entrar em contato com os administradores com segurança sobre questões e dúvidas. <br> Observe que algumas dúvidas/questões já podem ter sido abordadas no <a> Guia do usuário do CryptPad </a>. Por favor, não crie um novo tíquete se você já tem um tíquete aberto sobre o mesmo problema. Em vez disso, responda à sua mensagem original com informações adicionais.",
"support_formTitle": "Novo Tíquete",
"support_cat_new": "Novo tíquete",
"support_disabledHint": "Esta instância do CryptPad ainda não está configurada para usar um formulário de suporte.",
@ -943,7 +908,7 @@
"settings_safeLinksHint": "O CryptPad inclui as chaves para descriptografar seus blocos em seus links. Qualquer pessoa com acesso ao seu histórico de navegação pode potencialmente ler seus dados. Isso inclui extensões de navegador intrusivas e navegadores que sincronizam seu histórico entre dispositivos. Ativar \"links seguros\" evita que as chaves entrem no seu histórico de navegação ou sejam exibidas na barra de endereço, sempre que possível. É altamente recomendável ativar esse recurso e usar o menu {0} Compartilhar.",
"profile_login": "Você precisa fazer login para adicionar este usuário aos seus contatos",
"dontShowAgain": "Não mostra de novo",
"safeLinks_error": "Este link foi copiado da barra de endereço do navegador e não fornece acesso ao documento. Use o menu <i class = \"fa fa-shhare-alt\"> </i> <b> Compartilhar </b> para compartilhar diretamente com os contatos ou copie o link. <a href=\"https://docs.cryptpad.fr/en/user_guide/user_account.html#confidentiality\"> Leia mais sobre o recurso Links Seguros </a>.\n",
"safeLinks_error": "Este link foi copiado da barra de endereço do navegador e não fornece acesso ao documento. Use o menu <i></i> <b> Compartilhar </b> para compartilhar diretamente com os contatos ou copie o link. <a>Leia mais sobre o recurso Links Seguros </a>.",
"settings_safeLinksCheckbox": "Habilitar links seguros",
"settings_safeLinksTitle": "Links Seguros",
"settings_cat_security": "Confidencialidade",

@ -37,7 +37,7 @@
"user_accountName": "Nume cont",
"clickToEdit": "Click pentru editare",
"forgetPrompt": "Click-ul pe OK va muta acest pad la gunoi. Ești sigur?",
"movedToTrash": "Acest pad a fost mutat la gunoi.<br><a href=\"/drive/\">Acces la Drive-ul meu</a>",
"movedToTrash": "Acest pad a fost mutat la gunoi.<br><a>Acces la Drive-ul meu</a>",
"shareButton": "Distribuie",
"shareSuccess": "Link copiat în clipboard",
"newButton": "Nou",
@ -87,7 +87,6 @@
"canvas_opacity": "Opacitate",
"fm_rootName": "Documente",
"fm_trashName": "Gunoi",
"fm_unsortedName": "Fișiere nesortate",
"fm_filesDataName": "Toate fișierele",
"fm_templateName": "Șabloane",
"fm_searchName": "Caută",
@ -120,7 +119,6 @@
"fm_info_template": "Conține toate pad-urile stocate ca șabloane și pe care le poți refolosi atunci când creezi un nou pad.",
"fm_info_trash": "Fișierele șterse din gunoi vor fi șterse și din \"Toate fișierele\", făcând imposibilă recuperarea fișierelor din managerul de fișiere.",
"fm_info_anonymous": "Nu ești logat cu un cont valid așa că aceste pad-uri vor fi șterse (<a href=\"https://blog.cryptpad.fr/2017/05/17/You-gotta-log-in/\" target=\"_blank\">află de ce</a>). <a href=\"/register/\">Înscrie-te</a> sau <a href=\"/login/\">Loghează-te</a> pentru a le salva.",
"fm_alert_anonymous": "Salut, momentan folosești CryptPad în mod anonim. Este ok, doar că fișierele tale vor fi șterse după o perioadă de inactivitate. Am dezactivat caracteristicile avansate ale drive-ului pentru utilizatorii anonimi pentru a face clar faptul că stocare documentelor acolo nu este o metodă sigură. Poți să <a href=\"https://blog.cryptpad.fr/2017/05/17/You-gotta-log-in/\" target=\"_blank\">citești mai multe</a> despre motivarea noastră și despre ce de trebuie să te <a href=\"/register/\">Înregistrezi</a> si sa te <a href=\"/login/\">Loghezi</a>.",
"fc_newfolder": "Folder nou",
"fc_rename": "Redenumește",
"fc_open": "Deschide",
@ -147,7 +145,7 @@
"login_invalPass": "Parolă cerută",
"login_unhandledError": "O eroare neașteptată a avut loc emoticon_unhappy",
"register_importRecent": "Importă istoricul pad-ului (Recomandat)",
"register_acceptTerms": "Accept <a href='/terms.html'>termenii serviciului</a>",
"register_acceptTerms": "Accept <a>termenii serviciului</a>",
"register_passwordsDontMatch": "Parolele nu se potrivesc!",
"register_mustAcceptTerms": "Trebuie să accepți termenii serviciului",
"register_header": "Bine ai venit în CryptPad",
@ -187,21 +185,6 @@
"contact": "Contact",
"terms": "ToS",
"blog": "Blog",
"policy_title": "Politica de confidențialitate CryptPad",
"policy_whatweknow": "Ce știm despre tine",
"policy_whatweknow_p1": "Ca o aplicație care este găzduită online, CryptPad are acces la metadatele expuse de protocolul HTTP. Asta include adresa IP-ului tău, și alte titluri HTTP care pot fi folosite ca să identifice un browser. Poți să vezi ce informații împărtășește browser-ul tău vizitând <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending\" title=\"what http headers is my browser sending\">WhatIsMyBrowser.com</a>.",
"policy_howweuse": "Cum folosim ce aflăm",
"policy_howweuse_p1": "Folosim aceste informații pentru a lua decizii mai bune în promovarea CryptPad, prin evaluarea eforturilor trecute care au fost de succes. Informațiile despre locația ta ne ajută să aflăm dacă ar trebui să oferim suport pentru alte limbi, pe lângă engleză.",
"policy_howweuse_p2": "Informațiile despre browser-ul tău (dacă este bazat pe un sistem de operare desktop sau mobil) ne ajută să luăm decizii când prioritizăm viitoarele îmbunătățiri. Echipa noastră de dezvoltare este mică, și încercăm să facem alegeri care să îmbunătățească experiența câtor mai mulți utilizatori.",
"policy_whatwetell": "Ce le spunem altora despre tine",
"policy_whatwetell_p1": "Nu furnizăm informațiile obținute terților, decât dacă ne este cerut în mod legal.",
"policy_links": "Link-uri către alte site-uri",
"policy_links_p1": "Acest site conține link-uri către alte site-uri, incluzându-le pe cele produse de alte organizații. Nu suntem responsabili pentru practicile de intimitate sau pentru conținutul site-urilor externe. Ca regulă generală, link-urile către site-uri externe sunt deschise ntr-o fereastră noup, pentru a face clar faptul că părăsiți CryptPad.fr.",
"policy_ads": "Reclame",
"policy_ads_p1": "Nu afișăm nici o formă de publicitate online, dar s-ar putea să atașăm link-uri către instituțiile care ne finanțează cerecetarea.",
"policy_choices": "Ce alegeri ai",
"policy_choices_open": "Codul nostru este open source, așa că tu ai mereu posibilitatea de a-ți găzdui propria instanță de CryptPad.",
"policy_choices_vpn": "Dacă vrei să folosești instanța găzduită de noi, dar nu vrei să îți expui IP-ul, poți să îl protejezi folosind <a href=\"https://www.torproject.org/projects/torbrowser.html.en\" title=\"downloads from the Tor project\" target=\"_blank\" rel=\"noopener noreferrer\">Tor browser bundle</a>, sau <a href=\"https://riseup.net/en/vpn\" title=\"VPNs provided by Riseup\" target=\"_blank\" rel=\"noopener noreferrer\">VPN</a>.",
"tos_title": "CryptPad Termeni de Utilizare",
"tos_legal": "Te rugăm să nu fii rău intenționat, abuziv, sau să faci orice ilegal.",
"tos_availability": "Sperăm că o să găsești acest serviciu util, dar disponibilitatea sau performanța nu poate fi garantată. Te rugăm să îți exporți datele n mod regulat.",
@ -210,28 +193,11 @@
"tos_3rdparties": "Nu oferim date personale terților, decât dacă ne sunt solicitate prin lege.",
"header_logoTitle": "Mergi la pagina principală",
"driveReadmeTitle": "Ce este CryptPad?",
"readme_welcome": "Bine ai venit n CryptPad !",
"readme_p1": "Bine ai venit în CryptPad, acesta este locul unde îți poți lua notițe, singur sau cu prietenii.",
"readme_p2": "Acest pad o să îți ofere un scurt ghid în cum poți să folosești CryptPad pentru a lua notițe, a le ține organizate și a colabora pe ele.",
"readme_cat1": "Descoperă-ți CryptDrive-ul",
"readme_cat1_l1": "Crează un pad: În CryptDrive-ul tău, dă click {0} apoi {1} și poți să creezi un pad.",
"readme_cat1_l2": "Deschide pad-urile din CryptDrive-ul tău: doublu-click pe iconița unui pad pentru a-l deschide.",
"readme_cat1_l3": "Organizează-ți pad-urile: Când ești logat, orice pad accesezi va fi afișat ca în secțiunea {0} a drive-ului tău.",
"readme_cat1_l3_l1": "Poți să folosești funcția click and drag pentru a muta fișierele în folderele secțiunii {0} a drive-ului tău și pentru a crea noi foldere.",
"readme_cat1_l3_l2": "Ține minte să încerci click-dreapta pe iconițe pentru că există și meniuri adiționale.",
"readme_cat1_l4": "Pune pad-urile vechi în gunoi. Poți să folosești funcția click and drag pe pad-uri în categoria {0} la fel ca și în cazul folderelor.",
"readme_cat2": "Crează pad-uri ca un profesionist",
"edit": "editează",
"view": "vezi",
"readme_cat2_l1": "Butonul {0} din pad-ul tău dă accesul colaboratorilor tăi să {1} sau să {2} pad-ul.",
"readme_cat2_l2": "Schimbă titlul pad-ului dând click pe creion",
"readme_cat3": "Descoperă aplicațiile CryptPad",
"readme_cat3_l1": "Cu editorul de cod CryptPad, poți colabora pe cod ca Javascript și markdown ca HTML și Markdown",
"readme_cat3_l2": "Cu editorul de slide-uri CryptPad, poți să faci prezentări scurte folosind Markdown",
"readme_cat3_l3": "Cu CryptPoll poți să organizezi votări rapide, mai ales pentru a programa ntâlniri care se potrivesc calendarelor tuturor",
"feedback_about": "Dacă citești asta, probabil că ești curios de ce CryptPad cere pagini web atunci când întreprinzi anumite acțiuni",
"feedback_privacy": "Ne pasă de intimitatea ta, si în același timp vrem să păstrăm CryptPad ușor de folosit. Folosim acest fișier pentru a ne da seama care beneficii UI contează cel mai mult pentru utilizatori, cerându-l alături de un parametru specific atunci când acțiunea se desfășoară",
"feedback_optout": "Dacă vrei să ieși, vizitează <a href='/settings/'>setările de pe pagina ta de user</a>, unde vei găsi o căsuță pentru a activa sau dezactiva feedback-ul de la user",
"feedback_optout": "Dacă vrei să ieși, vizitează <a>setările de pe pagina ta de user</a>, unde vei găsi o căsuță pentru a activa sau dezactiva feedback-ul de la user.",
"type": {
"pad": "Text",
"code": "Cod",
@ -266,7 +232,6 @@
"forgotten": "Mutat în coșul de gunoi",
"errorState": "Eroare critică: {0}",
"userlist_offline": "Ești momentan offline, lista utilizatorilor nu este disponibilă.",
"newVersion": "<b>CryptPad a fost updatat!</b><br>Verifică ce e nou în noua versiune:<br><a href=\"https://github.com/xwiki-labs/cryptpad/releases/tag/{0}\" target=\"_blank\">Release notes for CryptPad {0}</a>",
"upgradeAccount": "Actualizare cont",
"GB": "GB",
"KB": "KB",
@ -397,7 +362,7 @@
"fm_deleteOwnedPad": "Ești sigur că vrei să ștergi definitiv acest pad de pe server?",
"fm_deleteOwnedPads": "Ești sigur că vrei să ștergi definitiv aceste pad-uri de pe server?",
"fm_info_recent": "Aceste documente au fost deschise sau modificate recent de către tine sau de către colaboratorii tăi.",
"fm_info_sharedFolder": "Acesta este un dosar partajat. Deoarece nu ești logat, îl poți vizualiza doar în modul citire.<br><a href=\"/register/\">Înscrie-te</a> sau <a href=\"/loghează-te/\">Log in</a> pentru a-l putea importa in CryptDrive-ul tău si a-l modifica.",
"fm_info_sharedFolder": "Acesta este un dosar partajat. Deoarece nu ești logat, îl poți vizualiza doar în modul citire.<br><a href=\"/register/\">Înscrie-te</a> sau <a href=\"/login/\">Log in</a> pentru a-l putea importa in CryptDrive-ul tău si a-l modifica.",
"fm_info_owned": "Ești proprietarul pad-urilor afișate aici. Acest lucru înseamna că le poți șterge definitiv de pe server oricând vei dori. Dacă decizi să le ștergi, alți utilizatori nu le vor mai putea accesa.",
"fm_error_cantPin": "O eroare internă de server a apărut. Te rugăm să reîncarci pagina și să încerci din nou.",
"fm_viewListButton": "Vizualizează sub formă de listă",

@ -57,7 +57,6 @@
"editor": "автор",
"userlist_offline": "В данный момент вы не подключены, список пользователей недоступен.",
"language": "Язык",
"newVersion": "<b>CryptPad обновился!</b><br>Посмотрите что нового в последней версии:<br><a href=\"https://github.com/xwiki-labs/cryptpad/releases/tag/{0}\" target=\"_blank\">Изменения в CryptPad {0}</a>",
"upgrade": "Обновление",
"upgradeAccount": "Улучшить тарифный план",
"MB": "Мб",
@ -67,7 +66,7 @@
"formattedGB": "{0} Гб",
"formattedKB": "{0} Кб",
"pinLimitReached": "У вас закончилось свободное место",
"pinLimitReachedAlert": "У вас закончилось свободное место. Новые документы не будут сохраняться в вашем CryptDrive.<br>Вы можете удалить ненужные документы из вашего CryptDrive или <a href=\"https://accounts.cryptpad.fr/#!on={0}\" target=\"_blank\">оформить премиум-подписку</a> и получить больше свободного места.",
"pinLimitReachedAlert": "У вас закончилось свободное место. Новые документы не будут сохраняться в вашем CryptDrive.<br>Вы можете удалить ненужные документы из вашего CryptDrive или <a>оформить премиум-подписку</a> и получить больше свободного места.",
"pinLimitReachedAlertNoAccounts": "У вас закончилось свободное место",
"pinLimitNotPinned": "У вас закончилось свободное место.<br>Этот документ не будет сохранён в вашем CryptDrive.",
"pinLimitDrive": "У вас закончилось свободное место.<br>Вы не можете создавать новые документы.",
@ -84,7 +83,7 @@
"saveTitle": "Сохранить заголовок (Ввод)",
"forgetButton": "Удалить",
"forgetPrompt": "Нажав ОК, вы удалите документ в корзину. Уверены?",
"movedToTrash": "Документ был удалён в корзину.<br><a href=\"/drive/\">Доступ к диску</a>",
"movedToTrash": "Документ был удалён в корзину.<br><a>Доступ к диску</a>",
"shareButton": "Поделиться",
"shareSuccess": "Ссылка скопирована в буфер обмена",
"userListButton": "Список пользователей",
@ -220,7 +219,6 @@
"contacts_leaveRoom": "Покинуть комнату",
"fm_rootName": "Документы",
"fm_trashName": "Корзина",
"fm_unsortedName": "Несортированные файлы",
"fm_filesDataName": "Все файлы",
"fm_templateName": "Образцы",
"fm_searchName": "Поиск",
@ -367,7 +365,7 @@
"settings_export_download": "Скачиваем и расшифровываем ваши документы...",
"contacts_request": "<em>{0}</em> хотел бы добавить вас в список контактов. <b>Принять <b>?",
"contacts_confirmRemove": "Вы уверены, что хотите удалить <em>1{0}</em>2 из ваших контактов?",
"register_acceptTerms": "Я принимаю <a href='/terms.html' tabindex='-1'>1 условия пользования</a>",
"register_acceptTerms": "Я принимаю <a>1 условия пользования</a>",
"register_warning": "Мы не сможем восстановить ваши данные, если вы потеряете пароль, так как мы не имеем доступа к ним.",
"settings_backupCategory": "Резервное копирование",
"settings_backup": "Резервная копия",
@ -402,7 +400,6 @@
"settings_autostoreMaybe": "Вручную (всегда спрашивать)",
"settings_userFeedbackTitle": "Обратная связь",
"settings_userFeedbackHint2": "Содержимое вашего документа никогда не будет передаваться на сервер.",
"fm_alert_anonymous": "Здравствуйте, в настоящее время вы используете CryptPad анонимно, это нормально, но ваши документы могут быть удалены после периода бездействия. Мы отключили расширенные возможности хранилища для анонимных пользователей, потому что хотим донести до вас, что это небезопасное место для хранения. Вы можете <a href=\"https://blog.cryptpad.fr/2017/05/17/You-gotta-log-in/\" target=\"_blank\">1читать далее</a>2 о том, почему мы это делаем и почему вам стоит <a href=\"/register/\">зарегистрироваться</a>4 and <a href=\"/login/\">5Log in</a>6.",
"settings_resetPrompt": "Это действие удалит все документы с диска.<br>Вы уверены, что хотите продолжить?<br>Напишите \"<em>Я люблю CryptPad</em>\" для подтверждения.",
"settings_importTitle": "Импортируйте последние документы данного браузера в ваше хранилище",
"settings_importConfirm": "Вы уверены, что хотите импортировать последние документы из этого браузера в хранилище вашего пользователя?",
@ -637,12 +634,6 @@
"features_registered": "Зарегистрированный пользователь",
"features_title": "Функции",
"features": "Функции",
"policy_ads": "Реклама",
"policy_links": "Ссылки на другие сайты",
"policy_whatwetell": "Какую информацию о вас мы передаем другим",
"policy_howweuse": "Как мы используем информацию о вас",
"policy_whatweknow": "Что мы знаем о вас",
"policy_title": "Политика конфиденциальности CryptPad",
"whatis_drive": "Порядок с Cryptdrive",
"whatis_collaboration": "Конфиденциальное взаимодействие",
"whatis_title": "Что такое CryptPad?",
@ -704,17 +695,8 @@
"settings_ownDrivePending": "Ваш аккаунт обновляется. Пожалуйста, не закрывайте и не обновляйте страницу пока процесс не закончится.",
"settings_changePasswordHint": "Изменение пароля от аккаунта. Введите ваш текущий пароль и подтвердите новый пароль, введя его дважды.<br><b>Мы не сможем сбросить ваш пароль, если вы его забудете, будьте осторожны!</b>",
"settings_changePasswordNewConfirm": "Подтвердите новый пароль",
"policy_whatwetell_p1": "Мы не предоставляем собранную информацию третьим лицам за исключением случаев, когда мы обязаны сделать это по законодательству.",
"policy_howweuse_p2": "Информация о вашем браузере (настольная или мобильная операционная система) помогает нам приоритизировать развитие функционала. Наша команда разработчиков маленькая и, принимая решения об улучшениях, мы стараемся охватить наибольшее число пользователей.",
"policy_howweuse_p1": "Данная информация помогает нам принимать решения о продвижении CryptPad и оценивать успешность наших действий. Информация о вашем местоположении помогает нам понять необходимость больших усилий для поддержки других языков.",
"policy_whatweknow_p1": "Так как приложение размещено в Интернете, CryptPad имеет доступ ко всем метаданным протокола HTTP. Это включает ваш IP адрес и различные HTTP заголовки, которые могут быть использованы для идентификации вашего браузера. Информацию, которую раскрывает ваш браузер, вы можете найти на сайте <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending\" title=\"what http headers is my browser sending\">WhatIsMyBrowser.com</a>.",
"terms": "Пользовательское соглашение",
"tos_availability": "Мы надеемся, что вам понравится наш сервис, но не можем гарантировать его доступность или производительность. Поэтому, пожалуйста, регулярно экспортируйте ваши данные.",
"features_f_file0": "Работа с документами",
"policy_choices_vpn": "Если вы решили развернуть свой сервер, но хотите раскрывать ваш IP адрес, вы можете его защитить с помощью <a href=\"https://www.torproject.org/projects/torbrowser.html.en\" title=\"downloads from the Tor project\" target=\"_blank\" rel=\"noopener noreferrer\">Tor браузера</a>, or a <a href=\"https://riseup.net/en/vpn\" title=\" VPN сервиса от Riseup\" target=\"_blank\" rel=\"noopener noreferrer\">VPN</a>.",
"policy_choices_open": "Наш код открыт, поэтому вы всегда можете развернуть свой собственный сервер CryptPad.",
"policy_choices": "Ваш выбор",
"policy_ads_p1": "Мы не показываем онлайн рекламу, хотя можем давать ссылки на стороны, финансирующие наших исследования.",
"policy_links_p1": "Данный сайт содержит ссылки на другие сайты, в том числе созданные другими организациями. Мы не несем ответственности за обеспечение конфиденциальности или сдержимое сторонних сайтов. По умолчанию ссылки на сторонние сайты запускаются в новом окне браузера, чтобы предупредить об уходе с CryptPad.fr.",
"about": "О нас"
}

@ -53,7 +53,7 @@
"propertiesButton": "Egenskaper",
"colorButtonTitle": "Ändra textfärgen i presentationsläge",
"useTemplateCancel": "Starta tomt (Esc)",
"pinLimitReachedAlert": "Du har nått din lagringsgräns. Nya dokument kommer inte lagras i din CryptDrive.<br>Du kan antingen ta bort dokument från din CryptDrive eller <a href=\"https://accounts.cryptpad.fr/#!on={0}\" target=\"_blank\">eller prenumerera på premium</a> för att öka din lagringsgräns.",
"pinLimitReachedAlert": "Du har nått din lagringsgräns. Nya dokument kommer inte lagras i din CryptDrive.<br>Du kan antingen ta bort dokument från din CryptDrive eller <a>eller prenumerera på premium</a> för att öka din lagringsgräns.",
"anonymousStoreDisabled": "Administratören för denna CryptPad-instans har avaktiverat anonyma användare. Du måste logga in för att kunna använda CryptDrive.",
"common_connectionLost": "<b>Serveranslutning tappad</b><br>Du är nu i skrivskyddat läge tills anslutningen är tillbaka.",
"button_newcode": "Nytt kod-dokument",
@ -78,7 +78,7 @@
"userListButton": "Användarlista",
"shareSuccess": "Länken är kopierad",
"shareButton": "Dela",
"movedToTrash": "Dokumentet har flyttats till papperskorgen.<br><a href=\"/drive/\">Gå till min Drive</a>",
"movedToTrash": "Dokumentet har flyttats till papperskorgen.<br><a>Gå till min Drive</a>",
"forgetPrompt": "Om du klickar OK flyttas detta dokument till papperskorgen. Är du säker?",
"forgetButton": "Radera",
"saveTitle": "Spara titeln (enter)",
@ -105,7 +105,6 @@
"storageStatus": "Lagring:<br /><b>{0}</b> använd av <b>{1}</b>",
"upgradeAccount": "Uppgradera konto",
"upgrade": "Uppgradera",
"newVersion": "<b>CryptPad har uppdaterats!</b><br>Se vad som är nytt i den senaste versionen:<br><a href=\"https://github.com/xwiki-labs/cryptpad/releases/tag/{0}\" target=\"_blank\">Release notes för CryptPad {0}</a>",
"language": "Språk",
"userlist_offline": "Du är för närvarande offline, användarlistan är inte tillgänglig.",
"editor": "redigerare",

@ -18,7 +18,6 @@
"code": "Kod",
"pad": "Zengin metin biçimi"
},
"fm_alert_anonymous": "Merhaba, şu anda CryptPad'i anonim olarak kullanıyorsunuz, sorun değil, ancak padlariniz bir süre kullanılmadığında silinebilir. Anonim kullanıcılar için sürücünün gelişmiş özelliklerini devre dışı bıraktık, çünkü bir şeyleri depolamak için güvenli bir yer olmadığınııkça belirtmek istiyoruz. Bunu neden yaptığımız hakkında <a href=\"https://blog.cryptpad.fr/2017/05/17/You-gotta-log-in/\" target=\"_blank\"> ve neden <a href=\"/register/\"> Kayıt olmanız</a> ve <a href=\"/login/\"> Giriş yapmanız</a> gerektiği hakkında okuyabilirsiniz.",
"main_catch_phrase": "Ekip iş birliği sistemi, <br>şifreli ve açık kaynak",
"main_title": "CryptPad: Tamamen Gizli, İşbirliğine Dayalı Gerçek Zamanlı Düzenleme"
}

@ -37,7 +37,6 @@
"viewers": "檢視群",
"editor": "編輯者",
"language": "語言",
"newVersion": "<b>CryptPad 已更新!</b><br>檢查最新版本有什麼新功能:<br><a href=\"https://github.com/xwiki-labs/cryptpad/releases/tag/{0}\" target=\"_blank\">CryptPad新發佈記事 {0}</a>",
"upgrade": "昇級",
"MB": "MB",
"GB": "GB",
@ -46,7 +45,7 @@
"formattedGB": "{0} GB",
"formattedKB": "{0} KB",
"pinLimitReached": "你已達到儲存容量上限",
"pinLimitReachedAlert": "你已達到儲存容量上限,新檔案不會儲存到你的 CryptDrive.<br>要嘛你可以自 CryptDrive 移除原有文件或是 <a href=\"https://accounts.cryptpad.fr/#!on={0}\" target=\"_blank\">昇級到付費版</a>增加你的儲存容量。",
"pinLimitReachedAlert": "你已達到儲存容量上限,新檔案不會儲存到你的 CryptDrive.<br>要嘛你可以自 CryptDrive 移除原有文件或是 <a>昇級到付費版</a>增加你的儲存容量。",
"pinLimitNotPinned": "你已達到容量使用上限<br>這個檔案無法儲存到你的 CryptDrive.",
"pinLimitDrive": "你已達到容量使用上限<br>你不能建立新的編輯檔案",
"importButtonTitle": "從電腦上傳滙入檔案",
@ -58,7 +57,7 @@
"user_accountName": "帳號名稱",
"clickToEdit": "點擊以編輯",
"forgetPrompt": "點擊 OK 將把這個檔案移置垃圾筒,確定要這樣做嗎",
"movedToTrash": "這個檔案已被移置垃圾筒<br><a href=\"/drive/\">讀取我的雲端硬碟</a>",
"movedToTrash": "這個檔案已被移置垃圾筒<br><a>讀取我的雲端硬碟</a>",
"shareButton": "分享",
"shareSuccess": "複製連結到剪貼版",
"newButton": "新",
@ -109,7 +108,6 @@
"canvas_opacity": "透明度",
"fm_rootName": "根目錄",
"fm_trashName": "垃圾桶",
"fm_unsortedName": "未整理的檔案",
"fm_filesDataName": "所有檔案",
"fm_templateName": "模版",
"fm_searchName": "搜尋",
@ -142,7 +140,6 @@
"fm_info_template": "包含所有工作檔案已存成模版,便於讓你在建立新工作檔案時套用。",
"fm_info_trash": "清空垃圾筒好讓 CryptDrive 多出一些空間",
"fm_info_anonymous": "您没有登录,所以您的文档将在{0}天后过期。清除你的浏览器历史记录可能会使它们消失。<br><a href=\"/register/\">注册</a> (无需个人信息) 或<a href=\"/login/\">登录</a>以无限期地把它们储存在你的硬盘里。 <a href=\"https://docs.cryptpad.fr/en/user_guide/user_account.html#account-types\" target=\"_blank\">阅读更多关于注册帐户</a>。",
"fm_alert_anonymous": "嗨你好, 你目前正以匿名方式在使用 CryptPad , 這也沒問題,不過你的東西過一段時間沒動靜後,就會自動被刪除。 匿名的用戶我們也取消其進階功能,因為我們要明確地讓用戶知道,這裏 不是一個安全存放東西的地方。你可以 <a href=\"https://blog.cryptpad.fr/2017/05/17/You-gotta-log-in/\" target=\"_blank\">進一步了解 </a> 關於 為何我們這樣作,以及為何你最好能夠<a href=\"/register/\">註冊</a> 以及 <a href=\"/login/\">登錄</a>使用。",
"fm_error_cantPin": "內部伺服器出錯,請重新載入本頁並再試一次。",
"fc_newfolder": "新資料夾",
"fc_rename": "重新命名",
@ -170,7 +167,7 @@
"login_invalPass": "要求密碼",
"login_unhandledError": "發生了未預期的錯誤 :(",
"register_importRecent": "滙入檔案記錄 (建議)",
"register_acceptTerms": "我同意 <a href='/terms.html'>服務條款</a>",
"register_acceptTerms": "我同意 <a>服務條款</a>",
"register_passwordsDontMatch": "密碼不相符!",
"register_mustAcceptTerms": "你必須同意我們的服務條款。",
"register_header": "歡迎來到 CryptPad",
@ -216,21 +213,6 @@
"contact": "聯繫",
"terms": "服務條款",
"blog": "Blog",
"policy_title": "CryptPad 隱私政策",
"policy_whatweknow": "我們會知道哪些關於你的資料",
"policy_whatweknow_p1": "作為一個網頁上的應用程式, CryptPad 可以接取 HTTP 協議所曝露的元數據。 這包括你的 IP 地址、各式其它的 HTTP 標頭,其用於識別你特定的瀏覽器。 你可以訪問 <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending\" title=\"what http headers is my browser sending\">WhatIsMyBrowser.com</a>這個網站,知道你的瀏覽器分享了哪些資訊。",
"policy_howweuse": "我們如何利用我們知道的東西",
"policy_howweuse_p1": "我們利用這些資訊評估過去成功的效果,以更佳地決定如何推廣 CryptPad。有關你地理位置的資訊讓我們知道是否該提供英語之外的語言版本支援",
"policy_howweuse_p2": "有關你的瀏覽器資訊 (是桌面還是手機操作系統) 有助於讓我們決定要優先哪些功能改善。我們開發團隊人很少,我們試著挑選盡可能地提昇更多用戶的使用體驗。",
"policy_whatwetell": "我們可以告訴別人關於你的哪些資料",
"policy_whatwetell_p1": "我們不會給第三人我們所收集的資訊,除非被依法要求配合。",
"policy_links": "其它網站連結",
"policy_links_p1": "本站含有其它網站的連結包括其它組織的産品。我們無法對這些隱私實踐或任何本站以外的內容負責。一般而言連到外站的連結會另啟新視窗以明確讓你知道已離開了CryptPad.fr.",
"policy_ads": "廣告",
"policy_ads_p1": "我們不會放置任何線上廣告,但會提供一些資助我們研究的機構與團體的網址連結",
"policy_choices": "你有的選擇",
"policy_choices_open": "我們的代碼是開放的,你可以選擇自行在自己的機器上來架設自己的 CryptPad.",
"policy_choices_vpn": "如果你要使用我們架設的服務, 但不希望曝露自己的 IP 地址, 你可以利用<a href=\"https://www.torproject.org/projects/torbrowser.html.en\" title=\"downloads from the Tor project\" target=\"_blank\" rel=\"noopener noreferrer\">Tor 瀏覽器套件</a>來保護隱藏 IP 地址, 或是使用 <a href=\"https://riseup.net/en/vpn\" title=\"VPNs provided by Riseup\" target=\"_blank\" rel=\"noopener noreferrer\">VPN</a>。",
"tos_title": "CryptPad 服務條款",
"tos_legal": "請不要惡意、濫用或從事非法活動。",
"tos_availability": "希望你覺得我們的産品與服務對你有所幫助, 但我們並不能一直百分百保證它的表現穩定與可得性。請記得定期滙出你的資料。",
@ -239,28 +221,11 @@
"tos_3rdparties": "除非法令要求,我們不會提供任何個人資料給第三方。",
"header_logoTitle": "回到主頁",
"driveReadmeTitle": "什麼是 CryptPad?",
"readme_welcome": "歡迎來到 CryptPad !",
"readme_p1": "欢迎来到 CryptPad在这里你可以单独或和联系人一起记录事情。",
"readme_p2": "這個工作檔案可以讓你快速地了解如何使用 CryptPad 作筆記,有效地整理管理文件工作檔案。",
"readme_cat1": "認識如何使用 CryptDrive",
"readme_cat1_l1": "建立一個工作檔案: 在 CryptDrive 底下, 點擊 {0} 然後 {1} 這樣就可以建立一個新的工作檔案。",
"readme_cat1_l2": "從 CryptDrive 開啟工作檔案: 雙擊工作檔案的圖示來開啟它。",
"readme_cat1_l3": "分類你的工作檔案:登入之後,每一個你能接取使用的工作檔案會顯示在你雲端硬碟中的 {0} 部份。",
"readme_cat1_l3_l1": "你可以點擊或是拉曳檔案到雲端硬碟 {0} 區,新增資料夾。",
"readme_cat1_l3_l2": "記得試著點擊圖示,以顯示更多的選項功能。",
"readme_cat1_l4": "把舊的工作檔案放到垃圾筒:點擊或是拉曳檔案到 {0} 如同把它們拉到文件目錄夾一樣的方法。",
"readme_cat2": "像個專業人士來編寫你的工作檔案",
"edit": "編輯",
"view": "檢視",
"readme_cat2_l1": "在工作檔案下的 {0} 按鍵可讓其它的協作者接取 {1} 或是 {2} 工作檔案",
"readme_cat2_l2": "若要更改工作檔案的名稱,只要點擊右上的鉛筆圖示即可",
"readme_cat3": "發現其它的 CryptPad 應用",
"readme_cat3_l1": "使用 CryptPad 代碼編輯器,你可以和其它人協作各種程式碼,如 Javascript、 markdown、 HTML 等等。",
"readme_cat3_l2": "使用 CryptPad 投影片編輯功能,你可以使用 Markdown 快速製作簡報檔。",
"readme_cat3_l3": "利用 CryptPoll 你可以快速作個線上調查,尤其是調查每個人有空的會議時間。",
"feedback_about": "如果你讀了這裏,也許會好奇為何當你執行某些動作時 CryptPad 會請求網頁資訊。",
"feedback_privacy": "我們注重你的隱私,同時也要讓 CryptPad 容易使用。我們利用這個檔案來了解哪一種介面設計為用戶所重視,透過它來請求特別的功能參數。",
"feedback_optout": "如果欲退出客戶資料收集, 請到 <a href='/settings/'>用戶設定頁</a>, 可以找到勾選項目來啟用或關閉用戶回饋功能。",
"feedback_optout": "如果欲退出客戶資料收集, 請到 <a>用戶設定頁</a>, 可以找到勾選項目來啟用或關閉用戶回饋功能。",
"settings_cat_kanban": "看板",
"themeButton": "主题",
"languageButton": "语言",

@ -7,7 +7,7 @@
.loading-hidden { display: none; }
</style>
</head>
<body class="cp-app-oodoc">
<body class="cp-app-doc">
<div id="cp-toolbar" class="cp-toolbar-container"></div>
<div id="cp-app-oo-container">
<div id="cp-app-oo-editor">

@ -218,6 +218,11 @@ define([
};
var toolbar = Toolbar.create(configTb);
var helpMenu = common.createHelpMenu(['drive']);
APP.help = helpMenu.menu;
$('#cp-app-drive-content-container').prepend(helpMenu.menu);
var $displayName = APP.$bar.find('.' + Toolbar.constants.username);
metadataMgr.onChange(function () {
var name = metadataMgr.getUserData().name || Messages.anonymous;

@ -0,0 +1,53 @@
define([
'jquery',
'/lib/datepicker/flatpickr.js',
'css!/lib/datepicker/flatpickr.min.css',
], function ($, Flatpickr) {
var createRangePicker = function (cfg) {
var start = cfg.startpicker;
var end = cfg.endpicker;
var is24h = false
try {
is24h = !new Intl.DateTimeFormat(navigator.language, { hour: 'numeric' }).format(0).match(/AM/);
} catch (e) {}
var e = $(end.input)[0];
var endPickr = Flatpickr(e, {
enableTime: true,
time_24hr: is24h,
minDate: start.date
});
endPickr.setDate(end.date);
var s = $(start.input)[0];
var startPickr = Flatpickr(s, {
enableTime: true,
time_24hr: is24h,
onChange: function () {
endPickr.set('minDate', startPickr.parseDate(s.value));
}
});
startPickr.setDate(start.date);
window.CP_startPickr = startPickr;
window.CP_endPickr = endPickr;
var getStartDate = function () {
setTimeout(function () { $(startPickr.calendarContainer).remove(); });
return startPickr.parseDate(s.value);
};
var getEndDate = function () {
setTimeout(function () { $(endPickr.calendarContainer).remove(); });
return endPickr.parseDate(e.value);
};
return {
getStartDate: getStartDate,
getEndDate: getEndDate,
};
};
return {
createRangePicker: createRangePicker
};
});

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save