Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benson <david@jgraph.com>2016-09-26 17:05:37 +0300
committerDavid Benson <david@jgraph.com>2016-09-26 17:05:37 +0300
commit7e701447ddc2f9e27f5116be559379b948d3f21e (patch)
tree136cf3e4bdc3dacfa75264afdf3471f82dec9210
parent4dffe471ddb61567671de57715dee98fb7cf638f (diff)
5.7.0.5 releasev5.7.0.5
Former-commit-id: 9819580ad0f7adcf289e7ef3953f29580f56ca30
-rw-r--r--ChangeLog8
-rw-r--r--LICENSE674
-rw-r--r--VERSION2
-rw-r--r--src/com/mxgraph/online/LogServlet.java9
-rw-r--r--war/cache.manifest2
-rw-r--r--war/electron.js59
-rw-r--r--war/index.html63
-rw-r--r--war/js/app.min.js439
-rw-r--r--war/js/atlas-viewer.min.js166
-rw-r--r--war/js/atlas.min.js435
-rw-r--r--war/js/diagramly/App.js8
-rw-r--r--war/js/diagramly/Dialogs.js2
-rw-r--r--war/js/diagramly/EditorUi.js17
-rw-r--r--war/js/diagramly/Menus.js42
-rw-r--r--war/js/embed-static.min.js2
-rw-r--r--war/js/reader.min.js2
-rw-r--r--war/js/viewer.min.js166
-rw-r--r--war/package.json32
-rw-r--r--war/plugins/electron.js7
19 files changed, 813 insertions, 1322 deletions
diff --git a/ChangeLog b/ChangeLog
index afca5be3..5e468c15 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+26-SEP-2016: 5.7.0.5
+
+- Adds publish to Facebook, Twitter
+
+21-SEP-2016: 5.7.0.4
+
+- Minor logging changes
+
21-SEP-2016: 5.7.0.3
- Uses mxGraph 3.7.0.0 beta 4
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 9cecc1d4..00000000
--- a/LICENSE
+++ /dev/null
@@ -1,674 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- {one line to give the program's name and a brief idea of what it does.}
- Copyright (C) {year} {name of author}
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- {project} Copyright (C) {year} {fullname}
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/VERSION b/VERSION
index 6481ee60..9d964de2 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5.7.0.3 \ No newline at end of file
+5.7.0.5 \ No newline at end of file
diff --git a/src/com/mxgraph/online/LogServlet.java b/src/com/mxgraph/online/LogServlet.java
index 3822b565..07fdc6f6 100644
--- a/src/com/mxgraph/online/LogServlet.java
+++ b/src/com/mxgraph/online/LogServlet.java
@@ -1,6 +1,7 @@
package com.mxgraph.online;
import java.io.OutputStream;
+import java.net.URLDecoder;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -44,7 +45,7 @@ public class LogServlet extends HttpServlet {
if (stack != null)
{
- message += stack;
+ message += "\n" + stack;
}
if (message != null)
@@ -55,6 +56,12 @@ public class LogServlet extends HttpServlet {
{
severityLevel = Level.parse(severity);
}
+
+ if (severityLevel.intValue() >= 900)
+ {
+ // Tidy up warnings and severes
+ message = message == null ? message : URLDecoder.decode(message, "UTF-8");
+ }
log.log(severityLevel, "CLIENT-LOG:" + message);
}
diff --git a/war/cache.manifest b/war/cache.manifest
index 107543b3..77bc3a99 100644
--- a/war/cache.manifest
+++ b/war/cache.manifest
@@ -1,7 +1,7 @@
CACHE MANIFEST
# THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 09/21/2016 04:20 PM
+# 09/26/2016 01:55 PM
/app.html
/index.html?offline=1
diff --git a/war/electron.js b/war/electron.js
new file mode 100644
index 00000000..0311dc45
--- /dev/null
+++ b/war/electron.js
@@ -0,0 +1,59 @@
+const electron = require('electron')
+// Module to control application life.
+const app = electron.app
+// Module to create native browser window.
+const BrowserWindow = electron.BrowserWindow
+
+// Keep a global reference of the window object, if you don't, the window will
+// be closed automatically when the JavaScript object is garbage collected.
+let mainWindow
+
+function createWindow()
+{
+ // Create the browser window.
+ mainWindow = new BrowserWindow({width: 1600, height: 1200})
+
+ // and load the index.html of the app.
+ mainWindow.loadURL(`file://${__dirname}/index.html?dev=1&test=1&db=0&gapi=0&od=0&analytics=0&picker=0&mode=device&browser=0&p=electron`)
+
+ // Open the DevTools.
+ mainWindow.webContents.openDevTools()
+
+ // Emitted when the window is closed.
+ mainWindow.on('closed', function()
+ {
+ // Dereference the window object, usually you would store windows
+ // in an array if your app supports multi windows, this is the time
+ // when you should delete the corresponding element.
+ mainWindow = null
+ })
+}
+
+// This method will be called when Electron has finished
+// initialization and is ready to create browser windows.
+// Some APIs can only be used after this event occurs.
+app.on('ready', createWindow)
+
+// Quit when all windows are closed.
+app.on('window-all-closed', function()
+{
+ // On OS X it is common for applications and their menu bar
+ // to stay active until the user quits explicitly with Cmd + Q
+ if (process.platform !== 'darwin')
+ {
+ app.quit()
+ }
+})
+
+app.on('activate', function()
+{
+ // On OS X it's common to re-create a window in the app when the
+ // dock icon is clicked and there are no other windows open.
+ if (mainWindow === null)
+ {
+ createWindow()
+ }
+})
+
+// In this file you can include the rest of your app's specific main process
+// code. You can also put them in separate files and require them here.
diff --git a/war/index.html b/war/index.html
index 8ab50833..2d547f2d 100644
--- a/war/index.html
+++ b/war/index.html
@@ -32,7 +32,7 @@
* - pages=1: For developers only
* - page=n: For developers only
* - ignoremime=1: For developers only (see DriveClient.js). Use Cmd-S to override mime.
- * - createindex=1: For depelopers only (see etc/build/README)
+ * - createindex=1: For developers only (see etc/build/README)
* - filesupport=0: For developers only (see Editor.js in core)
* - savesidebar=1: For developers only (see Sidebar.js)
* - pages=1: For developers only (see Pages.js)
@@ -64,39 +64,44 @@
(function()
{
var proto = window.location.protocol;
- var host = window.location.host;
-
- // Redirects apex and rt to www
- if (host === 'draw.io' || host === 'rt.draw.io')
- {
- host = 'www.draw.io';
- }
- // Redirects to SSL/non-SSL
- if (urlParams['demo'] != '1' && urlParams['offline'] != '1')
+ // Electron protocol is file:
+ if (!proto.startsWith('file:'))
{
- var ssl = (urlParams['https'] != null) ? urlParams['https'] == '1' :
- navigator.userAgent.indexOf('MSIE') < 0 || document.documentMode >= 9;
+ var host = window.location.host;
+
+ // Redirects apex and rt to www
+ if (host === 'draw.io' || host === 'rt.draw.io')
+ {
+ host = 'www.draw.io';
+ }
- if (ssl && proto != 'https:')
+ // Redirects to SSL/non-SSL
+ if (urlParams['demo'] != '1' && urlParams['offline'] != '1')
{
- proto = 'https:';
+ var ssl = (urlParams['https'] != null) ? urlParams['https'] == '1' :
+ navigator.userAgent.indexOf('MSIE') < 0 || document.documentMode >= 9;
+
+ if (ssl && proto != 'https:')
+ {
+ proto = 'https:';
+ }
+ else if (!ssl && proto != 'http:')
+ {
+ proto = 'http:';
+ }
}
- else if (!ssl && proto != 'http:')
+
+ var href = proto + '//' + host + window.location.href.substring(
+ window.location.protocol.length +
+ window.location.host.length + 2);
+
+ // Redirects if href changes
+ if (href != window.location.href)
{
- proto = 'http:';
+ window.location.href = href;
}
}
-
- var href = proto + '//' + host + window.location.href.substring(
- window.location.protocol.length +
- window.location.host.length + 2);
-
- // Redirects if href changes
- if (href != window.location.href)
- {
- window.location.href = href;
- }
})();
}
</script>
@@ -286,6 +291,12 @@
{
// Used to request grapheditor/mxgraph sources in dev mode
var mxDevUrl = document.location.protocol + '//devhost.jgraph.com/mxgraph2';
+
+ if (document.location.protocol == 'file:')
+ {
+ mxDevUrl = '../../mxgraph2';
+ }
+
var geBasePath = mxDevUrl + '/javascript/examples/grapheditor/www/js';
var mxBasePath = mxDevUrl + '/javascript/src';
diff --git a/war/js/app.min.js b/war/js/app.min.js
index 01dde4cf..cb5aa07d 100644
--- a/war/js/app.min.js
+++ b/war/js/app.min.js
@@ -44,8 +44,8 @@ function(){return this.h&&decodeURIComponent(this.h)};g.prototype.ca=function(b)
!(b instanceof Array)&&(b instanceof Object||"[object Array]"!==Object.prototype.toString.call(b))){var a=[],d=-1,e;for(e in b){var c=b[e];"string"===typeof c&&(a[++d]=e,a[++d]=c)}b=a}for(var a=[],d="",f=0;f<b.length;)e=b[f++],c=b[f++],a.push(d,encodeURIComponent(e.toString())),d="\x26",c&&a.push("\x3d",encodeURIComponent(c.toString()));this.l=a.join("")};g.prototype.fa=function(b){this.o=b?b:f};g.prototype.Z=function(){return f!==this.o};var m=/^(?:([^:/?#]+):)?(?:\/\/(?:([^/?#]*)@)?([^/?#:@]*)(?::([0-9]+))?)?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,
t=/[#\/\?@]/g,u=/[\#\?]/g;g.parse=b;g.create=function(b,e,c,k,l,n,m){b=new g(a(b,t),a(e,t),"string"==typeof c?encodeURIComponent(c):f,0<k?k.toString():f,a(l,u),f,"string"==typeof m?encodeURIComponent(m):f);n&&("string"===typeof n?b.O(n.replace(/[^?&=0-9A-Za-z_\-~.%]/g,d)):b.ba(n));return b};g.N=c;g.ma=e;g.ha={ua:function(a){return/\.html$/.test(b(a).U())?"text/html":"application/javascript"},N:function(a,d){return a?c(b(a),b(d)).toString():""+d}};return g}();"undefined"!==typeof window&&(window.URI=
n);var m=a,p=a,r=a,s=a;(function(){function b(a){return"string"===typeof a?'url("'+a.replace(A,g)+'")':'url("about:blank")'}function g(b){return B[b]}function k(b,a){return b?n.ha.N(b,a):a}function u(b,a,d){if(!d)return f;var e=(""+b).match(D);return e&&(!e[1]||G.test(e[1]))?d(b,a):f}function E(b){return b.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,"")}var A=/[\n\f\r\"\'()*<>]/g,B={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a",
-"\x3c":"%3c","\x3e":"%3e"},D=/^(?:([^:/?# ]+):)?/,G=/^(?:https?|mailto|data)$/i;m=function(){var a={};return function N(d,c,f,g,n){d=E(d);var m=e[d];if(!m||"object"!==typeof m)c.length=0;else{for(var t=m.cssPropBits,q=t&80,p=t&1536,z=NaN,r=0,s=0;r<c.length;++r){var F=c[r].toLowerCase(),D=F.charCodeAt(0),B,G,A,H,Q,ga;if(32===D)F="";else if(34===D)F=16===q?f?b(u(k(g,l(c[r].substring(1,F.length-1))),d,f)):"":t&8&&!(q&q-1)?F:"";else if("inherit"!==F){if(Q=m.cssLitGroup){var ca;if(!(ca=m.cssLitMap)){ca=
-{};for(var $=Q.length;0<=--$;)for(var fa=Q[$],ia=fa.length;0<=--ia;)ca[fa[ia]]=a;ca=m.cssLitMap=ca}Q=ca}else Q=a;if(!(ga=Q,ga[E(F)]===a))if(35===D&&/^#(?:[0-9a-f]{3}){1,2}$/.test(F))F=t&2?F:"";else if(48<=D&&57>=D)F=t&1?F:"";else if(B=F.charCodeAt(1),G=F.charCodeAt(2),A=48<=B&&57>=B,H=48<=G&&57>=G,43===D&&(A||46===B&&H))F=t&1?(A?"":"0")+F.substring(1):"";else if(45===D&&(A||46===B&&H))F=t&4?(A?"-":"-0")+F.substring(1):t&1?"0":"";else if(46===D&&A)F=t&1?"0"+F:"";else if('url("'===F.substring(0,5))F=
+"\x3c":"%3c","\x3e":"%3e"},D=/^(?:([^:/?# ]+):)?/,G=/^(?:https?|mailto|data)$/i;m=function(){var a={};return function N(d,c,f,g,n){d=E(d);var m=e[d];if(!m||"object"!==typeof m)c.length=0;else{for(var t=m.cssPropBits,q=t&80,p=t&1536,z=NaN,r=0,s=0;r<c.length;++r){var F=c[r].toLowerCase(),D=F.charCodeAt(0),G,B,A,H,Q,ga;if(32===D)F="";else if(34===D)F=16===q?f?b(u(k(g,l(c[r].substring(1,F.length-1))),d,f)):"":t&8&&!(q&q-1)?F:"";else if("inherit"!==F){if(Q=m.cssLitGroup){var ca;if(!(ca=m.cssLitMap)){ca=
+{};for(var $=Q.length;0<=--$;)for(var fa=Q[$],ia=fa.length;0<=--ia;)ca[fa[ia]]=a;ca=m.cssLitMap=ca}Q=ca}else Q=a;if(!(ga=Q,ga[E(F)]===a))if(35===D&&/^#(?:[0-9a-f]{3}){1,2}$/.test(F))F=t&2?F:"";else if(48<=D&&57>=D)F=t&1?F:"";else if(G=F.charCodeAt(1),B=F.charCodeAt(2),A=48<=G&&57>=G,H=48<=B&&57>=B,43===D&&(A||46===G&&H))F=t&1?(A?"":"0")+F.substring(1):"";else if(45===D&&(A||46===G&&H))F=t&4?(A?"-":"-0")+F.substring(1):t&1?"0":"";else if(46===D&&A)F=t&1?"0"+F:"";else if('url("'===F.substring(0,5))F=
f&&t&16?b(u(k(g,c[r].substring(5,F.length-2)),d,f)):"";else if("("===F.charAt(F.length-1))a:{Q=c;ca=r;F=1;$=ca+1;for(D=Q.length;$<D&&F;)fa=Q[$++],F+=")"===fa?-1:/^[^"']*\($/.test(fa);if(!F){F=Q[ca].toLowerCase();D=E(F);Q=Q.splice(ca,$-ca,"");ca=m.cssFns;$=0;for(fa=ca.length;$<fa;++$)if(ca[$].substring(0,D.length)==D){Q[0]=Q[Q.length-1]="";N(ca[$],Q,f,g);F=F+Q.join(" ")+")";break a}}F=""}else F=p&&/^-?[a-z_][\w\-]*$/.test(F)&&!/__$/.test(F)?n&&512===p?c[r]+n:1024===p&&e[F]&&"number"===typeof e[F].oa?
F:"":/^\w+$/.test(F)&&64===q&&t&8?z+1===s?(c[z]=c[z].substring(0,c[z].length-1)+" "+F+'"',""):(z=s,'"'+F+'"'):""}F&&(c[s++]=F)}1===s&&'url("about:blank")'===c[0]&&(s=0);c.length=s}}}();var F=RegExp("^(active|after|before|blank|checked|default|disabled|drop|empty|enabled|first|first-child|first-letter|first-line|first-of-type|fullscreen|focus|hover|in-range|indeterminate|invalid|last-child|last-of-type|left|link|only-child|only-of-type|optional|out-of-range|placeholder-shown|read-only|read-write|required|right|root|scope|user-error|valid|visited)$"),
H={};H["\x3e"]=H["+"]=H["~"]=H;p=function(b,a,e){function g(u,q){function v(e,f,g){var k,m,u,q,z,x=c;k="";if(e<f)if(z=b[e],"*"===z)++e,k=z;else if(/^[a-zA-Z]/.test(z)&&(m=n(z.toLowerCase(),[])))"tagName"in m&&(z=m.tagName),++e,k=z;for(q=u=m="";x&&e<f;++e)if(z=b[e],"#"===z.charAt(0))/^#_|__$|[^\w#:\-]/.test(z)?x=d:m+=z+l;else if("."===z)++e<f&&/^[0-9A-Za-z:_\-]+$/.test(z=b[e])&&!/^_|__$/.test(z)?m+="."+z:x=d;else if(e+1<f&&"["===b[e]){++e;var y=b[e++].toLowerCase();z=t.m[k+"::"+y];z!==+z&&(z=t.m["*::"+
@@ -53,9 +53,9 @@ y]);var r;a.ia?(r=a.ia(k,y),"string"!==typeof r&&(x=d,r=y),x&&z!==+z&&(z=t.d.NON
1)+l+'"':"|\x3d"===y||""===y||(x=d);break;case t.d.URI:case t.d.URI_FRAGMENT:""!==y&&(x=d);break;default:x=d}x&&(u+="["+r.replace(/[^\w-]/g,"\\$\x26")+y+s+(D?" i]":"]"))}else if(e<f&&":"===b[e])if(z=b[++e],F.test(z))q+=":"+z;else break;else break;e!==f&&(x=d);x&&(e=(k+m).replace(/[^ .*#\w-]/g,"\\$\x26")+u+q+g)&&p.push(e);return x}" "===b[u]&&++u;q-1!==u&&" "===b[q]&&--q;for(var p=[],z=u,x=c,y=u;x&&y<q;++y){var r=b[y];if(H[r]===H||" "===r)v(z,y,r)?z=y+1:x=d}v(z,q,"")||(x=d);return x?(p.length&&(z=
p.join(""),k!==f&&(z="."+k+" "+z),m.push(z)),c):!e||e(b.slice(u,q))}var k=a.na,l=a.L,n=a.Aa,m=[],u=0,q,v=0,p;for(q=0;q<b.length;++q)if(p=b[q],"("==p||"["==p?(++v,c):")"==p||"]"==p?(v&&--v,c):!(" "==b[q]&&(v||H[b[q-1]]===H||H[b[q+1]]===H)))b[u++]=b[q];b.length=u;u=b.length;for(q=v=0;q<u;++q)if(","===b[q]){if(!g(v,q))return f;v=q+1}return!g(v,u)?f:m};(function(){var b=/^\w/,a=RegExp("^(?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))(?: and ?\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))*)(?: , (?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))(?: and ?\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))*))*$",
"i");s=function(d){d=d.slice();for(var e=d.length,c=0,f=0;f<e;++f){var g=d[f];" "!=g&&(d[c++]=g)}d.length=c;d=d.join(" ");return!d.length?"":!a.test(d)?"not all":b.test(d)?d:"not all , "+d}})();(function(){function b(a){var d=/^\s*[']([^']*)[']\s*$/,e=/^\s*url\s*[(]["]([^"]*)["][)]\s*$/,c=/^\s*url\s*[(][']([^']*)['][)]\s*$/,g=/^\s*url\s*[(]([^)]*)[)]\s*$/,k;return(k=/^\s*["]([^"]*)["]\s*$/.exec(a))||(k=d.exec(a))||(k=e.exec(a))||(k=c.exec(a))||(k=g.exec(a))?k[1]:f}function e(g,l,n,t,v,z,r){function F(){E=
-G.length&&G[G.length-1]===f}var D=a,B=r||[0],G=[],E=d;q(l,{startStylesheet:function(){D=[]},endStylesheet:function(){},startAtrule:function(a,d){if(E)a=f;else if("@media"===a)D.push("@media"," ",s(d));else if("@keyframes"===a||"@-webkit-keyframes"===a){var c=d[0];1===d.length&&!/__$|[^\w\-]/.test(c)?(D.push(a," ",c+n.L),a="@keyframes"):a=f}else if("@import"===a&&0<d.length)if(a=f,"function"===typeof z){var l=s(d.slice(1));if("not all"!==l){++B[0];var m=[];D.push(m);var q=u(k(g,b(d[0])),function(b){var a=
-e(q,b.qa,n,t,v,z,B);--B[0];b=l?{toString:function(){return"@media "+l+" {"+a.result+"}"}}:a.result;m[0]=b;z(b,!!B[0])},v)}}else window.console&&window.console.log("@import "+d.join(" ")+" elided");E=!a;G.push(a)},endAtrule:function(){G.pop();E||D.push(";");F()},startBlock:function(){E||D.push("{")},endBlock:function(){E||(D.push("}"),E=c)},startRuleset:function(b){if(!E){var d=a;"@keyframes"===G[G.length-1]?(d=b.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
-E=!d,d&&(d=d[0].replace(/ +/g,""))):(b=p(b,n),!b||!b.length?E=c:d=b.join(", "));E||D.push(d,"{")}G.push(f)},endRuleset:function(){G.pop();E||D.push("}");F()},declaration:function(b,a){if(!E){var e=d,f=a.length;2<=f&&"!"===a[f-2]&&"important"===a[f-1].toLowerCase()&&(e=c,a.length-=2);m(b,a,t,g,n.L);a.length&&D.push(b,":",a.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return D.join("")}},va:!!B[0]}}r=function(b,d,c,f){return e(b,d,c,f,a,a).result.toString()}})()})();"undefined"!==
+B.length&&B[B.length-1]===f}var D=a,G=r||[0],B=[],E=d;q(l,{startStylesheet:function(){D=[]},endStylesheet:function(){},startAtrule:function(a,d){if(E)a=f;else if("@media"===a)D.push("@media"," ",s(d));else if("@keyframes"===a||"@-webkit-keyframes"===a){var c=d[0];1===d.length&&!/__$|[^\w\-]/.test(c)?(D.push(a," ",c+n.L),a="@keyframes"):a=f}else if("@import"===a&&0<d.length)if(a=f,"function"===typeof z){var l=s(d.slice(1));if("not all"!==l){++G[0];var m=[];D.push(m);var q=u(k(g,b(d[0])),function(b){var a=
+e(q,b.qa,n,t,v,z,G);--G[0];b=l?{toString:function(){return"@media "+l+" {"+a.result+"}"}}:a.result;m[0]=b;z(b,!!G[0])},v)}}else window.console&&window.console.log("@import "+d.join(" ")+" elided");E=!a;B.push(a)},endAtrule:function(){B.pop();E||D.push(";");F()},startBlock:function(){E||D.push("{")},endBlock:function(){E||(D.push("}"),E=c)},startRuleset:function(b){if(!E){var d=a;"@keyframes"===B[B.length-1]?(d=b.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
+E=!d,d&&(d=d[0].replace(/ +/g,""))):(b=p(b,n),!b||!b.length?E=c:d=b.join(", "));E||D.push(d,"{")}B.push(f)},endRuleset:function(){B.pop();E||D.push("}");F()},declaration:function(b,a){if(!E){var e=d,f=a.length;2<=f&&"!"===a[f-2]&&"important"===a[f-1].toLowerCase()&&(e=c,a.length-=2);m(b,a,t,g,n.L);a.length&&D.push(b,":",a.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return D.join("")}},va:!!G[0]}}r=function(b,d,c,f){return e(b,d,c,f,a,a).result.toString()}})()})();"undefined"!==
typeof window&&(window.sanitizeCssProperty=m,window.sanitizeCssSelectorList=p,window.sanitizeStylesheet=r,window.sanitizeMediaQuery=s);var q,u;(function(){function b(d,e,c,f,g){for(var k=e++;e<c&&"{"!==d[e]&&";"!==d[e];)++e;if(e<c&&(g||";"===d[e])){g=k+1;var l=e;g<c&&" "===d[g]&&++g;l>g&&" "===d[l-1]&&--l;f.startAtrule&&f.startAtrule(d[k].toLowerCase(),d.slice(g,l));e="{"===d[e]?a(d,e,c,f):e+1;f.endAtrule&&f.endAtrule()}return e}function a(c,f,g,k){++f;for(k.startBlock&&k.startBlock();f<g;){var l=
c[f].charAt(0);if("}"==l){++f;break}f=" "===l||";"===l?f+1:"@"===l?b(c,f,g,k,d):"{"===l?a(c,f,g,k):e(c,f,g,k)}k.endBlock&&k.endBlock();return f}function e(b,a,d,g){var k=a,n=f(b,a,d,c);if(0>n)return n=~n,n===k?n+1:n;var m=b[n];if("{"!==m)return n===k?n+1:n;a=n+1;n>k&&" "===b[n-1]&&--n;for(g.startRuleset&&g.startRuleset(b.slice(k,n));a<d;){m=b[a];if("}"===m){++a;break}a=" "===m?a+1:l(b,a,d,g)}g.endRuleset&&g.endRuleset();return a}function f(b,a,d,e){for(var c,g=[],k=-1;a<d;++a)if(c=b[a].charAt(0),
"["===c||"("===c)g[++k]=c;else if("]"===c&&"["===g[k]||")"===c&&"("===g[k])--k;else if("{"===c||"}"===c||";"===c||"@"===c||":"===c&&!e)break;0<=k&&(a=~(a+1));return a}function g(b,a,d){for(;a<d&&";"!==b[a]&&"}"!==b[a];)++a;return a<d&&";"===b[a]?a+1:a}function l(b,a,e,c){var k=b[a++];if(!n.test(k))return g(b,a,e);a<e&&" "===b[a]&&++a;if(a==e||":"!==b[a])return g(b,a,e);++a;a<e&&" "===b[a]&&++a;var m=f(b,a,e,d);if(0>m)m=~m;else{for(var t=[],u=0,q=a;q<m;++q)a=b[q]," "!==a&&(t[u++]=a);if(m<e){do{a=b[m];
@@ -80,11 +80,11 @@ li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapElement",mark:"HTMLElement
s:"HTMLElement",samp:"HTMLElement",script:"HTMLScriptElement",section:"HTMLElement",select:"HTMLSelectElement",small:"HTMLElement",source:"HTMLSourceElement",span:"HTMLSpanElement",strike:"HTMLElement",strong:"HTMLElement",style:"HTMLStyleElement",sub:"HTMLElement",summary:"HTMLElement",sup:"HTMLElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",td:"HTMLTableDataCellElement",textarea:"HTMLTextAreaElement",tfoot:"HTMLTableSectionElement",th:"HTMLTableHeaderCellElement",thead:"HTMLTableSectionElement",
time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",tt:"HTMLElement",u:"HTMLElement",ul:"HTMLUListElement","var":"HTMLElement",video:"HTMLVideoElement",wbr:"HTMLElement"};t.ELEMENT_DOM_INTERFACES=t.Q;t.P={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2};t.ueffects=t.P;t.J={"a::href":2,"area::href":2,"audio::src":1,"blockquote::cite":0,"command::icon":1,"del::cite":0,"form::action":2,"img::src":1,"input::src":1,"ins::cite":0,"q::cite":0,"video::poster":1,"video::src":1};
t.URIEFFECTS=t.J;t.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};t.ltypes=t.M;t.I={"a::href":2,"area::href":2,"audio::src":2,"blockquote::cite":2,"command::icon":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2,"video::poster":1,"video::src":2};t.LOADERTYPES=t.I;"undefined"!==typeof window&&(window.html4=t);b=function(b){function e(b,a){var d;if(P.hasOwnProperty(a))d=P[a];else{var c=a.match(M);d=c?String.fromCharCode(parseInt(c[1],10)):(c=a.match(U))?String.fromCharCode(parseInt(c[1],
-16)):K&&I.test(a)?(K.innerHTML="\x26"+a+";",c=K.textContent,P[a]=c):"\x26"+a+";"}return d}function g(b){return b.replace(Z,e)}function k(b){return(""+b).replace(da,"\x26amp;").replace(Y,"\x26lt;").replace(aa,"\x26gt;").replace(W,"\x26#34;")}function l(b){return b.replace(V,"\x26amp;$1").replace(Y,"\x26lt;").replace(aa,"\x26gt;")}function m(b){var a={z:b.z||b.cdata,A:b.A||b.comment,B:b.B||b.endDoc,t:b.t||b.endTag,e:b.e||b.pcdata,F:b.F||b.rcdata,H:b.H||b.startDoc,w:b.w||b.startTag};return function(b,
+16)):K&&J.test(a)?(K.innerHTML="\x26"+a+";",c=K.textContent,P[a]=c):"\x26"+a+";"}return d}function g(b){return b.replace(Z,e)}function k(b){return(""+b).replace(da,"\x26amp;").replace(Y,"\x26lt;").replace(aa,"\x26gt;").replace(W,"\x26#34;")}function l(b){return b.replace(V,"\x26amp;$1").replace(Y,"\x26lt;").replace(aa,"\x26gt;")}function m(b){var a={z:b.z||b.cdata,A:b.A||b.comment,B:b.B||b.endDoc,t:b.t||b.endTag,e:b.e||b.pcdata,F:b.F||b.rcdata,H:b.H||b.startDoc,w:b.w||b.startTag};return function(b,
e){var c,g=/(<\/|<\!--|<[!?]|[&<>])/g;c=b+"";if(ga)c=c.split(g);else{for(var k=[],l=0,n;(n=g.exec(c))!==f;)k.push(c.substring(l,n.index)),k.push(n[0]),l=n.index+n[0].length;k.push(c.substring(l));c=k}u(a,c,0,{r:d,C:d},e)}}function t(b,a,d,e,c){return function(){u(b,a,d,e,c)}}function u(a,d,e,f,g){try{a.H&&0==e&&a.H(g);for(var k,l,n,m=d.length;e<m;){var z=d[e++],x=d[e];switch(z){case "\x26":ea.test(x)?(a.e&&a.e("\x26"+x,g,$,t(a,d,e,f,g)),e++):a.e&&a.e("\x26amp;",g,$,t(a,d,e,f,g));break;case "\x3c/":if(k=
/^([-\w:]+)[^\'\"]*/.exec(x))if(k[0].length===x.length&&"\x3e"===d[e+1])e+=2,n=k[1].toLowerCase(),a.t&&a.t(n,g,$,t(a,d,e,f,g));else{var y=d,r=e,s=a,D=g,E=$,A=f,U=p(y,r);U?(s.t&&s.t(U.name,D,E,t(s,y,r,A,D)),e=U.next):e=y.length}else a.e&&a.e("\x26lt;/",g,$,t(a,d,e,f,g));break;case "\x3c":if(k=/^([-\w:]+)\s*\/?/.exec(x))if(k[0].length===x.length&&"\x3e"===d[e+1]){e+=2;n=k[1].toLowerCase();a.w&&a.w(n,[],g,$,t(a,d,e,f,g));var H=b.f[n];H&ca&&(e=q(d,{name:n,next:e,c:H},a,g,$,f))}else{var y=d,r=a,s=g,D=
-$,E=f,Q=p(y,e);Q?(r.w&&r.w(Q.name,Q.R,s,D,t(r,y,Q.next,E,s)),e=Q.c&ca?q(y,Q,r,s,D,E):Q.next):e=y.length}else a.e&&a.e("\x26lt;",g,$,t(a,d,e,f,g));break;case "\x3c!--":if(!f.C){for(l=e+1;l<m&&!("\x3e"===d[l]&&/--$/.test(d[l-1]));l++);if(l<m){if(a.A){var I=d.slice(e,l).join("");a.A(I.substr(0,I.length-2),g,$,t(a,d,l+1,f,g))}e=l+1}else f.C=c}f.C&&a.e&&a.e("\x26lt;!--",g,$,t(a,d,e,f,g));break;case "\x3c!":if(/^\w/.test(x)){if(!f.r){for(l=e+1;l<m&&"\x3e"!==d[l];l++);l<m?e=l+1:f.r=c}f.r&&a.e&&a.e("\x26lt;!",
-g,$,t(a,d,e,f,g))}else a.e&&a.e("\x26lt;!",g,$,t(a,d,e,f,g));break;case "\x3c?":if(!f.r){for(l=e+1;l<m&&"\x3e"!==d[l];l++);l<m?e=l+1:f.r=c}f.r&&a.e&&a.e("\x26lt;?",g,$,t(a,d,e,f,g));break;case "\x3e":a.e&&a.e("\x26gt;",g,$,t(a,d,e,f,g));break;case "":break;default:a.e&&a.e(z,g,$,t(a,d,e,f,g))}}a.B&&a.B(g)}catch(K){if(K!==$)throw K;}}function q(a,d,e,c,f,g){var k=a.length;fa.hasOwnProperty(d.name)||(fa[d.name]=RegExp("^"+d.name+"(?:[\\s\\/]|$)","i"));for(var n=fa[d.name],m=d.next,u=d.next+1;u<k&&!("\x3c/"===
+$,E=f,Q=p(y,e);Q?(r.w&&r.w(Q.name,Q.R,s,D,t(r,y,Q.next,E,s)),e=Q.c&ca?q(y,Q,r,s,D,E):Q.next):e=y.length}else a.e&&a.e("\x26lt;",g,$,t(a,d,e,f,g));break;case "\x3c!--":if(!f.C){for(l=e+1;l<m&&!("\x3e"===d[l]&&/--$/.test(d[l-1]));l++);if(l<m){if(a.A){var J=d.slice(e,l).join("");a.A(J.substr(0,J.length-2),g,$,t(a,d,l+1,f,g))}e=l+1}else f.C=c}f.C&&a.e&&a.e("\x26lt;!--",g,$,t(a,d,e,f,g));break;case "\x3c!":if(/^\w/.test(x)){if(!f.r){for(l=e+1;l<m&&"\x3e"!==d[l];l++);l<m?e=l+1:f.r=c}f.r&&a.e&&a.e("\x26lt;!",
+g,$,t(a,d,e,f,g))}else a.e&&a.e("\x26lt;!",g,$,t(a,d,e,f,g));break;case "\x3c?":if(!f.r){for(l=e+1;l<m&&"\x3e"!==d[l];l++);l<m?e=l+1:f.r=c}f.r&&a.e&&a.e("\x26lt;?",g,$,t(a,d,e,f,g));break;case "\x3e":a.e&&a.e("\x26gt;",g,$,t(a,d,e,f,g));break;case "":break;default:a.e&&a.e(z,g,$,t(a,d,e,f,g))}}a.B&&a.B(g)}catch(I){if(I!==$)throw I;}}function q(a,d,e,c,f,g){var k=a.length;fa.hasOwnProperty(d.name)||(fa[d.name]=RegExp("^"+d.name+"(?:[\\s\\/]|$)","i"));for(var n=fa[d.name],m=d.next,u=d.next+1;u<k&&!("\x3c/"===
a[u-1]&&n.test(a[u]));u++);u<k&&(u-=1);k=a.slice(m,u).join("");if(d.c&b.c.CDATA)e.z&&e.z(k,c,f,t(e,a,u,g,c));else if(d.c&b.c.RCDATA)e.F&&e.F(l(k),c,f,t(e,a,u,g,c));else throw Error("bug");return u}function p(a,e){var f=/^([-\w:]+)/.exec(a[e]),k={};k.name=f[1].toLowerCase();k.c=b.f[k.name];for(var l=a[e].substr(f[0].length),n=e+1,m=a.length;n<m&&"\x3e"!==a[n];n++)l+=a[n];if(!(m<=n)){for(var t=[];""!==l;)if(f=Q.exec(l))if(f[4]&&!f[5]||f[6]&&!f[7]){for(var f=f[4]||f[6],u=d,l=[l,a[n++]];n<m;n++){if(u){if("\x3e"===
a[n])break}else 0<=a[n].indexOf(f)&&(u=c);l.push(a[n])}if(m<=n)break;l=l.join("")}else{var u=f[1].toLowerCase(),q;if(f[2]){q=f[3];var z=q.charCodeAt(0);if(34===z||39===z)q=q.substr(1,q.length-2);q=g(q.replace(S,""))}else q="";t.push(u,q);l=l.substr(f[0].length)}else l=l.replace(/^[\s\S][^a-z\s]*/,"");k.R=t;k.next=n+1;return k}}function r(e){function c(b,a){l||a.push(b)}var g,l;return m({startDoc:function(){g=[];l=d},startTag:function(d,c,n){if(!l&&b.f.hasOwnProperty(d)){var m=b.f[d];if(!(m&b.c.FOLDABLE)){var t=
e(d,c);if(t){if("object"!==typeof t)throw Error("tagPolicy did not return object (old API?)");if("attribs"in t)c=t.attribs;else throw Error("tagPolicy gave no attribs");var u;"tagName"in t?(u=t.tagName,t=b.f[u]):(u=d,t=m);if(m&b.c.OPTIONAL_ENDTAG){var q=g[g.length-1];q&&q.D===d&&(q.v!==u||d!==u)&&n.push("\x3c/",q.v,"\x3e")}m&b.c.EMPTY||g.push({D:d,v:u});n.push("\x3c",u);d=0;for(q=c.length;d<q;d+=2){var p=c[d],z=c[d+1];z!==f&&z!==a&&n.push(" ",p,'\x3d"',k(z),'"')}n.push("\x3e");m&b.c.EMPTY&&!(t&b.c.EMPTY)&&
@@ -92,7 +92,7 @@ n.push("\x3c/",u,"\x3e")}else l=!(m&b.c.EMPTY)}}},endTag:function(a,e){if(l)l=d;
endDoc:function(b){for(;g.length;g.length--)b.push("\x3c/",g[g.length-1].v,"\x3e")}})}function s(b,a,d,e,c){if(!c)return f;try{var g=n.parse(""+b);if(g&&(!g.K()||ia.test(g.W()))){var k=c(g,a,d,e);return k?k.toString():f}}catch(l){}return f}function L(b,a,d,e,c){d||b(a+" removed",{S:"removed",tagName:a});if(e!==c){var f="changed";e&&!c?f="removed":!e&&c&&(f="added");b(a+"."+d+" "+f,{S:f,tagName:a,la:d,oldValue:e,newValue:c})}}function N(b,a,d){a=a+"::"+d;if(b.hasOwnProperty(a))return b[a];a="*::"+
d;if(b.hasOwnProperty(a))return b[a]}function T(d,e,c,g,k){for(var l=0;l<e.length;l+=2){var n=e[l],m=e[l+1],t=m,u=f,q;if((q=d+"::"+n,b.m.hasOwnProperty(q))||(q="*::"+n,b.m.hasOwnProperty(q)))u=b.m[q];if(u!==f)switch(u){case b.d.NONE:break;case b.d.SCRIPT:m=f;k&&L(k,d,n,t,m);break;case b.d.STYLE:if("undefined"===typeof C){m=f;k&&L(k,d,n,t,m);break}var p=[];C(m,{declaration:function(a,d){var e=a.toLowerCase();O(e,d,c?function(a){return s(a,b.P.ja,b.M.ka,{TYPE:"CSS",CSS_PROP:e},c)}:f);d.length&&p.push(e+
": "+d.join(" "))}});m=0<p.length?p.join(" ; "):f;k&&L(k,d,n,t,m);break;case b.d.ID:case b.d.IDREF:case b.d.IDREFS:case b.d.GLOBAL_NAME:case b.d.LOCAL_NAME:case b.d.CLASSES:m=g?g(m):m;k&&L(k,d,n,t,m);break;case b.d.URI:m=s(m,N(b.J,d,n),N(b.I,d,n),{TYPE:"MARKUP",XML_ATTR:n,XML_TAG:d},c);k&&L(k,d,n,t,m);break;case b.d.URI_FRAGMENT:m&&"#"===m.charAt(0)?(m=m.substring(1),m=g?g(m):m,m!==f&&m!==a&&(m="#"+m)):m=f;k&&L(k,d,n,t,m);break;default:m=f,k&&L(k,d,n,t,m)}else m=f,k&&L(k,d,n,t,m);e[l+1]=m}return e}
-function X(d,e,c){return function(f,g){if(b.f[f]&b.c.UNSAFE)c&&L(c,f,a,a,a);else return{attribs:T(f,g,d,e,c)}}}function R(b,a){var d=[];r(a)(b,d);return d.join("")}var C,O;"undefined"!==typeof window&&(C=window.parseCssDeclarations,O=window.sanitizeCssProperty);var P={lt:"\x3c",LT:"\x3c",gt:"\x3e",GT:"\x3e",amp:"\x26",AMP:"\x26",quot:'"',apos:"'",nbsp:"\u00a0"},M=/^#(\d+)$/,U=/^#x([0-9A-Fa-f]+)$/,I=/^[A-Za-z][A-za-z0-9]+$/,K="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):
+function X(d,e,c){return function(f,g){if(b.f[f]&b.c.UNSAFE)c&&L(c,f,a,a,a);else return{attribs:T(f,g,d,e,c)}}}function R(b,a){var d=[];r(a)(b,d);return d.join("")}var C,O;"undefined"!==typeof window&&(C=window.parseCssDeclarations,O=window.sanitizeCssProperty);var P={lt:"\x3c",LT:"\x3c",gt:"\x3e",GT:"\x3e",amp:"\x26",AMP:"\x26",quot:'"',apos:"'",nbsp:"\u00a0"},M=/^#(\d+)$/,U=/^#x([0-9A-Fa-f]+)$/,J=/^[A-Za-z][A-za-z0-9]+$/,K="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):
f,S=/\0/g,Z=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,ea=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,da=/&/g,V=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,Y=/[<]/g,aa=/>/g,W=/\"/g,Q=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,ga=3==="a,b".split(/(,)/).length,ca=b.c.CDATA|b.c.RCDATA,$={},fa={},ia=/^(?:https?|mailto|data)$/i,ba={};ba.pa=ba.escapeAttrib=k;ba.ra=ba.makeHtmlSanitizer=r;ba.sa=ba.makeSaxParser=m;ba.ta=ba.makeTagPolicy=X;ba.wa=ba.normalizeRCData=l;ba.xa=
ba.sanitize=function(b,a,d,e){return R(b,X(a,d,e))};ba.ya=ba.sanitizeAttribs=T;ba.za=ba.sanitizeWithPolicy=R;ba.Ba=ba.unescapeEntities=g;return ba}(t);g=b.sanitize;"undefined"!==typeof window&&(window.html=b,window.html_sanitize=g)})();!function(a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=a()}(function(){return function c(f,d,b){function e(k,n){if(!d[k]){if(!f[k]){var m="function"==typeof require&&require;if(!n&&m)return m(k,!0);if(g)return g(k,!0);m=Error("Cannot find module '"+k+"'");throw m.code="MODULE_NOT_FOUND",m;}m=d[k]={exports:{}};
f[k][0].call(m.exports,function(b){var d=f[k][1][b];return e(d?d:b)},m,m.exports,c,f,d,b)}return d[k].exports}for(var g="function"==typeof require&&require,k=0;k<b.length;k++)e(b[k]);return e}({1:[function(c,f,d){function b(d){if(!(this instanceof b))return new b(d);d=this.options=k.assign({level:s,method:u,chunkSize:16384,windowBits:15,memLevel:8,strategy:q,to:""},d||{});d.raw&&0<d.windowBits?d.windowBits=-d.windowBits:d.gzip&&0<d.windowBits&&16>d.windowBits&&(d.windowBits+=16);this.err=0;this.msg=
@@ -113,8 +113,8 @@ c?(d[k++]=192|c>>>6,d[k++]=128|63&c):65536>c?(d[k++]=224|c>>>12,d[k++]=128|c>>>6
2===k?31:3===k?15:7;1<k&&c<l;)g=g<<6|63&d[c++],k--;1<k?n[f++]=65533:65536>g?n[f++]=g:(g-=65536,n[f++]=55296|g>>10&1023,n[f++]=56320|1023&g)}return b(n,f)};d.utf8border=function(b,d){var e;d=d||b.length;d>b.length&&(d=b.length);for(e=d-1;0<=e&&128===(192&b[e]);)e--;return 0>e?d:0===e?d:e+m[b[e]]>d?e:d}},{"./common":3}],5:[function(c,f,d){f.exports=function(b,d,c,f){var l=65535&b|0;b=b>>>16&65535|0;for(var n=0;0!==c;){n=2E3<c?2E3:c;c-=n;do l=l+d[f++]|0,b=b+l|0;while(--n);l%=65521;b%=65521}return l|
b<<16|0}},{}],6:[function(c,f,d){f.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],7:[function(c,f,d){var b=function(){for(var b,d=[],c=0;256>c;c++){b=c;
for(var f=0;8>f;f++)b=1&b?3988292384^b>>>1:b>>>1;d[c]=b}return d}();f.exports=function(d,c,f,l){f=l+f;for(d^=-1;l<f;l++)d=d>>>8^b[255&(d^c[l])];return d^-1}},{}],8:[function(c,f,d){function b(b,d){return b.msg=D[d],d}function e(b){for(var d=b.length;0<=--d;)b[d]=0}function g(b){var d=b.state,e=d.pending;e>b.avail_out&&(e=b.avail_out);0!==e&&(x.arraySet(b.output,d.pending_buf,d.pending_out,e,b.next_out),b.next_out+=e,d.pending_out+=e,b.total_out+=e,b.avail_out-=e,d.pending-=e,0===d.pending&&(d.pending_out=
-0))}function k(b,d){E._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,d);b.block_start=b.strstart;g(b.strm)}function l(b,d){b.pending_buf[b.pending++]=d}function n(b,d){b.pending_buf[b.pending++]=d>>>8&255;b.pending_buf[b.pending++]=255&d}function m(b,d){var e,c,f=b.max_chain_length,g=b.strstart,k=b.prev_length,l=b.nice_match,n=b.strstart>b.w_size-Z?b.strstart-(b.w_size-Z):0,m=b.window,t=b.w_mask,u=b.prev,q=b.strstart+S,p=m[g+k-1],v=m[g+k];b.prev_length>=b.good_match&&
-(f>>=2);l>b.lookahead&&(l=b.lookahead);do if(e=d,m[e+k]===v&&m[e+k-1]===p&&m[e]===m[g]&&m[++e]===m[g+1]){g+=2;e++;do;while(m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&g<q);if(c=S-(q-g),g=q-S,c>k){if(b.match_start=d,k=c,c>=l)break;p=m[g+k-1];v=m[g+k]}}while((d=u[d&t])>n&&0!==--f);return k<=b.lookahead?k:b.lookahead}function p(b){var d,e,c,f,g=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=
+0))}function k(b,d){E._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,d);b.block_start=b.strstart;g(b.strm)}function l(b,d){b.pending_buf[b.pending++]=d}function n(b,d){b.pending_buf[b.pending++]=d>>>8&255;b.pending_buf[b.pending++]=255&d}function m(b,d){var e,c,f=b.max_chain_length,g=b.strstart,k=b.prev_length,l=b.nice_match,n=b.strstart>b.w_size-Z?b.strstart-(b.w_size-Z):0,m=b.window,t=b.w_mask,u=b.prev,q=b.strstart+S,v=m[g+k-1],p=m[g+k];b.prev_length>=b.good_match&&
+(f>>=2);l>b.lookahead&&(l=b.lookahead);do if(e=d,m[e+k]===p&&m[e+k-1]===v&&m[e]===m[g]&&m[++e]===m[g+1]){g+=2;e++;do;while(m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&g<q);if(c=S-(q-g),g=q-S,c>k){if(b.match_start=d,k=c,c>=l)break;v=m[g+k-1];p=m[g+k]}}while((d=u[d&t])>n&&0!==--f);return k<=b.lookahead?k:b.lookahead}function p(b){var d,e,c,f,g=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=
g+(g-Z)){x.arraySet(b.window,b.window,g,g,0);b.match_start-=g;b.strstart-=g;b.block_start-=g;d=e=b.hash_size;do c=b.head[--d],b.head[d]=c>=g?c-g:0;while(--e);d=e=g;do c=b.prev[--d],b.prev[d]=c>=g?c-g:0;while(--e);f+=g}if(0===b.strm.avail_in)break;d=b.strm;c=b.window;var k=b.strstart+b.lookahead,l=d.avail_in;if(e=(l>f&&(l=f),0===l?0:(d.avail_in-=l,x.arraySet(c,d.input,d.next_in,l,k),1===d.state.wrap?d.adler=A(d.adler,c,l,k):2===d.state.wrap&&(d.adler=B(d.adler,c,l,k)),d.next_in+=l,d.total_in+=l,l)),
b.lookahead+=e,b.lookahead+b.insert>=K){f=b.strstart-b.insert;b.ins_h=b.window[f];for(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+1])&b.hash_mask;b.insert&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+K-1])&b.hash_mask,b.prev[f&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=f,f++,b.insert--,!(b.lookahead+b.insert<K)););}}while(b.lookahead<Z&&0!==b.strm.avail_in)}function r(b,d){for(var e,c;;){if(b.lookahead<Z){if(p(b),b.lookahead<Z&&d===G)return V;if(0===b.lookahead)break}if(e=0,b.lookahead>=K&&(b.ins_h=(b.ins_h<<
b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,e=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),0!==e&&b.strstart-e<=b.w_size-Z&&(b.match_length=m(b,e)),b.match_length>=K)if(c=E._tr_tally(b,b.strstart-b.match_start,b.match_length-K),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=K){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,e=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=
@@ -123,13 +123,13 @@ b.lookahead<Z&&d===G)return V;if(0===b.lookahead)break}if(e=0,b.lookahead>=K&&(b
K&&b.match_length<=b.prev_length){f=b.strstart+b.lookahead-K;c=E._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-K);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,e=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart);while(0!==--b.prev_length);if(b.match_available=0,b.match_length=K-1,b.strstart++,c&&(k(b,!1),0===b.strm.avail_out))return V}else if(b.match_available){if(c=E._tr_tally(b,0,
b.window[b.strstart-1]),c&&k(b,!1),b.strstart++,b.lookahead--,0===b.strm.avail_out)return V}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(E._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<K-1?b.strstart:K-1,d===F?(k(b,!0),0===b.strm.avail_out?aa:W):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?V:Y}function q(b,d,e,c,f){this.good_length=b;this.max_lazy=d;this.nice_length=e;this.max_chain=c;this.func=f}function u(){this.strm=null;this.status=
0;this.pending_buf=null;this.wrap=this.pending=this.pending_out=this.pending_buf_size=0;this.gzhead=null;this.gzindex=0;this.method=R;this.last_flush=-1;this.w_mask=this.w_bits=this.w_size=0;this.window=null;this.window_size=0;this.head=this.prev=null;this.nice_match=this.good_match=this.strategy=this.level=this.max_lazy_match=this.max_chain_length=this.prev_length=this.lookahead=this.match_start=this.strstart=this.match_available=this.prev_match=this.match_length=this.block_start=this.hash_shift=
-this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new x.Buf16(2*U);this.dyn_dtree=new x.Buf16(2*(2*P+1));this.bl_tree=new x.Buf16(2*(2*M+1));e(this.dyn_ltree);e(this.dyn_dtree);e(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new x.Buf16(I+1);this.heap=new x.Buf16(2*O+1);e(this.heap);this.heap_max=this.heap_len=0;this.depth=new x.Buf16(2*O+1);e(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=
-this.lit_bufsize=this.l_buf=0}function t(d){var e;return d&&d.state?(d.total_in=d.total_out=0,d.data_type=X,e=d.state,e.pending=0,e.pending_out=0,0>e.wrap&&(e.wrap=-e.wrap),e.status=e.wrap?ea:da,d.adler=2===e.wrap?0:1,e.last_flush=G,E._tr_init(e),H):b(d,J)}function v(b){var d=t(b);d===H&&(b=b.state,b.window_size=2*b.w_size,e(b.head),b.max_lazy_match=y[b.level].max_lazy,b.good_match=y[b.level].good_length,b.nice_match=y[b.level].nice_length,b.max_chain_length=y[b.level].max_chain,b.strstart=0,b.block_start=
-0,b.lookahead=0,b.insert=0,b.match_length=b.prev_length=K-1,b.match_available=0,b.ins_h=0);return d}function z(d,e,c,f,g,k){if(!d)return J;var l=1;if(e===L&&(e=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>g||g>C||c!==R||8>f||15<f||0>e||9<e||0>k||k>T)return b(d,J);8===f&&(f=9);var n=new u;return d.state=n,n.strm=d,n.wrap=l,n.gzhead=null,n.w_bits=f,n.w_size=1<<n.w_bits,n.w_mask=n.w_size-1,n.hash_bits=g+7,n.hash_size=1<<n.hash_bits,n.hash_mask=n.hash_size-1,n.hash_shift=~~((n.hash_bits+K-1)/K),n.window=new x.Buf8(2*
-n.w_size),n.head=new x.Buf16(n.hash_size),n.prev=new x.Buf16(n.w_size),n.lit_bufsize=1<<g+6,n.pending_buf_size=4*n.lit_bufsize,n.pending_buf=new x.Buf8(n.pending_buf_size),n.d_buf=1*n.lit_bufsize,n.l_buf=3*n.lit_bufsize,n.level=e,n.strategy=k,n.method=c,v(d)}var y,x=c("../utils/common"),E=c("./trees"),A=c("./adler32"),B=c("./crc32"),D=c("./messages"),G=0,F=4,H=0,J=-2,L=-1,N=1,T=4,X=2,R=8,C=9,O=286,P=30,M=19,U=2*O+1,I=15,K=3,S=258,Z=S+K+1,ea=42,da=113,V=1,Y=2,aa=3,W=4;y=[new q(0,0,0,0,function(b,d){var e=
+this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new x.Buf16(2*U);this.dyn_dtree=new x.Buf16(2*(2*P+1));this.bl_tree=new x.Buf16(2*(2*M+1));e(this.dyn_ltree);e(this.dyn_dtree);e(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new x.Buf16(J+1);this.heap=new x.Buf16(2*O+1);e(this.heap);this.heap_max=this.heap_len=0;this.depth=new x.Buf16(2*O+1);e(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=
+this.lit_bufsize=this.l_buf=0}function t(d){var e;return d&&d.state?(d.total_in=d.total_out=0,d.data_type=X,e=d.state,e.pending=0,e.pending_out=0,0>e.wrap&&(e.wrap=-e.wrap),e.status=e.wrap?ea:da,d.adler=2===e.wrap?0:1,e.last_flush=G,E._tr_init(e),H):b(d,I)}function v(b){var d=t(b);d===H&&(b=b.state,b.window_size=2*b.w_size,e(b.head),b.max_lazy_match=y[b.level].max_lazy,b.good_match=y[b.level].good_length,b.nice_match=y[b.level].nice_length,b.max_chain_length=y[b.level].max_chain,b.strstart=0,b.block_start=
+0,b.lookahead=0,b.insert=0,b.match_length=b.prev_length=K-1,b.match_available=0,b.ins_h=0);return d}function z(d,e,c,f,g,k){if(!d)return I;var l=1;if(e===L&&(e=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>g||g>C||c!==R||8>f||15<f||0>e||9<e||0>k||k>T)return b(d,I);8===f&&(f=9);var n=new u;return d.state=n,n.strm=d,n.wrap=l,n.gzhead=null,n.w_bits=f,n.w_size=1<<n.w_bits,n.w_mask=n.w_size-1,n.hash_bits=g+7,n.hash_size=1<<n.hash_bits,n.hash_mask=n.hash_size-1,n.hash_shift=~~((n.hash_bits+K-1)/K),n.window=new x.Buf8(2*
+n.w_size),n.head=new x.Buf16(n.hash_size),n.prev=new x.Buf16(n.w_size),n.lit_bufsize=1<<g+6,n.pending_buf_size=4*n.lit_bufsize,n.pending_buf=new x.Buf8(n.pending_buf_size),n.d_buf=1*n.lit_bufsize,n.l_buf=3*n.lit_bufsize,n.level=e,n.strategy=k,n.method=c,v(d)}var y,x=c("../utils/common"),E=c("./trees"),A=c("./adler32"),B=c("./crc32"),D=c("./messages"),G=0,F=4,H=0,I=-2,L=-1,N=1,T=4,X=2,R=8,C=9,O=286,P=30,M=19,U=2*O+1,J=15,K=3,S=258,Z=S+K+1,ea=42,da=113,V=1,Y=2,aa=3,W=4;y=[new q(0,0,0,0,function(b,d){var e=
65535;for(e>b.pending_buf_size-5&&(e=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&d===G)return V;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var c=b.block_start+e;if((0===b.strstart||b.strstart>=c)&&(b.lookahead=b.strstart-c,b.strstart=c,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-Z&&(k(b,!1),0===b.strm.avail_out))return V}return b.insert=0,d===F?(k(b,!0),0===b.strm.avail_out?aa:W):(b.strstart>b.block_start&&k(b,!1),V)}),new q(4,4,8,
-4,r),new q(4,5,16,8,r),new q(4,6,32,32,r),new q(4,4,16,16,s),new q(8,16,32,32,s),new q(8,16,128,128,s),new q(8,32,128,256,s),new q(32,128,258,1024,s),new q(32,258,258,4096,s)];d.deflateInit=function(b,d){return z(b,d,R,15,8,0)};d.deflateInit2=z;d.deflateReset=v;d.deflateResetKeep=t;d.deflateSetHeader=function(b,d){return b&&b.state?2!==b.state.wrap?J:(b.state.gzhead=d,H):J};d.deflate=function(d,c){var f,m,t,u;if(!d||!d.state||5<c||0>c)return d?b(d,J):J;if(m=d.state,!d.output||!d.input&&0!==d.avail_in||
-666===m.status&&c!==F)return b(d,0===d.avail_out?-5:J);if(m.strm=d,f=m.last_flush,m.last_flush=c,m.status===ea)2===m.wrap?(d.adler=0,l(m,31),l(m,139),l(m,8),m.gzhead?(l(m,(m.gzhead.text?1:0)+(m.gzhead.hcrc?2:0)+(m.gzhead.extra?4:0)+(m.gzhead.name?8:0)+(m.gzhead.comment?16:0)),l(m,255&m.gzhead.time),l(m,m.gzhead.time>>8&255),l(m,m.gzhead.time>>16&255),l(m,m.gzhead.time>>24&255),l(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),l(m,255&m.gzhead.os),m.gzhead.extra&&m.gzhead.extra.length&&(l(m,255&m.gzhead.extra.length),
+4,r),new q(4,5,16,8,r),new q(4,6,32,32,r),new q(4,4,16,16,s),new q(8,16,32,32,s),new q(8,16,128,128,s),new q(8,32,128,256,s),new q(32,128,258,1024,s),new q(32,258,258,4096,s)];d.deflateInit=function(b,d){return z(b,d,R,15,8,0)};d.deflateInit2=z;d.deflateReset=v;d.deflateResetKeep=t;d.deflateSetHeader=function(b,d){return b&&b.state?2!==b.state.wrap?I:(b.state.gzhead=d,H):I};d.deflate=function(d,c){var f,m,t,u;if(!d||!d.state||5<c||0>c)return d?b(d,I):I;if(m=d.state,!d.output||!d.input&&0!==d.avail_in||
+666===m.status&&c!==F)return b(d,0===d.avail_out?-5:I);if(m.strm=d,f=m.last_flush,m.last_flush=c,m.status===ea)2===m.wrap?(d.adler=0,l(m,31),l(m,139),l(m,8),m.gzhead?(l(m,(m.gzhead.text?1:0)+(m.gzhead.hcrc?2:0)+(m.gzhead.extra?4:0)+(m.gzhead.name?8:0)+(m.gzhead.comment?16:0)),l(m,255&m.gzhead.time),l(m,m.gzhead.time>>8&255),l(m,m.gzhead.time>>16&255),l(m,m.gzhead.time>>24&255),l(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),l(m,255&m.gzhead.os),m.gzhead.extra&&m.gzhead.extra.length&&(l(m,255&m.gzhead.extra.length),
l(m,m.gzhead.extra.length>>8&255)),m.gzhead.hcrc&&(d.adler=B(d.adler,m.pending_buf,m.pending,0)),m.gzindex=0,m.status=69):(l(m,0),l(m,0),l(m,0),l(m,0),l(m,0),l(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),l(m,3),m.status=da)):(t=R+(m.w_bits-8<<4)<<8,u=-1,u=2<=m.strategy||2>m.level?0:6>m.level?1:6===m.level?2:3,t|=u<<6,0!==m.strstart&&(t|=32),m.status=da,n(m,t+(31-t%31)),0!==m.strstart&&(n(m,d.adler>>>16),n(m,65535&d.adler)),d.adler=1);if(69===m.status)if(m.gzhead.extra){for(t=m.pending;m.gzindex<
(65535&m.gzhead.extra.length)&&(m.pending!==m.pending_buf_size||(m.gzhead.hcrc&&m.pending>t&&(d.adler=B(d.adler,m.pending_buf,m.pending-t,t)),g(d),t=m.pending,m.pending!==m.pending_buf_size));)l(m,255&m.gzhead.extra[m.gzindex]),m.gzindex++;m.gzhead.hcrc&&m.pending>t&&(d.adler=B(d.adler,m.pending_buf,m.pending-t,t));m.gzindex===m.gzhead.extra.length&&(m.gzindex=0,m.status=73)}else m.status=73;if(73===m.status)if(m.gzhead.name){t=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>
t&&(d.adler=B(d.adler,m.pending_buf,m.pending-t,t)),g(d),t=m.pending,m.pending===m.pending_buf_size)){u=1;break}u=m.gzindex<m.gzhead.name.length?255&m.gzhead.name.charCodeAt(m.gzindex++):0;l(m,u)}while(0!==u);m.gzhead.hcrc&&m.pending>t&&(d.adler=B(d.adler,m.pending_buf,m.pending-t,t));0===u&&(m.gzindex=0,m.status=91)}else m.status=91;if(91===m.status)if(m.gzhead.comment){t=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>t&&(d.adler=B(d.adler,m.pending_buf,m.pending-t,t)),
@@ -138,48 +138,48 @@ g(d),t=m.pending,m.pending===m.pending_buf_size)){u=1;break}u=m.gzindex<m.gzhead
(k(m,!1),0===m.strm.avail_out)?V:Y)}else if(3===m.strategy)a:{var z,x;for(v=m.window;;){if(m.lookahead<=S){if(p(m),m.lookahead<=S&&c===G){q=V;break a}if(0===m.lookahead)break}if(m.match_length=0,m.lookahead>=K&&0<m.strstart&&(x=m.strstart-1,z=v[x],z===v[++x]&&z===v[++x]&&z===v[++x])){f=m.strstart+S;do;while(z===v[++x]&&z===v[++x]&&z===v[++x]&&z===v[++x]&&z===v[++x]&&z===v[++x]&&z===v[++x]&&z===v[++x]&&x<f);m.match_length=S-(f-x);m.match_length>m.lookahead&&(m.match_length=m.lookahead)}if(m.match_length>=
K?(q=E._tr_tally(m,1,m.match_length-K),m.lookahead-=m.match_length,m.strstart+=m.match_length,m.match_length=0):(q=E._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++),q&&(k(m,!1),0===m.strm.avail_out)){q=V;break a}}q=(m.insert=0,c===F?(k(m,!0),0===m.strm.avail_out?aa:W):m.last_lit&&(k(m,!1),0===m.strm.avail_out)?V:Y)}else q=y[m.level].func(m,c);if(q!==aa&&q!==W||(m.status=666),q===V||q===aa)return 0===d.avail_out&&(m.last_flush=-1),H;if(q===Y&&(1===c?E._tr_align(m):5!==c&&(E._tr_stored_block(m,
0,0,!1),3===c&&(e(m.head),0===m.lookahead&&(m.strstart=0,m.block_start=0,m.insert=0))),g(d),0===d.avail_out))return m.last_flush=-1,H}return c!==F?H:0>=m.wrap?1:(2===m.wrap?(l(m,255&d.adler),l(m,d.adler>>8&255),l(m,d.adler>>16&255),l(m,d.adler>>24&255),l(m,255&d.total_in),l(m,d.total_in>>8&255),l(m,d.total_in>>16&255),l(m,d.total_in>>24&255)):(n(m,d.adler>>>16),n(m,65535&d.adler)),g(d),0<m.wrap&&(m.wrap=-m.wrap),0!==m.pending?H:1)};d.deflateEnd=function(d){var e;return d&&d.state?(e=d.state.status,
-e!==ea&&69!==e&&73!==e&&91!==e&&103!==e&&e!==da&&666!==e?b(d,J):(d.state=null,e===da?b(d,-3):H)):J};d.deflateSetDictionary=function(b,d){var c,f,g,k,l,n,m;f=d.length;if(!b||!b.state||(c=b.state,k=c.wrap,2===k||1===k&&c.status!==ea||c.lookahead))return J;1===k&&(b.adler=A(b.adler,d,f,0));c.wrap=0;f>=c.w_size&&(0===k&&(e(c.head),c.strstart=0,c.block_start=0,c.insert=0),l=new x.Buf8(c.w_size),x.arraySet(l,d,f-c.w_size,c.w_size,0),d=l,f=c.w_size);l=b.avail_in;n=b.next_in;m=b.input;b.avail_in=f;b.next_in=
+e!==ea&&69!==e&&73!==e&&91!==e&&103!==e&&e!==da&&666!==e?b(d,I):(d.state=null,e===da?b(d,-3):H)):I};d.deflateSetDictionary=function(b,d){var c,f,g,k,l,n,m;f=d.length;if(!b||!b.state||(c=b.state,k=c.wrap,2===k||1===k&&c.status!==ea||c.lookahead))return I;1===k&&(b.adler=A(b.adler,d,f,0));c.wrap=0;f>=c.w_size&&(0===k&&(e(c.head),c.strstart=0,c.block_start=0,c.insert=0),l=new x.Buf8(c.w_size),x.arraySet(l,d,f-c.w_size,c.w_size,0),d=l,f=c.w_size);l=b.avail_in;n=b.next_in;m=b.input;b.avail_in=f;b.next_in=
0;b.input=d;for(p(c);c.lookahead>=K;){f=c.strstart;g=c.lookahead-(K-1);do c.ins_h=(c.ins_h<<c.hash_shift^c.window[f+K-1])&c.hash_mask,c.prev[f&c.w_mask]=c.head[c.ins_h],c.head[c.ins_h]=f,f++;while(--g);c.strstart=f;c.lookahead=K-1;p(c)}return c.strstart+=c.lookahead,c.block_start=c.strstart,c.insert=c.lookahead,c.lookahead=0,c.match_length=c.prev_length=K-1,c.match_available=0,b.next_in=n,b.input=m,b.avail_in=l,c.wrap=k,H};d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,
-"./crc32":7,"./messages":13,"./trees":14}],9:[function(c,f,d){f.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},{}],10:[function(c,f,d){f.exports=function(b,d){var c,f,l,n,m,p,r,s,q,u,t,v,z,y,x,E,A,B,D,G,F,H,J,L;c=b.state;f=b.next_in;J=b.input;l=f+(b.avail_in-5);n=b.next_out;L=b.output;m=n-(d-b.avail_out);p=n+(b.avail_out-257);r=c.dmax;s=c.wsize;q=c.whave;u=c.wnext;t=c.window;v=c.hold;z=c.bits;y=c.lencode;
-x=c.distcode;E=(1<<c.lenbits)-1;A=(1<<c.distbits)-1;a:do{15>z&&(v+=J[f++]<<z,z+=8,v+=J[f++]<<z,z+=8);B=y[v&E];b:for(;;){if(D=B>>>24,v>>>=D,z-=D,D=B>>>16&255,0===D)L[n++]=65535&B;else{if(!(16&D)){if(0===(64&D)){B=y[(65535&B)+(v&(1<<D)-1)];continue b}if(32&D){c.mode=12;break a}b.msg="invalid literal/length code";c.mode=30;break a}G=65535&B;(D&=15)&&(z<D&&(v+=J[f++]<<z,z+=8),G+=v&(1<<D)-1,v>>>=D,z-=D);15>z&&(v+=J[f++]<<z,z+=8,v+=J[f++]<<z,z+=8);B=x[v&A];c:for(;;){if(D=B>>>24,v>>>=D,z-=D,D=B>>>16&255,
-!(16&D)){if(0===(64&D)){B=x[(65535&B)+(v&(1<<D)-1)];continue c}b.msg="invalid distance code";c.mode=30;break a}if(F=65535&B,D&=15,z<D&&(v+=J[f++]<<z,z+=8,z<D&&(v+=J[f++]<<z,z+=8)),F+=v&(1<<D)-1,F>r){b.msg="invalid distance too far back";c.mode=30;break a}if(v>>>=D,z-=D,D=n-m,F>D){if(D=F-D,D>q&&c.sane){b.msg="invalid distance too far back";c.mode=30;break a}if(B=0,H=t,0===u){if(B+=s-D,D<G){G-=D;do L[n++]=t[B++];while(--D);B=n-F;H=L}}else if(u<D){if(B+=s+u-D,D-=u,D<G){G-=D;do L[n++]=t[B++];while(--D);
+"./crc32":7,"./messages":13,"./trees":14}],9:[function(c,f,d){f.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},{}],10:[function(c,f,d){f.exports=function(b,d){var c,f,l,n,m,p,r,s,q,u,t,v,z,y,x,E,A,B,D,G,F,H,I,L;c=b.state;f=b.next_in;I=b.input;l=f+(b.avail_in-5);n=b.next_out;L=b.output;m=n-(d-b.avail_out);p=n+(b.avail_out-257);r=c.dmax;s=c.wsize;q=c.whave;u=c.wnext;t=c.window;v=c.hold;z=c.bits;y=c.lencode;
+x=c.distcode;E=(1<<c.lenbits)-1;A=(1<<c.distbits)-1;a:do{15>z&&(v+=I[f++]<<z,z+=8,v+=I[f++]<<z,z+=8);B=y[v&E];b:for(;;){if(D=B>>>24,v>>>=D,z-=D,D=B>>>16&255,0===D)L[n++]=65535&B;else{if(!(16&D)){if(0===(64&D)){B=y[(65535&B)+(v&(1<<D)-1)];continue b}if(32&D){c.mode=12;break a}b.msg="invalid literal/length code";c.mode=30;break a}G=65535&B;(D&=15)&&(z<D&&(v+=I[f++]<<z,z+=8),G+=v&(1<<D)-1,v>>>=D,z-=D);15>z&&(v+=I[f++]<<z,z+=8,v+=I[f++]<<z,z+=8);B=x[v&A];c:for(;;){if(D=B>>>24,v>>>=D,z-=D,D=B>>>16&255,
+!(16&D)){if(0===(64&D)){B=x[(65535&B)+(v&(1<<D)-1)];continue c}b.msg="invalid distance code";c.mode=30;break a}if(F=65535&B,D&=15,z<D&&(v+=I[f++]<<z,z+=8,z<D&&(v+=I[f++]<<z,z+=8)),F+=v&(1<<D)-1,F>r){b.msg="invalid distance too far back";c.mode=30;break a}if(v>>>=D,z-=D,D=n-m,F>D){if(D=F-D,D>q&&c.sane){b.msg="invalid distance too far back";c.mode=30;break a}if(B=0,H=t,0===u){if(B+=s-D,D<G){G-=D;do L[n++]=t[B++];while(--D);B=n-F;H=L}}else if(u<D){if(B+=s+u-D,D-=u,D<G){G-=D;do L[n++]=t[B++];while(--D);
if(B=0,u<G){D=u;G-=D;do L[n++]=t[B++];while(--D);B=n-F;H=L}}}else if(B+=u-D,D<G){G-=D;do L[n++]=t[B++];while(--D);B=n-F;H=L}for(;2<G;)L[n++]=H[B++],L[n++]=H[B++],L[n++]=H[B++],G-=3;G&&(L[n++]=H[B++],1<G&&(L[n++]=H[B++]))}else{B=n-F;do L[n++]=L[B++],L[n++]=L[B++],L[n++]=L[B++],G-=3;while(2<G);G&&(L[n++]=L[B++],1<G&&(L[n++]=L[B++]))}break}}break}}while(f<l&&n<p);G=z>>3;f-=G;z-=G<<3;b.next_in=f;b.next_out=n;b.avail_in=f<l?5+(l-f):5-(f-l);b.avail_out=n<p?257+(p-n):257-(n-p);c.hold=v&(1<<z)-1;c.bits=z}},
{}],11:[function(c,f,d){function b(b){return(b>>>24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function e(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new s.Buf16(320);this.work=
new s.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function g(b){var d;return b&&b.state?(d=b.state,b.total_in=b.total_out=d.total=0,b.msg="",d.wrap&&(b.adler=1&d.wrap),d.mode=x,d.last=0,d.havedict=0,d.dmax=32768,d.head=null,d.hold=0,d.bits=0,d.lencode=d.lendyn=new s.Buf32(E),d.distcode=d.distdyn=new s.Buf32(A),d.sane=1,d.back=-1,z):y}function k(b){var d;return b&&b.state?(d=b.state,d.wsize=0,d.whave=0,d.wnext=0,g(b)):y}function l(b,d){var e,c;return b&&b.state?(c=b.state,
0>d?(e=0,d=-d):(e=(d>>4)+1,48>d&&(d&=15)),d&&(8>d||15<d)?y:(null!==c.window&&c.wbits!==d&&(c.window=null),c.wrap=e,c.wbits=d,k(b))):y}function n(b,d){var c,f;return b?(f=new e,b.state=f,f.window=null,c=l(b,d),c!==z&&(b.state=null),c):y}function m(b,d,e,c){var f;b=b.state;return null===b.window&&(b.wsize=1<<b.wbits,b.wnext=0,b.whave=0,b.window=new s.Buf8(b.wsize)),c>=b.wsize?(s.arraySet(b.window,d,e-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>c&&(f=c),s.arraySet(b.window,d,e-
-c,f,b.wnext),c-=f,c?(s.arraySet(b.window,d,e-c,c,0),b.wnext=c,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whave<b.wsize&&(b.whave+=f))),0}var p,r,s=c("../utils/common"),q=c("./adler32"),u=c("./crc32"),t=c("./inffast"),v=c("./inftrees"),z=0,y=-2,x=1,E=852,A=592,B=!0;d.inflateReset=k;d.inflateReset2=l;d.inflateResetKeep=g;d.inflateInit=function(b){return n(b,15)};d.inflateInit2=n;d.inflate=function(d,e){var c,f,g,k,l,n,E,A,C,O,P,M,U,I,K,S,Z,ea,da,V,Y,aa,W=0,Q=new s.Buf8(4),ga=[16,
+c,f,b.wnext),c-=f,c?(s.arraySet(b.window,d,e-c,c,0),b.wnext=c,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whave<b.wsize&&(b.whave+=f))),0}var p,r,s=c("../utils/common"),q=c("./adler32"),u=c("./crc32"),t=c("./inffast"),v=c("./inftrees"),z=0,y=-2,x=1,E=852,A=592,B=!0;d.inflateReset=k;d.inflateReset2=l;d.inflateResetKeep=g;d.inflateInit=function(b){return n(b,15)};d.inflateInit2=n;d.inflate=function(d,e){var c,f,g,k,l,n,E,A,C,O,P,M,U,J,K,S,Z,ea,da,V,Y,aa,W=0,Q=new s.Buf8(4),ga=[16,
17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!d||!d.state||!d.output||!d.input&&0!==d.avail_in)return y;c=d.state;12===c.mode&&(c.mode=13);l=d.next_out;g=d.output;E=d.avail_out;k=d.next_in;f=d.input;n=d.avail_in;A=c.hold;C=c.bits;O=n;P=E;Y=z;a:for(;;)switch(c.mode){case x:if(0===c.wrap){c.mode=13;break}for(;16>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(2&c.wrap&&35615===A){c.check=0;Q[0]=255&A;Q[1]=A>>>8&255;c.check=u(c.check,Q,2,0);C=A=0;c.mode=2;break}if(c.flags=0,c.head&&(c.head.done=!1),
!(1&c.wrap)||(((255&A)<<8)+(A>>8))%31){d.msg="incorrect header check";c.mode=30;break}if(8!==(15&A)){d.msg="unknown compression method";c.mode=30;break}if(A>>>=4,C-=4,V=(15&A)+8,0===c.wbits)c.wbits=V;else if(V>c.wbits){d.msg="invalid window size";c.mode=30;break}c.dmax=1<<V;d.adler=c.check=1;c.mode=512&A?10:12;C=A=0;break;case 2:for(;16>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(c.flags=A,8!==(255&c.flags)){d.msg="unknown compression method";c.mode=30;break}if(57344&c.flags){d.msg="unknown header flags set";
c.mode=30;break}c.head&&(c.head.text=A>>8&1);512&c.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,c.check=u(c.check,Q,2,0));C=A=0;c.mode=3;case 3:for(;32>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}c.head&&(c.head.time=A);512&c.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,Q[2]=A>>>16&255,Q[3]=A>>>24&255,c.check=u(c.check,Q,4,0));C=A=0;c.mode=4;case 4:for(;16>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}c.head&&(c.head.xflags=255&A,c.head.os=A>>8);512&c.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,c.check=u(c.check,Q,2,0));C=A=0;c.mode=
5;case 5:if(1024&c.flags){for(;16>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}c.length=A;c.head&&(c.head.extra_len=A);512&c.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,c.check=u(c.check,Q,2,0));C=A=0}else c.head&&(c.head.extra=null);c.mode=6;case 6:if(1024&c.flags&&(M=c.length,M>n&&(M=n),M&&(c.head&&(V=c.head.extra_len-c.length,c.head.extra||(c.head.extra=Array(c.head.extra_len)),s.arraySet(c.head.extra,f,k,M,V)),512&c.flags&&(c.check=u(c.check,f,M,k)),n-=M,k+=M,c.length-=M),c.length))break a;c.length=0;c.mode=
7;case 7:if(2048&c.flags){if(0===n)break a;M=0;do V=f[k+M++],c.head&&V&&65536>c.length&&(c.head.name+=String.fromCharCode(V));while(V&&M<n);if(512&c.flags&&(c.check=u(c.check,f,M,k)),n-=M,k+=M,V)break a}else c.head&&(c.head.name=null);c.length=0;c.mode=8;case 8:if(4096&c.flags){if(0===n)break a;M=0;do V=f[k+M++],c.head&&V&&65536>c.length&&(c.head.comment+=String.fromCharCode(V));while(V&&M<n);if(512&c.flags&&(c.check=u(c.check,f,M,k)),n-=M,k+=M,V)break a}else c.head&&(c.head.comment=null);c.mode=
9;case 9:if(512&c.flags){for(;16>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(A!==(65535&c.check)){d.msg="header crc mismatch";c.mode=30;break}C=A=0}c.head&&(c.head.hcrc=c.flags>>9&1,c.head.done=!0);d.adler=c.check=0;c.mode=12;break;case 10:for(;32>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}d.adler=c.check=b(A);C=A=0;c.mode=11;case 11:if(0===c.havedict)return d.next_out=l,d.avail_out=E,d.next_in=k,d.avail_in=n,c.hold=A,c.bits=C,2;d.adler=c.check=1;c.mode=12;case 12:if(5===e||6===e)break a;case 13:if(c.last){A>>>=
-7&C;C-=7&C;c.mode=27;break}for(;3>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}switch(c.last=1&A,A>>>=1,C-=1,3&A){case 0:c.mode=14;break;case 1:I=c;if(B){S=void 0;p=new s.Buf32(512);r=new s.Buf32(32);for(S=0;144>S;)I.lens[S++]=8;for(;256>S;)I.lens[S++]=9;for(;280>S;)I.lens[S++]=7;for(;288>S;)I.lens[S++]=8;v(1,I.lens,0,288,p,0,I.work,{bits:9});for(S=0;32>S;)I.lens[S++]=5;v(2,I.lens,0,32,r,0,I.work,{bits:5});B=!1}I.lencode=p;I.lenbits=9;I.distcode=r;I.distbits=5;if(c.mode=20,6===e){A>>>=2;C-=2;break a}break;
+7&C;C-=7&C;c.mode=27;break}for(;3>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}switch(c.last=1&A,A>>>=1,C-=1,3&A){case 0:c.mode=14;break;case 1:J=c;if(B){S=void 0;p=new s.Buf32(512);r=new s.Buf32(32);for(S=0;144>S;)J.lens[S++]=8;for(;256>S;)J.lens[S++]=9;for(;280>S;)J.lens[S++]=7;for(;288>S;)J.lens[S++]=8;v(1,J.lens,0,288,p,0,J.work,{bits:9});for(S=0;32>S;)J.lens[S++]=5;v(2,J.lens,0,32,r,0,J.work,{bits:5});B=!1}J.lencode=p;J.lenbits=9;J.distcode=r;J.distbits=5;if(c.mode=20,6===e){A>>>=2;C-=2;break a}break;
case 2:c.mode=17;break;case 3:d.msg="invalid block type",c.mode=30}A>>>=2;C-=2;break;case 14:A>>>=7&C;for(C-=7&C;32>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if((65535&A)!==(A>>>16^65535)){d.msg="invalid stored block lengths";c.mode=30;break}if(c.length=65535&A,A=0,C=0,c.mode=15,6===e)break a;case 15:c.mode=16;case 16:if(M=c.length){if(M>n&&(M=n),M>E&&(M=E),0===M)break a;s.arraySet(g,f,k,M,l);n-=M;k+=M;E-=M;l+=M;c.length-=M;break}c.mode=12;break;case 17:for(;14>C;){if(0===n)break a;n--;A+=f[k++]<<
C;C+=8}if(c.nlen=(31&A)+257,A>>>=5,C-=5,c.ndist=(31&A)+1,A>>>=5,C-=5,c.ncode=(15&A)+4,A>>>=4,C-=4,286<c.nlen||30<c.ndist){d.msg="too many length or distance symbols";c.mode=30;break}c.have=0;c.mode=18;case 18:for(;c.have<c.ncode;){for(;3>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}c.lens[ga[c.have++]]=7&A;A>>>=3;C-=3}for(;19>c.have;)c.lens[ga[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,aa={bits:c.lenbits},Y=v(0,c.lens,0,19,c.lencode,0,c.work,aa),c.lenbits=aa.bits,Y){d.msg="invalid code lengths set";
-c.mode=30;break}c.have=0;c.mode=19;case 19:for(;c.have<c.nlen+c.ndist;){for(;W=c.lencode[A&(1<<c.lenbits)-1],K=W>>>24,S=65535&W,!(K<=C);){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(16>S)A>>>=K,C-=K,c.lens[c.have++]=S;else{if(16===S){for(I=K+2;C<I;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(A>>>=K,C-=K,0===c.have){d.msg="invalid bit length repeat";c.mode=30;break}V=c.lens[c.have-1];M=3+(3&A);A>>>=2;C-=2}else if(17===S){for(I=K+3;C<I;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}A>>>=K;C-=K;V=0;M=3+(7&A);
-A>>>=3;C-=3}else{for(I=K+7;C<I;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}A>>>=K;C-=K;V=0;M=11+(127&A);A>>>=7;C-=7}if(c.have+M>c.nlen+c.ndist){d.msg="invalid bit length repeat";c.mode=30;break}for(;M--;)c.lens[c.have++]=V}}if(30===c.mode)break;if(0===c.lens[256]){d.msg="invalid code -- missing end-of-block";c.mode=30;break}if(c.lenbits=9,aa={bits:c.lenbits},Y=v(1,c.lens,0,c.nlen,c.lencode,0,c.work,aa),c.lenbits=aa.bits,Y){d.msg="invalid literal/lengths set";c.mode=30;break}if(c.distbits=6,c.distcode=
-c.distdyn,aa={bits:c.distbits},Y=v(2,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,aa),c.distbits=aa.bits,Y){d.msg="invalid distances set";c.mode=30;break}if(c.mode=20,6===e)break a;case 20:c.mode=21;case 21:if(6<=n&&258<=E){d.next_out=l;d.avail_out=E;d.next_in=k;d.avail_in=n;c.hold=A;c.bits=C;t(d,P);l=d.next_out;g=d.output;E=d.avail_out;k=d.next_in;f=d.input;n=d.avail_in;A=c.hold;C=c.bits;12===c.mode&&(c.back=-1);break}for(c.back=0;W=c.lencode[A&(1<<c.lenbits)-1],K=W>>>24,I=W>>>16&255,S=65535&W,!(K<=
-C);){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(I&&0===(240&I)){Z=K;ea=I;for(da=S;W=c.lencode[da+((A&(1<<Z+ea)-1)>>Z)],K=W>>>24,I=W>>>16&255,S=65535&W,!(Z+K<=C);){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}A>>>=Z;C-=Z;c.back+=Z}if(A>>>=K,C-=K,c.back+=K,c.length=S,0===I){c.mode=26;break}if(32&I){c.back=-1;c.mode=12;break}if(64&I){d.msg="invalid literal/length code";c.mode=30;break}c.extra=15&I;c.mode=22;case 22:if(c.extra){for(I=c.extra;C<I;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}c.length+=A&(1<<c.extra)-
-1;A>>>=c.extra;C-=c.extra;c.back+=c.extra}c.was=c.length;c.mode=23;case 23:for(;W=c.distcode[A&(1<<c.distbits)-1],K=W>>>24,I=W>>>16&255,S=65535&W,!(K<=C);){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(0===(240&I)){Z=K;ea=I;for(da=S;W=c.distcode[da+((A&(1<<Z+ea)-1)>>Z)],K=W>>>24,I=W>>>16&255,S=65535&W,!(Z+K<=C);){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}A>>>=Z;C-=Z;c.back+=Z}if(A>>>=K,C-=K,c.back+=K,64&I){d.msg="invalid distance code";c.mode=30;break}c.offset=S;c.extra=15&I;c.mode=24;case 24:if(c.extra){for(I=
-c.extra;C<I;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}c.offset+=A&(1<<c.extra)-1;A>>>=c.extra;C-=c.extra;c.back+=c.extra}if(c.offset>c.dmax){d.msg="invalid distance too far back";c.mode=30;break}c.mode=25;case 25:if(0===E)break a;if(M=P-E,c.offset>M){if(M=c.offset-M,M>c.whave&&c.sane){d.msg="invalid distance too far back";c.mode=30;break}M>c.wnext?(M-=c.wnext,U=c.wsize-M):U=c.wnext-M;M>c.length&&(M=c.length);I=c.window}else I=g,U=l-c.offset,M=c.length;M>E&&(M=E);E-=M;c.length-=M;do g[l++]=I[U++];while(--M);
+c.mode=30;break}c.have=0;c.mode=19;case 19:for(;c.have<c.nlen+c.ndist;){for(;W=c.lencode[A&(1<<c.lenbits)-1],K=W>>>24,S=65535&W,!(K<=C);){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(16>S)A>>>=K,C-=K,c.lens[c.have++]=S;else{if(16===S){for(J=K+2;C<J;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(A>>>=K,C-=K,0===c.have){d.msg="invalid bit length repeat";c.mode=30;break}V=c.lens[c.have-1];M=3+(3&A);A>>>=2;C-=2}else if(17===S){for(J=K+3;C<J;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}A>>>=K;C-=K;V=0;M=3+(7&A);
+A>>>=3;C-=3}else{for(J=K+7;C<J;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}A>>>=K;C-=K;V=0;M=11+(127&A);A>>>=7;C-=7}if(c.have+M>c.nlen+c.ndist){d.msg="invalid bit length repeat";c.mode=30;break}for(;M--;)c.lens[c.have++]=V}}if(30===c.mode)break;if(0===c.lens[256]){d.msg="invalid code -- missing end-of-block";c.mode=30;break}if(c.lenbits=9,aa={bits:c.lenbits},Y=v(1,c.lens,0,c.nlen,c.lencode,0,c.work,aa),c.lenbits=aa.bits,Y){d.msg="invalid literal/lengths set";c.mode=30;break}if(c.distbits=6,c.distcode=
+c.distdyn,aa={bits:c.distbits},Y=v(2,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,aa),c.distbits=aa.bits,Y){d.msg="invalid distances set";c.mode=30;break}if(c.mode=20,6===e)break a;case 20:c.mode=21;case 21:if(6<=n&&258<=E){d.next_out=l;d.avail_out=E;d.next_in=k;d.avail_in=n;c.hold=A;c.bits=C;t(d,P);l=d.next_out;g=d.output;E=d.avail_out;k=d.next_in;f=d.input;n=d.avail_in;A=c.hold;C=c.bits;12===c.mode&&(c.back=-1);break}for(c.back=0;W=c.lencode[A&(1<<c.lenbits)-1],K=W>>>24,J=W>>>16&255,S=65535&W,!(K<=
+C);){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(J&&0===(240&J)){Z=K;ea=J;for(da=S;W=c.lencode[da+((A&(1<<Z+ea)-1)>>Z)],K=W>>>24,J=W>>>16&255,S=65535&W,!(Z+K<=C);){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}A>>>=Z;C-=Z;c.back+=Z}if(A>>>=K,C-=K,c.back+=K,c.length=S,0===J){c.mode=26;break}if(32&J){c.back=-1;c.mode=12;break}if(64&J){d.msg="invalid literal/length code";c.mode=30;break}c.extra=15&J;c.mode=22;case 22:if(c.extra){for(J=c.extra;C<J;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}c.length+=A&(1<<c.extra)-
+1;A>>>=c.extra;C-=c.extra;c.back+=c.extra}c.was=c.length;c.mode=23;case 23:for(;W=c.distcode[A&(1<<c.distbits)-1],K=W>>>24,J=W>>>16&255,S=65535&W,!(K<=C);){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(0===(240&J)){Z=K;ea=J;for(da=S;W=c.distcode[da+((A&(1<<Z+ea)-1)>>Z)],K=W>>>24,J=W>>>16&255,S=65535&W,!(Z+K<=C);){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}A>>>=Z;C-=Z;c.back+=Z}if(A>>>=K,C-=K,c.back+=K,64&J){d.msg="invalid distance code";c.mode=30;break}c.offset=S;c.extra=15&J;c.mode=24;case 24:if(c.extra){for(J=
+c.extra;C<J;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}c.offset+=A&(1<<c.extra)-1;A>>>=c.extra;C-=c.extra;c.back+=c.extra}if(c.offset>c.dmax){d.msg="invalid distance too far back";c.mode=30;break}c.mode=25;case 25:if(0===E)break a;if(M=P-E,c.offset>M){if(M=c.offset-M,M>c.whave&&c.sane){d.msg="invalid distance too far back";c.mode=30;break}M>c.wnext?(M-=c.wnext,U=c.wsize-M):U=c.wnext-M;M>c.length&&(M=c.length);J=c.window}else J=g,U=l-c.offset,M=c.length;M>E&&(M=E);E-=M;c.length-=M;do g[l++]=J[U++];while(--M);
0===c.length&&(c.mode=21);break;case 26:if(0===E)break a;g[l++]=c.length;E--;c.mode=21;break;case 27:if(c.wrap){for(;32>C;){if(0===n)break a;n--;A|=f[k++]<<C;C+=8}if(P-=E,d.total_out+=P,c.total+=P,P&&(d.adler=c.check=c.flags?u(c.check,g,P,l-P):q(c.check,g,P,l-P)),P=E,(c.flags?A:b(A))!==c.check){d.msg="incorrect data check";c.mode=30;break}C=A=0}c.mode=28;case 28:if(c.wrap&&c.flags){for(;32>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(A!==(4294967295&c.total)){d.msg="incorrect length check";c.mode=
30;break}C=A=0}c.mode=29;case 29:Y=1;break a;case 30:Y=-3;break a;case 31:return-4;default:return y}return d.next_out=l,d.avail_out=E,d.next_in=k,d.avail_in=n,c.hold=A,c.bits=C,(c.wsize||P!==d.avail_out&&30>c.mode&&(27>c.mode||4!==e))&&m(d,d.output,d.next_out,P-d.avail_out)?(c.mode=31,-4):(O-=d.avail_in,P-=d.avail_out,d.total_in+=O,d.total_out+=P,c.total+=P,c.wrap&&P&&(d.adler=c.check=c.flags?u(c.check,g,P,d.next_out-P):q(c.check,g,P,d.next_out-P)),d.data_type=c.bits+(c.last?64:0)+(12===c.mode?128:
0)+(20===c.mode||15===c.mode?256:0),(0===O&&0===P||4===e)&&Y===z&&(Y=-5),Y)};d.inflateEnd=function(b){if(!b||!b.state)return y;var d=b.state;return d.window&&(d.window=null),b.state=null,z};d.inflateGetHeader=function(b,d){var e;return b&&b.state?(e=b.state,0===(2&e.wrap)?y:(e.head=d,d.done=!1,z)):y};d.inflateSetDictionary=function(b,d){var e,c,f=d.length;return b&&b.state?(e=b.state,0!==e.wrap&&11!==e.mode?y:11===e.mode&&(c=1,c=q(c,d,f,0),c!==e.check)?-3:m(b,d,f,f)?(e.mode=31,-4):(e.havedict=1,z)):
y};d.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(c,f,d){var b=c("../utils/common"),e=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],k=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],l=[16,16,
-16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];f.exports=function(d,c,f,r,s,q,u,t){var v,z,y,x,E,A,B,D;x=t.bits;for(var G=0,F=0,H=0,J=0,L=0,N=0,T=0,X=v=0,R=0,C=null,O=0,P=new b.Buf16(16),N=new b.Buf16(16),M=null,U=0,G=0;15>=G;G++)P[G]=0;for(F=0;F<r;F++)P[c[f+F]]++;L=x;for(J=15;1<=J&&0===P[J];J--);if(L>J&&(L=J),0===J)return s[q++]=20971520,s[q++]=20971520,t.bits=1,0;for(H=1;H<J&&0===P[H];H++);L<H&&(L=H);for(G=v=1;15>=G;G++)if(v<<=1,v-=P[G],0>v)return-1;if(0<
-v&&(0===d||1!==J))return-1;N[1]=0;for(G=1;15>G;G++)N[G+1]=N[G]+P[G];for(F=0;F<r;F++)0!==c[f+F]&&(u[N[c[f+F]]++]=F);if(0===d?(C=M=u,E=19):1===d?(C=e,O-=257,M=g,U-=257,E=256):(C=k,M=l,E=-1),R=0,F=0,G=H,x=q,N=L,T=0,y=-1,X=1<<L,r=X-1,1===d&&852<X||2===d&&592<X)return 1;for(var I=0;;){I++;A=G-T;u[F]<E?(B=0,D=u[F]):u[F]>E?(B=M[U+u[F]],D=C[O+u[F]]):(B=96,D=0);v=1<<G-T;H=z=1<<N;do z-=v,s[x+(R>>T)+z]=A<<24|B<<16|D|0;while(0!==z);for(v=1<<G-1;R&v;)v>>=1;if(0!==v?(R&=v-1,R+=v):R=0,F++,0===--P[G]){if(G===J)break;
-G=c[f+u[F]]}if(G>L&&(R&r)!==y){0===T&&(T=L);x+=H;N=G-T;for(v=1<<N;N+T<J&&(v-=P[N+T],!(0>=v));)N++,v<<=1;if(X+=1<<N,1===d&&852<X||2===d&&592<X)return 1;y=R&r;s[y]=L<<24|N<<16|x-q|0}}return 0!==R&&(s[x+R]=G-T<<24|4194304),t.bits=L,0}},{"../utils/common":3}],13:[function(c,f,d){f.exports={2:"need dictionary",1:"stream end","0":"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(c,f,d){function b(b){for(var d=
+16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];f.exports=function(d,c,f,r,s,q,u,t){var v,z,y,x,E,A,B,D;x=t.bits;for(var G=0,F=0,H=0,I=0,L=0,N=0,T=0,X=v=0,R=0,C=null,O=0,P=new b.Buf16(16),N=new b.Buf16(16),M=null,U=0,G=0;15>=G;G++)P[G]=0;for(F=0;F<r;F++)P[c[f+F]]++;L=x;for(I=15;1<=I&&0===P[I];I--);if(L>I&&(L=I),0===I)return s[q++]=20971520,s[q++]=20971520,t.bits=1,0;for(H=1;H<I&&0===P[H];H++);L<H&&(L=H);for(G=v=1;15>=G;G++)if(v<<=1,v-=P[G],0>v)return-1;if(0<
+v&&(0===d||1!==I))return-1;N[1]=0;for(G=1;15>G;G++)N[G+1]=N[G]+P[G];for(F=0;F<r;F++)0!==c[f+F]&&(u[N[c[f+F]]++]=F);if(0===d?(C=M=u,E=19):1===d?(C=e,O-=257,M=g,U-=257,E=256):(C=k,M=l,E=-1),R=0,F=0,G=H,x=q,N=L,T=0,y=-1,X=1<<L,r=X-1,1===d&&852<X||2===d&&592<X)return 1;for(var J=0;;){J++;A=G-T;u[F]<E?(B=0,D=u[F]):u[F]>E?(B=M[U+u[F]],D=C[O+u[F]]):(B=96,D=0);v=1<<G-T;H=z=1<<N;do z-=v,s[x+(R>>T)+z]=A<<24|B<<16|D|0;while(0!==z);for(v=1<<G-1;R&v;)v>>=1;if(0!==v?(R&=v-1,R+=v):R=0,F++,0===--P[G]){if(G===I)break;
+G=c[f+u[F]]}if(G>L&&(R&r)!==y){0===T&&(T=L);x+=H;N=G-T;for(v=1<<N;N+T<I&&(v-=P[N+T],!(0>=v));)N++,v<<=1;if(X+=1<<N,1===d&&852<X||2===d&&592<X)return 1;y=R&r;s[y]=L<<24|N<<16|x-q|0}}return 0!==R&&(s[x+R]=G-T<<24|4194304),t.bits=L,0}},{"../utils/common":3}],13:[function(c,f,d){f.exports={2:"need dictionary",1:"stream end","0":"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(c,f,d){function b(b){for(var d=
b.length;0<=--d;)b[d]=0}function e(b,d,e,c,f){this.static_tree=b;this.extra_bits=d;this.extra_base=e;this.elems=c;this.max_length=f;this.has_stree=b&&b.length}function g(b,d){this.dyn_tree=b;this.max_code=0;this.stat_desc=d}function k(b,d){b.pending_buf[b.pending++]=255&d;b.pending_buf[b.pending++]=d>>>8&255}function l(b,d,e){b.bi_valid>X-e?(b.bi_buf|=d<<b.bi_valid&65535,k(b,b.bi_buf),b.bi_buf=d>>X-b.bi_valid,b.bi_valid+=e-X):(b.bi_buf|=d<<b.bi_valid&65535,b.bi_valid+=e)}function n(b,d,e){l(b,e[2*
-d],e[2*d+1])}function m(b,d){var e=0;do e|=1&b,b>>>=1,e<<=1;while(0<--d);return e>>>1}function p(b,d,e){var c,f=Array(T+1),g=0;for(c=1;c<=T;c++)f[c]=g=g+e[c-1]<<1;for(e=0;e<=d;e++)c=b[2*e+1],0!==c&&(b[2*e]=m(f[c]++,c))}function r(b){var d;for(d=0;d<H;d++)b.dyn_ltree[2*d]=0;for(d=0;d<J;d++)b.dyn_dtree[2*d]=0;for(d=0;d<L;d++)b.bl_tree[2*d]=0;b.dyn_ltree[2*R]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function s(b){8<b.bi_valid?k(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf);
+d],e[2*d+1])}function m(b,d){var e=0;do e|=1&b,b>>>=1,e<<=1;while(0<--d);return e>>>1}function p(b,d,e){var c,f=Array(T+1),g=0;for(c=1;c<=T;c++)f[c]=g=g+e[c-1]<<1;for(e=0;e<=d;e++)c=b[2*e+1],0!==c&&(b[2*e]=m(f[c]++,c))}function r(b){var d;for(d=0;d<H;d++)b.dyn_ltree[2*d]=0;for(d=0;d<I;d++)b.dyn_dtree[2*d]=0;for(d=0;d<L;d++)b.bl_tree[2*d]=0;b.dyn_ltree[2*R]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function s(b){8<b.bi_valid?k(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf);
b.bi_buf=0;b.bi_valid=0}function q(b,d,e,c){var f=2*d,g=2*e;return b[f]<b[g]||b[f]===b[g]&&c[d]<=c[e]}function u(b,d,e){for(var c=b.heap[e],f=e<<1;f<=b.heap_len&&(f<b.heap_len&&q(d,b.heap[f+1],b.heap[f],b.depth)&&f++,!q(d,c,b.heap[f],b.depth));)b.heap[e]=b.heap[f],e=f,f<<=1;b.heap[e]=c}function t(b,d,e){var c,f,g,k,m=0;if(0!==b.last_lit){do c=b.pending_buf[b.d_buf+2*m]<<8|b.pending_buf[b.d_buf+2*m+1],f=b.pending_buf[b.l_buf+m],m++,0===c?n(b,f,d):(g=da[f],n(b,g+F+1,d),k=M[g],0!==k&&(f-=V[g],l(b,f,
k)),c--,g=256>c?ea[c]:ea[256+(c>>>7)],n(b,g,e),k=U[g],0!==k&&(c-=Y[g],l(b,c,k)));while(m<b.last_lit)}n(b,R,d)}function v(b,d){var e,c,f,g=d.dyn_tree;c=d.stat_desc.static_tree;var k=d.stat_desc.has_stree,l=d.stat_desc.elems,n=-1;b.heap_len=0;b.heap_max=N;for(e=0;e<l;e++)0!==g[2*e]?(b.heap[++b.heap_len]=n=e,b.depth[e]=0):g[2*e+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>n?++n:0,g[2*f]=1,b.depth[f]=0,b.opt_len--,k&&(b.static_len-=c[2*f+1]);d.max_code=n;for(e=b.heap_len>>1;1<=e;e--)u(b,g,e);f=l;
do e=b.heap[1],b.heap[1]=b.heap[b.heap_len--],u(b,g,1),c=b.heap[1],b.heap[--b.heap_max]=e,b.heap[--b.heap_max]=c,g[2*f]=g[2*e]+g[2*c],b.depth[f]=(b.depth[e]>=b.depth[c]?b.depth[e]:b.depth[c])+1,g[2*e+1]=g[2*c+1]=f,b.heap[1]=f++,u(b,g,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var m,t,k=d.dyn_tree,l=d.max_code,q=d.stat_desc.static_tree,v=d.stat_desc.has_stree,z=d.stat_desc.extra_bits,x=d.stat_desc.extra_base,y=d.stat_desc.max_length,r=0;for(c=0;c<=T;c++)b.bl_count[c]=0;k[2*b.heap[b.heap_max]+
1]=0;for(e=b.heap_max+1;e<N;e++)f=b.heap[e],c=k[2*k[2*f+1]+1]+1,c>y&&(c=y,r++),k[2*f+1]=c,f>l||(b.bl_count[c]++,m=0,f>=x&&(m=z[f-x]),t=k[2*f],b.opt_len+=t*(c+m),v&&(b.static_len+=t*(q[2*f+1]+m)));if(0!==r){do{for(c=y-1;0===b.bl_count[c];)c--;b.bl_count[c]--;b.bl_count[c+1]+=2;b.bl_count[y]--;r-=2}while(0<r);for(c=y;0!==c;c--)for(f=b.bl_count[c];0!==f;)m=b.heap[--e],m>l||(k[2*m+1]!==c&&(b.opt_len+=(c-k[2*m+1])*k[2*m],k[2*m+1]=c),f--)}p(g,n,b.bl_count)}function z(b,d,e){var c,f,g=-1,k=d[1],l=0,n=7,
m=4;0===k&&(n=138,m=3);d[2*(e+1)+1]=65535;for(c=0;c<=e;c++)f=k,k=d[2*(c+1)+1],++l<n&&f===k||(l<m?b.bl_tree[2*f]+=l:0!==f?(f!==g&&b.bl_tree[2*f]++,b.bl_tree[2*C]++):10>=l?b.bl_tree[2*O]++:b.bl_tree[2*P]++,l=0,g=f,0===k?(n=138,m=3):f===k?(n=6,m=3):(n=7,m=4))}function y(b,d,e){var c,f,g=-1,k=d[1],m=0,t=7,u=4;0===k&&(t=138,u=3);for(c=0;c<=e;c++)if(f=k,k=d[2*(c+1)+1],!(++m<t&&f===k)){if(m<u){do n(b,f,b.bl_tree);while(0!==--m)}else 0!==f?(f!==g&&(n(b,f,b.bl_tree),m--),n(b,C,b.bl_tree),l(b,m-3,2)):10>=m?
(n(b,O,b.bl_tree),l(b,m-3,3)):(n(b,P,b.bl_tree),l(b,m-11,7));m=0;g=f;0===k?(t=138,u=3):f===k?(t=6,u=3):(t=7,u=4)}}function x(b){var d,e=4093624447;for(d=0;31>=d;d++,e>>>=1)if(1&e&&0!==b.dyn_ltree[2*d])return B;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return D;for(d=32;d<F;d++)if(0!==b.dyn_ltree[2*d])return D;return B}function E(b,d,e,c){l(b,(G<<1)+(c?1:0),3);s(b);k(b,e);k(b,~e);A.arraySet(b.pending_buf,b.window,d,e,b.pending);b.pending+=e}var A=c("../utils/common"),B=0,D=1,
-G=0,F=256,H=F+1+29,J=30,L=19,N=2*H+1,T=15,X=16,R=256,C=16,O=17,P=18,M=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],U=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],I=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],K=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S=Array(2*(H+2));b(S);var Z=Array(2*J);b(Z);var ea=Array(512);b(ea);var da=Array(256);b(da);var V=Array(29);b(V);var Y=Array(J);b(Y);var aa,W,Q,ga=!1;d._tr_init=function(b){if(!ga){var d,c,f,k=Array(T+1);for(f=
-c=0;28>f;f++){V[f]=c;for(d=0;d<1<<M[f];d++)da[c++]=f}da[c-1]=f;for(f=c=0;16>f;f++){Y[f]=c;for(d=0;d<1<<U[f];d++)ea[c++]=f}for(c>>=7;f<J;f++){Y[f]=c<<7;for(d=0;d<1<<U[f]-7;d++)ea[256+c++]=f}for(d=0;d<=T;d++)k[d]=0;for(d=0;143>=d;)S[2*d+1]=8,d++,k[8]++;for(;255>=d;)S[2*d+1]=9,d++,k[9]++;for(;279>=d;)S[2*d+1]=7,d++,k[7]++;for(;287>=d;)S[2*d+1]=8,d++,k[8]++;p(S,H+1,k);for(d=0;d<J;d++)Z[2*d+1]=5,Z[2*d]=m(d,5);aa=new e(S,M,F+1,H,T);W=new e(Z,U,0,J,T);Q=new e([],I,0,L,7);ga=!0}b.l_desc=new g(b.dyn_ltree,
+G=0,F=256,H=F+1+29,I=30,L=19,N=2*H+1,T=15,X=16,R=256,C=16,O=17,P=18,M=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],U=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],J=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],K=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S=Array(2*(H+2));b(S);var Z=Array(2*I);b(Z);var ea=Array(512);b(ea);var da=Array(256);b(da);var V=Array(29);b(V);var Y=Array(I);b(Y);var aa,W,Q,ga=!1;d._tr_init=function(b){if(!ga){var d,c,f,k=Array(T+1);for(f=
+c=0;28>f;f++){V[f]=c;for(d=0;d<1<<M[f];d++)da[c++]=f}da[c-1]=f;for(f=c=0;16>f;f++){Y[f]=c;for(d=0;d<1<<U[f];d++)ea[c++]=f}for(c>>=7;f<I;f++){Y[f]=c<<7;for(d=0;d<1<<U[f]-7;d++)ea[256+c++]=f}for(d=0;d<=T;d++)k[d]=0;for(d=0;143>=d;)S[2*d+1]=8,d++,k[8]++;for(;255>=d;)S[2*d+1]=9,d++,k[9]++;for(;279>=d;)S[2*d+1]=7,d++,k[7]++;for(;287>=d;)S[2*d+1]=8,d++,k[8]++;p(S,H+1,k);for(d=0;d<I;d++)Z[2*d+1]=5,Z[2*d]=m(d,5);aa=new e(S,M,F+1,H,T);W=new e(Z,U,0,I,T);Q=new e([],J,0,L,7);ga=!0}b.l_desc=new g(b.dyn_ltree,
aa);b.d_desc=new g(b.dyn_dtree,W);b.bl_desc=new g(b.bl_tree,Q);b.bi_buf=0;b.bi_valid=0;r(b)};d._tr_stored_block=E;d._tr_flush_block=function(b,d,e,c){var f,g,k=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=x(b));v(b,b.l_desc);v(b,b.d_desc);z(b,b.dyn_ltree,b.l_desc.max_code);z(b,b.dyn_dtree,b.d_desc.max_code);v(b,b.bl_desc);for(k=L-1;3<=k&&0===b.bl_tree[2*K[k]+1];k--);k=(b.opt_len+=3*(k+1)+14,k);f=b.opt_len+3+7>>>3;g=b.static_len+3+7>>>3;g<=f&&(f=g)}else f=g=e+5;if(e+4<=f&&-1!==d)E(b,d,e,
c);else if(4===b.strategy||g===f)l(b,2+(c?1:0),3),t(b,S,Z);else{l(b,4+(c?1:0),3);d=b.l_desc.max_code+1;e=b.d_desc.max_code+1;k+=1;l(b,d-257,5);l(b,e-1,5);l(b,k-4,4);for(f=0;f<k;f++)l(b,b.bl_tree[2*K[f]+1],3);y(b,b.dyn_ltree,d-1);y(b,b.dyn_dtree,e-1);t(b,b.dyn_ltree,b.dyn_dtree)}r(b);c&&s(b)};d._tr_tally=function(b,d,e){return b.pending_buf[b.d_buf+2*b.last_lit]=d>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&d,b.pending_buf[b.l_buf+b.last_lit]=255&e,b.last_lit++,0===d?b.dyn_ltree[2*e]++:(b.matches++,
d--,b.dyn_ltree[2*(da[e]+F+1)]++,b.dyn_dtree[2*(256>d?ea[d]:ea[256+(d>>>7)])]++),b.last_lit===b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);n(b,R,S);16===b.bi_valid?(k(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":3}],15:[function(c,f,d){f.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=
@@ -658,8 +658,8 @@ mxArrowConnector.prototype.resetStyles=function(){mxShape.prototype.resetStyles.
mxArrowConnector.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBoundingBox.apply(this,arguments);var c=this.getEdgeWidth();this.isMarkerStart()&&(c=Math.max(c,this.getStartArrowWidth()));this.isMarkerEnd()&&(c=Math.max(c,this.getEndArrowWidth()));a.grow((c/2+this.strokewidth)*this.scale)};
mxArrowConnector.prototype.paintEdgeShape=function(a,c){var f=this.strokewidth;this.outline&&(f=Math.max(1,mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth)));for(var d=this.getStartArrowWidth()+f,b=this.getEndArrowWidth()+f,e=this.outline?this.getEdgeWidth()+f:this.getEdgeWidth(),g=this.isOpenEnded(),k=this.isMarkerStart(),l=this.isMarkerEnd(),n=g?0:this.arrowSpacing+f/2,m=this.startSize+f,f=this.endSize+f,p=this.isArrowRounded(),r=c[c.length-1],s=1;s<c.length-1&&c[s].x==
c[0].x&&c[s].y==c[0].y;)s++;var q=c[s].x-c[0].x,s=c[s].y-c[0].y,u=Math.sqrt(q*q+s*s);if(0!=u){var t=q/u,v,z=t,y=s/u,x,E=y,u=e*y,A=-e*t,B=[];p?a.setLineJoin("round"):2<c.length&&a.setMiterLimit(1.42);a.begin();q=t;s=y;if(k&&!g)this.paintMarker(a,c[0].x,c[0].y,t,y,m,d,e,n,!0);else{v=c[0].x+u/2+n*t;x=c[0].y+A/2+n*y;var D=c[0].x-u/2+n*t,G=c[0].y-A/2+n*y;g?(a.moveTo(v,x),B.push(function(){a.lineTo(D,G)})):(a.moveTo(D,G),a.lineTo(v,x))}for(var F=x=v=0,u=0;u<c.length-2;u++)if(A=mxUtils.relativeCcw(c[u].x,
-c[u].y,c[u+1].x,c[u+1].y,c[u+2].x,c[u+2].y),v=c[u+2].x-c[u+1].x,x=c[u+2].y-c[u+1].y,F=Math.sqrt(v*v+x*x),0!=F&&(z=v/F,E=x/F,tmp=Math.max(Math.sqrt((t*z+y*E+1)/2),0.04),v=t+z,x=y+E,F=Math.sqrt(v*v+x*x),0!=F)){v/=F;x/=F;var F=Math.max(tmp,Math.min(this.strokewidth/200+0.04,0.35)),F=0!=A&&p?Math.max(0.1,F):Math.max(tmp,0.06),H=c[u+1].x+x*e/2/F,J=c[u+1].y-v*e/2/F;x=c[u+1].x-x*e/2/F;v=c[u+1].y+v*e/2/F;0==A||!p?(a.lineTo(H,J),function(b,d){B.push(function(){a.lineTo(b,d)})}(x,v)):-1==A?(A=x+E*e,F=v-z*e,
-a.lineTo(x+y*e,v-t*e),a.quadTo(H,J,A,F),function(b,d){B.push(function(){a.lineTo(b,d)})}(x,v)):(a.lineTo(H,J),function(b,d){var c=H-y*e,f=J+t*e,g=H-E*e,k=J+z*e;B.push(function(){a.quadTo(b,d,c,f)});B.push(function(){a.lineTo(g,k)})}(x,v));t=z;y=E}u=e*E;A=-e*z;if(l&&!g)this.paintMarker(a,r.x,r.y,-t,-y,f,b,e,n,!1);else{a.lineTo(r.x-n*z+u/2,r.y-n*E+A/2);var L=r.x-n*z-u/2,N=r.y-n*E-A/2;g?(a.moveTo(L,N),B.splice(0,0,function(){a.moveTo(L,N)})):a.lineTo(L,N)}for(u=B.length-1;0<=u;u--)B[u]();g?(a.end(),
+c[u].y,c[u+1].x,c[u+1].y,c[u+2].x,c[u+2].y),v=c[u+2].x-c[u+1].x,x=c[u+2].y-c[u+1].y,F=Math.sqrt(v*v+x*x),0!=F&&(z=v/F,E=x/F,tmp=Math.max(Math.sqrt((t*z+y*E+1)/2),0.04),v=t+z,x=y+E,F=Math.sqrt(v*v+x*x),0!=F)){v/=F;x/=F;var F=Math.max(tmp,Math.min(this.strokewidth/200+0.04,0.35)),F=0!=A&&p?Math.max(0.1,F):Math.max(tmp,0.06),H=c[u+1].x+x*e/2/F,I=c[u+1].y-v*e/2/F;x=c[u+1].x-x*e/2/F;v=c[u+1].y+v*e/2/F;0==A||!p?(a.lineTo(H,I),function(b,d){B.push(function(){a.lineTo(b,d)})}(x,v)):-1==A?(A=x+E*e,F=v-z*e,
+a.lineTo(x+y*e,v-t*e),a.quadTo(H,I,A,F),function(b,d){B.push(function(){a.lineTo(b,d)})}(x,v)):(a.lineTo(H,I),function(b,d){var c=H-y*e,f=I+t*e,g=H-E*e,k=I+z*e;B.push(function(){a.quadTo(b,d,c,f)});B.push(function(){a.lineTo(g,k)})}(x,v));t=z;y=E}u=e*E;A=-e*z;if(l&&!g)this.paintMarker(a,r.x,r.y,-t,-y,f,b,e,n,!1);else{a.lineTo(r.x-n*z+u/2,r.y-n*E+A/2);var L=r.x-n*z-u/2,N=r.y-n*E-A/2;g?(a.moveTo(L,N),B.splice(0,0,function(){a.moveTo(L,N)})):a.lineTo(L,N)}for(u=B.length-1;0<=u;u--)B[u]();g?(a.end(),
a.stroke()):(a.close(),a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);p&&a.setLineJoin("flat");2<c.length&&(a.setMiterLimit(4),k&&!g&&(a.begin(),this.paintMarker(a,c[0].x,c[0].y,q,s,m,d,e,n,!0),a.stroke(),a.end()),l&&!g&&(a.begin(),this.paintMarker(a,r.x,r.y,-t,-y,f,b,e,n,!0),a.stroke(),a.end()))}};
mxArrowConnector.prototype.paintMarker=function(a,c,f,d,b,e,g,k,l,n){g=k/g;var m=k*b/2;k=-k*d/2;var p=(l+e)*d;e=(l+e)*b;n?a.moveTo(c-m+p,f-k+e):a.lineTo(c-m+p,f-k+e);a.lineTo(c-m/g+p,f-k/g+e);a.lineTo(c+l*d,f+l*b);a.lineTo(c+m/g+p,f+k/g+e);a.lineTo(c+m+p,f+k+e)};mxArrowConnector.prototype.isArrowRounded=function(){return this.isRounded};mxArrowConnector.prototype.getStartArrowWidth=function(){return mxConstants.ARROW_WIDTH};mxArrowConnector.prototype.getEndArrowWidth=function(){return mxConstants.ARROW_WIDTH};
mxArrowConnector.prototype.getEdgeWidth=function(){return mxConstants.ARROW_WIDTH/3};mxArrowConnector.prototype.isOpenEnded=function(){return!1};mxArrowConnector.prototype.isMarkerStart=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE};mxArrowConnector.prototype.isMarkerEnd=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE};
@@ -2297,27 +2297,27 @@ d.width,d.y),!1)):f==mxConstants.DIRECTION_SOUTH?(d.height=e,d.y=k.y+k.height,d.
2+d.width/2+e:f==mxConstants.DIRECTION_SOUTH?d.y=d.y+k.height/2+d.height/2+e:f==mxConstants.DIRECTION_WEST&&(d.x=d.x-k.width/2-d.width/2-e),b.model.isEdge(c)&&null!=d.getTerminalPoint(!0)&&null!=c.getTerminal(!1)&&(k=b.getCellGeometry(c.getTerminal(!1)),null!=k&&(f==mxConstants.DIRECTION_NORTH?(d.x-=k.getCenterX(),d.y-=k.getCenterY()+k.height/2):f==mxConstants.DIRECTION_EAST?(d.x-=k.getCenterX()-k.width/2,d.y-=k.getCenterY()):f==mxConstants.DIRECTION_SOUTH?(d.x-=k.getCenterX(),d.y-=k.getCenterY()-
k.height/2):f==mxConstants.DIRECTION_WEST&&(d.x-=k.getCenterX()+k.width/2,d.y-=k.getCenterY()))))));return d};
Sidebar.prototype.createDragSource=function(a,c,f,d,b){function e(b,a){var d=null;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(d=document.createElement(mxClient.VML_PREFIX+":image"),d.setAttribute("src",b.src),d.style.borderStyle="none"):(d=document.createElement("div"),d.style.backgroundImage="url("+b.src+")",d.style.backgroundPosition="center",d.style.backgroundRepeat="no-repeat"),d.style.width=b.width+4+"px",d.style.height=b.height+4+"px",d.style.display=
-mxClient.IS_QUIRKS?"inline":"inline-block"):(d=mxUtils.createImage(b.src),d.style.width=b.width+"px",d.style.height=b.height+"px");null!=a&&d.setAttribute("title",a);mxUtils.setOpacity(d,b==this.refreshTarget?30:20);d.style.position="absolute";d.style.cursor="crosshair";return d}function g(b,a,d,e){null!=e.parentNode&&(mxUtils.contains(d,b,a)?(mxUtils.setOpacity(e,100),J=e):mxUtils.setOpacity(e,e==B?30:20));return d}for(var k=this.editorUi,l=k.editor.graph,n=null,m=null,p=this,r=0;r<d.length&&!(null==
-m&&this.editorUi.editor.graph.model.isVertex(d[r])?m=r:null==n&&this.editorUi.editor.graph.model.isEdge(d[r])&&null==this.editorUi.editor.graph.model.getTerminal(d[r],!0)&&(n=r),null!=m&&null!=n);r++);var s=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(b,a,e,f,g){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=d&&null!=v&&J==B){var k=b.isCellSelected(v.cell)?b.getSelectionCells():[v.cell],k=this.updateShapes(b.model.isEdge(v.cell)?d[0]:d[m],
-k);b.setSelectionCells(k)}else null!=d&&null!=J&&null!=u&&J!=B?(k=b.model.isEdge(u.cell)||null==n?m:n,this.dropAndConnect(u.cell,d,H,k)):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(b.view.getState(b.getSelectionCell()))}),f,0,0,this.editorUi.editor.graph.autoscroll,!0,!0);this.editorUi.editor.graph.addListener(mxEvent.ESCAPE,function(b,a){s.isActive()&&s.reset()});var q=s.mouseDown;s.mouseDown=function(b){!mxEvent.isPopupTrigger(b)&&!mxEvent.isMultiTouchEvent(b)&&
-(l.stopEditing(),q.apply(this,arguments))};var u=null,t=null,v=null,z=!1,y=e(this.triangleUp,mxResources.get("connect")),x=e(this.triangleRight,mxResources.get("connect")),E=e(this.triangleDown,mxResources.get("connect")),A=e(this.triangleLeft,mxResources.get("connect")),B=e(this.refreshTarget,mxResources.get("replace")),D=null,G=e(this.roundDrop),F=e(this.roundDrop),H=mxConstants.DIRECTION_NORTH,J=null,L=s.createPreviewElement;s.createPreviewElement=function(b){var a=L.apply(this,arguments);mxClient.IS_SVG&&
-(a.style.pointerEvents="none");this.previewElementWidth=a.style.width;this.previewElementHeight=a.style.height;return a};var N=s.dragEnter;s.dragEnter=function(b,a){null!=k.hoverIcons&&k.hoverIcons.setDisplay("none");N.apply(this,arguments)};var T=s.dragExit;s.dragExit=function(b,a){null!=k.hoverIcons&&k.hoverIcons.setDisplay("");T.apply(this,arguments)};s.dragOver=function(a,e){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=J&&this.currentGuide.hide();if(null!=
-this.previewElement){var c=a.view;if(null!=v&&J==B)this.previewElement.style.display=a.model.isEdge(v.cell)?"none":"",this.previewElement.style.left=v.x+"px",this.previewElement.style.top=v.y+"px",this.previewElement.style.width=v.width+"px",this.previewElement.style.height=v.height+"px";else if(null!=u&&null!=J){var f=a.model.isEdge(u.cell)||null==n?m:n,g=p.getDropAndConnectGeometry(u.cell,d[f],H,d),k=!a.model.isEdge(u.cell)?a.getCellGeometry(u.cell):null,l=a.getCellGeometry(d[f]),t=a.model.getParent(u.cell),
+mxClient.IS_QUIRKS?"inline":"inline-block"):(d=mxUtils.createImage(b.src),d.style.width=b.width+"px",d.style.height=b.height+"px");null!=a&&d.setAttribute("title",a);mxUtils.setOpacity(d,b==this.refreshTarget?30:20);d.style.position="absolute";d.style.cursor="crosshair";return d}function g(b,a,d,e){null!=e.parentNode&&(mxUtils.contains(d,b,a)?(mxUtils.setOpacity(e,100),I=e):mxUtils.setOpacity(e,e==B?30:20));return d}for(var k=this.editorUi,l=k.editor.graph,n=null,m=null,p=this,r=0;r<d.length&&!(null==
+m&&this.editorUi.editor.graph.model.isVertex(d[r])?m=r:null==n&&this.editorUi.editor.graph.model.isEdge(d[r])&&null==this.editorUi.editor.graph.model.getTerminal(d[r],!0)&&(n=r),null!=m&&null!=n);r++);var s=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(b,a,e,f,g){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=d&&null!=v&&I==B){var k=b.isCellSelected(v.cell)?b.getSelectionCells():[v.cell],k=this.updateShapes(b.model.isEdge(v.cell)?d[0]:d[m],
+k);b.setSelectionCells(k)}else null!=d&&null!=I&&null!=u&&I!=B?(k=b.model.isEdge(u.cell)||null==n?m:n,this.dropAndConnect(u.cell,d,H,k)):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(b.view.getState(b.getSelectionCell()))}),f,0,0,this.editorUi.editor.graph.autoscroll,!0,!0);this.editorUi.editor.graph.addListener(mxEvent.ESCAPE,function(b,a){s.isActive()&&s.reset()});var q=s.mouseDown;s.mouseDown=function(b){!mxEvent.isPopupTrigger(b)&&!mxEvent.isMultiTouchEvent(b)&&
+(l.stopEditing(),q.apply(this,arguments))};var u=null,t=null,v=null,z=!1,y=e(this.triangleUp,mxResources.get("connect")),x=e(this.triangleRight,mxResources.get("connect")),E=e(this.triangleDown,mxResources.get("connect")),A=e(this.triangleLeft,mxResources.get("connect")),B=e(this.refreshTarget,mxResources.get("replace")),D=null,G=e(this.roundDrop),F=e(this.roundDrop),H=mxConstants.DIRECTION_NORTH,I=null,L=s.createPreviewElement;s.createPreviewElement=function(b){var a=L.apply(this,arguments);mxClient.IS_SVG&&
+(a.style.pointerEvents="none");this.previewElementWidth=a.style.width;this.previewElementHeight=a.style.height;return a};var N=s.dragEnter;s.dragEnter=function(b,a){null!=k.hoverIcons&&k.hoverIcons.setDisplay("none");N.apply(this,arguments)};var T=s.dragExit;s.dragExit=function(b,a){null!=k.hoverIcons&&k.hoverIcons.setDisplay("");T.apply(this,arguments)};s.dragOver=function(a,e){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=I&&this.currentGuide.hide();if(null!=
+this.previewElement){var c=a.view;if(null!=v&&I==B)this.previewElement.style.display=a.model.isEdge(v.cell)?"none":"",this.previewElement.style.left=v.x+"px",this.previewElement.style.top=v.y+"px",this.previewElement.style.width=v.width+"px",this.previewElement.style.height=v.height+"px";else if(null!=u&&null!=I){var f=a.model.isEdge(u.cell)||null==n?m:n,g=p.getDropAndConnectGeometry(u.cell,d[f],H,d),k=!a.model.isEdge(u.cell)?a.getCellGeometry(u.cell):null,l=a.getCellGeometry(d[f]),t=a.model.getParent(u.cell),
q=c.translate.x*c.scale,z=c.translate.y*c.scale;null!=k&&!k.relative&&a.model.isVertex(t)&&(z=c.getState(t),q=z.x,z=z.y);k=l.x;l=l.y;a.model.isEdge(d[f])&&(l=k=0);this.previewElement.style.left=(g.x-k)*c.scale+q+"px";this.previewElement.style.top=(g.y-l)*c.scale+z+"px";1==d.length&&(this.previewElement.style.width=g.width*c.scale+"px",this.previewElement.style.height=g.height*c.scale+"px");this.previewElement.style.display=""}else null!=s.currentHighlight.state&&a.model.isEdge(s.currentHighlight.state.cell)?
(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-b.width*c.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-b.height*c.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var X=(new Date).getTime(),R=0,C=null,O=this.editorUi.editor.graph.getCellStyle(d[0]);s.getDropTarget=mxUtils.bind(this,function(b,
-a,e,c){var f=!mxEvent.isAltDown(c)&&null!=d?b.getCellAt(a,e):null;if(null!=f&&!this.graph.isCellConnectable(f)){var k=this.graph.getModel().getParent(f);this.graph.getModel().isVertex(k)&&this.graph.isCellConnectable(k)&&(f=k)}b.isCellLocked(f)&&(f=null);var l=b.view.getState(f),k=J=null;C!=l?(C=l,X=(new Date).getTime(),R=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=l&&(this.updateThread=window.setTimeout(function(){null==J&&(C=l,s.getDropTarget(b,a,e,c))},this.dropTargetDelay+
+a,e,c){var f=!mxEvent.isAltDown(c)&&null!=d?b.getCellAt(a,e):null;if(null!=f&&!this.graph.isCellConnectable(f)){var k=this.graph.getModel().getParent(f);this.graph.getModel().isVertex(k)&&this.graph.isCellConnectable(k)&&(f=k)}b.isCellLocked(f)&&(f=null);var l=b.view.getState(f),k=I=null;C!=l?(C=l,X=(new Date).getTime(),R=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=l&&(this.updateThread=window.setTimeout(function(){null==I&&(C=l,s.getDropTarget(b,a,e,c))},this.dropTargetDelay+
10))):R=(new Date).getTime()-X;if(2500>R&&null!=l&&!mxEvent.isShiftDown(c)&&(mxUtils.getValue(l.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(O,mxConstants.STYLE_SHAPE)&&mxUtils.getValue(l.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||"image"==mxUtils.getValue(O,mxConstants.STYLE_SHAPE)||1500<R||b.model.isEdge(l.cell))&&R>this.dropTargetDelay&&(b.model.isVertex(l.cell)&&null!=m||b.model.isEdge(l.cell)&&b.model.isEdge(d[0]))){v=l;var n=b.model.isEdge(l.cell)?b.view.getPoint(l):
new mxPoint(l.getCenterX(),l.getCenterY()),n=new mxRectangle(n.x-this.refreshTarget.width/2,n.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);B.style.left=Math.floor(n.x)+"px";B.style.top=Math.floor(n.y)+"px";null==D&&(b.container.appendChild(B),D=B.parentNode);g(a,e,n,B)}else null==v||!mxUtils.contains(v,a,e)||1500<R&&!mxEvent.isShiftDown(c)?(v=null,null!=D&&(B.parentNode.removeChild(B),D=null)):null!=v&&null!=D&&(n=b.model.isEdge(v.cell)?b.view.getPoint(v):new mxPoint(v.getCenterX(),
-v.getCenterY()),n=new mxRectangle(n.x-this.refreshTarget.width/2,n.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),g(a,e,n,B));if(z&&null!=u&&!mxEvent.isAltDown(c)&&null==J){k=mxRectangle.fromRectangle(u);if(b.model.isEdge(u.cell)){var q=u.absolutePoints;null!=G.parentNode&&(n=q[0],k.add(g(a,e,new mxRectangle(n.x-this.roundDrop.width/2,n.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),G)));null!=F.parentNode&&(q=q[q.length-1],k.add(g(a,e,new mxRectangle(q.x-
+v.getCenterY()),n=new mxRectangle(n.x-this.refreshTarget.width/2,n.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),g(a,e,n,B));if(z&&null!=u&&!mxEvent.isAltDown(c)&&null==I){k=mxRectangle.fromRectangle(u);if(b.model.isEdge(u.cell)){var q=u.absolutePoints;null!=G.parentNode&&(n=q[0],k.add(g(a,e,new mxRectangle(n.x-this.roundDrop.width/2,n.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),G)));null!=F.parentNode&&(q=q[q.length-1],k.add(g(a,e,new mxRectangle(q.x-
this.roundDrop.width/2,q.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),F)))}else n=mxRectangle.fromRectangle(u),null!=u.shape&&null!=u.shape.boundingBox&&(n=mxRectangle.fromRectangle(u.shape.boundingBox)),n.grow(this.graph.tolerance),n.grow(HoverIcons.prototype.arrowSpacing),q=this.graph.selectionCellsHandler.getHandler(u.cell),null!=q&&(n.x-=q.horizontalOffset/2,n.y-=q.verticalOffset/2,n.width+=q.horizontalOffset,n.height+=q.verticalOffset,null!=q.rotationShape&&null!=q.rotationShape.node&&
("hidden"!=q.rotationShape.node.style.visibility&&"none"!=q.rotationShape.node.style.display&&null!=q.rotationShape.boundingBox)&&n.add(q.rotationShape.boundingBox)),k.add(g(a,e,new mxRectangle(u.getCenterX()-this.triangleUp.width/2,n.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),y)),k.add(g(a,e,new mxRectangle(n.x+n.width,u.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),x)),k.add(g(a,e,new mxRectangle(u.getCenterX()-this.triangleDown.width/
-2,n.y+n.height,this.triangleDown.width,this.triangleDown.height),E)),k.add(g(a,e,new mxRectangle(n.x-this.triangleLeft.width,u.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),A));null!=k&&k.grow(10)}H=mxConstants.DIRECTION_NORTH;J==x?H=mxConstants.DIRECTION_EAST:J==E||J==F?H=mxConstants.DIRECTION_SOUTH:J==A&&(H=mxConstants.DIRECTION_WEST);null!=v&&J==B&&(l=v);n=(null==m||b.isCellConnectable(d[m]))&&(b.model.isEdge(f)&&null!=m||b.model.isVertex(f)&&b.isCellConnectable(f));
-if(null!=u&&5E3<=R||u!=l&&(null==k||!mxUtils.contains(k,a,e)||500<R&&null==J&&n))if(z=!1,u=5E3>R&&R>this.dropTargetDelay||b.model.isEdge(f)?l:null,null!=u&&n){k=[G,F,y,x,E,A];for(n=0;n<k.length;n++)null!=k[n].parentNode&&k[n].parentNode.removeChild(k[n]);b.model.isEdge(f)?(q=l.absolutePoints,null!=q&&(n=q[0],q=q[q.length-1],k=b.tolerance,new mxRectangle(a-k,e-k,2*k,2*k),G.style.left=Math.floor(n.x-this.roundDrop.width/2)+"px",G.style.top=Math.floor(n.y-this.roundDrop.height/2)+"px",F.style.left=Math.floor(q.x-
+2,n.y+n.height,this.triangleDown.width,this.triangleDown.height),E)),k.add(g(a,e,new mxRectangle(n.x-this.triangleLeft.width,u.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),A));null!=k&&k.grow(10)}H=mxConstants.DIRECTION_NORTH;I==x?H=mxConstants.DIRECTION_EAST:I==E||I==F?H=mxConstants.DIRECTION_SOUTH:I==A&&(H=mxConstants.DIRECTION_WEST);null!=v&&I==B&&(l=v);n=(null==m||b.isCellConnectable(d[m]))&&(b.model.isEdge(f)&&null!=m||b.model.isVertex(f)&&b.isCellConnectable(f));
+if(null!=u&&5E3<=R||u!=l&&(null==k||!mxUtils.contains(k,a,e)||500<R&&null==I&&n))if(z=!1,u=5E3>R&&R>this.dropTargetDelay||b.model.isEdge(f)?l:null,null!=u&&n){k=[G,F,y,x,E,A];for(n=0;n<k.length;n++)null!=k[n].parentNode&&k[n].parentNode.removeChild(k[n]);b.model.isEdge(f)?(q=l.absolutePoints,null!=q&&(n=q[0],q=q[q.length-1],k=b.tolerance,new mxRectangle(a-k,e-k,2*k,2*k),G.style.left=Math.floor(n.x-this.roundDrop.width/2)+"px",G.style.top=Math.floor(n.y-this.roundDrop.height/2)+"px",F.style.left=Math.floor(q.x-
this.roundDrop.width/2)+"px",F.style.top=Math.floor(q.y-this.roundDrop.height/2)+"px",null==b.model.getTerminal(f,!0)&&b.container.appendChild(G),null==b.model.getTerminal(f,!1)&&b.container.appendChild(F))):(n=mxRectangle.fromRectangle(l),null!=l.shape&&null!=l.shape.boundingBox&&(n=mxRectangle.fromRectangle(l.shape.boundingBox)),n.grow(this.graph.tolerance),n.grow(HoverIcons.prototype.arrowSpacing),q=this.graph.selectionCellsHandler.getHandler(l.cell),null!=q&&(n.x-=q.horizontalOffset/2,n.y-=q.verticalOffset/
2,n.width+=q.horizontalOffset,n.height+=q.verticalOffset,null!=q.rotationShape&&null!=q.rotationShape.node&&("hidden"!=q.rotationShape.node.style.visibility&&"none"!=q.rotationShape.node.style.display&&null!=q.rotationShape.boundingBox)&&n.add(q.rotationShape.boundingBox)),y.style.left=Math.floor(l.getCenterX()-this.triangleUp.width/2)+"px",y.style.top=Math.floor(n.y-this.triangleUp.height)+"px",x.style.left=Math.floor(n.x+n.width)+"px",x.style.top=Math.floor(l.getCenterY()-this.triangleRight.height/
2)+"px",E.style.left=y.style.left,E.style.top=Math.floor(n.y+n.height)+"px",A.style.left=Math.floor(n.x-this.triangleLeft.width)+"px",A.style.top=x.style.top,"eastwest"!=l.style.portConstraint&&(b.container.appendChild(y),b.container.appendChild(E)),b.container.appendChild(x),b.container.appendChild(A));null!=l&&(t=b.selectionCellsHandler.getHandler(l.cell),null!=t&&null!=t.setHandlesVisible&&t.setHandlesVisible(!1));z=!0}else{k=[G,F,y,x,E,A];for(n=0;n<k.length;n++)null!=k[n].parentNode&&k[n].parentNode.removeChild(k[n])}!z&&
-null!=t&&t.setHandlesVisible(!0);f=(!mxEvent.isAltDown(c)||mxEvent.isShiftDown(c))&&!(null!=v&&J==B)?mxDragSource.prototype.getDropTarget.apply(this,arguments):null;k=b.getModel();if(null!=f&&(null!=J||!b.isSplitTarget(f,d,c))){for(;null!=f&&!b.isValidDropTarget(f,d,c)&&k.isVertex(k.getParent(f));)f=k.getParent(f);if(b.view.currentRoot==f||!b.isValidRoot(f)&&0==b.getModel().getChildCount(f)||b.isCellLocked(f)||k.isEdge(f))f=null}return f});s.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,
-arguments);for(var b=[G,F,B,y,x,E,A],a=0;a<b.length;a++)null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a]);null!=u&&null!=t&&t.reset();J=D=v=u=t=null};return s};
+null!=t&&t.setHandlesVisible(!0);f=(!mxEvent.isAltDown(c)||mxEvent.isShiftDown(c))&&!(null!=v&&I==B)?mxDragSource.prototype.getDropTarget.apply(this,arguments):null;k=b.getModel();if(null!=f&&(null!=I||!b.isSplitTarget(f,d,c))){for(;null!=f&&!b.isValidDropTarget(f,d,c)&&k.isVertex(k.getParent(f));)f=k.getParent(f);if(b.view.currentRoot==f||!b.isValidRoot(f)&&0==b.getModel().getChildCount(f)||b.isCellLocked(f)||k.isEdge(f))f=null}return f});s.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,
+arguments);for(var b=[G,F,B,y,x,E,A],a=0;a<b.length;a++)null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a]);null!=u&&null!=t&&t.reset();I=D=v=u=t=null};return s};
Sidebar.prototype.itemClicked=function(a,c,f,d){d=this.editorUi.editor.graph;if(mxEvent.isAltDown(f)){if(1==d.getSelectionCount()&&d.model.isVertex(d.getSelectionCell())){c=null;for(var b=0;b<a.length&&null==c;b++)d.model.isVertex(a[b])&&(c=b);null!=c&&(this.dropAndConnect(d.getSelectionCell(),a,mxEvent.isMetaDown(f)||mxEvent.isControlDown(f)?mxEvent.isShiftDown(f)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(f)?mxConstants.DIRECTION_EAST:mxConstants.DIRECTION_SOUTH,
c),d.scrollCellToVisible(d.getSelectionCell()))}}else mxEvent.isShiftDown(f)?d.isSelectionEmpty()||(this.updateShapes(a[0],d.getSelectionCells()),d.scrollCellToVisible(d.getSelectionCell())):(a=d.getInsertPoint(),c.drop(d,f,null,a.x,a.y),null!=this.editorUi.hoverIcons&&mxEvent.isTouchEvent(f)&&this.editorUi.hoverIcons.update(d.view.getState(d.getSelectionCell())))};
Sidebar.prototype.addClickHandler=function(a,c,f){var d=this.editorUi.editor.graph,b=c.mouseUp,e=null;mxEvent.addGestureListeners(a,function(b){e=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b))});c.mouseUp=mxUtils.bind(this,function(g){if(!mxEvent.isPopupTrigger(g)&&null==this.currentGraph&&null!=e){var k=d.tolerance;Math.abs(e.x-mxEvent.getClientX(g))<=k&&Math.abs(e.y-mxEvent.getClientY(g))<=k&&this.itemClicked(f,c,g,a)}b.apply(c,arguments);e=null;this.currentElt=a})};
@@ -2355,8 +2355,8 @@ arguments)||mxEvent.isShiftDown(b)};var v=p.isForceRubberbandEvent;p.isForceRubb
function(){this.isEnabled()&&(this.container.style.cursor=z)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(b){return mxEvent.isMouseEvent(b.getEvent())};var y=this.click;this.click=function(b){if(!this.isEnabled()&&!b.isConsumed()){var a=b.getCell();null!=a&&(a=this.getLinkForCell(a),null!=a&&window.open(a))}else return y.apply(this,arguments)};var x=this.getCursorForCell;this.getCursorForCell=function(b){if(this.isEnabled())return x.apply(this,arguments);if(null!=
this.getLinkForCell(b))return"pointer"};this.selectRegion=function(b,a){var d=this.getAllCells(b.x,b.y,b.width,b.height);this.selectCellsForEvent(d,a);return d};this.getAllCells=function(b,a,d,c,e,f){f=null!=f?f:[];if(0<d||0<c){var g=this.getModel(),k=b+d,l=a+c;null==e&&(e=this.getCurrentRoot(),null==e&&(e=g.getRoot()));if(null!=e)for(var n=g.getChildCount(e),m=0;m<n;m++){var t=g.getChildAt(e,m),u=this.view.getState(t);if(null!=u&&this.isCellVisible(t)&&"1"!=mxUtils.getValue(u.style,"locked","0")){var q=
mxUtils.getValue(u.style,mxConstants.STYLE_ROTATION)||0;0!=q&&(u=mxUtils.getBoundingBox(u,q));(g.isEdge(t)||g.isVertex(t))&&u.x>=b&&(u.y+u.height<=l&&u.y>=a&&u.x+u.width<=k)&&f.push(t);this.getAllCells(b,a,d,c,t,f)}}}return f};var E=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(b,a,d){return this.graph.isCellSelected(b)?!1:E.apply(this,arguments)};this.isCellLocked=function(b){for(b=this.view.getState(b);null!=b;){if("1"==mxUtils.getValue(b.style,
-"locked","0"))return!0;b=this.view.getState(this.model.getParent(b.cell))}return!1};var A=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,a){if("mouseDown"==a.getProperty("eventName")){var d=a.getProperty("event").getState();A=null!=d&&!this.isSelectionEmpty()&&!this.isCellSelected(d.cell)?this.getSelectionCells():null}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(b,a){if(!mxEvent.isMultiTouchEvent(a)){var d=a.getProperty("event"),e=a.getProperty("cell");
-null==e?(d=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d)),p.start(d.x,d.y)):null!=A?this.addSelectionCells(A):1<this.getSelectionCount()&&this.isCellSelected(e)&&this.removeSelectionCell(e);A=null;a.consume()}}));this.connectionHandler.selectCells=function(b,a){this.graph.setSelectionCell(a||b)};this.connectionHandler.constraintHandler.isStateIgnored=function(b,a){return a&&b.view.graph.isCellSelected(b.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,
+"locked","0"))return!0;b=this.view.getState(this.model.getParent(b.cell))}return!1};var A=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,a){if("mouseDown"==a.getProperty("eventName")){var d=a.getProperty("event").getState();A=null!=d&&!this.isSelectionEmpty()&&!this.isCellSelected(d.cell)?this.getSelectionCells():null}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(b,a){if(!mxEvent.isMultiTouchEvent(a)){var d=a.getProperty("event"),c=a.getProperty("cell");
+null==c?(d=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d)),p.start(d.x,d.y)):null!=A?this.addSelectionCells(A):1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);A=null;a.consume()}}));this.connectionHandler.selectCells=function(b,a){this.graph.setSelectionCell(a||b)};this.connectionHandler.constraintHandler.isStateIgnored=function(b,a){return a&&b.view.graph.isCellSelected(b.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,
function(){var b=this.connectionHandler.constraintHandler;null!=b.currentFocus&&b.isStateIgnored(b.currentFocus,!0)&&(b.currentFocus=null,b.constraints=null,b.destroyIcons());b.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var B=this.updateMouseEvent;this.updateMouseEvent=function(b){b=B.apply(this,arguments);this.isCellLocked(b.getCell())&&(b.state=null);return b}}};
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkTarget="_blank";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;
Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultGraphBackground="#ffffff";Graph.prototype.transparentBackground=!0;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=window.location!=window.parent.location?document.referrer:document.location.toString();
@@ -2459,8 +2459,8 @@ arguments)&&"0"!=mxUtils.getValue(a,"dropTarget","1"))};Graph.prototype.createGr
function(b){var a=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=a&&(a.width+=10,a.height+=4,this.gridEnabled&&(a.width=this.snap(a.width),a.height=this.snap(a.height)));return a};Graph.prototype.turnShapes=function(b){var a=this.getModel(),d=[];a.beginUpdate();try{for(var c=0;c<b.length;c++){var e=b[c];if(a.isEdge(e)){var f=a.getTerminal(e,!0),g=a.getTerminal(e,!1);a.setTerminal(e,g,!0);a.setTerminal(e,f,!1);var k=a.getGeometry(e);if(null!=k){k=k.clone();null!=k.points&&k.points.reverse();
var l=k.getTerminalPoint(!0),n=k.getTerminalPoint(!1);k.setTerminalPoint(l,!1);k.setTerminalPoint(n,!0);a.setGeometry(e,k);var m=this.view.getState(e),t=this.view.getState(f),u=this.view.getState(g);if(null!=m){var q=null!=t?this.getConnectionConstraint(m,t,!0):null,v=null!=u?this.getConnectionConstraint(m,u,!1):null;this.setConnectionConstraint(e,f,!0,v);this.setConnectionConstraint(e,g,!1,q)}d.push(e)}}else if(a.isVertex(e)&&(k=this.getCellGeometry(e),null!=k)){k=k.clone();k.x+=k.width/2-k.height/
2;k.y+=k.height/2-k.width/2;var p=k.width;k.width=k.height;k.height=p;a.setGeometry(e,k);var z=this.view.getState(e);if(null!=z){var x=z.style[mxConstants.STYLE_DIRECTION]||"east";"east"==x?x="south":"south"==x?x="west":"west"==x?x="north":"north"==x&&(x="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,x,[e])}d.push(e)}}}finally{a.endUpdate()}return d};Graph.prototype.processChange=function(b){mxGraph.prototype.processChange.apply(this,arguments);if(b instanceof mxValueChange&&null!=b.cell.value&&
-"object"==typeof b.cell.value){var a=this.model.getDescendants(b.cell);if(0<a.length)for(var d=0;d<a.length;d++)this.isReplacePlaceholders(a[d])&&this.view.invalidate(a[d],!1,!1)}};Graph.prototype.cellLabelChanged=function(b,a,d){a=this.zapGremlins(a);this.model.beginUpdate();try{if(null!=b.value&&"object"==typeof b.value){if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder"))for(var e=b.getAttribute("placeholder"),c=b;null!=c;){if(c==this.model.getRoot()||null!=c.value&&"object"==
-typeof c.value&&c.hasAttribute(e)){this.setAttributeForCell(c,e,a);break}c=this.model.getParent(c)}var f=b.value.cloneNode(!0);f.setAttribute("label",a);a=f}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.removeCellsAfterUngroup=function(b){for(var a=[],d=0;d<b.length;d++)if(this.isCellDeletable(b[d])){var e=this.view.getState(b[d]);if(null!=e){var c=mxUtils.getValue(e.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),e=mxUtils.getValue(e.style,
+"object"==typeof b.cell.value){var a=this.model.getDescendants(b.cell);if(0<a.length)for(var d=0;d<a.length;d++)this.isReplacePlaceholders(a[d])&&this.view.invalidate(a[d],!1,!1)}};Graph.prototype.cellLabelChanged=function(b,a,d){a=this.zapGremlins(a);this.model.beginUpdate();try{if(null!=b.value&&"object"==typeof b.value){if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder"))for(var c=b.getAttribute("placeholder"),e=b;null!=e;){if(e==this.model.getRoot()||null!=e.value&&"object"==
+typeof e.value&&e.hasAttribute(c)){this.setAttributeForCell(e,c,a);break}e=this.model.getParent(e)}var f=b.value.cloneNode(!0);f.setAttribute("label",a);a=f}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.removeCellsAfterUngroup=function(b){for(var a=[],d=0;d<b.length;d++)if(this.isCellDeletable(b[d])){var e=this.view.getState(b[d]);if(null!=e){var c=mxUtils.getValue(e.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),e=mxUtils.getValue(e.style,
mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);c==mxConstants.NONE&&e==mxConstants.NONE&&a.push(b[d])}}b=a;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(b,a){this.setAttributeForCell(b,"link",a)};Graph.prototype.setTooltipForCell=function(b,a){this.setAttributeForCell(b,"tooltip",a)};Graph.prototype.setAttributeForCell=function(b,a,d){var e=null;null!=b.value&&"object"==typeof b.value?e=b.value.cloneNode(!0):(e=mxUtils.createXmlDocument().createElement("UserObject"),
e.setAttribute("label",b.value||""));null!=d&&0<d.length?e.setAttribute(a,d):e.removeAttribute(a);this.model.setValue(b,e)};Graph.prototype.getDropTarget=function(b,a,d,e){this.getModel();if(mxEvent.isAltDown(a))return null;for(var c=0;c<b.length;c++)if(this.model.isEdge(this.model.getParent(b[c])))return null;return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=function(b){mxGraph.prototype.click.call(this,b);this.firstClickState=b.getState();this.firstClickSource=
b.getSource()};Graph.prototype.dblClick=function(b,a){if(this.isEnabled()){var d=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b));if(null!=b&&!this.model.isVertex(a)){var e=this.model.isEdge(a)?this.view.getState(a):null,c=mxEvent.getSource(b);if(this.firstClickState==e&&this.firstClickSource==c&&(null==e||null==e.text||null==e.text.node||!mxUtils.contains(e.text.boundingBox,d.x,d.y)&&!mxUtils.isAncestorNode(e.text.node,mxEvent.getSource(b))))if(null==e&&!this.isCellLocked(this.getDefaultParent())||
@@ -2539,7 +2539,7 @@ mxEdgeHandler.prototype.createHandleShape=function(b,a){var d=null!=b&&0==b,e=th
mxGraphHandler.prototype.getBoundingBox=function(b){if(null!=b&&1==b.length){var a=this.graph.getModel(),d=a.getParent(b[0]),e=this.graph.getCellGeometry(b[0]);if(a.isEdge(d)&&null!=e&&e.relative&&(a=this.graph.view.getState(b[0]),null!=a&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox))return mxRectangle.fromRectangle(a.text.boundingBox)}return D.apply(this,arguments)};var G=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(b){var a=
this.graph.getModel(),d=a.getParent(b.cell),e=this.graph.getCellGeometry(b.cell);return a.isEdge(d)&&null!=e&&e.relative&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox?(a=b.text.unrotatedBoundingBox||b.text.boundingBox,new mxRectangle(Math.round(a.x),Math.round(a.y),Math.round(a.width),Math.round(a.height))):G.apply(this,arguments)};var F=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(b,a){var d=this.graph.getModel(),e=d.getParent(this.state.cell),
c=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(a)==mxEvent.ROTATION_HANDLE||!d.isEdge(e)||null==c||!c.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&F.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=
-function(){this.state.view.graph.turnShapes([this.state.cell])};var H=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(b,a){H.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var J=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(b,a){J.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=
+function(){this.state.view.graph.turnShapes([this.state.cell])};var H=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(b,a){H.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var I=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(b,a){I.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=
1==this.graph.getSelectionCount()?"":"none")};var L=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){L.apply(this,arguments);var b=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var a=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=
this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(b,d){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(b,d){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell));a()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(b,
a){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var d=this.graph.getLinkForCell(this.state.cell);this.updateLinkHint(d);null!=d&&(b=!0);b&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(b){if(null==b||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=b){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="4px 10px 6px 10px",
@@ -2556,8 +2556,8 @@ this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel()
(function(){function a(){mxCylinder.call(this)}function c(){mxActor.call(this)}function f(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function e(){mxActor.call(this)}function g(){mxCylinder.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function n(){mxActor.call(this)}function m(){mxActor.call(this)}function p(){mxActor.call(this)}function r(){mxActor.call(this)}function s(){mxActor.call(this)}function q(b,a){this.canvas=
b;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=a;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo)}function u(){mxRectangleShape.call(this)}function t(){mxActor.call(this)}function v(){mxActor.call(this)}function z(){mxRectangleShape.call(this)}function y(){mxRectangleShape.call(this)}function x(){mxCylinder.call(this)}function E(){mxShape.call(this)}function A(){mxShape.call(this)}function B(){mxEllipse.call(this)}function D(){mxShape.call(this)}
-function G(){mxShape.call(this)}function F(){mxRectangleShape.call(this)}function H(){mxShape.call(this)}function J(){mxShape.call(this)}function L(){mxShape.call(this)}function N(){mxCylinder.call(this)}function T(){mxDoubleEllipse.call(this)}function X(){mxDoubleEllipse.call(this)}function R(){mxArrowConnector.call(this);this.spacing=0}function C(){mxArrowConnector.call(this);this.spacing=0}function O(){mxActor.call(this)}function P(){mxRectangleShape.call(this)}function M(){mxActor.call(this)}
-function U(){mxActor.call(this)}function I(){mxActor.call(this)}function K(){mxActor.call(this)}function S(){mxActor.call(this)}function Z(){mxActor.call(this)}function ea(){mxActor.call(this)}function da(){mxActor.call(this)}function V(){mxActor.call(this)}function Y(){mxEllipse.call(this)}function aa(){mxEllipse.call(this)}function W(){mxEllipse.call(this)}function Q(){mxRhombus.call(this)}function ga(){mxEllipse.call(this)}function ca(){mxEllipse.call(this)}function $(){mxEllipse.call(this)}function fa(){mxEllipse.call(this)}
+function G(){mxShape.call(this)}function F(){mxRectangleShape.call(this)}function H(){mxShape.call(this)}function I(){mxShape.call(this)}function L(){mxShape.call(this)}function N(){mxCylinder.call(this)}function T(){mxDoubleEllipse.call(this)}function X(){mxDoubleEllipse.call(this)}function R(){mxArrowConnector.call(this);this.spacing=0}function C(){mxArrowConnector.call(this);this.spacing=0}function O(){mxActor.call(this)}function P(){mxRectangleShape.call(this)}function M(){mxActor.call(this)}
+function U(){mxActor.call(this)}function J(){mxActor.call(this)}function K(){mxActor.call(this)}function S(){mxActor.call(this)}function Z(){mxActor.call(this)}function ea(){mxActor.call(this)}function da(){mxActor.call(this)}function V(){mxActor.call(this)}function Y(){mxEllipse.call(this)}function aa(){mxEllipse.call(this)}function W(){mxEllipse.call(this)}function Q(){mxRhombus.call(this)}function ga(){mxEllipse.call(this)}function ca(){mxEllipse.call(this)}function $(){mxEllipse.call(this)}function fa(){mxEllipse.call(this)}
function ia(){mxActor.call(this)}function ba(){mxActor.call(this)}function ka(){mxActor.call(this)}function va(b,a,d,e,c,f,g,k,l,n){g+=l;var m=e.clone();e.x-=c*(2*g+l);e.y-=f*(2*g+l);c*=g+l;f*=g+l;return function(){b.ellipse(m.x-c-g,m.y-f-g,2*g,2*g);n?b.fillAndStroke():b.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(b,a,d,e,c,f){a=Math.max(0,Math.min(e,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f?(b.moveTo(a,c),b.lineTo(a,a),
b.lineTo(0,0),b.moveTo(a,a),b.lineTo(e,a)):(b.moveTo(0,0),b.lineTo(e-a,0),b.lineTo(e,a),b.lineTo(e,c),b.lineTo(a,c),b.lineTo(0,c-a),b.lineTo(0,0),b.close());b.end()};mxCellRenderer.prototype.defaultShapes.cube=a;var sa=Math.tan(mxUtils.toRadians(30)),na=(0.5-sa)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(b,a,d,e,c){a=Math.min(e,c/sa);b.translate((e-a)/2,(c-a)/2+a/4);b.moveTo(0,0.25*a);b.lineTo(0.5*a,a*na);b.lineTo(a,0.25*a);b.lineTo(0.5*a,(0.5-na)*a);b.lineTo(0,
0.25*a);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.isoRectangle=c;mxUtils.extend(f,mxCylinder);f.prototype.size=20;f.prototype.redrawPath=function(b,a,d,e,c,f){a=Math.min(e,c/(0.5+sa));f?(b.moveTo(0,0.25*a),b.lineTo(0.5*a,(0.5-na)*a),b.lineTo(a,0.25*a),b.moveTo(0.5*a,(0.5-na)*a),b.lineTo(0.5*a,(1-na)*a)):(b.translate((e-a)/2,(c-a)/2),b.moveTo(0,0.25*a),b.lineTo(0.5*a,a*na),b.lineTo(a,0.25*a),b.lineTo(a,0.75*a),b.lineTo(0.5*a,(1-na)*a),b.lineTo(0,0.75*a),b.close());b.end()};mxCellRenderer.prototype.defaultShapes.isoCube=
@@ -2597,8 +2597,8 @@ mxRectangleShape.prototype.paintForeground.call(this,b,a,d,e,Math.min(c,f))};mxC
a,d)};H.prototype.paintBackground=function(b,a,d,e,c){var f=this.corner,g=Math.min(e,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),k=Math.min(c,Math.max(1.5*f,parseFloat(mxUtils.getValue(this.style,"height",this.height))));b.begin();b.moveTo(a,d);b.lineTo(a+g,d);b.lineTo(a+g,d+Math.max(0,k-1.5*f));b.lineTo(a+Math.max(0,g-f),d+k);b.lineTo(a,d+k);b.close();b.fillAndStroke();b.begin();b.moveTo(a+g,d);b.lineTo(a+e,d);b.lineTo(a+e,d+c);b.lineTo(a,d+c);b.lineTo(a,d+k);b.stroke()};
mxCellRenderer.prototype.defaultShapes.umlFrame=H;mxPerimeter.LifelinePerimeter=function(b,a,d,e){e=F.prototype.size;null!=a&&(e=mxUtils.getValue(a.style,"size",e)*a.view.scale);a=parseFloat(a.style[mxConstants.STYLE_STROKEWIDTH]||1)*a.view.scale/2-1;d.x<b.getCenterX()&&(a=-1*(a+1));return new mxPoint(b.getCenterX()+a,Math.min(b.y+b.height,Math.max(b.y+e,d.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(b,a,d,e){e=!0;return mxPerimeter.RectanglePerimeter.apply(this,
arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(b,a,d,e){e=parseFloat(a.style[mxConstants.STYLE_STROKEWIDTH]||1)*a.view.scale/2-1;null!=a.style.backboneSize&&(e+=parseFloat(a.style.backboneSize)*a.view.scale/2-1);if("south"==a.style[mxConstants.STYLE_DIRECTION]||"north"==a.style[mxConstants.STYLE_DIRECTION])return d.x<b.getCenterX()&&(e=-1*(e+1)),new mxPoint(b.getCenterX()+e,Math.min(b.y+b.height,Math.max(b.y,d.y)));
-d.y<b.getCenterY()&&(e+=1,e*=-1);return new mxPoint(Math.min(b.x+b.width,Math.max(b.x,d.x)),b.getCenterY()+e)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxUtils.extend(J,mxShape);J.prototype.size=10;J.prototype.paintBackground=function(b,a,d,e,c){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(a,d);b.ellipse((e-f)/2,0,f,f);b.fillAndStroke();b.begin();b.moveTo(e/2,f);b.lineTo(e/2,c);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.lollipop=
-J;mxUtils.extend(L,mxShape);L.prototype.size=10;L.prototype.inset=2;L.prototype.paintBackground=function(b,a,d,e,c){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(a,d);b.begin();b.moveTo(e/2,f+g);b.lineTo(e/2,c);b.end();b.stroke();b.begin();b.moveTo((e-f)/2-g,f/2);b.quadTo((e-f)/2-g,f+g,e/2,f+g);b.quadTo((e+f)/2+g,f+g,(e+f)/2+g,f/2);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.requires=
+d.y<b.getCenterY()&&(e+=1,e*=-1);return new mxPoint(Math.min(b.x+b.width,Math.max(b.x,d.x)),b.getCenterY()+e)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxUtils.extend(I,mxShape);I.prototype.size=10;I.prototype.paintBackground=function(b,a,d,e,c){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(a,d);b.ellipse((e-f)/2,0,f,f);b.fillAndStroke();b.begin();b.moveTo(e/2,f);b.lineTo(e/2,c);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.lollipop=
+I;mxUtils.extend(L,mxShape);L.prototype.size=10;L.prototype.inset=2;L.prototype.paintBackground=function(b,a,d,e,c){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(a,d);b.begin();b.moveTo(e/2,f+g);b.lineTo(e/2,c);b.end();b.stroke();b.begin();b.moveTo((e-f)/2-g,f/2);b.quadTo((e-f)/2-g,f+g,e/2,f+g);b.quadTo((e+f)/2+g,f+g,(e+f)/2+g,f/2);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.requires=
L;mxUtils.extend(N,mxCylinder);N.prototype.jettyWidth=32;N.prototype.jettyHeight=12;N.prototype.redrawPath=function(b,a,d,e,c,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));a=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));d=g/2;var g=d+g/2,k=0.3*c-a/2,l=0.7*c-a/2;f?(b.moveTo(d,k),b.lineTo(g,k),b.lineTo(g,k+a),b.lineTo(d,k+a),b.moveTo(d,l),b.lineTo(g,l),b.lineTo(g,l+a),b.lineTo(d,l+a)):(b.moveTo(d,0),b.lineTo(e,0),b.lineTo(e,c),b.lineTo(d,c),
b.lineTo(d,l+a),b.lineTo(0,l+a),b.lineTo(0,l),b.lineTo(d,l),b.lineTo(d,k+a),b.lineTo(0,k+a),b.lineTo(0,k),b.lineTo(d,k),b.close());b.end()};mxCellRenderer.prototype.defaultShapes.component=N;mxUtils.extend(T,mxDoubleEllipse);T.prototype.outerStroke=!0;T.prototype.paintVertexShape=function(b,a,d,e,c){var f=Math.min(4,Math.min(e/5,c/5));0<e&&0<c&&(b.ellipse(a+f,d+f,e-2*f,c-2*f),b.fillAndStroke());b.setShadow(!1);this.outerStroke&&(b.ellipse(a,d,e,c),b.stroke())};mxCellRenderer.prototype.defaultShapes.endState=
T;mxUtils.extend(X,T);X.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=X;mxUtils.extend(R,mxArrowConnector);R.prototype.defaultWidth=4;R.prototype.isOpenEnded=function(){return!0};R.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};R.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=R;mxUtils.extend(C,mxArrowConnector);C.prototype.defaultWidth=
@@ -2607,9 +2607,9 @@ mxActor);O.prototype.size=30;O.prototype.redrawPath=function(b,a,d,e,c){a=Math.m
P.prototype.paintForeground=function(b,a,d,e,c){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(e*g,c*g));g=Math.max(f,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.begin();b.moveTo(a,d+f);b.lineTo(a+e,d+f);b.end();b.stroke();
b.begin();b.moveTo(a+g,d);b.lineTo(a+g,d+c);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=P;mxUtils.extend(M,mxActor);M.prototype.dx=20;M.prototype.dy=20;M.prototype.redrawPath=function(b,a,d,e,c){a=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));Math.min(e/2,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=mxUtils.getValue(this.style,
mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(e,0),new mxPoint(e,d),new mxPoint(a,d),new mxPoint(a,c),new mxPoint(0,c)],this.isRounded,f,!0);b.end()};mxCellRenderer.prototype.defaultShapes.corner=M;mxUtils.extend(U,mxActor);U.prototype.dx=20;U.prototype.dy=20;U.prototype.redrawPath=function(b,a,d,e,c){a=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,
-"dy",this.dy))));Math.abs(e-a);Math.min(e/2,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(e,0),new mxPoint(e,d),new mxPoint((e+a)/2,d),new mxPoint((e+a)/2,c),new mxPoint((e-a)/2,c),new mxPoint((e-a)/2,d),new mxPoint(0,d)],this.isRounded,f,!0);b.end()};mxCellRenderer.prototype.defaultShapes.tee=U;mxUtils.extend(I,mxActor);I.prototype.arrowWidth=
-0.3;I.prototype.arrowSize=0.2;I.prototype.redrawPath=function(b,a,d,e,c){var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));a=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));d=(c-f)/2;var f=d+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,d),new mxPoint(e-a,d),new mxPoint(e-a,0),new mxPoint(e,c/2),new mxPoint(e-a,c),new mxPoint(e-a,
-f),new mxPoint(0,f)],this.isRounded,g,!0);b.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=I;mxUtils.extend(K,mxActor);K.prototype.redrawPath=function(b,a,d,e,c){var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",I.prototype.arrowWidth))));a=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",I.prototype.arrowSize))));d=(c-f)/2;var f=d+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,
+"dy",this.dy))));Math.abs(e-a);Math.min(e/2,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(e,0),new mxPoint(e,d),new mxPoint((e+a)/2,d),new mxPoint((e+a)/2,c),new mxPoint((e-a)/2,c),new mxPoint((e-a)/2,d),new mxPoint(0,d)],this.isRounded,f,!0);b.end()};mxCellRenderer.prototype.defaultShapes.tee=U;mxUtils.extend(J,mxActor);J.prototype.arrowWidth=
+0.3;J.prototype.arrowSize=0.2;J.prototype.redrawPath=function(b,a,d,e,c){var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));a=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));d=(c-f)/2;var f=d+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,d),new mxPoint(e-a,d),new mxPoint(e-a,0),new mxPoint(e,c/2),new mxPoint(e-a,c),new mxPoint(e-a,
+f),new mxPoint(0,f)],this.isRounded,g,!0);b.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=J;mxUtils.extend(K,mxActor);K.prototype.redrawPath=function(b,a,d,e,c){var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",J.prototype.arrowWidth))));a=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",J.prototype.arrowSize))));d=(c-f)/2;var f=d+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,
[new mxPoint(0,c/2),new mxPoint(a,0),new mxPoint(a,d),new mxPoint(e-a,d),new mxPoint(e-a,0),new mxPoint(e,c/2),new mxPoint(e-a,c),new mxPoint(e-a,f),new mxPoint(a,f),new mxPoint(a,c)],this.isRounded,g,!0);b.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=K;mxUtils.extend(S,mxActor);S.prototype.size=0.1;S.prototype.redrawPath=function(b,a,d,e,c){a=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(a,0);b.lineTo(e,0);b.quadTo(e-2*a,c/2,e,c);b.lineTo(a,
c);b.quadTo(a-2*a,c/2,a,0);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.dataStorage=S;mxUtils.extend(Z,mxActor);Z.prototype.redrawPath=function(b,a,d,e,c){b.moveTo(0,0);b.quadTo(e,0,e,c/2);b.quadTo(e,c,0,c);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.or=Z;mxUtils.extend(ea,mxActor);ea.prototype.redrawPath=function(b,a,d,e,c){b.moveTo(0,0);b.quadTo(e,0,e,c/2);b.quadTo(e,c,0,c);b.quadTo(e/2,c/2,0,0);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.xor=ea;mxUtils.extend(da,
mxActor);da.prototype.size=20;da.prototype.redrawPath=function(b,a,d,e,c){a=Math.min(e/2,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(a,0),new mxPoint(e-a,0),new mxPoint(e,0.8*a),new mxPoint(e,c),new mxPoint(0,c),new mxPoint(0,0.8*a)],this.isRounded,d,!0);b.end()};mxCellRenderer.prototype.defaultShapes.loopLimit=da;mxUtils.extend(V,mxActor);V.prototype.size=0.375;
@@ -2629,7 +2629,7 @@ b.execute=function(){for(var b=0;b<a.length;b++)this.copyStyle(a[b])};b.getPosit
100*(b.width-a.x+b.x)/Math.min(b.width,b.height)));this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(b)})},la=function(){return function(b){var a=[];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&a.push(ma(b));return a}},ja=function(b){return function(a){var d=[ha(a,["size"],function(a){var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.state.style,"size",p.prototype.size))));return new mxPoint(a.x+0.75*d*a.width,a.y+a.height/4)},function(a,d){this.state.style.size=Math.max(0,
Math.min(b,(d.x-a.x)/(0.75*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ma(a));return d}},pa=function(b,a,d){d=null!=d?d:1;return function(e){var c=[ha(e,["size"],function(a){var d=parseFloat(mxUtils.getValue(this.state.style,"size",b));return new mxPoint(a.x+d*a.width,a.getCenterY())},function(b,a){this.state.style.size=Math.max(0,Math.min(d,(a.x-b.x)/b.width))})];a&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ma(e));return c}},ta=function(b,a,d){return function(e){var c=
[ha(e,["size"],function(d){var e=Math.max(0,Math.min(d.width,Math.min(d.height,parseFloat(mxUtils.getValue(this.state.style,"size",a)))))*b;return new mxPoint(d.x+e,d.y+e)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,d.x-a.x),Math.min(a.height,d.y-a.y)))/b)})];d&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ma(e));return c}},xa=function(b){return function(a){return[ha(a,["arrowWidth","arrowSize"],function(a){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"arrowWidth",I.prototype.arrowWidth))),e=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",I.prototype.arrowSize)));return new mxPoint(a.x+(1-e)*a.width,a.y+(1-d)*a.height/2)},function(a,d){this.state.style.arrowWidth=Math.max(0,Math.min(1,2*(Math.abs(a.y+a.height/2-d.y)/a.height)));this.state.style.arrowSize=Math.max(0,Math.min(b,(a.x+a.width-d.x)/a.width))})]}},oa=function(b,a,d,e,c){var f=b.absolutePoints,g=f.length-1,k=b.view.translate,l=b.view.scale,n=d?f[0]:f[g],m=d?f[1]:f[g-
+"arrowWidth",J.prototype.arrowWidth))),e=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",J.prototype.arrowSize)));return new mxPoint(a.x+(1-e)*a.width,a.y+(1-d)*a.height/2)},function(a,d){this.state.style.arrowWidth=Math.max(0,Math.min(1,2*(Math.abs(a.y+a.height/2-d.y)/a.height)));this.state.style.arrowSize=Math.max(0,Math.min(b,(a.x+a.width-d.x)/a.width))})]}},oa=function(b,a,d,e,c){var f=b.absolutePoints,g=f.length-1,k=b.view.translate,l=b.view.scale,n=d?f[0]:f[g],m=d?f[1]:f[g-
1],t=m.x-n.x,u=m.y-n.y,q=Math.sqrt(t*t+u*u);return ha(b,a,function(b){b=e.call(this,q,t/q,u/q,n,m);return new mxPoint(b.x/l-k.x,b.y/l-k.y)},function(b,a,d){b=Math.sqrt(t*t+u*u);a.x=(a.x+k.x)*l;a.y=(a.y+k.y)*l;c.call(this,b,t/b,u/b,n,m,a,d)})},ya=function(b,a,d){return oa(b,["width"],a,function(a,e,c,f,g){g=b.shape.getEdgeWidth()*b.view.scale+d;return new mxPoint(f.x+e*a/4+c*g/2,f.y+c*a/4-e*g/2)},function(a,e,c,f,g,k){a=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,k.x,k.y));b.style.width=Math.round(2*
a)/b.view.scale-d})},ua={link:function(b){return[ya(b,!0,10),ya(b,!1,10)]},flexArrow:function(b){var a=b.view.graph.gridSize/b.view.scale,d=[];mxUtils.getValue(b.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(d.push(oa(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(a,d,e,c,f){a=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;f=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(c.x+
d*(f+b.shape.strokewidth*b.view.scale)+e*a/2,c.y+e*(f+b.shape.strokewidth*b.view.scale)-d*a/2)},function(d,e,c,f,g,k,l){d=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,k.x,k.y));e=mxUtils.ptLineDist(f.x,f.y,f.x+c,f.y-e,k.x,k.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(e-b.shape.strokewidth)/3)/100/b.view.scale;b.style.width=Math.round(2*d)/b.view.scale;mxEvent.isControlDown(l.getEvent())&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(l.getEvent())||
@@ -2669,12 +2669,12 @@ O.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.cons
0.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(0.25,0.5),!1),new mxConnectionConstraint(new mxPoint(0.75,0.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(0.5,0.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.35),!1),new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(0,0.65),!1),new mxConnectionConstraint(new mxPoint(1,
0.35),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.65),!1),new mxConnectionConstraint(new mxPoint(0.25,1),!1),new mxConnectionConstraint(new mxPoint(0.75,0),!1)];t.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,0),!0),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.75,0),!0),new mxConnectionConstraint(new mxPoint(0.25,1),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0.75,
1),!0),new mxConnectionConstraint(new mxPoint(0.1,0.25),!1),new mxConnectionConstraint(new mxPoint(0.2,0.5),!1),new mxConnectionConstraint(new mxPoint(0.1,0.75),!1),new mxConnectionConstraint(new mxPoint(0.9,0.25),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1),new mxConnectionConstraint(new mxPoint(0.9,0.75),!1)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(0.25,0.5),!1),new mxConnectionConstraint(new mxPoint(0.75,0.5),
-!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1)];J.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.5,0),!1),new mxConnectionConstraint(new mxPoint(0.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.25),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0,0.75),!0),
+!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1)];I.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.5,0),!1),new mxConnectionConstraint(new mxPoint(0.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.25),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0,0.75),!0),
new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(1,0.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.375,0),!0),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.625,0),!0),new mxConnectionConstraint(new mxPoint(0.125,0.25),!1),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0.125,0.75),!1),new mxConnectionConstraint(new mxPoint(0.875,
0.25),!1),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.5),!0),new mxConnectionConstraint(new mxPoint(0.875,0.75),!1),new mxConnectionConstraint(new mxPoint(0.375,1),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,0.25),!1),new mxConnectionConstraint(new mxPoint(0.4,0.1),!1),new mxConnectionConstraint(new mxPoint(0.16,
0.55),!1),new mxConnectionConstraint(new mxPoint(0.07,0.4),!1),new mxConnectionConstraint(new mxPoint(0.31,0.8),!1),new mxConnectionConstraint(new mxPoint(0.13,0.77),!1),new mxConnectionConstraint(new mxPoint(0.8,0.8),!1),new mxConnectionConstraint(new mxPoint(0.55,0.95),!1),new mxConnectionConstraint(new mxPoint(0.875,0.5),!1),new mxConnectionConstraint(new mxPoint(0.96,0.7),!1),new mxConnectionConstraint(new mxPoint(0.625,0.2),!1),new mxConnectionConstraint(new mxPoint(0.88,0.25),!1)];m.prototype.constraints=
mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,0),!0),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.75,0),!0),new mxConnectionConstraint(new mxPoint(0,0.25),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0,0.75),!0),new mxConnectionConstraint(new mxPoint(1,0.25),!0),new mxConnectionConstraint(new mxPoint(1,
-0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.75),!0)];mxArrow.prototype.constraints=null;U.prototype.constraints=null;M.prototype.constraints=null;I.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1)];K.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,
+0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.75),!0)];mxArrow.prototype.constraints=null;U.prototype.constraints=null;M.prototype.constraints=null;J.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1)];K.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,
0.5),!1),new mxConnectionConstraint(new mxPoint(0.5,0),!1),new mxConnectionConstraint(new mxPoint(0.5,1),!1)];F.prototype.constraints=null;Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.25),!1),new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(0,0.75),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1),new mxConnectionConstraint(new mxPoint(0.7,0.1),!1),new mxConnectionConstraint(new mxPoint(0.7,0.9),!1)];ea.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.175,
0.25),!1),new mxConnectionConstraint(new mxPoint(0.25,0.5),!1),new mxConnectionConstraint(new mxPoint(0.175,0.75),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1),new mxConnectionConstraint(new mxPoint(0.7,0.1),!1),new mxConnectionConstraint(new mxPoint(0.7,0.9),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){function a(b){d.escape();var a=d.getDeletableCells(d.getSelectionCells());if(null!=a&&0<a.length){var e=d.model.getParents(a);d.removeCells(a,b);if(null!=e){b=[];for(a=0;a<e.length;a++)(d.model.isVertex(e[a])||d.model.isEdge(e[a]))&&b.push(e[a]);d.setSelectionCells(b)}}}var c=this.editorUi,f=c.editor,d=f.graph,b=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){window.open(c.getUrl())});this.addAction("open...",
@@ -2858,16 +2858,16 @@ mxResources.get("middle"),this.editorUi.menus.createStyleChangeFunction([mxConst
z.style.display="none",m.style.display="none",E=this.editorUi.toolbar.addButton("geSprite-justifyfull",null,function(){document.execCommand("justifyfull",!1,null)},p),this.styleButtons([E,y=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" (Ctrl+,)",function(){document.execCommand("subscript",!1,null)},p),x=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" (Ctrl+.)",function(){document.execCommand("superscript",!1,null)},p)]),
E.style.marginRight="9px",u=p.cloneNode(!1),u.style.paddingTop="4px",p=[this.editorUi.toolbar.addButton("geSprite-orderedlist",mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},u),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},u),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",
!1,null)},u),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",!1,null)},u),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},u)],this.styleButtons(p),p[p.length-1].style.marginLeft="9px",mxClient.IS_QUIRKS&&(mxUtils.br(a),u.style.height="40"),a.appendChild(u)):(n[2].style.marginRight="9px",q.style.marginRight="9px");p=e.cloneNode(!1);p.style.marginLeft="0px";
-p.style.paddingTop="8px";p.style.paddingBottom="4px";p.style.fontWeight="normal";mxUtils.write(p,mxResources.get("position"));var F=document.createElement("select");F.style.position="absolute";F.style.right="20px";F.style.width="97px";F.style.marginTop="-2px";for(var H="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),J={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,
+p.style.paddingTop="8px";p.style.paddingBottom="4px";p.style.fontWeight="normal";mxUtils.write(p,mxResources.get("position"));var F=document.createElement("select");F.style.position="absolute";F.style.right="20px";F.style.width="97px";F.style.marginTop="-2px";for(var H="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),I={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,
mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,
mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},u=0;u<H.length;u++){var L=document.createElement("option");L.setAttribute("value",H[u]);mxUtils.write(L,mxResources.get(H[u]));F.appendChild(L)}p.appendChild(F);H=e.cloneNode(!1);H.style.marginLeft="0px";H.style.paddingTop=
"4px";H.style.paddingBottom="4px";H.style.fontWeight="normal";mxUtils.write(H,mxResources.get("writingDirection"));var N=document.createElement("select");N.style.position="absolute";N.style.right="20px";N.style.width="97px";N.style.marginTop="-2px";for(var L=["automatic","leftToRight","rightToLeft"],T={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},u=0;u<L.length;u++){var X=document.createElement("option");X.setAttribute("value",L[u]);mxUtils.write(X,
-mxResources.get(L[u]));N.appendChild(X)}H.appendChild(N);d.isEditing()||(a.appendChild(p),mxEvent.addListener(F,"change",function(b){d.getModel().beginUpdate();try{var a=J[F.value];null!=a&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,a[0],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,a[1],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_ALIGN,a[2],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,a[3],d.getSelectionCells()))}finally{d.getModel().endUpdate()}mxEvent.consume(b)}),
+mxResources.get(L[u]));N.appendChild(X)}H.appendChild(N);d.isEditing()||(a.appendChild(p),mxEvent.addListener(F,"change",function(b){d.getModel().beginUpdate();try{var a=I[F.value];null!=a&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,a[0],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,a[1],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_ALIGN,a[2],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,a[3],d.getSelectionCells()))}finally{d.getModel().endUpdate()}mxEvent.consume(b)}),
a.appendChild(H),mxEvent.addListener(N,"change",function(b){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,T[N.value],d.getSelectionCells());mxEvent.consume(b)}));var R=document.createElement("input");R.style.textAlign="right";R.style.marginTop="4px";mxClient.IS_QUIRKS||(R.style.position="absolute",R.style.right="32px");R.style.width="46px";R.style.height=mxClient.IS_QUIRKS?"21px":"17px";k.appendChild(R);var C=null,p=this.installInputHandler(R,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,
1,999," pt",function(b){C=b;document.execCommand("fontSize",!1,"4");b=d.cellEditor.textarea.getElementsByTagName("font");for(var a=0;a<b.length;a++)if("4"==b[a].getAttribute("size")){b[a].removeAttribute("size");b[a].style.fontSize=C+"px";window.setTimeout(function(){R.value=C+" pt";C=null},0);break}},!0),p=this.createStepper(R,p,1,10,!0,Menus.prototype.defaultFontSize);p.style.display=R.style.display;p.style.marginTop="4px";mxClient.IS_QUIRKS||(p.style.right="20px");k.appendChild(p);k=l.getElementsByTagName("div")[0];
-k.style.cssFloat="right";var O=null,P="#ffffff",M=null,U="#000000",I=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return P},function(b){document.execCommand("backcolor",!1,b!=mxConstants.NONE?b:"transparent")},"#ffffff",{install:function(b){O=b},destroy:function(){O=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff");I.style.fontWeight="bold";var K=this.createCellColorOption(mxResources.get("borderColor"),
-mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");K.style.fontWeight="bold";k=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return U},function(b){document.execCommand("forecolor",!1,b!=mxConstants.NONE?b:"transparent")},"#000000",{install:function(b){M=b},destroy:function(){M=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(b){I.style.display=null==b||b==mxConstants.NONE?"none":"";K.style.display=
-I.style.display},function(b){null==b||b==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",d.getSelectionCells()):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,d.getSelectionCells())});k.style.fontWeight="bold";g.appendChild(k);g.appendChild(I);d.cellEditor.isContentEditing()||g.appendChild(K);a.appendChild(g);g=this.createPanel();g.style.paddingTop="2px";g.style.paddingBottom="4px";k=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",
+k.style.cssFloat="right";var O=null,P="#ffffff",M=null,U="#000000",J=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return P},function(b){document.execCommand("backcolor",!1,b!=mxConstants.NONE?b:"transparent")},"#ffffff",{install:function(b){O=b},destroy:function(){O=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff");J.style.fontWeight="bold";var K=this.createCellColorOption(mxResources.get("borderColor"),
+mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");K.style.fontWeight="bold";k=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return U},function(b){document.execCommand("forecolor",!1,b!=mxConstants.NONE?b:"transparent")},"#000000",{install:function(b){M=b},destroy:function(){M=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(b){J.style.display=null==b||b==mxConstants.NONE?"none":"";K.style.display=
+J.style.display},function(b){null==b||b==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",d.getSelectionCells()):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,d.getSelectionCells())});k.style.fontWeight="bold";g.appendChild(k);g.appendChild(J);d.cellEditor.isContentEditing()||g.appendChild(K);a.appendChild(g);g=this.createPanel();g.style.paddingTop="2px";g.style.paddingBottom="4px";k=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",
null,null,!0);k.style.fontWeight="bold";!b.containsLabel&&!b.autoSize&&0==b.edges.length&&g.appendChild(k);k=this.createCellOption(mxResources.get("formattedText"),"html","0",null,null,null,f.actions.get("formattedText"));k.style.fontWeight="bold";g.appendChild(k);k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="28px";k.style.fontWeight="normal";p=document.createElement("div");p.style.position="absolute";p.style.width="70px";p.style.marginTop="0px";p.style.fontWeight="bold";mxUtils.write(p,
mxResources.get("spacing"));k.appendChild(p);var S,Z,ea,da,V,Y=this.addUnitInput(k,"pt",91,44,function(){S.apply(this,arguments)}),aa=this.addUnitInput(k,"pt",20,44,function(){Z.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("top"),91);this.addLabel(k,mxResources.get("global"),20);mxUtils.br(k);mxUtils.br(k);var W=this.addUnitInput(k,"pt",162,44,function(){ea.apply(this,arguments)}),Q=this.addUnitInput(k,"pt",91,44,function(){da.apply(this,arguments)}),ga=this.addUnitInput(k,
"pt",20,44,function(){V.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("left"),162);this.addLabel(k,mxResources.get("bottom"),91);this.addLabel(k,mxResources.get("right"),20);if(d.cellEditor.isContentEditing()){var ca=null,$=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(b){var a=""==b.value?120:parseInt(b.value),a=Math.max(120,isNaN(a)?120:a);null!=ca&&(d.cellEditor.restoreSelection(ca),ca=null);for(var e=d.getSelectedElement();null!=
@@ -2941,7 +2941,7 @@ this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],
"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-enderoneopt",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-endermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}));this.addArrow(u,8);this.addArrow(x);this.addArrow(E);
this.addArrow(A);z=this.addArrow(n,9);z.className="geIcon";z.style.width="84px";y=this.addArrow(m,9);y.className="geIcon";y.style.width="22px";var B=document.createElement("div");B.style.width="85px";B.style.height="1px";B.style.borderBottom="1px solid black";B.style.marginBottom="9px";z.appendChild(B);var D=document.createElement("div");D.style.width="23px";D.style.height="1px";D.style.borderBottom="1px solid black";D.style.marginBottom="9px";y.appendChild(D);n.style.height="15px";m.style.height=
"15px";u.style.height="15px";x.style.height="17px";E.style.marginLeft="3px";E.style.height="17px";A.style.marginLeft="3px";A.style.height="17px";a.appendChild(g);a.appendChild(q);a.appendChild(r);n=r.cloneNode(!1);n.style.paddingBottom="6px";n.style.paddingTop="4px";n.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="2px";m.style.fontWeight="normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));
-n.appendChild(m);var G,F,H=this.addUnitInput(n,"pt",74,33,function(){G.apply(this,arguments)}),J=this.addUnitInput(n,"pt",20,33,function(){F.apply(this,arguments)});mxUtils.br(n);z=document.createElement("div");z.style.height="8px";n.appendChild(z);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));n.appendChild(m);var L,N,T=this.addUnitInput(n,"pt",74,33,function(){L.apply(this,arguments)}),X=this.addUnitInput(n,"pt",20,33,function(){N.apply(this,arguments)});mxUtils.br(n);this.addLabel(n,
+n.appendChild(m);var G,F,H=this.addUnitInput(n,"pt",74,33,function(){G.apply(this,arguments)}),I=this.addUnitInput(n,"pt",20,33,function(){F.apply(this,arguments)});mxUtils.br(n);z=document.createElement("div");z.style.height="8px";n.appendChild(z);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));n.appendChild(m);var L,N,T=this.addUnitInput(n,"pt",74,33,function(){L.apply(this,arguments)}),X=this.addUnitInput(n,"pt",20,33,function(){N.apply(this,arguments)});mxUtils.br(n);this.addLabel(n,
mxResources.get("spacing"),74,50);this.addLabel(n,mxResources.get("size"),20,50);mxUtils.br(n);g=g.cloneNode(!1);g.style.fontWeight="normal";g.style.position="relative";g.style.paddingLeft="16px";g.style.marginBottom="2px";g.style.marginTop="6px";g.style.borderWidth="0px";g.style.paddingBottom="18px";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="1px";m.style.fontWeight="normal";m.style.width="120px";mxUtils.write(m,
mxResources.get("perimeter"));g.appendChild(m);var R,C=this.addUnitInput(g,"pt",20,41,function(){R.apply(this,arguments)});e.edges.length==b.getSelectionCount()?(a.appendChild(l),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(n)):e.vertices.length==b.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(g));var O=mxUtils.bind(this,function(a,c,f){function g(b,a,c,f){c=c.getElementsByTagName("div")[0];c.className=d.getCssClassForMarker(f,e.style.shape,b,a);return c}
e=this.format.getSelectionState();mxUtils.getValue(e.style,p,null);if(f||document.activeElement!=t)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),t.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=v)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),v.value=isNaN(a)?"":a+" pt";k.style.visibility="connector"==e.style.shape?"":"hidden";"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?k.value="curved":"1"==mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,
@@ -2949,9 +2949,9 @@ null)&&(k.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHE
c&&"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?a.className="geSprite geSprite-curved":a.className="straight"==c||"none"==c||null==c?"geSprite geSprite-straight":"entityRelationEdgeStyle"==c?"geSprite geSprite-entity":"elbowEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":
"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal";u.getElementsByTagName("div")[0].className="link"==e.style.shape?"geSprite geSprite-linkedge":"flexArrow"==e.style.shape?"geSprite geSprite-arrow":"arrow"==e.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection";e.edges.length==b.getSelectionCount()?(q.style.display="",r.style.display="none"):(q.style.display="none",r.style.display="");a=g(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,
"startFill","1"),E,"start");c=g(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,"endFill","1"),A,"end");"arrow"==e.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-noarrow");mxUtils.setOpacity(x,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape?(mxUtils.setOpacity(E,30),mxUtils.setOpacity(A,
-30)):(mxUtils.setOpacity(E,100),mxUtils.setOpacity(A,100));if(f||document.activeElement!=X)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),X.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=T)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),T.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=J)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),J.value=isNaN(a)?
-"":a+" pt";if(f||document.activeElement!=T)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),H.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=C)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),C.value=isNaN(a)?"":a+" pt"});N=this.installInputHandler(X,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");L=this.installInputHandler(T,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");F=this.installInputHandler(J,
-mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");G=this.installInputHandler(H,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");R=this.installInputHandler(C,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(t,O);this.addKeyHandler(X,O);this.addKeyHandler(T,O);this.addKeyHandler(J,O);this.addKeyHandler(H,O);this.addKeyHandler(C,O);b.getModel().addListener(mxEvent.CHANGE,O);this.listeners.push({destroy:function(){b.getModel().removeListener(O)}});
+30)):(mxUtils.setOpacity(E,100),mxUtils.setOpacity(A,100));if(f||document.activeElement!=X)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),X.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=T)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),T.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=I)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),I.value=isNaN(a)?
+"":a+" pt";if(f||document.activeElement!=T)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),H.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=C)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),C.value=isNaN(a)?"":a+" pt"});N=this.installInputHandler(X,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");L=this.installInputHandler(T,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");F=this.installInputHandler(I,
+mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");G=this.installInputHandler(H,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");R=this.installInputHandler(C,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(t,O);this.addKeyHandler(X,O);this.addKeyHandler(T,O);this.addKeyHandler(I,O);this.addKeyHandler(H,O);this.addKeyHandler(C,O);b.getModel().addListener(mxEvent.CHANGE,O);this.listeners.push({destroy:function(){b.getModel().removeListener(O)}});
O();return a};
StyleFormatPanel.prototype.addEffects=function(a){var c=this.editorUi.editor.graph,f=this.format.getSelectionState();a.style.paddingTop="0px";a.style.paddingBottom="2px";var d=document.createElement("table");mxClient.IS_QUIRKS&&(d.style.fontSize="1em");d.style.width="100%";d.style.fontWeight="bold";d.style.paddingRight="20px";var b=document.createElement("tbody"),e=document.createElement("tr");e.style.padding="0px";var g=document.createElement("td");g.style.padding="0px";g.style.width="50%";g.setAttribute("valign",
"top");var k=g.cloneNode(!0);k.style.paddingLeft="8px";e.appendChild(g);e.appendChild(k);b.appendChild(e);d.appendChild(b);a.appendChild(d);var l=g,n=0,m=mxUtils.bind(this,function(b,a,d){b=this.createCellOption(b,a,d);b.style.width="100%";l.appendChild(b);l=l==g?k:g;n++}),p=mxUtils.bind(this,function(b,d,e){f=this.format.getSelectionState();g.innerHTML="";k.innerHTML="";l=g;f.rounded&&m(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);"swimlane"==f.style.shape&&m(mxResources.get("divider"),
@@ -3920,11 +3920,11 @@ v.vertex=!0;var z=new mxCell("",new mxGeometry(780,477,10,5),"shape\x3dtriangle;
x.vertex=!0;var E=new mxCell("Marketing Department",new mxGeometry(10,563,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;fontSize\x3d12;rSize\x3d3;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;labelPosition\x3dright;spacingLeft\x3d5;");E.vertex=!0;var A=new mxCell("Design Department",new mxGeometry(10,583,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.checkbox;fontSize\x3d12;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;labelPosition\x3dright;spacingLeft\x3d5;");
A.vertex=!0;var B=new mxCell("Financial Department",new mxGeometry(10,603,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;fontSize\x3d12;rSize\x3d3;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;labelPosition\x3dright;spacingLeft\x3d5;");B.vertex=!0;var D=new mxCell("Supply Department",new mxGeometry(10,623,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;fontSize\x3d12;rSize\x3d3;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;labelPosition\x3dright;spacingLeft\x3d5;");
D.vertex=!0;var G=new mxCell("Set Type",new mxGeometry(410,520,200,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rect;strokeColor\x3dnone;fillColor\x3dnone;fontColor\x3d#999999;align\x3dleft;spacingLeft\x3d5;whiteSpace\x3dwrap;");G.vertex=!0;var F=new mxCell("",new mxGeometry(420,543,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");F.vertex=!0;var H=new mxCell("News",new mxGeometry(440,543,40,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#58B957;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");
-H.vertex=!0;var J=new mxCell("",new mxGeometry(420,563,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.radioButton;strokeColor\x3d#999999;fillColor\x3d#ffffff;");J.vertex=!0;var L=new mxCell("Reports",new mxGeometry(440,563,50,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#55BFE0;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");L.vertex=!0;var N=new mxCell("",new mxGeometry(420,
+H.vertex=!0;var I=new mxCell("",new mxGeometry(420,563,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.radioButton;strokeColor\x3d#999999;fillColor\x3d#ffffff;");I.vertex=!0;var L=new mxCell("Reports",new mxGeometry(440,563,50,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#55BFE0;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");L.vertex=!0;var N=new mxCell("",new mxGeometry(420,
583,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");N.vertex=!0;var T=new mxCell("Documents",new mxGeometry(440,583,70,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#EFAC43;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");T.vertex=!0;var X=new mxCell("",new mxGeometry(420,603,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");
X.vertex=!0;var R=new mxCell("Media",new mxGeometry(440,603,40,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#3D8BCD;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");R.vertex=!0;var C=new mxCell("",new mxGeometry(420,623,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");C.vertex=!0;var O=new mxCell("Text",new mxGeometry(440,623,30,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#999999;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");
O.vertex=!0;var P=new mxCell("Save Template",new mxGeometry(0,680,150,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d5;strokeColor\x3dnone;fillColor\x3d#3D8BCD;fontColor\x3d#ffffff;fontSize\x3d16;whiteSpace\x3dwrap;");P.vertex=!0;var M=new mxCell("Cancel",new mxGeometry(170,680,100,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;fillColor\x3d#ffffff;align\x3dcenter;rSize\x3d5;strokeColor\x3d#dddddd;fontSize\x3d16;whiteSpace\x3dwrap;");
-M.vertex=!0;var U=new mxCell("Delete Template",new mxGeometry(630,680,170,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d5;strokeColor\x3dnone;fillColor\x3d#DB524C;fontColor\x3d#ffffff;fontSize\x3d16;whiteSpace\x3dwrap;");U.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,n,m,p,r,s,q,u,t,v,z,y,x,E,A,B,D,G,F,H,J,L,N,T,X,R,C,O,P,M,U],800,720,"Edit Template")}),this.addEntry("bootstrap business contact",function(){var c=new mxCell("",new mxGeometry(0,
+M.vertex=!0;var U=new mxCell("Delete Template",new mxGeometry(630,680,170,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d5;strokeColor\x3dnone;fillColor\x3d#DB524C;fontColor\x3d#ffffff;fontSize\x3d16;whiteSpace\x3dwrap;");U.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,n,m,p,r,s,q,u,t,v,z,y,x,E,A,B,D,G,F,H,I,L,N,T,X,R,C,O,P,M,U],800,720,"Edit Template")}),this.addEntry("bootstrap business contact",function(){var c=new mxCell("",new mxGeometry(0,
0,800,50),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.horLines;strokeColor\x3d#dddddd;fillColor\x3d#fdfdfd;");c.vertex=!0;var d=new mxCell("2 fields selected",new mxGeometry(0,0.5,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.checkbox;strokeColor\x3d#dddddd;fillColor\x3dnone;align\x3dleft;labelPosition\x3dright;spacingLeft\x3d10;fontStyle\x3d1;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(13,-7);d.vertex=!0;c.insert(d);d=new mxCell("Mark as OK",new mxGeometry(0,
0.5,90,30),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#dddddd;;fillColor\x3d#ffffff;whiteSpace\x3dwrap;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(150,-15);d.vertex=!0;c.insert(d);d=new mxCell("Mark as Violation",new mxGeometry(0,0.5,120,30),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#dddddd;;fillColor\x3d#ffffff;whiteSpace\x3dwrap;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(250,
-15);d.vertex=!0;c.insert(d);d=new mxCell("Mark all as OK",new mxGeometry(1,0.5,100,30),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#dddddd;;fillColor\x3d#ffffff;whiteSpace\x3dwrap;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(-110,-15);d.vertex=!0;c.insert(d);d=new mxCell("Phone",new mxGeometry(40,70,100,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rect;strokeColor\x3dnone;fillColor\x3dnone;fontColor\x3d#999999;align\x3dleft;spacingLeft\x3d5;whiteSpace\x3dwrap;");
@@ -6997,22 +6997,23 @@ a.showDialog(b.container,300,80,!0,!0);b.init()}),c.className="geBtn",n.appendCh
t.style.marginTop="0px";t.style.marginBottom="24px";q.appendChild(t);mxUtils.write(q,mxResources.get("filename")+":");var v=document.createElement("input");v.setAttribute("value",c);v.style.width="280px";v.style.marginLeft="10px";v.style.marginBottom="20px";this.init=function(){v.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null)};q.appendChild(v);mxUtils.br(q);var z=document.createElement("div");z.style.textAlign="center";u?(z.style.marginTop=
"6px",q.appendChild(z)):mxUtils.write(q,mxResources.get("chooseAnOption")+":");var y=document.createElement("select");y.style.marginLeft="10px";"function"===typeof window.DriveClient&&(b=document.createElement("option"),b.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(b,mxResources.get("googleDrive")),y.appendChild(b),p(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive"));"function"===typeof window.DropboxClient&&(b=document.createElement("option"),b.setAttribute("value",
App.MODE_DROPBOX),mxUtils.write(b,mxResources.get("dropbox")),y.appendChild(b),a.mode==App.MODE_DROPBOX&&b.setAttribute("selected","selected"),p(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox"));"function"===typeof window.OneDriveClient&&(b=document.createElement("option"),b.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(b,mxResources.get("oneDrive")),y.appendChild(b),a.mode==App.MODE_ONEDRIVE&&b.setAttribute("selected","selected"),p(IMAGE_PATH+"/onedrive-logo.svg",
-mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive"));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&!mxClient.IS_IOS)b=document.createElement("option"),b.setAttribute("value",App.MODE_DEVICE),mxUtils.write(b,mxResources.get("device")),y.appendChild(b),(a.mode==App.MODE_DEVICE||!k)&&b.setAttribute("selected","selected"),m&&(mxUtils.br(z),p(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE));k&&isLocalStorage&&(k=document.createElement("option"),
-k.setAttribute("value",App.MODE_BROWSER),mxUtils.write(k,mxResources.get("browser")),y.appendChild(k),a.mode==App.MODE_BROWSER&&k.setAttribute("selected","selected"),p(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));k=document.createElement("div");k.style.marginTop=u?"26px":"38px";k.style.textAlign=u?"center":"right";u||(q.appendChild(y),mxEvent.addListener(y,"change",r),r());null!=n&&(b=mxUtils.button(mxResources.get("help"),function(){window.open(n)}),b.className="geBtn",
-k.appendChild(b));b=mxUtils.button(mxResources.get("cancel"),function(){null!=d?d():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});b.className="geBtn";a.editor.cancelFirst&&k.appendChild(b);null==d&&(t=mxUtils.button(mxResources.get("decideLater"),function(){s(null)}),t.className="geBtn",k.appendChild(t));l&&(l=mxUtils.button(mxResources.get("openInNewWindow"),function(){s("_blank")}),l.className="geBtn",k.appendChild(l));if(!mxClient.IS_IOS||!u)e=mxUtils.button(e||
-mxResources.get("create"),function(){s(m?"download":u?App.MODE_DEVICE:y.value)}),e.className="geBtn gePrimaryBtn",k.appendChild(e);a.editor.cancelFirst||k.appendChild(b);mxEvent.addListener(v,"keypress",function(b){13==b.keyCode?s(u?App.MODE_DEVICE:y.value):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});q.appendChild(k);this.container=q},PopupDialog=function(a,c,f,d,b){b=null!=b?b:!0;var e=document.createElement("div");e.style.textAlign="left";mxUtils.write(e,mxResources.get("fileOpenLocation"));
-mxUtils.br(e);mxUtils.br(e);var g=mxUtils.button(mxResources.get("openInThisWindow"),function(){b&&a.hideDialog();null!=d&&d()});g.className="geBtn";g.style.marginBottom="8px";g.style.width="280px";e.appendChild(g);mxUtils.br(e);var k=mxUtils.button(mxResources.get("openInNewWindow"),function(){b&&a.hideDialog();null!=f&&f();window.open(c)});k.className="geBtn gePrimaryBtn";k.style.width=g.style.width;e.appendChild(k);mxUtils.br(e);mxUtils.br(e);mxUtils.write(e,mxResources.get("allowPopups"));this.container=
-e},ImageDialog=function(a,c,f,d,b,e){e=null!=e?e:!0;var g=a.editor.graph,k=document.createElement("div");mxUtils.write(k,c);c=document.createElement("div");c.className="geTitle";c.style.backgroundColor="transparent";c.style.borderColor="transparent";c.style.whiteSpace="nowrap";c.style.textOverflow="clip";c.style.cursor="default";mxClient.IS_VML||(c.style.paddingRight="20px");var l=document.createElement("input");l.setAttribute("value",f);l.setAttribute("type","text");l.style.marginTop="6px";l.style.width=
-(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";l.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";l.style.backgroundRepeat="no-repeat";l.style.backgroundPosition="100% 50%";l.style.paddingRight="14px";f=document.createElement("div");f.setAttribute("title",mxResources.get("reset"));f.style.position="relative";f.style.left="-16px";f.style.width="12px";f.style.height="14px";f.style.cursor="pointer";f.style.display=mxClient.IS_VML?"inline":"inline-block";f.style.top=(mxClient.IS_VML?
-0:3)+"px";f.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(f,"click",function(){l.value="";l.focus()});c.appendChild(l);c.appendChild(f);k.appendChild(c);var n=function(b,c,f){var g="data:"==b.substring(0,5);(!a.isOffline()||g&&"undefined"===typeof chrome)&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(g){a.spinner.stop();a.hideDialog();var k=null!=c&&null!=f?Math.max(c/g.width,f/g.height):Math.min(1,Math.min(520/g.width,520/g.height));
-e&&(b=a.convertDataUri(b));d(b,Math.round(Number(g.width)*k),Math.round(Number(g.height)*k))},function(){a.spinner.stop();d(null);a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b=a.convertDataUri(b),c=null==c?120:c,f=null==f?100:f,a.hideDialog(),d(b,c,f))},m=function(c){if(null!=c&&0<c.length){var e=b?null:g.getModel().getGeometry(g.getSelectionCell());null!=e?n(c,e.width,e.height):n(c)}else a.hideDialog(),d(null)};this.init=function(){l.focus();if(Graph.fileSupport){l.setAttribute("placeholder",
-mxResources.get("dragImagesHere"));var b=k.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(d){if(null==c&&(!mxClient.IS_IE||10<document.documentMode))c=a.highlightElement(b);d.stopPropagation();d.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,
-0,0,a.maxImageSize,function(a,b,c,d,e,f){m(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(d)&&m(decodeURIComponent(d))}b.stopPropagation();b.preventDefault()}),!1)}};f=document.createElement("div");f.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";f.style.textAlign=
-"right";c=mxUtils.button(mxResources.get("cancel"),function(){a.spinner.stop();a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&f.appendChild(c);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(l.value=a.url));l.focus()};if("undefined"!=typeof google&&"undefined"!=typeof google.picker){if(Graph.fileSupport){var p=document.createElement("input");p.setAttribute("multiple",
-"multiple");p.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(p,"change",function(b){a.importFiles(p.files,0,0,a.maxImageSize,function(a,b,c,d,e,f){m(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0)});var r=mxUtils.button(mxResources.get("open"),function(){p.click()});r.className="geBtn";f.appendChild(r)}}r=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);
-a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0);a.movePickersToTop()});r.className="geBtn";f.appendChild(r);null!=a.drive&&"1"==urlParams.photos&&(r=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
-a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0);a.movePickersToTop()}))}),r.className="geBtn",f.appendChild(r))}mxEvent.addListener(l,"keypress",function(a){13==a.keyCode&&m(l.value)});r=mxUtils.button(mxResources.get("apply"),function(){m(l.value)});r.className="geBtn gePrimaryBtn";f.appendChild(r);a.editor.cancelFirst||f.appendChild(c);Graph.fileSupport&&(f.style.marginTop="120px",k.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",
-k.style.backgroundPosition="center 65%",k.style.backgroundRepeat="no-repeat",c=document.createElement("div"),c.style.position="absolute",c.style.width="420px",c.style.top="58%",c.style.textAlign="center",c.style.fontSize="18px",c.style.color="#a0c3ff",mxUtils.write(c,mxResources.get("dragImagesHere")),k.appendChild(c));k.appendChild(f);this.container=k};
+mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive"));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&!mxClient.IS_IOS)b=document.createElement("option"),b.setAttribute("value",App.MODE_DEVICE),mxUtils.write(b,mxResources.get("device")),y.appendChild(b),(a.mode==App.MODE_DEVICE||!k)&&b.setAttribute("selected","selected"),m&&(mxUtils.br(z),p(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE));k&&(isLocalStorage&&"0"!=urlParams.browser)&&
+(k=document.createElement("option"),k.setAttribute("value",App.MODE_BROWSER),mxUtils.write(k,mxResources.get("browser")),y.appendChild(k),a.mode==App.MODE_BROWSER&&k.setAttribute("selected","selected"),p(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));k=document.createElement("div");k.style.marginTop=u?"26px":"38px";k.style.textAlign=u?"center":"right";u||(q.appendChild(y),mxEvent.addListener(y,"change",r),r());null!=n&&(b=mxUtils.button(mxResources.get("help"),function(){window.open(n)}),
+b.className="geBtn",k.appendChild(b));b=mxUtils.button(mxResources.get("cancel"),function(){null!=d?d():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});b.className="geBtn";a.editor.cancelFirst&&k.appendChild(b);null==d&&(t=mxUtils.button(mxResources.get("decideLater"),function(){s(null)}),t.className="geBtn",k.appendChild(t));l&&(l=mxUtils.button(mxResources.get("openInNewWindow"),function(){s("_blank")}),l.className="geBtn",k.appendChild(l));if(!mxClient.IS_IOS||
+!u)e=mxUtils.button(e||mxResources.get("create"),function(){s(m?"download":u?App.MODE_DEVICE:y.value)}),e.className="geBtn gePrimaryBtn",k.appendChild(e);a.editor.cancelFirst||k.appendChild(b);mxEvent.addListener(v,"keypress",function(b){13==b.keyCode?s(u?App.MODE_DEVICE:y.value):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});q.appendChild(k);this.container=q},PopupDialog=function(a,c,f,d,b){b=null!=b?b:!0;var e=document.createElement("div");e.style.textAlign="left";mxUtils.write(e,
+mxResources.get("fileOpenLocation"));mxUtils.br(e);mxUtils.br(e);var g=mxUtils.button(mxResources.get("openInThisWindow"),function(){b&&a.hideDialog();null!=d&&d()});g.className="geBtn";g.style.marginBottom="8px";g.style.width="280px";e.appendChild(g);mxUtils.br(e);var k=mxUtils.button(mxResources.get("openInNewWindow"),function(){b&&a.hideDialog();null!=f&&f();window.open(c)});k.className="geBtn gePrimaryBtn";k.style.width=g.style.width;e.appendChild(k);mxUtils.br(e);mxUtils.br(e);mxUtils.write(e,
+mxResources.get("allowPopups"));this.container=e},ImageDialog=function(a,c,f,d,b,e){e=null!=e?e:!0;var g=a.editor.graph,k=document.createElement("div");mxUtils.write(k,c);c=document.createElement("div");c.className="geTitle";c.style.backgroundColor="transparent";c.style.borderColor="transparent";c.style.whiteSpace="nowrap";c.style.textOverflow="clip";c.style.cursor="default";mxClient.IS_VML||(c.style.paddingRight="20px");var l=document.createElement("input");l.setAttribute("value",f);l.setAttribute("type",
+"text");l.style.marginTop="6px";l.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";l.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";l.style.backgroundRepeat="no-repeat";l.style.backgroundPosition="100% 50%";l.style.paddingRight="14px";f=document.createElement("div");f.setAttribute("title",mxResources.get("reset"));f.style.position="relative";f.style.left="-16px";f.style.width="12px";f.style.height="14px";f.style.cursor="pointer";f.style.display=mxClient.IS_VML?
+"inline":"inline-block";f.style.top=(mxClient.IS_VML?0:3)+"px";f.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(f,"click",function(){l.value="";l.focus()});c.appendChild(l);c.appendChild(f);k.appendChild(c);var n=function(b,c,f){var g="data:"==b.substring(0,5);(!a.isOffline()||g&&"undefined"===typeof chrome)&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(g){a.spinner.stop();a.hideDialog();var k=null!=c&&null!=f?Math.max(c/g.width,f/
+g.height):Math.min(1,Math.min(520/g.width,520/g.height));e&&(b=a.convertDataUri(b));d(b,Math.round(Number(g.width)*k),Math.round(Number(g.height)*k))},function(){a.spinner.stop();d(null);a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b=a.convertDataUri(b),c=null==c?120:c,f=null==f?100:f,a.hideDialog(),d(b,c,f))},m=function(c){if(null!=c&&0<c.length){var e=b?null:g.getModel().getGeometry(g.getSelectionCell());null!=e?n(c,e.width,e.height):n(c)}else a.hideDialog(),
+d(null)};this.init=function(){l.focus();if(Graph.fileSupport){l.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=k.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(d){if(null==c&&(!mxClient.IS_IE||10<document.documentMode))c=a.highlightElement(b);d.stopPropagation();d.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,
+function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,function(a,b,c,d,e,f){m(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(d)&&m(decodeURIComponent(d))}b.stopPropagation();
+b.preventDefault()}),!1)}};f=document.createElement("div");f.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";f.style.textAlign="right";c=mxUtils.button(mxResources.get("cancel"),function(){a.spinner.stop();a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&f.appendChild(c);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(l.value=a.url));l.focus()};if("undefined"!=typeof google&&
+"undefined"!=typeof google.picker){if(Graph.fileSupport){var p=document.createElement("input");p.setAttribute("multiple","multiple");p.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(p,"change",function(b){a.importFiles(p.files,0,0,a.maxImageSize,function(a,b,c,d,e,f){m(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0)});var r=mxUtils.button(mxResources.get("open"),function(){p.click()});r.className=
+"geBtn";f.appendChild(r)}}r=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0);a.movePickersToTop()});r.className="geBtn";f.appendChild(r);null!=a.drive&&"1"==urlParams.photos&&(r=mxUtils.button(mxResources.get("googlePlus"),
+function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0);
+a.movePickersToTop()}))}),r.className="geBtn",f.appendChild(r))}mxEvent.addListener(l,"keypress",function(a){13==a.keyCode&&m(l.value)});r=mxUtils.button(mxResources.get("apply"),function(){m(l.value)});r.className="geBtn gePrimaryBtn";f.appendChild(r);a.editor.cancelFirst||f.appendChild(c);Graph.fileSupport&&(f.style.marginTop="120px",k.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",k.style.backgroundPosition="center 65%",k.style.backgroundRepeat="no-repeat",c=document.createElement("div"),
+c.style.position="absolute",c.style.width="420px",c.style.top="58%",c.style.textAlign="center",c.style.fontSize="18px",c.style.color="#a0c3ff",mxUtils.write(c,mxResources.get("dragImagesHere")),k.appendChild(c));k.appendChild(f);this.container=k};
PrintDialog.prototype.create=function(a){function c(){p.value=Math.min(g,Math.max(parseInt(p.value),parseInt(m.value)));m.value=Math.min(g,Math.min(parseInt(p.value),parseInt(m.value)))}function f(a){var b=parseInt(F.value)/100;isNaN(b)&&(b=1,F.value="100 %");var b=0.75*b,c=d.getGraphBounds(),e=0,f=0,g=d.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,k=1/d.pageScale,l=q.checked;if(l)var k=parseInt(D.value),m=parseInt(G.value),k=Math.min(g.height*m/(c.height/d.view.scale),g.width*k/(c.width/d.view.scale));
else k=parseInt(s.value)/100*d.pageScale,isNaN(k)&&(b=1/d.pageScale,s.value="100 %");g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*b);g.height=Math.ceil(g.height*b);k*=b;!l&&d.pageVisible?(b=d.getPageLayout(),e-=b.x*g.width,f-=b.y*g.height):l=!0;return PrintDialog.showPreview(PrintDialog.createPrintPreview(d,k,g,0,e,f,l,a),a)}var d=a.editor.graph,b=document.createElement("div"),e=document.createElement("h3");e.style.marginTop="0px";mxUtils.write(e,mxResources.get("print"));b.appendChild(e);
var g=1,k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";l.setAttribute("value","all");l.setAttribute("type","radio");l.setAttribute("name","pages");k.appendChild(l);e=document.createElement("span");mxUtils.write(e,mxResources.get("printAllPages"));k.appendChild(e);mxUtils.br(k);var n=l.cloneNode(!0);n.setAttribute("value","range");
@@ -7050,8 +7051,8 @@ mxUtils.setOpacity(u,20);var t=mxUtils.button("",function(){null!=p&&(g.zoomActu
y.className="geBtn";y.setAttribute("disabled","disabled");var x=document.createElement("select");x.setAttribute("disabled","disabled");x.style.maxWidth="80px";x.style.position="relative";x.style.top="-2px";x.style.verticalAlign="bottom";x.style.marginRight="6px";x.style.display="none";var E=null;mxEvent.addListener(x,"change",function(a){null!=E&&(E(a),mxEvent.consume(a))});var A=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=p&&(window.openFile=new OpenFile(function(){window.openFile=
null}),window.openFile.setData(mxUtils.getXml(p.documentElement)),window.openWindow(a.getUrl()))});A.className="geBtn";A.setAttribute("disabled","disabled");var B=mxUtils.button(mxResources.get("show"),function(){null!=m&&window.open(m.getUrl())});B.className="geBtn gePrimaryBtn";B.setAttribute("disabled","disabled");d=document.createElement("div");d.style.position="absolute";d.style.top="482px";d.style.width="640px";d.style.textAlign="right";var D=document.createElement("div");D.className="geToolbarContainer";
D.style.backgroundColor="transparent";D.style.padding="2px";D.style.border="none";D.style.left="199px";D.style.top="442px";var G=null;if(null==l||null==a.drive&&l.constructor==DriveFile||null==a.dropbox&&l.constructor==DropboxFile)e.style.display="none",D.style.display="none",mxUtils.write(b,mxResources.get("notAvailable"));else if(null!=c&&0<c.length){e.style.cursor="move";var F=document.createElement("table");F.style.border="1px solid lightGray";F.style.borderCollapse="collapse";F.style.borderSpacing=
-"0px";F.style.width="100%";var H=document.createElement("tbody"),J=(new Date).toDateString(),L=0;null!=a.currentPage&&null!=a.pages&&(L=mxUtils.indexOf(a.pages,a.currentPage));for(var N=c.length-1;0<=N;N--){var T=function(b){var d=new Date(b.modifiedDate),f=null;if(0<=d.getTime()){f=document.createElement("tr");f.style.borderBottom="1px solid lightGray";f.style.fontSize="12px";f.style.cursor="pointer";var D=document.createElement("td");D.style.padding="6px";D.style.whiteSpace="nowrap";b==c[c.length-
-1]?mxUtils.write(D,mxResources.get("current")):d.toDateString()===J?mxUtils.write(D,d.toLocaleTimeString()):mxUtils.write(D,d.toLocaleDateString()+" "+d.toLocaleTimeString());f.appendChild(D);f.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));var F=function(b){k.stop();var c=mxUtils.parseXml(b),m=a.editor.extractGraphModel(c.documentElement,!0);if(null!=m){x.style.display=
+"0px";F.style.width="100%";var H=document.createElement("tbody"),I=(new Date).toDateString(),L=0;null!=a.currentPage&&null!=a.pages&&(L=mxUtils.indexOf(a.pages,a.currentPage));for(var N=c.length-1;0<=N;N--){var T=function(b){var d=new Date(b.modifiedDate),f=null;if(0<=d.getTime()){f=document.createElement("tr");f.style.borderBottom="1px solid lightGray";f.style.fontSize="12px";f.style.cursor="pointer";var D=document.createElement("td");D.style.padding="6px";D.style.whiteSpace="nowrap";b==c[c.length-
+1]?mxUtils.write(D,mxResources.get("current")):d.toDateString()===I?mxUtils.write(D,d.toLocaleTimeString()):mxUtils.write(D,d.toLocaleDateString()+" "+d.toLocaleTimeString());f.appendChild(D);f.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));var F=function(b){k.stop();var c=mxUtils.parseXml(b),m=a.editor.extractGraphModel(c.documentElement,!0);if(null!=m){x.style.display=
"none";x.innerHTML="";p=c;r=b;parseSelectFunction=null;var n=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,g.getModel());g.maxFitScale=1;g.fit(8);g.center();return a},D=function(b){null!=b&&(b=n(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b};if("mxfile"==m.nodeName){var F=m.getElementsByTagName("diagram");b=Math.min(L,F.length-1);
0<F.length&&D(F[b]);if(1<F.length){x.removeAttribute("disabled");x.style.display="";for(c=0;c<F.length;c++)m=document.createElement("option"),mxUtils.write(m,F[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),m.setAttribute("value",c),c==b&&m.setAttribute("selected","selected"),x.appendChild(m)}E=function(){L=x.value;D(F[L])}}else n(m);v.innerHTML="";mxUtils.write(v,d.toLocaleDateString()+" "+d.toLocaleTimeString());v.setAttribute("title",f.getAttribute("title"));s.removeAttribute("disabled");
q.removeAttribute("disabled");u.removeAttribute("disabled");t.removeAttribute("disabled");if(null==l||!l.isRestricted())a.editor.graph.isEnabled()&&y.removeAttribute("disabled"),z.removeAttribute("disabled"),B.removeAttribute("disabled"),A.removeAttribute("disabled");mxUtils.setOpacity(s,60);mxUtils.setOpacity(q,60);mxUtils.setOpacity(u,60);mxUtils.setOpacity(t,60)}else x.style.display="none",x.innerHTML="",v.innerHTML="",mxUtils.write(v,mxResources.get("errorLoadingFile"))};mxEvent.addListener(f,
@@ -7096,11 +7097,11 @@ function(a){13==a.keyCode&&u.click()});e=document.createElement("div");e.style.m
d,e,f,l,n,p,y){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&null!=n||null==u[b]){s.style.backgroundImage="";q.style.display="none";var r=f,A=l;if(f>a.maxImageSize||l>a.maxImageSize){var C=Math.min(1,Math.min(a.maxImageSize/Math.max(1,f)),a.maxImageSize/Math.max(1,l));f*=C;l*=C}r>A?(A=Math.round(A*t/r),r=t):(r=Math.round(r*v/A),A=v);var O=document.createElement("div");O.setAttribute("draggable","true");O.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";O.style.position="relative";
O.style.cursor="move";mxUtils.setPrefixedStyle(O.style,"transition","transform .1s ease-in-out");if(null!=b){var P=document.createElement("img");P.setAttribute("src",E.convert(b));P.style.width=r+"px";P.style.height=A+"px";P.style.margin="10px";P.style.paddingBottom=Math.floor((v-A)/2)+"px";P.style.paddingLeft=Math.floor((t-r)/2)+"px";O.appendChild(P)}else if(null!=n){var M=a.stringToCells(a.editor.graph.decompress(n.xml));0<M.length&&(a.sidebar.createThumb(M,t,v,O,null,!0,!1),O.firstChild.style.display=
mxClient.IS_QUIRKS?"inline":"inline-block",O.firstChild.style.cursor="")}var U=document.createElement("img");U.setAttribute("src",Editor.closeImage);U.setAttribute("border","0");U.setAttribute("title",mxResources.get("delete"));U.setAttribute("align","top");U.style.paddingTop="4px";U.style.marginLeft="-22px";U.style.cursor="pointer";mxEvent.addListener(U,"dragstart",function(a){mxEvent.consume(a)});null==b&&null!=n&&(U.style.position="relative");(function(a,c){mxEvent.addListener(U,"click",function(d){u[b]=
-null;for(var e=0;e<m.length;e++)if(null!=b&&m[e].data==c||null!=n&&m[e].xml==n.xml){m.splice(e,1);break}O.parentNode.removeChild(a);0==m.length&&(s.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",q.style.display="");mxEvent.consume(d)});mxEvent.addListener(U,"dblclick",function(a){mxEvent.consume(a)})})(O,b,n);O.appendChild(U);O.style.marginBottom="30px";var I=document.createElement("div");I.style.position="absolute";I.style.boxSizing="border-box";I.style.bottom="-18px";I.style.left=
-"10px";I.style.right="10px";I.style.backgroundColor="#ffffff";I.style.overflow="hidden";I.style.textAlign="center";var K=null;null!=b?(K={data:b,w:f,h:l,title:y},null!=p&&(K.aspect=p),u[b]=P,m.push(K)):null!=n&&(n.aspect="fixed",m.push(n),K=n);var S=function(){I.innerHTML="";I.style.cursor="pointer";I.style.whiteSpace="nowrap";I.style.textOverflow="ellipsis";mxUtils.write(I,null!=K.title&&0<K.title.length?K.title:mxResources.get("untitled"));I.style.color=null==K.title||0==K.title.length?"#d0d0d0":
-""};mxEvent.addListener(I,"keydown",function(a){13==a.keyCode&&null!=x&&(x(),x=null,mxEvent.consume(a))});S();O.appendChild(I);mxEvent.addListener(I,"mousedown",function(a){mxEvent.consume(a)});f=function(b){if(!mxClient.IS_IOS&&!mxClient.IS_QUIRKS&&!mxClient.IS_FF&&(null==document.documentMode||9<document.documentMode)){if("true"!=I.getAttribute("contentEditable")){null!=x&&(x(),x=null);if(null==K.title||0==K.title.length)I.innerHTML="";I.style.textOverflow="";I.style.whiteSpace="";I.style.cursor=
-"text";I.style.color="";I.setAttribute("contentEditable","true");I.focus();document.execCommand("selectAll",!1,null);x=function(){I.removeAttribute("contentEditable");I.style.cursor="pointer";K.title=I.innerHTML;S()}}}else{var c=new FilenameDialog(a,K.title||"",mxResources.get("ok"),function(a){null!=a&&(K.title=a,S())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init()}mxEvent.consume(b)};mxEvent.addListener(I,"click",f);mxEvent.addListener(O,"dblclick",f);s.appendChild(O);
-mxEvent.addListener(O,"dragstart",function(a){null==b&&null!=n&&(U.style.visibility="hidden",I.style.visibility="hidden");mxClient.IS_FF&&null!=n.xml&&a.dataTransfer.setData("Text",n.xml);z=g(a);mxClient.IS_GC&&(O.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(O.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(O,30);U.style.visibility="";I.style.visibility=""},0)});mxEvent.addListener(O,"dragend",function(a){"hidden"==U.style.visibility&&(U.style.visibility="",I.style.visibility=
+null;for(var e=0;e<m.length;e++)if(null!=b&&m[e].data==c||null!=n&&m[e].xml==n.xml){m.splice(e,1);break}O.parentNode.removeChild(a);0==m.length&&(s.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",q.style.display="");mxEvent.consume(d)});mxEvent.addListener(U,"dblclick",function(a){mxEvent.consume(a)})})(O,b,n);O.appendChild(U);O.style.marginBottom="30px";var J=document.createElement("div");J.style.position="absolute";J.style.boxSizing="border-box";J.style.bottom="-18px";J.style.left=
+"10px";J.style.right="10px";J.style.backgroundColor="#ffffff";J.style.overflow="hidden";J.style.textAlign="center";var K=null;null!=b?(K={data:b,w:f,h:l,title:y},null!=p&&(K.aspect=p),u[b]=P,m.push(K)):null!=n&&(n.aspect="fixed",m.push(n),K=n);var S=function(){J.innerHTML="";J.style.cursor="pointer";J.style.whiteSpace="nowrap";J.style.textOverflow="ellipsis";mxUtils.write(J,null!=K.title&&0<K.title.length?K.title:mxResources.get("untitled"));J.style.color=null==K.title||0==K.title.length?"#d0d0d0":
+""};mxEvent.addListener(J,"keydown",function(a){13==a.keyCode&&null!=x&&(x(),x=null,mxEvent.consume(a))});S();O.appendChild(J);mxEvent.addListener(J,"mousedown",function(a){mxEvent.consume(a)});f=function(b){if(!mxClient.IS_IOS&&!mxClient.IS_QUIRKS&&!mxClient.IS_FF&&(null==document.documentMode||9<document.documentMode)){if("true"!=J.getAttribute("contentEditable")){null!=x&&(x(),x=null);if(null==K.title||0==K.title.length)J.innerHTML="";J.style.textOverflow="";J.style.whiteSpace="";J.style.cursor=
+"text";J.style.color="";J.setAttribute("contentEditable","true");J.focus();document.execCommand("selectAll",!1,null);x=function(){J.removeAttribute("contentEditable");J.style.cursor="pointer";K.title=J.innerHTML;S()}}}else{var c=new FilenameDialog(a,K.title||"",mxResources.get("ok"),function(a){null!=a&&(K.title=a,S())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init()}mxEvent.consume(b)};mxEvent.addListener(J,"click",f);mxEvent.addListener(O,"dblclick",f);s.appendChild(O);
+mxEvent.addListener(O,"dragstart",function(a){null==b&&null!=n&&(U.style.visibility="hidden",J.style.visibility="hidden");mxClient.IS_FF&&null!=n.xml&&a.dataTransfer.setData("Text",n.xml);z=g(a);mxClient.IS_GC&&(O.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(O.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(O,30);U.style.visibility="";J.style.visibility=""},0)});mxEvent.addListener(O,"dragend",function(a){"hidden"==U.style.visibility&&(U.style.visibility="",J.style.visibility=
"");z=null;mxUtils.setOpacity(O,100);mxUtils.setPrefixedStyle(O.style,"transform",null)})}else a.handleError({message:mxResources.get("fileExists")});else{f=!1;try{if(null!=b&&"\x3cmxlibrary"==b.substring(0,10)){A=mxUtils.parseXml(b);r=JSON.parse(mxUtils.getTextContent(A.documentElement));if(null!=r&&0<r.length)for(l=0;l<r.length;l++)null!=r[l].xml?k(null,null,0,0,0,0,r[l]):k(r[l].data,null,0,0,r[l].w,r[l].h,null,"fixed",r[l].title);a.spinner.stop();f=!0}}catch(Z){}f||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ea){console.log("e",
ea)}return null}function l(a){a.dataTransfer.dropEffect=null!=z?"move":"copy";a.stopPropagation();a.preventDefault()}function n(b){b.stopPropagation();b.preventDefault();y=g(b);if(null!=z)null!=y&&y<s.children.length?(m.splice(y>z?y-1:y,0,m.splice(z,1)[0]),s.insertBefore(s.children[z],s.children[y])):(m.push(m.splice(z,1)[0]),s.appendChild(s.children[z]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,function(a,c,d,e,f,g,l){k(a,c,d,e,f,g,l,"fixed",mxEvent.isAltDown(b)?
null:l.substring(0,l.lastIndexOf(".")).replace(/_/g," "))});else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||/(\.png)($|\?)/i.test(c)||/(\.gif)($|\?)/i.test(c)||/(\.svg)($|\?)/i.test(c))&&a.loadImage(c,function(a){k(c,null,0,0,a.width,a.height)})}b.stopPropagation();b.preventDefault()}var m=[];f=document.createElement("div");f.style.height="100%";var p=document.createElement("div");p.style.whiteSpace=
@@ -7118,7 +7119,7 @@ e=document.createElement("tr");g=document.createElement("td");g.setAttribute("co
n.value,f=mxUtils.parseXml(e),e=mxUtils.getPrettyXml(f.documentElement),f=f.documentElement.getElementsByTagName("parsererror");if(null!=f&&0<f.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(d&&a.hideDialog(),f=!b.model.contains(c),!d||f||e!=r){e=a.editor.graph.compress(e);b.getModel().beginUpdate();try{if(f){var g=a.editor.graph.getInsertPoint();c.geometry.x=g.x;c.geometry.y=g.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,
"stencil("+e+")",[c])}catch(k){throw k;}finally{b.getModel().endUpdate()}f&&b.setSelectionCell(c)}};f=mxUtils.button(mxResources.get("preview"),function(){s(m,p,!1)});f.className="geBtn";g.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){s(a.editor.graph,c,!0)});f.className="geBtn gePrimaryBtn";g.appendChild(f);a.editor.cancelFirst||g.appendChild(b);e.appendChild(g);l.appendChild(e);k.appendChild(l);this.container=k},CustomDialog=function(a,c,f,d,b,e){var g=document.createElement("div");
g.appendChild(c);c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="center";var k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d()});k.className="geBtn";a.editor.cancelFirst&&c.appendChild(k);if(!a.isOffline()&&null!=e){var l=mxUtils.button(mxResources.get("help"),function(){window.open(e)});l.className="geBtn";c.appendChild(l)}b=mxUtils.button(b||mxResources.get("ok"),function(){a.hideDialog();null!=f&&f()});c.appendChild(b);b.className="geBtn gePrimaryBtn";
-a.editor.cancelFirst||c.appendChild(k);g.appendChild(c);this.container=g};(function(){EditorUi.VERSION="5.7.0.3";EditorUi.compactUi="atlas"!=uiTheme;"1"==urlParams.dev&&(Editor.prototype.editBlankUrl+="\x26dev\x3d1",Editor.prototype.editBlankFallbackUrl+="\x26dev\x3d1");(function(){EditorUi.prototype.useCanvasForExport=!1;try{var a=document.createElement("canvas"),b=new Image;b.onload=function(){try{a.getContext("2d").drawImage(b,0,0);var c=a.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=c&&6<c.length}catch(d){}};b.src="data:image/svg+xml;base64,"+
+a.editor.cancelFirst||c.appendChild(k);g.appendChild(c);this.container=g};(function(){EditorUi.VERSION="5.7.0.5";EditorUi.compactUi="atlas"!=uiTheme;"1"==urlParams.dev&&(Editor.prototype.editBlankUrl+="\x26dev\x3d1",Editor.prototype.editBlankFallbackUrl+="\x26dev\x3d1");(function(){EditorUi.prototype.useCanvasForExport=!1;try{var a=document.createElement("canvas"),b=new Image;b.onload=function(){try{a.getContext("2d").drawImage(b,0,0);var c=a.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=c&&6<c.length}catch(d){}};b.src="data:image/svg+xml;base64,"+
btoa(unescape(encodeURIComponent('\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" xmlns:xlink\x3d"http://www.w3.org/1999/xlink" width\x3d"1px" height\x3d"1px" version\x3d"1.1"\x3e\x3cforeignObject pointer-events\x3d"all" width\x3d"1" height\x3d"1"\x3e\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml"\x3e\x3c/div\x3e\x3c/foreignObject\x3e\x3c/svg\x3e')))}catch(c){}})();Editor.initMath=function(a,b){a=null!=a?a:"https://cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config\x3dTeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=
[];Editor.doMathJaxRender=function(a){MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(b||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});MathJax.Hub.Register.StartupHook("Begin",
function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.prototype.init=function(){this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,b){this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var c=document.getElementsByTagName("script");
@@ -7164,78 +7165,78 @@ var k=document.createElement("input");k.style.marginTop="16px";k.style.marginRig
n.defaultChecked=!0;f.appendChild(n);mxUtils.write(f,mxResources.get("includeCopyOfMyDiagram"));b=new FilenameDialog(this,100,b,mxUtils.bind(this,function(a){d(a,g.checked,!k.checked,l.checked,n.checked,m.checked)}),mxResources.get("zoom")+" (%)",null,f,!this.isOffline()?c:null);this.showDialog(b.container,320,a?266:240,!0,!0);b.init()};EditorUi.prototype.uploadToGithub=function(a,b,c){var d=this.spinner.pause();c=document.createElement("div");c.style.paddingTop="20px";c.style.paddingRight="8px";
var e=document.createElement("table"),f=document.createElement("tbody"),g=document.createElement("tr"),k=document.createElement("td"),l=document.createElement("input");l.setAttribute("type","text");mxUtils.write(k,"Username:");g.appendChild(k);k=k.cloneNode(!1);k.appendChild(l);g.appendChild(k);f.appendChild(g);var k=k.cloneNode(!1),m=document.createElement("input");m.setAttribute("type","password");mxUtils.write(k,"Password:");g=g.cloneNode(!1);g.appendChild(k);k=k.cloneNode(!1);k.appendChild(m);
g.appendChild(k);f.appendChild(g);var k=k.cloneNode(!1),n=document.createElement("input");n.setAttribute("type","text");mxUtils.write(k,"Organisation:");g=g.cloneNode(!1);g.appendChild(k);k=k.cloneNode(!1);k.appendChild(n);g.appendChild(k);f.appendChild(g);var k=k.cloneNode(!1),p=document.createElement("input");p.setAttribute("type","text");mxUtils.write(k,"Repository:");g=g.cloneNode(!1);g.appendChild(k);k=k.cloneNode(!1);k.appendChild(p);g.appendChild(k);f.appendChild(g);var k=k.cloneNode(!1),r=
-document.createElement("input");r.setAttribute("type","text");mxUtils.write(k,"Path:");g=g.cloneNode(!1);g.appendChild(k);k=k.cloneNode(!1);k.appendChild(r);g.appendChild(k);f.appendChild(g);k=k.cloneNode(!1);a=this.getCurrentFile();a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;var s=a.lastIndexOf(".");0<s&&(a=a.substring(0,s));r.value=a+".png";var J=document.createElement("input");J.setAttribute("type","text");mxUtils.write(k,"Branch/Tag:");J.value="master";g=g.cloneNode(!1);g.appendChild(k);
-k=k.cloneNode(!1);k.appendChild(J);g.appendChild(k);f.appendChild(g);var k=k.cloneNode(!1),L=document.createElement("input");L.setAttribute("type","text");mxUtils.write(k,"Message:");L.value="Updated "+a+".png";g=g.cloneNode(!1);g.appendChild(k);k=k.cloneNode(!1);k.appendChild(L);g.appendChild(k);f.appendChild(g);k=k.cloneNode(!1);e.appendChild(f);c.appendChild(e);c=new FilenameDialog(this,null,mxResources.get("publish"),mxUtils.bind(this,function(){var a="https://api.github.com/repos/"+n.value+"/"+
-p.value+"/contents/"+r.value+"?ref\x3d"+encodeURIComponent(J.value);d();mxUtils.get(a,mxUtils.bind(this,function(c){if(200==c.getStatus()||404==c.getStatus()){c=JSON.parse(c.getText());var e={path:r.value,message:L.value,content:b};null!=c.sha&&(e.sha=c.sha);var f=new XMLHttpRequest;f.onreadystatechange=mxUtils.bind(this,function(){if(4==f.readyState)if(200<=f.status&&300>f.status){this.spinner.stop();this.hideDialog();a="https://github.com/"+n.value+"/"+p.value+"/blob/"+J.value+"/"+r.value;var b=
+document.createElement("input");r.setAttribute("type","text");mxUtils.write(k,"Path:");g=g.cloneNode(!1);g.appendChild(k);k=k.cloneNode(!1);k.appendChild(r);g.appendChild(k);f.appendChild(g);k=k.cloneNode(!1);a=this.getCurrentFile();a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;var s=a.lastIndexOf(".");0<s&&(a=a.substring(0,s));r.value=a+".png";var I=document.createElement("input");I.setAttribute("type","text");mxUtils.write(k,"Branch/Tag:");I.value="master";g=g.cloneNode(!1);g.appendChild(k);
+k=k.cloneNode(!1);k.appendChild(I);g.appendChild(k);f.appendChild(g);var k=k.cloneNode(!1),L=document.createElement("input");L.setAttribute("type","text");mxUtils.write(k,"Message:");L.value="Updated "+a+".png";g=g.cloneNode(!1);g.appendChild(k);k=k.cloneNode(!1);k.appendChild(L);g.appendChild(k);f.appendChild(g);k=k.cloneNode(!1);e.appendChild(f);c.appendChild(e);c=new FilenameDialog(this,null,mxResources.get("publish"),mxUtils.bind(this,function(){var a="https://api.github.com/repos/"+n.value+"/"+
+p.value+"/contents/"+r.value+"?ref\x3d"+encodeURIComponent(I.value);d();mxUtils.get(a,mxUtils.bind(this,function(c){if(200==c.getStatus()||404==c.getStatus()){c=JSON.parse(c.getText());var e={path:r.value,message:L.value,content:b};null!=c.sha&&(e.sha=c.sha);var f=new XMLHttpRequest;f.onreadystatechange=mxUtils.bind(this,function(){if(4==f.readyState)if(200<=f.status&&300>f.status){this.spinner.stop();this.hideDialog();a="https://github.com/"+n.value+"/"+p.value+"/blob/"+I.value+"/"+r.value;var b=
new ErrorDialog(this,mxResources.get("published"),mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){window.open(a)}),!1);this.showDialog(b.container,340,170,!0,!1);b.init()}else d=this.spinner.pause(),this.handleError(JSON.parse(f.responseText))});f.open("PUT",a,!0);f.setRequestHeader("Authorization","Basic "+btoa(l.value+
-":"+m.value));f.send(JSON.stringify(e))}else this.hideDialog(),this.spinner.stop(),this.handleError(JSON.parse(c.getText()))}),mxUtils.bind(this,function(a){this.hideDialog();this.spinner.stop();this.handleError({message:mxResources.get("unknownError")})}))}),null,null,c,null,!1);this.showDialog(c.container,260,260,!0,!1);c.init()};EditorUi.prototype.uploadToImgur=function(a,b,c){var d=this.spinner.pause(),e=new ErrorDialog(this,mxResources.get("warning"),'\x3cimg style\x3d"max-width:300px;max-height:80px;margin-bottom:20px;padding:6px;border:1px solid gray;" src\x3d"data:image/png;base64,'+
-b+'"/\x3e\x3cbr\x3e'+mxResources.get("publishConfirmation"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("publish"),mxUtils.bind(this,function(){d();var e=null!=a.getTitle()?a.getTitle():this.defaultFilename,f=e.lastIndexOf("."),g=e;0<f&&(g=e=g.substring(0,f));var f=new mxXmlRequest("/imgur",JSON.stringify({type:"base64",image:b,name:g+".png",title:e,description:"Made with https://www.draw.io"}),"POST"),k=mxUtils.bind(this,function(a){var b={message:mxResources.get("unknownError")};
-try{var c=JSON.parse(a.getText()),b={message:c.message||c.data.error}}catch(d){}this.handleError(b)});f.send(mxUtils.bind(this,function(a){if(200==a.getStatus())try{var b=JSON.parse(a.getText());try{(new Image).src="log?severity\x3dCONFIG\x26msg\x3dimgur-published:"+b.data.id+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION)+"\x26ts\x3d"+(new Date).getTime()}catch(d){}var f=mxUtils.bind(this,function(){this.spinner.stop();var a="http://i.imgur.com/"+b.data.id+".png",c="https://www.draw.io/imgur?delete\x3d"+
-b.data.deletehash,a=new ErrorDialog(this,mxResources.get("published"),mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"])+"\x3cbr\x3e"+mxResources.get("deleteUrl",[c]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){window.open("http://imgur.com/"+b.data.id)}),!1);this.showDialog(a.container,340,170,!0,!1);a.init()});if(c){var g=new mxXmlRequest("/imgur?"+b.data.deletehash,
-JSON.stringify({title:e,description:"Edit a copy of this diagram at https://www.draw.io/i/"+b.data.id}),"POST");g.send(mxUtils.bind(this,function(){200==g.getStatus()?f():k(g)}),mxUtils.bind(this,function(){k(g)}))}else f()}catch(l){this.handleError(l)}else k(a)}),mxUtils.bind(this,function(a){k(a)}))}));this.showDialog(e.container,320,250,!0,!1);e.init()};EditorUi.prototype.publishImage=function(a){var b=this.getCurrentFile();null!=b&&(this.isExportToCanvas()?this.showExportDialog(!1,mxResources.get("publish"),
-"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(c,d,e,f,g){c=parseInt(c);if(!isNaN(c)&&0<c){c/=100;var k=this.editor.graph.isSelectionEmpty();e=null!=e?e:k;if(this.spinner.spin(document.body,mxResources.get("publishing")))try{this.exportToCanvas(mxUtils.bind(this,function(c){try{var d=g?mxUtils.getXml(this.editor.getGraphXml(e)):null,f=this.createPngDataUri(c,d);a(b,f.substring(f.lastIndexOf(",")+1),g)}catch(k){this.handleError(k)}}),null,null,null,mxUtils.bind(this,
-function(a){this.handleError(a)}),null,e,c||1,d,f)}catch(l){this.handleError(l)}}})):this.showRemoteExportDialog(mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(c,d){if(this.spinner.spin(document.body,mxResources.get("publishing"))){var e=this.editor.graph.getGraphBounds(),f=this.getFileData(!0,null,null,null,c);if(e.width*e.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE)try{var g=new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+
-(d?"1":"0")+"\x26xml\x3d"+encodeURIComponent(f));g.send(mxUtils.bind(this,function(){200==g.getStatus()?a(b,g.getText(),d):this.handleError(g)}))}catch(k){this.handleError(k)}else this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"))}})))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/
-86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,d){d()};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,f,g){g=null;null!=b&&(g=b.background,g==mxConstants.NONE&&(g=null));b=this.editor.graph.getSvg(g,null,null,null,null,f);b.setAttribute("content",encodeURIComponent(a));null!=
-c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(a))}));else return(!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(b)};EditorUi.prototype.exportToCanvas=
-function(a,b,c,d,e,f,g,k,l,m,n){f=null!=f?f:!0;var p=l?null:this.editor.graph.background;p==mxConstants.NONE&&(p=null);null==p&&(p=d);null==p&&!1==l&&(p="#ffffff");this.convertImages(this.editor.graph.getSvg(p,null,null,null,null,null!=g?g:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),l=parseInt(c.getAttribute("height"));k=null!=k?k:1;null!=b&&(k=!f?b/g:Math.min(1,Math.min(3*b/(4*l),
-b/g)));e.setAttribute("width",Math.ceil(k*g));e.setAttribute("height",Math.ceil(k*l));g=e.getContext("2d");g.scale(k,k);g.drawImage(d,0,0);a(e)});d.onerror=function(a){null!=e&&e(a)};try{m&&this.editor.addSvgShadow(c),this.convertMath(this.editor.graph,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))}catch(g){null!=e&&e(g)}}),c,n)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert;a.convert=function(c){null!=
-c&&(("http://"==c.substring(0,7)||"https://"==c.substring(0,8))&&c.substring(0,a.baseUrl.length)!=a.baseUrl?c=PROXY_URL+"?url\x3d"+encodeURIComponent(c):"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)));return c};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var e=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var k=a.getElementsByTagName(c),l=0;l<k.length;l++)mxUtils.bind(this,function(c){var k=d.convert(c.getAttribute(g));
-if(null!=k&&"data:"!=k.substring(0,5)){var l=f[k];null==l?(e++,this.convertImageToDataUri(k,function(d){null!=d&&(f[k]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,l)}})(k[l])});c("image","xlink:href");c("img","src");0==e&&b(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b()});else{var c=new Image;c.onload=function(){var a=document.createElement("canvas"),
-d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);b(a.toDataURL())};c.onerror=function(){b()};c.src=a}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),k=this.editor.extractGraphModel(g.documentElement);if(null!=k){var l=new mxGraphModel;(new mxCodec(k.ownerDocument)).decode(k,l);var m=this.editor.graph,n=l.getChildCount(l.getRoot());m.model.getChildCount(m.model.getRoot());m.model.beginUpdate();
-try{a={};for(g=0;g<n;g++){var p=l.getChildAt(l.getRoot(),g);if(1==n&&!m.isCellLocked(m.getDefaultParent()))var r=l.getChildren(p),f=f.concat(m.importCells(r,b,c,m.getDefaultParent(),null,a));else p=m.importCells([p],0,0,m.model.getRoot(),null,a)[0],r=m.model.getChildren(p),m.moveCells(r,b,c),f=f.concat(r)}if(d){m.isGridEnabled()&&(b=m.snap(b),c=m.snap(c));var s=m.getBoundingBoxFromGeometry(f,!0);m.moveCells(f,b-s.x,c-s.y)}}finally{m.model.endUpdate()}}}}catch(J){throw e||this.handleError(J,mxResources.get("invalidOrMissingFile")),
-J;}return f};EditorUi.prototype.insertTextAt=function(a,b,c,d,e,f){f=null!=f?f:!0;if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))return this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200==a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))})),[];if(!this.isOffline()&&(e||"data:"==a.substring(0,5)||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=
-this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var k=this.extractGraphModelFromPng(a),l=this.importXml(k,b,c,f,!0);if(0<l.length)return l}if("data:image/svg+xml;"==a.substring(0,19))try{if(k=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(k=a.substring(a.indexOf(",")+1),k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0)):k=decodeURIComponent(a.substring(a.indexOf(",")+1)),l=this.importXml(k,b,c,f,!0),0<l.length)return l}catch(m){}this.loadImage(a,mxUtils.bind(this,
-function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),d,e,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+this.convertDataUri(a)+";"))}),!0,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),f=Math.round(d.width*e);d=Math.round(d.height*e);g.setSelectionCell(g.insertVertex(null,
-null,"",g.snap(b),g.snap(c),f,d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+a+";"))}}),mxUtils.bind(this,function(){var e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,a,g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}));return[]}a=this.editor.graph.zapGremlins(mxUtils.trim(a));
-if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length){g=this.editor.graph;e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,"",g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.fireEvent(new mxEventObject("textInserted","cells",[e])),e.value=a,g.updateCellSize(e),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i.test(e.value)&&
-g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=g.gridSize}finally{g.getModel().endUpdate()}return[e]}};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,0.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,
-b){return/(\.*<graphml xmlns=\".*)/.test(a)||/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||null!=b&&/(\.vsdx)($|\?)/i.test(b)};EditorUi.prototype.importFile=function(a,b,c,d,e,f,g,k,l,m){m=null!=m?m:!0;var n=!1,p=null;"image"==b.substring(0,5)?(g=!1,"image/png"==b.substring(0,9)&&(b=this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(p=this.importXml(b,c,d,m),g=!0)),g||(p=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),m&&p.isGridEnabled()&&
-(c=p.snap(c),d=p.snap(d)),p=[p.insertVertex(null,null,"",c,d,e,f,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+a+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,g)?(n=!0,this.parseFile(null!=l?l:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){if(4==a.readyState){var b=null;200==a.status&&(b=this.importXml(a.responseText,c,d,m));null!=k&&k(b)}}),g)):/(\.vsdx)($|\?)/i.test(g)?
-(new mxVsdxModel).decode(l):p=this.insertTextAt(this.validateFileData(a),c,d,!0);!n&&null!=k&&k(p);return p};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,f,g;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="\x3d\x3d";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>
-2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);b+="\x3d";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>
-6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,f,g,k,l,m,n){var p=null!=b&&null!=c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;m=null!=m?m:this.maxImageBytes;l=null!=l?l:!0;var r=this.editor.graph,s=r.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){return null!=a&&"\x3cmxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):
-this.importFile(a,b,c,d,e,f,g,k,l,p)});f=null!=f?f:mxUtils.bind(this,function(a){r.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var J=a.length,L=J,N=[],T=mxUtils.bind(this,function(a,b){N[a]=b;if(0==--L){this.spinner.stop();if(null!=k)k(N);else{var c=[];r.getModel().beginUpdate();try{for(var d=0;d<N.length;d++){var e=N[d]();null!=e&&(c=c.concat(e))}}finally{r.getModel().endUpdate()}}f(c)}}),X=0;X<J;X++)mxUtils.bind(this,function(f){var k=a[f],p=new FileReader;
-p.onload=mxUtils.bind(this,function(a){if(null==g||g(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var q=a.target.result,p=q.indexOf(","),y=atob(q.substring(p+1)),r=mxUtils.parseXml(y),y=r.getElementsByTagName("svg");if(0<y.length){var E=y[0].getAttribute("content");null!=E&&("\x3c"!=E.charAt(0)&&"%"!=E.charAt(0))&&(E=unescape(window.atob?atob(E):Base64.decode(E,!0)));null!=E&&"%"==E.charAt(0)&&(E=decodeURIComponent(E));null!=E&&("\x3cmxfile "===E.substring(0,8)||"\x3cmxGraphModel "===
-E.substring(0,14))?T(f,mxUtils.bind(this,function(){return e(E,"text/xml",b+f*s,c+f*s,0,0,k.name)})):T(f,mxUtils.bind(this,function(){try{if(q.substring(0,p+1),null!=r){var a=r.getElementsByTagName("svg");if(0<a.length){var g=a[0],l=parseFloat(g.getAttribute("width")),m=parseFloat(g.getAttribute("height")),n=g.getAttribute("viewBox");if(null==n||0==n.length)g.setAttribute("viewBox","0 0 "+l+" "+m);else if(isNaN(l)||isNaN(m)){var y=n.split(" ");3<y.length&&(l=parseFloat(y[2]),m=parseFloat(y[3]))}q=
-this.createSvgDataUri(mxUtils.getXml(a[0]));var x=Math.min(1,Math.min(d/Math.max(1,l)),d/Math.max(1,m));return e(q,k.type,b+f*s,c+f*s,Math.max(1,Math.round(l*x)),Math.max(1,Math.round(m*x)),k.name)}}}catch(A){}return null}))}}else{y=!1;if("image/png"==k.type){var G=this.extractGraphModelFromPng(a.target.result);if(null!=G&&0<G.length){var F=new Image;F.src=a.target.result;T(f,mxUtils.bind(this,function(){return e(G,"text/xml",b+f*s,c+f*s,F.width,F.height,k.name)}));y=!0}}y||(null!=window.chrome&&
-null!=chrome.app&&null!=chrome.app.runtime?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,n,q){T(f,mxUtils.bind(this,function(){if(null!=g&&g.length<m){var p=!l||!this.isResampleImage(a.target.result)?
-1:Math.min(1,Math.min(d/n,d/q));return e(g,k.type,b+f*s,c+f*s,Math.round(n*p),Math.round(q*p),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),l,d,n)})))}else e(a.target.result,k.type,b+f*s,c+f*s,240,160,k.name,function(a){T(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)?e(null,k.type,b+f*s,c+f*s,240,160,k.name,function(a){T(f,function(){return a})},k):"image"==k.type.substring(0,5)?p.readAsDataURL(k):p.readAsText(k)})(X)};EditorUi.prototype.parseFile=
-function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1<l){var m=
-Math.round(g/l),n=Math.round(k/l),p=document.createElement("canvas");p.width=m;p.height=n;p.getContext("2d").drawImage(a,0,0,m,n);var r=p.toDataURL();if(r.length<b.length){var s=document.createElement("canvas");s.width=m;s.height=n;var J=s.toDataURL();r!==J&&(b=r,g=m,k=n)}}}catch(L){}c(b,g,k)};(function(){EditorUi.prototype.crcTable=[];for(var a=0;256>a;a++)for(var b=a,c=0;8>c;c++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[a]=b;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=
-0;e<d;e++)a=EditorUi.prototype.crcTable[(a^b[c+e])&255]^a>>>8;return a}})();EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=k;k+=b;return a.substring(c,k)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=
-e&&e();else{f(a,17);e=a.substring(0,k);do{var l=g(a);if("IDAT"==f(a,4)){e=a.substring(0,k-8);l=4294967295;l=this.updateCRC(l,b,0,4);l=this.updateCRC(l,d,0,d.length);e+=String.fromCharCode(c.length+d.length+1+("zTXt"==b?1:0)>>24&255,c.length+d.length+1+("zTXt"==b?1:0)>>16&255,c.length+d.length+1+("zTXt"==b?1:0)>>8&255,c.length+d.length+1+("zTXt"==b?1:0)&255)+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+String.fromCharCode((l^4294967295)>>24&255,(l^4294967295)>>16&255,(l^4294967295)>>
-8&255,(l^4294967295)&255);e+=a.substring(k-8,a.length);break}e+=a.substring(k-8,k-4+l);d=f(a,l);f(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,
-e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(e){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var k=EditorUi.prototype.init;
-EditorUi.prototype.init=function(){k.apply(this,arguments);var a=this.editor.graph,b=this;mxClient.IS_SVG&&this.editor.addSvgShadow(a.view.canvas.ownerSVGElement,null,!0);this.defaultFilename=mxResources.get("untitledDiagram");var c=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a&&null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:c.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=
-b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var d=this.actions.get("print");d.setEnabled(!mxClient.IS_IOS||!navigator.standalone);d.visible=d.isEnabled();if(!this.editor.chromeless){this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,
-!0,"insertEllipse",!0);mxClient.IS_IE||a.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a)&&!b.isEditing())try{for(var c=a.clipboardData||a.originalEvent.clipboardData,b=!1,d=0;d<c.types.length;d++)if("text/"===c.types[d].substring(0,5)){b=!0;break}if(!b){var e=c.items;for(index in e){var f=e[index];if("file"===f.kind){var g=this.editor.graph.getInsertPoint();this.importFiles([f.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(a);
-break}}}}catch(k){}}),!1);var e=document.createElement("div");e.style.position="absolute";e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.display="block";e.contentEditable=!0;mxUtils.setOpacity(e,0);e.style.width="1px";e.style.height="1px";e.innerHTML="\x26nbsp;";var f=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);
-if(null!=a.container&&a.isEnabled()&&!a.isMouseDown&&!a.isEditing()&&null==this.dialog&&"INPUT"!=c.nodeName&&"TEXTAREA"!=c.nodeName&&(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)&&!f)e.style.left=a.container.scrollLeft+10+"px",e.style.top=a.container.scrollTop+10+"px",a.container.appendChild(e),f=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){e.focus();document.execCommand("selectAll",!1,null)},0):(e.focus(),document.execCommand("selectAll",!1,null))}));var g=
-function(){window.setTimeout(function(){e.innerHTML="\x26nbsp;";e.focus();document.execCommand("selectAll",!1,null)},0)};mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){if(f&&(224==c||17==c||91==c))f=!1,!a.isEditing()&&(null==this.dialog&&null!=a.container)&&a.container.focus(),e.parentNode.removeChild(e)}),0)}));mxEvent.addListener(e,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(e),
-g())}));mxEvent.addListener(e,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&(this.copyCells(e,!0),g())}));mxEvent.addListener(e,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&(e.innerHTML="\x26nbsp;",e.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,e);e.innerHTML="\x26nbsp;"}),0))}),!0);var l=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==e?!0:l.apply(this,arguments)}}d=Math.max(document.body.clientHeight||
-0,document.documentElement.clientHeight||0)/2;this.spinner=this.createSpinner(document.body.clientWidth/2-2,d,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){if(null==d&&(!mxClient.IS_IE||
-10<document.documentMode))d=this.highlightElement(c);a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,
-"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",
-!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.test){d=document.getElementById("geFooter");null!=d&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width=
-"98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),d.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);
-this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var m=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:m.apply(this,arguments)}}d=document.getElementById("geInfo");null!=d&&d.parentNode.removeChild(d);if(Graph.fileSupport){var n=null;mxEvent.addListener(a.container,"dragleave",function(b){a.isEnabled()&&(null!=n&&(n.parentNode.removeChild(n),n=null),b.stopPropagation(),
-b.preventDefault())});mxEvent.addListener(a.container,"dragover",mxUtils.bind(this,function(b){if(null==n&&(!mxClient.IS_IE||10<document.documentMode))n=this.highlightElement(a.container);null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a.container,"drop",mxUtils.bind(this,function(b){null!=n&&(n.parentNode.removeChild(n),n=null);if(a.isEnabled()){var c=mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=a.view.translate,
-e=a.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(b)&&(g=f=0);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b));else{var k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(b);if(null!=c)a.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){c=
-b.dataTransfer.getData("text/html");e=document.createElement("div");e.innerHTML=c;var d=null,l=e.getElementsByTagName("img");null!=l&&1==l.length?(c=l[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)||(d=!0)):(e=e.getElementsByTagName("a"),null!=e&&1==e.length&&(c=e[0].getAttribute("href")));a.setSelectionCells(this.insertTextAt(c,f,g,!0,d))}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(b){var c=Math.max(1,b.width);
-b=Math.max(1,b.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,b));a.setSelectionCell(a.insertVertex(null,null,"",f,g,c*d,b*d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+k+";"))}),mxUtils.bind(this,function(b){a.setSelectionCells(this.insertTextAt(k,f,g,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&a.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),
-f,g,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode()};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",
-!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=this.editor.graph,d=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),e=!1;try{var f=d.lastIndexOf("%3E");f<d.length-3&&(d=d.substring(0,f+3))}catch(g){}try{var k=b.getElementsByTagName("span"),l=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(d);this.isCompatibleString(l)&&(e=!0,d=l)}catch(m){}c.lastPasteXml==d?c.pasteCounter++:
-(c.lastPasteXml=d,c.pasteCounter=0);f=c.pasteCounter*c.gridSize;if(null!=d&&0<d.length&&(e||this.isCompatibleString(d)?c.setSelectionCells(this.importXml(d,f,f)):(e=c.getInsertPoint(),c.setSelectionCells(this.insertTextAt(d,e.x+f,e.y+f,!0))),!c.isSelectionEmpty())){c.scrollCellToVisible(c.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(n){}}}};var l=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=
-function(a){var b=Format.prototype.init;Format.prototype.init=function(){b.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var c=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed?c.apply(this,arguments):this.clear()};var d=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=d.apply(this,arguments);var b=this.editorUi;if(b.editor.graph.isEnabled()){var c=
-b.getCurrentFile();null!=c&&c.isAutosaveOptional()&&(c=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(c))}return a};var e=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&
-this.container.appendChild(this.addStyles(this.createPanel()));e.apply(this,arguments)};var f=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";b.style.marginRight="2px";a.appendChild(b);
-b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return f.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function c(a){var b=mxUtils.button("",function(b){d.getModel().beginUpdate();try{var c=
-d.getSelectionCells();for(b=0;b<c.length;b++){for(var e=d.getModel().getStyle(c[b]),g=0;g<f.length;g++)e=mxUtils.removeStylename(e,f[g]);null!=a?(e=mxUtils.setStyle(e,mxConstants.STYLE_FILLCOLOR,a.fill),e=mxUtils.setStyle(e,mxConstants.STYLE_STROKECOLOR,a.stroke),e=mxUtils.setStyle(e,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(e=mxUtils.setStyle(e,mxConstants.STYLE_FILLCOLOR,"#ffffff"),e=mxUtils.setStyle(e,mxConstants.STYLE_STROKECOLOR,"#000000"),e=mxUtils.setStyle(e,mxConstants.STYLE_GRADIENTCOLOR,
-null));d.getModel().setStyle(c[b],e)}}finally{d.getModel().endUpdate()}});b.style.width="36px";b.style.height="30px";b.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr\x3d'"+a.fill+"', EndColorStr\x3d'"+a.gradient+"', GradientType\x3d0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":b.style.backgroundColor=a.fill,b.style.border=
-"1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border="1px solid #000000");e.appendChild(b)}e.innerHTML="";for(var g=0;g<a.length;g++)0<g&&0==mxUtils.mod(g,4)&&mxUtils.br(e),c(a[g])}function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var d=this.editorUi.editor.graph,e=document.createElement("div");e.style.whiteSpace="normal";e.style.paddingLeft="24px";e.style.paddingRight="20px";
-a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(e);var f=["plain-gray","plain-blue","plain-green","plain-orange","plain-yellow","plain-red","plain-purple",null];null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var g=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",
-stroke:"#9673a6"}],[null,{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}]],k=document.createElement("div");k.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII\x3d);";
+":"+m.value));f.send(JSON.stringify(e))}else this.hideDialog(),this.spinner.stop(),this.handleError(JSON.parse(c.getText()))}),mxUtils.bind(this,function(a){this.hideDialog();this.spinner.stop();this.handleError({message:mxResources.get("unknownError")})}))}),null,null,c,null,!1);this.showDialog(c.container,260,260,!0,!1);c.init()};EditorUi.prototype.uploadToImgur=function(a,b,c,d){var e=this.spinner.pause(),f=new ErrorDialog(this,mxResources.get("warning"),'\x3cimg style\x3d"max-width:300px;max-height:80px;margin-bottom:20px;padding:6px;border:1px solid gray;" src\x3d"data:image/png;base64,'+
+b+'"/\x3e\x3cbr\x3e'+mxResources.get("publishConfirmation"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("publish"),mxUtils.bind(this,function(){e();var f=null!=a.getTitle()?a.getTitle():this.defaultFilename,g=f.lastIndexOf("."),k=f;0<g&&(k=f=k.substring(0,g));var g=new mxXmlRequest("/imgur",JSON.stringify({type:"base64",image:b,name:k+".png",title:f,description:"Made with https://www.draw.io"}),"POST"),l=mxUtils.bind(this,function(a){var b={message:mxResources.get("unknownError")};
+try{var c=JSON.parse(a.getText()),b={message:c.message||c.data.error}}catch(d){}this.handleError(b)});g.send(mxUtils.bind(this,function(a){if(200==a.getStatus())try{var b=JSON.parse(a.getText());try{(new Image).src="log?severity\x3dCONFIG\x26msg\x3dimgur-published:"+b.data.id+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION)+"\x26ts\x3d"+(new Date).getTime()}catch(e){}var g=mxUtils.bind(this,function(){this.spinner.stop();var a="http://i.imgur.com/"+b.data.id+".png",c="https://www.draw.io/imgur?delete\x3d"+
+b.data.deletehash,a=new ErrorDialog(this,mxResources.get("published"),mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"])+"\x3cbr\x3e"+mxResources.get("deleteUrl",[c]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("share"),function(){d(b.data.id)},!1);this.showDialog(a.container,340,170,!0,!1);a.init()});if(c){var k=new mxXmlRequest("/imgur?"+b.data.deletehash,JSON.stringify({title:f,description:"Edit a copy of this diagram at https://www.draw.io/i/"+
+b.data.id}),"POST");k.send(mxUtils.bind(this,function(){200==k.getStatus()?g():l(k)}),mxUtils.bind(this,function(){l(k)}))}else g()}catch(m){this.handleError(m)}else l(a)}),mxUtils.bind(this,function(a){l(a)}))}));this.showDialog(f.container,320,250,!0,!1);f.init()};EditorUi.prototype.publishImage=function(a,b){var c=this.getCurrentFile();null!=c&&(this.isExportToCanvas()?this.showExportDialog(!1,mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,
+function(d,e,f,g,k){d=parseInt(d);if(!isNaN(d)&&0<d){d/=100;var l=this.editor.graph.isSelectionEmpty();f=null!=f?f:l;if(this.spinner.spin(document.body,mxResources.get("publishing")))try{this.exportToCanvas(mxUtils.bind(this,function(d){try{var e=k?mxUtils.getXml(this.editor.getGraphXml(f)):null,g=this.createPngDataUri(d,e);a(c,g.substring(g.lastIndexOf(",")+1),k,b)}catch(l){this.handleError(l)}}),null,null,null,mxUtils.bind(this,function(a){this.handleError(a)}),null,f,d||1,e,g)}catch(m){this.handleError(m)}}})):
+this.showRemoteExportDialog(mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(d,e){if(this.spinner.spin(document.body,mxResources.get("publishing"))){var f=this.editor.graph.getGraphBounds(),g=this.getFileData(!0,null,null,null,d);if(f.width*f.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE)try{var k=new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+(e?"1":"0")+"\x26xml\x3d"+encodeURIComponent(g));k.send(mxUtils.bind(this,
+function(){200==k.getStatus()?a(c,k.getText(),e,b):this.handleError(k)}))}catch(l){this.handleError(l)}else this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"))}})))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);
+if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,d){d()};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,f,g){g=null;null!=b&&(g=b.background,g==mxConstants.NONE&&(g=null));b=this.editor.graph.getSvg(g,null,null,null,null,f);b.setAttribute("content",encodeURIComponent(a));null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,
+function(a){e((!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(a))}));else return(!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(b)};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,k,l,m,n){f=null!=f?f:!0;var p=l?null:this.editor.graph.background;
+p==mxConstants.NONE&&(p=null);null==p&&(p=d);null==p&&!1==l&&(p="#ffffff");this.convertImages(this.editor.graph.getSvg(p,null,null,null,null,null!=g?g:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),l=parseInt(c.getAttribute("height"));k=null!=k?k:1;null!=b&&(k=!f?b/g:Math.min(1,Math.min(3*b/(4*l),b/g)));e.setAttribute("width",Math.ceil(k*g));e.setAttribute("height",Math.ceil(k*l));g=
+e.getContext("2d");g.scale(k,k);g.drawImage(d,0,0);a(e)});d.onerror=function(a){null!=e&&e(a)};try{m&&this.editor.addSvgShadow(c),this.convertMath(this.editor.graph,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))}catch(g){null!=e&&e(g)}}),c,n)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert;a.convert=function(c){null!=c&&(("http://"==c.substring(0,7)||"https://"==c.substring(0,8))&&c.substring(0,
+a.baseUrl.length)!=a.baseUrl?c=PROXY_URL+"?url\x3d"+encodeURIComponent(c):"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)));return c};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var e=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var k=a.getElementsByTagName(c),l=0;l<k.length;l++)mxUtils.bind(this,function(c){var k=d.convert(c.getAttribute(g));if(null!=k&&"data:"!=k.substring(0,5)){var l=f[k];null==l?(e++,this.convertImageToDataUri(k,
+function(d){null!=d&&(f[k]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,l)}})(k[l])});c("image","xlink:href");c("img","src");0==e&&b(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b()});else{var c=new Image;c.onload=function(){var a=document.createElement("canvas"),d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);b(a.toDataURL())};
+c.onerror=function(){b()};c.src=a}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),k=this.editor.extractGraphModel(g.documentElement);if(null!=k){var l=new mxGraphModel;(new mxCodec(k.ownerDocument)).decode(k,l);var m=this.editor.graph,n=l.getChildCount(l.getRoot());m.model.getChildCount(m.model.getRoot());m.model.beginUpdate();try{a={};for(g=0;g<n;g++){var p=l.getChildAt(l.getRoot(),g);if(1==n&&!m.isCellLocked(m.getDefaultParent()))var r=
+l.getChildren(p),f=f.concat(m.importCells(r,b,c,m.getDefaultParent(),null,a));else p=m.importCells([p],0,0,m.model.getRoot(),null,a)[0],r=m.model.getChildren(p),m.moveCells(r,b,c),f=f.concat(r)}if(d){m.isGridEnabled()&&(b=m.snap(b),c=m.snap(c));var s=m.getBoundingBoxFromGeometry(f,!0);m.moveCells(f,b-s.x,c-s.y)}}finally{m.model.endUpdate()}}}}catch(I){throw e||this.handleError(I,mxResources.get("invalidOrMissingFile")),I;}return f};EditorUi.prototype.insertTextAt=function(a,b,c,d,e,f){f=null!=f?f:
+!0;if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))return this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200==a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))})),[];if(!this.isOffline()&&(e||"data:"==a.substring(0,5)||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var k=
+this.extractGraphModelFromPng(a),l=this.importXml(k,b,c,f,!0);if(0<l.length)return l}if("data:image/svg+xml;"==a.substring(0,19))try{if(k=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(k=a.substring(a.indexOf(",")+1),k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0)):k=decodeURIComponent(a.substring(a.indexOf(",")+1)),l=this.importXml(k,b,c,f,!0),0<l.length)return l}catch(m){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,
+function(a,d,e){g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),d,e,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+this.convertDataUri(a)+";"))}),!0,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),f=Math.round(d.width*e);d=Math.round(d.height*e);g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),f,d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+
+a+";"))}}),mxUtils.bind(this,function(){var e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,a,g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}));return[]}a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length){g=this.editor.graph;e=null;g.getModel().beginUpdate();
+try{e=g.insertVertex(g.getDefaultParent(),null,"",g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.fireEvent(new mxEventObject("textInserted","cells",[e])),e.value=a,g.updateCellSize(e),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i.test(e.value)&&g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=
+g.gridSize}finally{g.getModel().endUpdate()}return[e]}};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,0.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\.*<graphml xmlns=\".*)/.test(a)||/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||
+null!=b&&/(\.vsdx)($|\?)/i.test(b)};EditorUi.prototype.importFile=function(a,b,c,d,e,f,g,k,l,m){m=null!=m?m:!0;var n=!1,p=null;"image"==b.substring(0,5)?(g=!1,"image/png"==b.substring(0,9)&&(b=this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(p=this.importXml(b,c,d,m),g=!0)),g||(p=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),m&&p.isGridEnabled()&&(c=p.snap(c),d=p.snap(d)),p=[p.insertVertex(null,null,"",c,d,e,f,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+
+a+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,g)?(n=!0,this.parseFile(null!=l?l:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){if(4==a.readyState){var b=null;200==a.status&&(b=this.importXml(a.responseText,c,d,m));null!=k&&k(b)}}),g)):/(\.vsdx)($|\?)/i.test(g)?(new mxVsdxModel).decode(l):p=this.insertTextAt(this.validateFileData(a),c,d,!0);!n&&null!=k&&k(p);return p};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=
+a.length,e,f,g;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="\x3d\x3d";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&
+15)<<2);b+="\x3d";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,f,g,k,l,m,n){var p=null!=b&&null!=
+c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;m=null!=m?m:this.maxImageBytes;l=null!=l?l:!0;var r=this.editor.graph,s=r.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){return null!=a&&"\x3cmxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,c,d,e,f,g,k,l,p)});f=null!=f?f:mxUtils.bind(this,function(a){r.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var I=
+a.length,L=I,N=[],T=mxUtils.bind(this,function(a,b){N[a]=b;if(0==--L){this.spinner.stop();if(null!=k)k(N);else{var c=[];r.getModel().beginUpdate();try{for(var d=0;d<N.length;d++){var e=N[d]();null!=e&&(c=c.concat(e))}}finally{r.getModel().endUpdate()}}f(c)}}),X=0;X<I;X++)mxUtils.bind(this,function(f){var k=a[f],p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==g||g(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var q=a.target.result,p=q.indexOf(","),y=
+atob(q.substring(p+1)),r=mxUtils.parseXml(y),y=r.getElementsByTagName("svg");if(0<y.length){var E=y[0].getAttribute("content");null!=E&&("\x3c"!=E.charAt(0)&&"%"!=E.charAt(0))&&(E=unescape(window.atob?atob(E):Base64.decode(E,!0)));null!=E&&"%"==E.charAt(0)&&(E=decodeURIComponent(E));null!=E&&("\x3cmxfile "===E.substring(0,8)||"\x3cmxGraphModel "===E.substring(0,14))?T(f,mxUtils.bind(this,function(){return e(E,"text/xml",b+f*s,c+f*s,0,0,k.name)})):T(f,mxUtils.bind(this,function(){try{if(q.substring(0,
+p+1),null!=r){var a=r.getElementsByTagName("svg");if(0<a.length){var g=a[0],l=parseFloat(g.getAttribute("width")),m=parseFloat(g.getAttribute("height")),n=g.getAttribute("viewBox");if(null==n||0==n.length)g.setAttribute("viewBox","0 0 "+l+" "+m);else if(isNaN(l)||isNaN(m)){var y=n.split(" ");3<y.length&&(l=parseFloat(y[2]),m=parseFloat(y[3]))}q=this.createSvgDataUri(mxUtils.getXml(a[0]));var x=Math.min(1,Math.min(d/Math.max(1,l)),d/Math.max(1,m));return e(q,k.type,b+f*s,c+f*s,Math.max(1,Math.round(l*
+x)),Math.max(1,Math.round(m*x)),k.name)}}}catch(A){}return null}))}}else{y=!1;if("image/png"==k.type){var G=this.extractGraphModelFromPng(a.target.result);if(null!=G&&0<G.length){var F=new Image;F.src=a.target.result;T(f,mxUtils.bind(this,function(){return e(G,"text/xml",b+f*s,c+f*s,F.width,F.height,k.name)}));y=!0}}y||(null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
+mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,n,q){T(f,mxUtils.bind(this,function(){if(null!=g&&g.length<m){var p=!l||!this.isResampleImage(a.target.result)?1:Math.min(1,Math.min(d/n,d/q));return e(g,k.type,b+f*s,c+f*s,Math.round(n*p),Math.round(q*p),k.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),l,d,n)})))}else e(a.target.result,k.type,b+f*s,c+f*s,240,160,k.name,function(a){T(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)?e(null,k.type,b+f*s,c+f*s,240,160,k.name,function(a){T(f,function(){return a})},k):"image"==k.type.substring(0,5)?p.readAsDataURL(k):p.readAsText(k)})(X)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=
+function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1<l){var m=Math.round(g/l),n=Math.round(k/l),p=document.createElement("canvas");p.width=m;p.height=n;p.getContext("2d").drawImage(a,0,0,m,n);var r=p.toDataURL();if(r.length<b.length){var s=
+document.createElement("canvas");s.width=m;s.height=n;var I=s.toDataURL();r!==I&&(b=r,g=m,k=n)}}}catch(L){}c(b,g,k)};(function(){EditorUi.prototype.crcTable=[];for(var a=0;256>a;a++)for(var b=a,c=0;8>c;c++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[a]=b;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e<d;e++)a=EditorUi.prototype.crcTable[(a^b[c+e])&255]^a>>>8;return a}})();EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=k;k+=b;return a.substring(c,
+k)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,k);do{var l=g(a);if("IDAT"==f(a,4)){e=a.substring(0,k-8);l=4294967295;l=this.updateCRC(l,b,0,4);l=this.updateCRC(l,d,0,d.length);e+=String.fromCharCode(c.length+
+d.length+1+("zTXt"==b?1:0)>>24&255,c.length+d.length+1+("zTXt"==b?1:0)>>16&255,c.length+d.length+1+("zTXt"==b?1:0)>>8&255,c.length+d.length+1+("zTXt"==b?1:0)&255)+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+String.fromCharCode((l^4294967295)>>24&255,(l^4294967295)>>16&255,(l^4294967295)>>8&255,(l^4294967295)&255);e+=a.substring(k-8,a.length);break}e+=a.substring(k-8,k-4+l);d=f(a,l);f(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=
+function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||
+"IDAT"==c)return!0}))}catch(e){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){k.apply(this,arguments);var a=this.editor.graph,b=this;mxClient.IS_SVG&&this.editor.addSvgShadow(a.view.canvas.ownerSVGElement,null,!0);this.defaultFilename=mxResources.get("untitledDiagram");
+var c=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a&&null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:c.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var d=this.actions.get("print");d.setEnabled(!mxClient.IS_IOS||!navigator.standalone);d.visible=d.isEnabled();if(!this.editor.chromeless){this.keyHandler.bindAction(67,
+!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||a.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a)&&!b.isEditing())try{for(var c=a.clipboardData||a.originalEvent.clipboardData,b=!1,d=0;d<c.types.length;d++)if("text/"===
+c.types[d].substring(0,5)){b=!0;break}if(!b){var e=c.items;for(index in e){var f=e[index];if("file"===f.kind){var g=this.editor.graph.getInsertPoint();this.importFiles([f.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(a);break}}}}catch(k){}}),!1);var e=document.createElement("div");e.style.position="absolute";e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.display="block";e.contentEditable=!0;mxUtils.setOpacity(e,0);e.style.width="1px";e.style.height="1px";e.innerHTML="\x26nbsp;";
+var f=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);if(null!=a.container&&a.isEnabled()&&!a.isMouseDown&&!a.isEditing()&&null==this.dialog&&"INPUT"!=c.nodeName&&"TEXTAREA"!=c.nodeName&&(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)&&!f)e.style.left=a.container.scrollLeft+10+"px",e.style.top=a.container.scrollTop+
+10+"px",a.container.appendChild(e),f=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){e.focus();document.execCommand("selectAll",!1,null)},0):(e.focus(),document.execCommand("selectAll",!1,null))}));var g=function(){window.setTimeout(function(){e.innerHTML="\x26nbsp;";e.focus();document.execCommand("selectAll",!1,null)},0)};mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){if(f&&(224==c||17==c||91==c))f=!1,!a.isEditing()&&
+(null==this.dialog&&null!=a.container)&&a.container.focus(),e.parentNode.removeChild(e)}),0)}));mxEvent.addListener(e,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(e),g())}));mxEvent.addListener(e,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&(this.copyCells(e,!0),g())}));mxEvent.addListener(e,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&(e.innerHTML="\x26nbsp;",e.focus(),window.setTimeout(mxUtils.bind(this,
+function(){this.pasteCells(b,e);e.innerHTML="\x26nbsp;"}),0))}),!0);var l=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==e?!0:l.apply(this,arguments)}}d=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2;this.spinner=this.createSpinner(document.body.clientWidth/2-2,d,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;
+null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){if(null==d&&(!mxClient.IS_IE||10<document.documentMode))d=this.highlightElement(c);a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
+0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,
+Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.test){d=document.getElementById("geFooter");
+null!=d&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),d.appendChild(this.styleInput),
+this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var m=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:m.apply(this,arguments)}}d=document.getElementById("geInfo");
+null!=d&&d.parentNode.removeChild(d);if(Graph.fileSupport){var n=null;mxEvent.addListener(a.container,"dragleave",function(b){a.isEnabled()&&(null!=n&&(n.parentNode.removeChild(n),n=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(a.container,"dragover",mxUtils.bind(this,function(b){if(null==n&&(!mxClient.IS_IE||10<document.documentMode))n=this.highlightElement(a.container);null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a.container,
+"drop",mxUtils.bind(this,function(b){null!=n&&(n.parentNode.removeChild(n),n=null);if(a.isEnabled()){var c=mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=a.view.translate,e=a.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(b)&&(g=f=0);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b));else{var k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?
+b.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(b);if(null!=c)a.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){c=b.dataTransfer.getData("text/html");e=document.createElement("div");e.innerHTML=c;var d=null,l=e.getElementsByTagName("img");null!=l&&1==l.length?(c=l[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)||(d=!0)):(e=e.getElementsByTagName("a"),null!=e&&1==e.length&&(c=e[0].getAttribute("href")));
+a.setSelectionCells(this.insertTextAt(c,f,g,!0,d))}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(b){var c=Math.max(1,b.width);b=Math.max(1,b.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,b));a.setSelectionCell(a.insertVertex(null,null,"",f,g,c*d,b*d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+k+";"))}),mxUtils.bind(this,
+function(b){a.setSelectionCells(this.insertTextAt(k,f,g,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&a.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),f,g,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode()};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=
+mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=this.editor.graph,d=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),e=!1;try{var f=d.lastIndexOf("%3E");f<d.length-3&&(d=d.substring(0,f+3))}catch(g){}try{var k=
+b.getElementsByTagName("span"),l=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(d);this.isCompatibleString(l)&&(e=!0,d=l)}catch(m){}c.lastPasteXml==d?c.pasteCounter++:(c.lastPasteXml=d,c.pasteCounter=0);f=c.pasteCounter*c.gridSize;if(null!=d&&0<d.length&&(e||this.isCompatibleString(d)?c.setSelectionCells(this.importXml(d,f,f)):(e=c.getInsertPoint(),c.setSelectionCells(this.insertTextAt(d,e.x+f,e.y+f,!0))),!c.isSelectionEmpty())){c.scrollCellToVisible(c.getSelectionCell());
+null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(n){}}}};var l=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var b=Format.prototype.init;Format.prototype.init=function(){b.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var c=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed?c.apply(this,arguments):this.clear()};
+var d=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=d.apply(this,arguments);var b=this.editorUi;if(b.editor.graph.isEnabled()){var c=b.getCurrentFile();null!=c&&c.isAutosaveOptional()&&(c=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),
+a.appendChild(c))}return a};var e=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));e.apply(this,arguments)};var f=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",
+mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";b.style.marginRight="2px";a.appendChild(b);b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return f.apply(this,
+arguments)};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function c(a){var b=mxUtils.button("",function(b){d.getModel().beginUpdate();try{var c=d.getSelectionCells();for(b=0;b<c.length;b++){for(var e=d.getModel().getStyle(c[b]),g=0;g<f.length;g++)e=mxUtils.removeStylename(e,f[g]);null!=a?(e=mxUtils.setStyle(e,mxConstants.STYLE_FILLCOLOR,a.fill),e=mxUtils.setStyle(e,mxConstants.STYLE_STROKECOLOR,a.stroke),e=mxUtils.setStyle(e,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(e=mxUtils.setStyle(e,
+mxConstants.STYLE_FILLCOLOR,"#ffffff"),e=mxUtils.setStyle(e,mxConstants.STYLE_STROKECOLOR,"#000000"),e=mxUtils.setStyle(e,mxConstants.STYLE_GRADIENTCOLOR,null));d.getModel().setStyle(c[b],e)}}finally{d.getModel().endUpdate()}});b.style.width="36px";b.style.height="30px";b.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr\x3d'"+a.fill+"', EndColorStr\x3d'"+
+a.gradient+"', GradientType\x3d0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":b.style.backgroundColor=a.fill,b.style.border="1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border="1px solid #000000");e.appendChild(b)}e.innerHTML="";for(var g=0;g<a.length;g++)0<g&&0==mxUtils.mod(g,4)&&mxUtils.br(e),c(a[g])}function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity=
+"0.5"})}var d=this.editorUi.editor.graph,e=document.createElement("div");e.style.whiteSpace="normal";e.style.paddingLeft="24px";e.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(e);var f=["plain-gray","plain-blue","plain-green","plain-orange","plain-yellow","plain-red","plain-purple",null];null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var g=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},
+{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",
+stroke:"#996185",gradient:"#d5739d"}]],k=document.createElement("div");k.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII\x3d);";
a.appendChild(k);mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,g.length);b(g[this.editorUi.currentScheme])}));var l=document.createElement("div");l.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg\x3d\x3d);";
a.appendChild(l);mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,g.length);b(g[this.editorUi.currentScheme])}));c(k);c(l);b(g[this.editorUi.currentScheme]);return a};return l.apply(this,arguments)};null!=window.StyleFormatPanel&&(StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),c=null;1==this.editorUi.editor.graph.getSelectionCount()&&(c=mxUtils.button(mxResources.get("editStyle"),
mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),c.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),c.style.width="202px",c.style.marginBottom="2px",a.appendChild(c));var d=this.editorUi.editor.graph,e=d.view.getState(d.getSelectionCell());1==d.getSelectionCount()&&null!=e&&null!=e.shape&&null!=e.shape.stencil?(b=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editShape").funct()})),
@@ -7272,21 +7273,21 @@ f=Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.h
this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,
!0);b.outline.view.validate()});return b};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").setEnabled(c);this.actions.get("shadowVisible").setEnabled(c);this.actions.get("connectionArrows").setEnabled(c);
this.actions.get("connectionPoints").setEnabled(c);this.actions.get("copyStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);this.actions.get("moveToFolder").setEnabled(null!=b);this.actions.get("makeCopy").setEnabled(null!=b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled("1"==
-urlParams.embed||null!=b&&!b.isRestricted());this.actions.get("imgur").setEnabled(null!=b&&!b.isRestricted());this.actions.get("github").setEnabled(null!=b&&!b.isRestricted());this.actions.get("publishLink").setEnabled(null!=b&&!b.isRestricted());this.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=
-null;Graph.prototype.pasteCounter=0;Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){p.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#dropShadow)"):this.view.getDrawPane().removeAttribute("filter"),
-b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};var r=Graph.prototype.init;Graph.prototype.init=function(){function a(c){b=c;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(c)}r.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=new mxStackLayout(this.graph,!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1<b.height/20){var c=b.height%20;b.height+=10<c?20-c:-c}this.graph.getModel().setGeometry(a,
-b)};c.fill=!0;c.unitSize=mxRackContainer.unitSize|20;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.resizeParent=!1;return c}return d.apply(this,arguments)}};mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];
-mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",
-STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries.eeLogicGates=[STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeResistors=[STENCIL_PATH+"/electrical/resistors.xml"];mxStencilRegistry.libraries.eeCapacitors=[STENCIL_PATH+"/electrical/capacitors.xml"];mxStencilRegistry.libraries.eeInductors=[STENCIL_PATH+"/electrical/inductors.xml"];mxStencilRegistry.libraries.eeSwitchesRelays=
-[STENCIL_PATH+"/electrical/switchesRelays.xml",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries.eeDiodes=[STENCIL_PATH+"/electrical/diodes.xml"];mxStencilRegistry.libraries.eeSources=[STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries.eeTransistors=[STENCIL_PATH+"/electrical/mosfets1.xml",STENCIL_PATH+"/electrical/mosfets2.xml",STENCIL_PATH+"/electrical/transistors.xml"];mxStencilRegistry.libraries.eeMisc=[STENCIL_PATH+"/electrical/electro-mechanical.xml",
-STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries.eeAudio=[STENCIL_PATH+"/electrical/radio.xml"];mxStencilRegistry.libraries.eePlcLadder=[STENCIL_PATH+"/electrical/plc_ladder.xml"];mxStencilRegistry.libraries.eeAbstract=[STENCIL_PATH+"/electrical/abstract.xml",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeOptical=[STENCIL_PATH+"/electrical/opto_electronics.xml"];mxStencilRegistry.libraries.eeVacuumTubes=[STENCIL_PATH+"/electrical/vacuum_tubes.xml"];
-mxStencilRegistry.libraries.eeWaveforms=[STENCIL_PATH+"/electrical/waveforms.xml"];mxStencilRegistry.libraries.eeInstruments=[STENCIL_PATH+"/electrical/instruments.xml"];mxStencilRegistry.libraries["mscae/cloud"]=[STENCIL_PATH+"/mscae/cloud.xml"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];
-mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+
-"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",
-STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.citrix=[STENCIL_PATH+"/citrix.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];
-mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var s=
-mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,g,k,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return s.apply(this,arguments)}})();var mxSettings={key:".drawio-config",settings:{language:"",libraries:Sidebar.prototype.defaultEntries,customLibraries:[],plugins:[],formatWidth:"240",currentEdgeStyle:Graph.prototype.defaultEdgeStyle,currentVertexStyle:{},createTarget:!1,pageFormat:mxGraph.prototype.pageFormat,search:!0,showStartScreen:!0,gridColor:mxGraphView.prototype.gridColor,autosave:!0,version:12,isNew:!0},getLanguage:function(){return this.settings.language},setLanguage:function(a){this.settings.language=a},getUi:function(){return this.settings.ui},
+urlParams.embed||null!=b&&!b.isRestricted());this.actions.get("imgur").setEnabled(null!=b&&!b.isRestricted());this.actions.get("twitter").setEnabled(null!=b&&!b.isRestricted());this.actions.get("facebook").setEnabled(null!=b&&!b.isRestricted());this.actions.get("github").setEnabled(null!=b&&!b.isRestricted());this.actions.get("publishLink").setEnabled(null!=b&&!b.isRestricted());this.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&
+null!=a&&null!=a.shape&&null!=a.shape.stencil)};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){p.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&
+(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#dropShadow)"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};var r=Graph.prototype.init;Graph.prototype.init=function(){function a(c){b=c;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(c)}r.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,
+"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=new mxStackLayout(this.graph,
+!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1<b.height/20){var c=b.height%20;b.height+=10<c?20-c:-c}this.graph.getModel().setGeometry(a,b)};c.fill=!0;c.unitSize=mxRackContainer.unitSize|20;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.resizeParent=!1;return c}return d.apply(this,arguments)}};mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+
+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+
+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries.eeLogicGates=[STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeResistors=[STENCIL_PATH+"/electrical/resistors.xml"];mxStencilRegistry.libraries.eeCapacitors=
+[STENCIL_PATH+"/electrical/capacitors.xml"];mxStencilRegistry.libraries.eeInductors=[STENCIL_PATH+"/electrical/inductors.xml"];mxStencilRegistry.libraries.eeSwitchesRelays=[STENCIL_PATH+"/electrical/switchesRelays.xml",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries.eeDiodes=[STENCIL_PATH+"/electrical/diodes.xml"];mxStencilRegistry.libraries.eeSources=[STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries.eeTransistors=[STENCIL_PATH+"/electrical/mosfets1.xml",
+STENCIL_PATH+"/electrical/mosfets2.xml",STENCIL_PATH+"/electrical/transistors.xml"];mxStencilRegistry.libraries.eeMisc=[STENCIL_PATH+"/electrical/electro-mechanical.xml",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries.eeAudio=[STENCIL_PATH+"/electrical/radio.xml"];mxStencilRegistry.libraries.eePlcLadder=[STENCIL_PATH+"/electrical/plc_ladder.xml"];mxStencilRegistry.libraries.eeAbstract=[STENCIL_PATH+"/electrical/abstract.xml",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeOptical=
+[STENCIL_PATH+"/electrical/opto_electronics.xml"];mxStencilRegistry.libraries.eeVacuumTubes=[STENCIL_PATH+"/electrical/vacuum_tubes.xml"];mxStencilRegistry.libraries.eeWaveforms=[STENCIL_PATH+"/electrical/waveforms.xml"];mxStencilRegistry.libraries.eeInstruments=[STENCIL_PATH+"/electrical/instruments.xml"];mxStencilRegistry.libraries["mscae/cloud"]=[STENCIL_PATH+"/mscae/cloud.xml"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=
+[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=
+[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=
+[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.citrix=[STENCIL_PATH+"/citrix.xml"];mxStencilRegistry.libraries.archimate=
+[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&
+("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var s=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,g,k,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return s.apply(this,arguments)}})();var mxSettings={key:".drawio-config",settings:{language:"",libraries:Sidebar.prototype.defaultEntries,customLibraries:[],plugins:[],formatWidth:"240",currentEdgeStyle:Graph.prototype.defaultEdgeStyle,currentVertexStyle:{},createTarget:!1,pageFormat:mxGraph.prototype.pageFormat,search:!0,showStartScreen:!0,gridColor:mxGraphView.prototype.gridColor,autosave:!0,version:12,isNew:!0},getLanguage:function(){return this.settings.language},setLanguage:function(a){this.settings.language=a},getUi:function(){return this.settings.ui},
setUi:function(a){this.settings.ui=a},getShowStartScreen:function(){return this.settings.showStartScreen},setShowStartScreen:function(a){this.settings.showStartScreen=a},getGridColor:function(){return this.settings.gridColor},setGridColor:function(a){this.settings.gridColor=a},getAutosave:function(){return this.settings.autosave},setAutosave:function(a){this.settings.autosave=a},getLibraries:function(){return this.settings.libraries},setLibraries:function(a){this.settings.libraries=a},addCustomLibrary:function(a){mxSettings.load();
0>mxUtils.indexOf(this.settings.customLibraries,a)&&this.settings.customLibraries.push(a);mxSettings.save()},removeCustomLibrary:function(a){mxSettings.load();mxUtils.remove(a,this.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return this.settings.customLibraries},getPlugins:function(){return this.settings.plugins},setPlugins:function(a){this.settings.plugins=a},getFormatWidth:function(){return parseInt(this.settings.formatWidth)},setFormatWidth:function(a){this.settings.formatWidth=
a},getCurrentEdgeStyle:function(){return this.settings.currentEdgeStyle},setCurrentEdgeStyle:function(a){this.settings.currentEdgeStyle=a},getCurrentVertexStyle:function(){return this.settings.currentVertexStyle},setCurrentVertexStyle:function(a){this.settings.currentVertexStyle=a},isCreateTarget:function(){return this.settings.createTarget},setCreateTarget:function(a){this.settings.createTarget=a},getPageFormat:function(){return this.settings.pageFormat},setPageFormat:function(a){this.settings.pageFormat=
@@ -7644,7 +7645,8 @@ ChatWindow.prototype.collaboratorListener=function(a){var c=null;if(!a.collabora
ChatWindow.prototype.htmlEscape=function(a){return a.replace(/&/g,"\x26amp;").replace(/</g,"\x26lt;").replace(/>/g,"\x26gt;").replace(/"/g,"\x26quot;").replace(/'/g,"\x26#039;")};App=function(a,c,f){EditorUi.call(this,a,c,null!=f?f:"1"==urlParams.lightbox);mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII\x3d":
(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,b,c){var f=window.open(a);null==f||void 0===f?this.showDialog((new PopupDialog(this,a,b,c)).container,320,140,!0,!0):null!=b&&b()});this.updateUi();a=document.createElement("canvas");this.canvasSupported=!(!a.getContext||!a.getContext("2d"));window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.isOffline()||(EditDataDialog.placeholderHelpLink=
"https://support.draw.io/questions/9338941");this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(a=0;a<App.DrawPlugins.length;a++)App.DrawPlugins[a](this);window.Draw.loadPlugin=function(a){a(this)}}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.DROPBOX_APPKEY="libwls2fa9szdji";
-App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"/plugins/explore.js",ex:"/plugins/explore.js",p1:"/plugins/p1.js",ac:"/plugins/connect.js",acj:"/plugins/connectJira.js",voice:"/plugins/voice.js",tips:"/plugins/tooltips.js",svgdata:"/plugins/svgdata.js",doors:"/plugins/doors.js"};App.getStoredMode=function(){var a=null;if("undefined"!=typeof Storage)for(var c=document.cookie.split(";"),f=0;f<c.length;f++){var d=mxUtils.trim(c[f]);if("MODE\x3d"==d.substring(0,5)){a=d.substring(5);break}}return a};
+App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"/plugins/explore.js",ex:"/plugins/explore.js",p1:"/plugins/p1.js",ac:"/plugins/connect.js",acj:"/plugins/connectJira.js",voice:"/plugins/voice.js",tips:"/plugins/tooltips.js",svgdata:"/plugins/svgdata.js",doors:"/plugins/doors.js",electron:"plugins/electron.js"};
+App.getStoredMode=function(){var a=null;if("undefined"!=typeof Storage)for(var c=document.cookie.split(";"),f=0;f<c.length;f++){var d=mxUtils.trim(c[f]);if("MODE\x3d"==d.substring(0,5)){a=d.substring(5);break}}return a};
(function(){window.isSvgBrowser=window.isSvgBrowser||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;if(!mxClient.IS_CHROMEAPP&&("1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode,null==App.mode&&(App.mode=App.getStoredMode())),null!=window.mxscript&&("function"===typeof window.DriveClient&&("0"!=urlParams.gapi&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_GOOGLE||
null!=urlParams.state&&""==window.location.hash||null!=window.location.hash&&"#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js"):"0"==urlParams.chrome&&(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?App.mode==App.MODE_DROPBOX||null!=window.location.hash&&"#D"==window.location.hash.substring(0,2)?mxscript("https://www.dropbox.com/static/api/1/dropins.js",
null,"dropboxjs",App.DROPBOX_APPKEY):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript("https://js.live.net/v5.0/wl.js"):"0"==urlParams.chrome&&(window.OneDriveClient=null):window.OneDriveClient=
@@ -7682,7 +7684,8 @@ this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fir
this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);
mxSettings.save()}));mxClient.IS_CHROMEAPP&&(this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave());null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);if(!this.editor.chromeless&&null!=this.sidebar&&(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0)))this.toggleScratchpad(),mxSettings.save();this.addListener("formatWidthChanged",
function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&("test.draw.io"==window.location.hostname||"cdn.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"jgraph.github.io"==window.location.hostname)};App.prototype.isLegacyDriveDomain=function(){return 0==urlParams.drive||"legacy.draw.io"==window.location.hostname};
-App.prototype.checkLicense=function(){var a=this.drive.getUser(),a=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=a){var c=a.lastIndexOf("@"),f=a;0<=c&&(f=a.substring(c+1));mxUtils.post("/license","domain\x3d"+encodeURIComponent(f)+"\x26ts\x3d"+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200==a.getStatus()){var b=a.getText();if(0<b.length){var c=JSON.parse(b);null!=c&&this.handleLicense(c,f)}}}catch(g){}}))}};
+App.prototype.checkLicense=function(){var a=this.drive.getUser(),a=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=a){var c=a.lastIndexOf("@"),f=a;0<=c&&(f=a.substring(c+1),a=this.crc32(a.substring(0,c))+"@"+f);mxUtils.post("/license","domain\x3d"+encodeURIComponent(f)+"\x26email\x3d"+encodeURIComponent(a)+"\x26ts\x3d"+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200==a.getStatus()){var b=a.getText();if(0<b.length){var c=
+JSON.parse(b);null!=c&&this.handleLicense(c,f)}}}catch(g){}}))}};
App.prototype.handleLicense=function(a,c){var f=document.getElementById("geFooter"),d=null;if(null!=f&&null!=a)if(d=a.expiry,null!=a.footer)f.innerHTML=decodeURIComponent(a.footer);else if(this.hideFooter(),null!=d&&"never"!=d){var b=new Date(Date.parse(d)),e=Math.round((b-Date.now())/864E5);if(90>e){var g="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain\x3d"+encodeURIComponent(c);f.style.height="100%";f.style.margin="0px";f.style.display=
"";0>e?(this.footerHeight=80,f.innerHTML='\x3ctable height\x3d"100%"\x3e\x3ctr\x3e\x3ctd valign\x3d"middle" align\x3d"center" class\x3d"geStatusAlert geBlink"\x3e\x3ca href\x3d"'+g+'" style\x3d"padding-top:16px;" target\x3d"_blank"\x3e\x3cimg border\x3d"0" src\x3d"'+mxGraph.prototype.warningImage.src+'" align\x3d"top" style\x3d"margin-right:6px"\x3e'+mxResources.get("licenseHasExpired",[c,b.toLocaleDateString()])+"\x3c/a\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e"):(this.footerHeight=46,f.innerHTML=
'\x3ctable height\x3d"100%"\x3e\x3ctr\x3e\x3ctd valign\x3d"middle" align\x3d"center" class\x3d"geStatusAlert"\x3e\x3ca href\x3d"'+g+'" target\x3d"_blank"\x3e\x3cimg border\x3d"0" src\x3d"'+mxGraph.prototype.warningImage.src+'" align\x3d"top" style\x3d"margin-right:6px"\x3e'+mxResources.get("licenseWillExpire",[c,b.toLocaleDateString()])+"\x3c/a\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e");this.refresh()}}return d};
@@ -7905,36 +7908,38 @@ this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get(
c.click()}else{window.openNew=!1;window.openKey="import";var e=Editor.useLocalStorage;Editor.useLocalStorage=!b;window.openFile=new OpenFile(function(b){a.hideDialog(b)});window.openFile.setConsumer(function(b,c){d.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var g=a.dialog,k=g.close;a.dialog.close=function(b){Editor.useLocalStorage=e;k.apply(g,arguments);b&&(null==a.getCurrentFile()&&"1"!=urlParams.embed)&&a.showSplash()}}}
function m(b){b.pickFile(function(c){if(a.spinner.spin(document.body,mxResources.get("loading")))if(b==a.dropbox){var d=/(\.png)$/i.test(c)?"image/png":"text/xml";a.loadUrl(c,function(a){n(a,d,c)},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},"image/png"==d)}else b.getFile(c,function(a){var b=/(\.png)$/i.test(a.getTitle())?"image/png":"text/xml";n(a.getData(),b,a.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},!0)},!0)}var n=
mxUtils.bind(this,function(b,c,e){"image/png"==c?a.loadImage(b,mxUtils.bind(this,function(g){a.resizeImage(g,b,mxUtils.bind(this,function(g,k,l){g=Math.min(1,Math.min(a.maxImageSize/k,a.maxImageSize/l));a.importFile(b,c,0,0,Math.round(k*g),Math.round(l*g),e,function(b){a.spinner.stop();d.setSelectionCells(b)})}),!0)})):a.importFile(b,c,0,0,0,0,e,function(b){a.spinner.stop();d.setSelectionCells(b)})});null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){m(a.drive)},c):e&&b.addItem(mxResources.get("googleDrive")+
-" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){m(a.dropbox)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){m(a.oneDrive)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);b.addItem(mxResources.get("browser")+
-"...",null,function(){l(!1)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){l(!0)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url\x3d"+encodeURIComponent(b),function(a){n(a,c,b)},function(){a.spinner.stop();
-a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))})).isEnabled=b;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"!=uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");
-mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage)})));this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&(0<a.length&&null!=b&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming")))&&
-b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}})).isEnabled=b;a.actions.addAction("makeCopy...",
-mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():a.defaultFilename,d="",e=c.lastIndexOf(".");0<=e&&(d=c.substring(e),c=c.substring(0,e));c=mxResources.get("copyOf",[c])+d;b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?a.spinner.spin(document.body,mxResources.get("saving"))&&b.save(!1,mxUtils.bind(this,function(){b.saveAs(c,mxUtils.bind(this,
-function(b){a.spinner.stop();var c=a.getUrl();window.openWindow(c+"#G"+b.id,null,mxUtils.bind(this,function(){window.location.hash="G"+b.id}))}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):this.editorUi.createFile(c,this.editorUi.getFileData(!0),null,d))}),mxUtils.bind(this,function(){a.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(a.getEditBlankXml(),
-c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=a.getCurrentFile();(b.getMode()==App.MODE_GOOGLE||b.getMode()==App.MODE_ONEDRIVE)&&a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));a.actions.addAction("imgur...",mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,a.uploadToImgur))}));a.actions.addAction("github...",
-mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,a.uploadToGithub))}));this.put("publish",new Menu(mxUtils.bind(this,function(b,c){if(null==document.documentMode||10<=document.documentMode)"undefined"!==typeof XMLHttpRequest&&this.addMenuItems(b,["github"],c),this.addMenuItems(b,["imgur"],c);!navigator.standalone&&!a.isOffline()&&this.addMenuItems(b,["publishLink"],c)})));a.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){window.open("http://www.draw.io/app")}));
-a.actions.put("chromeApp",new Action(mxResources.get("chromeApp")+"...",function(){window.open("https://chrome.google.com/webstore/detail/drawio-desktop/pebppomjfocnoigkeepgbmcifnnlndla")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage",
-"embedSvg","-","embedHtml"],c);!navigator.standalone&&!a.isOffline()&&this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));this.put("arrange",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["toFront","toBack","-"],b);this.addSubmenu("direction",a,b);this.addMenuItems(a,["turn","-"],b);this.addSubmenu("align",a,b);this.addSubmenu("distribute",a,b);a.addSeparator(b);this.addSubmenu("navigation",a,b);this.addSubmenu("insert",
-a,b);this.addSubmenu("layout",a,b);this.addMenuItems(a,"- group ungroup removeFromGroup - editGeometry clearWaypoints autosize".split(" "),b)})));var r="horizontalFlow verticalFlow - horizontalTree verticalTree - organic circle - fromText".split(" "),s=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,
-620,420,!0,!1);b.init()}),c)};a.actions.addAction("insertText",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.getInsertPoint(),a=new mxCell("Text",new mxGeometry(a.x,a.y,40,20),"text;html\x3d1;resizable\x3d0;autosize\x3d1;align\x3dleft;verticalAlign\x3dtop;spacingTop\x3d-4;points\x3d[];");a.vertex=!0;d.startEditingAtCell(d.addCell(a))}},null,null,"Ctrl+Shift+X").isEnabled=b;a.actions.addAction("insertRectangle",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=
-d.getInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,120,60),"whiteSpace\x3dwrap;html\x3d1;");a.vertex=!0;d.setSelectionCell(d.addCell(a))}},null,null,"Ctrl+K").isEnabled=b;a.actions.addAction("insertEllipse",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.getInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,80,80),"ellipse;whiteSpace\x3dwrap;html\x3d1;");a.vertex=!0;d.setSelectionCell(d.addCell(a))}},null,null,"Ctrl+Shift+K").isEnabled=b;this.put("insert",new Menu(mxUtils.bind(this,
-function(a,b){this.addMenuItems(a,"insertText insertRectangle insertEllipse - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<r.length;c++)"-"==r[c]?a.addSeparator(b):s(a,b,mxResources.get(r[c]),r[c])})));this.put("openRecent",new Menu(function(b,c){var d=a.getRecent(),e=0;if(null!=d){for(var g=0;g<d.length;g++)(function(d){e++;var g=d.mode;g==App.MODE_GOOGLE?g="googleDrive":g==App.MODE_ONEDRIVE&&(g="oneDrive");b.addItem(d.title+" ("+mxResources.get(g)+")",null,function(){a.loadFile(d.id)},
-c)})(d[g]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+
-" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},
-c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?url\x3d"+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("newLibrary",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+
-"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",
-null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)}));this.put("openLibraryFrom",
-new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+
-"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=
-new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&(0<b.length&&a.spinner.spin(document.body,mxResources.get("loading")))&&mxUtils.get(PROXY_URL+"?url\x3d"+encodeURIComponent(b),function(c){if(200==c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(d){a.handleError(d,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})},
-mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);(!a.isOffline()||mxClient.IS_CHROMEAPP)&&this.addLinkToItem(d,"https://support.draw.io/questions/10420280")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),
-c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d,
-"https://desk.draw.io/solution/articles/16000032875-how-to-use-mathematical-typesetting-")}this.addMenuItems(b,["autosave","-","createShape","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&isLocalStorage&&this.addMenuItems(b,["showStartScreen"],c);!a.isOfflineApp()&&"1"!=urlParams.embed?this.addMenuItems(b,["plugins","-","offline"],c):b.addSeparator(c);!a.isOffline()&&(!navigator.standalone&&"1"!=urlParams.embed)&&this.addMenuItems(b,["chromeApp"],c)})));this.put("file",new Menu(mxUtils.bind(this,
-function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b,["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&
-this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,["new","-","rename","makeCopy","moveToFolder"],c):(this.addMenuItems(b,["-","save","saveAs","-","rename"],c),a.isOfflineApp()?
-a.isOffline()||this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",b,c);this.addSubmenu("openLibraryFrom",b,c);null!=d&&(d.constructor==DriveFile||d.constructor==DropboxFile)&&this.addMenuItems(b,
-["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);(!mxClient.IS_IOS||!navigator.standalone)&&this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))}})();function DiagramPage(a){this.node=a}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,c,f){this.ui=a;this.page=c;this.previous=f}
+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){m(a.dropbox)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){m(a.oneDrive)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&
+"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){l(!1)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){l(!0)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url\x3d"+
+encodeURIComponent(b),function(a){n(a,c,b)},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))})).isEnabled=b;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"!=uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);
+d=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage)})));this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(a){null!=
+a&&(0<a.length&&null!=b&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming")))&&b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));
+return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}})).isEnabled=b;a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():a.defaultFilename,d="",e=c.lastIndexOf(".");0<=e&&(d=c.substring(e),c=c.substring(0,e));c=mxResources.get("copyOf",[c])+d;b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?
+a.spinner.spin(document.body,mxResources.get("saving"))&&b.save(!1,mxUtils.bind(this,function(){b.saveAs(c,mxUtils.bind(this,function(b){a.spinner.stop();var c=a.getUrl();window.openWindow(c+"#G"+b.id,null,mxUtils.bind(this,function(){window.location.hash="G"+b.id}))}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):this.editorUi.createFile(c,this.editorUi.getFileData(!0),null,d))}),mxUtils.bind(this,function(){a.hideDialog()}),mxResources.get("makeCopy"),
+mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(a.getEditBlankXml(),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=a.getCurrentFile();(b.getMode()==App.MODE_GOOGLE||b.getMode()==App.MODE_ONEDRIVE)&&a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));
+a.actions.addAction("imgur...",mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,a.uploadToImgur),function(a){window.open("https://imgur.com/"+a)})}));a.actions.addAction("facebook...",mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,a.uploadToImgur),function(a){window.open("https://www.facebook.com/sharer.php?p[url]\x3d"+encodeURIComponent("https://imgur.com/"+a)+"\x26p[images][0]\x3d"+encodeURIComponent(a+".png"))})}));a.actions.addAction("twitter...",mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,
+a.uploadToImgur),function(a){window.open("https://twitter.com/intent/tweet?text\x3d"+encodeURIComponent("Check out the diagram I made with draw.io")+"\x26via\x3ddrawio\x26hashtags\x3dmadewithdrawio\x26url\x3d"+encodeURIComponent("https://imgur.com/"+a))})}));a.actions.addAction("github...",mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,a.uploadToGithub))}));this.put("publish",new Menu(mxUtils.bind(this,function(b,c){if(null==document.documentMode||10<=document.documentMode)"undefined"!==
+typeof XMLHttpRequest&&this.addMenuItems(b,["github"],c),this.addMenuItems(b,["twitter"],c),this.addMenuItems(b,["facebook"],c),this.addMenuItems(b,["imgur"],c);!navigator.standalone&&!a.isOffline()&&this.addMenuItems(b,["publishLink"],c)})));a.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){window.open("http://www.draw.io/app")}));a.actions.put("chromeApp",new Action(mxResources.get("chromeApp")+"...",function(){window.open("https://chrome.google.com/webstore/detail/drawio-desktop/pebppomjfocnoigkeepgbmcifnnlndla")}));
+this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);!navigator.standalone&&!a.isOffline()&&this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));
+this.put("arrange",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["toFront","toBack","-"],b);this.addSubmenu("direction",a,b);this.addMenuItems(a,["turn","-"],b);this.addSubmenu("align",a,b);this.addSubmenu("distribute",a,b);a.addSeparator(b);this.addSubmenu("navigation",a,b);this.addSubmenu("insert",a,b);this.addSubmenu("layout",a,b);this.addMenuItems(a,"- group ungroup removeFromGroup - editGeometry clearWaypoints autosize".split(" "),b)})));var r="horizontalFlow verticalFlow - horizontalTree verticalTree - organic circle - fromText".split(" "),
+s=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)};a.actions.addAction("insertText",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.getInsertPoint(),a=new mxCell("Text",new mxGeometry(a.x,a.y,40,20),"text;html\x3d1;resizable\x3d0;autosize\x3d1;align\x3dleft;verticalAlign\x3dtop;spacingTop\x3d-4;points\x3d[];");
+a.vertex=!0;d.startEditingAtCell(d.addCell(a))}},null,null,"Ctrl+Shift+X").isEnabled=b;a.actions.addAction("insertRectangle",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.getInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,120,60),"whiteSpace\x3dwrap;html\x3d1;");a.vertex=!0;d.setSelectionCell(d.addCell(a))}},null,null,"Ctrl+K").isEnabled=b;a.actions.addAction("insertEllipse",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.getInsertPoint(),
+a=new mxCell("",new mxGeometry(a.x,a.y,80,80),"ellipse;whiteSpace\x3dwrap;html\x3d1;");a.vertex=!0;d.setSelectionCell(d.addCell(a))}},null,null,"Ctrl+Shift+K").isEnabled=b;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"insertText insertRectangle insertEllipse - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<r.length;c++)"-"==r[c]?a.addSeparator(b):s(a,b,mxResources.get(r[c]),r[c])})));this.put("openRecent",new Menu(function(b,c){var d=a.getRecent(),
+e=0;if(null!=d){for(var g=0;g<d.length;g++)(function(d){e++;var g=d.mode;g==App.MODE_GOOGLE?g="googleDrive":g==App.MODE_ONEDRIVE&&(g="oneDrive");b.addItem(d.title+" ("+mxResources.get(g)+")",null,function(){a.loadFile(d.id)},c)})(d[g]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+
+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);
+b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?url\x3d"+encodeURIComponent(b)),
+null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("newLibrary",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",
+null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)}));this.put("openLibraryFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=
+a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&(0<b.length&&a.spinner.spin(document.body,mxResources.get("loading")))&&mxUtils.get(PROXY_URL+"?url\x3d"+encodeURIComponent(b),function(c){if(200==c.getStatus()){a.spinner.stop();
+try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(d){a.handleError(d,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline",
+"layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);(!a.isOffline()||mxClient.IS_CHROMEAPP)&&this.addLinkToItem(d,"https://support.draw.io/questions/10420280")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),
+c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d,"https://desk.draw.io/solution/articles/16000032875-how-to-use-mathematical-typesetting-")}this.addMenuItems(b,["autosave","-","createShape","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&
+isLocalStorage&&this.addMenuItems(b,["showStartScreen"],c);!a.isOfflineApp()&&"1"!=urlParams.embed?this.addMenuItems(b,["plugins","-","offline"],c):b.addSeparator(c);!a.isOffline()&&(!navigator.standalone&&"1"!=urlParams.embed)&&this.addMenuItems(b,["chromeApp"],c)})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),
+this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b,["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,
+["share","chatWindowTitle","-"],c))):this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,["new","-","rename","makeCopy","moveToFolder"],c):(this.addMenuItems(b,["-","save","saveAs","-","rename"],c),a.isOfflineApp()?a.isOffline()||this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);
+this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",b,c);this.addSubmenu("openLibraryFrom",b,c);null!=d&&(d.constructor==DriveFile||d.constructor==DropboxFile)&&this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);(!mxClient.IS_IOS||!navigator.standalone)&&
+this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))}})();function DiagramPage(a){this.node=a}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,c,f){this.ui=a;this.page=c;this.previous=f}
RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(a,c,f){this.ui=a;this.oldIndex=c;this.newIndex=f}
MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};function SelectPage(a,c){this.ui=a;this.previousPage=this.page=c;null!=c&&this.ui.updatePageRoot(c)}
SelectPage.prototype.execute=function(){if(null!=this.page&&0<=mxUtils.indexOf(this.ui.pages,this.previousPage)){var a=this.ui.currentPage,c=this.ui.editor,f=c.graph,d=c.graph.compress(f.zapGremlins(mxUtils.getXml(c.getGraphXml(!0))));mxUtils.setTextContent(a.node,d);a.viewState=f.getViewState();a.root=f.model.root;f.view.clear(a.root,!0);f.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;f.model.rootChanged(a.root);f.setViewState(a.viewState);c.fireEvent(new mxEventObject("setViewState",
diff --git a/war/js/atlas-viewer.min.js b/war/js/atlas-viewer.min.js
index d4f26c29..7dc8b69c 100644
--- a/war/js/atlas-viewer.min.js
+++ b/war/js/atlas-viewer.min.js
@@ -2604,74 +2604,74 @@ document.createElement("input");r.setAttribute("type","text");mxUtils.write(k,"P
k=k.cloneNode(!1);k.appendChild(L);g.appendChild(k);f.appendChild(g);var k=k.cloneNode(!1),K=document.createElement("input");K.setAttribute("type","text");mxUtils.write(k,"Message:");K.value="Updated "+a+".png";g=g.cloneNode(!1);g.appendChild(k);k=k.cloneNode(!1);k.appendChild(K);g.appendChild(k);f.appendChild(g);k=k.cloneNode(!1);e.appendChild(f);c.appendChild(e);c=new FilenameDialog(this,null,mxResources.get("publish"),mxUtils.bind(this,function(){var a="https://api.github.com/repos/"+n.value+"/"+
p.value+"/contents/"+r.value+"?ref\x3d"+encodeURIComponent(L.value);d();mxUtils.get(a,mxUtils.bind(this,function(c){if(200==c.getStatus()||404==c.getStatus()){c=JSON.parse(c.getText());var e={path:r.value,message:K.value,content:b};null!=c.sha&&(e.sha=c.sha);var f=new XMLHttpRequest;f.onreadystatechange=mxUtils.bind(this,function(){if(4==f.readyState)if(200<=f.status&&300>f.status){this.spinner.stop();this.hideDialog();a="https://github.com/"+n.value+"/"+p.value+"/blob/"+L.value+"/"+r.value;var b=
new ErrorDialog(this,mxResources.get("published"),mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){window.open(a)}),!1);this.showDialog(b.container,340,170,!0,!1);b.init()}else d=this.spinner.pause(),this.handleError(JSON.parse(f.responseText))});f.open("PUT",a,!0);f.setRequestHeader("Authorization","Basic "+btoa(l.value+
-":"+m.value));f.send(JSON.stringify(e))}else this.hideDialog(),this.spinner.stop(),this.handleError(JSON.parse(c.getText()))}),mxUtils.bind(this,function(a){this.hideDialog();this.spinner.stop();this.handleError({message:mxResources.get("unknownError")})}))}),null,null,c,null,!1);this.showDialog(c.container,260,260,!0,!1);c.init()};EditorUi.prototype.uploadToImgur=function(a,b,c){var d=this.spinner.pause(),e=new ErrorDialog(this,mxResources.get("warning"),'\x3cimg style\x3d"max-width:300px;max-height:80px;margin-bottom:20px;padding:6px;border:1px solid gray;" src\x3d"data:image/png;base64,'+
-b+'"/\x3e\x3cbr\x3e'+mxResources.get("publishConfirmation"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("publish"),mxUtils.bind(this,function(){d();var e=null!=a.getTitle()?a.getTitle():this.defaultFilename,f=e.lastIndexOf("."),g=e;0<f&&(g=e=g.substring(0,f));var f=new mxXmlRequest("/imgur",JSON.stringify({type:"base64",image:b,name:g+".png",title:e,description:"Made with https://www.draw.io"}),"POST"),k=mxUtils.bind(this,function(a){var b={message:mxResources.get("unknownError")};
-try{var c=JSON.parse(a.getText()),b={message:c.message||c.data.error}}catch(d){}this.handleError(b)});f.send(mxUtils.bind(this,function(a){if(200==a.getStatus())try{var b=JSON.parse(a.getText());try{(new Image).src="log?severity\x3dCONFIG\x26msg\x3dimgur-published:"+b.data.id+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION)+"\x26ts\x3d"+(new Date).getTime()}catch(d){}var f=mxUtils.bind(this,function(){this.spinner.stop();var a="http://i.imgur.com/"+b.data.id+".png",c="https://www.draw.io/imgur?delete\x3d"+
-b.data.deletehash,a=new ErrorDialog(this,mxResources.get("published"),mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"])+"\x3cbr\x3e"+mxResources.get("deleteUrl",[c]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){window.open("http://imgur.com/"+b.data.id)}),!1);this.showDialog(a.container,340,170,!0,!1);a.init()});if(c){var g=new mxXmlRequest("/imgur?"+b.data.deletehash,
-JSON.stringify({title:e,description:"Edit a copy of this diagram at https://www.draw.io/i/"+b.data.id}),"POST");g.send(mxUtils.bind(this,function(){200==g.getStatus()?f():k(g)}),mxUtils.bind(this,function(){k(g)}))}else f()}catch(l){this.handleError(l)}else k(a)}),mxUtils.bind(this,function(a){k(a)}))}));this.showDialog(e.container,320,250,!0,!1);e.init()};EditorUi.prototype.publishImage=function(a){var b=this.getCurrentFile();null!=b&&(this.isExportToCanvas()?this.showExportDialog(!1,mxResources.get("publish"),
-"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(c,d,e,f,g){c=parseInt(c);if(!isNaN(c)&&0<c){c/=100;var k=this.editor.graph.isSelectionEmpty();e=null!=e?e:k;if(this.spinner.spin(document.body,mxResources.get("publishing")))try{this.exportToCanvas(mxUtils.bind(this,function(c){try{var d=g?mxUtils.getXml(this.editor.getGraphXml(e)):null,f=this.createPngDataUri(c,d);a(b,f.substring(f.lastIndexOf(",")+1),g)}catch(k){this.handleError(k)}}),null,null,null,mxUtils.bind(this,
-function(a){this.handleError(a)}),null,e,c||1,d,f)}catch(l){this.handleError(l)}}})):this.showRemoteExportDialog(mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(c,d){if(this.spinner.spin(document.body,mxResources.get("publishing"))){var e=this.editor.graph.getGraphBounds(),f=this.getFileData(!0,null,null,null,c);if(e.width*e.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE)try{var g=new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+
-(d?"1":"0")+"\x26xml\x3d"+encodeURIComponent(f));g.send(mxUtils.bind(this,function(){200==g.getStatus()?a(b,g.getText(),d):this.handleError(g)}))}catch(k){this.handleError(k)}else this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"))}})))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/
-86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,d){d()};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,f,g){g=null;null!=b&&(g=b.background,g==mxConstants.NONE&&(g=null));b=this.editor.graph.getSvg(g,null,null,null,null,f);b.setAttribute("content",encodeURIComponent(a));null!=
-c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(a))}));else return(!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(b)};EditorUi.prototype.exportToCanvas=
-function(a,b,c,d,e,f,g,k,l,m,n){f=null!=f?f:!0;var p=l?null:this.editor.graph.background;p==mxConstants.NONE&&(p=null);null==p&&(p=d);null==p&&!1==l&&(p="#ffffff");this.convertImages(this.editor.graph.getSvg(p,null,null,null,null,null!=g?g:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),l=parseInt(c.getAttribute("height"));k=null!=k?k:1;null!=b&&(k=!f?b/g:Math.min(1,Math.min(3*b/(4*l),
-b/g)));e.setAttribute("width",Math.ceil(k*g));e.setAttribute("height",Math.ceil(k*l));g=e.getContext("2d");g.scale(k,k);g.drawImage(d,0,0);a(e)});d.onerror=function(a){null!=e&&e(a)};try{m&&this.editor.addSvgShadow(c),this.convertMath(this.editor.graph,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))}catch(g){null!=e&&e(g)}}),c,n)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert;a.convert=function(c){null!=
-c&&(("http://"==c.substring(0,7)||"https://"==c.substring(0,8))&&c.substring(0,a.baseUrl.length)!=a.baseUrl?c=PROXY_URL+"?url\x3d"+encodeURIComponent(c):"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)));return c};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var e=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var k=a.getElementsByTagName(c),l=0;l<k.length;l++)mxUtils.bind(this,function(c){var k=d.convert(c.getAttribute(g));
-if(null!=k&&"data:"!=k.substring(0,5)){var l=f[k];null==l?(e++,this.convertImageToDataUri(k,function(d){null!=d&&(f[k]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,l)}})(k[l])});c("image","xlink:href");c("img","src");0==e&&b(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b()});else{var c=new Image;c.onload=function(){var a=document.createElement("canvas"),
-d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);b(a.toDataURL())};c.onerror=function(){b()};c.src=a}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),k=this.editor.extractGraphModel(g.documentElement);if(null!=k){var l=new mxGraphModel;(new mxCodec(k.ownerDocument)).decode(k,l);var m=this.editor.graph,n=l.getChildCount(l.getRoot());m.model.getChildCount(m.model.getRoot());m.model.beginUpdate();
-try{a={};for(g=0;g<n;g++){var p=l.getChildAt(l.getRoot(),g);if(1==n&&!m.isCellLocked(m.getDefaultParent()))var r=l.getChildren(p),f=f.concat(m.importCells(r,b,c,m.getDefaultParent(),null,a));else p=m.importCells([p],0,0,m.model.getRoot(),null,a)[0],r=m.model.getChildren(p),m.moveCells(r,b,c),f=f.concat(r)}if(d){m.isGridEnabled()&&(b=m.snap(b),c=m.snap(c));var s=m.getBoundingBoxFromGeometry(f,!0);m.moveCells(f,b-s.x,c-s.y)}}finally{m.model.endUpdate()}}}}catch(L){throw e||this.handleError(L,mxResources.get("invalidOrMissingFile")),
-L;}return f};EditorUi.prototype.insertTextAt=function(a,b,c,d,e,f){f=null!=f?f:!0;if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))return this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200==a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))})),[];if(!this.isOffline()&&(e||"data:"==a.substring(0,5)||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=
-this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var k=this.extractGraphModelFromPng(a),l=this.importXml(k,b,c,f,!0);if(0<l.length)return l}if("data:image/svg+xml;"==a.substring(0,19))try{if(k=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(k=a.substring(a.indexOf(",")+1),k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0)):k=decodeURIComponent(a.substring(a.indexOf(",")+1)),l=this.importXml(k,b,c,f,!0),0<l.length)return l}catch(m){}this.loadImage(a,mxUtils.bind(this,
-function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),d,e,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+this.convertDataUri(a)+";"))}),!0,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),f=Math.round(d.width*e);d=Math.round(d.height*e);g.setSelectionCell(g.insertVertex(null,
-null,"",g.snap(b),g.snap(c),f,d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+a+";"))}}),mxUtils.bind(this,function(){var e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,a,g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}));return[]}a=this.editor.graph.zapGremlins(mxUtils.trim(a));
-if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length){g=this.editor.graph;e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,"",g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.fireEvent(new mxEventObject("textInserted","cells",[e])),e.value=a,g.updateCellSize(e),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i.test(e.value)&&
-g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=g.gridSize}finally{g.getModel().endUpdate()}return[e]}};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,0.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,
-b){return/(\.*<graphml xmlns=\".*)/.test(a)||/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||null!=b&&/(\.vsdx)($|\?)/i.test(b)};EditorUi.prototype.importFile=function(a,b,c,d,e,f,g,k,l,m){m=null!=m?m:!0;var n=!1,p=null;"image"==b.substring(0,5)?(g=!1,"image/png"==b.substring(0,9)&&(b=this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(p=this.importXml(b,c,d,m),g=!0)),g||(p=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),m&&p.isGridEnabled()&&
-(c=p.snap(c),d=p.snap(d)),p=[p.insertVertex(null,null,"",c,d,e,f,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+a+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,g)?(n=!0,this.parseFile(null!=l?l:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){if(4==a.readyState){var b=null;200==a.status&&(b=this.importXml(a.responseText,c,d,m));null!=k&&k(b)}}),g)):/(\.vsdx)($|\?)/i.test(g)?
-(new mxVsdxModel).decode(l):p=this.insertTextAt(this.validateFileData(a),c,d,!0);!n&&null!=k&&k(p);return p};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,f,g;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="\x3d\x3d";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>
-2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);b+="\x3d";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>
-6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,f,g,k,l,m,n){var p=null!=b&&null!=c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;m=null!=m?m:this.maxImageBytes;l=null!=l?l:!0;var r=this.editor.graph,s=r.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){return null!=a&&"\x3cmxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):
-this.importFile(a,b,c,d,e,f,g,k,l,p)});f=null!=f?f:mxUtils.bind(this,function(a){r.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var L=a.length,K=L,R=[],T=mxUtils.bind(this,function(a,b){R[a]=b;if(0==--K){this.spinner.stop();if(null!=k)k(R);else{var c=[];r.getModel().beginUpdate();try{for(var d=0;d<R.length;d++){var e=R[d]();null!=e&&(c=c.concat(e))}}finally{r.getModel().endUpdate()}}f(c)}}),aa=0;aa<L;aa++)mxUtils.bind(this,function(f){var k=a[f],p=new FileReader;
-p.onload=mxUtils.bind(this,function(a){if(null==g||g(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var p=a.target.result,q=p.indexOf(","),r=atob(p.substring(q+1)),z=mxUtils.parseXml(r),r=z.getElementsByTagName("svg");if(0<r.length){var D=r[0].getAttribute("content");null!=D&&("\x3c"!=D.charAt(0)&&"%"!=D.charAt(0))&&(D=unescape(window.atob?atob(D):Base64.decode(D,!0)));null!=D&&"%"==D.charAt(0)&&(D=decodeURIComponent(D));null!=D&&("\x3cmxfile "===D.substring(0,8)||"\x3cmxGraphModel "===
-D.substring(0,14))?T(f,mxUtils.bind(this,function(){return e(D,"text/xml",b+f*s,c+f*s,0,0,k.name)})):T(f,mxUtils.bind(this,function(){try{if(p.substring(0,q+1),null!=z){var a=z.getElementsByTagName("svg");if(0<a.length){var g=a[0],l=parseFloat(g.getAttribute("width")),m=parseFloat(g.getAttribute("height")),n=g.getAttribute("viewBox");if(null==n||0==n.length)g.setAttribute("viewBox","0 0 "+l+" "+m);else if(isNaN(l)||isNaN(m)){var r=n.split(" ");3<r.length&&(l=parseFloat(r[2]),m=parseFloat(r[3]))}p=
-this.createSvgDataUri(mxUtils.getXml(a[0]));var v=Math.min(1,Math.min(d/Math.max(1,l)),d/Math.max(1,m));return e(p,k.type,b+f*s,c+f*s,Math.max(1,Math.round(l*v)),Math.max(1,Math.round(m*v)),k.name)}}}catch(y){}return null}))}}else{r=!1;if("image/png"==k.type){var F=this.extractGraphModelFromPng(a.target.result);if(null!=F&&0<F.length){var G=new Image;G.src=a.target.result;T(f,mxUtils.bind(this,function(){return e(F,"text/xml",b+f*s,c+f*s,G.width,G.height,k.name)}));r=!0}}r||(null!=window.chrome&&
-null!=chrome.app&&null!=chrome.app.runtime?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,n,p){T(f,mxUtils.bind(this,function(){if(null!=g&&g.length<m){var q=!l||!this.isResampleImage(a.target.result)?
-1:Math.min(1,Math.min(d/n,d/p));return e(g,k.type,b+f*s,c+f*s,Math.round(n*q),Math.round(p*q),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),l,d,n)})))}else e(a.target.result,k.type,b+f*s,c+f*s,240,160,k.name,function(a){T(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)?e(null,k.type,b+f*s,c+f*s,240,160,k.name,function(a){T(f,function(){return a})},k):"image"==k.type.substring(0,5)?p.readAsDataURL(k):p.readAsText(k)})(aa)};EditorUi.prototype.parseFile=
-function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1<l){var m=
-Math.round(g/l),n=Math.round(k/l),p=document.createElement("canvas");p.width=m;p.height=n;p.getContext("2d").drawImage(a,0,0,m,n);var r=p.toDataURL();if(r.length<b.length){var s=document.createElement("canvas");s.width=m;s.height=n;var L=s.toDataURL();r!==L&&(b=r,g=m,k=n)}}}catch(K){}c(b,g,k)};(function(){EditorUi.prototype.crcTable=[];for(var a=0;256>a;a++)for(var b=a,c=0;8>c;c++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[a]=b;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=
-0;e<d;e++)a=EditorUi.prototype.crcTable[(a^b[c+e])&255]^a>>>8;return a}})();EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=k;k+=b;return a.substring(c,k)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=
-e&&e();else{f(a,17);e=a.substring(0,k);do{var l=g(a);if("IDAT"==f(a,4)){e=a.substring(0,k-8);l=4294967295;l=this.updateCRC(l,b,0,4);l=this.updateCRC(l,d,0,d.length);e+=String.fromCharCode(c.length+d.length+1+("zTXt"==b?1:0)>>24&255,c.length+d.length+1+("zTXt"==b?1:0)>>16&255,c.length+d.length+1+("zTXt"==b?1:0)>>8&255,c.length+d.length+1+("zTXt"==b?1:0)&255)+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+String.fromCharCode((l^4294967295)>>24&255,(l^4294967295)>>16&255,(l^4294967295)>>
-8&255,(l^4294967295)&255);e+=a.substring(k-8,a.length);break}e+=a.substring(k-8,k-4+l);d=f(a,l);f(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,
-e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(e){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var k=EditorUi.prototype.init;
-EditorUi.prototype.init=function(){k.apply(this,arguments);var a=this.editor.graph,b=this;mxClient.IS_SVG&&this.editor.addSvgShadow(a.view.canvas.ownerSVGElement,null,!0);this.defaultFilename=mxResources.get("untitledDiagram");var c=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a&&null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:c.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=
-b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var d=this.actions.get("print");d.setEnabled(!mxClient.IS_IOS||!navigator.standalone);d.visible=d.isEnabled();if(!this.editor.chromeless){this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,
-!0,"insertEllipse",!0);mxClient.IS_IE||a.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a)&&!b.isEditing())try{for(var c=a.clipboardData||a.originalEvent.clipboardData,b=!1,d=0;d<c.types.length;d++)if("text/"===c.types[d].substring(0,5)){b=!0;break}if(!b){var e=c.items;for(index in e){var f=e[index];if("file"===f.kind){var g=this.editor.graph.getInsertPoint();this.importFiles([f.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(a);
-break}}}}catch(k){}}),!1);var e=document.createElement("div");e.style.position="absolute";e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.display="block";e.contentEditable=!0;mxUtils.setOpacity(e,0);e.style.width="1px";e.style.height="1px";e.innerHTML="\x26nbsp;";var f=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);
-if(null!=a.container&&a.isEnabled()&&!a.isMouseDown&&!a.isEditing()&&null==this.dialog&&"INPUT"!=c.nodeName&&"TEXTAREA"!=c.nodeName&&(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)&&!f)e.style.left=a.container.scrollLeft+10+"px",e.style.top=a.container.scrollTop+10+"px",a.container.appendChild(e),f=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){e.focus();document.execCommand("selectAll",!1,null)},0):(e.focus(),document.execCommand("selectAll",!1,null))}));var g=
-function(){window.setTimeout(function(){e.innerHTML="\x26nbsp;";e.focus();document.execCommand("selectAll",!1,null)},0)};mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){if(f&&(224==c||17==c||91==c))f=!1,!a.isEditing()&&(null==this.dialog&&null!=a.container)&&a.container.focus(),e.parentNode.removeChild(e)}),0)}));mxEvent.addListener(e,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(e),
-g())}));mxEvent.addListener(e,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&(this.copyCells(e,!0),g())}));mxEvent.addListener(e,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&(e.innerHTML="\x26nbsp;",e.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,e);e.innerHTML="\x26nbsp;"}),0))}),!0);var l=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==e?!0:l.apply(this,arguments)}}d=Math.max(document.body.clientHeight||
-0,document.documentElement.clientHeight||0)/2;this.spinner=this.createSpinner(document.body.clientWidth/2-2,d,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){if(null==d&&(!mxClient.IS_IE||
-10<document.documentMode))d=this.highlightElement(c);a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,
-"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",
-!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.test){d=document.getElementById("geFooter");null!=d&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width=
-"98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),d.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);
-this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var m=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:m.apply(this,arguments)}}d=document.getElementById("geInfo");null!=d&&d.parentNode.removeChild(d);if(Graph.fileSupport){var n=null;mxEvent.addListener(a.container,"dragleave",function(b){a.isEnabled()&&(null!=n&&(n.parentNode.removeChild(n),n=null),b.stopPropagation(),
-b.preventDefault())});mxEvent.addListener(a.container,"dragover",mxUtils.bind(this,function(b){if(null==n&&(!mxClient.IS_IE||10<document.documentMode))n=this.highlightElement(a.container);null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a.container,"drop",mxUtils.bind(this,function(b){null!=n&&(n.parentNode.removeChild(n),n=null);if(a.isEnabled()){var c=mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=a.view.translate,
-e=a.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(b)&&(g=f=0);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b));else{var k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(b);if(null!=c)a.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){c=
-b.dataTransfer.getData("text/html");e=document.createElement("div");e.innerHTML=c;var d=null,l=e.getElementsByTagName("img");null!=l&&1==l.length?(c=l[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)||(d=!0)):(e=e.getElementsByTagName("a"),null!=e&&1==e.length&&(c=e[0].getAttribute("href")));a.setSelectionCells(this.insertTextAt(c,f,g,!0,d))}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(b){var c=Math.max(1,b.width);
-b=Math.max(1,b.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,b));a.setSelectionCell(a.insertVertex(null,null,"",f,g,c*d,b*d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+k+";"))}),mxUtils.bind(this,function(b){a.setSelectionCells(this.insertTextAt(k,f,g,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&a.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),
-f,g,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode()};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",
-!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=this.editor.graph,d=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),e=!1;try{var f=d.lastIndexOf("%3E");f<d.length-3&&(d=d.substring(0,f+3))}catch(g){}try{var k=b.getElementsByTagName("span"),l=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(d);this.isCompatibleString(l)&&(e=!0,d=l)}catch(m){}c.lastPasteXml==d?c.pasteCounter++:
-(c.lastPasteXml=d,c.pasteCounter=0);f=c.pasteCounter*c.gridSize;if(null!=d&&0<d.length&&(e||this.isCompatibleString(d)?c.setSelectionCells(this.importXml(d,f,f)):(e=c.getInsertPoint(),c.setSelectionCells(this.insertTextAt(d,e.x+f,e.y+f,!0))),!c.isSelectionEmpty())){c.scrollCellToVisible(c.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(n){}}}};var l=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=
-function(a){var b=Format.prototype.init;Format.prototype.init=function(){b.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var c=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed?c.apply(this,arguments):this.clear()};var d=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=d.apply(this,arguments);var b=this.editorUi;if(b.editor.graph.isEnabled()){var c=
-b.getCurrentFile();null!=c&&c.isAutosaveOptional()&&(c=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(c))}return a};var e=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&
-this.container.appendChild(this.addStyles(this.createPanel()));e.apply(this,arguments)};var f=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";b.style.marginRight="2px";a.appendChild(b);
-b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return f.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function c(a){var b=mxUtils.button("",function(b){d.getModel().beginUpdate();try{var c=
-d.getSelectionCells();for(b=0;b<c.length;b++){for(var e=d.getModel().getStyle(c[b]),g=0;g<f.length;g++)e=mxUtils.removeStylename(e,f[g]);null!=a?(e=mxUtils.setStyle(e,mxConstants.STYLE_FILLCOLOR,a.fill),e=mxUtils.setStyle(e,mxConstants.STYLE_STROKECOLOR,a.stroke),e=mxUtils.setStyle(e,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(e=mxUtils.setStyle(e,mxConstants.STYLE_FILLCOLOR,"#ffffff"),e=mxUtils.setStyle(e,mxConstants.STYLE_STROKECOLOR,"#000000"),e=mxUtils.setStyle(e,mxConstants.STYLE_GRADIENTCOLOR,
-null));d.getModel().setStyle(c[b],e)}}finally{d.getModel().endUpdate()}});b.style.width="36px";b.style.height="30px";b.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr\x3d'"+a.fill+"', EndColorStr\x3d'"+a.gradient+"', GradientType\x3d0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":b.style.backgroundColor=a.fill,b.style.border=
-"1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border="1px solid #000000");e.appendChild(b)}e.innerHTML="";for(var g=0;g<a.length;g++)0<g&&0==mxUtils.mod(g,4)&&mxUtils.br(e),c(a[g])}function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var d=this.editorUi.editor.graph,e=document.createElement("div");e.style.whiteSpace="normal";e.style.paddingLeft="24px";e.style.paddingRight="20px";
-a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(e);var f=["plain-gray","plain-blue","plain-green","plain-orange","plain-yellow","plain-red","plain-purple",null];null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var g=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",
-stroke:"#9673a6"}],[null,{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}]],k=document.createElement("div");k.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII\x3d);";
+":"+m.value));f.send(JSON.stringify(e))}else this.hideDialog(),this.spinner.stop(),this.handleError(JSON.parse(c.getText()))}),mxUtils.bind(this,function(a){this.hideDialog();this.spinner.stop();this.handleError({message:mxResources.get("unknownError")})}))}),null,null,c,null,!1);this.showDialog(c.container,260,260,!0,!1);c.init()};EditorUi.prototype.uploadToImgur=function(a,b,c,d){var e=this.spinner.pause(),f=new ErrorDialog(this,mxResources.get("warning"),'\x3cimg style\x3d"max-width:300px;max-height:80px;margin-bottom:20px;padding:6px;border:1px solid gray;" src\x3d"data:image/png;base64,'+
+b+'"/\x3e\x3cbr\x3e'+mxResources.get("publishConfirmation"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("publish"),mxUtils.bind(this,function(){e();var f=null!=a.getTitle()?a.getTitle():this.defaultFilename,g=f.lastIndexOf("."),k=f;0<g&&(k=f=k.substring(0,g));var g=new mxXmlRequest("/imgur",JSON.stringify({type:"base64",image:b,name:k+".png",title:f,description:"Made with https://www.draw.io"}),"POST"),l=mxUtils.bind(this,function(a){var b={message:mxResources.get("unknownError")};
+try{var c=JSON.parse(a.getText()),b={message:c.message||c.data.error}}catch(d){}this.handleError(b)});g.send(mxUtils.bind(this,function(a){if(200==a.getStatus())try{var b=JSON.parse(a.getText());try{(new Image).src="log?severity\x3dCONFIG\x26msg\x3dimgur-published:"+b.data.id+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION)+"\x26ts\x3d"+(new Date).getTime()}catch(e){}var g=mxUtils.bind(this,function(){this.spinner.stop();var a="http://i.imgur.com/"+b.data.id+".png",c="https://www.draw.io/imgur?delete\x3d"+
+b.data.deletehash,a=new ErrorDialog(this,mxResources.get("published"),mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"])+"\x3cbr\x3e"+mxResources.get("deleteUrl",[c]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("share"),function(){d(b.data.id)},!1);this.showDialog(a.container,340,170,!0,!1);a.init()});if(c){var k=new mxXmlRequest("/imgur?"+b.data.deletehash,JSON.stringify({title:f,description:"Edit a copy of this diagram at https://www.draw.io/i/"+
+b.data.id}),"POST");k.send(mxUtils.bind(this,function(){200==k.getStatus()?g():l(k)}),mxUtils.bind(this,function(){l(k)}))}else g()}catch(m){this.handleError(m)}else l(a)}),mxUtils.bind(this,function(a){l(a)}))}));this.showDialog(f.container,320,250,!0,!1);f.init()};EditorUi.prototype.publishImage=function(a,b){var c=this.getCurrentFile();null!=c&&(this.isExportToCanvas()?this.showExportDialog(!1,mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,
+function(d,e,f,g,k){d=parseInt(d);if(!isNaN(d)&&0<d){d/=100;var l=this.editor.graph.isSelectionEmpty();f=null!=f?f:l;if(this.spinner.spin(document.body,mxResources.get("publishing")))try{this.exportToCanvas(mxUtils.bind(this,function(d){try{var e=k?mxUtils.getXml(this.editor.getGraphXml(f)):null,g=this.createPngDataUri(d,e);a(c,g.substring(g.lastIndexOf(",")+1),k,b)}catch(l){this.handleError(l)}}),null,null,null,mxUtils.bind(this,function(a){this.handleError(a)}),null,f,d||1,e,g)}catch(m){this.handleError(m)}}})):
+this.showRemoteExportDialog(mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(d,e){if(this.spinner.spin(document.body,mxResources.get("publishing"))){var f=this.editor.graph.getGraphBounds(),g=this.getFileData(!0,null,null,null,d);if(f.width*f.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE)try{var k=new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+(e?"1":"0")+"\x26xml\x3d"+encodeURIComponent(g));k.send(mxUtils.bind(this,
+function(){200==k.getStatus()?a(c,k.getText(),e,b):this.handleError(k)}))}catch(l){this.handleError(l)}else this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"))}})))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);
+if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,d){d()};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,f,g){g=null;null!=b&&(g=b.background,g==mxConstants.NONE&&(g=null));b=this.editor.graph.getSvg(g,null,null,null,null,f);b.setAttribute("content",encodeURIComponent(a));null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,
+function(a){e((!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(a))}));else return(!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(b)};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,k,l,m,n){f=null!=f?f:!0;var p=l?null:this.editor.graph.background;
+p==mxConstants.NONE&&(p=null);null==p&&(p=d);null==p&&!1==l&&(p="#ffffff");this.convertImages(this.editor.graph.getSvg(p,null,null,null,null,null!=g?g:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),l=parseInt(c.getAttribute("height"));k=null!=k?k:1;null!=b&&(k=!f?b/g:Math.min(1,Math.min(3*b/(4*l),b/g)));e.setAttribute("width",Math.ceil(k*g));e.setAttribute("height",Math.ceil(k*l));g=
+e.getContext("2d");g.scale(k,k);g.drawImage(d,0,0);a(e)});d.onerror=function(a){null!=e&&e(a)};try{m&&this.editor.addSvgShadow(c),this.convertMath(this.editor.graph,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))}catch(g){null!=e&&e(g)}}),c,n)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert;a.convert=function(c){null!=c&&(("http://"==c.substring(0,7)||"https://"==c.substring(0,8))&&c.substring(0,
+a.baseUrl.length)!=a.baseUrl?c=PROXY_URL+"?url\x3d"+encodeURIComponent(c):"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)));return c};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var e=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var k=a.getElementsByTagName(c),l=0;l<k.length;l++)mxUtils.bind(this,function(c){var k=d.convert(c.getAttribute(g));if(null!=k&&"data:"!=k.substring(0,5)){var l=f[k];null==l?(e++,this.convertImageToDataUri(k,
+function(d){null!=d&&(f[k]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,l)}})(k[l])});c("image","xlink:href");c("img","src");0==e&&b(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b()});else{var c=new Image;c.onload=function(){var a=document.createElement("canvas"),d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);b(a.toDataURL())};
+c.onerror=function(){b()};c.src=a}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),k=this.editor.extractGraphModel(g.documentElement);if(null!=k){var l=new mxGraphModel;(new mxCodec(k.ownerDocument)).decode(k,l);var m=this.editor.graph,n=l.getChildCount(l.getRoot());m.model.getChildCount(m.model.getRoot());m.model.beginUpdate();try{a={};for(g=0;g<n;g++){var p=l.getChildAt(l.getRoot(),g);if(1==n&&!m.isCellLocked(m.getDefaultParent()))var r=
+l.getChildren(p),f=f.concat(m.importCells(r,b,c,m.getDefaultParent(),null,a));else p=m.importCells([p],0,0,m.model.getRoot(),null,a)[0],r=m.model.getChildren(p),m.moveCells(r,b,c),f=f.concat(r)}if(d){m.isGridEnabled()&&(b=m.snap(b),c=m.snap(c));var s=m.getBoundingBoxFromGeometry(f,!0);m.moveCells(f,b-s.x,c-s.y)}}finally{m.model.endUpdate()}}}}catch(L){throw e||this.handleError(L,mxResources.get("invalidOrMissingFile")),L;}return f};EditorUi.prototype.insertTextAt=function(a,b,c,d,e,f){f=null!=f?f:
+!0;if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))return this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200==a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))})),[];if(!this.isOffline()&&(e||"data:"==a.substring(0,5)||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var k=
+this.extractGraphModelFromPng(a),l=this.importXml(k,b,c,f,!0);if(0<l.length)return l}if("data:image/svg+xml;"==a.substring(0,19))try{if(k=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(k=a.substring(a.indexOf(",")+1),k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0)):k=decodeURIComponent(a.substring(a.indexOf(",")+1)),l=this.importXml(k,b,c,f,!0),0<l.length)return l}catch(m){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,
+function(a,d,e){g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),d,e,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+this.convertDataUri(a)+";"))}),!0,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),f=Math.round(d.width*e);d=Math.round(d.height*e);g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),f,d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+
+a+";"))}}),mxUtils.bind(this,function(){var e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,a,g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}));return[]}a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length){g=this.editor.graph;e=null;g.getModel().beginUpdate();
+try{e=g.insertVertex(g.getDefaultParent(),null,"",g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.fireEvent(new mxEventObject("textInserted","cells",[e])),e.value=a,g.updateCellSize(e),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i.test(e.value)&&g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=
+g.gridSize}finally{g.getModel().endUpdate()}return[e]}};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,0.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\.*<graphml xmlns=\".*)/.test(a)||/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||
+null!=b&&/(\.vsdx)($|\?)/i.test(b)};EditorUi.prototype.importFile=function(a,b,c,d,e,f,g,k,l,m){m=null!=m?m:!0;var n=!1,p=null;"image"==b.substring(0,5)?(g=!1,"image/png"==b.substring(0,9)&&(b=this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(p=this.importXml(b,c,d,m),g=!0)),g||(p=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),m&&p.isGridEnabled()&&(c=p.snap(c),d=p.snap(d)),p=[p.insertVertex(null,null,"",c,d,e,f,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+
+a+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,g)?(n=!0,this.parseFile(null!=l?l:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){if(4==a.readyState){var b=null;200==a.status&&(b=this.importXml(a.responseText,c,d,m));null!=k&&k(b)}}),g)):/(\.vsdx)($|\?)/i.test(g)?(new mxVsdxModel).decode(l):p=this.insertTextAt(this.validateFileData(a),c,d,!0);!n&&null!=k&&k(p);return p};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=
+a.length,e,f,g;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="\x3d\x3d";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&
+15)<<2);b+="\x3d";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,f,g,k,l,m,n){var p=null!=b&&null!=
+c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;m=null!=m?m:this.maxImageBytes;l=null!=l?l:!0;var r=this.editor.graph,s=r.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){return null!=a&&"\x3cmxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,c,d,e,f,g,k,l,p)});f=null!=f?f:mxUtils.bind(this,function(a){r.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var L=
+a.length,K=L,R=[],T=mxUtils.bind(this,function(a,b){R[a]=b;if(0==--K){this.spinner.stop();if(null!=k)k(R);else{var c=[];r.getModel().beginUpdate();try{for(var d=0;d<R.length;d++){var e=R[d]();null!=e&&(c=c.concat(e))}}finally{r.getModel().endUpdate()}}f(c)}}),aa=0;aa<L;aa++)mxUtils.bind(this,function(f){var k=a[f],p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==g||g(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var p=a.target.result,q=p.indexOf(","),
+r=atob(p.substring(q+1)),z=mxUtils.parseXml(r),r=z.getElementsByTagName("svg");if(0<r.length){var D=r[0].getAttribute("content");null!=D&&("\x3c"!=D.charAt(0)&&"%"!=D.charAt(0))&&(D=unescape(window.atob?atob(D):Base64.decode(D,!0)));null!=D&&"%"==D.charAt(0)&&(D=decodeURIComponent(D));null!=D&&("\x3cmxfile "===D.substring(0,8)||"\x3cmxGraphModel "===D.substring(0,14))?T(f,mxUtils.bind(this,function(){return e(D,"text/xml",b+f*s,c+f*s,0,0,k.name)})):T(f,mxUtils.bind(this,function(){try{if(p.substring(0,
+q+1),null!=z){var a=z.getElementsByTagName("svg");if(0<a.length){var g=a[0],l=parseFloat(g.getAttribute("width")),m=parseFloat(g.getAttribute("height")),n=g.getAttribute("viewBox");if(null==n||0==n.length)g.setAttribute("viewBox","0 0 "+l+" "+m);else if(isNaN(l)||isNaN(m)){var r=n.split(" ");3<r.length&&(l=parseFloat(r[2]),m=parseFloat(r[3]))}p=this.createSvgDataUri(mxUtils.getXml(a[0]));var v=Math.min(1,Math.min(d/Math.max(1,l)),d/Math.max(1,m));return e(p,k.type,b+f*s,c+f*s,Math.max(1,Math.round(l*
+v)),Math.max(1,Math.round(m*v)),k.name)}}}catch(y){}return null}))}}else{r=!1;if("image/png"==k.type){var F=this.extractGraphModelFromPng(a.target.result);if(null!=F&&0<F.length){var G=new Image;G.src=a.target.result;T(f,mxUtils.bind(this,function(){return e(F,"text/xml",b+f*s,c+f*s,G.width,G.height,k.name)}));r=!0}}r||(null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
+mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,n,p){T(f,mxUtils.bind(this,function(){if(null!=g&&g.length<m){var q=!l||!this.isResampleImage(a.target.result)?1:Math.min(1,Math.min(d/n,d/p));return e(g,k.type,b+f*s,c+f*s,Math.round(n*q),Math.round(p*q),k.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),l,d,n)})))}else e(a.target.result,k.type,b+f*s,c+f*s,240,160,k.name,function(a){T(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)?e(null,k.type,b+f*s,c+f*s,240,160,k.name,function(a){T(f,function(){return a})},k):"image"==k.type.substring(0,5)?p.readAsDataURL(k):p.readAsText(k)})(aa)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=
+function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1<l){var m=Math.round(g/l),n=Math.round(k/l),p=document.createElement("canvas");p.width=m;p.height=n;p.getContext("2d").drawImage(a,0,0,m,n);var r=p.toDataURL();if(r.length<b.length){var s=
+document.createElement("canvas");s.width=m;s.height=n;var L=s.toDataURL();r!==L&&(b=r,g=m,k=n)}}}catch(K){}c(b,g,k)};(function(){EditorUi.prototype.crcTable=[];for(var a=0;256>a;a++)for(var b=a,c=0;8>c;c++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[a]=b;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e<d;e++)a=EditorUi.prototype.crcTable[(a^b[c+e])&255]^a>>>8;return a}})();EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=k;k+=b;return a.substring(c,
+k)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,k);do{var l=g(a);if("IDAT"==f(a,4)){e=a.substring(0,k-8);l=4294967295;l=this.updateCRC(l,b,0,4);l=this.updateCRC(l,d,0,d.length);e+=String.fromCharCode(c.length+
+d.length+1+("zTXt"==b?1:0)>>24&255,c.length+d.length+1+("zTXt"==b?1:0)>>16&255,c.length+d.length+1+("zTXt"==b?1:0)>>8&255,c.length+d.length+1+("zTXt"==b?1:0)&255)+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+String.fromCharCode((l^4294967295)>>24&255,(l^4294967295)>>16&255,(l^4294967295)>>8&255,(l^4294967295)&255);e+=a.substring(k-8,a.length);break}e+=a.substring(k-8,k-4+l);d=f(a,l);f(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=
+function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||
+"IDAT"==c)return!0}))}catch(e){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){k.apply(this,arguments);var a=this.editor.graph,b=this;mxClient.IS_SVG&&this.editor.addSvgShadow(a.view.canvas.ownerSVGElement,null,!0);this.defaultFilename=mxResources.get("untitledDiagram");
+var c=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a&&null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:c.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var d=this.actions.get("print");d.setEnabled(!mxClient.IS_IOS||!navigator.standalone);d.visible=d.isEnabled();if(!this.editor.chromeless){this.keyHandler.bindAction(67,
+!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||a.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a)&&!b.isEditing())try{for(var c=a.clipboardData||a.originalEvent.clipboardData,b=!1,d=0;d<c.types.length;d++)if("text/"===
+c.types[d].substring(0,5)){b=!0;break}if(!b){var e=c.items;for(index in e){var f=e[index];if("file"===f.kind){var g=this.editor.graph.getInsertPoint();this.importFiles([f.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(a);break}}}}catch(k){}}),!1);var e=document.createElement("div");e.style.position="absolute";e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.display="block";e.contentEditable=!0;mxUtils.setOpacity(e,0);e.style.width="1px";e.style.height="1px";e.innerHTML="\x26nbsp;";
+var f=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);if(null!=a.container&&a.isEnabled()&&!a.isMouseDown&&!a.isEditing()&&null==this.dialog&&"INPUT"!=c.nodeName&&"TEXTAREA"!=c.nodeName&&(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)&&!f)e.style.left=a.container.scrollLeft+10+"px",e.style.top=a.container.scrollTop+
+10+"px",a.container.appendChild(e),f=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){e.focus();document.execCommand("selectAll",!1,null)},0):(e.focus(),document.execCommand("selectAll",!1,null))}));var g=function(){window.setTimeout(function(){e.innerHTML="\x26nbsp;";e.focus();document.execCommand("selectAll",!1,null)},0)};mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){if(f&&(224==c||17==c||91==c))f=!1,!a.isEditing()&&
+(null==this.dialog&&null!=a.container)&&a.container.focus(),e.parentNode.removeChild(e)}),0)}));mxEvent.addListener(e,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(e),g())}));mxEvent.addListener(e,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&(this.copyCells(e,!0),g())}));mxEvent.addListener(e,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&(e.innerHTML="\x26nbsp;",e.focus(),window.setTimeout(mxUtils.bind(this,
+function(){this.pasteCells(b,e);e.innerHTML="\x26nbsp;"}),0))}),!0);var l=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==e?!0:l.apply(this,arguments)}}d=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2;this.spinner=this.createSpinner(document.body.clientWidth/2-2,d,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;
+null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){if(null==d&&(!mxClient.IS_IE||10<document.documentMode))d=this.highlightElement(c);a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
+0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,
+Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.test){d=document.getElementById("geFooter");
+null!=d&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),d.appendChild(this.styleInput),
+this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var m=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:m.apply(this,arguments)}}d=document.getElementById("geInfo");
+null!=d&&d.parentNode.removeChild(d);if(Graph.fileSupport){var n=null;mxEvent.addListener(a.container,"dragleave",function(b){a.isEnabled()&&(null!=n&&(n.parentNode.removeChild(n),n=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(a.container,"dragover",mxUtils.bind(this,function(b){if(null==n&&(!mxClient.IS_IE||10<document.documentMode))n=this.highlightElement(a.container);null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a.container,
+"drop",mxUtils.bind(this,function(b){null!=n&&(n.parentNode.removeChild(n),n=null);if(a.isEnabled()){var c=mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=a.view.translate,e=a.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(b)&&(g=f=0);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b));else{var k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?
+b.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(b);if(null!=c)a.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){c=b.dataTransfer.getData("text/html");e=document.createElement("div");e.innerHTML=c;var d=null,l=e.getElementsByTagName("img");null!=l&&1==l.length?(c=l[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)||(d=!0)):(e=e.getElementsByTagName("a"),null!=e&&1==e.length&&(c=e[0].getAttribute("href")));
+a.setSelectionCells(this.insertTextAt(c,f,g,!0,d))}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(b){var c=Math.max(1,b.width);b=Math.max(1,b.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,b));a.setSelectionCell(a.insertVertex(null,null,"",f,g,c*d,b*d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+k+";"))}),mxUtils.bind(this,
+function(b){a.setSelectionCells(this.insertTextAt(k,f,g,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&a.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),f,g,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode()};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=
+mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=this.editor.graph,d=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),e=!1;try{var f=d.lastIndexOf("%3E");f<d.length-3&&(d=d.substring(0,f+3))}catch(g){}try{var k=
+b.getElementsByTagName("span"),l=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(d);this.isCompatibleString(l)&&(e=!0,d=l)}catch(m){}c.lastPasteXml==d?c.pasteCounter++:(c.lastPasteXml=d,c.pasteCounter=0);f=c.pasteCounter*c.gridSize;if(null!=d&&0<d.length&&(e||this.isCompatibleString(d)?c.setSelectionCells(this.importXml(d,f,f)):(e=c.getInsertPoint(),c.setSelectionCells(this.insertTextAt(d,e.x+f,e.y+f,!0))),!c.isSelectionEmpty())){c.scrollCellToVisible(c.getSelectionCell());
+null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(n){}}}};var l=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var b=Format.prototype.init;Format.prototype.init=function(){b.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var c=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed?c.apply(this,arguments):this.clear()};
+var d=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=d.apply(this,arguments);var b=this.editorUi;if(b.editor.graph.isEnabled()){var c=b.getCurrentFile();null!=c&&c.isAutosaveOptional()&&(c=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),
+a.appendChild(c))}return a};var e=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));e.apply(this,arguments)};var f=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",
+mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";b.style.marginRight="2px";a.appendChild(b);b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return f.apply(this,
+arguments)};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function c(a){var b=mxUtils.button("",function(b){d.getModel().beginUpdate();try{var c=d.getSelectionCells();for(b=0;b<c.length;b++){for(var e=d.getModel().getStyle(c[b]),g=0;g<f.length;g++)e=mxUtils.removeStylename(e,f[g]);null!=a?(e=mxUtils.setStyle(e,mxConstants.STYLE_FILLCOLOR,a.fill),e=mxUtils.setStyle(e,mxConstants.STYLE_STROKECOLOR,a.stroke),e=mxUtils.setStyle(e,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(e=mxUtils.setStyle(e,
+mxConstants.STYLE_FILLCOLOR,"#ffffff"),e=mxUtils.setStyle(e,mxConstants.STYLE_STROKECOLOR,"#000000"),e=mxUtils.setStyle(e,mxConstants.STYLE_GRADIENTCOLOR,null));d.getModel().setStyle(c[b],e)}}finally{d.getModel().endUpdate()}});b.style.width="36px";b.style.height="30px";b.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr\x3d'"+a.fill+"', EndColorStr\x3d'"+
+a.gradient+"', GradientType\x3d0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":b.style.backgroundColor=a.fill,b.style.border="1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border="1px solid #000000");e.appendChild(b)}e.innerHTML="";for(var g=0;g<a.length;g++)0<g&&0==mxUtils.mod(g,4)&&mxUtils.br(e),c(a[g])}function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity=
+"0.5"})}var d=this.editorUi.editor.graph,e=document.createElement("div");e.style.whiteSpace="normal";e.style.paddingLeft="24px";e.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(e);var f=["plain-gray","plain-blue","plain-green","plain-orange","plain-yellow","plain-red","plain-purple",null];null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var g=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},
+{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",
+stroke:"#996185",gradient:"#d5739d"}]],k=document.createElement("div");k.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII\x3d);";
a.appendChild(k);mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,g.length);b(g[this.editorUi.currentScheme])}));var l=document.createElement("div");l.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg\x3d\x3d);";
a.appendChild(l);mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,g.length);b(g[this.editorUi.currentScheme])}));c(k);c(l);b(g[this.editorUi.currentScheme]);return a};return l.apply(this,arguments)};null!=window.StyleFormatPanel&&(StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),c=null;1==this.editorUi.editor.graph.getSelectionCount()&&(c=mxUtils.button(mxResources.get("editStyle"),
mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),c.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),c.style.width="202px",c.style.marginBottom="2px",a.appendChild(c));var d=this.editorUi.editor.graph,e=d.view.getState(d.getSelectionCell());1==d.getSelectionCount()&&null!=e&&null!=e.shape&&null!=e.shape.stencil?(b=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editShape").funct()})),
@@ -2708,21 +2708,21 @@ f=Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.h
this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,
!0);b.outline.view.validate()});return b};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").setEnabled(c);this.actions.get("shadowVisible").setEnabled(c);this.actions.get("connectionArrows").setEnabled(c);
this.actions.get("connectionPoints").setEnabled(c);this.actions.get("copyStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);this.actions.get("moveToFolder").setEnabled(null!=b);this.actions.get("makeCopy").setEnabled(null!=b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled("1"==
-urlParams.embed||null!=b&&!b.isRestricted());this.actions.get("imgur").setEnabled(null!=b&&!b.isRestricted());this.actions.get("github").setEnabled(null!=b&&!b.isRestricted());this.actions.get("publishLink").setEnabled(null!=b&&!b.isRestricted());this.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=
-null;Graph.prototype.pasteCounter=0;Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){p.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#dropShadow)"):this.view.getDrawPane().removeAttribute("filter"),
-b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};var s=Graph.prototype.init;Graph.prototype.init=function(){function a(c){b=c;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(c)}s.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=new mxStackLayout(this.graph,!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1<b.height/20){var c=b.height%20;b.height+=10<c?20-c:-c}this.graph.getModel().setGeometry(a,
-b)};c.fill=!0;c.unitSize=mxRackContainer.unitSize|20;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.resizeParent=!1;return c}return d.apply(this,arguments)}};mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];
-mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",
-STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries.eeLogicGates=[STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeResistors=[STENCIL_PATH+"/electrical/resistors.xml"];mxStencilRegistry.libraries.eeCapacitors=[STENCIL_PATH+"/electrical/capacitors.xml"];mxStencilRegistry.libraries.eeInductors=[STENCIL_PATH+"/electrical/inductors.xml"];mxStencilRegistry.libraries.eeSwitchesRelays=
-[STENCIL_PATH+"/electrical/switchesRelays.xml",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries.eeDiodes=[STENCIL_PATH+"/electrical/diodes.xml"];mxStencilRegistry.libraries.eeSources=[STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries.eeTransistors=[STENCIL_PATH+"/electrical/mosfets1.xml",STENCIL_PATH+"/electrical/mosfets2.xml",STENCIL_PATH+"/electrical/transistors.xml"];mxStencilRegistry.libraries.eeMisc=[STENCIL_PATH+"/electrical/electro-mechanical.xml",
-STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries.eeAudio=[STENCIL_PATH+"/electrical/radio.xml"];mxStencilRegistry.libraries.eePlcLadder=[STENCIL_PATH+"/electrical/plc_ladder.xml"];mxStencilRegistry.libraries.eeAbstract=[STENCIL_PATH+"/electrical/abstract.xml",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeOptical=[STENCIL_PATH+"/electrical/opto_electronics.xml"];mxStencilRegistry.libraries.eeVacuumTubes=[STENCIL_PATH+"/electrical/vacuum_tubes.xml"];
-mxStencilRegistry.libraries.eeWaveforms=[STENCIL_PATH+"/electrical/waveforms.xml"];mxStencilRegistry.libraries.eeInstruments=[STENCIL_PATH+"/electrical/instruments.xml"];mxStencilRegistry.libraries["mscae/cloud"]=[STENCIL_PATH+"/mscae/cloud.xml"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];
-mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+
-"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",
-STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.citrix=[STENCIL_PATH+"/citrix.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];
-mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var r=
-mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,g,k,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return r.apply(this,arguments)}})();function DiagramPage(a){this.node=a}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,c){this.ui=a;this.page=b;this.previous=c}
+urlParams.embed||null!=b&&!b.isRestricted());this.actions.get("imgur").setEnabled(null!=b&&!b.isRestricted());this.actions.get("twitter").setEnabled(null!=b&&!b.isRestricted());this.actions.get("facebook").setEnabled(null!=b&&!b.isRestricted());this.actions.get("github").setEnabled(null!=b&&!b.isRestricted());this.actions.get("publishLink").setEnabled(null!=b&&!b.isRestricted());this.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&
+null!=a&&null!=a.shape&&null!=a.shape.stencil)};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){p.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&
+(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#dropShadow)"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};var s=Graph.prototype.init;Graph.prototype.init=function(){function a(c){b=c;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(c)}s.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,
+"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=new mxStackLayout(this.graph,
+!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1<b.height/20){var c=b.height%20;b.height+=10<c?20-c:-c}this.graph.getModel().setGeometry(a,b)};c.fill=!0;c.unitSize=mxRackContainer.unitSize|20;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.resizeParent=!1;return c}return d.apply(this,arguments)}};mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+
+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+
+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries.eeLogicGates=[STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeResistors=[STENCIL_PATH+"/electrical/resistors.xml"];mxStencilRegistry.libraries.eeCapacitors=
+[STENCIL_PATH+"/electrical/capacitors.xml"];mxStencilRegistry.libraries.eeInductors=[STENCIL_PATH+"/electrical/inductors.xml"];mxStencilRegistry.libraries.eeSwitchesRelays=[STENCIL_PATH+"/electrical/switchesRelays.xml",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries.eeDiodes=[STENCIL_PATH+"/electrical/diodes.xml"];mxStencilRegistry.libraries.eeSources=[STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries.eeTransistors=[STENCIL_PATH+"/electrical/mosfets1.xml",
+STENCIL_PATH+"/electrical/mosfets2.xml",STENCIL_PATH+"/electrical/transistors.xml"];mxStencilRegistry.libraries.eeMisc=[STENCIL_PATH+"/electrical/electro-mechanical.xml",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries.eeAudio=[STENCIL_PATH+"/electrical/radio.xml"];mxStencilRegistry.libraries.eePlcLadder=[STENCIL_PATH+"/electrical/plc_ladder.xml"];mxStencilRegistry.libraries.eeAbstract=[STENCIL_PATH+"/electrical/abstract.xml",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeOptical=
+[STENCIL_PATH+"/electrical/opto_electronics.xml"];mxStencilRegistry.libraries.eeVacuumTubes=[STENCIL_PATH+"/electrical/vacuum_tubes.xml"];mxStencilRegistry.libraries.eeWaveforms=[STENCIL_PATH+"/electrical/waveforms.xml"];mxStencilRegistry.libraries.eeInstruments=[STENCIL_PATH+"/electrical/instruments.xml"];mxStencilRegistry.libraries["mscae/cloud"]=[STENCIL_PATH+"/mscae/cloud.xml"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=
+[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=
+[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=
+[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.citrix=[STENCIL_PATH+"/citrix.xml"];mxStencilRegistry.libraries.archimate=
+[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&
+("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var r=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,g,k,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return r.apply(this,arguments)}})();function DiagramPage(a){this.node=a}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,c){this.ui=a;this.page=b;this.previous=c}
RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(a,b,c){this.ui=a;this.oldIndex=b;this.newIndex=c}
MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};function SelectPage(a,b){this.ui=a;this.previousPage=this.page=b;null!=b&&this.ui.updatePageRoot(b)}
SelectPage.prototype.execute=function(){if(null!=this.page&&0<=mxUtils.indexOf(this.ui.pages,this.previousPage)){var a=this.ui.currentPage,b=this.ui.editor,c=b.graph,d=b.graph.compress(c.zapGremlins(mxUtils.getXml(b.getGraphXml(!0))));mxUtils.setTextContent(a.node,d);a.viewState=c.getViewState();a.root=c.model.root;c.view.clear(a.root,!0);c.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;c.model.rootChanged(a.root);c.setViewState(a.viewState);b.fireEvent(new mxEventObject("setViewState",
diff --git a/war/js/atlas.min.js b/war/js/atlas.min.js
index f7abf3d1..802ac9e8 100644
--- a/war/js/atlas.min.js
+++ b/war/js/atlas.min.js
@@ -3,8 +3,8 @@
d[e])}return b}function g(b){this.opts=e(b||{},g.defaults,r)}function k(){function d(b,e){return a("\x3c"+b+' xmlns\x3d"urn:schemas-microsoft.com:vml" class\x3d"spin-vml"\x3e',e)}p.addRule(".spin-vml","behavior:url(#default#VML)");g.prototype.lines=function(a,e){function f(){return b(d("group",{coordsize:m+" "+m,coordorigin:-l+" "+-l}),{width:m,height:m})}function g(a,k,m){c(n,c(b(f(),{rotation:360/e.lines*a+"deg",left:~~k}),c(b(d("roundrect",{arcsize:e.corners}),{width:l,height:e.width,left:e.radius,
top:-e.width>>1,filter:m}),d("fill",{color:"string"==typeof e.color?e.color:e.color[a%e.color.length],opacity:e.opacity}),d("stroke",{opacity:0}))))}var k,l=e.length+e.width,m=2*l;k=2*-(e.width+e.length)+"px";var n=b(f(),{position:"absolute",top:k,left:k});if(e.shadow)for(k=1;k<=e.lines;k++)g(k,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius\x3d2,makeshadow\x3d1,shadowopacity\x3d.3)");for(k=1;k<=e.lines;k++)g(k);return c(a,n)};g.prototype.opacity=function(b,a,d,e){b=b.firstChild;e=e.shadow&&
e.lines||0;b&&a+e<b.childNodes.length&&(b=b.childNodes[a+e],b=b&&b.firstChild,b=b&&b.firstChild,b&&(b.opacity=d))}}var l,m=["webkit","Moz","ms","O"],n={},p=function(){var b=a("style",{type:"text/css"});return c(document.getElementsByTagName("head")[0],b),b.sheet||b.styleSheet}(),r={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:0.25,fps:20,zIndex:2E9,className:"spinner",top:"50%",left:"50%",position:"absolute"};g.defaults={};e(g.prototype,
-{spin:function(d){this.stop();var e=this,c=e.opts,f=e.el=b(a(0,{className:c.className}),{position:c.position,width:0,zIndex:c.zIndex});c.radius+c.length+c.width;if(d&&(d.insertBefore(f,d.firstChild||null),b(f,{left:c.left,top:c.top})),f.setAttribute("role","progressbar"),e.lines(f,e.opts),!l){var g,k=0,m=(c.lines-1)*(1-c.direction)/2,n=c.fps,p=n/c.speed,r=(1-c.opacity)/(p*c.trail/100),s=p/c.lines;!function F(){k++;for(var b=0;b<c.lines;b++)g=Math.max(1-(k+(c.lines-b)*s)%p*r,c.opacity),e.opacity(f,
-b*c.direction+m,g,c);e.timeout=e.el&&setTimeout(F,~~(1E3/n))}()}return e},stop:function(){var b=this.el;return b&&(clearTimeout(this.timeout),b.parentNode&&b.parentNode.removeChild(b),this.el=void 0),this},lines:function(d,e){function g(d,c){return b(a(),{position:"absolute",width:e.length+e.width+"px",height:e.width+"px",background:d,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/e.lines*m+e.rotate)+"deg) translate("+e.radius+"px,0)",borderRadius:(e.corners*e.width>>1)+"px"})}for(var k,
+{spin:function(d){this.stop();var e=this,c=e.opts,f=e.el=b(a(0,{className:c.className}),{position:c.position,width:0,zIndex:c.zIndex});c.radius+c.length+c.width;if(d&&(d.insertBefore(f,d.firstChild||null),b(f,{left:c.left,top:c.top})),f.setAttribute("role","progressbar"),e.lines(f,e.opts),!l){var g,k=0,m=(c.lines-1)*(1-c.direction)/2,n=c.fps,p=n/c.speed,r=(1-c.opacity)/(p*c.trail/100),s=p/c.lines;!function G(){k++;for(var b=0;b<c.lines;b++)g=Math.max(1-(k+(c.lines-b)*s)%p*r,c.opacity),e.opacity(f,
+b*c.direction+m,g,c);e.timeout=e.el&&setTimeout(G,~~(1E3/n))}()}return e},stop:function(){var b=this.el;return b&&(clearTimeout(this.timeout),b.parentNode&&b.parentNode.removeChild(b),this.el=void 0),this},lines:function(d,e){function g(d,c){return b(a(),{position:"absolute",width:e.length+e.width+"px",height:e.width+"px",background:d,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/e.lines*m+e.rotate)+"deg) translate("+e.radius+"px,0)",borderRadius:(e.corners*e.width>>1)+"px"})}for(var k,
m=0,n=(e.lines-1)*(1-e.direction)/2;m<e.lines;m++)k=b(a(),{position:"absolute",top:1+~(e.width/2)+"px",transform:e.hwaccel?"translate3d(0,0,0)":"",opacity:e.opacity,animation:l&&f(e.opacity,e.trail,n+m*e.direction,e.lines)+" "+1/e.speed+"s linear infinite"}),e.shadow&&c(k,b(g("#000","0 0 4px #000"),{top:"2px"})),c(d,c(k,g("string"==typeof e.color?e.color:e.color[m%e.color.length],"0 0 1px rgba(0,0,0,.1)")));return d},opacity:function(b,a,d){a<b.childNodes.length&&(b.childNodes[a].style.opacity=d)}});
var s=b(a("group"),{behavior:"url(#default#VML)"});return!d(s,"transform")&&s.adj?k():l=d(s,"animation"),g});
(function(){var a=void 0,c=!0,f=null,d=!1,b=["aliceblue antiquewhite aqua aquamarine azure beige bisque black blanchedalmond blue blueviolet brown burlywood cadetblue chartreuse chocolate coral cornflowerblue cornsilk crimson cyan darkblue darkcyan darkgoldenrod darkgray darkgreen darkkhaki darkmagenta darkolivegreen darkorange darkorchid darkred darksalmon darkseagreen darkslateblue darkslategray darkturquoise darkviolet deeppink deepskyblue dimgray dodgerblue firebrick floralwhite forestgreen fuchsia gainsboro ghostwhite gold goldenrod gray green greenyellow honeydew hotpink indianred indigo ivory khaki lavender lavenderblush lawngreen lemonchiffon lightblue lightcoral lightcyan lightgoldenrodyellow lightgreen lightgrey lightpink lightsalmon lightseagreen lightskyblue lightslategray lightsteelblue lightyellow lime limegreen linen magenta maroon mediumaquamarine mediumblue mediumorchid mediumpurple mediumseagreen mediumslateblue mediumspringgreen mediumturquoise mediumvioletred midnightblue mintcream mistyrose moccasin navajowhite navy oldlace olive olivedrab orange orangered orchid palegoldenrod palegreen paleturquoise palevioletred papayawhip peachpuff peru pink plum powderblue purple red rosybrown royalblue saddlebrown salmon sandybrown seagreen seashell sienna silver skyblue slateblue slategray snow springgreen steelblue tan teal thistle tomato transparent turquoise violet wheat white whitesmoke yellow yellowgreen".split(" "),"all-scroll col-resize crosshair default e-resize hand help move n-resize ne-resize no-drop not-allowed nw-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait".split(" "),
@@ -43,19 +43,19 @@ this.l);f!==this.o&&b.push("#",this.o);return b.join("")};g.prototype.T=function
function(){return this.h&&decodeURIComponent(this.h)};g.prototype.ca=function(b){if(b){b=Number(b);if(b!==(b&65535))throw Error("Bad port number "+b);this.h=""+b}else this.h=f};g.prototype.$=function(){return f!==this.h};g.prototype.U=function(){return this.g&&decodeURIComponent(this.g)};g.prototype.G=function(b){b?(b=""+b,this.g=!this.k||/^\//.test(b)?b:"/"+b):this.g=f};g.prototype.O=function(b){this.l=b?b:f};g.prototype.aa=function(){return f!==this.l};g.prototype.ba=function(b){if("object"===typeof b&&
!(b instanceof Array)&&(b instanceof Object||"[object Array]"!==Object.prototype.toString.call(b))){var a=[],d=-1,e;for(e in b){var c=b[e];"string"===typeof c&&(a[++d]=e,a[++d]=c)}b=a}for(var a=[],d="",f=0;f<b.length;)e=b[f++],c=b[f++],a.push(d,encodeURIComponent(e.toString())),d="\x26",c&&a.push("\x3d",encodeURIComponent(c.toString()));this.l=a.join("")};g.prototype.fa=function(b){this.o=b?b:f};g.prototype.Z=function(){return f!==this.o};var n=/^(?:([^:/?#]+):)?(?:\/\/(?:([^/?#]*)@)?([^/?#:@]*)(?::([0-9]+))?)?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,
q=/[#\/\?@]/g,p=/[\#\?]/g;g.parse=b;g.create=function(b,e,c,k,l,m,n){b=new g(a(b,q),a(e,q),"string"==typeof c?encodeURIComponent(c):f,0<k?k.toString():f,a(l,p),f,"string"==typeof n?encodeURIComponent(n):f);m&&("string"===typeof m?b.O(m.replace(/[^?&=0-9A-Za-z_\-~.%]/g,d)):b.ba(m));return b};g.N=c;g.ma=e;g.ha={ua:function(a){return/\.html$/.test(b(a).U())?"text/html":"application/javascript"},N:function(a,d){return a?c(b(a),b(d)).toString():""+d}};return g}();"undefined"!==typeof window&&(window.URI=
-m);var n=a,p=a,r=a,s=a;(function(){function b(a){return"string"===typeof a?'url("'+a.replace(A,g)+'")':'url("about:blank")'}function g(b){return B[b]}function k(b,a){return b?m.ha.N(b,a):a}function t(b,a,d){if(!d)return f;var e=(""+b).match(E);return e&&(!e[1]||G.test(e[1]))?d(b,a):f}function D(b){return b.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,"")}var A=/[\n\f\r\"\'()*<>]/g,B={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a",
-"\x3c":"%3c","\x3e":"%3e"},E=/^(?:([^:/?# ]+):)?/,G=/^(?:https?|mailto|data)$/i;n=function(){var a={};return function N(d,c,f,g,m){d=D(d);var n=e[d];if(!n||"object"!==typeof n)c.length=0;else{for(var q=n.cssPropBits,p=q&80,u=q&1536,r=NaN,s=0,F=0;s<c.length;++s){var z=c[s].toLowerCase(),E=z.charCodeAt(0),G,B,H,A,U,ia;if(32===E)z="";else if(34===E)z=16===p?f?b(t(k(g,l(c[s].substring(1,z.length-1))),d,f)):"":q&8&&!(p&p-1)?z:"";else if("inherit"!==z){if(U=n.cssLitGroup){var ea;if(!(ea=n.cssLitMap)){ea=
-{};for(var aa=U.length;0<=--aa;)for(var fa=U[aa],ja=fa.length;0<=--ja;)ea[fa[ja]]=a;ea=n.cssLitMap=ea}U=ea}else U=a;if(!(ia=U,ia[D(z)]===a))if(35===E&&/^#(?:[0-9a-f]{3}){1,2}$/.test(z))z=q&2?z:"";else if(48<=E&&57>=E)z=q&1?z:"";else if(G=z.charCodeAt(1),B=z.charCodeAt(2),H=48<=G&&57>=G,A=48<=B&&57>=B,43===E&&(H||46===G&&A))z=q&1?(H?"":"0")+z.substring(1):"";else if(45===E&&(H||46===G&&A))z=q&4?(H?"-":"-0")+z.substring(1):q&1?"0":"";else if(46===E&&H)z=q&1?"0"+z:"";else if('url("'===z.substring(0,
+m);var n=a,p=a,r=a,s=a;(function(){function b(a){return"string"===typeof a?'url("'+a.replace(A,g)+'")':'url("about:blank")'}function g(b){return B[b]}function k(b,a){return b?m.ha.N(b,a):a}function t(b,a,d){if(!d)return f;var e=(""+b).match(E);return e&&(!e[1]||F.test(e[1]))?d(b,a):f}function D(b){return b.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,"")}var A=/[\n\f\r\"\'()*<>]/g,B={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a",
+"\x3c":"%3c","\x3e":"%3e"},E=/^(?:([^:/?# ]+):)?/,F=/^(?:https?|mailto|data)$/i;n=function(){var a={};return function N(d,c,f,g,m){d=D(d);var n=e[d];if(!n||"object"!==typeof n)c.length=0;else{for(var q=n.cssPropBits,p=q&80,u=q&1536,r=NaN,s=0,G=0;s<c.length;++s){var z=c[s].toLowerCase(),E=z.charCodeAt(0),F,B,H,A,U,ia;if(32===E)z="";else if(34===E)z=16===p?f?b(t(k(g,l(c[s].substring(1,z.length-1))),d,f)):"":q&8&&!(p&p-1)?z:"";else if("inherit"!==z){if(U=n.cssLitGroup){var ea;if(!(ea=n.cssLitMap)){ea=
+{};for(var aa=U.length;0<=--aa;)for(var fa=U[aa],ja=fa.length;0<=--ja;)ea[fa[ja]]=a;ea=n.cssLitMap=ea}U=ea}else U=a;if(!(ia=U,ia[D(z)]===a))if(35===E&&/^#(?:[0-9a-f]{3}){1,2}$/.test(z))z=q&2?z:"";else if(48<=E&&57>=E)z=q&1?z:"";else if(F=z.charCodeAt(1),B=z.charCodeAt(2),H=48<=F&&57>=F,A=48<=B&&57>=B,43===E&&(H||46===F&&A))z=q&1?(H?"":"0")+z.substring(1):"";else if(45===E&&(H||46===F&&A))z=q&4?(H?"-":"-0")+z.substring(1):q&1?"0":"";else if(46===E&&H)z=q&1?"0"+z:"";else if('url("'===z.substring(0,
5))z=f&&q&16?b(t(k(g,c[s].substring(5,z.length-2)),d,f)):"";else if("("===z.charAt(z.length-1))a:{U=c;ea=s;z=1;aa=ea+1;for(E=U.length;aa<E&&z;)fa=U[aa++],z+=")"===fa?-1:/^[^"']*\($/.test(fa);if(!z){z=U[ea].toLowerCase();E=D(z);U=U.splice(ea,aa-ea,"");ea=n.cssFns;aa=0;for(fa=ea.length;aa<fa;++aa)if(ea[aa].substring(0,E.length)==E){U[0]=U[U.length-1]="";N(ea[aa],U,f,g);z=z+U.join(" ")+")";break a}}z=""}else z=u&&/^-?[a-z_][\w\-]*$/.test(z)&&!/__$/.test(z)?m&&512===u?c[s]+m:1024===u&&e[z]&&"number"===
-typeof e[z].oa?z:"":/^\w+$/.test(z)&&64===p&&q&8?r+1===F?(c[r]=c[r].substring(0,c[r].length-1)+" "+z+'"',""):(r=F,'"'+z+'"'):""}z&&(c[F++]=z)}1===F&&'url("about:blank")'===c[0]&&(F=0);c.length=F}}}();var F=RegExp("^(active|after|before|blank|checked|default|disabled|drop|empty|enabled|first|first-child|first-letter|first-line|first-of-type|fullscreen|focus|hover|in-range|indeterminate|invalid|last-child|last-of-type|left|link|only-child|only-of-type|optional|out-of-range|placeholder-shown|read-only|read-write|required|right|root|scope|user-error|valid|visited)$"),
+typeof e[z].oa?z:"":/^\w+$/.test(z)&&64===p&&q&8?r+1===G?(c[r]=c[r].substring(0,c[r].length-1)+" "+z+'"',""):(r=G,'"'+z+'"'):""}z&&(c[G++]=z)}1===G&&'url("about:blank")'===c[0]&&(G=0);c.length=G}}}();var G=RegExp("^(active|after|before|blank|checked|default|disabled|drop|empty|enabled|first|first-child|first-letter|first-line|first-of-type|fullscreen|focus|hover|in-range|indeterminate|invalid|last-child|last-of-type|left|link|only-child|only-of-type|optional|out-of-range|placeholder-shown|read-only|read-write|required|right|root|scope|user-error|valid|visited)$"),
H={};H["\x3e"]=H["+"]=H["~"]=H;p=function(b,a,e){function g(q,p){function t(e,f,g){var k,n,q,p,r,s=c;k="";if(e<f)if(r=b[e],"*"===r)++e,k=r;else if(/^[a-zA-Z]/.test(r)&&(n=m(r.toLowerCase(),[])))"tagName"in n&&(r=n.tagName),++e,k=r;for(p=q=n="";s&&e<f;++e)if(r=b[e],"#"===r.charAt(0))/^#_|__$|[^\w#:\-]/.test(r)?s=d:n+=r+l;else if("."===r)++e<f&&/^[0-9A-Za-z:_\-]+$/.test(r=b[e])&&!/^_|__$/.test(r)?n+="."+r:s=d;else if(e+1<f&&"["===b[e]){++e;var x=b[e++].toLowerCase();r=u.m[k+"::"+x];r!==+r&&(r=u.m["*::"+
x]);var z;a.ia?(z=a.ia(k,x),"string"!==typeof z&&(s=d,z=x),s&&r!==+r&&(r=u.d.NONE)):(z=x,r!==+r&&(s=d));var y=x="",E=d;/^[~^$*|]?=$/.test(b[e])&&(x=b[e++],y=b[e++],/^[0-9A-Za-z:_\-]+$/.test(y)?y='"'+y+'"':"]"===y&&(y='""',--e),/^"([^\"\\]|\\.)*"$/.test(y)||(s=d),(E="i"===b[e])&&++e);"]"!==b[e]&&(++e,s=d);switch(r){case u.d.CLASSES:case u.d.LOCAL_NAME:case u.d.NONE:break;case u.d.GLOBAL_NAME:case u.d.ID:case u.d.IDREF:("\x3d"===x||"~\x3d"===x||"$\x3d"===x)&&'""'!=y&&!E?y='"'+y.substring(1,y.length-
-1)+l+'"':"|\x3d"===x||""===x||(s=d);break;case u.d.URI:case u.d.URI_FRAGMENT:""!==x&&(s=d);break;default:s=d}s&&(q+="["+z.replace(/[^\w-]/g,"\\$\x26")+x+y+(E?" i]":"]"))}else if(e<f&&":"===b[e])if(r=b[++e],F.test(r))p+=":"+r;else break;else break;e!==f&&(s=d);s&&(e=(k+n).replace(/[^ .*#\w-]/g,"\\$\x26")+q+p+g)&&v.push(e);return s}" "===b[q]&&++q;p-1!==q&&" "===b[p]&&--p;for(var v=[],r=q,s=c,x=q;s&&x<p;++x){var z=b[x];if(H[z]===H||" "===z)t(r,x,z)?r=x+1:s=d}t(r,p,"")||(s=d);return s?(v.length&&(r=
+1)+l+'"':"|\x3d"===x||""===x||(s=d);break;case u.d.URI:case u.d.URI_FRAGMENT:""!==x&&(s=d);break;default:s=d}s&&(q+="["+z.replace(/[^\w-]/g,"\\$\x26")+x+y+(E?" i]":"]"))}else if(e<f&&":"===b[e])if(r=b[++e],G.test(r))p+=":"+r;else break;else break;e!==f&&(s=d);s&&(e=(k+n).replace(/[^ .*#\w-]/g,"\\$\x26")+q+p+g)&&v.push(e);return s}" "===b[q]&&++q;p-1!==q&&" "===b[p]&&--p;for(var v=[],r=q,s=c,x=q;s&&x<p;++x){var z=b[x];if(H[z]===H||" "===z)t(r,x,z)?r=x+1:s=d}t(r,p,"")||(s=d);return s?(v.length&&(r=
v.join(""),k!==f&&(r="."+k+" "+r),n.push(r)),c):!e||e(b.slice(q,p))}var k=a.na,l=a.L,m=a.Aa,n=[],q=0,p,t=0,v;for(p=0;p<b.length;++p)if(v=b[p],"("==v||"["==v?(++t,c):")"==v||"]"==v?(t&&--t,c):!(" "==b[p]&&(t||H[b[p-1]]===H||H[b[p+1]]===H)))b[q++]=b[p];b.length=q;q=b.length;for(p=t=0;p<q;++p)if(","===b[p]){if(!g(t,p))return f;t=p+1}return!g(t,q)?f:n};(function(){var b=/^\w/,a=RegExp("^(?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))(?: and ?\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))*)(?: , (?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))(?: and ?\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))*))*$",
-"i");s=function(d){d=d.slice();for(var e=d.length,c=0,f=0;f<e;++f){var g=d[f];" "!=g&&(d[c++]=g)}d.length=c;d=d.join(" ");return!d.length?"":!a.test(d)?"not all":b.test(d)?d:"not all , "+d}})();(function(){function b(a){var d=/^\s*[']([^']*)[']\s*$/,e=/^\s*url\s*[(]["]([^"]*)["][)]\s*$/,c=/^\s*url\s*[(][']([^']*)['][)]\s*$/,g=/^\s*url\s*[(]([^)]*)[)]\s*$/,k;return(k=/^\s*["]([^"]*)["]\s*$/.exec(a))||(k=d.exec(a))||(k=e.exec(a))||(k=c.exec(a))||(k=g.exec(a))?k[1]:f}function e(g,l,m,u,v,r,z){function F(){D=
-B.length&&B[B.length-1]===f}var E=a,G=z||[0],B=[],D=d;q(l,{startStylesheet:function(){E=[]},endStylesheet:function(){},startAtrule:function(a,d){if(D)a=f;else if("@media"===a)E.push("@media"," ",s(d));else if("@keyframes"===a||"@-webkit-keyframes"===a){var c=d[0];1===d.length&&!/__$|[^\w\-]/.test(c)?(E.push(a," ",c+m.L),a="@keyframes"):a=f}else if("@import"===a&&0<d.length)if(a=f,"function"===typeof r){var l=s(d.slice(1));if("not all"!==l){++G[0];var n=[];E.push(n);var q=t(k(g,b(d[0])),function(b){var a=
-e(q,b.qa,m,u,v,r,G);--G[0];b=l?{toString:function(){return"@media "+l+" {"+a.result+"}"}}:a.result;n[0]=b;r(b,!!G[0])},v)}}else window.console&&window.console.log("@import "+d.join(" ")+" elided");D=!a;B.push(a)},endAtrule:function(){B.pop();D||E.push(";");F()},startBlock:function(){D||E.push("{")},endBlock:function(){D||(E.push("}"),D=c)},startRuleset:function(b){if(!D){var d=a;"@keyframes"===B[B.length-1]?(d=b.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
-D=!d,d&&(d=d[0].replace(/ +/g,""))):(b=p(b,m),!b||!b.length?D=c:d=b.join(", "));D||E.push(d,"{")}B.push(f)},endRuleset:function(){B.pop();D||E.push("}");F()},declaration:function(b,a){if(!D){var e=d,f=a.length;2<=f&&"!"===a[f-2]&&"important"===a[f-1].toLowerCase()&&(e=c,a.length-=2);n(b,a,u,g,m.L);a.length&&E.push(b,":",a.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return E.join("")}},va:!!G[0]}}r=function(b,d,c,f){return e(b,d,c,f,a,a).result.toString()}})()})();"undefined"!==
+"i");s=function(d){d=d.slice();for(var e=d.length,c=0,f=0;f<e;++f){var g=d[f];" "!=g&&(d[c++]=g)}d.length=c;d=d.join(" ");return!d.length?"":!a.test(d)?"not all":b.test(d)?d:"not all , "+d}})();(function(){function b(a){var d=/^\s*[']([^']*)[']\s*$/,e=/^\s*url\s*[(]["]([^"]*)["][)]\s*$/,c=/^\s*url\s*[(][']([^']*)['][)]\s*$/,g=/^\s*url\s*[(]([^)]*)[)]\s*$/,k;return(k=/^\s*["]([^"]*)["]\s*$/.exec(a))||(k=d.exec(a))||(k=e.exec(a))||(k=c.exec(a))||(k=g.exec(a))?k[1]:f}function e(g,l,m,u,v,r,G){function z(){D=
+B.length&&B[B.length-1]===f}var E=a,F=G||[0],B=[],D=d;q(l,{startStylesheet:function(){E=[]},endStylesheet:function(){},startAtrule:function(a,d){if(D)a=f;else if("@media"===a)E.push("@media"," ",s(d));else if("@keyframes"===a||"@-webkit-keyframes"===a){var c=d[0];1===d.length&&!/__$|[^\w\-]/.test(c)?(E.push(a," ",c+m.L),a="@keyframes"):a=f}else if("@import"===a&&0<d.length)if(a=f,"function"===typeof r){var l=s(d.slice(1));if("not all"!==l){++F[0];var n=[];E.push(n);var q=t(k(g,b(d[0])),function(b){var a=
+e(q,b.qa,m,u,v,r,F);--F[0];b=l?{toString:function(){return"@media "+l+" {"+a.result+"}"}}:a.result;n[0]=b;r(b,!!F[0])},v)}}else window.console&&window.console.log("@import "+d.join(" ")+" elided");D=!a;B.push(a)},endAtrule:function(){B.pop();D||E.push(";");z()},startBlock:function(){D||E.push("{")},endBlock:function(){D||(E.push("}"),D=c)},startRuleset:function(b){if(!D){var d=a;"@keyframes"===B[B.length-1]?(d=b.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
+D=!d,d&&(d=d[0].replace(/ +/g,""))):(b=p(b,m),!b||!b.length?D=c:d=b.join(", "));D||E.push(d,"{")}B.push(f)},endRuleset:function(){B.pop();D||E.push("}");z()},declaration:function(b,a){if(!D){var e=d,f=a.length;2<=f&&"!"===a[f-2]&&"important"===a[f-1].toLowerCase()&&(e=c,a.length-=2);n(b,a,u,g,m.L);a.length&&E.push(b,":",a.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return E.join("")}},va:!!F[0]}}r=function(b,d,c,f){return e(b,d,c,f,a,a).result.toString()}})()})();"undefined"!==
typeof window&&(window.sanitizeCssProperty=n,window.sanitizeCssSelectorList=p,window.sanitizeStylesheet=r,window.sanitizeMediaQuery=s);var q,t;(function(){function b(d,e,c,f,g){for(var k=e++;e<c&&"{"!==d[e]&&";"!==d[e];)++e;if(e<c&&(g||";"===d[e])){g=k+1;var l=e;g<c&&" "===d[g]&&++g;l>g&&" "===d[l-1]&&--l;f.startAtrule&&f.startAtrule(d[k].toLowerCase(),d.slice(g,l));e="{"===d[e]?a(d,e,c,f):e+1;f.endAtrule&&f.endAtrule()}return e}function a(c,f,g,k){++f;for(k.startBlock&&k.startBlock();f<g;){var l=
c[f].charAt(0);if("}"==l){++f;break}f=" "===l||";"===l?f+1:"@"===l?b(c,f,g,k,d):"{"===l?a(c,f,g,k):e(c,f,g,k)}k.endBlock&&k.endBlock();return f}function e(b,a,d,g){var k=a,m=f(b,a,d,c);if(0>m)return m=~m,m===k?m+1:m;var n=b[m];if("{"!==n)return m===k?m+1:m;a=m+1;m>k&&" "===b[m-1]&&--m;for(g.startRuleset&&g.startRuleset(b.slice(k,m));a<d;){n=b[a];if("}"===n){++a;break}a=" "===n?a+1:l(b,a,d,g)}g.endRuleset&&g.endRuleset();return a}function f(b,a,d,e){for(var c,g=[],k=-1;a<d;++a)if(c=b[a].charAt(0),
"["===c||"("===c)g[++k]=c;else if("]"===c&&"["===g[k]||")"===c&&"("===g[k])--k;else if("{"===c||"}"===c||";"===c||"@"===c||":"===c&&!e)break;0<=k&&(a=~(a+1));return a}function g(b,a,d){for(;a<d&&";"!==b[a]&&"}"!==b[a];)++a;return a<d&&";"===b[a]?a+1:a}function l(b,a,e,c){var k=b[a++];if(!m.test(k))return g(b,a,e);a<e&&" "===b[a]&&++a;if(a==e||":"!==b[a])return g(b,a,e);++a;a<e&&" "===b[a]&&++a;var n=f(b,a,e,d);if(0>n)n=~n;else{for(var q=[],p=0,t=a;t<n;++t)a=b[t]," "!==a&&(q[p++]=a);if(n<e){do{a=b[n];
@@ -102,9 +102,9 @@ new b(e);if(c.push(d,!0),c.err)throw c.msg;return c.result}var g=c("./zlib/defla
f.avail_out&&(f.output=new k.Buf8(m),f.next_out=0,f.avail_out=m),e=g.deflate(f,c),1!==e&&e!==r)return this.onEnd(e),this.ended=!0,!1;0!==f.avail_out&&(0!==f.avail_in||4!==c&&2!==c)||("string"===this.options.to?this.onData(l.buf2binstring(k.shrinkBuf(f.output,f.next_out))):this.onData(k.shrinkBuf(f.output,f.next_out)))}while((0<f.avail_in||0===f.avail_out)&&1!==e);return 4===c?(e=g.deflateEnd(this.strm),this.onEnd(e),this.ended=!0,e===r):2!==c||(this.onEnd(r),f.avail_out=0,!0)};b.prototype.onData=
function(b){this.chunks.push(b)};b.prototype.onEnd=function(b){b===r&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=k.flattenChunks(this.chunks));this.chunks=[];this.err=b;this.msg=this.strm.msg};d.Deflate=b;d.deflate=e;d.deflateRaw=function(b,d){return d=d||{},d.raw=!0,e(b,d)};d.gzip=function(b,d){return d=d||{},d.gzip=!0,e(b,d)}},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(c,f,d){function b(d){if(!(this instanceof
b))return new b(d);var e=this.options=k.assign({chunkSize:16384,windowBits:0,to:""},d||{});e.raw&&0<=e.windowBits&&16>e.windowBits&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15));!(0<=e.windowBits&&16>e.windowBits)||d&&d.windowBits||(e.windowBits+=32);15<e.windowBits&&48>e.windowBits&&0===(15&e.windowBits)&&(e.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new p;this.strm.avail_out=0;d=g.inflateInit2(this.strm,e.windowBits);if(d!==m.Z_OK)throw Error(n[d]);
-this.header=new r;g.inflateGetHeader(this.strm,this.header)}function e(d,e){var c=new b(e);if(c.push(d,!0),c.err)throw c.msg;return c.result}var g=c("./zlib/inflate"),k=c("./utils/common"),l=c("./utils/strings"),m=c("./zlib/constants"),n=c("./zlib/messages"),p=c("./zlib/zstream"),r=c("./zlib/gzheader"),s=Object.prototype.toString;b.prototype.push=function(b,d){var e,c,f,n,p,r,A=this.strm,B=this.options.chunkSize,E=this.options.dictionary,G=!1;if(this.ended)return!1;c=d===~~d?d:!0===d?m.Z_FINISH:m.Z_NO_FLUSH;
-"string"==typeof b?A.input=l.binstring2buf(b):"[object ArrayBuffer]"===s.call(b)?A.input=new Uint8Array(b):A.input=b;A.next_in=0;A.avail_in=A.input.length;do{if(0===A.avail_out&&(A.output=new k.Buf8(B),A.next_out=0,A.avail_out=B),e=g.inflate(A,m.Z_NO_FLUSH),e===m.Z_NEED_DICT&&E&&(r="string"==typeof E?l.string2buf(E):"[object ArrayBuffer]"===s.call(E)?new Uint8Array(E):E,e=g.inflateSetDictionary(this.strm,r)),e===m.Z_BUF_ERROR&&!0===G&&(e=m.Z_OK,G=!1),e!==m.Z_STREAM_END&&e!==m.Z_OK)return this.onEnd(e),
-this.ended=!0,!1;A.next_out&&(0!==A.avail_out&&e!==m.Z_STREAM_END&&(0!==A.avail_in||c!==m.Z_FINISH&&c!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(f=l.utf8border(A.output,A.next_out),n=A.next_out-f,p=l.buf2string(A.output,f),A.next_out=n,A.avail_out=B-n,n&&k.arraySet(A.output,A.output,f,n,0),this.onData(p)):this.onData(k.shrinkBuf(A.output,A.next_out))));0===A.avail_in&&0===A.avail_out&&(G=!0)}while((0<A.avail_in||0===A.avail_out)&&e!==m.Z_STREAM_END);return e===m.Z_STREAM_END&&(c=m.Z_FINISH),
+this.header=new r;g.inflateGetHeader(this.strm,this.header)}function e(d,e){var c=new b(e);if(c.push(d,!0),c.err)throw c.msg;return c.result}var g=c("./zlib/inflate"),k=c("./utils/common"),l=c("./utils/strings"),m=c("./zlib/constants"),n=c("./zlib/messages"),p=c("./zlib/zstream"),r=c("./zlib/gzheader"),s=Object.prototype.toString;b.prototype.push=function(b,d){var e,c,f,n,p,r,A=this.strm,B=this.options.chunkSize,E=this.options.dictionary,F=!1;if(this.ended)return!1;c=d===~~d?d:!0===d?m.Z_FINISH:m.Z_NO_FLUSH;
+"string"==typeof b?A.input=l.binstring2buf(b):"[object ArrayBuffer]"===s.call(b)?A.input=new Uint8Array(b):A.input=b;A.next_in=0;A.avail_in=A.input.length;do{if(0===A.avail_out&&(A.output=new k.Buf8(B),A.next_out=0,A.avail_out=B),e=g.inflate(A,m.Z_NO_FLUSH),e===m.Z_NEED_DICT&&E&&(r="string"==typeof E?l.string2buf(E):"[object ArrayBuffer]"===s.call(E)?new Uint8Array(E):E,e=g.inflateSetDictionary(this.strm,r)),e===m.Z_BUF_ERROR&&!0===F&&(e=m.Z_OK,F=!1),e!==m.Z_STREAM_END&&e!==m.Z_OK)return this.onEnd(e),
+this.ended=!0,!1;A.next_out&&(0!==A.avail_out&&e!==m.Z_STREAM_END&&(0!==A.avail_in||c!==m.Z_FINISH&&c!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(f=l.utf8border(A.output,A.next_out),n=A.next_out-f,p=l.buf2string(A.output,f),A.next_out=n,A.avail_out=B-n,n&&k.arraySet(A.output,A.output,f,n,0),this.onData(p)):this.onData(k.shrinkBuf(A.output,A.next_out))));0===A.avail_in&&0===A.avail_out&&(F=!0)}while((0<A.avail_in||0===A.avail_out)&&e!==m.Z_STREAM_END);return e===m.Z_STREAM_END&&(c=m.Z_FINISH),
c===m.Z_FINISH?(e=g.inflateEnd(this.strm),this.onEnd(e),this.ended=!0,e===m.Z_OK):c!==m.Z_SYNC_FLUSH||(this.onEnd(m.Z_OK),A.avail_out=0,!0)};b.prototype.onData=function(b){this.chunks.push(b)};b.prototype.onEnd=function(b){b===m.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=k.flattenChunks(this.chunks));this.chunks=[];this.err=b;this.msg=this.strm.msg};d.Inflate=b;d.inflate=e;d.inflateRaw=function(b,d){return d=d||{},d.raw=!0,e(b,d)};d.ungzip=e},{"./utils/common":3,
"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(c,f,d){c="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;d.assign=function(b){for(var d=Array.prototype.slice.call(arguments,1);d.length;){var e=d.shift();if(e){if("object"!=typeof e)throw new TypeError(e+"must be non-object");for(var c in e)e.hasOwnProperty(c)&&(b[c]=e[c])}}return b};d.shrinkBuf=function(b,d){return b.length===
d?b:b.subarray?b.subarray(0,d):(b.length=d,b)};var b={arraySet:function(b,d,e,c,f){if(d.subarray&&b.subarray)return void b.set(d.subarray(e,e+c),f);for(var p=0;p<c;p++)b[f+p]=d[e+p]},flattenChunks:function(b){var d,e,c,f,p;d=c=0;for(e=b.length;d<e;d++)c+=b[d].length;p=new Uint8Array(c);d=c=0;for(e=b.length;d<e;d++)f=b[d],p.set(f,c),c+=f.length;return p}},e={arraySet:function(b,d,e,c,f){for(var p=0;p<c;p++)b[f+p]=d[e+p]},flattenChunks:function(b){return[].concat.apply([],b)}};d.setTyped=function(c){c?
@@ -117,34 +117,34 @@ for(var f=0;8>f;f++)b=1&b?3988292384^b>>>1:b>>>1;d[c]=b}return d}();f.exports=fu
0))}function k(b,d){D._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,d);b.block_start=b.strstart;g(b.strm)}function l(b,d){b.pending_buf[b.pending++]=d}function m(b,d){b.pending_buf[b.pending++]=d>>>8&255;b.pending_buf[b.pending++]=255&d}function n(b,d){var e,c,f=b.max_chain_length,g=b.strstart,k=b.prev_length,l=b.nice_match,m=b.strstart>b.w_size-X?b.strstart-(b.w_size-X):0,n=b.window,q=b.w_mask,p=b.prev,t=b.strstart+R,u=n[g+k-1],r=n[g+k];b.prev_length>=b.good_match&&
(f>>=2);l>b.lookahead&&(l=b.lookahead);do if(e=d,n[e+k]===r&&n[e+k-1]===u&&n[e]===n[g]&&n[++e]===n[g+1]){g+=2;e++;do;while(n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&g<t);if(c=R-(t-g),g=t-R,c>k){if(b.match_start=d,k=c,c>=l)break;u=n[g+k-1];r=n[g+k]}}while((d=p[d&q])>m&&0!==--f);return k<=b.lookahead?k:b.lookahead}function p(b){var d,e,c,f,g=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=
g+(g-X)){x.arraySet(b.window,b.window,g,g,0);b.match_start-=g;b.strstart-=g;b.block_start-=g;d=e=b.hash_size;do c=b.head[--d],b.head[d]=c>=g?c-g:0;while(--e);d=e=g;do c=b.prev[--d],b.prev[d]=c>=g?c-g:0;while(--e);f+=g}if(0===b.strm.avail_in)break;d=b.strm;c=b.window;var k=b.strstart+b.lookahead,l=d.avail_in;if(e=(l>f&&(l=f),0===l?0:(d.avail_in-=l,x.arraySet(c,d.input,d.next_in,l,k),1===d.state.wrap?d.adler=A(d.adler,c,l,k):2===d.state.wrap&&(d.adler=B(d.adler,c,l,k)),d.next_in+=l,d.total_in+=l,l)),
-b.lookahead+=e,b.lookahead+b.insert>=K){f=b.strstart-b.insert;b.ins_h=b.window[f];for(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+1])&b.hash_mask;b.insert&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+K-1])&b.hash_mask,b.prev[f&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=f,f++,b.insert--,!(b.lookahead+b.insert<K)););}}while(b.lookahead<X&&0!==b.strm.avail_in)}function r(b,d){for(var e,c;;){if(b.lookahead<X){if(p(b),b.lookahead<X&&d===G)return T;if(0===b.lookahead)break}if(e=0,b.lookahead>=K&&(b.ins_h=(b.ins_h<<
+b.lookahead+=e,b.lookahead+b.insert>=K){f=b.strstart-b.insert;b.ins_h=b.window[f];for(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+1])&b.hash_mask;b.insert&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+K-1])&b.hash_mask,b.prev[f&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=f,f++,b.insert--,!(b.lookahead+b.insert<K)););}}while(b.lookahead<X&&0!==b.strm.avail_in)}function r(b,d){for(var e,c;;){if(b.lookahead<X){if(p(b),b.lookahead<X&&d===F)return T;if(0===b.lookahead)break}if(e=0,b.lookahead>=K&&(b.ins_h=(b.ins_h<<
b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,e=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),0!==e&&b.strstart-e<=b.w_size-X&&(b.match_length=n(b,e)),b.match_length>=K)if(c=D._tr_tally(b,b.strstart-b.match_start,b.match_length-K),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=K){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,e=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=
-b.strstart;while(0!==--b.match_length);b.strstart++}else b.strstart+=b.match_length,b.match_length=0,b.ins_h=b.window[b.strstart],b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+1])&b.hash_mask;else c=D._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(c&&(k(b,!1),0===b.strm.avail_out))return T}return b.insert=b.strstart<K-1?b.strstart:K-1,d===F?(k(b,!0),0===b.strm.avail_out?ba:Y):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?T:Z}function s(b,d){for(var e,c,f;;){if(b.lookahead<X){if(p(b),
-b.lookahead<X&&d===G)return T;if(0===b.lookahead)break}if(e=0,b.lookahead>=K&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,e=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),b.prev_length=b.match_length,b.prev_match=b.match_start,b.match_length=K-1,0!==e&&b.prev_length<b.max_lazy_match&&b.strstart-e<=b.w_size-X&&(b.match_length=n(b,e),5>=b.match_length&&(b.strategy===N||b.match_length===K&&4096<b.strstart-b.match_start)&&(b.match_length=K-1)),b.prev_length>=
+b.strstart;while(0!==--b.match_length);b.strstart++}else b.strstart+=b.match_length,b.match_length=0,b.ins_h=b.window[b.strstart],b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+1])&b.hash_mask;else c=D._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(c&&(k(b,!1),0===b.strm.avail_out))return T}return b.insert=b.strstart<K-1?b.strstart:K-1,d===G?(k(b,!0),0===b.strm.avail_out?ba:Y):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?T:Z}function s(b,d){for(var e,c,f;;){if(b.lookahead<X){if(p(b),
+b.lookahead<X&&d===F)return T;if(0===b.lookahead)break}if(e=0,b.lookahead>=K&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,e=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),b.prev_length=b.match_length,b.prev_match=b.match_start,b.match_length=K-1,0!==e&&b.prev_length<b.max_lazy_match&&b.strstart-e<=b.w_size-X&&(b.match_length=n(b,e),5>=b.match_length&&(b.strategy===N||b.match_length===K&&4096<b.strstart-b.match_start)&&(b.match_length=K-1)),b.prev_length>=
K&&b.match_length<=b.prev_length){f=b.strstart+b.lookahead-K;c=D._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-K);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,e=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart);while(0!==--b.prev_length);if(b.match_available=0,b.match_length=K-1,b.strstart++,c&&(k(b,!1),0===b.strm.avail_out))return T}else if(b.match_available){if(c=D._tr_tally(b,0,
-b.window[b.strstart-1]),c&&k(b,!1),b.strstart++,b.lookahead--,0===b.strm.avail_out)return T}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(D._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<K-1?b.strstart:K-1,d===F?(k(b,!0),0===b.strm.avail_out?ba:Y):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?T:Z}function q(b,d,e,c,f){this.good_length=b;this.max_lazy=d;this.nice_length=e;this.max_chain=c;this.func=f}function t(){this.strm=null;this.status=
+b.window[b.strstart-1]),c&&k(b,!1),b.strstart++,b.lookahead--,0===b.strm.avail_out)return T}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(D._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<K-1?b.strstart:K-1,d===G?(k(b,!0),0===b.strm.avail_out?ba:Y):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?T:Z}function q(b,d,e,c,f){this.good_length=b;this.max_lazy=d;this.nice_length=e;this.max_chain=c;this.func=f}function t(){this.strm=null;this.status=
0;this.pending_buf=null;this.wrap=this.pending=this.pending_out=this.pending_buf_size=0;this.gzhead=null;this.gzindex=0;this.method=Q;this.last_flush=-1;this.w_mask=this.w_bits=this.w_size=0;this.window=null;this.window_size=0;this.head=this.prev=null;this.nice_match=this.good_match=this.strategy=this.level=this.max_lazy_match=this.max_chain_length=this.prev_length=this.lookahead=this.match_start=this.strstart=this.match_available=this.prev_match=this.match_length=this.block_start=this.hash_shift=
this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new x.Buf16(2*V);this.dyn_dtree=new x.Buf16(2*(2*P+1));this.bl_tree=new x.Buf16(2*(2*M+1));e(this.dyn_ltree);e(this.dyn_dtree);e(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new x.Buf16(I+1);this.heap=new x.Buf16(2*O+1);e(this.heap);this.heap_max=this.heap_len=0;this.depth=new x.Buf16(2*O+1);e(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=
-this.lit_bufsize=this.l_buf=0}function u(d){var e;return d&&d.state?(d.total_in=d.total_out=0,d.data_type=W,e=d.state,e.pending=0,e.pending_out=0,0>e.wrap&&(e.wrap=-e.wrap),e.status=e.wrap?da:ca,d.adler=2===e.wrap?0:1,e.last_flush=G,D._tr_init(e),H):b(d,J)}function v(b){var d=u(b);d===H&&(b=b.state,b.window_size=2*b.w_size,e(b.head),b.max_lazy_match=y[b.level].max_lazy,b.good_match=y[b.level].good_length,b.nice_match=y[b.level].nice_length,b.max_chain_length=y[b.level].max_chain,b.strstart=0,b.block_start=
+this.lit_bufsize=this.l_buf=0}function u(d){var e;return d&&d.state?(d.total_in=d.total_out=0,d.data_type=W,e=d.state,e.pending=0,e.pending_out=0,0>e.wrap&&(e.wrap=-e.wrap),e.status=e.wrap?da:ca,d.adler=2===e.wrap?0:1,e.last_flush=F,D._tr_init(e),H):b(d,J)}function v(b){var d=u(b);d===H&&(b=b.state,b.window_size=2*b.w_size,e(b.head),b.max_lazy_match=y[b.level].max_lazy,b.good_match=y[b.level].good_length,b.nice_match=y[b.level].nice_length,b.max_chain_length=y[b.level].max_chain,b.strstart=0,b.block_start=
0,b.lookahead=0,b.insert=0,b.match_length=b.prev_length=K-1,b.match_available=0,b.ins_h=0);return d}function z(d,e,c,f,g,k){if(!d)return J;var l=1;if(e===L&&(e=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>g||g>C||c!==Q||8>f||15<f||0>e||9<e||0>k||k>S)return b(d,J);8===f&&(f=9);var m=new t;return d.state=m,m.strm=d,m.wrap=l,m.gzhead=null,m.w_bits=f,m.w_size=1<<m.w_bits,m.w_mask=m.w_size-1,m.hash_bits=g+7,m.hash_size=1<<m.hash_bits,m.hash_mask=m.hash_size-1,m.hash_shift=~~((m.hash_bits+K-1)/K),m.window=new x.Buf8(2*
-m.w_size),m.head=new x.Buf16(m.hash_size),m.prev=new x.Buf16(m.w_size),m.lit_bufsize=1<<g+6,m.pending_buf_size=4*m.lit_bufsize,m.pending_buf=new x.Buf8(m.pending_buf_size),m.d_buf=1*m.lit_bufsize,m.l_buf=3*m.lit_bufsize,m.level=e,m.strategy=k,m.method=c,v(d)}var y,x=c("../utils/common"),D=c("./trees"),A=c("./adler32"),B=c("./crc32"),E=c("./messages"),G=0,F=4,H=0,J=-2,L=-1,N=1,S=4,W=2,Q=8,C=9,O=286,P=30,M=19,V=2*O+1,I=15,K=3,R=258,X=R+K+1,da=42,ca=113,T=1,Z=2,ba=3,Y=4;y=[new q(0,0,0,0,function(b,d){var e=
-65535;for(e>b.pending_buf_size-5&&(e=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&d===G)return T;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var c=b.block_start+e;if((0===b.strstart||b.strstart>=c)&&(b.lookahead=b.strstart-c,b.strstart=c,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-X&&(k(b,!1),0===b.strm.avail_out))return T}return b.insert=0,d===F?(k(b,!0),0===b.strm.avail_out?ba:Y):(b.strstart>b.block_start&&k(b,!1),T)}),new q(4,4,8,
+m.w_size),m.head=new x.Buf16(m.hash_size),m.prev=new x.Buf16(m.w_size),m.lit_bufsize=1<<g+6,m.pending_buf_size=4*m.lit_bufsize,m.pending_buf=new x.Buf8(m.pending_buf_size),m.d_buf=1*m.lit_bufsize,m.l_buf=3*m.lit_bufsize,m.level=e,m.strategy=k,m.method=c,v(d)}var y,x=c("../utils/common"),D=c("./trees"),A=c("./adler32"),B=c("./crc32"),E=c("./messages"),F=0,G=4,H=0,J=-2,L=-1,N=1,S=4,W=2,Q=8,C=9,O=286,P=30,M=19,V=2*O+1,I=15,K=3,R=258,X=R+K+1,da=42,ca=113,T=1,Z=2,ba=3,Y=4;y=[new q(0,0,0,0,function(b,d){var e=
+65535;for(e>b.pending_buf_size-5&&(e=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&d===F)return T;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var c=b.block_start+e;if((0===b.strstart||b.strstart>=c)&&(b.lookahead=b.strstart-c,b.strstart=c,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-X&&(k(b,!1),0===b.strm.avail_out))return T}return b.insert=0,d===G?(k(b,!0),0===b.strm.avail_out?ba:Y):(b.strstart>b.block_start&&k(b,!1),T)}),new q(4,4,8,
4,r),new q(4,5,16,8,r),new q(4,6,32,32,r),new q(4,4,16,16,s),new q(8,16,32,32,s),new q(8,16,128,128,s),new q(8,32,128,256,s),new q(32,128,258,1024,s),new q(32,258,258,4096,s)];d.deflateInit=function(b,d){return z(b,d,Q,15,8,0)};d.deflateInit2=z;d.deflateReset=v;d.deflateResetKeep=u;d.deflateSetHeader=function(b,d){return b&&b.state?2!==b.state.wrap?J:(b.state.gzhead=d,H):J};d.deflate=function(d,c){var f,n,q,t;if(!d||!d.state||5<c||0>c)return d?b(d,J):J;if(n=d.state,!d.output||!d.input&&0!==d.avail_in||
-666===n.status&&c!==F)return b(d,0===d.avail_out?-5:J);if(n.strm=d,f=n.last_flush,n.last_flush=c,n.status===da)2===n.wrap?(d.adler=0,l(n,31),l(n,139),l(n,8),n.gzhead?(l(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),l(n,255&n.gzhead.time),l(n,n.gzhead.time>>8&255),l(n,n.gzhead.time>>16&255),l(n,n.gzhead.time>>24&255),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(l(n,255&n.gzhead.extra.length),
+666===n.status&&c!==G)return b(d,0===d.avail_out?-5:J);if(n.strm=d,f=n.last_flush,n.last_flush=c,n.status===da)2===n.wrap?(d.adler=0,l(n,31),l(n,139),l(n,8),n.gzhead?(l(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),l(n,255&n.gzhead.time),l(n,n.gzhead.time>>8&255),l(n,n.gzhead.time>>16&255),l(n,n.gzhead.time>>24&255),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(l(n,255&n.gzhead.extra.length),
l(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(d.adler=B(d.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(l(n,0),l(n,0),l(n,0),l(n,0),l(n,0),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,3),n.status=ca)):(q=Q+(n.w_bits-8<<4)<<8,t=2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3,q|=t<<6,0!==n.strstart&&(q|=32),n.status=ca,m(n,q+(31-q%31)),0!==n.strstart&&(m(n,d.adler>>>16),m(n,65535&d.adler)),d.adler=1);if(69===n.status)if(n.gzhead.extra){for(q=n.pending;n.gzindex<(65535&
n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>q&&(d.adler=B(d.adler,n.pending_buf,n.pending-q,q)),g(d),q=n.pending,n.pending!==n.pending_buf_size));)l(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>q&&(d.adler=B(d.adler,n.pending_buf,n.pending-q,q));n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&
(d.adler=B(d.adler,n.pending_buf,n.pending-q,q)),g(d),q=n.pending,n.pending===n.pending_buf_size)){t=1;break}t=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0;l(n,t)}while(0!==t);n.gzhead.hcrc&&n.pending>q&&(d.adler=B(d.adler,n.pending_buf,n.pending-q,q));0===t&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(d.adler=B(d.adler,n.pending_buf,n.pending-q,q)),g(d),
q=n.pending,n.pending===n.pending_buf_size)){t=1;break}t=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0;l(n,t)}while(0!==t);n.gzhead.hcrc&&n.pending>q&&(d.adler=B(d.adler,n.pending_buf,n.pending-q,q));0===t&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&g(d),n.pending+2<=n.pending_buf_size&&(l(n,255&d.adler),l(n,d.adler>>8&255),d.adler=0,n.status=ca)):n.status=ca),0!==n.pending){if(g(d),0===d.avail_out)return n.last_flush=
--1,H}else if(0===d.avail_in&&(c<<1)-(4<c?9:0)<=(f<<1)-(4<f?9:0)&&c!==F)return b(d,-5);if(666===n.status&&0!==d.avail_in)return b(d,-5);if(0!==d.avail_in||0!==n.lookahead||c!==G&&666!==n.status){var u;if(2===n.strategy)a:{for(var r;;){if(0===n.lookahead&&(p(n),0===n.lookahead)){if(c===G){u=T;break a}break}if(n.match_length=0,r=D._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,r&&(k(n,!1),0===n.strm.avail_out)){u=T;break a}}u=(n.insert=0,c===F?(k(n,!0),0===n.strm.avail_out?ba:Y):n.last_lit&&
-(k(n,!1),0===n.strm.avail_out)?T:Z)}else if(3===n.strategy)a:{var v,s;for(r=n.window;;){if(n.lookahead<=R){if(p(n),n.lookahead<=R&&c===G){u=T;break a}if(0===n.lookahead)break}if(n.match_length=0,n.lookahead>=K&&0<n.strstart&&(s=n.strstart-1,v=r[s],v===r[++s]&&v===r[++s]&&v===r[++s])){f=n.strstart+R;do;while(v===r[++s]&&v===r[++s]&&v===r[++s]&&v===r[++s]&&v===r[++s]&&v===r[++s]&&v===r[++s]&&v===r[++s]&&s<f);n.match_length=R-(f-s);n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=
-K?(u=D._tr_tally(n,1,n.match_length-K),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(u=D._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),u&&(k(n,!1),0===n.strm.avail_out)){u=T;break a}}u=(n.insert=0,c===F?(k(n,!0),0===n.strm.avail_out?ba:Y):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?T:Z)}else u=y[n.level].func(n,c);if(u!==ba&&u!==Y||(n.status=666),u===T||u===ba)return 0===d.avail_out&&(n.last_flush=-1),H;if(u===Z&&(1===c?D._tr_align(n):5!==c&&(D._tr_stored_block(n,
-0,0,!1),3===c&&(e(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),g(d),0===d.avail_out))return n.last_flush=-1,H}return c!==F?H:0>=n.wrap?1:(2===n.wrap?(l(n,255&d.adler),l(n,d.adler>>8&255),l(n,d.adler>>16&255),l(n,d.adler>>24&255),l(n,255&d.total_in),l(n,d.total_in>>8&255),l(n,d.total_in>>16&255),l(n,d.total_in>>24&255)):(m(n,d.adler>>>16),m(n,65535&d.adler)),g(d),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?H:1)};d.deflateEnd=function(d){var e;return d&&d.state?(e=d.state.status,
+-1,H}else if(0===d.avail_in&&(c<<1)-(4<c?9:0)<=(f<<1)-(4<f?9:0)&&c!==G)return b(d,-5);if(666===n.status&&0!==d.avail_in)return b(d,-5);if(0!==d.avail_in||0!==n.lookahead||c!==F&&666!==n.status){var u;if(2===n.strategy)a:{for(var r;;){if(0===n.lookahead&&(p(n),0===n.lookahead)){if(c===F){u=T;break a}break}if(n.match_length=0,r=D._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,r&&(k(n,!1),0===n.strm.avail_out)){u=T;break a}}u=(n.insert=0,c===G?(k(n,!0),0===n.strm.avail_out?ba:Y):n.last_lit&&
+(k(n,!1),0===n.strm.avail_out)?T:Z)}else if(3===n.strategy)a:{var v,s;for(r=n.window;;){if(n.lookahead<=R){if(p(n),n.lookahead<=R&&c===F){u=T;break a}if(0===n.lookahead)break}if(n.match_length=0,n.lookahead>=K&&0<n.strstart&&(s=n.strstart-1,v=r[s],v===r[++s]&&v===r[++s]&&v===r[++s])){f=n.strstart+R;do;while(v===r[++s]&&v===r[++s]&&v===r[++s]&&v===r[++s]&&v===r[++s]&&v===r[++s]&&v===r[++s]&&v===r[++s]&&s<f);n.match_length=R-(f-s);n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=
+K?(u=D._tr_tally(n,1,n.match_length-K),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(u=D._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),u&&(k(n,!1),0===n.strm.avail_out)){u=T;break a}}u=(n.insert=0,c===G?(k(n,!0),0===n.strm.avail_out?ba:Y):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?T:Z)}else u=y[n.level].func(n,c);if(u!==ba&&u!==Y||(n.status=666),u===T||u===ba)return 0===d.avail_out&&(n.last_flush=-1),H;if(u===Z&&(1===c?D._tr_align(n):5!==c&&(D._tr_stored_block(n,
+0,0,!1),3===c&&(e(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),g(d),0===d.avail_out))return n.last_flush=-1,H}return c!==G?H:0>=n.wrap?1:(2===n.wrap?(l(n,255&d.adler),l(n,d.adler>>8&255),l(n,d.adler>>16&255),l(n,d.adler>>24&255),l(n,255&d.total_in),l(n,d.total_in>>8&255),l(n,d.total_in>>16&255),l(n,d.total_in>>24&255)):(m(n,d.adler>>>16),m(n,65535&d.adler)),g(d),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?H:1)};d.deflateEnd=function(d){var e;return d&&d.state?(e=d.state.status,
e!==da&&69!==e&&73!==e&&91!==e&&103!==e&&e!==ca&&666!==e?b(d,J):(d.state=null,e===ca?b(d,-3):H)):J};d.deflateSetDictionary=function(b,d){var c,f,g,k,l,m,n;f=d.length;if(!b||!b.state||(c=b.state,k=c.wrap,2===k||1===k&&c.status!==da||c.lookahead))return J;1===k&&(b.adler=A(b.adler,d,f,0));c.wrap=0;f>=c.w_size&&(0===k&&(e(c.head),c.strstart=0,c.block_start=0,c.insert=0),l=new x.Buf8(c.w_size),x.arraySet(l,d,f-c.w_size,c.w_size,0),d=l,f=c.w_size);l=b.avail_in;m=b.next_in;n=b.input;b.avail_in=f;b.next_in=
0;b.input=d;for(p(c);c.lookahead>=K;){f=c.strstart;g=c.lookahead-(K-1);do c.ins_h=(c.ins_h<<c.hash_shift^c.window[f+K-1])&c.hash_mask,c.prev[f&c.w_mask]=c.head[c.ins_h],c.head[c.ins_h]=f,f++;while(--g);c.strstart=f;c.lookahead=K-1;p(c)}return c.strstart+=c.lookahead,c.block_start=c.strstart,c.insert=c.lookahead,c.lookahead=0,c.match_length=c.prev_length=K-1,c.match_available=0,b.next_in=m,b.input=n,b.avail_in=l,c.wrap=k,H};d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,
-"./crc32":7,"./messages":13,"./trees":14}],9:[function(c,f,d){f.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},{}],10:[function(c,f,d){f.exports=function(b,d){var c,f,l,m,n,p,r,s,q,t,u,v,z,y,x,D,A,B,E,G,F,H,J,L;c=b.state;f=b.next_in;J=b.input;l=f+(b.avail_in-5);m=b.next_out;L=b.output;n=m-(d-b.avail_out);p=m+(b.avail_out-257);r=c.dmax;s=c.wsize;q=c.whave;t=c.wnext;u=c.window;v=c.hold;z=c.bits;y=c.lencode;
-x=c.distcode;D=(1<<c.lenbits)-1;A=(1<<c.distbits)-1;a:do{15>z&&(v+=J[f++]<<z,z+=8,v+=J[f++]<<z,z+=8);B=y[v&D];b:for(;;){if(E=B>>>24,v>>>=E,z-=E,E=B>>>16&255,0===E)L[m++]=65535&B;else{if(!(16&E)){if(0===(64&E)){B=y[(65535&B)+(v&(1<<E)-1)];continue b}if(32&E){c.mode=12;break a}b.msg="invalid literal/length code";c.mode=30;break a}G=65535&B;(E&=15)&&(z<E&&(v+=J[f++]<<z,z+=8),G+=v&(1<<E)-1,v>>>=E,z-=E);15>z&&(v+=J[f++]<<z,z+=8,v+=J[f++]<<z,z+=8);B=x[v&A];c:for(;;){if(E=B>>>24,v>>>=E,z-=E,E=B>>>16&255,
-!(16&E)){if(0===(64&E)){B=x[(65535&B)+(v&(1<<E)-1)];continue c}b.msg="invalid distance code";c.mode=30;break a}if(F=65535&B,E&=15,z<E&&(v+=J[f++]<<z,z+=8,z<E&&(v+=J[f++]<<z,z+=8)),F+=v&(1<<E)-1,F>r){b.msg="invalid distance too far back";c.mode=30;break a}if(v>>>=E,z-=E,E=m-n,F>E){if(E=F-E,E>q&&c.sane){b.msg="invalid distance too far back";c.mode=30;break a}if(B=0,H=u,0===t){if(B+=s-E,E<G){G-=E;do L[m++]=u[B++];while(--E);B=m-F;H=L}}else if(t<E){if(B+=s+t-E,E-=t,E<G){G-=E;do L[m++]=u[B++];while(--E);
-if(B=0,t<G){E=t;G-=E;do L[m++]=u[B++];while(--E);B=m-F;H=L}}}else if(B+=t-E,E<G){G-=E;do L[m++]=u[B++];while(--E);B=m-F;H=L}for(;2<G;)L[m++]=H[B++],L[m++]=H[B++],L[m++]=H[B++],G-=3;G&&(L[m++]=H[B++],1<G&&(L[m++]=H[B++]))}else{B=m-F;do L[m++]=L[B++],L[m++]=L[B++],L[m++]=L[B++],G-=3;while(2<G);G&&(L[m++]=L[B++],1<G&&(L[m++]=L[B++]))}break}}break}}while(f<l&&m<p);G=z>>3;f-=G;z-=G<<3;b.next_in=f;b.next_out=m;b.avail_in=f<l?5+(l-f):5-(f-l);b.avail_out=m<p?257+(p-m):257-(m-p);c.hold=v&(1<<z)-1;c.bits=z}},
+"./crc32":7,"./messages":13,"./trees":14}],9:[function(c,f,d){f.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},{}],10:[function(c,f,d){f.exports=function(b,d){var c,f,l,m,n,p,r,s,q,t,u,v,z,y,x,D,A,B,E,F,G,H,J,L;c=b.state;f=b.next_in;J=b.input;l=f+(b.avail_in-5);m=b.next_out;L=b.output;n=m-(d-b.avail_out);p=m+(b.avail_out-257);r=c.dmax;s=c.wsize;q=c.whave;t=c.wnext;u=c.window;v=c.hold;z=c.bits;y=c.lencode;
+x=c.distcode;D=(1<<c.lenbits)-1;A=(1<<c.distbits)-1;a:do{15>z&&(v+=J[f++]<<z,z+=8,v+=J[f++]<<z,z+=8);B=y[v&D];b:for(;;){if(E=B>>>24,v>>>=E,z-=E,E=B>>>16&255,0===E)L[m++]=65535&B;else{if(!(16&E)){if(0===(64&E)){B=y[(65535&B)+(v&(1<<E)-1)];continue b}if(32&E){c.mode=12;break a}b.msg="invalid literal/length code";c.mode=30;break a}F=65535&B;(E&=15)&&(z<E&&(v+=J[f++]<<z,z+=8),F+=v&(1<<E)-1,v>>>=E,z-=E);15>z&&(v+=J[f++]<<z,z+=8,v+=J[f++]<<z,z+=8);B=x[v&A];c:for(;;){if(E=B>>>24,v>>>=E,z-=E,E=B>>>16&255,
+!(16&E)){if(0===(64&E)){B=x[(65535&B)+(v&(1<<E)-1)];continue c}b.msg="invalid distance code";c.mode=30;break a}if(G=65535&B,E&=15,z<E&&(v+=J[f++]<<z,z+=8,z<E&&(v+=J[f++]<<z,z+=8)),G+=v&(1<<E)-1,G>r){b.msg="invalid distance too far back";c.mode=30;break a}if(v>>>=E,z-=E,E=m-n,G>E){if(E=G-E,E>q&&c.sane){b.msg="invalid distance too far back";c.mode=30;break a}if(B=0,H=u,0===t){if(B+=s-E,E<F){F-=E;do L[m++]=u[B++];while(--E);B=m-G;H=L}}else if(t<E){if(B+=s+t-E,E-=t,E<F){F-=E;do L[m++]=u[B++];while(--E);
+if(B=0,t<F){E=t;F-=E;do L[m++]=u[B++];while(--E);B=m-G;H=L}}}else if(B+=t-E,E<F){F-=E;do L[m++]=u[B++];while(--E);B=m-G;H=L}for(;2<F;)L[m++]=H[B++],L[m++]=H[B++],L[m++]=H[B++],F-=3;F&&(L[m++]=H[B++],1<F&&(L[m++]=H[B++]))}else{B=m-G;do L[m++]=L[B++],L[m++]=L[B++],L[m++]=L[B++],F-=3;while(2<F);F&&(L[m++]=L[B++],1<F&&(L[m++]=L[B++]))}break}}break}}while(f<l&&m<p);F=z>>3;f-=F;z-=F<<3;b.next_in=f;b.next_out=m;b.avail_in=f<l?5+(l-f):5-(f-l);b.avail_out=m<p?257+(p-m):257-(m-p);c.hold=v&(1<<z)-1;c.bits=z}},
{}],11:[function(c,f,d){function b(b){return(b>>>24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function e(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new s.Buf16(320);this.work=
new s.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function g(b){var d;return b&&b.state?(d=b.state,b.total_in=b.total_out=d.total=0,b.msg="",d.wrap&&(b.adler=1&d.wrap),d.mode=x,d.last=0,d.havedict=0,d.dmax=32768,d.head=null,d.hold=0,d.bits=0,d.lencode=d.lendyn=new s.Buf32(D),d.distcode=d.distdyn=new s.Buf32(A),d.sane=1,d.back=-1,z):y}function k(b){var d;return b&&b.state?(d=b.state,d.wsize=0,d.whave=0,d.wnext=0,g(b)):y}function l(b,d){var e,c;return b&&b.state?(c=b.state,
0>d?(e=0,d=-d):(e=(d>>4)+1,48>d&&(d&=15)),d&&(8>d||15<d)?y:(null!==c.window&&c.wbits!==d&&(c.window=null),c.wrap=e,c.wbits=d,k(b))):y}function m(b,d){var c,f;return b?(f=new e,b.state=f,f.window=null,c=l(b,d),c!==z&&(b.state=null),c):y}function n(b,d,e,c){var f;b=b.state;return null===b.window&&(b.wsize=1<<b.wbits,b.wnext=0,b.whave=0,b.window=new s.Buf8(b.wsize)),c>=b.wsize?(s.arraySet(b.window,d,e-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>c&&(f=c),s.arraySet(b.window,d,e-
@@ -168,21 +168,21 @@ m--;A+=f[k++]<<C;C+=8}c.offset+=A&(1<<c.extra)-1;A>>>=c.extra;C-=c.extra;c.back+
29;case 29:Z=1;break a;case 30:Z=-3;break a;case 31:return-4;default:return y}return d.next_out=l,d.avail_out=D,d.next_in=k,d.avail_in=m,c.hold=A,c.bits=C,(c.wsize||P!==d.avail_out&&30>c.mode&&(27>c.mode||4!==e))&&n(d,d.output,d.next_out,P-d.avail_out)?(c.mode=31,-4):(O-=d.avail_in,P-=d.avail_out,d.total_in+=O,d.total_out+=P,c.total+=P,c.wrap&&P&&(d.adler=c.check=c.flags?t(c.check,g,P,d.next_out-P):q(c.check,g,P,d.next_out-P)),d.data_type=c.bits+(c.last?64:0)+(12===c.mode?128:0)+(20===c.mode||15===
c.mode?256:0),(0===O&&0===P||4===e)&&Z===z&&(Z=-5),Z)};d.inflateEnd=function(b){if(!b||!b.state)return y;var d=b.state;return d.window&&(d.window=null),b.state=null,z};d.inflateGetHeader=function(b,d){var e;return b&&b.state?(e=b.state,0===(2&e.wrap)?y:(e.head=d,d.done=!1,z)):y};d.inflateSetDictionary=function(b,d){var e,c,f=d.length;return b&&b.state?(e=b.state,0!==e.wrap&&11!==e.mode?y:11===e.mode&&(c=1,c=q(c,d,f,0),c!==e.check)?-3:n(b,d,f,f)?(e.mode=31,-4):(e.havedict=1,z)):y};d.inflateInfo="pako inflate (from Nodeca project)"},
{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(c,f,d){var b=c("../utils/common"),e=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],k=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],l=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,
-25,25,26,26,27,27,28,28,29,29,64,64];f.exports=function(d,c,f,r,s,q,t,u){var v,z,y,x,D,A,B,E;x=u.bits;for(var G=0,F=0,H=0,J=0,L=0,N=0,S=0,W=0,Q=0,C=null,O=0,P=new b.Buf16(16),N=new b.Buf16(16),M=null,V=0,G=0;15>=G;G++)P[G]=0;for(F=0;F<r;F++)P[c[f+F]]++;L=x;for(J=15;1<=J&&0===P[J];J--);if(L>J&&(L=J),0===J)return s[q++]=20971520,s[q++]=20971520,u.bits=1,0;for(H=1;H<J&&0===P[H];H++);L<H&&(L=H);for(G=v=1;15>=G;G++)if(v<<=1,v-=P[G],0>v)return-1;if(0<v&&(0===d||1!==J))return-1;N[1]=0;for(G=1;15>G;G++)N[G+
-1]=N[G]+P[G];for(F=0;F<r;F++)0!==c[f+F]&&(t[N[c[f+F]]++]=F);if(0===d?(C=M=t,D=19):1===d?(C=e,O-=257,M=g,V-=257,D=256):(C=k,M=l,D=-1),Q=0,F=0,G=H,x=q,N=L,S=0,y=-1,W=1<<L,r=W-1,1===d&&852<W||2===d&&592<W)return 1;for(var I=0;;){I++;A=G-S;t[F]<D?(B=0,E=t[F]):t[F]>D?(B=M[V+t[F]],E=C[O+t[F]]):(B=96,E=0);v=1<<G-S;H=z=1<<N;do z-=v,s[x+(Q>>S)+z]=A<<24|B<<16|E|0;while(0!==z);for(v=1<<G-1;Q&v;)v>>=1;if(0!==v?(Q&=v-1,Q+=v):Q=0,F++,0===--P[G]){if(G===J)break;G=c[f+t[F]]}if(G>L&&(Q&r)!==y){0===S&&(S=L);x+=H;N=
-G-S;for(v=1<<N;N+S<J&&(v-=P[N+S],!(0>=v));)N++,v<<=1;if(W+=1<<N,1===d&&852<W||2===d&&592<W)return 1;y=Q&r;s[y]=L<<24|N<<16|x-q|0}}return 0!==Q&&(s[x+Q]=G-S<<24|4194304),u.bits=L,0}},{"../utils/common":3}],13:[function(c,f,d){f.exports={2:"need dictionary",1:"stream end","0":"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(c,f,d){function b(b){for(var d=b.length;0<=--d;)b[d]=0}function e(b,d,e,c,
+25,25,26,26,27,27,28,28,29,29,64,64];f.exports=function(d,c,f,r,s,q,t,u){var v,z,y,x,D,A,B,E;x=u.bits;for(var F=0,G=0,H=0,J=0,L=0,N=0,S=0,W=0,Q=0,C=null,O=0,P=new b.Buf16(16),N=new b.Buf16(16),M=null,V=0,F=0;15>=F;F++)P[F]=0;for(G=0;G<r;G++)P[c[f+G]]++;L=x;for(J=15;1<=J&&0===P[J];J--);if(L>J&&(L=J),0===J)return s[q++]=20971520,s[q++]=20971520,u.bits=1,0;for(H=1;H<J&&0===P[H];H++);L<H&&(L=H);for(F=v=1;15>=F;F++)if(v<<=1,v-=P[F],0>v)return-1;if(0<v&&(0===d||1!==J))return-1;N[1]=0;for(F=1;15>F;F++)N[F+
+1]=N[F]+P[F];for(G=0;G<r;G++)0!==c[f+G]&&(t[N[c[f+G]]++]=G);if(0===d?(C=M=t,D=19):1===d?(C=e,O-=257,M=g,V-=257,D=256):(C=k,M=l,D=-1),Q=0,G=0,F=H,x=q,N=L,S=0,y=-1,W=1<<L,r=W-1,1===d&&852<W||2===d&&592<W)return 1;for(var I=0;;){I++;A=F-S;t[G]<D?(B=0,E=t[G]):t[G]>D?(B=M[V+t[G]],E=C[O+t[G]]):(B=96,E=0);v=1<<F-S;H=z=1<<N;do z-=v,s[x+(Q>>S)+z]=A<<24|B<<16|E|0;while(0!==z);for(v=1<<F-1;Q&v;)v>>=1;if(0!==v?(Q&=v-1,Q+=v):Q=0,G++,0===--P[F]){if(F===J)break;F=c[f+t[G]]}if(F>L&&(Q&r)!==y){0===S&&(S=L);x+=H;N=
+F-S;for(v=1<<N;N+S<J&&(v-=P[N+S],!(0>=v));)N++,v<<=1;if(W+=1<<N,1===d&&852<W||2===d&&592<W)return 1;y=Q&r;s[y]=L<<24|N<<16|x-q|0}}return 0!==Q&&(s[x+Q]=F-S<<24|4194304),u.bits=L,0}},{"../utils/common":3}],13:[function(c,f,d){f.exports={2:"need dictionary",1:"stream end","0":"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(c,f,d){function b(b){for(var d=b.length;0<=--d;)b[d]=0}function e(b,d,e,c,
f){this.static_tree=b;this.extra_bits=d;this.extra_base=e;this.elems=c;this.max_length=f;this.has_stree=b&&b.length}function g(b,d){this.dyn_tree=b;this.max_code=0;this.stat_desc=d}function k(b,d){b.pending_buf[b.pending++]=255&d;b.pending_buf[b.pending++]=d>>>8&255}function l(b,d,e){b.bi_valid>W-e?(b.bi_buf|=d<<b.bi_valid&65535,k(b,b.bi_buf),b.bi_buf=d>>W-b.bi_valid,b.bi_valid+=e-W):(b.bi_buf|=d<<b.bi_valid&65535,b.bi_valid+=e)}function m(b,d,e){l(b,e[2*d],e[2*d+1])}function n(b,d){var e=0;do e|=
1&b,b>>>=1,e<<=1;while(0<--d);return e>>>1}function p(b,d,e){var c,f=Array(S+1),g=0;for(c=1;c<=S;c++)f[c]=g=g+e[c-1]<<1;for(e=0;e<=d;e++)c=b[2*e+1],0!==c&&(b[2*e]=n(f[c]++,c))}function r(b){var d;for(d=0;d<H;d++)b.dyn_ltree[2*d]=0;for(d=0;d<J;d++)b.dyn_dtree[2*d]=0;for(d=0;d<L;d++)b.bl_tree[2*d]=0;b.dyn_ltree[2*Q]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function s(b){8<b.bi_valid?k(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf);b.bi_buf=0;b.bi_valid=0}function q(b,d,e,c){var f=
-2*d,g=2*e;return b[f]<b[g]||b[f]===b[g]&&c[d]<=c[e]}function t(b,d,e){for(var c=b.heap[e],f=e<<1;f<=b.heap_len&&(f<b.heap_len&&q(d,b.heap[f+1],b.heap[f],b.depth)&&f++,!q(d,c,b.heap[f],b.depth));)b.heap[e]=b.heap[f],e=f,f<<=1;b.heap[e]=c}function u(b,d,e){var c,f,g,k,n=0;if(0!==b.last_lit){do c=b.pending_buf[b.d_buf+2*n]<<8|b.pending_buf[b.d_buf+2*n+1],f=b.pending_buf[b.l_buf+n],n++,0===c?m(b,f,d):(g=ca[f],m(b,g+F+1,d),k=M[g],0!==k&&(f-=T[g],l(b,f,k)),c--,g=256>c?da[c]:da[256+(c>>>7)],m(b,g,e),k=V[g],
+2*d,g=2*e;return b[f]<b[g]||b[f]===b[g]&&c[d]<=c[e]}function t(b,d,e){for(var c=b.heap[e],f=e<<1;f<=b.heap_len&&(f<b.heap_len&&q(d,b.heap[f+1],b.heap[f],b.depth)&&f++,!q(d,c,b.heap[f],b.depth));)b.heap[e]=b.heap[f],e=f,f<<=1;b.heap[e]=c}function u(b,d,e){var c,f,g,k,n=0;if(0!==b.last_lit){do c=b.pending_buf[b.d_buf+2*n]<<8|b.pending_buf[b.d_buf+2*n+1],f=b.pending_buf[b.l_buf+n],n++,0===c?m(b,f,d):(g=ca[f],m(b,g+G+1,d),k=M[g],0!==k&&(f-=T[g],l(b,f,k)),c--,g=256>c?da[c]:da[256+(c>>>7)],m(b,g,e),k=V[g],
0!==k&&(c-=Z[g],l(b,c,k)));while(n<b.last_lit)}m(b,Q,d)}function v(b,d){var e,c,f,g=d.dyn_tree;c=d.stat_desc.static_tree;var k=d.stat_desc.has_stree,l=d.stat_desc.elems,m=-1;b.heap_len=0;b.heap_max=N;for(e=0;e<l;e++)0!==g[2*e]?(b.heap[++b.heap_len]=m=e,b.depth[e]=0):g[2*e+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>m?++m:0,g[2*f]=1,b.depth[f]=0,b.opt_len--,k&&(b.static_len-=c[2*f+1]);d.max_code=m;for(e=b.heap_len>>1;1<=e;e--)t(b,g,e);f=l;do e=b.heap[1],b.heap[1]=b.heap[b.heap_len--],t(b,g,1),
c=b.heap[1],b.heap[--b.heap_max]=e,b.heap[--b.heap_max]=c,g[2*f]=g[2*e]+g[2*c],b.depth[f]=(b.depth[e]>=b.depth[c]?b.depth[e]:b.depth[c])+1,g[2*e+1]=g[2*c+1]=f,b.heap[1]=f++,t(b,g,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var n,q,k=d.dyn_tree,l=d.max_code,u=d.stat_desc.static_tree,r=d.stat_desc.has_stree,v=d.stat_desc.extra_bits,s=d.stat_desc.extra_base,x=d.stat_desc.max_length,y=0;for(c=0;c<=S;c++)b.bl_count[c]=0;k[2*b.heap[b.heap_max]+1]=0;for(e=b.heap_max+1;e<N;e++)f=b.heap[e],c=k[2*
k[2*f+1]+1]+1,c>x&&(c=x,y++),k[2*f+1]=c,f>l||(b.bl_count[c]++,n=0,f>=s&&(n=v[f-s]),q=k[2*f],b.opt_len+=q*(c+n),r&&(b.static_len+=q*(u[2*f+1]+n)));if(0!==y){do{for(c=x-1;0===b.bl_count[c];)c--;b.bl_count[c]--;b.bl_count[c+1]+=2;b.bl_count[x]--;y-=2}while(0<y);for(c=x;0!==c;c--)for(f=b.bl_count[c];0!==f;)n=b.heap[--e],n>l||(k[2*n+1]!==c&&(b.opt_len+=(c-k[2*n+1])*k[2*n],k[2*n+1]=c),f--)}p(g,m,b.bl_count)}function z(b,d,e){var c,f,g=-1,k=d[1],l=0,m=7,n=4;0===k&&(m=138,n=3);d[2*(e+1)+1]=65535;for(c=0;c<=
e;c++)f=k,k=d[2*(c+1)+1],++l<m&&f===k||(l<n?b.bl_tree[2*f]+=l:0!==f?(f!==g&&b.bl_tree[2*f]++,b.bl_tree[2*C]++):10>=l?b.bl_tree[2*O]++:b.bl_tree[2*P]++,l=0,g=f,0===k?(m=138,n=3):f===k?(m=6,n=3):(m=7,n=4))}function y(b,d,e){var c,f,g=-1,k=d[1],n=0,q=7,p=4;0===k&&(q=138,p=3);for(c=0;c<=e;c++)if(f=k,k=d[2*(c+1)+1],!(++n<q&&f===k)){if(n<p){do m(b,f,b.bl_tree);while(0!==--n)}else 0!==f?(f!==g&&(m(b,f,b.bl_tree),n--),m(b,C,b.bl_tree),l(b,n-3,2)):10>=n?(m(b,O,b.bl_tree),l(b,n-3,3)):(m(b,P,b.bl_tree),l(b,
-n-11,7));n=0;g=f;0===k?(q=138,p=3):f===k?(q=6,p=3):(q=7,p=4)}}function x(b){var d,e=4093624447;for(d=0;31>=d;d++,e>>>=1)if(1&e&&0!==b.dyn_ltree[2*d])return B;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return E;for(d=32;d<F;d++)if(0!==b.dyn_ltree[2*d])return E;return B}function D(b,d,e,c){l(b,(G<<1)+(c?1:0),3);s(b);k(b,e);k(b,~e);A.arraySet(b.pending_buf,b.window,d,e,b.pending);b.pending+=e}var A=c("../utils/common"),B=0,E=1,G=0,F=256,H=F+1+29,J=30,L=19,N=2*H+1,S=15,W=16,Q=256,
+n-11,7));n=0;g=f;0===k?(q=138,p=3):f===k?(q=6,p=3):(q=7,p=4)}}function x(b){var d,e=4093624447;for(d=0;31>=d;d++,e>>>=1)if(1&e&&0!==b.dyn_ltree[2*d])return B;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return E;for(d=32;d<G;d++)if(0!==b.dyn_ltree[2*d])return E;return B}function D(b,d,e,c){l(b,(F<<1)+(c?1:0),3);s(b);k(b,e);k(b,~e);A.arraySet(b.pending_buf,b.window,d,e,b.pending);b.pending+=e}var A=c("../utils/common"),B=0,E=1,F=0,G=256,H=G+1+29,J=30,L=19,N=2*H+1,S=15,W=16,Q=256,
C=16,O=17,P=18,M=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],V=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],I=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],K=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],R=Array(2*(H+2));b(R);var X=Array(2*J);b(X);var da=Array(512);b(da);var ca=Array(256);b(ca);var T=Array(29);b(T);var Z=Array(J);b(Z);var ba,Y,U,ia=!1;d._tr_init=function(b){if(!ia){var d,c,f,k=Array(S+1);for(f=c=0;28>f;f++){T[f]=c;for(d=0;d<1<<M[f];d++)ca[c++]=
-f}ca[c-1]=f;for(f=c=0;16>f;f++){Z[f]=c;for(d=0;d<1<<V[f];d++)da[c++]=f}for(c>>=7;f<J;f++){Z[f]=c<<7;for(d=0;d<1<<V[f]-7;d++)da[256+c++]=f}for(d=0;d<=S;d++)k[d]=0;for(d=0;143>=d;)R[2*d+1]=8,d++,k[8]++;for(;255>=d;)R[2*d+1]=9,d++,k[9]++;for(;279>=d;)R[2*d+1]=7,d++,k[7]++;for(;287>=d;)R[2*d+1]=8,d++,k[8]++;p(R,H+1,k);for(d=0;d<J;d++)X[2*d+1]=5,X[2*d]=n(d,5);ba=new e(R,M,F+1,H,S);Y=new e(X,V,0,J,S);U=new e([],I,0,L,7);ia=!0}b.l_desc=new g(b.dyn_ltree,ba);b.d_desc=new g(b.dyn_dtree,Y);b.bl_desc=new g(b.bl_tree,
+f}ca[c-1]=f;for(f=c=0;16>f;f++){Z[f]=c;for(d=0;d<1<<V[f];d++)da[c++]=f}for(c>>=7;f<J;f++){Z[f]=c<<7;for(d=0;d<1<<V[f]-7;d++)da[256+c++]=f}for(d=0;d<=S;d++)k[d]=0;for(d=0;143>=d;)R[2*d+1]=8,d++,k[8]++;for(;255>=d;)R[2*d+1]=9,d++,k[9]++;for(;279>=d;)R[2*d+1]=7,d++,k[7]++;for(;287>=d;)R[2*d+1]=8,d++,k[8]++;p(R,H+1,k);for(d=0;d<J;d++)X[2*d+1]=5,X[2*d]=n(d,5);ba=new e(R,M,G+1,H,S);Y=new e(X,V,0,J,S);U=new e([],I,0,L,7);ia=!0}b.l_desc=new g(b.dyn_ltree,ba);b.d_desc=new g(b.dyn_dtree,Y);b.bl_desc=new g(b.bl_tree,
U);b.bi_buf=0;b.bi_valid=0;r(b)};d._tr_stored_block=D;d._tr_flush_block=function(b,d,e,c){var f,g,k=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=x(b));v(b,b.l_desc);v(b,b.d_desc);z(b,b.dyn_ltree,b.l_desc.max_code);z(b,b.dyn_dtree,b.d_desc.max_code);v(b,b.bl_desc);for(k=L-1;3<=k&&0===b.bl_tree[2*K[k]+1];k--);k=(b.opt_len+=3*(k+1)+14,k);f=b.opt_len+3+7>>>3;g=b.static_len+3+7>>>3;g<=f&&(f=g)}else f=g=e+5;if(e+4<=f&&-1!==d)D(b,d,e,c);else if(4===b.strategy||g===f)l(b,2+(c?1:0),3),u(b,R,X);
-else{l(b,4+(c?1:0),3);d=b.l_desc.max_code+1;e=b.d_desc.max_code+1;k+=1;l(b,d-257,5);l(b,e-1,5);l(b,k-4,4);for(f=0;f<k;f++)l(b,b.bl_tree[2*K[f]+1],3);y(b,b.dyn_ltree,d-1);y(b,b.dyn_dtree,e-1);u(b,b.dyn_ltree,b.dyn_dtree)}r(b);c&&s(b)};d._tr_tally=function(b,d,e){return b.pending_buf[b.d_buf+2*b.last_lit]=d>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&d,b.pending_buf[b.l_buf+b.last_lit]=255&e,b.last_lit++,0===d?b.dyn_ltree[2*e]++:(b.matches++,d--,b.dyn_ltree[2*(ca[e]+F+1)]++,b.dyn_dtree[2*(256>
+else{l(b,4+(c?1:0),3);d=b.l_desc.max_code+1;e=b.d_desc.max_code+1;k+=1;l(b,d-257,5);l(b,e-1,5);l(b,k-4,4);for(f=0;f<k;f++)l(b,b.bl_tree[2*K[f]+1],3);y(b,b.dyn_ltree,d-1);y(b,b.dyn_dtree,e-1);u(b,b.dyn_ltree,b.dyn_dtree)}r(b);c&&s(b)};d._tr_tally=function(b,d,e){return b.pending_buf[b.d_buf+2*b.last_lit]=d>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&d,b.pending_buf[b.l_buf+b.last_lit]=255&e,b.last_lit++,0===d?b.dyn_ltree[2*e]++:(b.matches++,d--,b.dyn_ltree[2*(ca[e]+G+1)]++,b.dyn_dtree[2*(256>
d?da[d]:da[256+(d>>>7)])]++),b.last_lit===b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);m(b,Q,R);16===b.bi_valid?(k(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":3}],15:[function(c,f,d){f.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],"/":[function(c,
f,d){d=c("./lib/utils/common").assign;var b=c("./lib/deflate"),e=c("./lib/inflate");c=c("./lib/zlib/constants");var g={};d(g,b,e,c);f.exports=g},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")});
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d",encode:function(a,c){var f="",d,b,e,g,k,l,m=0;for(null!=c&&c||(a=Base64._utf8_encode(a));m<a.length;)d=a.charCodeAt(m++),b=a.charCodeAt(m++),e=a.charCodeAt(m++),g=d>>2,d=(d&3)<<4|b>>4,k=(b&15)<<2|e>>6,l=e&63,isNaN(b)?k=l=64:isNaN(e)&&(l=64),f=f+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return f},decode:function(a,c){c=null!=c?c:!1;var f="",d,b,e,g,k,l=0;for(a=
@@ -668,9 +668,9 @@ function mxArrowConnector(a,c,f,d,b,e,g){mxShape.call(this);this.points=a;this.f
mxArrowConnector.prototype.resetStyles=function(){mxShape.prototype.resetStyles.apply(this,arguments);this.arrowSpacing=mxConstants.ARROW_SPACING};mxArrowConnector.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);null!=this.style&&(this.startSize=3*mxUtils.getNumber(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5),this.endSize=3*mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5))};
mxArrowConnector.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBoundingBox.apply(this,arguments);var c=this.getEdgeWidth();this.isMarkerStart()&&(c=Math.max(c,this.getStartArrowWidth()));this.isMarkerEnd()&&(c=Math.max(c,this.getEndArrowWidth()));a.grow((c/2+this.strokewidth)*this.scale)};
mxArrowConnector.prototype.paintEdgeShape=function(a,c){var f=this.strokewidth;this.outline&&(f=Math.max(1,mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth)));for(var d=this.getStartArrowWidth()+f,b=this.getEndArrowWidth()+f,e=this.outline?this.getEdgeWidth()+f:this.getEdgeWidth(),g=this.isOpenEnded(),k=this.isMarkerStart(),l=this.isMarkerEnd(),m=g?0:this.arrowSpacing+f/2,n=this.startSize+f,f=this.endSize+f,p=this.isArrowRounded(),r=c[c.length-1],s=1;s<c.length-1&&c[s].x==
-c[0].x&&c[s].y==c[0].y;)s++;var q=c[s].x-c[0].x,s=c[s].y-c[0].y,t=Math.sqrt(q*q+s*s);if(0!=t){var u=q/t,v,z=u,y=s/t,x,D=y,t=e*y,A=-e*u,B=[];p?a.setLineJoin("round"):2<c.length&&a.setMiterLimit(1.42);a.begin();q=u;s=y;if(k&&!g)this.paintMarker(a,c[0].x,c[0].y,u,y,n,d,e,m,!0);else{v=c[0].x+t/2+m*u;x=c[0].y+A/2+m*y;var E=c[0].x-t/2+m*u,G=c[0].y-A/2+m*y;g?(a.moveTo(v,x),B.push(function(){a.lineTo(E,G)})):(a.moveTo(E,G),a.lineTo(v,x))}for(var F=x=v=0,t=0;t<c.length-2;t++)if(A=mxUtils.relativeCcw(c[t].x,
-c[t].y,c[t+1].x,c[t+1].y,c[t+2].x,c[t+2].y),v=c[t+2].x-c[t+1].x,x=c[t+2].y-c[t+1].y,F=Math.sqrt(v*v+x*x),0!=F&&(z=v/F,D=x/F,tmp=Math.max(Math.sqrt((u*z+y*D+1)/2),0.04),v=u+z,x=y+D,F=Math.sqrt(v*v+x*x),0!=F)){v/=F;x/=F;var F=Math.max(tmp,Math.min(this.strokewidth/200+0.04,0.35)),F=0!=A&&p?Math.max(0.1,F):Math.max(tmp,0.06),H=c[t+1].x+x*e/2/F,J=c[t+1].y-v*e/2/F;x=c[t+1].x-x*e/2/F;v=c[t+1].y+v*e/2/F;0==A||!p?(a.lineTo(H,J),function(b,d){B.push(function(){a.lineTo(b,d)})}(x,v)):-1==A?(A=x+D*e,F=v-z*e,
-a.lineTo(x+y*e,v-u*e),a.quadTo(H,J,A,F),function(b,d){B.push(function(){a.lineTo(b,d)})}(x,v)):(a.lineTo(H,J),function(b,d){var c=H-y*e,f=J+u*e,g=H-D*e,k=J+z*e;B.push(function(){a.quadTo(b,d,c,f)});B.push(function(){a.lineTo(g,k)})}(x,v));u=z;y=D}t=e*D;A=-e*z;if(l&&!g)this.paintMarker(a,r.x,r.y,-u,-y,f,b,e,m,!1);else{a.lineTo(r.x-m*z+t/2,r.y-m*D+A/2);var L=r.x-m*z-t/2,N=r.y-m*D-A/2;g?(a.moveTo(L,N),B.splice(0,0,function(){a.moveTo(L,N)})):a.lineTo(L,N)}for(t=B.length-1;0<=t;t--)B[t]();g?(a.end(),
+c[0].x&&c[s].y==c[0].y;)s++;var q=c[s].x-c[0].x,s=c[s].y-c[0].y,t=Math.sqrt(q*q+s*s);if(0!=t){var u=q/t,v,z=u,y=s/t,x,D=y,t=e*y,A=-e*u,B=[];p?a.setLineJoin("round"):2<c.length&&a.setMiterLimit(1.42);a.begin();q=u;s=y;if(k&&!g)this.paintMarker(a,c[0].x,c[0].y,u,y,n,d,e,m,!0);else{v=c[0].x+t/2+m*u;x=c[0].y+A/2+m*y;var E=c[0].x-t/2+m*u,F=c[0].y-A/2+m*y;g?(a.moveTo(v,x),B.push(function(){a.lineTo(E,F)})):(a.moveTo(E,F),a.lineTo(v,x))}for(var G=x=v=0,t=0;t<c.length-2;t++)if(A=mxUtils.relativeCcw(c[t].x,
+c[t].y,c[t+1].x,c[t+1].y,c[t+2].x,c[t+2].y),v=c[t+2].x-c[t+1].x,x=c[t+2].y-c[t+1].y,G=Math.sqrt(v*v+x*x),0!=G&&(z=v/G,D=x/G,tmp=Math.max(Math.sqrt((u*z+y*D+1)/2),0.04),v=u+z,x=y+D,G=Math.sqrt(v*v+x*x),0!=G)){v/=G;x/=G;var G=Math.max(tmp,Math.min(this.strokewidth/200+0.04,0.35)),G=0!=A&&p?Math.max(0.1,G):Math.max(tmp,0.06),H=c[t+1].x+x*e/2/G,J=c[t+1].y-v*e/2/G;x=c[t+1].x-x*e/2/G;v=c[t+1].y+v*e/2/G;0==A||!p?(a.lineTo(H,J),function(b,d){B.push(function(){a.lineTo(b,d)})}(x,v)):-1==A?(A=x+D*e,G=v-z*e,
+a.lineTo(x+y*e,v-u*e),a.quadTo(H,J,A,G),function(b,d){B.push(function(){a.lineTo(b,d)})}(x,v)):(a.lineTo(H,J),function(b,d){var c=H-y*e,f=J+u*e,g=H-D*e,k=J+z*e;B.push(function(){a.quadTo(b,d,c,f)});B.push(function(){a.lineTo(g,k)})}(x,v));u=z;y=D}t=e*D;A=-e*z;if(l&&!g)this.paintMarker(a,r.x,r.y,-u,-y,f,b,e,m,!1);else{a.lineTo(r.x-m*z+t/2,r.y-m*D+A/2);var L=r.x-m*z-t/2,N=r.y-m*D-A/2;g?(a.moveTo(L,N),B.splice(0,0,function(){a.moveTo(L,N)})):a.lineTo(L,N)}for(t=B.length-1;0<=t;t--)B[t]();g?(a.end(),
a.stroke()):(a.close(),a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);p&&a.setLineJoin("flat");2<c.length&&(a.setMiterLimit(4),k&&!g&&(a.begin(),this.paintMarker(a,c[0].x,c[0].y,q,s,n,d,e,m,!0),a.stroke(),a.end()),l&&!g&&(a.begin(),this.paintMarker(a,r.x,r.y,-u,-y,f,b,e,m,!0),a.stroke(),a.end()))}};
mxArrowConnector.prototype.paintMarker=function(a,c,f,d,b,e,g,k,l,m){g=k/g;var n=k*b/2;k=-k*d/2;var p=(l+e)*d;e=(l+e)*b;m?a.moveTo(c-n+p,f-k+e):a.lineTo(c-n+p,f-k+e);a.lineTo(c-n/g+p,f-k/g+e);a.lineTo(c+l*d,f+l*b);a.lineTo(c+n/g+p,f+k/g+e);a.lineTo(c+n+p,f+k+e)};mxArrowConnector.prototype.isArrowRounded=function(){return this.isRounded};mxArrowConnector.prototype.getStartArrowWidth=function(){return mxConstants.ARROW_WIDTH};mxArrowConnector.prototype.getEndArrowWidth=function(){return mxConstants.ARROW_WIDTH};
mxArrowConnector.prototype.getEdgeWidth=function(){return mxConstants.ARROW_WIDTH/3};mxArrowConnector.prototype.isOpenEnded=function(){return!1};mxArrowConnector.prototype.isMarkerStart=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE};mxArrowConnector.prototype.isMarkerEnd=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE};
@@ -2312,7 +2312,7 @@ Sidebar.prototype.createDragSource=function(a,c,f,d,b){function e(b,a){var d=nul
mxClient.IS_QUIRKS?"inline":"inline-block"):(d=mxUtils.createImage(b.src),d.style.width=b.width+"px",d.style.height=b.height+"px");null!=a&&d.setAttribute("title",a);mxUtils.setOpacity(d,b==this.refreshTarget?30:20);d.style.position="absolute";d.style.cursor="crosshair";return d}function g(b,a,d,e){null!=e.parentNode&&(mxUtils.contains(d,b,a)?(mxUtils.setOpacity(e,100),J=e):mxUtils.setOpacity(e,e==B?30:20));return d}for(var k=this.editorUi,l=k.editor.graph,m=null,n=null,p=this,r=0;r<d.length&&!(null==
n&&this.editorUi.editor.graph.model.isVertex(d[r])?n=r:null==m&&this.editorUi.editor.graph.model.isEdge(d[r])&&null==this.editorUi.editor.graph.model.getTerminal(d[r],!0)&&(m=r),null!=n&&null!=m);r++);var s=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(b,a,e,f,g){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=d&&null!=v&&J==B){var k=b.isCellSelected(v.cell)?b.getSelectionCells():[v.cell],k=this.updateShapes(b.model.isEdge(v.cell)?d[0]:d[n],
k);b.setSelectionCells(k)}else null!=d&&null!=J&&null!=t&&J!=B?(k=b.model.isEdge(t.cell)||null==m?n:m,this.dropAndConnect(t.cell,d,H,k)):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(b.view.getState(b.getSelectionCell()))}),f,0,0,this.editorUi.editor.graph.autoscroll,!0,!0);this.editorUi.editor.graph.addListener(mxEvent.ESCAPE,function(b,a){s.isActive()&&s.reset()});var q=s.mouseDown;s.mouseDown=function(b){!mxEvent.isPopupTrigger(b)&&!mxEvent.isMultiTouchEvent(b)&&
-(l.stopEditing(),q.apply(this,arguments))};var t=null,u=null,v=null,z=!1,y=e(this.triangleUp,mxResources.get("connect")),x=e(this.triangleRight,mxResources.get("connect")),D=e(this.triangleDown,mxResources.get("connect")),A=e(this.triangleLeft,mxResources.get("connect")),B=e(this.refreshTarget,mxResources.get("replace")),E=null,G=e(this.roundDrop),F=e(this.roundDrop),H=mxConstants.DIRECTION_NORTH,J=null,L=s.createPreviewElement;s.createPreviewElement=function(b){var a=L.apply(this,arguments);mxClient.IS_SVG&&
+(l.stopEditing(),q.apply(this,arguments))};var t=null,u=null,v=null,z=!1,y=e(this.triangleUp,mxResources.get("connect")),x=e(this.triangleRight,mxResources.get("connect")),D=e(this.triangleDown,mxResources.get("connect")),A=e(this.triangleLeft,mxResources.get("connect")),B=e(this.refreshTarget,mxResources.get("replace")),E=null,F=e(this.roundDrop),G=e(this.roundDrop),H=mxConstants.DIRECTION_NORTH,J=null,L=s.createPreviewElement;s.createPreviewElement=function(b){var a=L.apply(this,arguments);mxClient.IS_SVG&&
(a.style.pointerEvents="none");this.previewElementWidth=a.style.width;this.previewElementHeight=a.style.height;return a};var N=s.dragEnter;s.dragEnter=function(b,a){null!=k.hoverIcons&&k.hoverIcons.setDisplay("none");N.apply(this,arguments)};var S=s.dragExit;s.dragExit=function(b,a){null!=k.hoverIcons&&k.hoverIcons.setDisplay("");S.apply(this,arguments)};s.dragOver=function(a,e){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=J&&this.currentGuide.hide();if(null!=
this.previewElement){var c=a.view;if(null!=v&&J==B)this.previewElement.style.display=a.model.isEdge(v.cell)?"none":"",this.previewElement.style.left=v.x+"px",this.previewElement.style.top=v.y+"px",this.previewElement.style.width=v.width+"px",this.previewElement.style.height=v.height+"px";else if(null!=t&&null!=J){var f=a.model.isEdge(t.cell)||null==m?n:m,g=p.getDropAndConnectGeometry(t.cell,d[f],H,d),k=!a.model.isEdge(t.cell)?a.getCellGeometry(t.cell):null,l=a.getCellGeometry(d[f]),q=a.model.getParent(t.cell),
u=c.translate.x*c.scale,r=c.translate.y*c.scale;null!=k&&!k.relative&&a.model.isVertex(q)&&(r=c.getState(q),u=r.x,r=r.y);k=l.x;l=l.y;a.model.isEdge(d[f])&&(l=k=0);this.previewElement.style.left=(g.x-k)*c.scale+u+"px";this.previewElement.style.top=(g.y-l)*c.scale+r+"px";1==d.length&&(this.previewElement.style.width=g.width*c.scale+"px",this.previewElement.style.height=g.height*c.scale+"px");this.previewElement.style.display=""}else null!=s.currentHighlight.state&&a.model.isEdge(s.currentHighlight.state.cell)?
@@ -2320,16 +2320,16 @@ u=c.translate.x*c.scale,r=c.translate.y*c.scale;null!=k&&!k.relative&&a.model.is
a,e,c){var f=!mxEvent.isAltDown(c)&&null!=d?b.getCellAt(a,e):null;if(null!=f&&!this.graph.isCellConnectable(f)){var k=this.graph.getModel().getParent(f);this.graph.getModel().isVertex(k)&&this.graph.isCellConnectable(k)&&(f=k)}b.isCellLocked(f)&&(f=null);var l=b.view.getState(f),k=J=null;C!=l?(C=l,W=(new Date).getTime(),Q=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=l&&(this.updateThread=window.setTimeout(function(){null==J&&(C=l,s.getDropTarget(b,a,e,c))},this.dropTargetDelay+
10))):Q=(new Date).getTime()-W;if(2500>Q&&null!=l&&!mxEvent.isShiftDown(c)&&(mxUtils.getValue(l.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(O,mxConstants.STYLE_SHAPE)&&mxUtils.getValue(l.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||"image"==mxUtils.getValue(O,mxConstants.STYLE_SHAPE)||1500<Q||b.model.isEdge(l.cell))&&Q>this.dropTargetDelay&&(b.model.isVertex(l.cell)&&null!=n||b.model.isEdge(l.cell)&&b.model.isEdge(d[0]))){v=l;var m=b.model.isEdge(l.cell)?b.view.getPoint(l):
new mxPoint(l.getCenterX(),l.getCenterY()),m=new mxRectangle(m.x-this.refreshTarget.width/2,m.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);B.style.left=Math.floor(m.x)+"px";B.style.top=Math.floor(m.y)+"px";null==E&&(b.container.appendChild(B),E=B.parentNode);g(a,e,m,B)}else null==v||!mxUtils.contains(v,a,e)||1500<Q&&!mxEvent.isShiftDown(c)?(v=null,null!=E&&(B.parentNode.removeChild(B),E=null)):null!=v&&null!=E&&(m=b.model.isEdge(v.cell)?b.view.getPoint(v):new mxPoint(v.getCenterX(),
-v.getCenterY()),m=new mxRectangle(m.x-this.refreshTarget.width/2,m.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),g(a,e,m,B));if(z&&null!=t&&!mxEvent.isAltDown(c)&&null==J){k=mxRectangle.fromRectangle(t);if(b.model.isEdge(t.cell)){var q=t.absolutePoints;null!=G.parentNode&&(m=q[0],k.add(g(a,e,new mxRectangle(m.x-this.roundDrop.width/2,m.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),G)));null!=F.parentNode&&(q=q[q.length-1],k.add(g(a,e,new mxRectangle(q.x-
-this.roundDrop.width/2,q.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),F)))}else m=mxRectangle.fromRectangle(t),null!=t.shape&&null!=t.shape.boundingBox&&(m=mxRectangle.fromRectangle(t.shape.boundingBox)),m.grow(this.graph.tolerance),m.grow(HoverIcons.prototype.arrowSpacing),q=this.graph.selectionCellsHandler.getHandler(t.cell),null!=q&&(m.x-=q.horizontalOffset/2,m.y-=q.verticalOffset/2,m.width+=q.horizontalOffset,m.height+=q.verticalOffset,null!=q.rotationShape&&null!=q.rotationShape.node&&
+v.getCenterY()),m=new mxRectangle(m.x-this.refreshTarget.width/2,m.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),g(a,e,m,B));if(z&&null!=t&&!mxEvent.isAltDown(c)&&null==J){k=mxRectangle.fromRectangle(t);if(b.model.isEdge(t.cell)){var q=t.absolutePoints;null!=F.parentNode&&(m=q[0],k.add(g(a,e,new mxRectangle(m.x-this.roundDrop.width/2,m.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),F)));null!=G.parentNode&&(q=q[q.length-1],k.add(g(a,e,new mxRectangle(q.x-
+this.roundDrop.width/2,q.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),G)))}else m=mxRectangle.fromRectangle(t),null!=t.shape&&null!=t.shape.boundingBox&&(m=mxRectangle.fromRectangle(t.shape.boundingBox)),m.grow(this.graph.tolerance),m.grow(HoverIcons.prototype.arrowSpacing),q=this.graph.selectionCellsHandler.getHandler(t.cell),null!=q&&(m.x-=q.horizontalOffset/2,m.y-=q.verticalOffset/2,m.width+=q.horizontalOffset,m.height+=q.verticalOffset,null!=q.rotationShape&&null!=q.rotationShape.node&&
"hidden"!=q.rotationShape.node.style.visibility&&("none"!=q.rotationShape.node.style.display&&null!=q.rotationShape.boundingBox)&&m.add(q.rotationShape.boundingBox)),k.add(g(a,e,new mxRectangle(t.getCenterX()-this.triangleUp.width/2,m.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),y)),k.add(g(a,e,new mxRectangle(m.x+m.width,t.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),x)),k.add(g(a,e,new mxRectangle(t.getCenterX()-this.triangleDown.width/
-2,m.y+m.height,this.triangleDown.width,this.triangleDown.height),D)),k.add(g(a,e,new mxRectangle(m.x-this.triangleLeft.width,t.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),A));null!=k&&k.grow(10)}H=mxConstants.DIRECTION_NORTH;J==x?H=mxConstants.DIRECTION_EAST:J==D||J==F?H=mxConstants.DIRECTION_SOUTH:J==A&&(H=mxConstants.DIRECTION_WEST);null!=v&&J==B&&(l=v);m=(null==n||b.isCellConnectable(d[n]))&&(b.model.isEdge(f)&&null!=n||b.model.isVertex(f)&&b.isCellConnectable(f));
-if(null!=t&&5E3<=Q||t!=l&&(null==k||!mxUtils.contains(k,a,e)||500<Q&&null==J&&m))if(z=!1,t=5E3>Q&&Q>this.dropTargetDelay||b.model.isEdge(f)?l:null,null!=t&&m){k=[G,F,y,x,D,A];for(m=0;m<k.length;m++)null!=k[m].parentNode&&k[m].parentNode.removeChild(k[m]);b.model.isEdge(f)?(q=l.absolutePoints,null!=q&&(m=q[0],q=q[q.length-1],k=b.tolerance,new mxRectangle(a-k,e-k,2*k,2*k),G.style.left=Math.floor(m.x-this.roundDrop.width/2)+"px",G.style.top=Math.floor(m.y-this.roundDrop.height/2)+"px",F.style.left=Math.floor(q.x-
-this.roundDrop.width/2)+"px",F.style.top=Math.floor(q.y-this.roundDrop.height/2)+"px",null==b.model.getTerminal(f,!0)&&b.container.appendChild(G),null==b.model.getTerminal(f,!1)&&b.container.appendChild(F))):(m=mxRectangle.fromRectangle(l),null!=l.shape&&null!=l.shape.boundingBox&&(m=mxRectangle.fromRectangle(l.shape.boundingBox)),m.grow(this.graph.tolerance),m.grow(HoverIcons.prototype.arrowSpacing),q=this.graph.selectionCellsHandler.getHandler(l.cell),null!=q&&(m.x-=q.horizontalOffset/2,m.y-=q.verticalOffset/
+2,m.y+m.height,this.triangleDown.width,this.triangleDown.height),D)),k.add(g(a,e,new mxRectangle(m.x-this.triangleLeft.width,t.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),A));null!=k&&k.grow(10)}H=mxConstants.DIRECTION_NORTH;J==x?H=mxConstants.DIRECTION_EAST:J==D||J==G?H=mxConstants.DIRECTION_SOUTH:J==A&&(H=mxConstants.DIRECTION_WEST);null!=v&&J==B&&(l=v);m=(null==n||b.isCellConnectable(d[n]))&&(b.model.isEdge(f)&&null!=n||b.model.isVertex(f)&&b.isCellConnectable(f));
+if(null!=t&&5E3<=Q||t!=l&&(null==k||!mxUtils.contains(k,a,e)||500<Q&&null==J&&m))if(z=!1,t=5E3>Q&&Q>this.dropTargetDelay||b.model.isEdge(f)?l:null,null!=t&&m){k=[F,G,y,x,D,A];for(m=0;m<k.length;m++)null!=k[m].parentNode&&k[m].parentNode.removeChild(k[m]);b.model.isEdge(f)?(q=l.absolutePoints,null!=q&&(m=q[0],q=q[q.length-1],k=b.tolerance,new mxRectangle(a-k,e-k,2*k,2*k),F.style.left=Math.floor(m.x-this.roundDrop.width/2)+"px",F.style.top=Math.floor(m.y-this.roundDrop.height/2)+"px",G.style.left=Math.floor(q.x-
+this.roundDrop.width/2)+"px",G.style.top=Math.floor(q.y-this.roundDrop.height/2)+"px",null==b.model.getTerminal(f,!0)&&b.container.appendChild(F),null==b.model.getTerminal(f,!1)&&b.container.appendChild(G))):(m=mxRectangle.fromRectangle(l),null!=l.shape&&null!=l.shape.boundingBox&&(m=mxRectangle.fromRectangle(l.shape.boundingBox)),m.grow(this.graph.tolerance),m.grow(HoverIcons.prototype.arrowSpacing),q=this.graph.selectionCellsHandler.getHandler(l.cell),null!=q&&(m.x-=q.horizontalOffset/2,m.y-=q.verticalOffset/
2,m.width+=q.horizontalOffset,m.height+=q.verticalOffset,null!=q.rotationShape&&null!=q.rotationShape.node&&"hidden"!=q.rotationShape.node.style.visibility&&("none"!=q.rotationShape.node.style.display&&null!=q.rotationShape.boundingBox)&&m.add(q.rotationShape.boundingBox)),y.style.left=Math.floor(l.getCenterX()-this.triangleUp.width/2)+"px",y.style.top=Math.floor(m.y-this.triangleUp.height)+"px",x.style.left=Math.floor(m.x+m.width)+"px",x.style.top=Math.floor(l.getCenterY()-this.triangleRight.height/
-2)+"px",D.style.left=y.style.left,D.style.top=Math.floor(m.y+m.height)+"px",A.style.left=Math.floor(m.x-this.triangleLeft.width)+"px",A.style.top=x.style.top,"eastwest"!=l.style.portConstraint&&(b.container.appendChild(y),b.container.appendChild(D)),b.container.appendChild(x),b.container.appendChild(A));null!=l&&(u=b.selectionCellsHandler.getHandler(l.cell),null!=u&&null!=u.setHandlesVisible&&u.setHandlesVisible(!1));z=!0}else{k=[G,F,y,x,D,A];for(m=0;m<k.length;m++)null!=k[m].parentNode&&k[m].parentNode.removeChild(k[m])}!z&&
+2)+"px",D.style.left=y.style.left,D.style.top=Math.floor(m.y+m.height)+"px",A.style.left=Math.floor(m.x-this.triangleLeft.width)+"px",A.style.top=x.style.top,"eastwest"!=l.style.portConstraint&&(b.container.appendChild(y),b.container.appendChild(D)),b.container.appendChild(x),b.container.appendChild(A));null!=l&&(u=b.selectionCellsHandler.getHandler(l.cell),null!=u&&null!=u.setHandlesVisible&&u.setHandlesVisible(!1));z=!0}else{k=[F,G,y,x,D,A];for(m=0;m<k.length;m++)null!=k[m].parentNode&&k[m].parentNode.removeChild(k[m])}!z&&
null!=u&&u.setHandlesVisible(!0);f=(!mxEvent.isAltDown(c)||mxEvent.isShiftDown(c))&&!(null!=v&&J==B)?mxDragSource.prototype.getDropTarget.apply(this,arguments):null;k=b.getModel();if(null!=f&&(null!=J||!b.isSplitTarget(f,d,c))){for(;null!=f&&!b.isValidDropTarget(f,d,c)&&k.isVertex(k.getParent(f));)f=k.getParent(f);if(b.view.currentRoot==f||!b.isValidRoot(f)&&0==b.getModel().getChildCount(f)||b.isCellLocked(f)||k.isEdge(f))f=null}return f});s.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,
-arguments);for(var b=[G,F,B,y,x,D,A],a=0;a<b.length;a++)null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a]);null!=t&&null!=u&&u.reset();J=E=v=t=u=null};return s};
+arguments);for(var b=[F,G,B,y,x,D,A],a=0;a<b.length;a++)null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a]);null!=t&&null!=u&&u.reset();J=E=v=t=u=null};return s};
Sidebar.prototype.itemClicked=function(a,c,f,d){d=this.editorUi.editor.graph;if(mxEvent.isAltDown(f)){if(1==d.getSelectionCount()&&d.model.isVertex(d.getSelectionCell())){c=null;for(var b=0;b<a.length&&null==c;b++)d.model.isVertex(a[b])&&(c=b);null!=c&&(this.dropAndConnect(d.getSelectionCell(),a,mxEvent.isMetaDown(f)||mxEvent.isControlDown(f)?mxEvent.isShiftDown(f)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(f)?mxConstants.DIRECTION_EAST:mxConstants.DIRECTION_SOUTH,
c),d.scrollCellToVisible(d.getSelectionCell()))}}else mxEvent.isShiftDown(f)?d.isSelectionEmpty()||(this.updateShapes(a[0],d.getSelectionCells()),d.scrollCellToVisible(d.getSelectionCell())):(a=d.getInsertPoint(),c.drop(d,f,null,a.x,a.y),null!=this.editorUi.hoverIcons&&mxEvent.isTouchEvent(f)&&this.editorUi.hoverIcons.update(d.view.getState(d.getSelectionCell())))};
Sidebar.prototype.addClickHandler=function(a,c,f){var d=this.editorUi.editor.graph,b=c.mouseUp,e=null;mxEvent.addGestureListeners(a,function(b){e=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b))});c.mouseUp=mxUtils.bind(this,function(g){if(!mxEvent.isPopupTrigger(g)&&null==this.currentGraph&&null!=e){var k=d.tolerance;Math.abs(e.x-mxEvent.getClientX(g))<=k&&Math.abs(e.y-mxEvent.getClientY(g))<=k&&this.itemClicked(f,c,g,a)}b.apply(c,arguments);e=null;this.currentElt=a})};
@@ -2548,9 +2548,9 @@ f),this.isSpaceEvent(a)?(c=this.x+this.width,f=this.y+this.height,g=this.graph.v
d!=this.currentTerminalState?(y=(new Date).getTime(),x=0):x=(new Date).getTime()-y;this.currentTerminalState=d};var A=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(b){return null!=this.currentTerminalState&&b.getState()==this.currentTerminalState&&2E3<x||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&A.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(b){return!mxEvent.isShiftDown(b.getEvent())};
mxEdgeHandler.prototype.createHandleShape=function(b,a){var d=null!=b&&0==b,e=this.state.getVisibleTerminalState(d),c=null!=b&&(0==b||b>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==b)?this.graph.getConnectionConstraint(this.state,e,d):null,d=null!=(null!=c?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(d),c):null)?this.fixedHandleImage:null!=c&&null!=e?this.terminalHandleImage:this.handleImage;if(null!=d)return d=new mxImageShape(new mxRectangle(0,
0,d.width,d.height),d.src),d.preserveImageAspect=!1,d;d=mxConstants.HANDLE_SIZE;this.preferHtml&&(d-=1);return new mxRectangleShape(new mxRectangle(0,0,d,d),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var B=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(b,a,d){this.handleImage=a==mxEvent.ROTATION_HANDLE?u:a==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return B.apply(this,arguments)};var E=mxGraphHandler.prototype.getBoundingBox;
-mxGraphHandler.prototype.getBoundingBox=function(b){if(null!=b&&1==b.length){var a=this.graph.getModel(),d=a.getParent(b[0]),e=this.graph.getCellGeometry(b[0]);if(a.isEdge(d)&&null!=e&&e.relative&&(a=this.graph.view.getState(b[0]),null!=a&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox))return mxRectangle.fromRectangle(a.text.boundingBox)}return E.apply(this,arguments)};var G=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(b){var a=
-this.graph.getModel(),d=a.getParent(b.cell),e=this.graph.getCellGeometry(b.cell);return a.isEdge(d)&&null!=e&&e.relative&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox?(a=b.text.unrotatedBoundingBox||b.text.boundingBox,new mxRectangle(Math.round(a.x),Math.round(a.y),Math.round(a.width),Math.round(a.height))):G.apply(this,arguments)};var F=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(b,a){var d=this.graph.getModel(),e=d.getParent(this.state.cell),
-c=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(a)==mxEvent.ROTATION_HANDLE||!d.isEdge(e)||null==c||!c.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&F.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=
+mxGraphHandler.prototype.getBoundingBox=function(b){if(null!=b&&1==b.length){var a=this.graph.getModel(),d=a.getParent(b[0]),e=this.graph.getCellGeometry(b[0]);if(a.isEdge(d)&&null!=e&&e.relative&&(a=this.graph.view.getState(b[0]),null!=a&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox))return mxRectangle.fromRectangle(a.text.boundingBox)}return E.apply(this,arguments)};var F=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(b){var a=
+this.graph.getModel(),d=a.getParent(b.cell),e=this.graph.getCellGeometry(b.cell);return a.isEdge(d)&&null!=e&&e.relative&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox?(a=b.text.unrotatedBoundingBox||b.text.boundingBox,new mxRectangle(Math.round(a.x),Math.round(a.y),Math.round(a.width),Math.round(a.height))):F.apply(this,arguments)};var G=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(b,a){var d=this.graph.getModel(),e=d.getParent(this.state.cell),
+c=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(a)==mxEvent.ROTATION_HANDLE||!d.isEdge(e)||null==c||!c.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&G.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=
function(){this.state.view.graph.turnShapes([this.state.cell])};var H=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(b,a){H.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var J=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(b,a){J.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=
1==this.graph.getSelectionCount()?"":"none")};var L=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){L.apply(this,arguments);var b=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var a=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=
this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(b,d){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(b,d){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell));a()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(b,
@@ -2568,7 +2568,7 @@ this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel()
(function(){function a(){mxCylinder.call(this)}function c(){mxActor.call(this)}function f(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function e(){mxActor.call(this)}function g(){mxCylinder.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function p(){mxActor.call(this)}function r(){mxActor.call(this)}function s(){mxActor.call(this)}function q(b,a){this.canvas=
b;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=a;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo)}function t(){mxRectangleShape.call(this)}function u(){mxActor.call(this)}function v(){mxActor.call(this)}function z(){mxRectangleShape.call(this)}function y(){mxRectangleShape.call(this)}function x(){mxCylinder.call(this)}function D(){mxShape.call(this)}function A(){mxShape.call(this)}function B(){mxEllipse.call(this)}function E(){mxShape.call(this)}
-function G(){mxShape.call(this)}function F(){mxRectangleShape.call(this)}function H(){mxShape.call(this)}function J(){mxShape.call(this)}function L(){mxShape.call(this)}function N(){mxCylinder.call(this)}function S(){mxDoubleEllipse.call(this)}function W(){mxDoubleEllipse.call(this)}function Q(){mxArrowConnector.call(this);this.spacing=0}function C(){mxArrowConnector.call(this);this.spacing=0}function O(){mxActor.call(this)}function P(){mxRectangleShape.call(this)}function M(){mxActor.call(this)}
+function F(){mxShape.call(this)}function G(){mxRectangleShape.call(this)}function H(){mxShape.call(this)}function J(){mxShape.call(this)}function L(){mxShape.call(this)}function N(){mxCylinder.call(this)}function S(){mxDoubleEllipse.call(this)}function W(){mxDoubleEllipse.call(this)}function Q(){mxArrowConnector.call(this);this.spacing=0}function C(){mxArrowConnector.call(this);this.spacing=0}function O(){mxActor.call(this)}function P(){mxRectangleShape.call(this)}function M(){mxActor.call(this)}
function V(){mxActor.call(this)}function I(){mxActor.call(this)}function K(){mxActor.call(this)}function R(){mxActor.call(this)}function X(){mxActor.call(this)}function da(){mxActor.call(this)}function ca(){mxActor.call(this)}function T(){mxActor.call(this)}function Z(){mxEllipse.call(this)}function ba(){mxEllipse.call(this)}function Y(){mxEllipse.call(this)}function U(){mxRhombus.call(this)}function ia(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function aa(){mxEllipse.call(this)}function fa(){mxEllipse.call(this)}
function ja(){mxActor.call(this)}function ga(){mxActor.call(this)}function oa(){mxActor.call(this)}function wa(b,a,d,e,c,f,g,k,l,m){g+=l;var n=e.clone();e.x-=c*(2*g+l);e.y-=f*(2*g+l);c*=g+l;f*=g+l;return function(){b.ellipse(n.x-c-g,n.y-f-g,2*g,2*g);m?b.fillAndStroke():b.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(b,a,d,e,c,f){a=Math.max(0,Math.min(e,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f?(b.moveTo(a,c),b.lineTo(a,a),
b.lineTo(0,0),b.moveTo(a,a),b.lineTo(e,a)):(b.moveTo(0,0),b.lineTo(e-a,0),b.lineTo(e,a),b.lineTo(e,c),b.lineTo(a,c),b.lineTo(0,c-a),b.lineTo(0,0),b.close());b.end()};mxCellRenderer.prototype.defaultShapes.cube=a;var ta=Math.tan(mxUtils.toRadians(30)),na=(0.5-ta)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(b,a,d,e,c){a=Math.min(e,c/ta);b.translate((e-a)/2,(c-a)/2+a/4);b.moveTo(0,0.25*a);b.lineTo(0.5*a,a*na);b.lineTo(a,0.25*a);b.lineTo(0.5*a,(0.5-na)*a);b.lineTo(0,
@@ -2602,12 +2602,12 @@ f+"Height"],q=this.style["symbol"+f+"Spacing"]||0,t=this.style["symbol"+f+"ArcSp
arguments)};mxCellRenderer.prototype.defaultShapes.ext=y;mxUtils.extend(x,mxCylinder);x.prototype.redrawPath=function(b,a,d,e,c,f){f?(b.moveTo(0,0),b.lineTo(e/2,c/2),b.lineTo(e,0),b.end()):(b.moveTo(0,0),b.lineTo(e,0),b.lineTo(e,c),b.lineTo(0,c),b.close())};mxCellRenderer.prototype.defaultShapes.message=x;mxUtils.extend(D,mxShape);D.prototype.paintBackground=function(b,a,d,e,c){b.translate(a,d);b.ellipse(e/4,0,e/2,c/4);b.fillAndStroke();b.begin();b.moveTo(e/2,c/4);b.lineTo(e/2,2*c/3);b.moveTo(e/2,
c/3);b.lineTo(0,c/3);b.moveTo(e/2,c/3);b.lineTo(e,c/3);b.moveTo(e/2,2*c/3);b.lineTo(0,c);b.moveTo(e/2,2*c/3);b.lineTo(e,c);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=D;mxUtils.extend(A,mxShape);A.prototype.getLabelBounds=function(b){return new mxRectangle(b.x+b.width/6,b.y,5*b.width/6,b.height)};A.prototype.paintBackground=function(b,a,d,e,c){b.translate(a,d);b.begin();b.moveTo(0,c/4);b.lineTo(0,3*c/4);b.end();b.stroke();b.begin();b.moveTo(0,c/2);b.lineTo(e/6,c/2);b.end();
b.stroke();b.ellipse(e/6,0,5*e/6,c);b.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=A;mxUtils.extend(B,mxEllipse);B.prototype.paintVertexShape=function(b,a,d,e,c){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(a+e/8,d+c);b.lineTo(a+7*e/8,d+c);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=B;mxUtils.extend(E,mxShape);E.prototype.paintVertexShape=function(b,a,d,e,c){b.translate(a,d);b.begin();b.moveTo(e,0);b.lineTo(0,c);b.moveTo(0,
-0);b.lineTo(e,c);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=E;mxUtils.extend(G,mxShape);G.prototype.getLabelBounds=function(b){return new mxRectangle(b.x,b.y+b.height/8,b.width,7*b.height/8)};G.prototype.paintBackground=function(b,a,d,e,c){b.translate(a,d);b.begin();b.moveTo(3*e/8,1.1*(c/8));b.lineTo(5*e/8,0);b.end();b.stroke();b.ellipse(0,c/8,e,7*c/8);b.fillAndStroke()};G.prototype.paintForeground=function(b,a,d,e,c){b.begin();b.moveTo(3*e/8,1.1*(c/8));b.lineTo(5*e/8,c/
-4);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.umlControl=G;mxUtils.extend(F,mxRectangleShape);F.prototype.size=40;F.prototype.isHtmlAllowed=function(){return!1};F.prototype.getLabelBounds=function(b){var a=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(b.x,b.y,b.width,a)};F.prototype.paintBackground=function(b,a,d,e,c){var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),
-g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,b,a,d,e,f):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=F&&(g=new g,g.apply(this.state),b.save(),g.paintVertexShape(b,a,d,e,f),b.restore()));f<c&&(b.setDashed(!0),b.begin(),b.moveTo(a+e/2,d+f),b.lineTo(a+e/2,d+c),b.end(),b.stroke())};F.prototype.paintForeground=function(b,a,d,e,c){var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
-mxRectangleShape.prototype.paintForeground.call(this,b,a,d,e,Math.min(c,f))};mxCellRenderer.prototype.defaultShapes.umlLifeline=F;mxUtils.extend(H,mxShape);H.prototype.width=60;H.prototype.height=30;H.prototype.corner=10;H.prototype.getLabelBounds=function(b){var a=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.style,"width",this.width))*this.scale)),d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.style,"height",this.height))*this.scale));return new mxRectangle(b.x,b.y,
+0);b.lineTo(e,c);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=E;mxUtils.extend(F,mxShape);F.prototype.getLabelBounds=function(b){return new mxRectangle(b.x,b.y+b.height/8,b.width,7*b.height/8)};F.prototype.paintBackground=function(b,a,d,e,c){b.translate(a,d);b.begin();b.moveTo(3*e/8,1.1*(c/8));b.lineTo(5*e/8,0);b.end();b.stroke();b.ellipse(0,c/8,e,7*c/8);b.fillAndStroke()};F.prototype.paintForeground=function(b,a,d,e,c){b.begin();b.moveTo(3*e/8,1.1*(c/8));b.lineTo(5*e/8,c/
+4);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.umlControl=F;mxUtils.extend(G,mxRectangleShape);G.prototype.size=40;G.prototype.isHtmlAllowed=function(){return!1};G.prototype.getLabelBounds=function(b){var a=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(b.x,b.y,b.width,a)};G.prototype.paintBackground=function(b,a,d,e,c){var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),
+g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,b,a,d,e,f):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=G&&(g=new g,g.apply(this.state),b.save(),g.paintVertexShape(b,a,d,e,f),b.restore()));f<c&&(b.setDashed(!0),b.begin(),b.moveTo(a+e/2,d+f),b.lineTo(a+e/2,d+c),b.end(),b.stroke())};G.prototype.paintForeground=function(b,a,d,e,c){var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
+mxRectangleShape.prototype.paintForeground.call(this,b,a,d,e,Math.min(c,f))};mxCellRenderer.prototype.defaultShapes.umlLifeline=G;mxUtils.extend(H,mxShape);H.prototype.width=60;H.prototype.height=30;H.prototype.corner=10;H.prototype.getLabelBounds=function(b){var a=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.style,"width",this.width))*this.scale)),d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.style,"height",this.height))*this.scale));return new mxRectangle(b.x,b.y,
a,d)};H.prototype.paintBackground=function(b,a,d,e,c){var f=this.corner,g=Math.min(e,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),k=Math.min(c,Math.max(1.5*f,parseFloat(mxUtils.getValue(this.style,"height",this.height))));b.begin();b.moveTo(a,d);b.lineTo(a+g,d);b.lineTo(a+g,d+Math.max(0,k-1.5*f));b.lineTo(a+Math.max(0,g-f),d+k);b.lineTo(a,d+k);b.close();b.fillAndStroke();b.begin();b.moveTo(a+g,d);b.lineTo(a+e,d);b.lineTo(a+e,d+c);b.lineTo(a,d+c);b.lineTo(a,d+k);b.stroke()};
-mxCellRenderer.prototype.defaultShapes.umlFrame=H;mxPerimeter.LifelinePerimeter=function(b,a,d,e){e=F.prototype.size;null!=a&&(e=mxUtils.getValue(a.style,"size",e)*a.view.scale);a=parseFloat(a.style[mxConstants.STYLE_STROKEWIDTH]||1)*a.view.scale/2-1;d.x<b.getCenterX()&&(a=-1*(a+1));return new mxPoint(b.getCenterX()+a,Math.min(b.y+b.height,Math.max(b.y+e,d.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(b,a,d,e){e=!0;return mxPerimeter.RectanglePerimeter.apply(this,
+mxCellRenderer.prototype.defaultShapes.umlFrame=H;mxPerimeter.LifelinePerimeter=function(b,a,d,e){e=G.prototype.size;null!=a&&(e=mxUtils.getValue(a.style,"size",e)*a.view.scale);a=parseFloat(a.style[mxConstants.STYLE_STROKEWIDTH]||1)*a.view.scale/2-1;d.x<b.getCenterX()&&(a=-1*(a+1));return new mxPoint(b.getCenterX()+a,Math.min(b.y+b.height,Math.max(b.y+e,d.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(b,a,d,e){e=!0;return mxPerimeter.RectanglePerimeter.apply(this,
arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(b,a,d,e){e=parseFloat(a.style[mxConstants.STYLE_STROKEWIDTH]||1)*a.view.scale/2-1;null!=a.style.backboneSize&&(e+=parseFloat(a.style.backboneSize)*a.view.scale/2-1);if("south"==a.style[mxConstants.STYLE_DIRECTION]||"north"==a.style[mxConstants.STYLE_DIRECTION])return d.x<b.getCenterX()&&(e=-1*(e+1)),new mxPoint(b.getCenterX()+e,Math.min(b.y+b.height,Math.max(b.y,d.y)));
d.y<b.getCenterY()&&(e+=1,e*=-1);return new mxPoint(Math.min(b.x+b.width,Math.max(b.x,d.x)),b.getCenterY()+e)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxUtils.extend(J,mxShape);J.prototype.size=10;J.prototype.paintBackground=function(b,a,d,e,c){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(a,d);b.ellipse((e-f)/2,0,f,f);b.fillAndStroke();b.begin();b.moveTo(e/2,f);b.lineTo(e/2,c);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.lollipop=
J;mxUtils.extend(L,mxShape);L.prototype.size=10;L.prototype.inset=2;L.prototype.paintBackground=function(b,a,d,e,c){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(a,d);b.begin();b.moveTo(e/2,f+g);b.lineTo(e/2,c);b.end();b.stroke();b.begin();b.moveTo((e-f)/2-g,f/2);b.quadTo((e-f)/2-g,f+g,e/2,f+g);b.quadTo((e+f)/2+g,f+g,(e+f)/2+g,f/2);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.requires=
@@ -2654,7 +2654,7 @@ d,e,c,f){a=(b.shape.getEndArrowWidth()-b.shape.strokewidth)*b.view.scale;f=3*mxU
b.style.endWidth=Math.max(0,Math.round(2*d)-b.shape.getEdgeWidth())/b.view.scale;mxEvent.isControlDown(l.getEvent())&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE],b.style.startWidth=b.style.endWidth);mxEvent.isAltDown(l.getEvent())||(Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<a/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(b.style.endWidth)-parseFloat(b.style.startWidth))<
a&&(b.style.endWidth=b.style.startWidth))})));return d},swimlane:function(b){var a=[ha(b,[mxConstants.STYLE_STARTSIZE],function(a){var d=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(a.getCenterX(),a.y+Math.max(0,Math.min(a.height,d))):new mxPoint(a.x+Math.max(0,Math.min(a.width,d)),a.getCenterY())},function(a,d){b.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,
mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(a.height,d.y-a.y))):Math.round(Math.max(0,Math.min(a.width,d.x-a.x)))})];if(mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED)){var d=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));a.push(ma(b,d/2))}return a},label:la(),ext:la(),rectangle:la(),triangle:la(),rhombus:la(),hexagon:la(),umlLifeline:function(b){return[ha(b,["size"],function(b){var a=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,
-"size",F.prototype.size))));return new mxPoint(b.getCenterX(),b.y+a)},function(b,a){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,a.y-b.y)))},!1)]},umlFrame:function(b){var a=[ha(b,["width","height"],function(b){var a=Math.max(H.prototype.corner,Math.min(b.width,mxUtils.getValue(this.state.style,"width",H.prototype.width))),d=Math.max(1.5*H.prototype.corner,Math.min(b.height,mxUtils.getValue(this.state.style,"height",H.prototype.height)));return new mxPoint(b.x+a,b.y+d)},function(b,
+"size",G.prototype.size))));return new mxPoint(b.getCenterX(),b.y+a)},function(b,a){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,a.y-b.y)))},!1)]},umlFrame:function(b){var a=[ha(b,["width","height"],function(b){var a=Math.max(H.prototype.corner,Math.min(b.width,mxUtils.getValue(this.state.style,"width",H.prototype.width))),d=Math.max(1.5*H.prototype.corner,Math.min(b.height,mxUtils.getValue(this.state.style,"height",H.prototype.height)));return new mxPoint(b.x+a,b.y+d)},function(b,
a){this.state.style.width=Math.round(Math.max(H.prototype.corner,Math.min(b.width,a.x-b.x)));this.state.style.height=Math.round(Math.max(1.5*H.prototype.corner,Math.min(b.height,a.y-b.y)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&a.push(ma(b));return a},process:function(b){var a=[ha(b,["size"],function(b){var a=Math.max(0,Math.min(0.5,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size))));return new mxPoint(b.x+b.width*a,b.y+b.height/4)},function(b,a){this.state.style.size=
Math.max(0,Math.min(0.5,(a.x-b.x)/b.width))})];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&a.push(ma(b));return a},cross:function(b){return[ha(b,["size"],function(b){var a=Math.min(b.width,b.height),a=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",ga.prototype.size)))*a/2;return new mxPoint(b.getCenterX()-a,b.getCenterY()-a)},function(b,a){var d=Math.min(b.width,b.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(2*(Math.max(0,b.getCenterY()-a.y)/d),2*(Math.max(0,
b.getCenterX()-a.x)/d))))})]},note:function(a){return[ha(a,["size"],function(a){var d=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",b.prototype.size)))));return new mxPoint(a.x+a.width-d,a.y+d)},function(b,a){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-a.x),Math.min(b.height,a.y-b.y))))})]},manualInput:function(b){var a=[ha(b,["size"],function(b){var a=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,
@@ -2687,7 +2687,7 @@ new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new
0.55),!1),new mxConnectionConstraint(new mxPoint(0.07,0.4),!1),new mxConnectionConstraint(new mxPoint(0.31,0.8),!1),new mxConnectionConstraint(new mxPoint(0.13,0.77),!1),new mxConnectionConstraint(new mxPoint(0.8,0.8),!1),new mxConnectionConstraint(new mxPoint(0.55,0.95),!1),new mxConnectionConstraint(new mxPoint(0.875,0.5),!1),new mxConnectionConstraint(new mxPoint(0.96,0.7),!1),new mxConnectionConstraint(new mxPoint(0.625,0.2),!1),new mxConnectionConstraint(new mxPoint(0.88,0.25),!1)];n.prototype.constraints=
mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;m.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,0),!0),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.75,0),!0),new mxConnectionConstraint(new mxPoint(0,0.25),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0,0.75),!0),new mxConnectionConstraint(new mxPoint(1,0.25),!0),new mxConnectionConstraint(new mxPoint(1,
0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.75),!0)];mxArrow.prototype.constraints=null;V.prototype.constraints=null;M.prototype.constraints=null;I.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1)];K.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1)];ga.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,
-0.5),!1),new mxConnectionConstraint(new mxPoint(0.5,0),!1),new mxConnectionConstraint(new mxPoint(0.5,1),!1)];F.prototype.constraints=null;X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.25),!1),new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(0,0.75),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1),new mxConnectionConstraint(new mxPoint(0.7,0.1),!1),new mxConnectionConstraint(new mxPoint(0.7,0.9),!1)];da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.175,
+0.5),!1),new mxConnectionConstraint(new mxPoint(0.5,0),!1),new mxConnectionConstraint(new mxPoint(0.5,1),!1)];G.prototype.constraints=null;X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.25),!1),new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(0,0.75),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1),new mxConnectionConstraint(new mxPoint(0.7,0.1),!1),new mxConnectionConstraint(new mxPoint(0.7,0.9),!1)];da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.175,
0.25),!1),new mxConnectionConstraint(new mxPoint(0.25,0.5),!1),new mxConnectionConstraint(new mxPoint(0.175,0.75),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1),new mxConnectionConstraint(new mxPoint(0.7,0.1),!1),new mxConnectionConstraint(new mxPoint(0.7,0.9),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){function a(b){d.escape();var a=d.getDeletableCells(d.getSelectionCells());if(null!=a&&0<a.length){var e=d.model.getParents(a);d.removeCells(a,b);if(null!=e){b=[];for(a=0;a<e.length;a++)(d.model.isVertex(e[a])||d.model.isEdge(e[a]))&&b.push(e[a]);d.setSelectionCells(b)}}}var c=this.editorUi,f=c.editor,d=f.graph,b=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){window.open(c.getUrl())});this.addAction("open...",
function(){window.openNew=!0;window.openKey="open";c.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){c.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(b,a){try{var d=mxUtils.parseXml(b),e=new mxGraphModel;(new mxCodec(d)).decode(d.documentElement,e);var c=e.getChildren(e.getChildAt(e.getRoot(),0));f.graph.setSelectionCells(f.graph.importCells(c))}catch(p){mxUtils.alert(mxResources.get("invalidOrMissingFile")+
@@ -2866,15 +2866,15 @@ l.style.margin="0px";this.addArrow(l);l.style.width="192px";l.style.height="15px
")");var n=this.editorUi.toolbar.addItems(["vertical"],k,!0)[0];mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(k);this.styleButtons(m);this.styleButtons([n]);var p=e.cloneNode(!1);p.style.marginLeft="-3px";p.style.paddingBottom="0px";var r=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),d.cellEditor.isContentEditing()?function(){document.execCommand("justifyleft",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT]),p),
s=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),d.cellEditor.isContentEditing()?function(){document.execCommand("justifycenter",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER]),p),q=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),d.cellEditor.isContentEditing()?function(){document.execCommand("justifyright",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],
[mxConstants.ALIGN_RIGHT]),p);this.styleButtons([r,s,q]);if(d.cellEditor.isContentEditing()){var t=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},k);this.styleButtons([t])}var u=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP]),p),v=this.editorUi.toolbar.addButton("geSprite-middle",
-mxResources.get("middle"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE]),p),z=this.editorUi.toolbar.addButton("geSprite-bottom",mxResources.get("bottom"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM]),p);this.styleButtons([u,v,z]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(p);var y,x,D,A,B,E,G;d.cellEditor.isContentEditing()?(u.style.display="none",v.style.display="none",
+mxResources.get("middle"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE]),p),z=this.editorUi.toolbar.addButton("geSprite-bottom",mxResources.get("bottom"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM]),p);this.styleButtons([u,v,z]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(p);var y,x,D,A,B,E,F;d.cellEditor.isContentEditing()?(u.style.display="none",v.style.display="none",
z.style.display="none",n.style.display="none",D=this.editorUi.toolbar.addButton("geSprite-justifyfull",null,function(){document.execCommand("justifyfull",!1,null)},p),this.styleButtons([D,y=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" (Ctrl+,)",function(){document.execCommand("subscript",!1,null)},p),x=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" (Ctrl+.)",function(){document.execCommand("superscript",!1,null)},p)]),
D.style.marginRight="9px",t=p.cloneNode(!1),t.style.paddingTop="4px",p=[this.editorUi.toolbar.addButton("geSprite-orderedlist",mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},t),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},t),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",
!1,null)},t),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",!1,null)},t),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},t)],this.styleButtons(p),p[p.length-1].style.marginLeft="9px",mxClient.IS_QUIRKS&&(mxUtils.br(a),t.style.height="40"),a.appendChild(t)):(m[2].style.marginRight="9px",q.style.marginRight="9px");p=e.cloneNode(!1);p.style.marginLeft="0px";
-p.style.paddingTop="8px";p.style.paddingBottom="4px";p.style.fontWeight="normal";mxUtils.write(p,mxResources.get("position"));var F=document.createElement("select");F.style.position="absolute";F.style.right="20px";F.style.width="97px";F.style.marginTop="-2px";for(var H="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),J={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,
+p.style.paddingTop="8px";p.style.paddingBottom="4px";p.style.fontWeight="normal";mxUtils.write(p,mxResources.get("position"));var G=document.createElement("select");G.style.position="absolute";G.style.right="20px";G.style.width="97px";G.style.marginTop="-2px";for(var H="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),J={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,
mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,
-mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},t=0;t<H.length;t++){var L=document.createElement("option");L.setAttribute("value",H[t]);mxUtils.write(L,mxResources.get(H[t]));F.appendChild(L)}p.appendChild(F);H=e.cloneNode(!1);H.style.marginLeft="0px";H.style.paddingTop=
+mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},t=0;t<H.length;t++){var L=document.createElement("option");L.setAttribute("value",H[t]);mxUtils.write(L,mxResources.get(H[t]));G.appendChild(L)}p.appendChild(G);H=e.cloneNode(!1);H.style.marginLeft="0px";H.style.paddingTop=
"4px";H.style.paddingBottom="4px";H.style.fontWeight="normal";mxUtils.write(H,mxResources.get("writingDirection"));var N=document.createElement("select");N.style.position="absolute";N.style.right="20px";N.style.width="97px";N.style.marginTop="-2px";for(var L=["automatic","leftToRight","rightToLeft"],S={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},t=0;t<L.length;t++){var W=document.createElement("option");W.setAttribute("value",L[t]);mxUtils.write(W,
-mxResources.get(L[t]));N.appendChild(W)}H.appendChild(N);d.isEditing()||(a.appendChild(p),mxEvent.addListener(F,"change",function(b){d.getModel().beginUpdate();try{var a=J[F.value];null!=a&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,a[0],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,a[1],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_ALIGN,a[2],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,a[3],d.getSelectionCells()))}finally{d.getModel().endUpdate()}mxEvent.consume(b)}),
+mxResources.get(L[t]));N.appendChild(W)}H.appendChild(N);d.isEditing()||(a.appendChild(p),mxEvent.addListener(G,"change",function(b){d.getModel().beginUpdate();try{var a=J[G.value];null!=a&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,a[0],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,a[1],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_ALIGN,a[2],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,a[3],d.getSelectionCells()))}finally{d.getModel().endUpdate()}mxEvent.consume(b)}),
a.appendChild(H),mxEvent.addListener(N,"change",function(b){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,S[N.value],d.getSelectionCells());mxEvent.consume(b)}));var Q=document.createElement("input");Q.style.textAlign="right";Q.style.marginTop="4px";mxClient.IS_QUIRKS||(Q.style.position="absolute",Q.style.right="32px");Q.style.width="46px";Q.style.height=mxClient.IS_QUIRKS?"21px":"17px";k.appendChild(Q);var C=null,p=this.installInputHandler(Q,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,
1,999," pt",function(b){C=b;document.execCommand("fontSize",!1,"4");b=d.cellEditor.textarea.getElementsByTagName("font");for(var a=0;a<b.length;a++)if("4"==b[a].getAttribute("size")){b[a].removeAttribute("size");b[a].style.fontSize=C+"px";window.setTimeout(function(){Q.value=C+" pt";C=null},0);break}},!0),p=this.createStepper(Q,p,1,10,!0,Menus.prototype.defaultFontSize);p.style.display=Q.style.display;p.style.marginTop="4px";mxClient.IS_QUIRKS||(p.style.right="20px");k.appendChild(p);k=l.getElementsByTagName("div")[0];
k.style.cssFloat="right";var O=null,P="#ffffff",M=null,V="#000000",I=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return P},function(b){document.execCommand("backcolor",!1,b!=mxConstants.NONE?b:"transparent")},"#ffffff",{install:function(b){O=b},destroy:function(){O=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff");I.style.fontWeight="bold";var K=this.createCellColorOption(mxResources.get("borderColor"),
@@ -2886,21 +2886,21 @@ mxResources.get("spacing"));k.appendChild(p);var R,X,da,ca,T,Z=this.addUnitInput
e&&e.nodeType!=mxConstants.NODETYPE_ELEMENT;)e=e.parentNode;e==d.cellEditor.textarea&&null!=d.cellEditor.textarea.firstChild&&("FONT"!=d.cellEditor.textarea.firstChild.nodeName&&(d.cellEditor.textarea.innerHTML="\x3cfont\x3e"+d.cellEditor.textarea.innerHTML+"\x3c/font\x3e"),e=d.cellEditor.textarea.firstChild);null!=e&&e!=d.cellEditor.textarea&&(e.style.lineHeight=a+"%");b.value=a+" %"},function(b){aa=b;mxEvent.addListener(b,"mousedown",function(){ea=d.cellEditor.saveSelection()});mxEvent.addListener(b,
"touchstart",function(){ea=d.cellEditor.saveSelection()});b.value="120 %"}));g=e.cloneNode(!1);g.style.paddingLeft="0px";k=this.editorUi.toolbar.addItems(["link","image"],g,!0);p=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1,null)},g),this.editorUi.toolbar.addMenuFunctionInContainer(g,"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(b){this.editorUi.menus.addInsertTableItem(b)}))];
this.styleButtons(k);this.styleButtons(p);k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("insert")));k.appendChild(g);a.appendChild(k);mxClient.IS_QUIRKS&&(k.style.height="70");k=e.cloneNode(!1);k.style.paddingLeft="0px";p=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),function(){try{null!=B&&d.selectNode(d.insertColumn(B,null!=E?E.cellIndex:0))}catch(b){alert(b)}},k),
-this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),function(){try{null!=B&&d.selectNode(d.insertColumn(B,null!=E?E.cellIndex+1:-1))}catch(b){alert(b)}},k),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),function(){try{null!=B&&null!=E&&d.deleteColumn(B,E.cellIndex)}catch(b){alert(b)}},k),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),function(){try{null!=B&&null!=G&&
-d.selectNode(d.insertRow(B,G.sectionRowIndex))}catch(b){alert(b)}},k),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),function(){try{null!=B&&null!=G&&d.selectNode(d.insertRow(B,G.sectionRowIndex+1))}catch(b){alert(b)}},k),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),function(){try{null!=B&&null!=G&&d.deleteRow(B,G.sectionRowIndex)}catch(b){alert(b)}},k)];this.styleButtons(p);p[2].style.marginRight="9px";g=this.createPanel();
+this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),function(){try{null!=B&&d.selectNode(d.insertColumn(B,null!=E?E.cellIndex+1:-1))}catch(b){alert(b)}},k),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),function(){try{null!=B&&null!=E&&d.deleteColumn(B,E.cellIndex)}catch(b){alert(b)}},k),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),function(){try{null!=B&&null!=F&&
+d.selectNode(d.insertRow(B,F.sectionRowIndex))}catch(b){alert(b)}},k),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),function(){try{null!=B&&null!=F&&d.selectNode(d.insertRow(B,F.sectionRowIndex+1))}catch(b){alert(b)}},k),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),function(){try{null!=B&&null!=F&&d.deleteRow(B,F.sectionRowIndex)}catch(b){alert(b)}},k)];this.styleButtons(p);p[2].style.marginRight="9px";g=this.createPanel();
g.style.paddingTop="10px";g.style.paddingBottom="10px";g.appendChild(this.createTitle(mxResources.get("table")));g.appendChild(k);mxClient.IS_QUIRKS&&(mxUtils.br(a),g.style.height="70");e=e.cloneNode(!1);e.style.paddingLeft="0px";p=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,function(){if(null!=B){var b=B.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(b,a,d,e){return"#"+("0"+Number(a).toString(16)).substr(-2)+
("0"+Number(d).toString(16)).substr(-2)+("0"+Number(e).toString(16)).substr(-2)});this.editorUi.pickColor(b,function(b){null==b||b==mxConstants.NONE?(B.removeAttribute("border"),B.style.border="",B.style.borderCollapse=""):(B.setAttribute("border","1"),B.style.border="1px solid "+b,B.style.borderCollapse="collapse")})}}),e),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(){if(null!=B){var b=B.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
function(b,a,d,e){return"#"+("0"+Number(a).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)+("0"+Number(e).toString(16)).substr(-2)});this.editorUi.pickColor(b,function(b){B.style.backgroundColor=null==b||b==mxConstants.NONE?"":b})}}),e),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=B){var b=B.getAttribute("cellPadding")||0,b=new FilenameDialog(f,b,mxResources.get("apply"),mxUtils.bind(this,function(b){null!=b&&0<b.length?B.setAttribute("cellPadding",
b):B.removeAttribute("cellPadding")}),mxResources.get("spacing"));f.showDialog(b.container,300,80,!0,!0);b.init()}},e),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=B&&B.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=B&&B.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=B&&B.setAttribute("align","right")},
e)];this.styleButtons(p);p[2].style.marginRight="9px";mxClient.IS_QUIRKS&&(mxUtils.br(g),mxUtils.br(g));g.appendChild(e);a.appendChild(g);A=g}else a.appendChild(g),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);var fa=mxUtils.bind(this,function(a,d,e){b=this.format.getSelectionState();a=mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0);c(m[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(m[1],(a&mxConstants.FONT_ITALIC)==
mxConstants.FONT_ITALIC);c(m[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);l.firstChild.nodeValue=mxUtils.htmlEntities(mxUtils.getValue(b.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));c(n,"0"==mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,"1"));if(e||document.activeElement!=Q)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),Q.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(b.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);
-c(r,a==mxConstants.ALIGN_LEFT);c(s,a==mxConstants.ALIGN_CENTER);c(q,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(u,a==mxConstants.ALIGN_TOP);c(v,a==mxConstants.ALIGN_MIDDLE);c(z,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(b.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);d=mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);F.value=a==mxConstants.ALIGN_LEFT&&d==mxConstants.ALIGN_TOP?
+c(r,a==mxConstants.ALIGN_LEFT);c(s,a==mxConstants.ALIGN_CENTER);c(q,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(u,a==mxConstants.ALIGN_TOP);c(v,a==mxConstants.ALIGN_MIDDLE);c(z,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(b.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);d=mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);G.value=a==mxConstants.ALIGN_LEFT&&d==mxConstants.ALIGN_TOP?
"topLeft":a==mxConstants.ALIGN_CENTER&&d==mxConstants.ALIGN_TOP?"top":a==mxConstants.ALIGN_RIGHT&&d==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&d==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&d==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&d==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(b.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);
a==mxConstants.TEXT_DIRECTION_RTL?N.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?N.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(N.value="automatic");if(e||document.activeElement!=ba)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING,2)),ba.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=Z)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_TOP,0)),Z.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=ia)a=parseFloat(mxUtils.getValue(b.style,
mxConstants.STYLE_SPACING_RIGHT,0)),ia.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=U)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_BOTTOM,0)),U.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=Y)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_LEFT,0)),Y.value=isNaN(a)?"":a+" pt"});X=this.installInputHandler(ba,mxConstants.STYLE_SPACING,2,-999,999," pt");R=this.installInputHandler(Z,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");T=this.installInputHandler(ia,
mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");ca=this.installInputHandler(U,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");da=this.installInputHandler(Y,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(Q,fa);this.addKeyHandler(ba,fa);this.addKeyHandler(Z,fa);this.addKeyHandler(ia,fa);this.addKeyHandler(U,fa);this.addKeyHandler(Y,fa);d.getModel().addListener(mxEvent.CHANGE,fa);this.listeners.push({destroy:function(){d.getModel().removeListener(fa)}});fa();if(d.cellEditor.isContentEditing()){var ja=
!1,e=function(){ja||(ja=!0,window.setTimeout(function(){for(var b=d.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;if(null!=b){var a=mxUtils.getCurrentStyle(b);if(null!=a){c(m[0],"bold"==a.fontWeight||null!=d.getParentByName(b,"B",d.cellEditor.textarea));c(m[1],"italic"==a.fontStyle||null!=d.getParentByName(b,"I",d.cellEditor.textarea));c(m[2],null!=d.getParentByName(b,"U",d.cellEditor.textarea));c(r,"left"==a.textAlign);c(s,"center"==a.textAlign);c(q,"right"==
-a.textAlign);c(D,"justify"==a.textAlign);c(x,null!=d.getParentByName(b,"SUP",d.cellEditor.textarea));c(y,null!=d.getParentByName(b,"SUB",d.cellEditor.textarea));B=d.getParentByName(b,"TABLE",d.cellEditor.textarea);G=null==B?null:d.getParentByName(b,"TR",B);E=null==B?null:d.getParentByName(b,"TD",B);A.style.display=null!=B?"":"none";if(document.activeElement!=Q){"FONT"==b.nodeName&&"4"==b.getAttribute("size")&&null!=C?(b.removeAttribute("size"),b.style.fontSize=C+"px",C=null):Q.value=parseFloat(a.fontSize)+
+a.textAlign);c(D,"justify"==a.textAlign);c(x,null!=d.getParentByName(b,"SUP",d.cellEditor.textarea));c(y,null!=d.getParentByName(b,"SUB",d.cellEditor.textarea));B=d.getParentByName(b,"TABLE",d.cellEditor.textarea);F=null==B?null:d.getParentByName(b,"TR",B);E=null==B?null:d.getParentByName(b,"TD",B);A.style.display=null!=B?"":"none";if(document.activeElement!=Q){"FONT"==b.nodeName&&"4"==b.getAttribute("size")&&null!=C?(b.removeAttribute("size"),b.style.fontSize=C+"px",C=null):Q.value=parseFloat(a.fontSize)+
" pt";var b=b.style.lineHeight||a.lineHeight,e=parseFloat(b);"px"==b.substring(b.length-2)&&(e/=parseFloat(a.fontSize));"%"!=b.substring(b.length-1)&&(e*=100);aa.value=e+" %"}b=a.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(b,a,d,e){return"#"+("0"+Number(a).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)+("0"+Number(e).toString(16)).substr(-2)});e=a.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(b,a,d,e){return"#"+
("0"+Number(a).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)+("0"+Number(e).toString(16)).substr(-2)});null!=M&&(V="#"==b.charAt(0)?b:"#000000",M(V,!0));null!=O&&(P="#"==e.charAt(0)?e:null,O(P,!0));null!=l.firstChild&&(a=a.fontFamily,"'"==a.charAt(0)&&(a=a.substring(1)),"'"==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)),l.firstChild.nodeValue=a)}}ja=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",e);mxEvent.addListener(d.cellEditor.textarea,"touchend",e);mxEvent.addListener(d.cellEditor.textarea,
"mouseup",e);mxEvent.addListener(d.cellEditor.textarea,"keyup",e);this.listeners.push({destroy:function(){}});e()}return a};StyleFormatPanel=function(a,c,f){BaseFormatPanel.call(this,a,c,f);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);
@@ -2953,7 +2953,7 @@ this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],
"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-enderoneopt",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-endermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}));this.addArrow(t,8);this.addArrow(x);this.addArrow(D);
this.addArrow(A);z=this.addArrow(m,9);z.className="geIcon";z.style.width="84px";y=this.addArrow(n,9);y.className="geIcon";y.style.width="22px";var B=document.createElement("div");B.style.width="85px";B.style.height="1px";B.style.borderBottom="1px solid black";B.style.marginBottom="9px";z.appendChild(B);var E=document.createElement("div");E.style.width="23px";E.style.height="1px";E.style.borderBottom="1px solid black";E.style.marginBottom="9px";y.appendChild(E);m.style.height="15px";n.style.height=
"15px";t.style.height="15px";x.style.height="17px";D.style.marginLeft="3px";D.style.height="17px";A.style.marginLeft="3px";A.style.height="17px";a.appendChild(g);a.appendChild(q);a.appendChild(r);m=r.cloneNode(!1);m.style.paddingBottom="6px";m.style.paddingTop="4px";m.style.fontWeight="normal";n=document.createElement("div");n.style.position="absolute";n.style.marginLeft="3px";n.style.marginBottom="12px";n.style.marginTop="2px";n.style.fontWeight="normal";n.style.width="76px";mxUtils.write(n,mxResources.get("lineend"));
-m.appendChild(n);var G,F,H=this.addUnitInput(m,"pt",74,33,function(){G.apply(this,arguments)}),J=this.addUnitInput(m,"pt",20,33,function(){F.apply(this,arguments)});mxUtils.br(m);z=document.createElement("div");z.style.height="8px";m.appendChild(z);n=n.cloneNode(!1);mxUtils.write(n,mxResources.get("linestart"));m.appendChild(n);var L,N,S=this.addUnitInput(m,"pt",74,33,function(){L.apply(this,arguments)}),W=this.addUnitInput(m,"pt",20,33,function(){N.apply(this,arguments)});mxUtils.br(m);this.addLabel(m,
+m.appendChild(n);var F,G,H=this.addUnitInput(m,"pt",74,33,function(){F.apply(this,arguments)}),J=this.addUnitInput(m,"pt",20,33,function(){G.apply(this,arguments)});mxUtils.br(m);z=document.createElement("div");z.style.height="8px";m.appendChild(z);n=n.cloneNode(!1);mxUtils.write(n,mxResources.get("linestart"));m.appendChild(n);var L,N,S=this.addUnitInput(m,"pt",74,33,function(){L.apply(this,arguments)}),W=this.addUnitInput(m,"pt",20,33,function(){N.apply(this,arguments)});mxUtils.br(m);this.addLabel(m,
mxResources.get("spacing"),74,50);this.addLabel(m,mxResources.get("size"),20,50);mxUtils.br(m);g=g.cloneNode(!1);g.style.fontWeight="normal";g.style.position="relative";g.style.paddingLeft="16px";g.style.marginBottom="2px";g.style.marginTop="6px";g.style.borderWidth="0px";g.style.paddingBottom="18px";n=document.createElement("div");n.style.position="absolute";n.style.marginLeft="3px";n.style.marginBottom="12px";n.style.marginTop="1px";n.style.fontWeight="normal";n.style.width="120px";mxUtils.write(n,
mxResources.get("perimeter"));g.appendChild(n);var Q,C=this.addUnitInput(g,"pt",20,41,function(){Q.apply(this,arguments)});e.edges.length==b.getSelectionCount()?(a.appendChild(l),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(m)):e.vertices.length==b.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(g));var O=mxUtils.bind(this,function(a,c,f){function g(b,a,c,f){c=c.getElementsByTagName("div")[0];c.className=d.getCssClassForMarker(f,e.style.shape,b,a);return c}
e=this.format.getSelectionState();mxUtils.getValue(e.style,p,null);if(f||document.activeElement!=u)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),u.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=v)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),v.value=isNaN(a)?"":a+" pt";k.style.visibility="connector"==e.style.shape?"":"hidden";"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?k.value="curved":"1"==mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,
@@ -2962,8 +2962,8 @@ c&&"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?a.className="geS
"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal";t.getElementsByTagName("div")[0].className="link"==e.style.shape?"geSprite geSprite-linkedge":"flexArrow"==e.style.shape?"geSprite geSprite-arrow":"arrow"==e.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection";e.edges.length==b.getSelectionCount()?(q.style.display="",r.style.display="none"):(q.style.display="none",r.style.display="");a=g(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,
"startFill","1"),D,"start");c=g(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,"endFill","1"),A,"end");"arrow"==e.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-noarrow");mxUtils.setOpacity(x,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape?(mxUtils.setOpacity(D,30),mxUtils.setOpacity(A,
30)):(mxUtils.setOpacity(D,100),mxUtils.setOpacity(A,100));if(f||document.activeElement!=W)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),W.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=S)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),S.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=J)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),J.value=isNaN(a)?
-"":a+" pt";if(f||document.activeElement!=S)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),H.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=C)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),C.value=isNaN(a)?"":a+" pt"});N=this.installInputHandler(W,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");L=this.installInputHandler(S,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");F=this.installInputHandler(J,
-mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");G=this.installInputHandler(H,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");Q=this.installInputHandler(C,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(u,O);this.addKeyHandler(W,O);this.addKeyHandler(S,O);this.addKeyHandler(J,O);this.addKeyHandler(H,O);this.addKeyHandler(C,O);b.getModel().addListener(mxEvent.CHANGE,O);this.listeners.push({destroy:function(){b.getModel().removeListener(O)}});
+"":a+" pt";if(f||document.activeElement!=S)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),H.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=C)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),C.value=isNaN(a)?"":a+" pt"});N=this.installInputHandler(W,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");L=this.installInputHandler(S,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");G=this.installInputHandler(J,
+mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");F=this.installInputHandler(H,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");Q=this.installInputHandler(C,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(u,O);this.addKeyHandler(W,O);this.addKeyHandler(S,O);this.addKeyHandler(J,O);this.addKeyHandler(H,O);this.addKeyHandler(C,O);b.getModel().addListener(mxEvent.CHANGE,O);this.listeners.push({destroy:function(){b.getModel().removeListener(O)}});
O();return a};
StyleFormatPanel.prototype.addEffects=function(a){var c=this.editorUi.editor.graph,f=this.format.getSelectionState();a.style.paddingTop="0px";a.style.paddingBottom="2px";var d=document.createElement("table");mxClient.IS_QUIRKS&&(d.style.fontSize="1em");d.style.width="100%";d.style.fontWeight="bold";d.style.paddingRight="20px";var b=document.createElement("tbody"),e=document.createElement("tr");e.style.padding="0px";var g=document.createElement("td");g.style.padding="0px";g.style.width="50%";g.setAttribute("valign",
"top");var k=g.cloneNode(!0);k.style.paddingLeft="8px";e.appendChild(g);e.appendChild(k);b.appendChild(e);d.appendChild(b);a.appendChild(d);var l=g,m=0,n=mxUtils.bind(this,function(b,a,d){b=this.createCellOption(b,a,d);b.style.width="100%";l.appendChild(b);l=l==g?k:g;m++}),p=mxUtils.bind(this,function(b,d,e){f=this.format.getSelectionState();g.innerHTML="";k.innerHTML="";l=g;f.rounded&&n(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);"swimlane"==f.style.shape&&n(mxResources.get("divider"),
@@ -3932,12 +3932,12 @@ q.vertex=!0;var t=new mxCell("",new mxGeometry(370,477,10,5),"shape\x3dtriangle;
v.vertex=!0;var z=new mxCell("",new mxGeometry(780,477,10,5),"shape\x3dtriangle;strokeColor\x3dnone;fillColor\x3d#000000;direction\x3dsouth;");z.vertex=!0;var y=new mxCell("Send to Group",new mxGeometry(0,520,200,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rect;strokeColor\x3dnone;fillColor\x3dnone;fontColor\x3d#999999;align\x3dleft;spacingLeft\x3d5;whiteSpace\x3dwrap;");y.vertex=!0;var x=new mxCell("Top Management",new mxGeometry(10,543,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.checkbox;fontSize\x3d12;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;labelPosition\x3dright;spacingLeft\x3d5;");
x.vertex=!0;var D=new mxCell("Marketing Department",new mxGeometry(10,563,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;fontSize\x3d12;rSize\x3d3;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;labelPosition\x3dright;spacingLeft\x3d5;");D.vertex=!0;var A=new mxCell("Design Department",new mxGeometry(10,583,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.checkbox;fontSize\x3d12;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;labelPosition\x3dright;spacingLeft\x3d5;");
A.vertex=!0;var B=new mxCell("Financial Department",new mxGeometry(10,603,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;fontSize\x3d12;rSize\x3d3;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;labelPosition\x3dright;spacingLeft\x3d5;");B.vertex=!0;var E=new mxCell("Supply Department",new mxGeometry(10,623,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;fontSize\x3d12;rSize\x3d3;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;labelPosition\x3dright;spacingLeft\x3d5;");
-E.vertex=!0;var G=new mxCell("Set Type",new mxGeometry(410,520,200,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rect;strokeColor\x3dnone;fillColor\x3dnone;fontColor\x3d#999999;align\x3dleft;spacingLeft\x3d5;whiteSpace\x3dwrap;");G.vertex=!0;var F=new mxCell("",new mxGeometry(420,543,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");F.vertex=!0;var H=new mxCell("News",new mxGeometry(440,543,40,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#58B957;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");
+E.vertex=!0;var F=new mxCell("Set Type",new mxGeometry(410,520,200,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rect;strokeColor\x3dnone;fillColor\x3dnone;fontColor\x3d#999999;align\x3dleft;spacingLeft\x3d5;whiteSpace\x3dwrap;");F.vertex=!0;var G=new mxCell("",new mxGeometry(420,543,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");G.vertex=!0;var H=new mxCell("News",new mxGeometry(440,543,40,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#58B957;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");
H.vertex=!0;var J=new mxCell("",new mxGeometry(420,563,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.radioButton;strokeColor\x3d#999999;fillColor\x3d#ffffff;");J.vertex=!0;var L=new mxCell("Reports",new mxGeometry(440,563,50,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#55BFE0;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");L.vertex=!0;var N=new mxCell("",new mxGeometry(420,
583,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");N.vertex=!0;var S=new mxCell("Documents",new mxGeometry(440,583,70,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#EFAC43;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");S.vertex=!0;var W=new mxCell("",new mxGeometry(420,603,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");
W.vertex=!0;var Q=new mxCell("Media",new mxGeometry(440,603,40,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#3D8BCD;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");Q.vertex=!0;var C=new mxCell("",new mxGeometry(420,623,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");C.vertex=!0;var O=new mxCell("Text",new mxGeometry(440,623,30,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#999999;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");
O.vertex=!0;var P=new mxCell("Save Template",new mxGeometry(0,680,150,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d5;strokeColor\x3dnone;fillColor\x3d#3D8BCD;fontColor\x3d#ffffff;fontSize\x3d16;whiteSpace\x3dwrap;");P.vertex=!0;var M=new mxCell("Cancel",new mxGeometry(170,680,100,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;fillColor\x3d#ffffff;align\x3dcenter;rSize\x3d5;strokeColor\x3d#dddddd;fontSize\x3d16;whiteSpace\x3dwrap;");
-M.vertex=!0;var V=new mxCell("Delete Template",new mxGeometry(630,680,170,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d5;strokeColor\x3dnone;fillColor\x3d#DB524C;fontColor\x3d#ffffff;fontSize\x3d16;whiteSpace\x3dwrap;");V.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,m,n,p,r,s,q,t,u,v,z,y,x,D,A,B,E,G,F,H,J,L,N,S,W,Q,C,O,P,M,V],800,720,"Edit Template")}),this.addEntry("bootstrap business contact",function(){var c=new mxCell("",new mxGeometry(0,
+M.vertex=!0;var V=new mxCell("Delete Template",new mxGeometry(630,680,170,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d5;strokeColor\x3dnone;fillColor\x3d#DB524C;fontColor\x3d#ffffff;fontSize\x3d16;whiteSpace\x3dwrap;");V.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,m,n,p,r,s,q,t,u,v,z,y,x,D,A,B,E,F,G,H,J,L,N,S,W,Q,C,O,P,M,V],800,720,"Edit Template")}),this.addEntry("bootstrap business contact",function(){var c=new mxCell("",new mxGeometry(0,
0,800,50),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.horLines;strokeColor\x3d#dddddd;fillColor\x3d#fdfdfd;");c.vertex=!0;var d=new mxCell("2 fields selected",new mxGeometry(0,0.5,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.checkbox;strokeColor\x3d#dddddd;fillColor\x3dnone;align\x3dleft;labelPosition\x3dright;spacingLeft\x3d10;fontStyle\x3d1;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(13,-7);d.vertex=!0;c.insert(d);d=new mxCell("Mark as OK",new mxGeometry(0,
0.5,90,30),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#dddddd;;fillColor\x3d#ffffff;whiteSpace\x3dwrap;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(150,-15);d.vertex=!0;c.insert(d);d=new mxCell("Mark as Violation",new mxGeometry(0,0.5,120,30),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#dddddd;;fillColor\x3d#ffffff;whiteSpace\x3dwrap;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(250,
-15);d.vertex=!0;c.insert(d);d=new mxCell("Mark all as OK",new mxGeometry(1,0.5,100,30),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#dddddd;;fillColor\x3d#ffffff;whiteSpace\x3dwrap;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(-110,-15);d.vertex=!0;c.insert(d);d=new mxCell("Phone",new mxGeometry(40,70,100,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rect;strokeColor\x3dnone;fillColor\x3dnone;fontColor\x3d#999999;align\x3dleft;spacingLeft\x3d5;whiteSpace\x3dwrap;");
@@ -7015,31 +7015,32 @@ a.showDialog(b.container,300,80,!0,!0);b.init()}),c.className="geBtn",m.appendCh
u.style.marginTop="0px";u.style.marginBottom="24px";q.appendChild(u);mxUtils.write(q,mxResources.get("filename")+":");var v=document.createElement("input");v.setAttribute("value",c);v.style.width="280px";v.style.marginLeft="10px";v.style.marginBottom="20px";this.init=function(){v.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null)};q.appendChild(v);mxUtils.br(q);var z=document.createElement("div");z.style.textAlign="center";t?(z.style.marginTop=
"6px",q.appendChild(z)):mxUtils.write(q,mxResources.get("chooseAnOption")+":");var y=document.createElement("select");y.style.marginLeft="10px";"function"===typeof window.DriveClient&&(b=document.createElement("option"),b.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(b,mxResources.get("googleDrive")),y.appendChild(b),p(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive"));"function"===typeof window.DropboxClient&&(b=document.createElement("option"),b.setAttribute("value",
App.MODE_DROPBOX),mxUtils.write(b,mxResources.get("dropbox")),y.appendChild(b),a.mode==App.MODE_DROPBOX&&b.setAttribute("selected","selected"),p(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox"));"function"===typeof window.OneDriveClient&&(b=document.createElement("option"),b.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(b,mxResources.get("oneDrive")),y.appendChild(b),a.mode==App.MODE_ONEDRIVE&&b.setAttribute("selected","selected"),p(IMAGE_PATH+"/onedrive-logo.svg",
-mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive"));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&!mxClient.IS_IOS)b=document.createElement("option"),b.setAttribute("value",App.MODE_DEVICE),mxUtils.write(b,mxResources.get("device")),y.appendChild(b),(a.mode==App.MODE_DEVICE||!k)&&b.setAttribute("selected","selected"),n&&(mxUtils.br(z),p(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE));k&&isLocalStorage&&(k=document.createElement("option"),
-k.setAttribute("value",App.MODE_BROWSER),mxUtils.write(k,mxResources.get("browser")),y.appendChild(k),a.mode==App.MODE_BROWSER&&k.setAttribute("selected","selected"),p(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));k=document.createElement("div");k.style.marginTop=t?"26px":"38px";k.style.textAlign=t?"center":"right";t||(q.appendChild(y),mxEvent.addListener(y,"change",r),r());null!=m&&(b=mxUtils.button(mxResources.get("help"),function(){window.open(m)}),b.className="geBtn",
-k.appendChild(b));b=mxUtils.button(mxResources.get("cancel"),function(){null!=d?d():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});b.className="geBtn";a.editor.cancelFirst&&k.appendChild(b);null==d&&(u=mxUtils.button(mxResources.get("decideLater"),function(){s(null)}),u.className="geBtn",k.appendChild(u));l&&(l=mxUtils.button(mxResources.get("openInNewWindow"),function(){s("_blank")}),l.className="geBtn",k.appendChild(l));if(!mxClient.IS_IOS||!t)e=mxUtils.button(e||
-mxResources.get("create"),function(){s(n?"download":t?App.MODE_DEVICE:y.value)}),e.className="geBtn gePrimaryBtn",k.appendChild(e);a.editor.cancelFirst||k.appendChild(b);mxEvent.addListener(v,"keypress",function(b){13==b.keyCode?s(t?App.MODE_DEVICE:y.value):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});q.appendChild(k);this.container=q},PopupDialog=function(a,c,f,d,b){b=null!=b?b:!0;var e=document.createElement("div");e.style.textAlign="left";mxUtils.write(e,mxResources.get("fileOpenLocation"));
-mxUtils.br(e);mxUtils.br(e);var g=mxUtils.button(mxResources.get("openInThisWindow"),function(){b&&a.hideDialog();null!=d&&d()});g.className="geBtn";g.style.marginBottom="8px";g.style.width="280px";e.appendChild(g);mxUtils.br(e);var k=mxUtils.button(mxResources.get("openInNewWindow"),function(){b&&a.hideDialog();null!=f&&f();window.open(c)});k.className="geBtn gePrimaryBtn";k.style.width=g.style.width;e.appendChild(k);mxUtils.br(e);mxUtils.br(e);mxUtils.write(e,mxResources.get("allowPopups"));this.container=
-e},ImageDialog=function(a,c,f,d,b,e){e=null!=e?e:!0;var g=a.editor.graph,k=document.createElement("div");mxUtils.write(k,c);c=document.createElement("div");c.className="geTitle";c.style.backgroundColor="transparent";c.style.borderColor="transparent";c.style.whiteSpace="nowrap";c.style.textOverflow="clip";c.style.cursor="default";mxClient.IS_VML||(c.style.paddingRight="20px");var l=document.createElement("input");l.setAttribute("value",f);l.setAttribute("type","text");l.style.marginTop="6px";l.style.width=
-(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";l.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";l.style.backgroundRepeat="no-repeat";l.style.backgroundPosition="100% 50%";l.style.paddingRight="14px";f=document.createElement("div");f.setAttribute("title",mxResources.get("reset"));f.style.position="relative";f.style.left="-16px";f.style.width="12px";f.style.height="14px";f.style.cursor="pointer";f.style.display=mxClient.IS_VML?"inline":"inline-block";f.style.top=(mxClient.IS_VML?
-0:3)+"px";f.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(f,"click",function(){l.value="";l.focus()});c.appendChild(l);c.appendChild(f);k.appendChild(c);var m=function(b,c,f){var g="data:"==b.substring(0,5);(!a.isOffline()||g&&"undefined"===typeof chrome)&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(g){a.spinner.stop();a.hideDialog();var k=null!=c&&null!=f?Math.max(c/g.width,f/g.height):Math.min(1,Math.min(520/g.width,520/g.height));
-e&&(b=a.convertDataUri(b));d(b,Math.round(Number(g.width)*k),Math.round(Number(g.height)*k))},function(){a.spinner.stop();d(null);a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b=a.convertDataUri(b),c=null==c?120:c,f=null==f?100:f,a.hideDialog(),d(b,c,f))},n=function(c){if(null!=c&&0<c.length){var e=b?null:g.getModel().getGeometry(g.getSelectionCell());null!=e?m(c,e.width,e.height):m(c)}else a.hideDialog(),d(null)};this.init=function(){l.focus();if(Graph.fileSupport){l.setAttribute("placeholder",
-mxResources.get("dragImagesHere"));var b=k.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(d){if(null==c&&(!mxClient.IS_IE||10<document.documentMode))c=a.highlightElement(b);d.stopPropagation();d.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,
-0,0,a.maxImageSize,function(a,b,c,d,e,f){n(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(d)&&n(decodeURIComponent(d))}b.stopPropagation();b.preventDefault()}),!1)}};f=document.createElement("div");f.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";f.style.textAlign=
-"right";c=mxUtils.button(mxResources.get("cancel"),function(){a.spinner.stop();a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&f.appendChild(c);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(l.value=a.url));l.focus()};if("undefined"!=typeof google&&"undefined"!=typeof google.picker){if(Graph.fileSupport){var p=document.createElement("input");p.setAttribute("multiple",
-"multiple");p.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(p,"change",function(b){a.importFiles(p.files,0,0,a.maxImageSize,function(a,b,c,d,e,f){n(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0)});var r=mxUtils.button(mxResources.get("open"),function(){p.click()});r.className="geBtn";f.appendChild(r)}}r=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);
-a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0);a.movePickersToTop()});r.className="geBtn";f.appendChild(r);null!=a.drive&&"1"==urlParams.photos&&(r=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
-a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0);a.movePickersToTop()}))}),r.className="geBtn",f.appendChild(r))}mxEvent.addListener(l,"keypress",function(a){13==a.keyCode&&n(l.value)});r=mxUtils.button(mxResources.get("apply"),function(){n(l.value)});r.className="geBtn gePrimaryBtn";f.appendChild(r);a.editor.cancelFirst||f.appendChild(c);Graph.fileSupport&&(f.style.marginTop="120px",k.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",
-k.style.backgroundPosition="center 65%",k.style.backgroundRepeat="no-repeat",c=document.createElement("div"),c.style.position="absolute",c.style.width="420px",c.style.top="58%",c.style.textAlign="center",c.style.fontSize="18px",c.style.color="#a0c3ff",mxUtils.write(c,mxResources.get("dragImagesHere")),k.appendChild(c));k.appendChild(f);this.container=k};
-PrintDialog.prototype.create=function(a){function c(){p.value=Math.min(g,Math.max(parseInt(p.value),parseInt(n.value)));n.value=Math.min(g,Math.min(parseInt(p.value),parseInt(n.value)))}function f(a){var b=parseInt(F.value)/100;isNaN(b)&&(b=1,F.value="100 %");var b=0.75*b,c=d.getGraphBounds(),e=0,f=0,g=d.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,k=1/d.pageScale,l=q.checked;if(l)var k=parseInt(E.value),m=parseInt(G.value),k=Math.min(g.height*m/(c.height/d.view.scale),g.width*k/(c.width/d.view.scale));
+mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive"));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&!mxClient.IS_IOS)b=document.createElement("option"),b.setAttribute("value",App.MODE_DEVICE),mxUtils.write(b,mxResources.get("device")),y.appendChild(b),(a.mode==App.MODE_DEVICE||!k)&&b.setAttribute("selected","selected"),n&&(mxUtils.br(z),p(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE));k&&isLocalStorage&&"0"!=urlParams.browser&&
+(k=document.createElement("option"),k.setAttribute("value",App.MODE_BROWSER),mxUtils.write(k,mxResources.get("browser")),y.appendChild(k),a.mode==App.MODE_BROWSER&&k.setAttribute("selected","selected"),p(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));k=document.createElement("div");k.style.marginTop=t?"26px":"38px";k.style.textAlign=t?"center":"right";t||(q.appendChild(y),mxEvent.addListener(y,"change",r),r());null!=m&&(b=mxUtils.button(mxResources.get("help"),function(){window.open(m)}),
+b.className="geBtn",k.appendChild(b));b=mxUtils.button(mxResources.get("cancel"),function(){null!=d?d():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});b.className="geBtn";a.editor.cancelFirst&&k.appendChild(b);null==d&&(u=mxUtils.button(mxResources.get("decideLater"),function(){s(null)}),u.className="geBtn",k.appendChild(u));l&&(l=mxUtils.button(mxResources.get("openInNewWindow"),function(){s("_blank")}),l.className="geBtn",k.appendChild(l));if(!mxClient.IS_IOS||
+!t)e=mxUtils.button(e||mxResources.get("create"),function(){s(n?"download":t?App.MODE_DEVICE:y.value)}),e.className="geBtn gePrimaryBtn",k.appendChild(e);a.editor.cancelFirst||k.appendChild(b);mxEvent.addListener(v,"keypress",function(b){13==b.keyCode?s(t?App.MODE_DEVICE:y.value):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});q.appendChild(k);this.container=q},PopupDialog=function(a,c,f,d,b){b=null!=b?b:!0;var e=document.createElement("div");e.style.textAlign="left";mxUtils.write(e,
+mxResources.get("fileOpenLocation"));mxUtils.br(e);mxUtils.br(e);var g=mxUtils.button(mxResources.get("openInThisWindow"),function(){b&&a.hideDialog();null!=d&&d()});g.className="geBtn";g.style.marginBottom="8px";g.style.width="280px";e.appendChild(g);mxUtils.br(e);var k=mxUtils.button(mxResources.get("openInNewWindow"),function(){b&&a.hideDialog();null!=f&&f();window.open(c)});k.className="geBtn gePrimaryBtn";k.style.width=g.style.width;e.appendChild(k);mxUtils.br(e);mxUtils.br(e);mxUtils.write(e,
+mxResources.get("allowPopups"));this.container=e},ImageDialog=function(a,c,f,d,b,e){e=null!=e?e:!0;var g=a.editor.graph,k=document.createElement("div");mxUtils.write(k,c);c=document.createElement("div");c.className="geTitle";c.style.backgroundColor="transparent";c.style.borderColor="transparent";c.style.whiteSpace="nowrap";c.style.textOverflow="clip";c.style.cursor="default";mxClient.IS_VML||(c.style.paddingRight="20px");var l=document.createElement("input");l.setAttribute("value",f);l.setAttribute("type",
+"text");l.style.marginTop="6px";l.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";l.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";l.style.backgroundRepeat="no-repeat";l.style.backgroundPosition="100% 50%";l.style.paddingRight="14px";f=document.createElement("div");f.setAttribute("title",mxResources.get("reset"));f.style.position="relative";f.style.left="-16px";f.style.width="12px";f.style.height="14px";f.style.cursor="pointer";f.style.display=mxClient.IS_VML?
+"inline":"inline-block";f.style.top=(mxClient.IS_VML?0:3)+"px";f.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(f,"click",function(){l.value="";l.focus()});c.appendChild(l);c.appendChild(f);k.appendChild(c);var m=function(b,c,f){var g="data:"==b.substring(0,5);(!a.isOffline()||g&&"undefined"===typeof chrome)&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(g){a.spinner.stop();a.hideDialog();var k=null!=c&&null!=f?Math.max(c/g.width,f/
+g.height):Math.min(1,Math.min(520/g.width,520/g.height));e&&(b=a.convertDataUri(b));d(b,Math.round(Number(g.width)*k),Math.round(Number(g.height)*k))},function(){a.spinner.stop();d(null);a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b=a.convertDataUri(b),c=null==c?120:c,f=null==f?100:f,a.hideDialog(),d(b,c,f))},n=function(c){if(null!=c&&0<c.length){var e=b?null:g.getModel().getGeometry(g.getSelectionCell());null!=e?m(c,e.width,e.height):m(c)}else a.hideDialog(),
+d(null)};this.init=function(){l.focus();if(Graph.fileSupport){l.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=k.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(d){if(null==c&&(!mxClient.IS_IE||10<document.documentMode))c=a.highlightElement(b);d.stopPropagation();d.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,
+function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,function(a,b,c,d,e,f){n(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(d)&&n(decodeURIComponent(d))}b.stopPropagation();
+b.preventDefault()}),!1)}};f=document.createElement("div");f.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";f.style.textAlign="right";c=mxUtils.button(mxResources.get("cancel"),function(){a.spinner.stop();a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&f.appendChild(c);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(l.value=a.url));l.focus()};if("undefined"!=typeof google&&
+"undefined"!=typeof google.picker){if(Graph.fileSupport){var p=document.createElement("input");p.setAttribute("multiple","multiple");p.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(p,"change",function(b){a.importFiles(p.files,0,0,a.maxImageSize,function(a,b,c,d,e,f){n(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0)});var r=mxUtils.button(mxResources.get("open"),function(){p.click()});r.className=
+"geBtn";f.appendChild(r)}}r=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0);a.movePickersToTop()});r.className="geBtn";f.appendChild(r);null!=a.drive&&"1"==urlParams.photos&&(r=mxUtils.button(mxResources.get("googlePlus"),
+function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0);
+a.movePickersToTop()}))}),r.className="geBtn",f.appendChild(r))}mxEvent.addListener(l,"keypress",function(a){13==a.keyCode&&n(l.value)});r=mxUtils.button(mxResources.get("apply"),function(){n(l.value)});r.className="geBtn gePrimaryBtn";f.appendChild(r);a.editor.cancelFirst||f.appendChild(c);Graph.fileSupport&&(f.style.marginTop="120px",k.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",k.style.backgroundPosition="center 65%",k.style.backgroundRepeat="no-repeat",c=document.createElement("div"),
+c.style.position="absolute",c.style.width="420px",c.style.top="58%",c.style.textAlign="center",c.style.fontSize="18px",c.style.color="#a0c3ff",mxUtils.write(c,mxResources.get("dragImagesHere")),k.appendChild(c));k.appendChild(f);this.container=k};
+PrintDialog.prototype.create=function(a){function c(){p.value=Math.min(g,Math.max(parseInt(p.value),parseInt(n.value)));n.value=Math.min(g,Math.min(parseInt(p.value),parseInt(n.value)))}function f(a){var b=parseInt(G.value)/100;isNaN(b)&&(b=1,G.value="100 %");var b=0.75*b,c=d.getGraphBounds(),e=0,f=0,g=d.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,k=1/d.pageScale,l=q.checked;if(l)var k=parseInt(E.value),m=parseInt(F.value),k=Math.min(g.height*m/(c.height/d.view.scale),g.width*k/(c.width/d.view.scale));
else k=parseInt(s.value)/100*d.pageScale,isNaN(k)&&(b=1/d.pageScale,s.value="100 %");g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*b);g.height=Math.ceil(g.height*b);k*=b;!l&&d.pageVisible?(b=d.getPageLayout(),e-=b.x*g.width,f-=b.y*g.height):l=!0;return PrintDialog.showPreview(PrintDialog.createPrintPreview(d,k,g,0,e,f,l,a),a)}var d=a.editor.graph,b=document.createElement("div"),e=document.createElement("h3");e.style.marginTop="0px";mxUtils.write(e,mxResources.get("print"));b.appendChild(e);
var g=1,k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";l.setAttribute("value","all");l.setAttribute("type","radio");l.setAttribute("name","pages");k.appendChild(l);e=document.createElement("span");mxUtils.write(e,mxResources.get("printAllPages"));k.appendChild(e);mxUtils.br(k);var m=l.cloneNode(!0);m.setAttribute("value","range");
k.appendChild(m);l.setAttribute("checked","checked");e=document.createElement("span");mxUtils.write(e,mxResources.get("pages")+":");k.appendChild(e);var n=document.createElement("input");n.style.cssText="margin:0 8px 0 8px;";n.setAttribute("value","1");n.setAttribute("type","number");n.setAttribute("min","1");n.style.width="50px";k.appendChild(n);e=document.createElement("span");mxUtils.write(e,mxResources.get("to"));k.appendChild(e);var p=n.cloneNode(!0);k.appendChild(p);mxEvent.addListener(n,"focus",
function(){m.checked=!0});mxEvent.addListener(p,"focus",function(){m.checked=!0});mxEvent.addListener(n,"change",c);mxEvent.addListener(p,"change",c);n.setAttribute("max",g);p.setAttribute("max",g);1<g&&b.appendChild(k);l=document.createElement("div");l.style.marginBottom="10px";var r=document.createElement("input");r.style.marginRight="8px";r.setAttribute("value","adjust");r.setAttribute("type","radio");r.setAttribute("name","printZoom");l.appendChild(r);e=document.createElement("span");mxUtils.write(e,
mxResources.get("adjustTo"));l.appendChild(e);var s=document.createElement("input");s.style.cssText="margin:0 8px 0 8px;";s.setAttribute("value","100 %");s.style.width="50px";l.appendChild(s);mxEvent.addListener(s,"focus",function(){r.checked=!0});b.appendChild(l);var k=k.cloneNode(!1),q=r.cloneNode(!0);q.setAttribute("value","fit");r.setAttribute("checked","checked");e=document.createElement("div");e.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";e.appendChild(q);
k.appendChild(e);l=document.createElement("table");l.style.display="inline-block";var t=document.createElement("tbody"),u=document.createElement("tr"),v=u.cloneNode(!0),z=document.createElement("td"),y=z.cloneNode(!0),x=z.cloneNode(!0),D=z.cloneNode(!0),A=z.cloneNode(!0),B=z.cloneNode(!0);z.style.textAlign="right";D.style.textAlign="right";mxUtils.write(z,mxResources.get("fitTo"));var E=document.createElement("input");E.style.cssText="margin:0 8px 0 8px;";E.setAttribute("value","1");E.setAttribute("min",
-"1");E.setAttribute("type","number");E.style.width="40px";y.appendChild(E);e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsAcross"));x.appendChild(e);mxUtils.write(D,mxResources.get("fitToBy"));var G=E.cloneNode(!0);A.appendChild(G);mxEvent.addListener(E,"focus",function(){q.checked=!0});mxEvent.addListener(G,"focus",function(){q.checked=!0});e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsDown"));B.appendChild(e);u.appendChild(z);u.appendChild(y);
-u.appendChild(x);v.appendChild(D);v.appendChild(A);v.appendChild(B);t.appendChild(u);t.appendChild(v);l.appendChild(t);k.appendChild(l);b.appendChild(k);k=document.createElement("div");e=document.createElement("span");mxUtils.write(e,mxResources.get("paperSize"));k.appendChild(e);var F=document.createElement("input");F.style.cssText="margin:0 8px 0 8px;";F.setAttribute("value","100 %");F.style.width="60px";k.appendChild(F);b.appendChild(k);e=document.createElement("div");e.style.cssText="text-align:right;margin:36px 0 0 0;";
+"1");E.setAttribute("type","number");E.style.width="40px";y.appendChild(E);e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsAcross"));x.appendChild(e);mxUtils.write(D,mxResources.get("fitToBy"));var F=E.cloneNode(!0);A.appendChild(F);mxEvent.addListener(E,"focus",function(){q.checked=!0});mxEvent.addListener(F,"focus",function(){q.checked=!0});e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsDown"));B.appendChild(e);u.appendChild(z);u.appendChild(y);
+u.appendChild(x);v.appendChild(D);v.appendChild(A);v.appendChild(B);t.appendChild(u);t.appendChild(v);l.appendChild(t);k.appendChild(l);b.appendChild(k);k=document.createElement("div");e=document.createElement("span");mxUtils.write(e,mxResources.get("paperSize"));k.appendChild(e);var G=document.createElement("input");G.style.cssText="margin:0 8px 0 8px;";G.setAttribute("value","100 %");G.style.width="60px";k.appendChild(G);b.appendChild(k);e=document.createElement("div");e.style.cssText="text-align:right;margin:36px 0 0 0;";
k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&e.appendChild(k);mxClient.IS_CHROMEAPP||(l=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),l.className="geBtn",e.appendChild(l));l=mxUtils.button(mxResources.get(mxClient.IS_CHROMEAPP?"ok":"print"),function(){a.hideDialog();f(!0)});l.className="geBtn gePrimaryBtn";e.appendChild(l);a.editor.cancelFirst||e.appendChild(k);b.appendChild(e);this.container=b};
var LinkDialog=function(a,c,f,d){var b=document.createElement("div");mxUtils.write(b,mxResources.get("editLink")+":");var e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";mxClient.IS_VML||(e.style.paddingRight="20px");var g=document.createElement("input");g.setAttribute("value",c);g.setAttribute("placeholder",mxResources.get("dragUrlsHere"));
g.setAttribute("type","text");g.style.marginTop="6px";g.style.width="400px";g.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";g.style.backgroundRepeat="no-repeat";g.style.backgroundPosition="100% 50%";g.style.paddingRight="14px";c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.position="relative";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";c.style.display=mxClient.IS_VML?"inline":"inline-block";c.style.top=
@@ -7067,24 +7068,24 @@ mxUtils.setOpacity(t,20);var u=mxUtils.button("",function(){null!=p&&(g.zoomActu
"\x26format\x3dxml"+c)).simulate(document,"_blank"))}});z.className="geBtn";z.setAttribute("disabled","disabled");var y=mxUtils.button(mxResources.get("restore"),function(){null!=p&&null!=r&&a.confirm(mxResources.get("areYouSure"),function(){a.spinner.spin(document.body,mxResources.get("restoring"))&&l.save(!0,function(b){a.spinner.stop();a.replaceFileData(r);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});
y.className="geBtn";y.setAttribute("disabled","disabled");var x=document.createElement("select");x.setAttribute("disabled","disabled");x.style.maxWidth="80px";x.style.position="relative";x.style.top="-2px";x.style.verticalAlign="bottom";x.style.marginRight="6px";x.style.display="none";var D=null;mxEvent.addListener(x,"change",function(a){null!=D&&(D(a),mxEvent.consume(a))});var A=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=p&&(window.openFile=new OpenFile(function(){window.openFile=
null}),window.openFile.setData(mxUtils.getXml(p.documentElement)),window.openWindow(a.getUrl()))});A.className="geBtn";A.setAttribute("disabled","disabled");var B=mxUtils.button(mxResources.get("show"),function(){null!=n&&window.open(n.getUrl())});B.className="geBtn gePrimaryBtn";B.setAttribute("disabled","disabled");d=document.createElement("div");d.style.position="absolute";d.style.top="482px";d.style.width="640px";d.style.textAlign="right";var E=document.createElement("div");E.className="geToolbarContainer";
-E.style.backgroundColor="transparent";E.style.padding="2px";E.style.border="none";E.style.left="199px";E.style.top="442px";var G=null;if(null==l||null==a.drive&&l.constructor==DriveFile||null==a.dropbox&&l.constructor==DropboxFile)e.style.display="none",E.style.display="none",mxUtils.write(b,mxResources.get("notAvailable"));else if(null!=c&&0<c.length){e.style.cursor="move";var F=document.createElement("table");F.style.border="1px solid lightGray";F.style.borderCollapse="collapse";F.style.borderSpacing=
-"0px";F.style.width="100%";var H=document.createElement("tbody"),J=(new Date).toDateString(),L=0;null!=a.currentPage&&null!=a.pages&&(L=mxUtils.indexOf(a.pages,a.currentPage));for(var N=c.length-1;0<=N;N--){var S=function(b){var d=new Date(b.modifiedDate),f=null;if(0<=d.getTime()){f=document.createElement("tr");f.style.borderBottom="1px solid lightGray";f.style.fontSize="12px";f.style.cursor="pointer";var E=document.createElement("td");E.style.padding="6px";E.style.whiteSpace="nowrap";b==c[c.length-
+E.style.backgroundColor="transparent";E.style.padding="2px";E.style.border="none";E.style.left="199px";E.style.top="442px";var F=null;if(null==l||null==a.drive&&l.constructor==DriveFile||null==a.dropbox&&l.constructor==DropboxFile)e.style.display="none",E.style.display="none",mxUtils.write(b,mxResources.get("notAvailable"));else if(null!=c&&0<c.length){e.style.cursor="move";var G=document.createElement("table");G.style.border="1px solid lightGray";G.style.borderCollapse="collapse";G.style.borderSpacing=
+"0px";G.style.width="100%";var H=document.createElement("tbody"),J=(new Date).toDateString(),L=0;null!=a.currentPage&&null!=a.pages&&(L=mxUtils.indexOf(a.pages,a.currentPage));for(var N=c.length-1;0<=N;N--){var S=function(b){var d=new Date(b.modifiedDate),f=null;if(0<=d.getTime()){f=document.createElement("tr");f.style.borderBottom="1px solid lightGray";f.style.fontSize="12px";f.style.cursor="pointer";var E=document.createElement("td");E.style.padding="6px";E.style.whiteSpace="nowrap";b==c[c.length-
1]?mxUtils.write(E,mxResources.get("current")):d.toDateString()===J?mxUtils.write(E,d.toLocaleTimeString()):mxUtils.write(E,d.toLocaleDateString()+" "+d.toLocaleTimeString());f.appendChild(E);f.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));var F=function(b){k.stop();var c=mxUtils.parseXml(b),m=a.editor.extractGraphModel(c.documentElement,!0);if(null!=m){x.style.display=
"none";x.innerHTML="";p=c;r=b;parseSelectFunction=null;var n=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,g.getModel());g.maxFitScale=1;g.fit(8);g.center();return a},E=function(b){null!=b&&(b=n(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b};if("mxfile"==m.nodeName){var F=m.getElementsByTagName("diagram");b=Math.min(L,F.length-1);
0<F.length&&E(F[b]);if(1<F.length){x.removeAttribute("disabled");x.style.display="";for(c=0;c<F.length;c++)m=document.createElement("option"),mxUtils.write(m,F[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),m.setAttribute("value",c),c==b&&m.setAttribute("selected","selected"),x.appendChild(m)}D=function(){L=x.value;E(F[L])}}else n(m);v.innerHTML="";mxUtils.write(v,d.toLocaleDateString()+" "+d.toLocaleTimeString());v.setAttribute("title",f.getAttribute("title"));s.removeAttribute("disabled");
q.removeAttribute("disabled");t.removeAttribute("disabled");u.removeAttribute("disabled");if(null==l||!l.isRestricted())a.editor.graph.isEnabled()&&y.removeAttribute("disabled"),z.removeAttribute("disabled"),B.removeAttribute("disabled"),A.removeAttribute("disabled");mxUtils.setOpacity(s,60);mxUtils.setOpacity(q,60);mxUtils.setOpacity(t,60);mxUtils.setOpacity(u,60)}else x.style.display="none",x.innerHTML="",v.innerHTML="",mxUtils.write(v,mxResources.get("errorLoadingFile"))};mxEvent.addListener(f,
"click",function(a){n!=b&&(k.stop(),null!=m&&(m.style.backgroundColor=""),n=b,m=f,m.style.backgroundColor="#ebf2f9",r=p=null,v.removeAttribute("title"),v.innerHTML=mxResources.get("loading")+"...",e.style.backgroundColor="#ffffff",g.getModel().clear(),y.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),s.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"),A.setAttribute("disabled",
"disabled"),B.setAttribute("disabled","disabled"),x.setAttribute("disabled","disabled"),mxUtils.setOpacity(s,20),mxUtils.setOpacity(q,20),mxUtils.setOpacity(t,20),mxUtils.setOpacity(u,20),k.spin(e),b.getXml(function(a){n==b&&F(a)},function(a){k.stop();x.style.display="none";x.innerHTML="";v.innerHTML="";mxUtils.write(v,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(f,"dblclick",function(a){B.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&
-document.selection.empty();mxEvent.consume(a)},!1);H.appendChild(f)}return f}(c[N]);null!=S&&N==c.length-1&&(G=S)}F.appendChild(H);b.appendChild(F)}else e.style.display="none",E.style.display="none",mxUtils.write(b,mxResources.get("noRevisions"));this.init=function(){null!=G&&G.click()};b=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});b.className="geBtn";E.appendChild(x);E.appendChild(s);E.appendChild(q);E.appendChild(u);E.appendChild(t);a.editor.cancelFirst?(d.appendChild(b),
+document.selection.empty();mxEvent.consume(a)},!1);H.appendChild(f)}return f}(c[N]);null!=S&&N==c.length-1&&(F=S)}G.appendChild(H);b.appendChild(G)}else e.style.display="none",E.style.display="none",mxUtils.write(b,mxResources.get("noRevisions"));this.init=function(){null!=F&&F.click()};b=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});b.className="geBtn";E.appendChild(x);E.appendChild(s);E.appendChild(q);E.appendChild(u);E.appendChild(t);a.editor.cancelFirst?(d.appendChild(b),
d.appendChild(z),d.appendChild(A),d.appendChild(y),d.appendChild(B)):(d.appendChild(z),d.appendChild(A),d.appendChild(y),d.appendChild(B),d.appendChild(b));f.appendChild(d);f.appendChild(E);f.appendChild(v);this.container=f},AnimationWindow=function(a,c,f,d,b){function e(a){for(var b=[],c=0;c<a.length;c++){var d=B.view.getState(a[c]);if(null!=d){for(var e=B.cellRenderer.getShapesForState(d),f=0;f<e.length;f++)null!=e[f]&&null!=e[f].node&&b.push(e[f].node);null!=d.control&&null!=d.control.node&&b.push(d.control.node)}}return b}
function g(a){if(null!=a){for(var b=0;b<a.length;b++)mxUtils.setPrefixedStyle(a[b].style,"transition",null),a[b].style.opacity="0";window.setTimeout(function(){for(var b=0;b<a.length;b++)mxUtils.setPrefixedStyle(a[b].style,"transition","all 1s ease-in-out"),a[b].style.opacity="1"},0)}}function k(a){if(null!=a){for(var b=0;b<a.length;b++)mxUtils.setPrefixedStyle(a[b].style,"transition",null),a[b].style.opacity="1";window.setTimeout(function(){for(var b=0;b<a.length;b++)mxUtils.setPrefixedStyle(a[b].style,
"transition","all 1s ease-in-out"),a[b].style.opacity="0"},0)}}function l(a){var b=a.absolutePoints.slice(),c=a.segments,d=a.length,e=b.length;return{execute:function(f,g){if(null!=a.shape){for(var k=[b[0]],l=d*f/g,m=1;m<e;m++)if(l<=c[m-1]){k.push(new mxPoint(b[m-1].x+(b[m].x-b[m-1].x)*l/c[m-1],b[m-1].y+(b[m].y-b[m-1].y)*l/c[m-1]));break}else l-=c[m-1],k.push(b[m]);a.shape.points=k;a.shape.redraw()}},stop:function(){null!=a.shape&&(a.shape.points=b,a.shape.redraw())}}}function m(a){var b=new mxRectangle.fromRectangle(a.shape.bounds),
c=null;null!=a.text&&null!=a.text.node&&null!=a.text.node.firstChild&&(c=a.text.node.firstChild.getAttribute("transform"));return{execute:function(d,e){if(null!=a.shape){var f=d/e;a.shape.bounds=new mxRectangle(b.x,b.y,b.width*f,b.height);a.shape.redraw();null!=c&&a.text.node.firstChild.setAttribute("transform",c+" scale("+f+",1)")}},stop:function(){null!=a.shape&&(a.shape.bounds=b,a.shape.redraw(),null!=c&&a.text.node.firstChild.setAttribute("transform",c))}}}function n(a,b,c){function d(){if(k==
b){window.clearInterval(n);for(var a=0;a<e.length;a++)e[a].stop()}else{for(a=0;a<e.length;a++)e[a].execute(k,b);k++}}b=null!=b?b:30;c=null!=c?c:30;for(var e=[],f=0;f<a.length;f++){var g=B.view.getState(a[f]);null!=g&&null!=g.shape&&B.model.isEdge(g.cell)&&null!=g.absolutePoints&&1<g.absolutePoints.length?e.push(l(g)):null!=g&&B.model.isVertex(g.cell)&&(null!=g.shape&&null!=g.shape.bounds)&&e.push(m(g))}var k=0,n=window.setInterval(d,c);d()}function p(a,b,c){c=null!=c?c:{};c[a.id]=b;for(var d=a.getChildCount(),
-e=0;e<d;e++)p(a.getChildAt(e),b.getChildAt(e),c);return c}function r(){if(!G){G=E=!0;B.getModel().clear();B.getModel().setRoot(B.cloneCells([a.editor.graph.getModel().getRoot()])[0]);B.maxFitScale=1;B.fit(8);B.center();B.getModel().beginUpdate();try{for(var b in B.getModel().cells){var c=B.getModel().cells[b];if(B.getModel().isVertex(c)||B.getModel().isEdge(c))B.setCellStyles("opacity","0",[c]),B.setCellStyles("noLabel","1",[c])}}finally{B.getModel().endUpdate()}var d=p(a.editor.graph.getModel().getRoot(),
-B.getModel().getRoot()),f=x.value.split("\n"),l=0,m=function(){if(E&&l<f.length){var a=f[l].split(" ");if(0<a.length)if("wait"==a[0]&&1<a.length)window.setTimeout(function(){l++;m()},parseFloat(a[1]));else{if(1<a.length){var c=d[a[1]];null!=c?"show"==a[0]?(B.setCellStyles("opacity","100",[c]),B.setCellStyles("noLabel",null,[c]),2<a.length&&"fade"==a[2]?g(e([c])):n([c])):"hide"==a[0]&&k(e([c])):console.log("cell not found",b,f[l])}l++;m()}}else G=!1};m()}}var s=document.createElement("table");s.style.width=
+e=0;e<d;e++)p(a.getChildAt(e),b.getChildAt(e),c);return c}function r(){if(!F){F=E=!0;B.getModel().clear();B.getModel().setRoot(B.cloneCells([a.editor.graph.getModel().getRoot()])[0]);B.maxFitScale=1;B.fit(8);B.center();B.getModel().beginUpdate();try{for(var b in B.getModel().cells){var c=B.getModel().cells[b];if(B.getModel().isVertex(c)||B.getModel().isEdge(c))B.setCellStyles("opacity","0",[c]),B.setCellStyles("noLabel","1",[c])}}finally{B.getModel().endUpdate()}var d=p(a.editor.graph.getModel().getRoot(),
+B.getModel().getRoot()),f=x.value.split("\n"),l=0,m=function(){if(E&&l<f.length){var a=f[l].split(" ");if(0<a.length)if("wait"==a[0]&&1<a.length)window.setTimeout(function(){l++;m()},parseFloat(a[1]));else{if(1<a.length){var c=d[a[1]];null!=c?"show"==a[0]?(B.setCellStyles("opacity","100",[c]),B.setCellStyles("noLabel",null,[c]),2<a.length&&"fade"==a[2]?g(e([c])):n([c])):"hide"==a[0]&&k(e([c])):console.log("cell not found",b,f[l])}l++;m()}}else F=!1};m()}}var s=document.createElement("table");s.style.width=
"100%";s.style.height="100%";var q=document.createElement("tbody"),t=document.createElement("tr"),u=document.createElement("td");u.style.width="140px";var v=document.createElement("td"),z=document.createElement("tr");z.style.height="40px";var y=document.createElement("td");y.setAttribute("colspan","2");var x=document.createElement("textarea");x.style.overflow="auto";x.style.width="100%";x.style.height="100%";u.appendChild(x);var D=a.editor.graph.getModel().getRoot();null!=D.value&&"object"==typeof D.value&&
-(x.value=D.value.getAttribute("animation"));var A=document.createElement("div");A.style.border="1px solid lightGray";A.style.background="#ffffff";A.style.width="100%";A.style.height="100%";A.style.overflow="auto";mxEvent.disableContextMenu(A);v.appendChild(A);var B=new Graph(A);B.setEnabled(!1);B.setPanning(!0);B.foldingEnabled=!1;B.panningHandler.ignoreCell=!0;B.panningHandler.useLeftButtonForPanning=!0;B.minFitScale=null;B.maxFitScale=null;B.centerZoom=!0;var E=!1,G=!1,A=mxUtils.button("Fade In",
+(x.value=D.value.getAttribute("animation"));var A=document.createElement("div");A.style.border="1px solid lightGray";A.style.background="#ffffff";A.style.width="100%";A.style.height="100%";A.style.overflow="auto";mxEvent.disableContextMenu(A);v.appendChild(A);var B=new Graph(A);B.setEnabled(!1);B.setPanning(!0);B.foldingEnabled=!1;B.panningHandler.ignoreCell=!0;B.panningHandler.useLeftButtonForPanning=!0;B.minFitScale=null;B.maxFitScale=null;B.centerZoom=!0;var E=!1,F=!1,A=mxUtils.button("Fade In",
function(){var b=a.editor.graph.getSelectionCells();if(0<b.length){for(var c=0;c<b.length;c++)x.value=x.value+"show "+b[c].id+" fade\n";x.value+="wait 1000\n"}});y.appendChild(A);A=mxUtils.button("Wipe In",function(){var b=a.editor.graph.getSelectionCells();if(0<b.length){for(var c=0;c<b.length;c++)x.value=x.value+"show "+b[c].id+"\n";x.value+="wait 1000\n"}});y.appendChild(A);A=mxUtils.button("Fade Out",function(){var b=a.editor.graph.getSelectionCells();if(0<b.length){for(var c=0;c<b.length;c++)x.value=
x.value+"hide "+b[c].id+"\n";x.value+="wait 1000\n"}});y.appendChild(A);A=mxUtils.button("Wait",function(){x.value+="wait 1000\n"});y.appendChild(A);A=mxUtils.button("Preview",function(){r()});y.appendChild(A);A=mxUtils.button("Stop",function(){E=!1;B.getModel().clear()});y.appendChild(A);A=mxUtils.button("Apply",function(){a.editor.graph.setAttributeForCell(D,"animation",x.value)});y.appendChild(A);D=a.editor.graph.getModel().getRoot();t.appendChild(u);t.appendChild(v);q.appendChild(t);z.appendChild(y);
q.appendChild(z);s.appendChild(q);this.window=new mxWindow("Animation",s,c,f,d,b,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0)},AuthDialog=function(a,c,f,d){var b=document.createElement("div");b.style.textAlign="center";var e=document.createElement("p");e.style.fontSize="16pt";e.style.padding="0px";e.style.margin="0px";e.style.color="gray";mxUtils.write(e,mxResources.get("authorizationRequired"));
@@ -7137,7 +7138,7 @@ m.value,f=mxUtils.parseXml(e),e=mxUtils.getPrettyXml(f.documentElement),f=f.docu
"stencil("+e+")",[c])}catch(k){throw k;}finally{b.getModel().endUpdate()}f&&b.setSelectionCell(c)}};f=mxUtils.button(mxResources.get("preview"),function(){s(n,p,!1)});f.className="geBtn";g.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){s(a.editor.graph,c,!0)});f.className="geBtn gePrimaryBtn";g.appendChild(f);a.editor.cancelFirst||g.appendChild(b);e.appendChild(g);l.appendChild(e);k.appendChild(l);this.container=k},CustomDialog=function(a,c,f,d,b,e){var g=document.createElement("div");
g.appendChild(c);c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="center";var k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d()});k.className="geBtn";a.editor.cancelFirst&&c.appendChild(k);if(!a.isOffline()&&null!=e){var l=mxUtils.button(mxResources.get("help"),function(){window.open(e)});l.className="geBtn";c.appendChild(l)}b=mxUtils.button(b||mxResources.get("ok"),function(){a.hideDialog();null!=f&&f()});c.appendChild(b);b.className="geBtn gePrimaryBtn";
a.editor.cancelFirst||c.appendChild(k);g.appendChild(c);this.container=g};
-(function(){EditorUi.VERSION="5.7.0.3";EditorUi.compactUi="atlas"!=uiTheme;"1"==urlParams.dev&&(Editor.prototype.editBlankUrl+="\x26dev\x3d1",Editor.prototype.editBlankFallbackUrl+="\x26dev\x3d1");(function(){EditorUi.prototype.useCanvasForExport=!1;try{var a=document.createElement("canvas"),b=new Image;b.onload=function(){try{a.getContext("2d").drawImage(b,0,0);var c=a.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=c&&6<c.length}catch(d){}};b.src="data:image/svg+xml;base64,"+
+(function(){EditorUi.VERSION="5.7.0.5";EditorUi.compactUi="atlas"!=uiTheme;"1"==urlParams.dev&&(Editor.prototype.editBlankUrl+="\x26dev\x3d1",Editor.prototype.editBlankFallbackUrl+="\x26dev\x3d1");(function(){EditorUi.prototype.useCanvasForExport=!1;try{var a=document.createElement("canvas"),b=new Image;b.onload=function(){try{a.getContext("2d").drawImage(b,0,0);var c=a.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=c&&6<c.length}catch(d){}};b.src="data:image/svg+xml;base64,"+
btoa(unescape(encodeURIComponent('\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" xmlns:xlink\x3d"http://www.w3.org/1999/xlink" width\x3d"1px" height\x3d"1px" version\x3d"1.1"\x3e\x3cforeignObject pointer-events\x3d"all" width\x3d"1" height\x3d"1"\x3e\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml"\x3e\x3c/div\x3e\x3c/foreignObject\x3e\x3c/svg\x3e')))}catch(c){}})();Editor.initMath=function(a,b){a=null!=a?a:"https://cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config\x3dTeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=
[];Editor.doMathJaxRender=function(a){MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(b||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});MathJax.Hub.Register.StartupHook("Begin",
function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.prototype.init=function(){this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,b){this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var c=document.getElementsByTagName("script");
@@ -7187,74 +7188,74 @@ document.createElement("input");r.setAttribute("type","text");mxUtils.write(k,"P
k=k.cloneNode(!1);k.appendChild(J);g.appendChild(k);f.appendChild(g);var k=k.cloneNode(!1),L=document.createElement("input");L.setAttribute("type","text");mxUtils.write(k,"Message:");L.value="Updated "+a+".png";g=g.cloneNode(!1);g.appendChild(k);k=k.cloneNode(!1);k.appendChild(L);g.appendChild(k);f.appendChild(g);k=k.cloneNode(!1);e.appendChild(f);c.appendChild(e);c=new FilenameDialog(this,null,mxResources.get("publish"),mxUtils.bind(this,function(){var a="https://api.github.com/repos/"+n.value+"/"+
p.value+"/contents/"+r.value+"?ref\x3d"+encodeURIComponent(J.value);d();mxUtils.get(a,mxUtils.bind(this,function(c){if(200==c.getStatus()||404==c.getStatus()){c=JSON.parse(c.getText());var e={path:r.value,message:L.value,content:b};null!=c.sha&&(e.sha=c.sha);var f=new XMLHttpRequest;f.onreadystatechange=mxUtils.bind(this,function(){if(4==f.readyState)if(200<=f.status&&300>f.status){this.spinner.stop();this.hideDialog();a="https://github.com/"+n.value+"/"+p.value+"/blob/"+J.value+"/"+r.value;var b=
new ErrorDialog(this,mxResources.get("published"),mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){window.open(a)}),!1);this.showDialog(b.container,340,170,!0,!1);b.init()}else d=this.spinner.pause(),this.handleError(JSON.parse(f.responseText))});f.open("PUT",a,!0);f.setRequestHeader("Authorization","Basic "+btoa(l.value+
-":"+m.value));f.send(JSON.stringify(e))}else this.hideDialog(),this.spinner.stop(),this.handleError(JSON.parse(c.getText()))}),mxUtils.bind(this,function(a){this.hideDialog();this.spinner.stop();this.handleError({message:mxResources.get("unknownError")})}))}),null,null,c,null,!1);this.showDialog(c.container,260,260,!0,!1);c.init()};EditorUi.prototype.uploadToImgur=function(a,b,c){var d=this.spinner.pause(),e=new ErrorDialog(this,mxResources.get("warning"),'\x3cimg style\x3d"max-width:300px;max-height:80px;margin-bottom:20px;padding:6px;border:1px solid gray;" src\x3d"data:image/png;base64,'+
-b+'"/\x3e\x3cbr\x3e'+mxResources.get("publishConfirmation"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("publish"),mxUtils.bind(this,function(){d();var e=null!=a.getTitle()?a.getTitle():this.defaultFilename,f=e.lastIndexOf("."),g=e;0<f&&(g=e=g.substring(0,f));var f=new mxXmlRequest("/imgur",JSON.stringify({type:"base64",image:b,name:g+".png",title:e,description:"Made with https://www.draw.io"}),"POST"),k=mxUtils.bind(this,function(a){var b={message:mxResources.get("unknownError")};
-try{var c=JSON.parse(a.getText()),b={message:c.message||c.data.error}}catch(d){}this.handleError(b)});f.send(mxUtils.bind(this,function(a){if(200==a.getStatus())try{var b=JSON.parse(a.getText());try{(new Image).src="log?severity\x3dCONFIG\x26msg\x3dimgur-published:"+b.data.id+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION)+"\x26ts\x3d"+(new Date).getTime()}catch(d){}var f=mxUtils.bind(this,function(){this.spinner.stop();var a="http://i.imgur.com/"+b.data.id+".png",c="https://www.draw.io/imgur?delete\x3d"+
-b.data.deletehash,a=new ErrorDialog(this,mxResources.get("published"),mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"])+"\x3cbr\x3e"+mxResources.get("deleteUrl",[c]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){window.open("http://imgur.com/"+b.data.id)}),!1);this.showDialog(a.container,340,170,!0,!1);a.init()});if(c){var g=new mxXmlRequest("/imgur?"+b.data.deletehash,
-JSON.stringify({title:e,description:"Edit a copy of this diagram at https://www.draw.io/i/"+b.data.id}),"POST");g.send(mxUtils.bind(this,function(){200==g.getStatus()?f():k(g)}),mxUtils.bind(this,function(){k(g)}))}else f()}catch(l){this.handleError(l)}else k(a)}),mxUtils.bind(this,function(a){k(a)}))}));this.showDialog(e.container,320,250,!0,!1);e.init()};EditorUi.prototype.publishImage=function(a){var b=this.getCurrentFile();null!=b&&(this.isExportToCanvas()?this.showExportDialog(!1,mxResources.get("publish"),
-"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(c,d,e,f,g){c=parseInt(c);if(!isNaN(c)&&0<c){c/=100;var k=this.editor.graph.isSelectionEmpty();e=null!=e?e:k;if(this.spinner.spin(document.body,mxResources.get("publishing")))try{this.exportToCanvas(mxUtils.bind(this,function(c){try{var d=g?mxUtils.getXml(this.editor.getGraphXml(e)):null,f=this.createPngDataUri(c,d);a(b,f.substring(f.lastIndexOf(",")+1),g)}catch(k){this.handleError(k)}}),null,null,null,mxUtils.bind(this,
-function(a){this.handleError(a)}),null,e,c||1,d,f)}catch(l){this.handleError(l)}}})):this.showRemoteExportDialog(mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(c,d){if(this.spinner.spin(document.body,mxResources.get("publishing"))){var e=this.editor.graph.getGraphBounds(),f=this.getFileData(!0,null,null,null,c);if(e.width*e.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE)try{var g=new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+
-(d?"1":"0")+"\x26xml\x3d"+encodeURIComponent(f));g.send(mxUtils.bind(this,function(){200==g.getStatus()?a(b,g.getText(),d):this.handleError(g)}))}catch(k){this.handleError(k)}else this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"))}})))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/
-86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,d){d()};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,f,g){g=null;null!=b&&(g=b.background,g==mxConstants.NONE&&(g=null));b=this.editor.graph.getSvg(g,null,null,null,null,f);b.setAttribute("content",encodeURIComponent(a));null!=
-c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(a))}));else return(!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(b)};EditorUi.prototype.exportToCanvas=
-function(a,b,c,d,e,f,g,k,l,m,n){f=null!=f?f:!0;var p=l?null:this.editor.graph.background;p==mxConstants.NONE&&(p=null);null==p&&(p=d);null==p&&!1==l&&(p="#ffffff");this.convertImages(this.editor.graph.getSvg(p,null,null,null,null,null!=g?g:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),l=parseInt(c.getAttribute("height"));k=null!=k?k:1;null!=b&&(k=!f?b/g:Math.min(1,Math.min(3*b/(4*l),
-b/g)));e.setAttribute("width",Math.ceil(k*g));e.setAttribute("height",Math.ceil(k*l));g=e.getContext("2d");g.scale(k,k);g.drawImage(d,0,0);a(e)});d.onerror=function(a){null!=e&&e(a)};try{m&&this.editor.addSvgShadow(c),this.convertMath(this.editor.graph,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))}catch(g){null!=e&&e(g)}}),c,n)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert;a.convert=function(c){null!=
-c&&(("http://"==c.substring(0,7)||"https://"==c.substring(0,8))&&c.substring(0,a.baseUrl.length)!=a.baseUrl?c=PROXY_URL+"?url\x3d"+encodeURIComponent(c):"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)));return c};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var e=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var k=a.getElementsByTagName(c),l=0;l<k.length;l++)mxUtils.bind(this,function(c){var k=d.convert(c.getAttribute(g));
-if(null!=k&&"data:"!=k.substring(0,5)){var l=f[k];null==l?(e++,this.convertImageToDataUri(k,function(d){null!=d&&(f[k]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,l)}})(k[l])});c("image","xlink:href");c("img","src");0==e&&b(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b()});else{var c=new Image;c.onload=function(){var a=document.createElement("canvas"),
-d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);b(a.toDataURL())};c.onerror=function(){b()};c.src=a}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),k=this.editor.extractGraphModel(g.documentElement);if(null!=k){var l=new mxGraphModel;(new mxCodec(k.ownerDocument)).decode(k,l);var m=this.editor.graph,n=l.getChildCount(l.getRoot());m.model.getChildCount(m.model.getRoot());m.model.beginUpdate();
-try{a={};for(g=0;g<n;g++){var p=l.getChildAt(l.getRoot(),g);if(1==n&&!m.isCellLocked(m.getDefaultParent()))var r=l.getChildren(p),f=f.concat(m.importCells(r,b,c,m.getDefaultParent(),null,a));else p=m.importCells([p],0,0,m.model.getRoot(),null,a)[0],r=m.model.getChildren(p),m.moveCells(r,b,c),f=f.concat(r)}if(d){m.isGridEnabled()&&(b=m.snap(b),c=m.snap(c));var s=m.getBoundingBoxFromGeometry(f,!0);m.moveCells(f,b-s.x,c-s.y)}}finally{m.model.endUpdate()}}}}catch(J){throw e||this.handleError(J,mxResources.get("invalidOrMissingFile")),
-J;}return f};EditorUi.prototype.insertTextAt=function(a,b,c,d,e,f){f=null!=f?f:!0;if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))return this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200==a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))})),[];if(!this.isOffline()&&(e||"data:"==a.substring(0,5)||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=
-this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var k=this.extractGraphModelFromPng(a),l=this.importXml(k,b,c,f,!0);if(0<l.length)return l}if("data:image/svg+xml;"==a.substring(0,19))try{if(k=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(k=a.substring(a.indexOf(",")+1),k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0)):k=decodeURIComponent(a.substring(a.indexOf(",")+1)),l=this.importXml(k,b,c,f,!0),0<l.length)return l}catch(m){}this.loadImage(a,mxUtils.bind(this,
-function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),d,e,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+this.convertDataUri(a)+";"))}),!0,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),f=Math.round(d.width*e);d=Math.round(d.height*e);g.setSelectionCell(g.insertVertex(null,
-null,"",g.snap(b),g.snap(c),f,d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+a+";"))}}),mxUtils.bind(this,function(){var e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,a,g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}));return[]}a=this.editor.graph.zapGremlins(mxUtils.trim(a));
-if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length){g=this.editor.graph;e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,"",g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.fireEvent(new mxEventObject("textInserted","cells",[e])),e.value=a,g.updateCellSize(e),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i.test(e.value)&&
-g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=g.gridSize}finally{g.getModel().endUpdate()}return[e]}};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,0.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,
-b){return/(\.*<graphml xmlns=\".*)/.test(a)||/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||null!=b&&/(\.vsdx)($|\?)/i.test(b)};EditorUi.prototype.importFile=function(a,b,c,d,e,f,g,k,l,m){m=null!=m?m:!0;var n=!1,p=null;"image"==b.substring(0,5)?(g=!1,"image/png"==b.substring(0,9)&&(b=this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(p=this.importXml(b,c,d,m),g=!0)),g||(p=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),m&&p.isGridEnabled()&&
-(c=p.snap(c),d=p.snap(d)),p=[p.insertVertex(null,null,"",c,d,e,f,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+a+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,g)?(n=!0,this.parseFile(null!=l?l:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){if(4==a.readyState){var b=null;200==a.status&&(b=this.importXml(a.responseText,c,d,m));null!=k&&k(b)}}),g)):/(\.vsdx)($|\?)/i.test(g)?
-(new mxVsdxModel).decode(l):p=this.insertTextAt(this.validateFileData(a),c,d,!0);!n&&null!=k&&k(p);return p};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,f,g;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="\x3d\x3d";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>
-2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);b+="\x3d";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>
-6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,f,g,k,l,m,n){var p=null!=b&&null!=c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;m=null!=m?m:this.maxImageBytes;l=null!=l?l:!0;var r=this.editor.graph,s=r.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){return null!=a&&"\x3cmxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):
-this.importFile(a,b,c,d,e,f,g,k,l,p)});f=null!=f?f:mxUtils.bind(this,function(a){r.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var J=a.length,L=J,N=[],S=mxUtils.bind(this,function(a,b){N[a]=b;if(0==--L){this.spinner.stop();if(null!=k)k(N);else{var c=[];r.getModel().beginUpdate();try{for(var d=0;d<N.length;d++){var e=N[d]();null!=e&&(c=c.concat(e))}}finally{r.getModel().endUpdate()}}f(c)}}),W=0;W<J;W++)mxUtils.bind(this,function(f){var k=a[f],p=new FileReader;
-p.onload=mxUtils.bind(this,function(a){if(null==g||g(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var q=a.target.result,p=q.indexOf(","),r=atob(q.substring(p+1)),y=mxUtils.parseXml(r),r=y.getElementsByTagName("svg");if(0<r.length){var D=r[0].getAttribute("content");null!=D&&"\x3c"!=D.charAt(0)&&"%"!=D.charAt(0)&&(D=unescape(window.atob?atob(D):Base64.decode(D,!0)));null!=D&&"%"==D.charAt(0)&&(D=decodeURIComponent(D));null!=D&&("\x3cmxfile "===D.substring(0,8)||"\x3cmxGraphModel "===
-D.substring(0,14))?S(f,mxUtils.bind(this,function(){return e(D,"text/xml",b+f*s,c+f*s,0,0,k.name)})):S(f,mxUtils.bind(this,function(){try{if(q.substring(0,p+1),null!=y){var a=y.getElementsByTagName("svg");if(0<a.length){var g=a[0],l=parseFloat(g.getAttribute("width")),m=parseFloat(g.getAttribute("height")),n=g.getAttribute("viewBox");if(null==n||0==n.length)g.setAttribute("viewBox","0 0 "+l+" "+m);else if(isNaN(l)||isNaN(m)){var r=n.split(" ");3<r.length&&(l=parseFloat(r[2]),m=parseFloat(r[3]))}q=
-this.createSvgDataUri(mxUtils.getXml(a[0]));var x=Math.min(1,Math.min(d/Math.max(1,l)),d/Math.max(1,m));return e(q,k.type,b+f*s,c+f*s,Math.max(1,Math.round(l*x)),Math.max(1,Math.round(m*x)),k.name)}}}catch(A){}return null}))}}else{r=!1;if("image/png"==k.type){var G=this.extractGraphModelFromPng(a.target.result);if(null!=G&&0<G.length){var F=new Image;F.src=a.target.result;S(f,mxUtils.bind(this,function(){return e(G,"text/xml",b+f*s,c+f*s,F.width,F.height,k.name)}));r=!0}}r||(null!=window.chrome&&
-null!=chrome.app&&null!=chrome.app.runtime?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,n,q){S(f,mxUtils.bind(this,function(){if(null!=g&&g.length<m){var p=!l||!this.isResampleImage(a.target.result)?
-1:Math.min(1,Math.min(d/n,d/q));return e(g,k.type,b+f*s,c+f*s,Math.round(n*p),Math.round(q*p),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),l,d,n)})))}else e(a.target.result,k.type,b+f*s,c+f*s,240,160,k.name,function(a){S(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)?e(null,k.type,b+f*s,c+f*s,240,160,k.name,function(a){S(f,function(){return a})},k):"image"==k.type.substring(0,5)?p.readAsDataURL(k):p.readAsText(k)})(W)};EditorUi.prototype.parseFile=
-function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1<l){var m=
-Math.round(g/l),n=Math.round(k/l),p=document.createElement("canvas");p.width=m;p.height=n;p.getContext("2d").drawImage(a,0,0,m,n);var r=p.toDataURL();if(r.length<b.length){var s=document.createElement("canvas");s.width=m;s.height=n;var J=s.toDataURL();r!==J&&(b=r,g=m,k=n)}}}catch(L){}c(b,g,k)};(function(){EditorUi.prototype.crcTable=[];for(var a=0;256>a;a++)for(var b=a,c=0;8>c;c++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[a]=b;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=
-0;e<d;e++)a=EditorUi.prototype.crcTable[(a^b[c+e])&255]^a>>>8;return a}})();EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=k;k+=b;return a.substring(c,k)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=
-e&&e();else{f(a,17);e=a.substring(0,k);do{var l=g(a);if("IDAT"==f(a,4)){e=a.substring(0,k-8);l=4294967295;l=this.updateCRC(l,b,0,4);l=this.updateCRC(l,d,0,d.length);e+=String.fromCharCode(c.length+d.length+1+("zTXt"==b?1:0)>>24&255,c.length+d.length+1+("zTXt"==b?1:0)>>16&255,c.length+d.length+1+("zTXt"==b?1:0)>>8&255,c.length+d.length+1+("zTXt"==b?1:0)&255)+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+String.fromCharCode((l^4294967295)>>24&255,(l^4294967295)>>16&255,(l^4294967295)>>
-8&255,(l^4294967295)&255);e+=a.substring(k-8,a.length);break}e+=a.substring(k-8,k-4+l);d=f(a,l);f(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,
-e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(e){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var k=EditorUi.prototype.init;
-EditorUi.prototype.init=function(){k.apply(this,arguments);var a=this.editor.graph,b=this;mxClient.IS_SVG&&this.editor.addSvgShadow(a.view.canvas.ownerSVGElement,null,!0);this.defaultFilename=mxResources.get("untitledDiagram");var c=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a&&null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:c.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=
-b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var d=this.actions.get("print");d.setEnabled(!mxClient.IS_IOS||!navigator.standalone);d.visible=d.isEnabled();if(!this.editor.chromeless){this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,
-!0,"insertEllipse",!0);mxClient.IS_IE||a.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a)&&!b.isEditing())try{for(var c=a.clipboardData||a.originalEvent.clipboardData,b=!1,d=0;d<c.types.length;d++)if("text/"===c.types[d].substring(0,5)){b=!0;break}if(!b){var e=c.items;for(index in e){var f=e[index];if("file"===f.kind){var g=this.editor.graph.getInsertPoint();this.importFiles([f.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(a);
-break}}}}catch(k){}}),!1);var e=document.createElement("div");e.style.position="absolute";e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.display="block";e.contentEditable=!0;mxUtils.setOpacity(e,0);e.style.width="1px";e.style.height="1px";e.innerHTML="\x26nbsp;";var f=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);
-if(null!=a.container&&a.isEnabled()&&!a.isMouseDown&&!a.isEditing()&&null==this.dialog&&"INPUT"!=c.nodeName&&"TEXTAREA"!=c.nodeName&&(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)&&!f)e.style.left=a.container.scrollLeft+10+"px",e.style.top=a.container.scrollTop+10+"px",a.container.appendChild(e),f=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){e.focus();document.execCommand("selectAll",!1,null)},0):(e.focus(),document.execCommand("selectAll",!1,null))}));var g=
-function(){window.setTimeout(function(){e.innerHTML="\x26nbsp;";e.focus();document.execCommand("selectAll",!1,null)},0)};mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){if(f&&(224==c||17==c||91==c))f=!1,!a.isEditing()&&null==this.dialog&&null!=a.container&&a.container.focus(),e.parentNode.removeChild(e)}),0)}));mxEvent.addListener(e,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(e),
-g())}));mxEvent.addListener(e,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&(this.copyCells(e,!0),g())}));mxEvent.addListener(e,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&(e.innerHTML="\x26nbsp;",e.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,e);e.innerHTML="\x26nbsp;"}),0))}),!0);var l=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==e?!0:l.apply(this,arguments)}}d=Math.max(document.body.clientHeight||
-0,document.documentElement.clientHeight||0)/2;this.spinner=this.createSpinner(document.body.clientWidth/2-2,d,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){if(null==d&&(!mxClient.IS_IE||
-10<document.documentMode))d=this.highlightElement(c);a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,
-"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",
-!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.test){d=document.getElementById("geFooter");null!=d&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width=
-"98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),d.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);
-this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var m=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:m.apply(this,arguments)}}d=document.getElementById("geInfo");null!=d&&d.parentNode.removeChild(d);if(Graph.fileSupport){var n=null;mxEvent.addListener(a.container,"dragleave",function(b){a.isEnabled()&&(null!=n&&(n.parentNode.removeChild(n),n=null),b.stopPropagation(),
-b.preventDefault())});mxEvent.addListener(a.container,"dragover",mxUtils.bind(this,function(b){if(null==n&&(!mxClient.IS_IE||10<document.documentMode))n=this.highlightElement(a.container);null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a.container,"drop",mxUtils.bind(this,function(b){null!=n&&(n.parentNode.removeChild(n),n=null);if(a.isEnabled()){var c=mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=a.view.translate,
-e=a.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(b)&&(g=f=0);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b));else{var k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(b);if(null!=c)a.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){c=
-b.dataTransfer.getData("text/html");e=document.createElement("div");e.innerHTML=c;var d=null,l=e.getElementsByTagName("img");null!=l&&1==l.length?(c=l[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)||(d=!0)):(e=e.getElementsByTagName("a"),null!=e&&1==e.length&&(c=e[0].getAttribute("href")));a.setSelectionCells(this.insertTextAt(c,f,g,!0,d))}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(b){var c=Math.max(1,b.width);
-b=Math.max(1,b.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,b));a.setSelectionCell(a.insertVertex(null,null,"",f,g,c*d,b*d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+k+";"))}),mxUtils.bind(this,function(b){a.setSelectionCells(this.insertTextAt(k,f,g,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&a.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),
-f,g,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode()};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",
-!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=this.editor.graph,d=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),e=!1;try{var f=d.lastIndexOf("%3E");f<d.length-3&&(d=d.substring(0,f+3))}catch(g){}try{var k=b.getElementsByTagName("span"),l=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(d);this.isCompatibleString(l)&&(e=!0,d=l)}catch(m){}c.lastPasteXml==d?c.pasteCounter++:
-(c.lastPasteXml=d,c.pasteCounter=0);f=c.pasteCounter*c.gridSize;if(null!=d&&0<d.length&&(e||this.isCompatibleString(d)?c.setSelectionCells(this.importXml(d,f,f)):(e=c.getInsertPoint(),c.setSelectionCells(this.insertTextAt(d,e.x+f,e.y+f,!0))),!c.isSelectionEmpty())){c.scrollCellToVisible(c.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(n){}}}};var l=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=
-function(a){var b=Format.prototype.init;Format.prototype.init=function(){b.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var c=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed?c.apply(this,arguments):this.clear()};var d=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=d.apply(this,arguments);var b=this.editorUi;if(b.editor.graph.isEnabled()){var c=
-b.getCurrentFile();null!=c&&c.isAutosaveOptional()&&(c=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(c))}return a};var e=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&
-this.container.appendChild(this.addStyles(this.createPanel()));e.apply(this,arguments)};var f=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";b.style.marginRight="2px";a.appendChild(b);
-b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return f.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function c(a){var b=mxUtils.button("",function(b){d.getModel().beginUpdate();try{var c=
-d.getSelectionCells();for(b=0;b<c.length;b++){for(var e=d.getModel().getStyle(c[b]),g=0;g<f.length;g++)e=mxUtils.removeStylename(e,f[g]);null!=a?(e=mxUtils.setStyle(e,mxConstants.STYLE_FILLCOLOR,a.fill),e=mxUtils.setStyle(e,mxConstants.STYLE_STROKECOLOR,a.stroke),e=mxUtils.setStyle(e,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(e=mxUtils.setStyle(e,mxConstants.STYLE_FILLCOLOR,"#ffffff"),e=mxUtils.setStyle(e,mxConstants.STYLE_STROKECOLOR,"#000000"),e=mxUtils.setStyle(e,mxConstants.STYLE_GRADIENTCOLOR,
-null));d.getModel().setStyle(c[b],e)}}finally{d.getModel().endUpdate()}});b.style.width="36px";b.style.height="30px";b.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr\x3d'"+a.fill+"', EndColorStr\x3d'"+a.gradient+"', GradientType\x3d0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":b.style.backgroundColor=a.fill,b.style.border=
-"1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border="1px solid #000000");e.appendChild(b)}e.innerHTML="";for(var g=0;g<a.length;g++)0<g&&0==mxUtils.mod(g,4)&&mxUtils.br(e),c(a[g])}function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var d=this.editorUi.editor.graph,e=document.createElement("div");e.style.whiteSpace="normal";e.style.paddingLeft="24px";e.style.paddingRight="20px";
-a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(e);var f=["plain-gray","plain-blue","plain-green","plain-orange","plain-yellow","plain-red","plain-purple",null];null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var g=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",
-stroke:"#9673a6"}],[null,{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}]],k=document.createElement("div");k.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII\x3d);";
+":"+m.value));f.send(JSON.stringify(e))}else this.hideDialog(),this.spinner.stop(),this.handleError(JSON.parse(c.getText()))}),mxUtils.bind(this,function(a){this.hideDialog();this.spinner.stop();this.handleError({message:mxResources.get("unknownError")})}))}),null,null,c,null,!1);this.showDialog(c.container,260,260,!0,!1);c.init()};EditorUi.prototype.uploadToImgur=function(a,b,c,d){var e=this.spinner.pause(),f=new ErrorDialog(this,mxResources.get("warning"),'\x3cimg style\x3d"max-width:300px;max-height:80px;margin-bottom:20px;padding:6px;border:1px solid gray;" src\x3d"data:image/png;base64,'+
+b+'"/\x3e\x3cbr\x3e'+mxResources.get("publishConfirmation"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("publish"),mxUtils.bind(this,function(){e();var f=null!=a.getTitle()?a.getTitle():this.defaultFilename,g=f.lastIndexOf("."),k=f;0<g&&(k=f=k.substring(0,g));var g=new mxXmlRequest("/imgur",JSON.stringify({type:"base64",image:b,name:k+".png",title:f,description:"Made with https://www.draw.io"}),"POST"),l=mxUtils.bind(this,function(a){var b={message:mxResources.get("unknownError")};
+try{var c=JSON.parse(a.getText()),b={message:c.message||c.data.error}}catch(d){}this.handleError(b)});g.send(mxUtils.bind(this,function(a){if(200==a.getStatus())try{var b=JSON.parse(a.getText());try{(new Image).src="log?severity\x3dCONFIG\x26msg\x3dimgur-published:"+b.data.id+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION)+"\x26ts\x3d"+(new Date).getTime()}catch(e){}var g=mxUtils.bind(this,function(){this.spinner.stop();var a="http://i.imgur.com/"+b.data.id+".png",c="https://www.draw.io/imgur?delete\x3d"+
+b.data.deletehash,a=new ErrorDialog(this,mxResources.get("published"),mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"])+"\x3cbr\x3e"+mxResources.get("deleteUrl",[c]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("share"),function(){d(b.data.id)},!1);this.showDialog(a.container,340,170,!0,!1);a.init()});if(c){var k=new mxXmlRequest("/imgur?"+b.data.deletehash,JSON.stringify({title:f,description:"Edit a copy of this diagram at https://www.draw.io/i/"+
+b.data.id}),"POST");k.send(mxUtils.bind(this,function(){200==k.getStatus()?g():l(k)}),mxUtils.bind(this,function(){l(k)}))}else g()}catch(m){this.handleError(m)}else l(a)}),mxUtils.bind(this,function(a){l(a)}))}));this.showDialog(f.container,320,250,!0,!1);f.init()};EditorUi.prototype.publishImage=function(a,b){var c=this.getCurrentFile();null!=c&&(this.isExportToCanvas()?this.showExportDialog(!1,mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,
+function(d,e,f,g,k){d=parseInt(d);if(!isNaN(d)&&0<d){d/=100;var l=this.editor.graph.isSelectionEmpty();f=null!=f?f:l;if(this.spinner.spin(document.body,mxResources.get("publishing")))try{this.exportToCanvas(mxUtils.bind(this,function(d){try{var e=k?mxUtils.getXml(this.editor.getGraphXml(f)):null,g=this.createPngDataUri(d,e);a(c,g.substring(g.lastIndexOf(",")+1),k,b)}catch(l){this.handleError(l)}}),null,null,null,mxUtils.bind(this,function(a){this.handleError(a)}),null,f,d||1,e,g)}catch(m){this.handleError(m)}}})):
+this.showRemoteExportDialog(mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(d,e){if(this.spinner.spin(document.body,mxResources.get("publishing"))){var f=this.editor.graph.getGraphBounds(),g=this.getFileData(!0,null,null,null,d);if(f.width*f.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE)try{var k=new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+(e?"1":"0")+"\x26xml\x3d"+encodeURIComponent(g));k.send(mxUtils.bind(this,
+function(){200==k.getStatus()?a(c,k.getText(),e,b):this.handleError(k)}))}catch(l){this.handleError(l)}else this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"))}})))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);
+if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,d){d()};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,f,g){g=null;null!=b&&(g=b.background,g==mxConstants.NONE&&(g=null));b=this.editor.graph.getSvg(g,null,null,null,null,f);b.setAttribute("content",encodeURIComponent(a));null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,
+function(a){e((!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(a))}));else return(!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(b)};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,k,l,m,n){f=null!=f?f:!0;var p=l?null:this.editor.graph.background;
+p==mxConstants.NONE&&(p=null);null==p&&(p=d);null==p&&!1==l&&(p="#ffffff");this.convertImages(this.editor.graph.getSvg(p,null,null,null,null,null!=g?g:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),l=parseInt(c.getAttribute("height"));k=null!=k?k:1;null!=b&&(k=!f?b/g:Math.min(1,Math.min(3*b/(4*l),b/g)));e.setAttribute("width",Math.ceil(k*g));e.setAttribute("height",Math.ceil(k*l));g=
+e.getContext("2d");g.scale(k,k);g.drawImage(d,0,0);a(e)});d.onerror=function(a){null!=e&&e(a)};try{m&&this.editor.addSvgShadow(c),this.convertMath(this.editor.graph,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))}catch(g){null!=e&&e(g)}}),c,n)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert;a.convert=function(c){null!=c&&(("http://"==c.substring(0,7)||"https://"==c.substring(0,8))&&c.substring(0,
+a.baseUrl.length)!=a.baseUrl?c=PROXY_URL+"?url\x3d"+encodeURIComponent(c):"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)));return c};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var e=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var k=a.getElementsByTagName(c),l=0;l<k.length;l++)mxUtils.bind(this,function(c){var k=d.convert(c.getAttribute(g));if(null!=k&&"data:"!=k.substring(0,5)){var l=f[k];null==l?(e++,this.convertImageToDataUri(k,
+function(d){null!=d&&(f[k]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,l)}})(k[l])});c("image","xlink:href");c("img","src");0==e&&b(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b()});else{var c=new Image;c.onload=function(){var a=document.createElement("canvas"),d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);b(a.toDataURL())};
+c.onerror=function(){b()};c.src=a}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),k=this.editor.extractGraphModel(g.documentElement);if(null!=k){var l=new mxGraphModel;(new mxCodec(k.ownerDocument)).decode(k,l);var m=this.editor.graph,n=l.getChildCount(l.getRoot());m.model.getChildCount(m.model.getRoot());m.model.beginUpdate();try{a={};for(g=0;g<n;g++){var p=l.getChildAt(l.getRoot(),g);if(1==n&&!m.isCellLocked(m.getDefaultParent()))var r=
+l.getChildren(p),f=f.concat(m.importCells(r,b,c,m.getDefaultParent(),null,a));else p=m.importCells([p],0,0,m.model.getRoot(),null,a)[0],r=m.model.getChildren(p),m.moveCells(r,b,c),f=f.concat(r)}if(d){m.isGridEnabled()&&(b=m.snap(b),c=m.snap(c));var s=m.getBoundingBoxFromGeometry(f,!0);m.moveCells(f,b-s.x,c-s.y)}}finally{m.model.endUpdate()}}}}catch(J){throw e||this.handleError(J,mxResources.get("invalidOrMissingFile")),J;}return f};EditorUi.prototype.insertTextAt=function(a,b,c,d,e,f){f=null!=f?f:
+!0;if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))return this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200==a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))})),[];if(!this.isOffline()&&(e||"data:"==a.substring(0,5)||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var k=
+this.extractGraphModelFromPng(a),l=this.importXml(k,b,c,f,!0);if(0<l.length)return l}if("data:image/svg+xml;"==a.substring(0,19))try{if(k=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(k=a.substring(a.indexOf(",")+1),k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0)):k=decodeURIComponent(a.substring(a.indexOf(",")+1)),l=this.importXml(k,b,c,f,!0),0<l.length)return l}catch(m){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,
+function(a,d,e){g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),d,e,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+this.convertDataUri(a)+";"))}),!0,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),f=Math.round(d.width*e);d=Math.round(d.height*e);g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),f,d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+
+a+";"))}}),mxUtils.bind(this,function(){var e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,a,g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}));return[]}a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length){g=this.editor.graph;e=null;g.getModel().beginUpdate();
+try{e=g.insertVertex(g.getDefaultParent(),null,"",g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.fireEvent(new mxEventObject("textInserted","cells",[e])),e.value=a,g.updateCellSize(e),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i.test(e.value)&&g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=
+g.gridSize}finally{g.getModel().endUpdate()}return[e]}};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,0.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\.*<graphml xmlns=\".*)/.test(a)||/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||
+null!=b&&/(\.vsdx)($|\?)/i.test(b)};EditorUi.prototype.importFile=function(a,b,c,d,e,f,g,k,l,m){m=null!=m?m:!0;var n=!1,p=null;"image"==b.substring(0,5)?(g=!1,"image/png"==b.substring(0,9)&&(b=this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(p=this.importXml(b,c,d,m),g=!0)),g||(p=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),m&&p.isGridEnabled()&&(c=p.snap(c),d=p.snap(d)),p=[p.insertVertex(null,null,"",c,d,e,f,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+
+a+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,g)?(n=!0,this.parseFile(null!=l?l:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){if(4==a.readyState){var b=null;200==a.status&&(b=this.importXml(a.responseText,c,d,m));null!=k&&k(b)}}),g)):/(\.vsdx)($|\?)/i.test(g)?(new mxVsdxModel).decode(l):p=this.insertTextAt(this.validateFileData(a),c,d,!0);!n&&null!=k&&k(p);return p};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=
+a.length,e,f,g;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="\x3d\x3d";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&
+15)<<2);b+="\x3d";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,f,g,k,l,m,n){var p=null!=b&&null!=
+c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;m=null!=m?m:this.maxImageBytes;l=null!=l?l:!0;var r=this.editor.graph,s=r.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){return null!=a&&"\x3cmxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,c,d,e,f,g,k,l,p)});f=null!=f?f:mxUtils.bind(this,function(a){r.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var J=
+a.length,L=J,N=[],S=mxUtils.bind(this,function(a,b){N[a]=b;if(0==--L){this.spinner.stop();if(null!=k)k(N);else{var c=[];r.getModel().beginUpdate();try{for(var d=0;d<N.length;d++){var e=N[d]();null!=e&&(c=c.concat(e))}}finally{r.getModel().endUpdate()}}f(c)}}),W=0;W<J;W++)mxUtils.bind(this,function(f){var k=a[f],p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==g||g(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var q=a.target.result,p=q.indexOf(","),r=
+atob(q.substring(p+1)),y=mxUtils.parseXml(r),r=y.getElementsByTagName("svg");if(0<r.length){var D=r[0].getAttribute("content");null!=D&&"\x3c"!=D.charAt(0)&&"%"!=D.charAt(0)&&(D=unescape(window.atob?atob(D):Base64.decode(D,!0)));null!=D&&"%"==D.charAt(0)&&(D=decodeURIComponent(D));null!=D&&("\x3cmxfile "===D.substring(0,8)||"\x3cmxGraphModel "===D.substring(0,14))?S(f,mxUtils.bind(this,function(){return e(D,"text/xml",b+f*s,c+f*s,0,0,k.name)})):S(f,mxUtils.bind(this,function(){try{if(q.substring(0,
+p+1),null!=y){var a=y.getElementsByTagName("svg");if(0<a.length){var g=a[0],l=parseFloat(g.getAttribute("width")),m=parseFloat(g.getAttribute("height")),n=g.getAttribute("viewBox");if(null==n||0==n.length)g.setAttribute("viewBox","0 0 "+l+" "+m);else if(isNaN(l)||isNaN(m)){var r=n.split(" ");3<r.length&&(l=parseFloat(r[2]),m=parseFloat(r[3]))}q=this.createSvgDataUri(mxUtils.getXml(a[0]));var x=Math.min(1,Math.min(d/Math.max(1,l)),d/Math.max(1,m));return e(q,k.type,b+f*s,c+f*s,Math.max(1,Math.round(l*
+x)),Math.max(1,Math.round(m*x)),k.name)}}}catch(A){}return null}))}}else{r=!1;if("image/png"==k.type){var F=this.extractGraphModelFromPng(a.target.result);if(null!=F&&0<F.length){var G=new Image;G.src=a.target.result;S(f,mxUtils.bind(this,function(){return e(F,"text/xml",b+f*s,c+f*s,G.width,G.height,k.name)}));r=!0}}r||(null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
+mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,n,q){S(f,mxUtils.bind(this,function(){if(null!=g&&g.length<m){var p=!l||!this.isResampleImage(a.target.result)?1:Math.min(1,Math.min(d/n,d/q));return e(g,k.type,b+f*s,c+f*s,Math.round(n*p),Math.round(q*p),k.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),l,d,n)})))}else e(a.target.result,k.type,b+f*s,c+f*s,240,160,k.name,function(a){S(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)?e(null,k.type,b+f*s,c+f*s,240,160,k.name,function(a){S(f,function(){return a})},k):"image"==k.type.substring(0,5)?p.readAsDataURL(k):p.readAsText(k)})(W)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=
+function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1<l){var m=Math.round(g/l),n=Math.round(k/l),p=document.createElement("canvas");p.width=m;p.height=n;p.getContext("2d").drawImage(a,0,0,m,n);var r=p.toDataURL();if(r.length<b.length){var s=
+document.createElement("canvas");s.width=m;s.height=n;var J=s.toDataURL();r!==J&&(b=r,g=m,k=n)}}}catch(L){}c(b,g,k)};(function(){EditorUi.prototype.crcTable=[];for(var a=0;256>a;a++)for(var b=a,c=0;8>c;c++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[a]=b;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e<d;e++)a=EditorUi.prototype.crcTable[(a^b[c+e])&255]^a>>>8;return a}})();EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=k;k+=b;return a.substring(c,
+k)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,k);do{var l=g(a);if("IDAT"==f(a,4)){e=a.substring(0,k-8);l=4294967295;l=this.updateCRC(l,b,0,4);l=this.updateCRC(l,d,0,d.length);e+=String.fromCharCode(c.length+
+d.length+1+("zTXt"==b?1:0)>>24&255,c.length+d.length+1+("zTXt"==b?1:0)>>16&255,c.length+d.length+1+("zTXt"==b?1:0)>>8&255,c.length+d.length+1+("zTXt"==b?1:0)&255)+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+String.fromCharCode((l^4294967295)>>24&255,(l^4294967295)>>16&255,(l^4294967295)>>8&255,(l^4294967295)&255);e+=a.substring(k-8,a.length);break}e+=a.substring(k-8,k-4+l);d=f(a,l);f(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=
+function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||
+"IDAT"==c)return!0}))}catch(e){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){k.apply(this,arguments);var a=this.editor.graph,b=this;mxClient.IS_SVG&&this.editor.addSvgShadow(a.view.canvas.ownerSVGElement,null,!0);this.defaultFilename=mxResources.get("untitledDiagram");
+var c=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a&&null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:c.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var d=this.actions.get("print");d.setEnabled(!mxClient.IS_IOS||!navigator.standalone);d.visible=d.isEnabled();if(!this.editor.chromeless){this.keyHandler.bindAction(67,
+!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||a.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a)&&!b.isEditing())try{for(var c=a.clipboardData||a.originalEvent.clipboardData,b=!1,d=0;d<c.types.length;d++)if("text/"===
+c.types[d].substring(0,5)){b=!0;break}if(!b){var e=c.items;for(index in e){var f=e[index];if("file"===f.kind){var g=this.editor.graph.getInsertPoint();this.importFiles([f.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(a);break}}}}catch(k){}}),!1);var e=document.createElement("div");e.style.position="absolute";e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.display="block";e.contentEditable=!0;mxUtils.setOpacity(e,0);e.style.width="1px";e.style.height="1px";e.innerHTML="\x26nbsp;";
+var f=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);if(null!=a.container&&a.isEnabled()&&!a.isMouseDown&&!a.isEditing()&&null==this.dialog&&"INPUT"!=c.nodeName&&"TEXTAREA"!=c.nodeName&&(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)&&!f)e.style.left=a.container.scrollLeft+10+"px",e.style.top=a.container.scrollTop+
+10+"px",a.container.appendChild(e),f=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){e.focus();document.execCommand("selectAll",!1,null)},0):(e.focus(),document.execCommand("selectAll",!1,null))}));var g=function(){window.setTimeout(function(){e.innerHTML="\x26nbsp;";e.focus();document.execCommand("selectAll",!1,null)},0)};mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){if(f&&(224==c||17==c||91==c))f=!1,!a.isEditing()&&
+null==this.dialog&&null!=a.container&&a.container.focus(),e.parentNode.removeChild(e)}),0)}));mxEvent.addListener(e,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(e),g())}));mxEvent.addListener(e,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&(this.copyCells(e,!0),g())}));mxEvent.addListener(e,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&(e.innerHTML="\x26nbsp;",e.focus(),window.setTimeout(mxUtils.bind(this,
+function(){this.pasteCells(b,e);e.innerHTML="\x26nbsp;"}),0))}),!0);var l=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==e?!0:l.apply(this,arguments)}}d=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2;this.spinner=this.createSpinner(document.body.clientWidth/2-2,d,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;
+null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){if(null==d&&(!mxClient.IS_IE||10<document.documentMode))d=this.highlightElement(c);a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
+0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,
+Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.test){d=document.getElementById("geFooter");
+null!=d&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),d.appendChild(this.styleInput),
+this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var m=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:m.apply(this,arguments)}}d=document.getElementById("geInfo");
+null!=d&&d.parentNode.removeChild(d);if(Graph.fileSupport){var n=null;mxEvent.addListener(a.container,"dragleave",function(b){a.isEnabled()&&(null!=n&&(n.parentNode.removeChild(n),n=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(a.container,"dragover",mxUtils.bind(this,function(b){if(null==n&&(!mxClient.IS_IE||10<document.documentMode))n=this.highlightElement(a.container);null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a.container,
+"drop",mxUtils.bind(this,function(b){null!=n&&(n.parentNode.removeChild(n),n=null);if(a.isEnabled()){var c=mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=a.view.translate,e=a.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(b)&&(g=f=0);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b));else{var k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?
+b.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(b);if(null!=c)a.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){c=b.dataTransfer.getData("text/html");e=document.createElement("div");e.innerHTML=c;var d=null,l=e.getElementsByTagName("img");null!=l&&1==l.length?(c=l[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)||(d=!0)):(e=e.getElementsByTagName("a"),null!=e&&1==e.length&&(c=e[0].getAttribute("href")));
+a.setSelectionCells(this.insertTextAt(c,f,g,!0,d))}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(b){var c=Math.max(1,b.width);b=Math.max(1,b.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,b));a.setSelectionCell(a.insertVertex(null,null,"",f,g,c*d,b*d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+k+";"))}),mxUtils.bind(this,
+function(b){a.setSelectionCells(this.insertTextAt(k,f,g,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&a.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),f,g,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode()};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=
+mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=this.editor.graph,d=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),e=!1;try{var f=d.lastIndexOf("%3E");f<d.length-3&&(d=d.substring(0,f+3))}catch(g){}try{var k=
+b.getElementsByTagName("span"),l=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(d);this.isCompatibleString(l)&&(e=!0,d=l)}catch(m){}c.lastPasteXml==d?c.pasteCounter++:(c.lastPasteXml=d,c.pasteCounter=0);f=c.pasteCounter*c.gridSize;if(null!=d&&0<d.length&&(e||this.isCompatibleString(d)?c.setSelectionCells(this.importXml(d,f,f)):(e=c.getInsertPoint(),c.setSelectionCells(this.insertTextAt(d,e.x+f,e.y+f,!0))),!c.isSelectionEmpty())){c.scrollCellToVisible(c.getSelectionCell());
+null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(n){}}}};var l=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var b=Format.prototype.init;Format.prototype.init=function(){b.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var c=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed?c.apply(this,arguments):this.clear()};
+var d=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=d.apply(this,arguments);var b=this.editorUi;if(b.editor.graph.isEnabled()){var c=b.getCurrentFile();null!=c&&c.isAutosaveOptional()&&(c=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),
+a.appendChild(c))}return a};var e=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));e.apply(this,arguments)};var f=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",
+mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";b.style.marginRight="2px";a.appendChild(b);b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return f.apply(this,
+arguments)};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function c(a){var b=mxUtils.button("",function(b){d.getModel().beginUpdate();try{var c=d.getSelectionCells();for(b=0;b<c.length;b++){for(var e=d.getModel().getStyle(c[b]),g=0;g<f.length;g++)e=mxUtils.removeStylename(e,f[g]);null!=a?(e=mxUtils.setStyle(e,mxConstants.STYLE_FILLCOLOR,a.fill),e=mxUtils.setStyle(e,mxConstants.STYLE_STROKECOLOR,a.stroke),e=mxUtils.setStyle(e,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(e=mxUtils.setStyle(e,
+mxConstants.STYLE_FILLCOLOR,"#ffffff"),e=mxUtils.setStyle(e,mxConstants.STYLE_STROKECOLOR,"#000000"),e=mxUtils.setStyle(e,mxConstants.STYLE_GRADIENTCOLOR,null));d.getModel().setStyle(c[b],e)}}finally{d.getModel().endUpdate()}});b.style.width="36px";b.style.height="30px";b.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr\x3d'"+a.fill+"', EndColorStr\x3d'"+
+a.gradient+"', GradientType\x3d0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":b.style.backgroundColor=a.fill,b.style.border="1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border="1px solid #000000");e.appendChild(b)}e.innerHTML="";for(var g=0;g<a.length;g++)0<g&&0==mxUtils.mod(g,4)&&mxUtils.br(e),c(a[g])}function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity=
+"0.5"})}var d=this.editorUi.editor.graph,e=document.createElement("div");e.style.whiteSpace="normal";e.style.paddingLeft="24px";e.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(e);var f=["plain-gray","plain-blue","plain-green","plain-orange","plain-yellow","plain-red","plain-purple",null];null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var g=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},
+{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",
+stroke:"#996185",gradient:"#d5739d"}]],k=document.createElement("div");k.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII\x3d);";
a.appendChild(k);mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,g.length);b(g[this.editorUi.currentScheme])}));var l=document.createElement("div");l.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg\x3d\x3d);";
a.appendChild(l);mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,g.length);b(g[this.editorUi.currentScheme])}));c(k);c(l);b(g[this.editorUi.currentScheme]);return a};return l.apply(this,arguments)};null!=window.StyleFormatPanel&&(StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),c=null;1==this.editorUi.editor.graph.getSelectionCount()&&(c=mxUtils.button(mxResources.get("editStyle"),
mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),c.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),c.style.width="202px",c.style.marginBottom="2px",a.appendChild(c));var d=this.editorUi.editor.graph,e=d.view.getState(d.getSelectionCell());1==d.getSelectionCount()&&null!=e&&null!=e.shape&&null!=e.shape.stencil?(b=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editShape").funct()})),
@@ -7291,21 +7292,21 @@ f=Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.h
this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,
!0);b.outline.view.validate()});return b};var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").setEnabled(c);this.actions.get("shadowVisible").setEnabled(c);this.actions.get("connectionArrows").setEnabled(c);
this.actions.get("connectionPoints").setEnabled(c);this.actions.get("copyStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);this.actions.get("moveToFolder").setEnabled(null!=b);this.actions.get("makeCopy").setEnabled(null!=b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled("1"==
-urlParams.embed||null!=b&&!b.isRestricted());this.actions.get("imgur").setEnabled(null!=b&&!b.isRestricted());this.actions.get("github").setEnabled(null!=b&&!b.isRestricted());this.actions.get("publishLink").setEnabled(null!=b&&!b.isRestricted());this.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=
-null;Graph.prototype.pasteCounter=0;Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){p.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#dropShadow)"):this.view.getDrawPane().removeAttribute("filter"),
-b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};var r=Graph.prototype.init;Graph.prototype.init=function(){function a(c){b=c;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(c)}r.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=new mxStackLayout(this.graph,!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1<b.height/20){var c=b.height%20;b.height+=10<c?20-c:-c}this.graph.getModel().setGeometry(a,
-b)};c.fill=!0;c.unitSize=mxRackContainer.unitSize|20;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.resizeParent=!1;return c}return d.apply(this,arguments)}};mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];
-mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",
-STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries.eeLogicGates=[STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeResistors=[STENCIL_PATH+"/electrical/resistors.xml"];mxStencilRegistry.libraries.eeCapacitors=[STENCIL_PATH+"/electrical/capacitors.xml"];mxStencilRegistry.libraries.eeInductors=[STENCIL_PATH+"/electrical/inductors.xml"];mxStencilRegistry.libraries.eeSwitchesRelays=
-[STENCIL_PATH+"/electrical/switchesRelays.xml",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries.eeDiodes=[STENCIL_PATH+"/electrical/diodes.xml"];mxStencilRegistry.libraries.eeSources=[STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries.eeTransistors=[STENCIL_PATH+"/electrical/mosfets1.xml",STENCIL_PATH+"/electrical/mosfets2.xml",STENCIL_PATH+"/electrical/transistors.xml"];mxStencilRegistry.libraries.eeMisc=[STENCIL_PATH+"/electrical/electro-mechanical.xml",
-STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries.eeAudio=[STENCIL_PATH+"/electrical/radio.xml"];mxStencilRegistry.libraries.eePlcLadder=[STENCIL_PATH+"/electrical/plc_ladder.xml"];mxStencilRegistry.libraries.eeAbstract=[STENCIL_PATH+"/electrical/abstract.xml",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeOptical=[STENCIL_PATH+"/electrical/opto_electronics.xml"];mxStencilRegistry.libraries.eeVacuumTubes=[STENCIL_PATH+"/electrical/vacuum_tubes.xml"];
-mxStencilRegistry.libraries.eeWaveforms=[STENCIL_PATH+"/electrical/waveforms.xml"];mxStencilRegistry.libraries.eeInstruments=[STENCIL_PATH+"/electrical/instruments.xml"];mxStencilRegistry.libraries["mscae/cloud"]=[STENCIL_PATH+"/mscae/cloud.xml"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];
-mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+
-"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",
-STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.citrix=[STENCIL_PATH+"/citrix.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];
-mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var s=
-mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,g,k,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return s.apply(this,arguments)}})();
+urlParams.embed||null!=b&&!b.isRestricted());this.actions.get("imgur").setEnabled(null!=b&&!b.isRestricted());this.actions.get("twitter").setEnabled(null!=b&&!b.isRestricted());this.actions.get("facebook").setEnabled(null!=b&&!b.isRestricted());this.actions.get("github").setEnabled(null!=b&&!b.isRestricted());this.actions.get("publishLink").setEnabled(null!=b&&!b.isRestricted());this.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&
+null!=a&&null!=a.shape&&null!=a.shape.stencil)};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){p.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&
+(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#dropShadow)"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};var r=Graph.prototype.init;Graph.prototype.init=function(){function a(c){b=c;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(c)}r.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,
+"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=new mxStackLayout(this.graph,
+!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1<b.height/20){var c=b.height%20;b.height+=10<c?20-c:-c}this.graph.getModel().setGeometry(a,b)};c.fill=!0;c.unitSize=mxRackContainer.unitSize|20;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.resizeParent=!1;return c}return d.apply(this,arguments)}};mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+
+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+
+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries.eeLogicGates=[STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeResistors=[STENCIL_PATH+"/electrical/resistors.xml"];mxStencilRegistry.libraries.eeCapacitors=
+[STENCIL_PATH+"/electrical/capacitors.xml"];mxStencilRegistry.libraries.eeInductors=[STENCIL_PATH+"/electrical/inductors.xml"];mxStencilRegistry.libraries.eeSwitchesRelays=[STENCIL_PATH+"/electrical/switchesRelays.xml",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries.eeDiodes=[STENCIL_PATH+"/electrical/diodes.xml"];mxStencilRegistry.libraries.eeSources=[STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries.eeTransistors=[STENCIL_PATH+"/electrical/mosfets1.xml",
+STENCIL_PATH+"/electrical/mosfets2.xml",STENCIL_PATH+"/electrical/transistors.xml"];mxStencilRegistry.libraries.eeMisc=[STENCIL_PATH+"/electrical/electro-mechanical.xml",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries.eeAudio=[STENCIL_PATH+"/electrical/radio.xml"];mxStencilRegistry.libraries.eePlcLadder=[STENCIL_PATH+"/electrical/plc_ladder.xml"];mxStencilRegistry.libraries.eeAbstract=[STENCIL_PATH+"/electrical/abstract.xml",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeOptical=
+[STENCIL_PATH+"/electrical/opto_electronics.xml"];mxStencilRegistry.libraries.eeVacuumTubes=[STENCIL_PATH+"/electrical/vacuum_tubes.xml"];mxStencilRegistry.libraries.eeWaveforms=[STENCIL_PATH+"/electrical/waveforms.xml"];mxStencilRegistry.libraries.eeInstruments=[STENCIL_PATH+"/electrical/instruments.xml"];mxStencilRegistry.libraries["mscae/cloud"]=[STENCIL_PATH+"/mscae/cloud.xml"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=
+[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=
+[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=
+[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.citrix=[STENCIL_PATH+"/citrix.xml"];mxStencilRegistry.libraries.archimate=
+[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&
+("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var s=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,g,k,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return s.apply(this,arguments)}})();
var mxSettings={key:".drawio-config",settings:{language:"",libraries:Sidebar.prototype.defaultEntries,customLibraries:[],plugins:[],formatWidth:"240",currentEdgeStyle:Graph.prototype.defaultEdgeStyle,currentVertexStyle:{},createTarget:!1,pageFormat:mxGraph.prototype.pageFormat,search:!0,showStartScreen:!0,gridColor:mxGraphView.prototype.gridColor,autosave:!0,version:12,isNew:!0},getLanguage:function(){return this.settings.language},setLanguage:function(a){this.settings.language=a},getUi:function(){return this.settings.ui},
setUi:function(a){this.settings.ui=a},getShowStartScreen:function(){return this.settings.showStartScreen},setShowStartScreen:function(a){this.settings.showStartScreen=a},getGridColor:function(){return this.settings.gridColor},setGridColor:function(a){this.settings.gridColor=a},getAutosave:function(){return this.settings.autosave},setAutosave:function(a){this.settings.autosave=a},getLibraries:function(){return this.settings.libraries},setLibraries:function(a){this.settings.libraries=a},addCustomLibrary:function(a){mxSettings.load();
0>mxUtils.indexOf(this.settings.customLibraries,a)&&this.settings.customLibraries.push(a);mxSettings.save()},removeCustomLibrary:function(a){mxSettings.load();mxUtils.remove(a,this.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return this.settings.customLibraries},getPlugins:function(){return this.settings.plugins},setPlugins:function(a){this.settings.plugins=a},getFormatWidth:function(){return parseInt(this.settings.formatWidth)},setFormatWidth:function(a){this.settings.formatWidth=
@@ -7317,7 +7318,8 @@ delete this.settings.scratchpadSeen)},clear:function(){isLocalStorage&&localStor
App=function(a,c,f){EditorUi.call(this,a,c,null!=f?f:"1"==urlParams.lightbox);mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII\x3d":(new Image).src=
mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,b,c){var f=window.open(a);null==f||void 0===f?this.showDialog((new PopupDialog(this,a,b,c)).container,320,140,!0,!0):null!=b&&b()});this.updateUi();a=document.createElement("canvas");this.canvasSupported=!(!a.getContext||!a.getContext("2d"));window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.isOffline()||(EditDataDialog.placeholderHelpLink=
"https://support.draw.io/questions/9338941");this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(a=0;a<App.DrawPlugins.length;a++)App.DrawPlugins[a](this);window.Draw.loadPlugin=function(a){a(this)}}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.DROPBOX_APPKEY="libwls2fa9szdji";
-App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"/plugins/explore.js",ex:"/plugins/explore.js",p1:"/plugins/p1.js",ac:"/plugins/connect.js",acj:"/plugins/connectJira.js",voice:"/plugins/voice.js",tips:"/plugins/tooltips.js",svgdata:"/plugins/svgdata.js",doors:"/plugins/doors.js"};App.getStoredMode=function(){var a=null;if("undefined"!=typeof Storage)for(var c=document.cookie.split(";"),f=0;f<c.length;f++){var d=mxUtils.trim(c[f]);if("MODE\x3d"==d.substring(0,5)){a=d.substring(5);break}}return a};
+App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"/plugins/explore.js",ex:"/plugins/explore.js",p1:"/plugins/p1.js",ac:"/plugins/connect.js",acj:"/plugins/connectJira.js",voice:"/plugins/voice.js",tips:"/plugins/tooltips.js",svgdata:"/plugins/svgdata.js",doors:"/plugins/doors.js",electron:"plugins/electron.js"};
+App.getStoredMode=function(){var a=null;if("undefined"!=typeof Storage)for(var c=document.cookie.split(";"),f=0;f<c.length;f++){var d=mxUtils.trim(c[f]);if("MODE\x3d"==d.substring(0,5)){a=d.substring(5);break}}return a};
(function(){window.isSvgBrowser=window.isSvgBrowser||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;if(!mxClient.IS_CHROMEAPP&&("1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode,null==App.mode&&(App.mode=App.getStoredMode())),null!=window.mxscript&&("function"===typeof window.DriveClient&&("0"!=urlParams.gapi&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_GOOGLE||
null!=urlParams.state&&""==window.location.hash||null!=window.location.hash&&"#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js"):"0"==urlParams.chrome&&(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?App.mode==App.MODE_DROPBOX||null!=window.location.hash&&"#D"==window.location.hash.substring(0,2)?mxscript("https://www.dropbox.com/static/api/1/dropins.js",
null,"dropboxjs",App.DROPBOX_APPKEY):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript("https://js.live.net/v5.0/wl.js"):"0"==urlParams.chrome&&(window.OneDriveClient=null):window.OneDriveClient=
@@ -7355,7 +7357,8 @@ this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fir
this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);
mxSettings.save()}));mxClient.IS_CHROMEAPP&&(this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave());null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);if(!this.editor.chromeless&&null!=this.sidebar&&(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0)))this.toggleScratchpad(),mxSettings.save();this.addListener("formatWidthChanged",
function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&("test.draw.io"==window.location.hostname||"cdn.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"jgraph.github.io"==window.location.hostname)};App.prototype.isLegacyDriveDomain=function(){return 0==urlParams.drive||"legacy.draw.io"==window.location.hostname};
-App.prototype.checkLicense=function(){var a=this.drive.getUser(),a=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=a){var c=a.lastIndexOf("@"),f=a;0<=c&&(f=a.substring(c+1));mxUtils.post("/license","domain\x3d"+encodeURIComponent(f)+"\x26ts\x3d"+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200==a.getStatus()){var b=a.getText();if(0<b.length){var c=JSON.parse(b);null!=c&&this.handleLicense(c,f)}}}catch(g){}}))}};
+App.prototype.checkLicense=function(){var a=this.drive.getUser(),a=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=a){var c=a.lastIndexOf("@"),f=a;0<=c&&(f=a.substring(c+1),a=this.crc32(a.substring(0,c))+"@"+f);mxUtils.post("/license","domain\x3d"+encodeURIComponent(f)+"\x26email\x3d"+encodeURIComponent(a)+"\x26ts\x3d"+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200==a.getStatus()){var b=a.getText();if(0<b.length){var c=
+JSON.parse(b);null!=c&&this.handleLicense(c,f)}}}catch(g){}}))}};
App.prototype.handleLicense=function(a,c){var f=document.getElementById("geFooter"),d=null;if(null!=f&&null!=a)if(d=a.expiry,null!=a.footer)f.innerHTML=decodeURIComponent(a.footer);else if(this.hideFooter(),null!=d&&"never"!=d){var b=new Date(Date.parse(d)),e=Math.round((b-Date.now())/864E5);if(90>e){var g="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain\x3d"+encodeURIComponent(c);f.style.height="100%";f.style.margin="0px";f.style.display=
"";0>e?(this.footerHeight=80,f.innerHTML='\x3ctable height\x3d"100%"\x3e\x3ctr\x3e\x3ctd valign\x3d"middle" align\x3d"center" class\x3d"geStatusAlert geBlink"\x3e\x3ca href\x3d"'+g+'" style\x3d"padding-top:16px;" target\x3d"_blank"\x3e\x3cimg border\x3d"0" src\x3d"'+mxGraph.prototype.warningImage.src+'" align\x3d"top" style\x3d"margin-right:6px"\x3e'+mxResources.get("licenseHasExpired",[c,b.toLocaleDateString()])+"\x3c/a\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e"):(this.footerHeight=46,f.innerHTML=
'\x3ctable height\x3d"100%"\x3e\x3ctr\x3e\x3ctd valign\x3d"middle" align\x3d"center" class\x3d"geStatusAlert"\x3e\x3ca href\x3d"'+g+'" target\x3d"_blank"\x3e\x3cimg border\x3d"0" src\x3d"'+mxGraph.prototype.warningImage.src+'" align\x3d"top" style\x3d"margin-right:6px"\x3e'+mxResources.get("licenseWillExpire",[c,b.toLocaleDateString()])+"\x3c/a\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e");this.refresh()}}return d};
@@ -7442,7 +7445,7 @@ mxEvent.addGestureListeners(e,function(){},mxUtils.bind(this,function(a){n.isMou
mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.panningManager&&null!=n.graphHandler&&(e.style.border="3px solid transparent",null!=d&&(d.style.border="3px dotted lightGray"),e.style.cursor="default",this.sidebar.showTooltips=!0,n.panningManager.stop(),n.graphHandler.reset(),n.isMouseDown=!1,n.autoScroll=!0,q(a),mxEvent.consume(a))}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.graphHandler.shape&&(n.graphHandler.shape.node.style.visibility="visible",
e.style.border="3px solid transparent",e.style.cursor="",n.autoScroll=!0,null!=n.graphHandler.guide&&n.graphHandler.guide.setVisible(!0),null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility="visible"),null!=d&&(d.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(a){null!=d?d.style.border="3px dotted rgb(254, 137, 12)":e.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";e.style.cursor="copy";
this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(e,"drop",mxUtils.bind(this,function(a){e.style.border="3px solid transparent";e.style.cursor="";null!=d&&(d.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(f,g,k,l,m,n,p){if(null!=f&&"image/"==g.substring(0,6)){var q="shape\x3dimage;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+
-this.convertDataUri(f),q=[new mxCell("",new mxGeometry(0,0,m,n),q)];q[0].vertex=!0;s(q,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))}else{p=!1;if(null!=f&&"text/xml"==g)if(f=mxUtils.parseXml(f),"mxlibrary"==f.documentElement.nodeName)try{var t=JSON.parse(mxUtils.getTextContent(f.documentElement));b(t,e);c=c.concat(t);r(a);this.spinner.stop();p=!0}catch(F){}else if("mxfile"==f.documentElement.nodeName)try{t=mxUtils.getTextContent(f.documentElement.getElementsByTagName("diagram")[0]),
+this.convertDataUri(f),q=[new mxCell("",new mxGeometry(0,0,m,n),q)];q[0].vertex=!0;s(q,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))}else{p=!1;if(null!=f&&"text/xml"==g)if(f=mxUtils.parseXml(f),"mxlibrary"==f.documentElement.nodeName)try{var t=JSON.parse(mxUtils.getTextContent(f.documentElement));b(t,e);c=c.concat(t);r(a);this.spinner.stop();p=!0}catch(G){}else if("mxfile"==f.documentElement.nodeName)try{t=mxUtils.getTextContent(f.documentElement.getElementsByTagName("diagram")[0]),
q=this.stringToCells(this.editor.graph.decompress(t)),s(q,new mxRectangle(0,0,m,n),a),p=!0}catch(H){}p||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}))}null!=d&&null!=d.parentNode&&0<c.length&&(d.parentNode.removeChild(d),d=null)}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(e,"dragleave",function(a){null!=d?d.style.border="3px dotted lightGray":(e.style.border="3px solid transparent",e.style.cursor="");a.stopPropagation();a.preventDefault()}));
l=l.cloneNode(!1);l.setAttribute("src",IMAGE_PATH+"/edit.gif");l.setAttribute("title",mxResources.get("edit"));k.insertBefore(l,k.firstChild);mxEvent.addListener(l,"click",p);mxEvent.addListener(e,"dblclick",function(a){mxEvent.getSource(a)==e&&p(a)});l=l.cloneNode(!1);l.setAttribute("src",App.prototype.plusImage);l.setAttribute("title",mxResources.get("add"));k.insertBefore(l,k.firstChild);this.isOffline()||(g=document.createElement("span"),g.setAttribute("title",mxResources.get("help")),g.style.cssText=
"color:gray;text-decoration:none;margin-right:8px;",mxUtils.write(g,"?"),mxEvent.addGestureListeners(g,mxUtils.bind(this,function(a){window.open("https://support.draw.io/questions/10420280");mxEvent.consume(a)})),k.insertBefore(g,k.firstChild));var t=null;mxEvent.addListener(l,"click",q)}f.appendChild(k)};
@@ -7579,37 +7582,39 @@ this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get(
c.click()}else{window.openNew=!1;window.openKey="import";var e=Editor.useLocalStorage;Editor.useLocalStorage=!b;window.openFile=new OpenFile(function(b){a.hideDialog(b)});window.openFile.setConsumer(function(b,c){d.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var g=a.dialog,k=g.close;a.dialog.close=function(b){Editor.useLocalStorage=e;k.apply(g,arguments);b&&null==a.getCurrentFile()&&"1"!=urlParams.embed&&a.showSplash()}}}
function m(b){b.pickFile(function(c){if(a.spinner.spin(document.body,mxResources.get("loading")))if(b==a.dropbox){var d=/(\.png)$/i.test(c)?"image/png":"text/xml";a.loadUrl(c,function(a){n(a,d,c)},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},"image/png"==d)}else b.getFile(c,function(a){var b=/(\.png)$/i.test(a.getTitle())?"image/png":"text/xml";n(a.getData(),b,a.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},!0)},!0)}var n=
mxUtils.bind(this,function(b,c,e){"image/png"==c?a.loadImage(b,mxUtils.bind(this,function(g){a.resizeImage(g,b,mxUtils.bind(this,function(g,k,l){g=Math.min(1,Math.min(a.maxImageSize/k,a.maxImageSize/l));a.importFile(b,c,0,0,Math.round(k*g),Math.round(l*g),e,function(b){a.spinner.stop();d.setSelectionCells(b)})}),!0)})):a.importFile(b,c,0,0,0,0,e,function(b){a.spinner.stop();d.setSelectionCells(b)})});null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){m(a.drive)},c):e&&b.addItem(mxResources.get("googleDrive")+
-" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){m(a.dropbox)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){m(a.oneDrive)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);b.addItem(mxResources.get("browser")+
-"...",null,function(){l(!1)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){l(!0)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url\x3d"+encodeURIComponent(b),function(a){n(a,c,b)},function(){a.spinner.stop();
-a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))})).isEnabled=b;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"!=uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");
-mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage)})));this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(null!=b&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming")))&&
-b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}})).isEnabled=b;a.actions.addAction("makeCopy...",
-mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():a.defaultFilename,d="",e=c.lastIndexOf(".");0<=e&&(d=c.substring(e),c=c.substring(0,e));c=mxResources.get("copyOf",[c])+d;b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?a.spinner.spin(document.body,mxResources.get("saving"))&&b.save(!1,mxUtils.bind(this,function(){b.saveAs(c,mxUtils.bind(this,
-function(b){a.spinner.stop();var c=a.getUrl();window.openWindow(c+"#G"+b.id,null,mxUtils.bind(this,function(){window.location.hash="G"+b.id}))}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):this.editorUi.createFile(c,this.editorUi.getFileData(!0),null,d))}),mxUtils.bind(this,function(){a.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(a.getEditBlankXml(),
-c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=a.getCurrentFile();(b.getMode()==App.MODE_GOOGLE||b.getMode()==App.MODE_ONEDRIVE)&&a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));a.actions.addAction("imgur...",mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,a.uploadToImgur))}));a.actions.addAction("github...",
-mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,a.uploadToGithub))}));this.put("publish",new Menu(mxUtils.bind(this,function(b,c){if(null==document.documentMode||10<=document.documentMode)"undefined"!==typeof XMLHttpRequest&&this.addMenuItems(b,["github"],c),this.addMenuItems(b,["imgur"],c);!navigator.standalone&&!a.isOffline()&&this.addMenuItems(b,["publishLink"],c)})));a.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){window.open("http://www.draw.io/app")}));
-a.actions.put("chromeApp",new Action(mxResources.get("chromeApp")+"...",function(){window.open("https://chrome.google.com/webstore/detail/drawio-desktop/pebppomjfocnoigkeepgbmcifnnlndla")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage",
-"embedSvg","-","embedHtml"],c);!navigator.standalone&&!a.isOffline()&&this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));this.put("arrange",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["toFront","toBack","-"],b);this.addSubmenu("direction",a,b);this.addMenuItems(a,["turn","-"],b);this.addSubmenu("align",a,b);this.addSubmenu("distribute",a,b);a.addSeparator(b);this.addSubmenu("navigation",a,b);this.addSubmenu("insert",
-a,b);this.addSubmenu("layout",a,b);this.addMenuItems(a,"- group ungroup removeFromGroup - editGeometry clearWaypoints autosize".split(" "),b)})));var r="horizontalFlow verticalFlow - horizontalTree verticalTree - organic circle - fromText".split(" "),s=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,
-620,420,!0,!1);b.init()}),c)};a.actions.addAction("insertText",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.getInsertPoint(),a=new mxCell("Text",new mxGeometry(a.x,a.y,40,20),"text;html\x3d1;resizable\x3d0;autosize\x3d1;align\x3dleft;verticalAlign\x3dtop;spacingTop\x3d-4;points\x3d[];");a.vertex=!0;d.startEditingAtCell(d.addCell(a))}},null,null,"Ctrl+Shift+X").isEnabled=b;a.actions.addAction("insertRectangle",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=
-d.getInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,120,60),"whiteSpace\x3dwrap;html\x3d1;");a.vertex=!0;d.setSelectionCell(d.addCell(a))}},null,null,"Ctrl+K").isEnabled=b;a.actions.addAction("insertEllipse",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.getInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,80,80),"ellipse;whiteSpace\x3dwrap;html\x3d1;");a.vertex=!0;d.setSelectionCell(d.addCell(a))}},null,null,"Ctrl+Shift+K").isEnabled=b;this.put("insert",new Menu(mxUtils.bind(this,
-function(a,b){this.addMenuItems(a,"insertText insertRectangle insertEllipse - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<r.length;c++)"-"==r[c]?a.addSeparator(b):s(a,b,mxResources.get(r[c]),r[c])})));this.put("openRecent",new Menu(function(b,c){var d=a.getRecent(),e=0;if(null!=d){for(var g=0;g<d.length;g++)(function(d){e++;var g=d.mode;g==App.MODE_GOOGLE?g="googleDrive":g==App.MODE_ONEDRIVE&&(g="oneDrive");b.addItem(d.title+" ("+mxResources.get(g)+")",null,function(){a.loadFile(d.id)},
-c)})(d[g]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+
-" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},
-c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?url\x3d"+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("newLibrary",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+
-"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",
-null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)}));this.put("openLibraryFrom",
-new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+
-"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=
-new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))&&mxUtils.get(PROXY_URL+"?url\x3d"+encodeURIComponent(b),function(c){if(200==c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(d){a.handleError(d,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})},
-mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);(!a.isOffline()||mxClient.IS_CHROMEAPP)&&this.addLinkToItem(d,"https://support.draw.io/questions/10420280")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),
-c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d,
-"https://desk.draw.io/solution/articles/16000032875-how-to-use-mathematical-typesetting-")}this.addMenuItems(b,["autosave","-","createShape","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&isLocalStorage&&this.addMenuItems(b,["showStartScreen"],c);!a.isOfflineApp()&&"1"!=urlParams.embed?this.addMenuItems(b,["plugins","-","offline"],c):b.addSeparator(c);!a.isOffline()&&!navigator.standalone&&"1"!=urlParams.embed&&this.addMenuItems(b,["chromeApp"],c)})));this.put("file",new Menu(mxUtils.bind(this,
-function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b,["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&
-this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,["new","-","rename","makeCopy","moveToFolder"],c):(this.addMenuItems(b,["-","save","saveAs","-","rename"],c),a.isOfflineApp()?
-a.isOffline()||this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",b,c);this.addSubmenu("openLibraryFrom",b,c);null!=d&&(d.constructor==DriveFile||d.constructor==DropboxFile)&&this.addMenuItems(b,
-["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);(!mxClient.IS_IOS||!navigator.standalone)&&this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))}})();function DiagramPage(a){this.node=a}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
-DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,c,f){this.ui=a;this.page=c;this.previous=f}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(a,c,f){this.ui=a;this.oldIndex=c;this.newIndex=f}
+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){m(a.dropbox)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){m(a.oneDrive)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&
+"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){l(!1)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){l(!0)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url\x3d"+
+encodeURIComponent(b),function(a){n(a,c,b)},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))})).isEnabled=b;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"!=uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);
+d=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage)})));this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(a){null!=
+a&&0<a.length&&(null!=b&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming")))&&b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));
+return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}})).isEnabled=b;a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():a.defaultFilename,d="",e=c.lastIndexOf(".");0<=e&&(d=c.substring(e),c=c.substring(0,e));c=mxResources.get("copyOf",[c])+d;b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?
+a.spinner.spin(document.body,mxResources.get("saving"))&&b.save(!1,mxUtils.bind(this,function(){b.saveAs(c,mxUtils.bind(this,function(b){a.spinner.stop();var c=a.getUrl();window.openWindow(c+"#G"+b.id,null,mxUtils.bind(this,function(){window.location.hash="G"+b.id}))}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):this.editorUi.createFile(c,this.editorUi.getFileData(!0),null,d))}),mxUtils.bind(this,function(){a.hideDialog()}),mxResources.get("makeCopy"),
+mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(a.getEditBlankXml(),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=a.getCurrentFile();(b.getMode()==App.MODE_GOOGLE||b.getMode()==App.MODE_ONEDRIVE)&&a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));
+a.actions.addAction("imgur...",mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,a.uploadToImgur),function(a){window.open("https://imgur.com/"+a)})}));a.actions.addAction("facebook...",mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,a.uploadToImgur),function(a){window.open("https://www.facebook.com/sharer.php?p[url]\x3d"+encodeURIComponent("https://imgur.com/"+a)+"\x26p[images][0]\x3d"+encodeURIComponent(a+".png"))})}));a.actions.addAction("twitter...",mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,
+a.uploadToImgur),function(a){window.open("https://twitter.com/intent/tweet?text\x3d"+encodeURIComponent("Check out the diagram I made with draw.io")+"\x26via\x3ddrawio\x26hashtags\x3dmadewithdrawio\x26url\x3d"+encodeURIComponent("https://imgur.com/"+a))})}));a.actions.addAction("github...",mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,a.uploadToGithub))}));this.put("publish",new Menu(mxUtils.bind(this,function(b,c){if(null==document.documentMode||10<=document.documentMode)"undefined"!==
+typeof XMLHttpRequest&&this.addMenuItems(b,["github"],c),this.addMenuItems(b,["twitter"],c),this.addMenuItems(b,["facebook"],c),this.addMenuItems(b,["imgur"],c);!navigator.standalone&&!a.isOffline()&&this.addMenuItems(b,["publishLink"],c)})));a.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){window.open("http://www.draw.io/app")}));a.actions.put("chromeApp",new Action(mxResources.get("chromeApp")+"...",function(){window.open("https://chrome.google.com/webstore/detail/drawio-desktop/pebppomjfocnoigkeepgbmcifnnlndla")}));
+this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);!navigator.standalone&&!a.isOffline()&&this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));
+this.put("arrange",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["toFront","toBack","-"],b);this.addSubmenu("direction",a,b);this.addMenuItems(a,["turn","-"],b);this.addSubmenu("align",a,b);this.addSubmenu("distribute",a,b);a.addSeparator(b);this.addSubmenu("navigation",a,b);this.addSubmenu("insert",a,b);this.addSubmenu("layout",a,b);this.addMenuItems(a,"- group ungroup removeFromGroup - editGeometry clearWaypoints autosize".split(" "),b)})));var r="horizontalFlow verticalFlow - horizontalTree verticalTree - organic circle - fromText".split(" "),
+s=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)};a.actions.addAction("insertText",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.getInsertPoint(),a=new mxCell("Text",new mxGeometry(a.x,a.y,40,20),"text;html\x3d1;resizable\x3d0;autosize\x3d1;align\x3dleft;verticalAlign\x3dtop;spacingTop\x3d-4;points\x3d[];");
+a.vertex=!0;d.startEditingAtCell(d.addCell(a))}},null,null,"Ctrl+Shift+X").isEnabled=b;a.actions.addAction("insertRectangle",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.getInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,120,60),"whiteSpace\x3dwrap;html\x3d1;");a.vertex=!0;d.setSelectionCell(d.addCell(a))}},null,null,"Ctrl+K").isEnabled=b;a.actions.addAction("insertEllipse",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.getInsertPoint(),
+a=new mxCell("",new mxGeometry(a.x,a.y,80,80),"ellipse;whiteSpace\x3dwrap;html\x3d1;");a.vertex=!0;d.setSelectionCell(d.addCell(a))}},null,null,"Ctrl+Shift+K").isEnabled=b;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"insertText insertRectangle insertEllipse - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<r.length;c++)"-"==r[c]?a.addSeparator(b):s(a,b,mxResources.get(r[c]),r[c])})));this.put("openRecent",new Menu(function(b,c){var d=a.getRecent(),
+e=0;if(null!=d){for(var g=0;g<d.length;g++)(function(d){e++;var g=d.mode;g==App.MODE_GOOGLE?g="googleDrive":g==App.MODE_ONEDRIVE&&(g="oneDrive");b.addItem(d.title+" ("+mxResources.get(g)+")",null,function(){a.loadFile(d.id)},c)})(d[g]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+
+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);
+b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?url\x3d"+encodeURIComponent(b)),
+null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("newLibrary",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",
+null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)}));this.put("openLibraryFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=
+a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))&&mxUtils.get(PROXY_URL+"?url\x3d"+encodeURIComponent(b),function(c){if(200==c.getStatus()){a.spinner.stop();
+try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(d){a.handleError(d,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline",
+"layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);(!a.isOffline()||mxClient.IS_CHROMEAPP)&&this.addLinkToItem(d,"https://support.draw.io/questions/10420280")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),
+c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d,"https://desk.draw.io/solution/articles/16000032875-how-to-use-mathematical-typesetting-")}this.addMenuItems(b,["autosave","-","createShape","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&
+isLocalStorage&&this.addMenuItems(b,["showStartScreen"],c);!a.isOfflineApp()&&"1"!=urlParams.embed?this.addMenuItems(b,["plugins","-","offline"],c):b.addSeparator(c);!a.isOffline()&&!navigator.standalone&&"1"!=urlParams.embed&&this.addMenuItems(b,["chromeApp"],c)})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",
+b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b,["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle",
+"-"],c))):this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,["new","-","rename","makeCopy","moveToFolder"],c):(this.addMenuItems(b,["-","save","saveAs","-","rename"],c),a.isOfflineApp()?a.isOffline()||this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",
+b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",b,c);this.addSubmenu("openLibraryFrom",b,c);null!=d&&(d.constructor==DriveFile||d.constructor==DropboxFile)&&this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);(!mxClient.IS_IOS||!navigator.standalone)&&this.addMenuItems(b,["print"],
+c);this.addMenuItems(b,["-","close"])}})))}})();function DiagramPage(a){this.node=a}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,c,f){this.ui=a;this.page=c;this.previous=f}
+RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(a,c,f){this.ui=a;this.oldIndex=c;this.newIndex=f}
MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};function SelectPage(a,c){this.ui=a;this.previousPage=this.page=c;null!=c&&this.ui.updatePageRoot(c)}
SelectPage.prototype.execute=function(){if(null!=this.page&&0<=mxUtils.indexOf(this.ui.pages,this.previousPage)){var a=this.ui.currentPage,c=this.ui.editor,f=c.graph,d=c.graph.compress(f.zapGremlins(mxUtils.getXml(c.getGraphXml(!0))));mxUtils.setTextContent(a.node,d);a.viewState=f.getViewState();a.root=f.model.root;f.view.clear(a.root,!0);f.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;f.model.rootChanged(a.root);f.setViewState(a.viewState);c.fireEvent(new mxEventObject("setViewState",
"change",this));f.gridEnabled=f.gridEnabled&&(!this.ui.editor.chromeless||"1"==urlParams.grid);c.updateGraphComponents();f.view.validate();f.sizeDidChange();c.graph.fireEvent(new mxEventObject(mxEvent.ROOT));c.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(a,c,f,d){SelectPage.call(this,a,f);this.relatedPage=c;this.index=d;this.previousIndex=null}mxUtils.extend(ChangePage,SelectPage);
diff --git a/war/js/diagramly/App.js b/war/js/diagramly/App.js
index 19ed5921..2a52bf3a 100644
--- a/war/js/diagramly/App.js
+++ b/war/js/diagramly/App.js
@@ -131,13 +131,13 @@ App.MODE_BROWSER = 'browser';
App.DROPBOX_APPKEY = 'libwls2fa9szdji';
/**
- * Defines plugin keys for loadnig via p URL parameter.
+ * Defines plugin keys for loading via p URL parameter.
*/
App.pluginRegistry = {'4xAKTrabTpTzahoLthkwPNUn': '/plugins/explore.js',
'ex': '/plugins/explore.js', 'p1': '/plugins/p1.js', 'ac': '/plugins/connect.js',
'acj': '/plugins/connectJira.js', 'voice': '/plugins/voice.js',
'tips': '/plugins/tooltips.js', 'svgdata': '/plugins/svgdata.js',
- 'doors': '/plugins/doors.js'};
+ 'doors': '/plugins/doors.js', 'electron': 'plugins/electron.js'};
/**
* Function: authorize
@@ -1116,10 +1116,12 @@ App.prototype.checkLicense = function()
if (at >= 0)
{
domain = email.substring(at + 1);
+ email = this.crc32(email.substring(0, at)) + '@' + domain;
}
// Timestamp is workaround for cached response in certain environments
- mxUtils.post('/license', 'domain=' + encodeURIComponent(domain) + '&ts=' + new Date().getTime(),
+ mxUtils.post('/license', 'domain=' + encodeURIComponent(domain) + '&email=' +
+ encodeURIComponent(email) + '&ts=' + new Date().getTime(),
mxUtils.bind(this, function(req)
{
var registered = false;
diff --git a/war/js/diagramly/Dialogs.js b/war/js/diagramly/Dialogs.js
index c49fb11b..af4e9a2c 100644
--- a/war/js/diagramly/Dialogs.js
+++ b/war/js/diagramly/Dialogs.js
@@ -3695,7 +3695,7 @@ var CreateDialog = function(editorUi, title, createFn, cancelFn, dlgTitle, btnLa
}
}
- if (allowBrowser && isLocalStorage)
+ if (allowBrowser && isLocalStorage && urlParams['browser'] != '0')
{
var browserOption = document.createElement('option');
browserOption.setAttribute('value', App.MODE_BROWSER);
diff --git a/war/js/diagramly/EditorUi.js b/war/js/diagramly/EditorUi.js
index 4cf3ffc8..341df603 100644
--- a/war/js/diagramly/EditorUi.js
+++ b/war/js/diagramly/EditorUi.js
@@ -1696,7 +1696,7 @@
/**
*
*/
- EditorUi.prototype.uploadToImgur = function(file, base64Data, editable)
+ EditorUi.prototype.uploadToImgur = function(file, base64Data, editable, socialHandler)
{
var resume = this.spinner.pause();
@@ -1781,11 +1781,10 @@
mxResources.get('close'), mxUtils.bind(this, function()
{
this.hideDialog();
- }), null,
- mxResources.get('openInNewWindow'), mxUtils.bind(this, function()
+ }), null, mxResources.get('share'), function()
{
- window.open('http://imgur.com/' + res.data.id);
- }), false);
+ socialHandler(res.data.id);
+ }, false);
this.showDialog(dlg.container, 340, 170, true, false);
dlg.init();
});
@@ -1840,7 +1839,7 @@
/**
*
*/
- EditorUi.prototype.publishImage = function(handler)
+ EditorUi.prototype.publishImage = function(handler, socialHandler)
{
var file = this.getCurrentFile();
@@ -1868,7 +1867,7 @@
{
var xml = (editable) ? mxUtils.getXml(this.editor.getGraphXml(ignoreSelection)) : null;
var data = this.createPngDataUri(canvas, xml);
- handler(file, data.substring(data.lastIndexOf(',') + 1), editable);
+ handler(file, data.substring(data.lastIndexOf(',') + 1), editable, socialHandler);
}
catch (e)
{
@@ -1910,7 +1909,7 @@
{
if (req.getStatus() == 200)
{
- handler(file, req.getText(), editable);
+ handler(file, req.getText(), editable, socialHandler);
}
else
{
@@ -5598,6 +5597,8 @@
this.actions.get('editDiagram').setEnabled(urlParams['embed'] == '1' ||
(file != null && !file.isRestricted()));
this.actions.get('imgur').setEnabled(file != null && !file.isRestricted());
+ this.actions.get('twitter').setEnabled(file != null && !file.isRestricted());
+ this.actions.get('facebook').setEnabled(file != null && !file.isRestricted());
this.actions.get('github').setEnabled(file != null && !file.isRestricted());
this.actions.get('publishLink').setEnabled(file != null && !file.isRestricted());
this.menus.get('publish').setEnabled(file != null && !file.isRestricted());
diff --git a/war/js/diagramly/Menus.js b/war/js/diagramly/Menus.js
index 93ad8232..c64c9ea6 100644
--- a/war/js/diagramly/Menus.js
+++ b/war/js/diagramly/Menus.js
@@ -1275,10 +1275,13 @@
menu.addSeparator(parent);
- menu.addItem(mxResources.get('browser') + '...', null, function()
+ if (isLocalStorage && urlParams['browser'] != '0')
{
- importFile(false);
- }, parent);
+ menu.addItem(mxResources.get('browser') + '...', null, function()
+ {
+ importFile(false);
+ }, parent);
+ }
if (!mxClient.IS_IOS)
{
@@ -1487,7 +1490,30 @@
editorUi.actions.addAction('imgur...', mxUtils.bind(this, function()
{
- editorUi.publishImage(mxUtils.bind(editorUi, editorUi.uploadToImgur));
+ editorUi.publishImage(mxUtils.bind(editorUi, editorUi.uploadToImgur), function(imgurId)
+ {
+ window.open('https://imgur.com/' + imgurId);
+ });
+ }));
+
+ editorUi.actions.addAction('facebook...', mxUtils.bind(this, function()
+ {
+ editorUi.publishImage(mxUtils.bind(editorUi, editorUi.uploadToImgur), function(imgurId)
+ {
+ window.open('https://www.facebook.com/sharer.php?p[url]=' + encodeURIComponent('https://imgur.com/' + imgurId) +
+ '&p[images][0]=' + encodeURIComponent(imgurId + '.png'));
+ });
+ }));
+
+ editorUi.actions.addAction('twitter...', mxUtils.bind(this, function()
+ {
+ editorUi.publishImage(mxUtils.bind(editorUi, editorUi.uploadToImgur), function(imgurId)
+ {
+ window.open('https://twitter.com/intent/tweet?text=' +
+ encodeURIComponent('Check out the diagram I made with draw.io') +
+ '&via=drawio&hashtags=madewithdrawio&url=' +
+ encodeURIComponent('https://imgur.com/' + imgurId));
+ });
}));
editorUi.actions.addAction('github...', mxUtils.bind(this, function()
@@ -1507,6 +1533,8 @@
this.addMenuItems(menu, ['github'], parent);
}
+ this.addMenuItems(menu, ['twitter'], parent);
+ this.addMenuItems(menu, ['facebook'], parent);
this.addMenuItems(menu, ['imgur'], parent);
}
@@ -1736,7 +1764,7 @@
menu.addSeparator(parent);
- if (isLocalStorage)
+ if (isLocalStorage && urlParams['browser'] != '0')
{
menu.addItem(mxResources.get('browser') + '...', null, function()
{
@@ -1829,7 +1857,7 @@
menu.addSeparator(parent);
- if (isLocalStorage)
+ if (isLocalStorage && urlParams['browser'] != '0')
{
menu.addItem(mxResources.get('browser') + '...', null, function()
{
@@ -1895,7 +1923,7 @@
menu.addSeparator(parent);
- if (isLocalStorage)
+ if (isLocalStorage && urlParams['browser'] != '0')
{
menu.addItem(mxResources.get('browser') + '...', null, function()
{
diff --git a/war/js/embed-static.min.js b/war/js/embed-static.min.js
index 28d907a7..5cad15ef 100644
--- a/war/js/embed-static.min.js
+++ b/war/js/embed-static.min.js
@@ -184,7 +184,7 @@ f)+"\n"+s+"}":"{"+u.join(",")+"}";f=s;return r}}"function"!==typeof Date.prototy
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
"function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();var mxBasePath="https://www.draw.io/mxgraph/",mxLoadStylesheets=mxLoadResources=!1,mxLanguage="en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||1E8;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"5.7.0.3",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
+window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"5.7.0.5",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
diff --git a/war/js/reader.min.js b/war/js/reader.min.js
index 28992551..3b071e70 100644
--- a/war/js/reader.min.js
+++ b/war/js/reader.min.js
@@ -184,7 +184,7 @@ f)+"\n"+s+"}":"{"+u.join(",")+"}";f=s;return r}}"function"!==typeof Date.prototy
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
"function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();var mxBasePath="https://www.draw.io/mxgraph/",mxLoadStylesheets=mxLoadResources=!1,mxLanguage="en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||1E8;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"5.7.0.3",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
+window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"5.7.0.5",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
diff --git a/war/js/viewer.min.js b/war/js/viewer.min.js
index d84bd5b9..cbdd7d74 100644
--- a/war/js/viewer.min.js
+++ b/war/js/viewer.min.js
@@ -2617,74 +2617,74 @@ document.createElement("input");r.setAttribute("type","text");mxUtils.write(k,"P
k=k.cloneNode(!1);k.appendChild(L);g.appendChild(k);f.appendChild(g);var k=k.cloneNode(!1),K=document.createElement("input");K.setAttribute("type","text");mxUtils.write(k,"Message:");K.value="Updated "+a+".png";g=g.cloneNode(!1);g.appendChild(k);k=k.cloneNode(!1);k.appendChild(K);g.appendChild(k);f.appendChild(g);k=k.cloneNode(!1);e.appendChild(f);c.appendChild(e);c=new FilenameDialog(this,null,mxResources.get("publish"),mxUtils.bind(this,function(){var a="https://api.github.com/repos/"+n.value+"/"+
p.value+"/contents/"+r.value+"?ref\x3d"+encodeURIComponent(L.value);d();mxUtils.get(a,mxUtils.bind(this,function(c){if(200==c.getStatus()||404==c.getStatus()){c=JSON.parse(c.getText());var e={path:r.value,message:K.value,content:b};null!=c.sha&&(e.sha=c.sha);var f=new XMLHttpRequest;f.onreadystatechange=mxUtils.bind(this,function(){if(4==f.readyState)if(200<=f.status&&300>f.status){this.spinner.stop();this.hideDialog();a="https://github.com/"+n.value+"/"+p.value+"/blob/"+L.value+"/"+r.value;var b=
new ErrorDialog(this,mxResources.get("published"),mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){window.open(a)}),!1);this.showDialog(b.container,340,170,!0,!1);b.init()}else d=this.spinner.pause(),this.handleError(JSON.parse(f.responseText))});f.open("PUT",a,!0);f.setRequestHeader("Authorization","Basic "+btoa(l.value+
-":"+m.value));f.send(JSON.stringify(e))}else this.hideDialog(),this.spinner.stop(),this.handleError(JSON.parse(c.getText()))}),mxUtils.bind(this,function(a){this.hideDialog();this.spinner.stop();this.handleError({message:mxResources.get("unknownError")})}))}),null,null,c,null,!1);this.showDialog(c.container,260,260,!0,!1);c.init()};EditorUi.prototype.uploadToImgur=function(a,b,c){var d=this.spinner.pause(),e=new ErrorDialog(this,mxResources.get("warning"),'\x3cimg style\x3d"max-width:300px;max-height:80px;margin-bottom:20px;padding:6px;border:1px solid gray;" src\x3d"data:image/png;base64,'+
-b+'"/\x3e\x3cbr\x3e'+mxResources.get("publishConfirmation"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("publish"),mxUtils.bind(this,function(){d();var e=null!=a.getTitle()?a.getTitle():this.defaultFilename,f=e.lastIndexOf("."),g=e;0<f&&(g=e=g.substring(0,f));var f=new mxXmlRequest("/imgur",JSON.stringify({type:"base64",image:b,name:g+".png",title:e,description:"Made with https://www.draw.io"}),"POST"),k=mxUtils.bind(this,function(a){var b={message:mxResources.get("unknownError")};
-try{var c=JSON.parse(a.getText()),b={message:c.message||c.data.error}}catch(d){}this.handleError(b)});f.send(mxUtils.bind(this,function(a){if(200==a.getStatus())try{var b=JSON.parse(a.getText());try{(new Image).src="log?severity\x3dCONFIG\x26msg\x3dimgur-published:"+b.data.id+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION)+"\x26ts\x3d"+(new Date).getTime()}catch(d){}var f=mxUtils.bind(this,function(){this.spinner.stop();var a="http://i.imgur.com/"+b.data.id+".png",c="https://www.draw.io/imgur?delete\x3d"+
-b.data.deletehash,a=new ErrorDialog(this,mxResources.get("published"),mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"])+"\x3cbr\x3e"+mxResources.get("deleteUrl",[c]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){window.open("http://imgur.com/"+b.data.id)}),!1);this.showDialog(a.container,340,170,!0,!1);a.init()});if(c){var g=new mxXmlRequest("/imgur?"+b.data.deletehash,
-JSON.stringify({title:e,description:"Edit a copy of this diagram at https://www.draw.io/i/"+b.data.id}),"POST");g.send(mxUtils.bind(this,function(){200==g.getStatus()?f():k(g)}),mxUtils.bind(this,function(){k(g)}))}else f()}catch(l){this.handleError(l)}else k(a)}),mxUtils.bind(this,function(a){k(a)}))}));this.showDialog(e.container,320,250,!0,!1);e.init()};EditorUi.prototype.publishImage=function(a){var b=this.getCurrentFile();null!=b&&(this.isExportToCanvas()?this.showExportDialog(!1,mxResources.get("publish"),
-"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(c,d,e,f,g){c=parseInt(c);if(!isNaN(c)&&0<c){c/=100;var k=this.editor.graph.isSelectionEmpty();e=null!=e?e:k;if(this.spinner.spin(document.body,mxResources.get("publishing")))try{this.exportToCanvas(mxUtils.bind(this,function(c){try{var d=g?mxUtils.getXml(this.editor.getGraphXml(e)):null,f=this.createPngDataUri(c,d);a(b,f.substring(f.lastIndexOf(",")+1),g)}catch(k){this.handleError(k)}}),null,null,null,mxUtils.bind(this,
-function(a){this.handleError(a)}),null,e,c||1,d,f)}catch(l){this.handleError(l)}}})):this.showRemoteExportDialog(mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(c,d){if(this.spinner.spin(document.body,mxResources.get("publishing"))){var e=this.editor.graph.getGraphBounds(),f=this.getFileData(!0,null,null,null,c);if(e.width*e.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE)try{var g=new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+
-(d?"1":"0")+"\x26xml\x3d"+encodeURIComponent(f));g.send(mxUtils.bind(this,function(){200==g.getStatus()?a(b,g.getText(),d):this.handleError(g)}))}catch(k){this.handleError(k)}else this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"))}})))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/
-86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,d){d()};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,f,g){g=null;null!=b&&(g=b.background,g==mxConstants.NONE&&(g=null));b=this.editor.graph.getSvg(g,null,null,null,null,f);b.setAttribute("content",encodeURIComponent(a));null!=
-c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(a))}));else return(!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(b)};EditorUi.prototype.exportToCanvas=
-function(a,b,c,d,e,f,g,k,l,m,n){f=null!=f?f:!0;var p=l?null:this.editor.graph.background;p==mxConstants.NONE&&(p=null);null==p&&(p=d);null==p&&!1==l&&(p="#ffffff");this.convertImages(this.editor.graph.getSvg(p,null,null,null,null,null!=g?g:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),l=parseInt(c.getAttribute("height"));k=null!=k?k:1;null!=b&&(k=!f?b/g:Math.min(1,Math.min(3*b/(4*l),
-b/g)));e.setAttribute("width",Math.ceil(k*g));e.setAttribute("height",Math.ceil(k*l));g=e.getContext("2d");g.scale(k,k);g.drawImage(d,0,0);a(e)});d.onerror=function(a){null!=e&&e(a)};try{m&&this.editor.addSvgShadow(c),this.convertMath(this.editor.graph,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))}catch(g){null!=e&&e(g)}}),c,n)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert;a.convert=function(c){null!=
-c&&(("http://"==c.substring(0,7)||"https://"==c.substring(0,8))&&c.substring(0,a.baseUrl.length)!=a.baseUrl?c=PROXY_URL+"?url\x3d"+encodeURIComponent(c):"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)));return c};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var e=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var k=a.getElementsByTagName(c),l=0;l<k.length;l++)mxUtils.bind(this,function(c){var k=d.convert(c.getAttribute(g));
-if(null!=k&&"data:"!=k.substring(0,5)){var l=f[k];null==l?(e++,this.convertImageToDataUri(k,function(d){null!=d&&(f[k]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,l)}})(k[l])});c("image","xlink:href");c("img","src");0==e&&b(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b()});else{var c=new Image;c.onload=function(){var a=document.createElement("canvas"),
-d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);b(a.toDataURL())};c.onerror=function(){b()};c.src=a}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),k=this.editor.extractGraphModel(g.documentElement);if(null!=k){var l=new mxGraphModel;(new mxCodec(k.ownerDocument)).decode(k,l);var m=this.editor.graph,n=l.getChildCount(l.getRoot());m.model.getChildCount(m.model.getRoot());m.model.beginUpdate();
-try{a={};for(g=0;g<n;g++){var p=l.getChildAt(l.getRoot(),g);if(1==n&&!m.isCellLocked(m.getDefaultParent()))var r=l.getChildren(p),f=f.concat(m.importCells(r,b,c,m.getDefaultParent(),null,a));else p=m.importCells([p],0,0,m.model.getRoot(),null,a)[0],r=m.model.getChildren(p),m.moveCells(r,b,c),f=f.concat(r)}if(d){m.isGridEnabled()&&(b=m.snap(b),c=m.snap(c));var s=m.getBoundingBoxFromGeometry(f,!0);m.moveCells(f,b-s.x,c-s.y)}}finally{m.model.endUpdate()}}}}catch(L){throw e||this.handleError(L,mxResources.get("invalidOrMissingFile")),
-L;}return f};EditorUi.prototype.insertTextAt=function(a,b,c,d,e,f){f=null!=f?f:!0;if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))return this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200==a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))})),[];if(!this.isOffline()&&(e||"data:"==a.substring(0,5)||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=
-this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var k=this.extractGraphModelFromPng(a),l=this.importXml(k,b,c,f,!0);if(0<l.length)return l}if("data:image/svg+xml;"==a.substring(0,19))try{if(k=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(k=a.substring(a.indexOf(",")+1),k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0)):k=decodeURIComponent(a.substring(a.indexOf(",")+1)),l=this.importXml(k,b,c,f,!0),0<l.length)return l}catch(m){}this.loadImage(a,mxUtils.bind(this,
-function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),d,e,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+this.convertDataUri(a)+";"))}),!0,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),f=Math.round(d.width*e);d=Math.round(d.height*e);g.setSelectionCell(g.insertVertex(null,
-null,"",g.snap(b),g.snap(c),f,d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+a+";"))}}),mxUtils.bind(this,function(){var e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,a,g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}));return[]}a=this.editor.graph.zapGremlins(mxUtils.trim(a));
-if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length){g=this.editor.graph;e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,"",g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.fireEvent(new mxEventObject("textInserted","cells",[e])),e.value=a,g.updateCellSize(e),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i.test(e.value)&&
-g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=g.gridSize}finally{g.getModel().endUpdate()}return[e]}};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,0.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,
-b){return/(\.*<graphml xmlns=\".*)/.test(a)||/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||null!=b&&/(\.vsdx)($|\?)/i.test(b)};EditorUi.prototype.importFile=function(a,b,c,d,e,f,g,k,l,m){m=null!=m?m:!0;var n=!1,p=null;"image"==b.substring(0,5)?(g=!1,"image/png"==b.substring(0,9)&&(b=this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(p=this.importXml(b,c,d,m),g=!0)),g||(p=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),m&&p.isGridEnabled()&&
-(c=p.snap(c),d=p.snap(d)),p=[p.insertVertex(null,null,"",c,d,e,f,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+a+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,g)?(n=!0,this.parseFile(null!=l?l:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){if(4==a.readyState){var b=null;200==a.status&&(b=this.importXml(a.responseText,c,d,m));null!=k&&k(b)}}),g)):/(\.vsdx)($|\?)/i.test(g)?
-(new mxVsdxModel).decode(l):p=this.insertTextAt(this.validateFileData(a),c,d,!0);!n&&null!=k&&k(p);return p};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,f,g;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="\x3d\x3d";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>
-2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);b+="\x3d";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>
-6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,f,g,k,l,m,n){var p=null!=b&&null!=c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;m=null!=m?m:this.maxImageBytes;l=null!=l?l:!0;var r=this.editor.graph,s=r.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){return null!=a&&"\x3cmxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):
-this.importFile(a,b,c,d,e,f,g,k,l,p)});f=null!=f?f:mxUtils.bind(this,function(a){r.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var L=a.length,K=L,R=[],T=mxUtils.bind(this,function(a,b){R[a]=b;if(0==--K){this.spinner.stop();if(null!=k)k(R);else{var c=[];r.getModel().beginUpdate();try{for(var d=0;d<R.length;d++){var e=R[d]();null!=e&&(c=c.concat(e))}}finally{r.getModel().endUpdate()}}f(c)}}),aa=0;aa<L;aa++)mxUtils.bind(this,function(f){var k=a[f],p=new FileReader;
-p.onload=mxUtils.bind(this,function(a){if(null==g||g(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var p=a.target.result,q=p.indexOf(","),r=atob(p.substring(q+1)),z=mxUtils.parseXml(r),r=z.getElementsByTagName("svg");if(0<r.length){var D=r[0].getAttribute("content");null!=D&&"\x3c"!=D.charAt(0)&&"%"!=D.charAt(0)&&(D=unescape(window.atob?atob(D):Base64.decode(D,!0)));null!=D&&"%"==D.charAt(0)&&(D=decodeURIComponent(D));null!=D&&("\x3cmxfile "===D.substring(0,8)||"\x3cmxGraphModel "===
-D.substring(0,14))?T(f,mxUtils.bind(this,function(){return e(D,"text/xml",b+f*s,c+f*s,0,0,k.name)})):T(f,mxUtils.bind(this,function(){try{if(p.substring(0,q+1),null!=z){var a=z.getElementsByTagName("svg");if(0<a.length){var g=a[0],l=parseFloat(g.getAttribute("width")),m=parseFloat(g.getAttribute("height")),n=g.getAttribute("viewBox");if(null==n||0==n.length)g.setAttribute("viewBox","0 0 "+l+" "+m);else if(isNaN(l)||isNaN(m)){var r=n.split(" ");3<r.length&&(l=parseFloat(r[2]),m=parseFloat(r[3]))}p=
-this.createSvgDataUri(mxUtils.getXml(a[0]));var v=Math.min(1,Math.min(d/Math.max(1,l)),d/Math.max(1,m));return e(p,k.type,b+f*s,c+f*s,Math.max(1,Math.round(l*v)),Math.max(1,Math.round(m*v)),k.name)}}}catch(y){}return null}))}}else{r=!1;if("image/png"==k.type){var F=this.extractGraphModelFromPng(a.target.result);if(null!=F&&0<F.length){var G=new Image;G.src=a.target.result;T(f,mxUtils.bind(this,function(){return e(F,"text/xml",b+f*s,c+f*s,G.width,G.height,k.name)}));r=!0}}r||(null!=window.chrome&&
-null!=chrome.app&&null!=chrome.app.runtime?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,n,p){T(f,mxUtils.bind(this,function(){if(null!=g&&g.length<m){var q=!l||!this.isResampleImage(a.target.result)?
-1:Math.min(1,Math.min(d/n,d/p));return e(g,k.type,b+f*s,c+f*s,Math.round(n*q),Math.round(p*q),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),l,d,n)})))}else e(a.target.result,k.type,b+f*s,c+f*s,240,160,k.name,function(a){T(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)?e(null,k.type,b+f*s,c+f*s,240,160,k.name,function(a){T(f,function(){return a})},k):"image"==k.type.substring(0,5)?p.readAsDataURL(k):p.readAsText(k)})(aa)};EditorUi.prototype.parseFile=
-function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1<l){var m=
-Math.round(g/l),n=Math.round(k/l),p=document.createElement("canvas");p.width=m;p.height=n;p.getContext("2d").drawImage(a,0,0,m,n);var r=p.toDataURL();if(r.length<b.length){var s=document.createElement("canvas");s.width=m;s.height=n;var L=s.toDataURL();r!==L&&(b=r,g=m,k=n)}}}catch(K){}c(b,g,k)};(function(){EditorUi.prototype.crcTable=[];for(var a=0;256>a;a++)for(var b=a,c=0;8>c;c++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[a]=b;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=
-0;e<d;e++)a=EditorUi.prototype.crcTable[(a^b[c+e])&255]^a>>>8;return a}})();EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=k;k+=b;return a.substring(c,k)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=
-e&&e();else{f(a,17);e=a.substring(0,k);do{var l=g(a);if("IDAT"==f(a,4)){e=a.substring(0,k-8);l=4294967295;l=this.updateCRC(l,b,0,4);l=this.updateCRC(l,d,0,d.length);e+=String.fromCharCode(c.length+d.length+1+("zTXt"==b?1:0)>>24&255,c.length+d.length+1+("zTXt"==b?1:0)>>16&255,c.length+d.length+1+("zTXt"==b?1:0)>>8&255,c.length+d.length+1+("zTXt"==b?1:0)&255)+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+String.fromCharCode((l^4294967295)>>24&255,(l^4294967295)>>16&255,(l^4294967295)>>
-8&255,(l^4294967295)&255);e+=a.substring(k-8,a.length);break}e+=a.substring(k-8,k-4+l);d=f(a,l);f(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,
-e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(e){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var k=EditorUi.prototype.init;
-EditorUi.prototype.init=function(){k.apply(this,arguments);var a=this.editor.graph,b=this;mxClient.IS_SVG&&this.editor.addSvgShadow(a.view.canvas.ownerSVGElement,null,!0);this.defaultFilename=mxResources.get("untitledDiagram");var c=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a&&null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:c.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=
-b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var d=this.actions.get("print");d.setEnabled(!mxClient.IS_IOS||!navigator.standalone);d.visible=d.isEnabled();if(!this.editor.chromeless){this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,
-!0,"insertEllipse",!0);mxClient.IS_IE||a.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a)&&!b.isEditing())try{for(var c=a.clipboardData||a.originalEvent.clipboardData,b=!1,d=0;d<c.types.length;d++)if("text/"===c.types[d].substring(0,5)){b=!0;break}if(!b){var e=c.items;for(index in e){var f=e[index];if("file"===f.kind){var g=this.editor.graph.getInsertPoint();this.importFiles([f.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(a);
-break}}}}catch(k){}}),!1);var e=document.createElement("div");e.style.position="absolute";e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.display="block";e.contentEditable=!0;mxUtils.setOpacity(e,0);e.style.width="1px";e.style.height="1px";e.innerHTML="\x26nbsp;";var f=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);
-if(null!=a.container&&a.isEnabled()&&!a.isMouseDown&&!a.isEditing()&&null==this.dialog&&"INPUT"!=c.nodeName&&"TEXTAREA"!=c.nodeName&&(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)&&!f)e.style.left=a.container.scrollLeft+10+"px",e.style.top=a.container.scrollTop+10+"px",a.container.appendChild(e),f=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){e.focus();document.execCommand("selectAll",!1,null)},0):(e.focus(),document.execCommand("selectAll",!1,null))}));var g=
-function(){window.setTimeout(function(){e.innerHTML="\x26nbsp;";e.focus();document.execCommand("selectAll",!1,null)},0)};mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){if(f&&(224==c||17==c||91==c))f=!1,!a.isEditing()&&null==this.dialog&&null!=a.container&&a.container.focus(),e.parentNode.removeChild(e)}),0)}));mxEvent.addListener(e,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(e),
-g())}));mxEvent.addListener(e,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&(this.copyCells(e,!0),g())}));mxEvent.addListener(e,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&(e.innerHTML="\x26nbsp;",e.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,e);e.innerHTML="\x26nbsp;"}),0))}),!0);var l=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==e?!0:l.apply(this,arguments)}}d=Math.max(document.body.clientHeight||
-0,document.documentElement.clientHeight||0)/2;this.spinner=this.createSpinner(document.body.clientWidth/2-2,d,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){if(null==d&&(!mxClient.IS_IE||
-10<document.documentMode))d=this.highlightElement(c);a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,
-"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",
-!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.test){d=document.getElementById("geFooter");null!=d&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width=
-"98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),d.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);
-this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var m=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:m.apply(this,arguments)}}d=document.getElementById("geInfo");null!=d&&d.parentNode.removeChild(d);if(Graph.fileSupport){var n=null;mxEvent.addListener(a.container,"dragleave",function(b){a.isEnabled()&&(null!=n&&(n.parentNode.removeChild(n),n=null),b.stopPropagation(),
-b.preventDefault())});mxEvent.addListener(a.container,"dragover",mxUtils.bind(this,function(b){if(null==n&&(!mxClient.IS_IE||10<document.documentMode))n=this.highlightElement(a.container);null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a.container,"drop",mxUtils.bind(this,function(b){null!=n&&(n.parentNode.removeChild(n),n=null);if(a.isEnabled()){var c=mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=a.view.translate,
-e=a.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(b)&&(g=f=0);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b));else{var k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(b);if(null!=c)a.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){c=
-b.dataTransfer.getData("text/html");e=document.createElement("div");e.innerHTML=c;var d=null,l=e.getElementsByTagName("img");null!=l&&1==l.length?(c=l[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)||(d=!0)):(e=e.getElementsByTagName("a"),null!=e&&1==e.length&&(c=e[0].getAttribute("href")));a.setSelectionCells(this.insertTextAt(c,f,g,!0,d))}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(b){var c=Math.max(1,b.width);
-b=Math.max(1,b.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,b));a.setSelectionCell(a.insertVertex(null,null,"",f,g,c*d,b*d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+k+";"))}),mxUtils.bind(this,function(b){a.setSelectionCells(this.insertTextAt(k,f,g,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&a.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),
-f,g,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode()};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",
-!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=this.editor.graph,d=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),e=!1;try{var f=d.lastIndexOf("%3E");f<d.length-3&&(d=d.substring(0,f+3))}catch(g){}try{var k=b.getElementsByTagName("span"),l=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(d);this.isCompatibleString(l)&&(e=!0,d=l)}catch(m){}c.lastPasteXml==d?c.pasteCounter++:
-(c.lastPasteXml=d,c.pasteCounter=0);f=c.pasteCounter*c.gridSize;if(null!=d&&0<d.length&&(e||this.isCompatibleString(d)?c.setSelectionCells(this.importXml(d,f,f)):(e=c.getInsertPoint(),c.setSelectionCells(this.insertTextAt(d,e.x+f,e.y+f,!0))),!c.isSelectionEmpty())){c.scrollCellToVisible(c.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(n){}}}};var l=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=
-function(a){var b=Format.prototype.init;Format.prototype.init=function(){b.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var c=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed?c.apply(this,arguments):this.clear()};var d=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=d.apply(this,arguments);var b=this.editorUi;if(b.editor.graph.isEnabled()){var c=
-b.getCurrentFile();null!=c&&c.isAutosaveOptional()&&(c=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(c))}return a};var e=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&
-this.container.appendChild(this.addStyles(this.createPanel()));e.apply(this,arguments)};var f=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";b.style.marginRight="2px";a.appendChild(b);
-b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return f.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function c(a){var b=mxUtils.button("",function(b){d.getModel().beginUpdate();try{var c=
-d.getSelectionCells();for(b=0;b<c.length;b++){for(var e=d.getModel().getStyle(c[b]),g=0;g<f.length;g++)e=mxUtils.removeStylename(e,f[g]);null!=a?(e=mxUtils.setStyle(e,mxConstants.STYLE_FILLCOLOR,a.fill),e=mxUtils.setStyle(e,mxConstants.STYLE_STROKECOLOR,a.stroke),e=mxUtils.setStyle(e,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(e=mxUtils.setStyle(e,mxConstants.STYLE_FILLCOLOR,"#ffffff"),e=mxUtils.setStyle(e,mxConstants.STYLE_STROKECOLOR,"#000000"),e=mxUtils.setStyle(e,mxConstants.STYLE_GRADIENTCOLOR,
-null));d.getModel().setStyle(c[b],e)}}finally{d.getModel().endUpdate()}});b.style.width="36px";b.style.height="30px";b.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr\x3d'"+a.fill+"', EndColorStr\x3d'"+a.gradient+"', GradientType\x3d0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":b.style.backgroundColor=a.fill,b.style.border=
-"1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border="1px solid #000000");e.appendChild(b)}e.innerHTML="";for(var g=0;g<a.length;g++)0<g&&0==mxUtils.mod(g,4)&&mxUtils.br(e),c(a[g])}function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var d=this.editorUi.editor.graph,e=document.createElement("div");e.style.whiteSpace="normal";e.style.paddingLeft="24px";e.style.paddingRight="20px";
-a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(e);var f=["plain-gray","plain-blue","plain-green","plain-orange","plain-yellow","plain-red","plain-purple",null];null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var g=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",
-stroke:"#9673a6"}],[null,{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}]],k=document.createElement("div");k.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII\x3d);";
+":"+m.value));f.send(JSON.stringify(e))}else this.hideDialog(),this.spinner.stop(),this.handleError(JSON.parse(c.getText()))}),mxUtils.bind(this,function(a){this.hideDialog();this.spinner.stop();this.handleError({message:mxResources.get("unknownError")})}))}),null,null,c,null,!1);this.showDialog(c.container,260,260,!0,!1);c.init()};EditorUi.prototype.uploadToImgur=function(a,b,c,d){var e=this.spinner.pause(),f=new ErrorDialog(this,mxResources.get("warning"),'\x3cimg style\x3d"max-width:300px;max-height:80px;margin-bottom:20px;padding:6px;border:1px solid gray;" src\x3d"data:image/png;base64,'+
+b+'"/\x3e\x3cbr\x3e'+mxResources.get("publishConfirmation"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("publish"),mxUtils.bind(this,function(){e();var f=null!=a.getTitle()?a.getTitle():this.defaultFilename,g=f.lastIndexOf("."),k=f;0<g&&(k=f=k.substring(0,g));var g=new mxXmlRequest("/imgur",JSON.stringify({type:"base64",image:b,name:k+".png",title:f,description:"Made with https://www.draw.io"}),"POST"),l=mxUtils.bind(this,function(a){var b={message:mxResources.get("unknownError")};
+try{var c=JSON.parse(a.getText()),b={message:c.message||c.data.error}}catch(d){}this.handleError(b)});g.send(mxUtils.bind(this,function(a){if(200==a.getStatus())try{var b=JSON.parse(a.getText());try{(new Image).src="log?severity\x3dCONFIG\x26msg\x3dimgur-published:"+b.data.id+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION)+"\x26ts\x3d"+(new Date).getTime()}catch(e){}var g=mxUtils.bind(this,function(){this.spinner.stop();var a="http://i.imgur.com/"+b.data.id+".png",c="https://www.draw.io/imgur?delete\x3d"+
+b.data.deletehash,a=new ErrorDialog(this,mxResources.get("published"),mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"])+"\x3cbr\x3e"+mxResources.get("deleteUrl",[c]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("share"),function(){d(b.data.id)},!1);this.showDialog(a.container,340,170,!0,!1);a.init()});if(c){var k=new mxXmlRequest("/imgur?"+b.data.deletehash,JSON.stringify({title:f,description:"Edit a copy of this diagram at https://www.draw.io/i/"+
+b.data.id}),"POST");k.send(mxUtils.bind(this,function(){200==k.getStatus()?g():l(k)}),mxUtils.bind(this,function(){l(k)}))}else g()}catch(m){this.handleError(m)}else l(a)}),mxUtils.bind(this,function(a){l(a)}))}));this.showDialog(f.container,320,250,!0,!1);f.init()};EditorUi.prototype.publishImage=function(a,b){var c=this.getCurrentFile();null!=c&&(this.isExportToCanvas()?this.showExportDialog(!1,mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,
+function(d,e,f,g,k){d=parseInt(d);if(!isNaN(d)&&0<d){d/=100;var l=this.editor.graph.isSelectionEmpty();f=null!=f?f:l;if(this.spinner.spin(document.body,mxResources.get("publishing")))try{this.exportToCanvas(mxUtils.bind(this,function(d){try{var e=k?mxUtils.getXml(this.editor.getGraphXml(f)):null,g=this.createPngDataUri(d,e);a(c,g.substring(g.lastIndexOf(",")+1),k,b)}catch(l){this.handleError(l)}}),null,null,null,mxUtils.bind(this,function(a){this.handleError(a)}),null,f,d||1,e,g)}catch(m){this.handleError(m)}}})):
+this.showRemoteExportDialog(mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(d,e){if(this.spinner.spin(document.body,mxResources.get("publishing"))){var f=this.editor.graph.getGraphBounds(),g=this.getFileData(!0,null,null,null,d);if(f.width*f.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE)try{var k=new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+(e?"1":"0")+"\x26xml\x3d"+encodeURIComponent(g));k.send(mxUtils.bind(this,
+function(){200==k.getStatus()?a(c,k.getText(),e,b):this.handleError(k)}))}catch(l){this.handleError(l)}else this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"))}})))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);
+if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,d){d()};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,f,g){g=null;null!=b&&(g=b.background,g==mxConstants.NONE&&(g=null));b=this.editor.graph.getSvg(g,null,null,null,null,f);b.setAttribute("content",encodeURIComponent(a));null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,
+function(a){e((!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(a))}));else return(!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(b)};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,k,l,m,n){f=null!=f?f:!0;var p=l?null:this.editor.graph.background;
+p==mxConstants.NONE&&(p=null);null==p&&(p=d);null==p&&!1==l&&(p="#ffffff");this.convertImages(this.editor.graph.getSvg(p,null,null,null,null,null!=g?g:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),l=parseInt(c.getAttribute("height"));k=null!=k?k:1;null!=b&&(k=!f?b/g:Math.min(1,Math.min(3*b/(4*l),b/g)));e.setAttribute("width",Math.ceil(k*g));e.setAttribute("height",Math.ceil(k*l));g=
+e.getContext("2d");g.scale(k,k);g.drawImage(d,0,0);a(e)});d.onerror=function(a){null!=e&&e(a)};try{m&&this.editor.addSvgShadow(c),this.convertMath(this.editor.graph,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))}catch(g){null!=e&&e(g)}}),c,n)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert;a.convert=function(c){null!=c&&(("http://"==c.substring(0,7)||"https://"==c.substring(0,8))&&c.substring(0,
+a.baseUrl.length)!=a.baseUrl?c=PROXY_URL+"?url\x3d"+encodeURIComponent(c):"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)));return c};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var e=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var k=a.getElementsByTagName(c),l=0;l<k.length;l++)mxUtils.bind(this,function(c){var k=d.convert(c.getAttribute(g));if(null!=k&&"data:"!=k.substring(0,5)){var l=f[k];null==l?(e++,this.convertImageToDataUri(k,
+function(d){null!=d&&(f[k]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,l)}})(k[l])});c("image","xlink:href");c("img","src");0==e&&b(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b()});else{var c=new Image;c.onload=function(){var a=document.createElement("canvas"),d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);b(a.toDataURL())};
+c.onerror=function(){b()};c.src=a}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),k=this.editor.extractGraphModel(g.documentElement);if(null!=k){var l=new mxGraphModel;(new mxCodec(k.ownerDocument)).decode(k,l);var m=this.editor.graph,n=l.getChildCount(l.getRoot());m.model.getChildCount(m.model.getRoot());m.model.beginUpdate();try{a={};for(g=0;g<n;g++){var p=l.getChildAt(l.getRoot(),g);if(1==n&&!m.isCellLocked(m.getDefaultParent()))var r=
+l.getChildren(p),f=f.concat(m.importCells(r,b,c,m.getDefaultParent(),null,a));else p=m.importCells([p],0,0,m.model.getRoot(),null,a)[0],r=m.model.getChildren(p),m.moveCells(r,b,c),f=f.concat(r)}if(d){m.isGridEnabled()&&(b=m.snap(b),c=m.snap(c));var s=m.getBoundingBoxFromGeometry(f,!0);m.moveCells(f,b-s.x,c-s.y)}}finally{m.model.endUpdate()}}}}catch(L){throw e||this.handleError(L,mxResources.get("invalidOrMissingFile")),L;}return f};EditorUi.prototype.insertTextAt=function(a,b,c,d,e,f){f=null!=f?f:
+!0;if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))return this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200==a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))})),[];if(!this.isOffline()&&(e||"data:"==a.substring(0,5)||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var k=
+this.extractGraphModelFromPng(a),l=this.importXml(k,b,c,f,!0);if(0<l.length)return l}if("data:image/svg+xml;"==a.substring(0,19))try{if(k=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(k=a.substring(a.indexOf(",")+1),k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0)):k=decodeURIComponent(a.substring(a.indexOf(",")+1)),l=this.importXml(k,b,c,f,!0),0<l.length)return l}catch(m){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,
+function(a,d,e){g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),d,e,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+this.convertDataUri(a)+";"))}),!0,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),f=Math.round(d.width*e);d=Math.round(d.height*e);g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),f,d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+
+a+";"))}}),mxUtils.bind(this,function(){var e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,a,g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}));return[]}a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length){g=this.editor.graph;e=null;g.getModel().beginUpdate();
+try{e=g.insertVertex(g.getDefaultParent(),null,"",g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.fireEvent(new mxEventObject("textInserted","cells",[e])),e.value=a,g.updateCellSize(e),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i.test(e.value)&&g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=
+g.gridSize}finally{g.getModel().endUpdate()}return[e]}};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,0.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\.*<graphml xmlns=\".*)/.test(a)||/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||
+null!=b&&/(\.vsdx)($|\?)/i.test(b)};EditorUi.prototype.importFile=function(a,b,c,d,e,f,g,k,l,m){m=null!=m?m:!0;var n=!1,p=null;"image"==b.substring(0,5)?(g=!1,"image/png"==b.substring(0,9)&&(b=this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(p=this.importXml(b,c,d,m),g=!0)),g||(p=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),m&&p.isGridEnabled()&&(c=p.snap(c),d=p.snap(d)),p=[p.insertVertex(null,null,"",c,d,e,f,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+
+a+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,g)?(n=!0,this.parseFile(null!=l?l:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){if(4==a.readyState){var b=null;200==a.status&&(b=this.importXml(a.responseText,c,d,m));null!=k&&k(b)}}),g)):/(\.vsdx)($|\?)/i.test(g)?(new mxVsdxModel).decode(l):p=this.insertTextAt(this.validateFileData(a),c,d,!0);!n&&null!=k&&k(p);return p};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=
+a.length,e,f,g;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="\x3d\x3d";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&
+15)<<2);b+="\x3d";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,f,g,k,l,m,n){var p=null!=b&&null!=
+c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;m=null!=m?m:this.maxImageBytes;l=null!=l?l:!0;var r=this.editor.graph,s=r.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){return null!=a&&"\x3cmxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,c,d,e,f,g,k,l,p)});f=null!=f?f:mxUtils.bind(this,function(a){r.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var L=
+a.length,K=L,R=[],T=mxUtils.bind(this,function(a,b){R[a]=b;if(0==--K){this.spinner.stop();if(null!=k)k(R);else{var c=[];r.getModel().beginUpdate();try{for(var d=0;d<R.length;d++){var e=R[d]();null!=e&&(c=c.concat(e))}}finally{r.getModel().endUpdate()}}f(c)}}),aa=0;aa<L;aa++)mxUtils.bind(this,function(f){var k=a[f],p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==g||g(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var p=a.target.result,q=p.indexOf(","),
+r=atob(p.substring(q+1)),z=mxUtils.parseXml(r),r=z.getElementsByTagName("svg");if(0<r.length){var D=r[0].getAttribute("content");null!=D&&"\x3c"!=D.charAt(0)&&"%"!=D.charAt(0)&&(D=unescape(window.atob?atob(D):Base64.decode(D,!0)));null!=D&&"%"==D.charAt(0)&&(D=decodeURIComponent(D));null!=D&&("\x3cmxfile "===D.substring(0,8)||"\x3cmxGraphModel "===D.substring(0,14))?T(f,mxUtils.bind(this,function(){return e(D,"text/xml",b+f*s,c+f*s,0,0,k.name)})):T(f,mxUtils.bind(this,function(){try{if(p.substring(0,
+q+1),null!=z){var a=z.getElementsByTagName("svg");if(0<a.length){var g=a[0],l=parseFloat(g.getAttribute("width")),m=parseFloat(g.getAttribute("height")),n=g.getAttribute("viewBox");if(null==n||0==n.length)g.setAttribute("viewBox","0 0 "+l+" "+m);else if(isNaN(l)||isNaN(m)){var r=n.split(" ");3<r.length&&(l=parseFloat(r[2]),m=parseFloat(r[3]))}p=this.createSvgDataUri(mxUtils.getXml(a[0]));var v=Math.min(1,Math.min(d/Math.max(1,l)),d/Math.max(1,m));return e(p,k.type,b+f*s,c+f*s,Math.max(1,Math.round(l*
+v)),Math.max(1,Math.round(m*v)),k.name)}}}catch(y){}return null}))}}else{r=!1;if("image/png"==k.type){var F=this.extractGraphModelFromPng(a.target.result);if(null!=F&&0<F.length){var G=new Image;G.src=a.target.result;T(f,mxUtils.bind(this,function(){return e(F,"text/xml",b+f*s,c+f*s,G.width,G.height,k.name)}));r=!0}}r||(null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
+mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,n,p){T(f,mxUtils.bind(this,function(){if(null!=g&&g.length<m){var q=!l||!this.isResampleImage(a.target.result)?1:Math.min(1,Math.min(d/n,d/p));return e(g,k.type,b+f*s,c+f*s,Math.round(n*q),Math.round(p*q),k.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),l,d,n)})))}else e(a.target.result,k.type,b+f*s,c+f*s,240,160,k.name,function(a){T(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)?e(null,k.type,b+f*s,c+f*s,240,160,k.name,function(a){T(f,function(){return a})},k):"image"==k.type.substring(0,5)?p.readAsDataURL(k):p.readAsText(k)})(aa)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=
+function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1<l){var m=Math.round(g/l),n=Math.round(k/l),p=document.createElement("canvas");p.width=m;p.height=n;p.getContext("2d").drawImage(a,0,0,m,n);var r=p.toDataURL();if(r.length<b.length){var s=
+document.createElement("canvas");s.width=m;s.height=n;var L=s.toDataURL();r!==L&&(b=r,g=m,k=n)}}}catch(K){}c(b,g,k)};(function(){EditorUi.prototype.crcTable=[];for(var a=0;256>a;a++)for(var b=a,c=0;8>c;c++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[a]=b;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e<d;e++)a=EditorUi.prototype.crcTable[(a^b[c+e])&255]^a>>>8;return a}})();EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=k;k+=b;return a.substring(c,
+k)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,k);do{var l=g(a);if("IDAT"==f(a,4)){e=a.substring(0,k-8);l=4294967295;l=this.updateCRC(l,b,0,4);l=this.updateCRC(l,d,0,d.length);e+=String.fromCharCode(c.length+
+d.length+1+("zTXt"==b?1:0)>>24&255,c.length+d.length+1+("zTXt"==b?1:0)>>16&255,c.length+d.length+1+("zTXt"==b?1:0)>>8&255,c.length+d.length+1+("zTXt"==b?1:0)&255)+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+String.fromCharCode((l^4294967295)>>24&255,(l^4294967295)>>16&255,(l^4294967295)>>8&255,(l^4294967295)&255);e+=a.substring(k-8,a.length);break}e+=a.substring(k-8,k-4+l);d=f(a,l);f(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=
+function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||
+"IDAT"==c)return!0}))}catch(e){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){k.apply(this,arguments);var a=this.editor.graph,b=this;mxClient.IS_SVG&&this.editor.addSvgShadow(a.view.canvas.ownerSVGElement,null,!0);this.defaultFilename=mxResources.get("untitledDiagram");
+var c=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a&&null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:c.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var d=this.actions.get("print");d.setEnabled(!mxClient.IS_IOS||!navigator.standalone);d.visible=d.isEnabled();if(!this.editor.chromeless){this.keyHandler.bindAction(67,
+!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||a.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a)&&!b.isEditing())try{for(var c=a.clipboardData||a.originalEvent.clipboardData,b=!1,d=0;d<c.types.length;d++)if("text/"===
+c.types[d].substring(0,5)){b=!0;break}if(!b){var e=c.items;for(index in e){var f=e[index];if("file"===f.kind){var g=this.editor.graph.getInsertPoint();this.importFiles([f.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(a);break}}}}catch(k){}}),!1);var e=document.createElement("div");e.style.position="absolute";e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.display="block";e.contentEditable=!0;mxUtils.setOpacity(e,0);e.style.width="1px";e.style.height="1px";e.innerHTML="\x26nbsp;";
+var f=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);if(null!=a.container&&a.isEnabled()&&!a.isMouseDown&&!a.isEditing()&&null==this.dialog&&"INPUT"!=c.nodeName&&"TEXTAREA"!=c.nodeName&&(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)&&!f)e.style.left=a.container.scrollLeft+10+"px",e.style.top=a.container.scrollTop+
+10+"px",a.container.appendChild(e),f=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){e.focus();document.execCommand("selectAll",!1,null)},0):(e.focus(),document.execCommand("selectAll",!1,null))}));var g=function(){window.setTimeout(function(){e.innerHTML="\x26nbsp;";e.focus();document.execCommand("selectAll",!1,null)},0)};mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){if(f&&(224==c||17==c||91==c))f=!1,!a.isEditing()&&
+null==this.dialog&&null!=a.container&&a.container.focus(),e.parentNode.removeChild(e)}),0)}));mxEvent.addListener(e,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(e),g())}));mxEvent.addListener(e,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&(this.copyCells(e,!0),g())}));mxEvent.addListener(e,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&(e.innerHTML="\x26nbsp;",e.focus(),window.setTimeout(mxUtils.bind(this,
+function(){this.pasteCells(b,e);e.innerHTML="\x26nbsp;"}),0))}),!0);var l=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==e?!0:l.apply(this,arguments)}}d=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2;this.spinner=this.createSpinner(document.body.clientWidth/2-2,d,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;
+null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){if(null==d&&(!mxClient.IS_IE||10<document.documentMode))d=this.highlightElement(c);a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
+0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,
+Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.test){d=document.getElementById("geFooter");
+null!=d&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),d.appendChild(this.styleInput),
+this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var m=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:m.apply(this,arguments)}}d=document.getElementById("geInfo");
+null!=d&&d.parentNode.removeChild(d);if(Graph.fileSupport){var n=null;mxEvent.addListener(a.container,"dragleave",function(b){a.isEnabled()&&(null!=n&&(n.parentNode.removeChild(n),n=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(a.container,"dragover",mxUtils.bind(this,function(b){if(null==n&&(!mxClient.IS_IE||10<document.documentMode))n=this.highlightElement(a.container);null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a.container,
+"drop",mxUtils.bind(this,function(b){null!=n&&(n.parentNode.removeChild(n),n=null);if(a.isEnabled()){var c=mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=a.view.translate,e=a.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(b)&&(g=f=0);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b));else{var k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?
+b.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(b);if(null!=c)a.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){c=b.dataTransfer.getData("text/html");e=document.createElement("div");e.innerHTML=c;var d=null,l=e.getElementsByTagName("img");null!=l&&1==l.length?(c=l[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)||(d=!0)):(e=e.getElementsByTagName("a"),null!=e&&1==e.length&&(c=e[0].getAttribute("href")));
+a.setSelectionCells(this.insertTextAt(c,f,g,!0,d))}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(b){var c=Math.max(1,b.width);b=Math.max(1,b.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,b));a.setSelectionCell(a.insertVertex(null,null,"",f,g,c*d,b*d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+k+";"))}),mxUtils.bind(this,
+function(b){a.setSelectionCells(this.insertTextAt(k,f,g,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&a.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),f,g,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode()};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=
+mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=this.editor.graph,d=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),e=!1;try{var f=d.lastIndexOf("%3E");f<d.length-3&&(d=d.substring(0,f+3))}catch(g){}try{var k=
+b.getElementsByTagName("span"),l=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(d);this.isCompatibleString(l)&&(e=!0,d=l)}catch(m){}c.lastPasteXml==d?c.pasteCounter++:(c.lastPasteXml=d,c.pasteCounter=0);f=c.pasteCounter*c.gridSize;if(null!=d&&0<d.length&&(e||this.isCompatibleString(d)?c.setSelectionCells(this.importXml(d,f,f)):(e=c.getInsertPoint(),c.setSelectionCells(this.insertTextAt(d,e.x+f,e.y+f,!0))),!c.isSelectionEmpty())){c.scrollCellToVisible(c.getSelectionCell());
+null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(n){}}}};var l=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var b=Format.prototype.init;Format.prototype.init=function(){b.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var c=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed?c.apply(this,arguments):this.clear()};
+var d=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=d.apply(this,arguments);var b=this.editorUi;if(b.editor.graph.isEnabled()){var c=b.getCurrentFile();null!=c&&c.isAutosaveOptional()&&(c=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),
+a.appendChild(c))}return a};var e=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));e.apply(this,arguments)};var f=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",
+mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";b.style.marginRight="2px";a.appendChild(b);b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return f.apply(this,
+arguments)};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function c(a){var b=mxUtils.button("",function(b){d.getModel().beginUpdate();try{var c=d.getSelectionCells();for(b=0;b<c.length;b++){for(var e=d.getModel().getStyle(c[b]),g=0;g<f.length;g++)e=mxUtils.removeStylename(e,f[g]);null!=a?(e=mxUtils.setStyle(e,mxConstants.STYLE_FILLCOLOR,a.fill),e=mxUtils.setStyle(e,mxConstants.STYLE_STROKECOLOR,a.stroke),e=mxUtils.setStyle(e,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(e=mxUtils.setStyle(e,
+mxConstants.STYLE_FILLCOLOR,"#ffffff"),e=mxUtils.setStyle(e,mxConstants.STYLE_STROKECOLOR,"#000000"),e=mxUtils.setStyle(e,mxConstants.STYLE_GRADIENTCOLOR,null));d.getModel().setStyle(c[b],e)}}finally{d.getModel().endUpdate()}});b.style.width="36px";b.style.height="30px";b.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr\x3d'"+a.fill+"', EndColorStr\x3d'"+
+a.gradient+"', GradientType\x3d0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":b.style.backgroundColor=a.fill,b.style.border="1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border="1px solid #000000");e.appendChild(b)}e.innerHTML="";for(var g=0;g<a.length;g++)0<g&&0==mxUtils.mod(g,4)&&mxUtils.br(e),c(a[g])}function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity=
+"0.5"})}var d=this.editorUi.editor.graph,e=document.createElement("div");e.style.whiteSpace="normal";e.style.paddingLeft="24px";e.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(e);var f=["plain-gray","plain-blue","plain-green","plain-orange","plain-yellow","plain-red","plain-purple",null];null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var g=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},
+{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",
+stroke:"#996185",gradient:"#d5739d"}]],k=document.createElement("div");k.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII\x3d);";
a.appendChild(k);mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,g.length);b(g[this.editorUi.currentScheme])}));var l=document.createElement("div");l.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg\x3d\x3d);";
a.appendChild(l);mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,g.length);b(g[this.editorUi.currentScheme])}));c(k);c(l);b(g[this.editorUi.currentScheme]);return a};return l.apply(this,arguments)};null!=window.StyleFormatPanel&&(StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),c=null;1==this.editorUi.editor.graph.getSelectionCount()&&(c=mxUtils.button(mxResources.get("editStyle"),
mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),c.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),c.style.width="202px",c.style.marginBottom="2px",a.appendChild(c));var d=this.editorUi.editor.graph,e=d.view.getState(d.getSelectionCell());1==d.getSelectionCount()&&null!=e&&null!=e.shape&&null!=e.shape.stencil?(b=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editShape").funct()})),
@@ -2721,21 +2721,21 @@ f=Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.h
this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,
!0);b.outline.view.validate()});return b};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").setEnabled(c);this.actions.get("shadowVisible").setEnabled(c);this.actions.get("connectionArrows").setEnabled(c);
this.actions.get("connectionPoints").setEnabled(c);this.actions.get("copyStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);this.actions.get("moveToFolder").setEnabled(null!=b);this.actions.get("makeCopy").setEnabled(null!=b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled("1"==
-urlParams.embed||null!=b&&!b.isRestricted());this.actions.get("imgur").setEnabled(null!=b&&!b.isRestricted());this.actions.get("github").setEnabled(null!=b&&!b.isRestricted());this.actions.get("publishLink").setEnabled(null!=b&&!b.isRestricted());this.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=
-null;Graph.prototype.pasteCounter=0;Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){p.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#dropShadow)"):this.view.getDrawPane().removeAttribute("filter"),
-b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};var s=Graph.prototype.init;Graph.prototype.init=function(){function a(c){b=c;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(c)}s.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=new mxStackLayout(this.graph,!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1<b.height/20){var c=b.height%20;b.height+=10<c?20-c:-c}this.graph.getModel().setGeometry(a,
-b)};c.fill=!0;c.unitSize=mxRackContainer.unitSize|20;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.resizeParent=!1;return c}return d.apply(this,arguments)}};mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];
-mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",
-STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries.eeLogicGates=[STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeResistors=[STENCIL_PATH+"/electrical/resistors.xml"];mxStencilRegistry.libraries.eeCapacitors=[STENCIL_PATH+"/electrical/capacitors.xml"];mxStencilRegistry.libraries.eeInductors=[STENCIL_PATH+"/electrical/inductors.xml"];mxStencilRegistry.libraries.eeSwitchesRelays=
-[STENCIL_PATH+"/electrical/switchesRelays.xml",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries.eeDiodes=[STENCIL_PATH+"/electrical/diodes.xml"];mxStencilRegistry.libraries.eeSources=[STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries.eeTransistors=[STENCIL_PATH+"/electrical/mosfets1.xml",STENCIL_PATH+"/electrical/mosfets2.xml",STENCIL_PATH+"/electrical/transistors.xml"];mxStencilRegistry.libraries.eeMisc=[STENCIL_PATH+"/electrical/electro-mechanical.xml",
-STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries.eeAudio=[STENCIL_PATH+"/electrical/radio.xml"];mxStencilRegistry.libraries.eePlcLadder=[STENCIL_PATH+"/electrical/plc_ladder.xml"];mxStencilRegistry.libraries.eeAbstract=[STENCIL_PATH+"/electrical/abstract.xml",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeOptical=[STENCIL_PATH+"/electrical/opto_electronics.xml"];mxStencilRegistry.libraries.eeVacuumTubes=[STENCIL_PATH+"/electrical/vacuum_tubes.xml"];
-mxStencilRegistry.libraries.eeWaveforms=[STENCIL_PATH+"/electrical/waveforms.xml"];mxStencilRegistry.libraries.eeInstruments=[STENCIL_PATH+"/electrical/instruments.xml"];mxStencilRegistry.libraries["mscae/cloud"]=[STENCIL_PATH+"/mscae/cloud.xml"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];
-mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+
-"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",
-STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.citrix=[STENCIL_PATH+"/citrix.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];
-mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var r=
-mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,g,k,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return r.apply(this,arguments)}})();function DiagramPage(a){this.node=a}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+urlParams.embed||null!=b&&!b.isRestricted());this.actions.get("imgur").setEnabled(null!=b&&!b.isRestricted());this.actions.get("twitter").setEnabled(null!=b&&!b.isRestricted());this.actions.get("facebook").setEnabled(null!=b&&!b.isRestricted());this.actions.get("github").setEnabled(null!=b&&!b.isRestricted());this.actions.get("publishLink").setEnabled(null!=b&&!b.isRestricted());this.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&
+null!=a&&null!=a.shape&&null!=a.shape.stencil)};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){p.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&
+(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#dropShadow)"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};var s=Graph.prototype.init;Graph.prototype.init=function(){function a(c){b=c;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(c)}s.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,
+"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=new mxStackLayout(this.graph,
+!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1<b.height/20){var c=b.height%20;b.height+=10<c?20-c:-c}this.graph.getModel().setGeometry(a,b)};c.fill=!0;c.unitSize=mxRackContainer.unitSize|20;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.resizeParent=!1;return c}return d.apply(this,arguments)}};mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+
+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+
+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries.eeLogicGates=[STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeResistors=[STENCIL_PATH+"/electrical/resistors.xml"];mxStencilRegistry.libraries.eeCapacitors=
+[STENCIL_PATH+"/electrical/capacitors.xml"];mxStencilRegistry.libraries.eeInductors=[STENCIL_PATH+"/electrical/inductors.xml"];mxStencilRegistry.libraries.eeSwitchesRelays=[STENCIL_PATH+"/electrical/switchesRelays.xml",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries.eeDiodes=[STENCIL_PATH+"/electrical/diodes.xml"];mxStencilRegistry.libraries.eeSources=[STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries.eeTransistors=[STENCIL_PATH+"/electrical/mosfets1.xml",
+STENCIL_PATH+"/electrical/mosfets2.xml",STENCIL_PATH+"/electrical/transistors.xml"];mxStencilRegistry.libraries.eeMisc=[STENCIL_PATH+"/electrical/electro-mechanical.xml",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries.eeAudio=[STENCIL_PATH+"/electrical/radio.xml"];mxStencilRegistry.libraries.eePlcLadder=[STENCIL_PATH+"/electrical/plc_ladder.xml"];mxStencilRegistry.libraries.eeAbstract=[STENCIL_PATH+"/electrical/abstract.xml",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeOptical=
+[STENCIL_PATH+"/electrical/opto_electronics.xml"];mxStencilRegistry.libraries.eeVacuumTubes=[STENCIL_PATH+"/electrical/vacuum_tubes.xml"];mxStencilRegistry.libraries.eeWaveforms=[STENCIL_PATH+"/electrical/waveforms.xml"];mxStencilRegistry.libraries.eeInstruments=[STENCIL_PATH+"/electrical/instruments.xml"];mxStencilRegistry.libraries["mscae/cloud"]=[STENCIL_PATH+"/mscae/cloud.xml"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=
+[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=
+[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=
+[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.citrix=[STENCIL_PATH+"/citrix.xml"];mxStencilRegistry.libraries.archimate=
+[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&
+("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var r=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,g,k,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return r.apply(this,arguments)}})();function DiagramPage(a){this.node=a}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,c){this.ui=a;this.page=b;this.previous=c}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(a,b,c){this.ui=a;this.oldIndex=b;this.newIndex=c}
MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};function SelectPage(a,b){this.ui=a;this.previousPage=this.page=b;null!=b&&this.ui.updatePageRoot(b)}
SelectPage.prototype.execute=function(){if(null!=this.page&&0<=mxUtils.indexOf(this.ui.pages,this.previousPage)){var a=this.ui.currentPage,b=this.ui.editor,c=b.graph,d=b.graph.compress(c.zapGremlins(mxUtils.getXml(b.getGraphXml(!0))));mxUtils.setTextContent(a.node,d);a.viewState=c.getViewState();a.root=c.model.root;c.view.clear(a.root,!0);c.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;c.model.rootChanged(a.root);c.setViewState(a.viewState);b.fireEvent(new mxEventObject("setViewState",
diff --git a/war/package.json b/war/package.json
new file mode 100644
index 00000000..1dfb3c0c
--- /dev/null
+++ b/war/package.json
@@ -0,0 +1,32 @@
+{
+ "name": "drawio-desktop",
+ "version": "1.0.0",
+ "description": "draw.io desktop app",
+ "main": "electron.js",
+ "scripts":
+ {
+ "start": "electron ."
+ },
+ "repository":
+ {
+ "type": "git",
+ "url": "git+https://github.com/jgraph/draw.io.git"
+ },
+ "keywords": [
+ "draw.io",
+ "diagram",
+ "flowchart",
+ "UML"
+ ],
+ "author": "JGraph",
+ "license": "GPL-3.0",
+ "bugs":
+ {
+ "url": "https://github.com/jgraph/draw.io/issues"
+ },
+ "homepage": "https://github.com/jgraph/draw.io",
+ "devDependencies":
+ {
+ "electron": "^1.3.4"
+ }
+}
diff --git a/war/plugins/electron.js b/war/plugins/electron.js
new file mode 100644
index 00000000..e323ed93
--- /dev/null
+++ b/war/plugins/electron.js
@@ -0,0 +1,7 @@
+/**
+ * Plugin for electron build
+ */
+Draw.loadPlugin(function(ui)
+{
+ ui.hideFooter();
+}); \ No newline at end of file