@galaxyproject/galaxy-client 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/README.md +174 -0
  2. package/dist/00950d3d0eabc9b79c13.png +0 -0
  3. package/dist/00b14a051b8ec5846ca4.png +0 -0
  4. package/dist/015bb398cc86c8e2c532.png +0 -0
  5. package/dist/0a09dd8bcca1e540a97f.png +0 -0
  6. package/dist/0c708255f16de429468f.png +0 -0
  7. package/dist/120.bundled.js +2 -0
  8. package/dist/120.bundled.js.LICENSE.txt +20 -0
  9. package/dist/1444303e4f0c0f62fa36.png +0 -0
  10. package/dist/1551f4f60c37af51121f.woff2 +0 -0
  11. package/dist/175327482730212e7000.png +0 -0
  12. package/dist/17aaaa49460f37c9589a.png +0 -0
  13. package/dist/203d1199e7aef04c0a34.gif +0 -0
  14. package/dist/2285773e6b4b172f07d9.woff +0 -0
  15. package/dist/23f19bb08961f37aaf69.eot +0 -0
  16. package/dist/27c5873e9e627196c882.png +0 -0
  17. package/dist/295.bundled.js +1 -0
  18. package/dist/2f2c06d22919cab5a524.png +0 -0
  19. package/dist/2f517e09eb2ca6650ff5.svg +3717 -0
  20. package/dist/31bc77d4f6f4dbe60b99.png +0 -0
  21. package/dist/3458c7b831d6a8909f76.png +0 -0
  22. package/dist/36d93ca016d18f6fc3e6.png +0 -0
  23. package/dist/37478264c4ed6b0da2cb.png +0 -0
  24. package/dist/3fa7cde9c3400ad8112a.png +0 -0
  25. package/dist/40e48ce346be3ec51671.png +0 -0
  26. package/dist/4689f52cc96215721344.svg +801 -0
  27. package/dist/47683caf7120e987ca85.png +0 -0
  28. package/dist/47b9475d2b6a19bc0921.png +0 -0
  29. package/dist/491974d108fe4002b2aa.ttf +0 -0
  30. package/dist/492.bundled.js +1 -0
  31. package/dist/4a7b4107b62ef059ba65.png +0 -0
  32. package/dist/4b01ca501fadf65135bf.gif +0 -0
  33. package/dist/4dce7f71b08755f19759.png +0 -0
  34. package/dist/5000254d328af6822042.gif +0 -0
  35. package/dist/50a457cf9caf3ff7d302.png +0 -0
  36. package/dist/523592c8f36ba8d3d7b1.png +0 -0
  37. package/dist/527940b104eb2ea366c8.ttf +0 -0
  38. package/dist/564668c1dbc7c9509d9d.png +0 -0
  39. package/dist/56d4c7ce2d3591a02107.gif +0 -0
  40. package/dist/5c2e7e18ad426822d1f3.png +0 -0
  41. package/dist/5dc77fa7c8c5443ffdad.woff +0 -0
  42. package/dist/5f8db17a927f4c77d0a7.png +0 -0
  43. package/dist/668.bundled.js +1 -0
  44. package/dist/688bccf95583ddf2ba42.png +0 -0
  45. package/dist/6fa2fdf6fafd758dd414.png +0 -0
  46. package/dist/730.bundled.js +2 -0
  47. package/dist/730.bundled.js.LICENSE.txt +8 -0
  48. package/dist/77206a6bb316fa0aded5.eot +0 -0
  49. package/dist/79f89968996dfdb58aa6.png +0 -0
  50. package/dist/7a3337626410ca2f4071.woff2 +0 -0
  51. package/dist/7a8b4f130182d19a2d7c.svg +5034 -0
  52. package/dist/7c05f33b4fe5f8132439.woff2 +0 -0
  53. package/dist/8020d5b09a27dc698555.png +0 -0
  54. package/dist/819.bundled.js +2 -0
  55. package/dist/819.bundled.js.LICENSE.txt +261 -0
  56. package/dist/83e9fab1abb3d2242f81.png +0 -0
  57. package/dist/8ee9649d8f72724d5130.png +0 -0
  58. package/dist/92a18a81b9c504803c86.svg +1 -0
  59. package/dist/97bf67372ae8305f61b9.png +0 -0
  60. package/dist/9bbb245e67a133f6e486.eot +0 -0
  61. package/dist/CitationJS.bundled.js +1 -0
  62. package/dist/ListCollectionCreator.bundled.js +1 -0
  63. package/dist/PairCollectionCreator.bundled.js +1 -0
  64. package/dist/Screenshot.bundled.js +1 -0
  65. package/dist/ToolSourceDisplay.bundled.js +1 -0
  66. package/dist/a037125c3d4eda524f25.png +0 -0
  67. package/dist/a09a638a8f87fc89302e.gif +0 -0
  68. package/dist/a278964027d51119ea29.woff2 +0 -0
  69. package/dist/a287ab24df7971b68177.svg +1 -0
  70. package/dist/a5d32bbfbaaf71a7ecc3.png +0 -0
  71. package/dist/a957669c91ed26779fd9.png +0 -0
  72. package/dist/ab3c84fb519c93c0ad84.png +0 -0
  73. package/dist/ae74776b8fef546e5723.png +0 -0
  74. package/dist/analysis.bundled.js +2 -0
  75. package/dist/analysis.bundled.js.LICENSE.txt +157 -0
  76. package/dist/b242d750b24c13ee4fea.png +0 -0
  77. package/dist/b7327582a95704df7902.png +0 -0
  78. package/dist/ba4f6662a6c78b65053a.png +0 -0
  79. package/dist/base.css +116 -0
  80. package/dist/bb58e57c48a3e911f15f.woff +0 -0
  81. package/dist/bd8529d1e3cf8c91e4e5.png +0 -0
  82. package/dist/be9ee23c0c6390141475.ttf +0 -0
  83. package/dist/c07457739c183c845cac.png +0 -0
  84. package/dist/c17754d370a86615cb76.png +0 -0
  85. package/dist/c230a1a6a7a48e51acd4.png +0 -0
  86. package/dist/cafb1233e2036c6ea6f4.gif +0 -0
  87. package/dist/cead2217a30d76378f64.png +0 -0
  88. package/dist/d6f18fe0676eef581855.png +0 -0
  89. package/dist/d878b0a6a1144760244f.woff2 +0 -0
  90. package/dist/d9c92f3d8392a388dd06.png +0 -0
  91. package/dist/e1b81c1c01254dc1af32.png +0 -0
  92. package/dist/e986e970b493125f349f.svg +1 -0
  93. package/dist/e9cdf785efd3f252cfc4.png +0 -0
  94. package/dist/ed06734fa163bda8bd39.png +0 -0
  95. package/dist/ee9fe4949bdb3e27c99f.png +0 -0
  96. package/dist/eeccf4f66002c6f2ba24.woff +0 -0
  97. package/dist/ef78e677b9e8abbc3412.png +0 -0
  98. package/dist/f49a6a2402ca42baecbb.png +0 -0
  99. package/dist/f80d5ce4e2dd8f120516.png +0 -0
  100. package/dist/fb4b31fb106e65747455.png +0 -0
  101. package/dist/fc8034c66691dfad7ec7.gif +0 -0
  102. package/dist/fd200072a3be000e8fd7.png +0 -0
  103. package/dist/fda9e3846b8dcf579a1d.png +0 -0
  104. package/dist/generic.bundled.js +2 -0
  105. package/dist/generic.bundled.js.LICENSE.txt +103 -0
  106. package/dist/libs.bundled.js +2 -0
  107. package/dist/libs.bundled.js.LICENSE.txt +168 -0
  108. package/dist/toolshed.bundled.js +2 -0
  109. package/dist/toolshed.bundled.js.LICENSE.txt +38 -0
  110. package/dist/workflowLayout.bundled.js +1 -0
  111. package/package.json +199 -0
Binary file
Binary file
Binary file
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_galaxyproject_galaxy_client=self.webpackChunk_galaxyproject_galaxy_client||[]).push([[492],{46492:(e,t,a)=>{a.r(t),a.d(t,{newUserDict:()=>i});const i={topics:[JSON.parse('{"title":"Data in Galaxy","image":"sections/database-solid.svg","alt":"Data","blurb":"How to get datasets into Galaxy, and modify them once they\'re imported.","intro":"Obtaining data in Galaxy is simple. You may upload from your machine, retrieve from a url, via ftp, or from any of several linked databases. Further, you may use shared data by accessing our ‘shared data libraries’ and ‘shared histories’.","topics":[{"title":"Importing via Data Uploader","header":"Galaxy Data Uploader","image":"sections/upload-solid.svg","alt":"Data Uploader","intro":"Loading in data from your machine or via URL.","slides":[{"file":"data/images/data_importer/importer_button.png","size":"small-img","alt":"Import Button Location","text":"The upload button can be found on the top of the toolbar to the left of the screen."},{"file":"data/images/data_importer/importer_icon.png","size":"mini-img","alt":"Import button symbol","text":"Click the upload icon to bring up the data importer."},{"file":"data/images/data_importer/importer_modal.png","size":"large-img","alt":"Import modal","text":"The data importer is made up of a central pane, a set of import methods, mechanisms, and metadata inputs."},{"file":"data/images/data_importer/local_button.png","size":"small-img","alt":"Import data from local machine","text":"Click the \'Choose local files\' button to select files from your machine."},{"file":"data/images/data_importer/ftp_button.png","size":"small-img","alt":"ftp-based upload button","text":"Click the \'Choose FTP files\' button to import files via ftp."},{"file":"data/images/data_importer/url_button.png","size":"small-img","alt":"Url-based upload button","text":"Click the \'Paste/Fetch data\' button to input a url for a dataset or add text to be uploaded as a file by itself."},{"file":"data/images/data_importer/paste_field.png","size":"img-fluid","alt":"Url paste field","text":"After clicking the \'Paste/Fetch data\' button, paste text or a url in the field to specify data."},{"file":"data/images/data_importer/pasted_data.png","size":"img-fluid","alt":"Pasted data in the url input","text":"You may also put multiple URLs at once, one per line."},{"file":"data/images/data_importer/metadata_fields.png","size":"large-img","alt":"Manually set metadata on upload","text":"Set the metadata of file type or genome assembly on upload for each file individually, or for all at once."},{"file":"data/images/data_importer/start_button.png","size":"mini-img","alt":"Start import button","text":"Click \'start\' to begin the data import."},{"file":"data/images/data_importer/rule_based.png","size":"large-img","alt":"Rule-based uploader","text":"Alternatively, the rule-based uploader can be used to upload many files at once, or data from a tabular file."},{"file":"data/images/data_importer/rule_paste_field.png","size":"large-img","alt":"Pasted data in the rule-based uploader","text":"Simply paste your tabular data into the rule-based text input and click \'build\'."},{"file":"data/images/data_importer/rule_column.png","size":"med-img","alt":"Set rules in the left column","text":"Set rules to be applied to the table in the left column."},{"file":"data/images/data_importer/set_rules.png","size":"large-img","alt":"Data appears in the history once imported","text":"Once your data begins importing, it will appear in the history column to the right. It will appar grey while the import is pending, yellow while it is running, red if there is an error, and green when complete and ready to be used in an analysis."}]},{"title":"Retrieving Data from Public Databases","header":"Importing from Public Databases in Galaxy","image":"sections/cloud-download-alt-solid.svg","alt":"Database Data","intro":"Use data from sources such as UCSC, SRA, or EMBL.","slides":[{"file":"data/images/databases/get_data_row.png","size":"med-img","alt":"Get data row","text":"To retrieve data from a linked database, click on the \'Get Data\' row in the toolbar to the left."},{"file":"data/images/databases/expanded_get_data.png","size":"med-img","alt":"Expanded get data section","text":"The expanded get data section shows the full list of integrated databases, accessible by clicking their tool."},{"file":"data/images/databases/data_tool_form.png","size":"large-img","alt":"Data tool form","text":"Many of these tools use a standard Galaxy tool form to access the data. Input the requested data here in a format based on the tool\'s help sections to retrieve files."},{"file":"data/images/databases/UCSC.png","size":"large-img","alt":"Database pages","text":"Other databases, such as the UCSC data browser, are integrated in such a way as to temporarily redirect you directly to their interface."},{"file":"data/images/databases/UCSC_export.png","size":"large-img","alt":"Database export","text":"Once the database\'s forms have been filled out, you will have the option to export data to Galaxy. Click that button to complete the request and return to the Galaxy home page."},{"file":"data/images/databases/imported_data.png","size":"med-img","alt":"Imported data","text":"All data imported in these methods will appear in your history and turn green when fully downloaded and ready to use."}]},{"title":"Obtaining Shared Data","header":"Galaxy Shared Data","image":"sections/slideshare-brands.svg","alt":"Shared data","intro":"Find and retrieve data shared between Galaxy users.","slides":[{"file":"data/images/shared/masthead.png","size":"large-img","alt":"Galaxy masthead","text":"The shared data tab is accessible from the masthead"},{"file":"data/images/shared/shared_tab.png","size":"small-img","alt":"Shared data tab","text":"From the drop down, users have acces to both the data libraries and histories shared across users on the server."},{"file":"data/images/shared/data_library.png","size":"img-fluid","alt":"Data library page","text":"Clicking the data library row will show you a list of all avalilable shared data libraries."},{"file":"data/images/shared/library_directory.png","size":"img-fluid","alt":"Data library subdirectories","text":"Many shared data libraries have sub-directories. You can select entire directories to import."},{"file":"data/images/shared/library_files.png","size":"img-fluid","alt":"Data library files","text":"By clicking on directories, you can choose individual files to import."},{"file":"data/images/shared/select_files.png","size":"large-img","alt":"Select shared files to import","text":"Use the checkboxes on the left to choose which files or directories to import."},{"file":"data/images/shared/export_library.png","size":"small-img","alt":"Export to history button","text":"Click the \'Export to History\' button to select the format in which to retrieve selected data."},{"file":"data/images/shared/choose_history.png","size":"large-img","alt":"Choose existing or new history for files.","text":"Having selected format, either choose a new or existing history into which to import the data, then click \'Import\'."},{"file":"data/images/shared/history_view.png","size":"med-img","alt":"Data appears in the selected history","text":"Imported data will appear in the specified history."},{"file":"data/images/shared/published_history.png","size":"large-img","alt":"Shared history view","text":"Alternatively, you can access the published histories from the same tab on the masthead."},{"file":"data/images/shared/published_view.png","size":"med-img","alt":"Shared history file list","text":"Selecting a history, all availailable files are able to be viewed and searched in the same manner as the normal history bar."},{"file":"data/images/shared/published_import.png","size":"med-img","alt":"About this history. Click plus to import.","text":"Information on the history is available in the column on the right. To import this data, click the plus botton at the top-right of the column."},{"file":"data/images/shared/name_history.png","size":"large-img","alt":"Name history for data import.","text":"Name the history for the imported files, then click import. As before, the data will appear in the specified history."}]},{"title":"Data and Metadata in Galaxy.","header":"Galaxy Data and Metadata","image":"sections/info-circle-solid.svg","alt":"Observing Data and Metadata","intro":"Observing and modifying your data","slides":[{"file":"data/images/observe/history_panel.png","size":"med-img","alt":"Galaxy history panel","text":"The history panel to the right of the screen shows all datasets and files used in the current analysis. You can create a new history or switch to a previous one using the buttons at the top."},{"file":"data/images/observe/expanded_dataset.png","size":"med-img","alt":"Expanded dataset view","text":"Click a dataset in the history to expand it. Expanded items have a quick view panel for the associated dataset, as well as more options on how to interact with the history item."},{"file":"data/images/observe/view_data.png","size":"img-fluid","alt":"View file","text":"Click the eye to open the file as readible in the center panel."},{"file":"data/images/observe/data_info.png","size":"img-fluid","alt":"File info","text":"Click the \'i\' icon to view information about the dataset and the job/tool/command that generated it."},{"file":"data/images/observe/metadata.png","size":"img-fluid","alt":"Metadata page","text":"Clicking the pencil icon will take you to the metadata page."},{"file":"data/images/observe/set_metadata.png","size":"img-fluid","alt":"Edit metadata","text":"From the Attributes tab, you can edit metadata, such as the genome assembly of the data, and add notes/anotations."},{"file":"data/images/observe/convert_dataset.png","size":"img-fluid","alt":"Data format conversion","text":"The Convert tab allows you to run basic tools to convert between similar datatypes (i.e. txt and tsv)."},{"file":"data/images/observe/convert_datatype.png","size":"img-fluid","alt":"Data format reset","text":"On the Datatypes tab, you can manually set the datatype without altering the file, if, for example, the automatic filetype detector failed to set properly (such as a tsv file set as a txt)."}]}]}'),JSON.parse('{"title":"Tools in Galaxy","image":"sections/toolbox-solid.svg","alt":"Tools","blurb":"Analysis in Galaxy using computational tools.","intro":"Tools in Galaxy are the same as those one would run locally for a traditional analysis, save for a couple details. Tools are run in a Galaxy environment, which is identical to other Galaxy environments, making reproducibility simple. They are also run on Galaxy servers with appropriate processing power, so researchers don’t have to worry about their machine’s capabilities.","topics":[{"title":"Standard Tools and the Tool Form","header":"Tool forms in Galaxy","image":"sections/tools-solid.svg","alt":"Tool form","intro":"Understanding the tool form and runing any standard tool","slides":[{"file":"tools/images/tool_form/tool_panel.png","size":"med-img","alt":"Galaxy toolbar","text":"Most galaxy tools are accessible via the toolbar to the left of the center panel."},{"file":"tools/images/tool_form/tool_form.png","size":"large-img","alt":"Galaxy tool form","text":"After clicking to expand tool sections, you can select a tool to display its form in the center panel. Tool forms have several methods of inputs which will be detailed in following slides."},{"file":"tools/images/tool_form/data_input.png","size":"img-fluid","alt":"Data inputs","text":"At the top of most tool forms, there is a data input section. To input a file, you can click the drop down and select an input, or click and drag in input file from the history."},{"file":"tools/images/tool_form/multi_data.png","size":"mini-img","alt":"Multiple data inputs inputs","text":"You can also select multiple datasets or a collections using the three buttons to the left."},{"file":"tools/images/tool_form/string_input.png","size":"img-fluid","alt":"String inputs","text":"Text-based inputs provide text boxes that allow the input of a text string, an integer, or a decimal value, depending on the tool."},{"file":"tools/images/tool_form/select_input.png","size":"img-fluid","alt":"Select inputs","text":"Select inputs allow you to choose from specified options. Sometimes new parameters will appear on the form depending on which option you choose."},{"file":"tools/images/tool_form/select_box_input.png","size":"img-fluid","alt":"Alternative select inputs","text":"Select inputs can also be provided in the form of bubble or checkbox menus."},{"file":"tools/images/tool_form/binary_input.png","size":"small-img","alt":"Binary inputs","text":"Binary inputs are shown as buttons and are usually simply on/off parameters in tools. Like with select inputs, more tool parameters can appear depending on your choice."},{"file":"tools/images/tool_form/email_notify.png","size":"small-img","alt":"Email notifications","text":"For jobs that might take a long time to run, you can always choose to be notified on completion via email by setting the boolean input at the bottom of the tool form."},{"file":"tools/images/tool_form/execute.png","size":"small-img","alt":"Starting a job","text":"When you are ready, click \'Execute\' tp run the tool. Datasets will appear in the history as the job runs, and become green when ready to use in further analysis."}]},{"title":"Data Vizualization Tools","header":"Vizualize Data in Galaxy","image":"sections/chart-bar-solid.svg","alt":"Vizualization Tools","intro":"Easily view your data through graphs and other methods.","slides":[{"file":"tools/images/viz/masthead.png","size":"large-img","alt":"Galaxy masthead","text":"To vizualize you data, first click on the \'Vizualizations\' tab on the masthead."},{"file":"tools/images/viz/viz_dropdown.png","size":"small-img","alt":"Vizualize dropdown menu","text":"Next, select \'Create Vizualization\'."},{"file":"tools/images/viz/viz_menu.png","size":"large-img","alt":"Vizualizations menu","text":"Galaxy has dozens of methods of vizualization, from basic graphs to protein structures."},{"file":"tools/images/viz/viz_search.png","size":"large-img","alt":"Vizualization options search","text":"Use the search bar at the top to find the vizualization method for the data to be observed."},{"file":"tools/images/viz/viz_input.png","size":"large-img","alt":"Vizualizations input data","text":"Click the chosen method, select the dataset in the drop down menu, and click \'Create Vizualization\'."},{"file":"tools/images/viz/setup_1.png","size":"small-img","alt":"Setting parameters for the vizualization","text":"The next page will prompt you to set parameters before showing you the figure. Set these values in the column to the right."},{"file":"tools/images/viz/setup_2.png","size":"small-img","alt":"Setting parameters for the Vizualization cont.","text":"Also specify which parts of the data are to be observed in the second tab in the right column, when applicable."},{"file":"tools/images/viz/options_and_run.png","size":"small-img","alt":"Vizualization actions","text":"You may create the vizualization initially with the check mark. Once done, you can save these values with the save icon, take an immediate screenshot to save the image, or edit the paramters and recreate the figure with the check mark."},{"file":"tools/images/viz/viz_done.png","size":"large-img","alt":"Completed Vizualizations","text":"Once generated, your figure will appear in the center panel. You don\'t have to remain on the page after clicking run to complete the figure"},{"file":"tools/images/viz/user_dropdown.png","size":"small-img","alt":"View old Vizualizations","text":"If you wish to return and view previous vizualizations, simply go the \'User\' tab in the masthead and select \'Vizualizations\'."},{"file":"tools/images/viz/view_old.png","size":"img-fluid","alt":"Vizualizations list","text":"Here, you may click to return to the editor/viewer for any vizualization that had been run previously."}]}]}'),JSON.parse('{"title":"Workflows in Galaxy","image":"sections/project-diagram-solid.svg","alt":"Workflows","blurb":"Running full analyses in Galaxy with workflows.","intro":"Workflows are Galaxy’s chief mechanism for reproducibility. They allow a user to exactly recreate entire analyses they have performed previously, or simply assemble a pipeline from the ground up. Further, these workflows can be edited to tailor individual tool\'s parameters in the workflow to new data.","topics":[{"title":"Extract Workflows from Analyses","header":"Extracting Workflows in Galaxy","image":"sections/angle-double-up-solid.svg","alt":"Workflow Extraction","intro":"Generate Reproducible Workflows from Your Analysis","slides":[{"file":"workflows/images/extract/run_history.png","size":"med-img","alt":"Existing analysis in a history","text":"After perorming an analysis, you can create a Galaxy workflow to recreate it on new data."},{"file":"workflows/images/extract/history_actions.png","size":"med-img","alt":"History actions","text":"Click the gear icon on the top right of the history panel to bring up the history actions menu. Click \'Extract Workflow\'."},{"file":"workflows/images/extract/extract_menu.png","size":"large-img","alt":"Workflow extraction menu","text":"The workflow extraction page will appear, from which you can customize your workflow and select which items are included/excluded."},{"file":"workflows/images/extract/deselect.png","size":"large-img","alt":"Unselect unwanted history items","text":"To prevent tools/datasets in the history from being added in the workflow, simply click their associated checkboxes. You can also select/deselect en masse using the \'check/uncheck all\' buttons at the top of the page."},{"file":"workflows/images/extract/name_workflow.png","size":"med-img","alt":"Name your workflow","text":"Name your workflow in the textbox at the top of the page."},{"file":"workflows/images/extract/name_and_create.png","size":"large-img","alt":"Extract when ready","text":"When ready, click \'Create Workflow\'."},{"file":"workflows/images/extract/extract_complete.png","size":"large-img","alt":"Extraction complete popup","text":"The blue popup will appear to show the workflow has been created."},{"file":"workflows/images/extract/workflow_button.png","size":"small-img","alt":"Workflow tab","text":"To access your workflows, click the \'Workflows\' tab in the masthead."},{"file":"workflows/images/extract/workflow_list.png","size":"img-fluid","alt":"Workflow list","text":"You will find all available workflows, including the newly created one, in the rows on the Workflows page. Click their associated play button to run them."}]},{"title":"Modify Workflows with the Workflow Editor","header":"Galaxy Workflow Editor","image":"sections/edit-solid.svg","alt":"Workflow Editing","intro":"Edit Workflows for New Data or Analyses","slides":[{"file":"workflows/images/editor/masthead.png","size":"large-img","alt":"Workflow tab on masthead","text":"Access the workflows menu from the \'Workflows\' tab in the masthead."},{"file":"workflows/images/editor/workflow_menu.png","size":"img-fluid","alt":"Workflow selector menu","text":"Click the arrow next to the workflow to be run. Alternatively, click the \'Create\' botton on the top right to build a workflow from scratch."},{"file":"workflows/images/editor/dropdown.png","size":"med-img","alt":"Workflow dropdown","text":"On an existing workflow, select \'Edit\' from the drop down menu to open the workflow editor."},{"file":"workflows/images/editor/editor_base.png","size":"large-img","alt":"Workflow editor","text":"This is the workflow editor. Here you can see the entirety of your workflow, or zoom in on a specific part using the zoom buttons on the bottom left, and click-and-drag movement controls."},{"file":"workflows/images/editor/tool_appears.png","size":"med-img","alt":"Add tool to the workflow","text":"To add a tool, find it in the toolbar to the left, as you would to run it normally. The tool will appear as a bubble to the right."},{"file":"workflows/images/editor/move_tool.png","size":"large-img","alt":"Moving items in the editor","text":"To move items in the editor, click and drag them to the desired location."},{"file":"workflows/images/editor/click-and-drag.png","size":"large-img","alt":"Click and drag connections","text":"The bubbles next to parameters in steps denote inputs and outputs. To start a connection, click on the output bubble of a step and drag it so the connection line is visible."},{"file":"workflows/images/editor/attach.png","size":"large-img","alt":"Attaching tools to workflow","text":"Attatch the connection to the input bubble of the following step. The output file must be the proper format for the input of the following tool to be connected."},{"file":"workflows/images/editor/detatch.png","size":"med-img","alt":"Detatch items in the editor","text":"To disconnect items in the editor, simply click the input bubble on the step."},{"file":"workflows/images/editor/delete.png","size":"med-img","alt":"Delete or duplicate items in the editor","text":"To delete a step, click the \'X\' at the top left. The icon next to that will duplicate the steps\'s tool in the editor."},{"file":"workflows/images/editor/params.png","size":"large-img","alt":"Edit tool parameters in the workflow editor","text":"To change the parameters of a tool here, click the tool\'s bubble and edit in the menu that appears to the right in the same way as with a normal tool form."},{"file":"workflows/images/editor/editor_menu.png","size":"med-img","alt":"Editor menu options","text":"When ready, you may save the workflow as-is with the save button on the top right. The other buttons here allow you to edit the workflow metadata (i.e. rename it, annotate, etc.), download the workflow file, or run the workflow immediately."}]},{"title":"Importing and Running Workflows","header":"Importing and Running Workflows","image":"sections/file-import-solid.svg","alt":"Importing Workflows","intro":"Obtaining previously-run analyses from yourself or others, and recreating existing analyses.","slides":[{"file":"workflows/images/run/masthead.png","size":"large-img","alt":"Workflow tab on masthead","text":"Go to the \'Workflow\' tab on the masthead to begin."},{"file":"workflows/images/run/workflow_main.png","size":"img-fluid","alt":"Workflow list page","text":"On this page you can view all available workflows. Click the \'Import\' button to add a new workflow from a file or a url."},{"file":"workflows/images/run/add_main.png","size":"img-fluid","alt":"Workflow import page","text":"The import page gives you multiple methods of adding workflows from outside of the instance. This will focus on the URL-based import and the local file import."},{"file":"workflows/images/run/file_up.png","size":"img-fluid","alt":"Upload workflow from local machine","text":"Clicking the \'Archived Workflow File\' selector allows a .ga file into your instance to run the associated workflow using your local file browser."},{"file":"workflows/images/run/url_paste.png","size":"img-fluid","alt":"Pasted Url","text":"The \'Archived Workflow URL\' textbox allows a remote file to be requested from an outside site such as Github or Zenodo."},{"file":"workflows/images/run/import_button.png","size":"small-img","alt":"Upload button","text":"When ready, click \'Import Workflow\' to make the file available to run."},{"file":"workflows/images/run/uploaded_file.png","size":"img-fluid","alt":"Uploaded workflow","text":"Imported workflows will become available immediately on the main workflow page. To run a workflow, click the play button at the right side of its row."},{"file":"workflows/images/run/not_expanded.png","size":"img-fluid","alt":"Workflow run page","text":"The initial screen will show all inputs for the workflow. You can run with standard parameters here by inputting files and clicking \'Run Workflow\'. Alternatively, you can click below to expand and view all tools used in the workflow."},{"file":"workflows/images/run/expanded.png","size":"img-fluid","alt":"Expanded workflow run page","text":"From the expanded workflow view, you can click on any tool\'s row to expand it and view the parameters."},{"file":"workflows/images/run/edits.png","size":"img-fluid","alt":"Alter parameters in the run page","text":"Clicking the pencil icon next to parameters of expanded tools will allow you to change them for this run specifically."},{"file":"workflows/images/run/run_workflow.png","size":"small-img","alt":"Run the workflow","text":"When ready, click \'Run Workflow\' to start."},{"file":"workflows/images/run/invocation.png","size":"img-fluid","alt":"Workflow invocation","text":"The workflow invocation page will appear, showing how far the workflow run has progressed."},{"file":"workflows/images/run/history.png","size":"med-img","alt":"Workflow data in histories","text":"Files will populate the history as they become available. The page may now be exited, and the workflow will continue to run."}]}]}')]}}}]);
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_galaxyproject_galaxy_client=self.webpackChunk_galaxyproject_galaxy_client||[]).push([[668],{80237:(t,e,i)=>{i.r(e),i.d(e,{AElement:()=>Ft,AnimateColorElement:()=>Dt,AnimateElement:()=>Nt,AnimateTransformElement:()=>zt,BoundingBox:()=>lt,CB1:()=>N,CB2:()=>D,CB3:()=>z,CB4:()=>B,Canvg:()=>fe,CircleElement:()=>xt,ClipPathElement:()=>ie,DefsElement:()=>Tt,DescElement:()=>le,Document:()=>de,Element:()=>rt,EllipseElement:()=>bt,FeColorMatrixElement:()=>Kt,FeCompositeElement:()=>ae,FeDropShadowElement:()=>se,FeGaussianBlurElement:()=>he,FeMorphologyElement:()=>ne,FilterElement:()=>re,Font:()=>ot,FontElement:()=>Bt,FontFaceElement:()=>Lt,GElement:()=>Vt,GlyphElement:()=>dt,GradientElement:()=>Et,ImageElement:()=>Yt,LineElement:()=>St,LinearGradientElement:()=>Mt,MarkerElement:()=>Ct,MaskElement:()=>te,Matrix:()=>J,MissingGlyphElement:()=>It,Mouse:()=>j,PSEUDO_ZERO:()=>E,Parser:()=>G,PathElement:()=>ct,PathParser:()=>ut,PatternElement:()=>At,Point:()=>X,PolygonElement:()=>wt,PolylineElement:()=>Pt,Property:()=>F,QB1:()=>L,QB2:()=>I,QB3:()=>R,RadialGradientElement:()=>kt,RectElement:()=>vt,RenderedElement:()=>gt,Rotate:()=>Q,SVGElement:()=>mt,SVGFontLoader:()=>Wt,Scale:()=>Z,Screen:()=>H,Skew:()=>K,SkewX:()=>tt,SkewY:()=>et,StopElement:()=>Ot,StyleElement:()=>qt,SymbolElement:()=>Ht,TRefElement:()=>Rt,TSpanElement:()=>yt,TextElement:()=>pt,TextPathElement:()=>jt,TitleElement:()=>oe,Transform:()=>it,Translate:()=>$,UnknownElement:()=>st,UseElement:()=>Gt,ViewPort:()=>_,compressSpaces:()=>g,default:()=>fe,getSelectorSpecificity:()=>V,normalizeAttributeName:()=>f,normalizeColor:()=>v,parseExternalUrl:()=>m,presets:()=>u,toNumbers:()=>p,trimLeft:()=>c,trimRight:()=>d,vectorMagnitude:()=>M,vectorsAngle:()=>O,vectorsRatio:()=>k}),i(88674);var r=i(15861),s=(i(4723),i(15306),i(23157),i(66992),i(33948),i(4942)),n=(i(85827),i(27852),i(23123),i(54087)),a=(i(73210),i(26131)),h=(i(82772),i(32023),i(65069),i(35851)),o=(i(39714),i(62449)),l=i(34155),u=Object.freeze({__proto__:null,offscreen:function(){var{DOMParser:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:t,createCanvas:(t,e)=>new OffscreenCanvas(t,e),createImage:t=>(0,r.Z)((function*(){var e=yield fetch(t),i=yield e.blob();return yield createImageBitmap(i)}))()};return"undefined"==typeof DOMParser&&void 0!==t||Reflect.deleteProperty(e,"DOMParser"),e},node:function(t){var{DOMParser:e,canvas:i,fetch:r}=t;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,fetch:r,createCanvas:i.createCanvas,createImage:i.loadImage}}});function g(t){return t.replace(/(?!\u3000)\s+/gm," ")}function c(t){return t.replace(/^[\n \t]+/,"")}function d(t){return t.replace(/[\n \t]+$/,"")}function p(t){return((t||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[]).map(parseFloat)}var y=/^[A-Z-]+$/;function f(t){return y.test(t)?t.toLowerCase():t}function m(t){var e=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(t)||[];return e[2]||e[3]||e[4]}function v(t){if(!t.startsWith("rgb"))return t;var e=3;return t.replace(/\d+(\.\d+)?/g,((t,i)=>e--&&i?String(Math.round(parseFloat(t))):t))}var x=/(\[[^\]]+\])/g,b=/(#[^\s+>~.[:]+)/g,S=/(\.[^\s+>~.[:]+)/g,P=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,w=/(:[\w-]+\([^)]*\))/gi,A=/(:[^\s+>~.[:]+)/g,C=/([^\s+>~.[:]+)/g;function T(t,e){var i=e.exec(t);return i?[t.replace(e," "),i.length]:[t,0]}function V(t){var e=[0,0,0],i=t.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),r=0;return[i,r]=T(i,x),e[1]+=r,[i,r]=T(i,b),e[0]+=r,[i,r]=T(i,S),e[1]+=r,[i,r]=T(i,P),e[2]+=r,[i,r]=T(i,w),e[1]+=r,[i,r]=T(i,A),e[1]+=r,i=i.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[i,r]=T(i,C),e[2]+=r,e.join("")}var E=1e-8;function M(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))}function k(t,e){return(t[0]*e[0]+t[1]*e[1])/(M(t)*M(e))}function O(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(k(t,e))}function N(t){return t*t*t}function D(t){return 3*t*t*(1-t)}function z(t){return 3*t*(1-t)*(1-t)}function B(t){return(1-t)*(1-t)*(1-t)}function L(t){return t*t}function I(t){return 2*t*(1-t)}function R(t){return(1-t)*(1-t)}class F{constructor(t,e,i){this.document=t,this.name=e,this.value=i,this.isNormalizedColor=!1}static empty(t){return new F(t,"EMPTY","")}split(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:" ",{document:e,name:i}=this;return g(this.getString()).trim().split(t).map((t=>new F(e,i,t)))}hasValue(t){var{value:e}=this;return null!==e&&""!==e&&(t||0!==e)&&void 0!==e}isString(t){var{value:e}=this,i="string"==typeof e;return i&&t?t.test(e):i}isUrlDefinition(){return this.isString(/^url\(/)}isPixels(){if(!this.hasValue())return!1;var t=this.getString();switch(!0){case t.endsWith("px"):case/^[0-9]+$/.test(t):return!0;default:return!1}}setValue(t){return this.value=t,this}getValue(t){return void 0===t||this.hasValue()?this.value:t}getNumber(t){if(!this.hasValue())return void 0===t?0:parseFloat(t);var{value:e}=this,i=parseFloat(e);return this.isString(/%$/)&&(i/=100),i}getString(t){return void 0===t||this.hasValue()?void 0===this.value?"":String(this.value):String(t)}getColor(t){var e=this.getString(t);return this.isNormalizedColor||(this.isNormalizedColor=!0,e=v(e),this.value=e),e}getDpi(){return 96}getRem(){return this.document.rootEmSize}getEm(){return this.document.emSize}getUnits(){return this.getString().replace(/[0-9.-]/g,"")}getPixels(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.hasValue())return 0;var[i,r]="boolean"==typeof t?[void 0,t]:[t],{viewPort:s}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(s.computeSize("x"),s.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(s.computeSize("x"),s.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*s.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*s.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return 15*this.getNumber();case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case this.isString(/%$/)&&r:return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*s.computeSize(i);default:var n=this.getNumber();return e&&n<1?n*s.computeSize(i):n}}getMilliseconds(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():1e3*this.getNumber():0}getRadians(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}getDefinition(){var t=this.getString(),e=/#([^)'"]+)/.exec(t);return e&&(e=e[1]),e||(e=t),this.document.definitions[e]}getFillStyleDefinition(t,e){var i=this.getDefinition();if(!i)return null;if("function"==typeof i.createGradient)return i.createGradient(this.document.ctx,t,e);if("function"==typeof i.createPattern){if(i.getHrefAttribute().hasValue()){var r=i.getAttribute("patternTransform");i=i.getHrefAttribute().getDefinition(),r.hasValue()&&i.getAttribute("patternTransform",!0).setValue(r.value)}return i.createPattern(this.document.ctx,t,e)}return null}getTextBaseline(){return this.hasValue()?F.textBaselineMapping[this.getString()]:null}addOpacity(t){for(var e=this.getColor(),i=e.length,r=0,s=0;s<i&&(","===e[s]&&r++,3!==r);s++);if(t.hasValue()&&this.isString()&&3!==r){var n=new a(e);n.ok&&(n.alpha=t.getNumber(),e=n.toRGBA())}return new F(this.document,this.name,e)}}F.textBaselineMapping={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};class _{constructor(){this.viewPorts=[]}clear(){this.viewPorts=[]}setCurrent(t,e){this.viewPorts.push({width:t,height:e})}removeCurrent(){this.viewPorts.pop()}getCurrent(){var{viewPorts:t}=this;return t[t.length-1]}get width(){return this.getCurrent().width}get height(){return this.getCurrent().height}computeSize(t){return"number"==typeof t?t:"x"===t?this.width:"y"===t?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}}class X{constructor(t,e){this.x=t,this.y=e}static parse(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,[i=e,r=e]=p(t);return new X(i,r)}static parseScale(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,[i=e,r=i]=p(t);return new X(i,r)}static parsePath(t){for(var e=p(t),i=e.length,r=[],s=0;s<i;s+=2)r.push(new X(e[s],e[s+1]));return r}angleTo(t){return Math.atan2(t.y-this.y,t.x-this.x)}applyTransform(t){var{x:e,y:i}=this,r=e*t[0]+i*t[2]+t[4],s=e*t[1]+i*t[3]+t[5];this.x=r,this.y=s}}class j{constructor(t){this.screen=t,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}isWorking(){return this.working}start(){if(!this.working){var{screen:t,onClick:e,onMouseMove:i}=this,r=t.ctx.canvas;r.onclick=e,r.onmousemove=i,this.working=!0}}stop(){if(this.working){var t=this.screen.ctx.canvas;this.working=!1,t.onclick=null,t.onmousemove=null}}hasEvents(){return this.working&&this.events.length>0}runEvents(){if(this.working){var{screen:t,events:e,eventElements:i}=this,{style:r}=t.ctx.canvas;r&&(r.cursor=""),e.forEach(((t,e)=>{for(var{run:r}=t,s=i[e];s;)r(s),s=s.parent})),this.events=[],this.eventElements=[]}}checkPath(t,e){if(this.working&&e){var{events:i,eventElements:r}=this;i.forEach(((i,s)=>{var{x:n,y:a}=i;!r[s]&&e.isPointInPath&&e.isPointInPath(n,a)&&(r[s]=t)}))}}checkBoundingBox(t,e){if(this.working&&e){var{events:i,eventElements:r}=this;i.forEach(((i,s)=>{var{x:n,y:a}=i;!r[s]&&e.isPointInBox(n,a)&&(r[s]=t)}))}}mapXY(t,e){for(var{window:i,ctx:r}=this.screen,s=new X(t,e),n=r.canvas;n;)s.x-=n.offsetLeft,s.y-=n.offsetTop,n=n.offsetParent;return i.scrollX&&(s.x+=i.scrollX),i.scrollY&&(s.y+=i.scrollY),s}onClick(t){var{x:e,y:i}=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onclick",x:e,y:i,run(t){t.onClick&&t.onClick()}})}onMouseMove(t){var{x:e,y:i}=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onmousemove",x:e,y:i,run(t){t.onMouseMove&&t.onMouseMove()}})}}var U="undefined"!=typeof window?window:null,Y="undefined"!=typeof fetch?fetch.bind(void 0):null;class H{constructor(t){var{fetch:e=Y,window:i=U}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.ctx=t,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new _,this.mouse=new j(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=i,this.fetch=e}wait(t){this.waits.push(t)}ready(){return this.readyPromise?this.readyPromise:Promise.resolve()}isReady(){if(this.isReadyLock)return!0;var t=this.waits.every((t=>t()));return t&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=t,t}setDefaults(t){t.strokeStyle="rgba(0,0,0,0)",t.lineCap="butt",t.lineJoin="miter",t.miterLimit=4}setViewBox(t){var{document:e,ctx:i,aspectRatio:r,width:s,desiredWidth:n,height:a,desiredHeight:h,minX:o=0,minY:l=0,refX:u,refY:c,clip:d=!1,clipX:p=0,clipY:y=0}=t,f=g(r).replace(/^defer\s/,""),[m,v]=f.split(" "),x=m||"xMidYMid",b=v||"meet",S=s/n,P=a/h,w=Math.min(S,P),A=Math.max(S,P),C=n,T=h;"meet"===b&&(C*=w,T*=w),"slice"===b&&(C*=A,T*=A);var V=new F(e,"refX",u),E=new F(e,"refY",c),M=V.hasValue()&&E.hasValue();if(M&&i.translate(-w*V.getPixels("x"),-w*E.getPixels("y")),d){var k=w*p,O=w*y;i.beginPath(),i.moveTo(k,O),i.lineTo(s,O),i.lineTo(s,a),i.lineTo(k,a),i.closePath(),i.clip()}if(!M){var N="meet"===b&&w===P,D="slice"===b&&A===P,z="meet"===b&&w===S,B="slice"===b&&A===S;x.startsWith("xMid")&&(N||D)&&i.translate(s/2-C/2,0),x.endsWith("YMid")&&(z||B)&&i.translate(0,a/2-T/2),x.startsWith("xMax")&&(N||D)&&i.translate(s-C,0),x.endsWith("YMax")&&(z||B)&&i.translate(0,a-T)}switch(!0){case"none"===x:i.scale(S,P);break;case"meet"===b:i.scale(w,w);break;case"slice"===b:i.scale(A,A)}i.translate(-o,-l)}start(t){var{enableRedraw:e=!1,ignoreMouse:i=!1,ignoreAnimation:r=!1,ignoreDimensions:s=!1,ignoreClear:a=!1,forceRedraw:h,scaleWidth:o,scaleHeight:l,offsetX:u,offsetY:g}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{FRAMERATE:c,mouse:d}=this,p=1e3/c;if(this.frameDuration=p,this.readyPromise=new Promise((t=>{this.resolveReady=t})),this.isReady()&&this.render(t,s,a,o,l,u,g),e){var y=Date.now(),f=y,m=0,v=()=>{y=Date.now(),(m=y-f)>=p&&(f=y-m%p,this.shouldUpdate(r,h)&&(this.render(t,s,a,o,l,u,g),d.runEvents())),this.intervalId=n(v)};i||d.start(),this.intervalId=n(v)}}stop(){this.intervalId&&(n.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(t,e){if(!t){var{frameDuration:i}=this;if(this.animations.reduce(((t,e)=>e.update(i)||t),!1))return!0}return!("function"!=typeof e||!e())||!(this.isReadyLock||!this.isReady())||!!this.mouse.hasEvents()}render(t,e,i,r,s,n,a){var{CLIENT_WIDTH:h,CLIENT_HEIGHT:o,viewPort:l,ctx:u,isFirstRender:g}=this,c=u.canvas;l.clear(),c.width&&c.height?l.setCurrent(c.width,c.height):l.setCurrent(h,o);var d=t.getStyle("width"),y=t.getStyle("height");!e&&(g||"number"!=typeof r&&"number"!=typeof s)&&(d.hasValue()&&(c.width=d.getPixels("x"),c.style&&(c.style.width="".concat(c.width,"px"))),y.hasValue()&&(c.height=y.getPixels("y"),c.style&&(c.style.height="".concat(c.height,"px"))));var f=c.clientWidth||c.width,m=c.clientHeight||c.height;if(e&&d.hasValue()&&y.hasValue()&&(f=d.getPixels("x"),m=y.getPixels("y")),l.setCurrent(f,m),"number"==typeof n&&t.getAttribute("x",!0).setValue(n),"number"==typeof a&&t.getAttribute("y",!0).setValue(a),"number"==typeof r||"number"==typeof s){var v=p(t.getAttribute("viewBox").getString()),x=0,b=0;if("number"==typeof r){var S=t.getStyle("width");S.hasValue()?x=S.getPixels("x")/r:isNaN(v[2])||(x=v[2]/r)}if("number"==typeof s){var P=t.getStyle("height");P.hasValue()?b=P.getPixels("y")/s:isNaN(v[3])||(b=v[3]/s)}x||(x=b),b||(b=x),t.getAttribute("width",!0).setValue(r),t.getAttribute("height",!0).setValue(s);var w=t.getStyle("transform",!0,!0);w.setValue("".concat(w.getString()," scale(").concat(1/x,", ").concat(1/b,")"))}i||u.clearRect(0,0,f,m),t.render(u),g&&(this.isFirstRender=!1)}}H.defaultWindow=U,H.defaultFetch=Y;var{defaultFetch:W}=H,q="undefined"!=typeof DOMParser?DOMParser:null;class G{constructor(){var{fetch:t=W,DOMParser:e=q}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.fetch=t,this.DOMParser=e}parse(t){var e=this;return(0,r.Z)((function*(){return t.startsWith("<")?e.parseFromString(t):e.load(t)}))()}parseFromString(t){var e=new this.DOMParser;try{return this.checkDocument(e.parseFromString(t,"image/svg+xml"))}catch(i){return this.checkDocument(e.parseFromString(t,"text/xml"))}}checkDocument(t){var e=t.getElementsByTagName("parsererror")[0];if(e)throw new Error(e.textContent);return t}load(t){var e=this;return(0,r.Z)((function*(){var i=yield e.fetch(t),r=yield i.text();return e.parseFromString(r)}))()}}class ${constructor(t,e){this.type="translate",this.point=null,this.point=X.parse(e)}apply(t){var{x:e,y:i}=this.point;t.translate(e||0,i||0)}unapply(t){var{x:e,y:i}=this.point;t.translate(-1*e||0,-1*i||0)}applyToPoint(t){var{x:e,y:i}=this.point;t.applyTransform([1,0,0,1,e||0,i||0])}}class Q{constructor(t,e,i){this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var r=p(e);this.angle=new F(t,"angle",r[0]),this.originX=i[0],this.originY=i[1],this.cx=r[1]||0,this.cy=r[2]||0}apply(t){var{cx:e,cy:i,originX:r,originY:s,angle:n}=this,a=e+r.getPixels("x"),h=i+s.getPixels("y");t.translate(a,h),t.rotate(n.getRadians()),t.translate(-a,-h)}unapply(t){var{cx:e,cy:i,originX:r,originY:s,angle:n}=this,a=e+r.getPixels("x"),h=i+s.getPixels("y");t.translate(a,h),t.rotate(-1*n.getRadians()),t.translate(-a,-h)}applyToPoint(t){var{cx:e,cy:i,angle:r}=this,s=r.getRadians();t.applyTransform([1,0,0,1,e||0,i||0]),t.applyTransform([Math.cos(s),Math.sin(s),-Math.sin(s),Math.cos(s),0,0]),t.applyTransform([1,0,0,1,-e||0,-i||0])}}class Z{constructor(t,e,i){this.type="scale",this.scale=null,this.originX=null,this.originY=null;var r=X.parseScale(e);0!==r.x&&0!==r.y||(r.x=E,r.y=E),this.scale=r,this.originX=i[0],this.originY=i[1]}apply(t){var{scale:{x:e,y:i},originX:r,originY:s}=this,n=r.getPixels("x"),a=s.getPixels("y");t.translate(n,a),t.scale(e,i||e),t.translate(-n,-a)}unapply(t){var{scale:{x:e,y:i},originX:r,originY:s}=this,n=r.getPixels("x"),a=s.getPixels("y");t.translate(n,a),t.scale(1/e,1/i||e),t.translate(-n,-a)}applyToPoint(t){var{x:e,y:i}=this.scale;t.applyTransform([e||0,0,0,i||0,0,0])}}class J{constructor(t,e,i){this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=p(e),this.originX=i[0],this.originY=i[1]}apply(t){var{originX:e,originY:i,matrix:r}=this,s=e.getPixels("x"),n=i.getPixels("y");t.translate(s,n),t.transform(r[0],r[1],r[2],r[3],r[4],r[5]),t.translate(-s,-n)}unapply(t){var{originX:e,originY:i,matrix:r}=this,s=r[0],n=r[2],a=r[4],h=r[1],o=r[3],l=r[5],u=1/(s*(1*o-0*l)-n*(1*h-0*l)+a*(0*h-0*o)),g=e.getPixels("x"),c=i.getPixels("y");t.translate(g,c),t.transform(u*(1*o-0*l),u*(0*l-1*h),u*(0*a-1*n),u*(1*s-0*a),u*(n*l-a*o),u*(a*h-s*l)),t.translate(-g,-c)}applyToPoint(t){t.applyTransform(this.matrix)}}class K extends J{constructor(t,e,i){super(t,e,i),this.type="skew",this.angle=null,this.angle=new F(t,"angle",e)}}class tt extends K{constructor(t,e,i){super(t,e,i),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class et extends K{constructor(t,e,i){super(t,e,i),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}class it{constructor(t,e,i){this.document=t,this.transforms=[];var r=function(t){return g(t).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}(e);r.forEach((t=>{if("none"!==t){var[e,r]=function(t){var[e,i]=t.split("(");return[e.trim(),i.trim().replace(")","")]}(t),s=it.transformTypes[e];void 0!==s&&this.transforms.push(new s(this.document,r,i))}}))}static fromElement(t,e){var i=e.getStyle("transform",!1,!0),[r,s=r]=e.getStyle("transform-origin",!1,!0).split(),n=[r,s];return i.hasValue()?new it(t,i.getString(),n):null}apply(t){for(var{transforms:e}=this,i=e.length,r=0;r<i;r++)e[r].apply(t)}unapply(t){for(var{transforms:e}=this,i=e.length-1;i>=0;i--)e[i].unapply(t)}applyToPoint(t){for(var{transforms:e}=this,i=e.length,r=0;r<i;r++)e[r].applyToPoint(t)}}it.transformTypes={translate:$,rotate:Q,scale:Z,matrix:J,skewX:tt,skewY:et};class rt{constructor(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.document=t,this.node=e,this.captureTextNodes=i,this.attributes={},this.styles={},this.stylesSpecificity={},this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],e&&1===e.nodeType){Array.from(e.attributes).forEach((e=>{var i=f(e.nodeName);this.attributes[i]=new F(t,i,e.value)})),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()&&this.getAttribute("style").getString().split(";").map((t=>t.trim())).forEach((e=>{if(e){var[i,r]=e.split(":").map((t=>t.trim()));this.styles[i]=new F(t,i,r)}}));var{definitions:r}=t,s=this.getAttribute("id");s.hasValue()&&(r[s.getString()]||(r[s.getString()]=this)),Array.from(e.childNodes).forEach((e=>{if(1===e.nodeType)this.addChild(e);else if(i&&(3===e.nodeType||4===e.nodeType)){var r=t.createTextNode(e);r.getText().length>0&&this.addChild(r)}}))}}getAttribute(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.attributes[t];if(!i&&e){var r=new F(this.document,t,"");return this.attributes[t]=r,r}return i||F.empty(this.document)}getHrefAttribute(){for(var t in this.attributes)if("href"===t||t.endsWith(":href"))return this.attributes[t];return F.empty(this.document)}getStyle(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.styles[t];if(r)return r;var s=this.getAttribute(t);if(null!=s&&s.hasValue())return this.styles[t]=s,s;if(!i){var{parent:n}=this;if(n){var a=n.getStyle(t);if(null!=a&&a.hasValue())return a}}if(e){var h=new F(this.document,t,"");return this.styles[t]=h,h}return r||F.empty(this.document)}render(t){if("none"!==this.getStyle("display").getString()&&"hidden"!==this.getStyle("visibility").getString()){if(t.save(),this.getStyle("mask").hasValue()){var e=this.getStyle("mask").getDefinition();e&&(this.applyEffects(t),e.apply(t,this))}else if("none"!==this.getStyle("filter").getValue("none")){var i=this.getStyle("filter").getDefinition();i&&(this.applyEffects(t),i.apply(t,this))}else this.setContext(t),this.renderChildren(t),this.clearContext(t);t.restore()}}setContext(t){}applyEffects(t){var e=it.fromElement(this.document,this);e&&e.apply(t);var i=this.getStyle("clip-path",!1,!0);if(i.hasValue()){var r=i.getDefinition();r&&r.apply(t)}}clearContext(t){}renderChildren(t){this.children.forEach((e=>{e.render(t)}))}addChild(t){var e=t instanceof rt?t:this.document.createElement(t);e.parent=this,rt.ignoreChildTypes.includes(e.type)||this.children.push(e)}matchesSelector(t){var e,{node:i}=this;if("function"==typeof i.matches)return i.matches(t);var r=null===(e=i.getAttribute)||void 0===e?void 0:e.call(i,"class");return!(!r||""===r)&&r.split(" ").some((e=>".".concat(e)===t))}addStylesFromStyleDefinition(){var{styles:t,stylesSpecificity:e}=this.document;for(var i in t)if(!i.startsWith("@")&&this.matchesSelector(i)){var r=t[i],s=e[i];if(r)for(var n in r){var a=this.stylesSpecificity[n];void 0===a&&(a="000"),s>=a&&(this.styles[n]=r[n],this.stylesSpecificity[n]=s)}}}removeStyles(t,e){return e.reduce(((e,i)=>{var r=t.getStyle(i);if(!r.hasValue())return e;var s=r.getString();return r.setValue(""),[...e,[i,s]]}),[])}restoreStyles(t,e){e.forEach((e=>{var[i,r]=e;t.getStyle(i,!0).setValue(r)}))}isFirstChild(){var t;return 0===(null===(t=this.parent)||void 0===t?void 0:t.children.indexOf(this))}}rt.ignoreChildTypes=["title"];class st extends rt{constructor(t,e,i){super(t,e,i)}}function nt(t){var e=t.trim();return/^('|")/.test(e)?e:'"'.concat(e,'"')}function at(t){if(!t)return"";var e=t.trim().toLowerCase();switch(e){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return e;default:return/^oblique\s+(-|)\d+deg$/.test(e)?e:""}}function ht(t){if(!t)return"";var e=t.trim().toLowerCase();switch(e){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return e;default:return/^[\d.]+$/.test(e)?e:""}}class ot{constructor(t,e,i,r,s,n){var a=n?"string"==typeof n?ot.parse(n):n:{};this.fontFamily=s||a.fontFamily,this.fontSize=r||a.fontSize,this.fontStyle=t||a.fontStyle,this.fontWeight=i||a.fontWeight,this.fontVariant=e||a.fontVariant}static parse(){var t=arguments.length>1?arguments[1]:void 0,e="",i="",r="",s="",n="",a=g(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").trim().split(" "),h={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return a.forEach((t=>{switch(!0){case!h.fontStyle&&ot.styles.includes(t):"inherit"!==t&&(e=t),h.fontStyle=!0;break;case!h.fontVariant&&ot.variants.includes(t):"inherit"!==t&&(i=t),h.fontStyle=!0,h.fontVariant=!0;break;case!h.fontWeight&&ot.weights.includes(t):"inherit"!==t&&(r=t),h.fontStyle=!0,h.fontVariant=!0,h.fontWeight=!0;break;case!h.fontSize:"inherit"!==t&&([s]=t.split("/")),h.fontStyle=!0,h.fontVariant=!0,h.fontWeight=!0,h.fontSize=!0;break;default:"inherit"!==t&&(n+=t)}})),new ot(e,i,r,s,n,t)}toString(){return[at(this.fontStyle),this.fontVariant,ht(this.fontWeight),this.fontSize,(t=this.fontFamily,void 0===l?t:t.trim().split(",").map(nt).join(","))].join(" ").trim();var t}}ot.styles="normal|italic|oblique|inherit",ot.variants="normal|small-caps|inherit",ot.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class lt{constructor(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.NaN,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.NaN,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.NaN,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Number.NaN;this.x1=t,this.y1=e,this.x2=i,this.y2=r,this.addPoint(t,e),this.addPoint(i,r)}get x(){return this.x1}get y(){return this.y1}get width(){return this.x2-this.x1}get height(){return this.y2-this.y1}addPoint(t,e){void 0!==t&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),t<this.x1&&(this.x1=t),t>this.x2&&(this.x2=t)),void 0!==e&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),e<this.y1&&(this.y1=e),e>this.y2&&(this.y2=e))}addX(t){this.addPoint(t,null)}addY(t){this.addPoint(null,t)}addBoundingBox(t){if(t){var{x1:e,y1:i,x2:r,y2:s}=t;this.addPoint(e,i),this.addPoint(r,s)}}sumCubic(t,e,i,r,s){return Math.pow(1-t,3)*e+3*Math.pow(1-t,2)*t*i+3*(1-t)*Math.pow(t,2)*r+Math.pow(t,3)*s}bezierCurveAdd(t,e,i,r,s){var n=6*e-12*i+6*r,a=-3*e+9*i-9*r+3*s,h=3*i-3*e;if(0!==a){var o=Math.pow(n,2)-4*h*a;if(!(o<0)){var l=(-n+Math.sqrt(o))/(2*a);0<l&&l<1&&(t?this.addX(this.sumCubic(l,e,i,r,s)):this.addY(this.sumCubic(l,e,i,r,s)));var u=(-n-Math.sqrt(o))/(2*a);0<u&&u<1&&(t?this.addX(this.sumCubic(u,e,i,r,s)):this.addY(this.sumCubic(u,e,i,r,s)))}}else{if(0===n)return;var g=-h/n;0<g&&g<1&&(t?this.addX(this.sumCubic(g,e,i,r,s)):this.addY(this.sumCubic(g,e,i,r,s)))}}addBezierCurve(t,e,i,r,s,n,a,h){this.addPoint(t,e),this.addPoint(a,h),this.bezierCurveAdd(!0,t,i,s,a),this.bezierCurveAdd(!1,e,r,n,h)}addQuadraticCurve(t,e,i,r,s,n){var a=t+2/3*(i-t),h=e+2/3*(r-e),o=a+1/3*(s-t),l=h+1/3*(n-e);this.addBezierCurve(t,e,a,o,h,l,s,n)}isPointInBox(t,e){var{x1:i,y1:r,x2:s,y2:n}=this;return i<=t&&t<=s&&r<=e&&e<=n}}class ut extends h.OU{constructor(t){super(t.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"")),this.control=null,this.start=null,this.current=null,this.command=null,this.commands=this.commands,this.i=-1,this.previousCommand=null,this.points=[],this.angles=[]}reset(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new X(0,0),this.control=new X(0,0),this.current=new X(0,0),this.points=[],this.angles=[]}isEnd(){var{i:t,commands:e}=this;return t>=e.length-1}next(){var t=this.commands[++this.i];return this.previousCommand=this.command,this.command=t,t}getPoint(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"x",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"y",i=new X(this.command[t],this.command[e]);return this.makeAbsolute(i)}getAsControlPoint(t,e){var i=this.getPoint(t,e);return this.control=i,i}getAsCurrentPoint(t,e){var i=this.getPoint(t,e);return this.current=i,i}getReflectedControlPoint(){var t=this.previousCommand.type;if(t!==h.OU.CURVE_TO&&t!==h.OU.SMOOTH_CURVE_TO&&t!==h.OU.QUAD_TO&&t!==h.OU.SMOOTH_QUAD_TO)return this.current;var{current:{x:e,y:i},control:{x:r,y:s}}=this;return new X(2*e-r,2*i-s)}makeAbsolute(t){if(this.command.relative){var{x:e,y:i}=this.current;t.x+=e,t.y+=i}return t}addMarker(t,e,i){var{points:r,angles:s}=this;i&&s.length>0&&!s[s.length-1]&&(s[s.length-1]=r[r.length-1].angleTo(i)),this.addMarkerAngle(t,e?e.angleTo(t):null)}addMarkerAngle(t,e){this.points.push(t),this.angles.push(e)}getMarkerPoints(){return this.points}getMarkerAngles(){for(var{angles:t}=this,e=t.length,i=0;i<e;i++)if(!t[i])for(var r=i+1;r<e;r++)if(t[r]){t[i]=t[r];break}return t}}class gt extends rt{constructor(){super(...arguments),this.modifiedEmSizeStack=!1}calculateOpacity(){for(var t=1,e=this;e;){var i=e.getStyle("opacity",!1,!0);i.hasValue(!0)&&(t*=i.getNumber()),e=e.parent}return t}setContext(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e){var i=this.getStyle("fill"),r=this.getStyle("fill-opacity"),s=this.getStyle("stroke"),n=this.getStyle("stroke-opacity");if(i.isUrlDefinition()){var a=i.getFillStyleDefinition(this,r);a&&(t.fillStyle=a)}else if(i.hasValue()){"currentColor"===i.getString()&&i.setValue(this.getStyle("color").getColor());var h=i.getColor();"inherit"!==h&&(t.fillStyle="none"===h?"rgba(0,0,0,0)":h)}if(r.hasValue()){var o=new F(this.document,"fill",t.fillStyle).addOpacity(r).getColor();t.fillStyle=o}if(s.isUrlDefinition()){var l=s.getFillStyleDefinition(this,n);l&&(t.strokeStyle=l)}else if(s.hasValue()){"currentColor"===s.getString()&&s.setValue(this.getStyle("color").getColor());var u=s.getString();"inherit"!==u&&(t.strokeStyle="none"===u?"rgba(0,0,0,0)":u)}if(n.hasValue()){var g=new F(this.document,"stroke",t.strokeStyle).addOpacity(n).getString();t.strokeStyle=g}var c=this.getStyle("stroke-width");if(c.hasValue()){var d=c.getPixels();t.lineWidth=d||E}var y=this.getStyle("stroke-linecap"),f=this.getStyle("stroke-linejoin"),m=this.getStyle("stroke-miterlimit"),v=this.getStyle("stroke-dasharray"),x=this.getStyle("stroke-dashoffset");if(y.hasValue()&&(t.lineCap=y.getString()),f.hasValue()&&(t.lineJoin=f.getString()),m.hasValue()&&(t.miterLimit=m.getNumber()),v.hasValue()&&"none"!==v.getString()){var b=p(v.getString());void 0!==t.setLineDash?t.setLineDash(b):void 0!==t.webkitLineDash?t.webkitLineDash=b:void 0===t.mozDash||1===b.length&&0===b[0]||(t.mozDash=b);var S=x.getPixels();void 0!==t.lineDashOffset?t.lineDashOffset=S:void 0!==t.webkitLineDashOffset?t.webkitLineDashOffset=S:void 0!==t.mozDashOffset&&(t.mozDashOffset=S)}}if(this.modifiedEmSizeStack=!1,void 0!==t.font){var P=this.getStyle("font"),w=this.getStyle("font-style"),A=this.getStyle("font-variant"),C=this.getStyle("font-weight"),T=this.getStyle("font-size"),V=this.getStyle("font-family"),M=new ot(w.getString(),A.getString(),C.getString(),T.hasValue()?"".concat(T.getPixels(!0),"px"):"",V.getString(),ot.parse(P.getString(),t.font));w.setValue(M.fontStyle),A.setValue(M.fontVariant),C.setValue(M.fontWeight),T.setValue(M.fontSize),V.setValue(M.fontFamily),t.font=M.toString(),T.isPixels()&&(this.document.emSize=T.getPixels(),this.modifiedEmSizeStack=!0)}e||(this.applyEffects(t),t.globalAlpha=this.calculateOpacity())}clearContext(t){super.clearContext(t),this.modifiedEmSizeStack&&this.document.popEmSize()}}class ct extends gt{constructor(t,e,i){super(t,e,i),this.type="path",this.pathParser=null,this.pathParser=new ut(this.getAttribute("d").getString())}path(t){var{pathParser:e}=this,i=new lt;for(e.reset(),t&&t.beginPath();!e.isEnd();)switch(e.next().type){case ut.MOVE_TO:this.pathM(t,i);break;case ut.LINE_TO:this.pathL(t,i);break;case ut.HORIZ_LINE_TO:this.pathH(t,i);break;case ut.VERT_LINE_TO:this.pathV(t,i);break;case ut.CURVE_TO:this.pathC(t,i);break;case ut.SMOOTH_CURVE_TO:this.pathS(t,i);break;case ut.QUAD_TO:this.pathQ(t,i);break;case ut.SMOOTH_QUAD_TO:this.pathT(t,i);break;case ut.ARC:this.pathA(t,i);break;case ut.CLOSE_PATH:this.pathZ(t,i)}return i}getBoundingBox(t){return this.path()}getMarkers(){var{pathParser:t}=this,e=t.getMarkerPoints(),i=t.getMarkerAngles();return e.map(((t,e)=>[t,i[e]]))}renderChildren(t){this.path(t),this.document.screen.mouse.checkPath(this,t);var e=this.getStyle("fill-rule");""!==t.fillStyle&&("inherit"!==e.getString("inherit")?t.fill(e.getString()):t.fill()),""!==t.strokeStyle&&("non-scaling-stroke"===this.getAttribute("vector-effect").getString()?(t.save(),t.setTransform(1,0,0,1,0,0),t.stroke(),t.restore()):t.stroke());var i=this.getMarkers();if(i){var r=i.length-1,s=this.getStyle("marker-start"),n=this.getStyle("marker-mid"),a=this.getStyle("marker-end");if(s.isUrlDefinition()){var h=s.getDefinition(),[o,l]=i[0];h.render(t,o,l)}if(n.isUrlDefinition())for(var u=n.getDefinition(),g=1;g<r;g++){var[c,d]=i[g];u.render(t,c,d)}if(a.isUrlDefinition()){var p=a.getDefinition(),[y,f]=i[r];p.render(t,y,f)}}}static pathM(t){var e=t.getAsCurrentPoint();return t.start=t.current,{point:e}}pathM(t,e){var{pathParser:i}=this,{point:r}=ct.pathM(i),{x:s,y:n}=r;i.addMarker(r),e.addPoint(s,n),t&&t.moveTo(s,n)}static pathL(t){var{current:e}=t;return{current:e,point:t.getAsCurrentPoint()}}pathL(t,e){var{pathParser:i}=this,{current:r,point:s}=ct.pathL(i),{x:n,y:a}=s;i.addMarker(s,r),e.addPoint(n,a),t&&t.lineTo(n,a)}static pathH(t){var{current:e,command:i}=t,r=new X((i.relative?e.x:0)+i.x,e.y);return t.current=r,{current:e,point:r}}pathH(t,e){var{pathParser:i}=this,{current:r,point:s}=ct.pathH(i),{x:n,y:a}=s;i.addMarker(s,r),e.addPoint(n,a),t&&t.lineTo(n,a)}static pathV(t){var{current:e,command:i}=t,r=new X(e.x,(i.relative?e.y:0)+i.y);return t.current=r,{current:e,point:r}}pathV(t,e){var{pathParser:i}=this,{current:r,point:s}=ct.pathV(i),{x:n,y:a}=s;i.addMarker(s,r),e.addPoint(n,a),t&&t.lineTo(n,a)}static pathC(t){var{current:e}=t;return{current:e,point:t.getPoint("x1","y1"),controlPoint:t.getAsControlPoint("x2","y2"),currentPoint:t.getAsCurrentPoint()}}pathC(t,e){var{pathParser:i}=this,{current:r,point:s,controlPoint:n,currentPoint:a}=ct.pathC(i);i.addMarker(a,n,s),e.addBezierCurve(r.x,r.y,s.x,s.y,n.x,n.y,a.x,a.y),t&&t.bezierCurveTo(s.x,s.y,n.x,n.y,a.x,a.y)}static pathS(t){var{current:e}=t;return{current:e,point:t.getReflectedControlPoint(),controlPoint:t.getAsControlPoint("x2","y2"),currentPoint:t.getAsCurrentPoint()}}pathS(t,e){var{pathParser:i}=this,{current:r,point:s,controlPoint:n,currentPoint:a}=ct.pathS(i);i.addMarker(a,n,s),e.addBezierCurve(r.x,r.y,s.x,s.y,n.x,n.y,a.x,a.y),t&&t.bezierCurveTo(s.x,s.y,n.x,n.y,a.x,a.y)}static pathQ(t){var{current:e}=t;return{current:e,controlPoint:t.getAsControlPoint("x1","y1"),currentPoint:t.getAsCurrentPoint()}}pathQ(t,e){var{pathParser:i}=this,{current:r,controlPoint:s,currentPoint:n}=ct.pathQ(i);i.addMarker(n,s,s),e.addQuadraticCurve(r.x,r.y,s.x,s.y,n.x,n.y),t&&t.quadraticCurveTo(s.x,s.y,n.x,n.y)}static pathT(t){var{current:e}=t,i=t.getReflectedControlPoint();return t.control=i,{current:e,controlPoint:i,currentPoint:t.getAsCurrentPoint()}}pathT(t,e){var{pathParser:i}=this,{current:r,controlPoint:s,currentPoint:n}=ct.pathT(i);i.addMarker(n,s,s),e.addQuadraticCurve(r.x,r.y,s.x,s.y,n.x,n.y),t&&t.quadraticCurveTo(s.x,s.y,n.x,n.y)}static pathA(t){var{current:e,command:i}=t,{rX:r,rY:s,xRot:n,lArcFlag:a,sweepFlag:h}=i,o=n*(Math.PI/180),l=t.getAsCurrentPoint(),u=new X(Math.cos(o)*(e.x-l.x)/2+Math.sin(o)*(e.y-l.y)/2,-Math.sin(o)*(e.x-l.x)/2+Math.cos(o)*(e.y-l.y)/2),g=Math.pow(u.x,2)/Math.pow(r,2)+Math.pow(u.y,2)/Math.pow(s,2);g>1&&(r*=Math.sqrt(g),s*=Math.sqrt(g));var c=(a===h?-1:1)*Math.sqrt((Math.pow(r,2)*Math.pow(s,2)-Math.pow(r,2)*Math.pow(u.y,2)-Math.pow(s,2)*Math.pow(u.x,2))/(Math.pow(r,2)*Math.pow(u.y,2)+Math.pow(s,2)*Math.pow(u.x,2)));isNaN(c)&&(c=0);var d=new X(c*r*u.y/s,c*-s*u.x/r),p=new X((e.x+l.x)/2+Math.cos(o)*d.x-Math.sin(o)*d.y,(e.y+l.y)/2+Math.sin(o)*d.x+Math.cos(o)*d.y),y=O([1,0],[(u.x-d.x)/r,(u.y-d.y)/s]),f=[(u.x-d.x)/r,(u.y-d.y)/s],m=[(-u.x-d.x)/r,(-u.y-d.y)/s],v=O(f,m);return k(f,m)<=-1&&(v=Math.PI),k(f,m)>=1&&(v=0),{currentPoint:l,rX:r,rY:s,sweepFlag:h,xAxisRotation:o,centp:p,a1:y,ad:v}}pathA(t,e){var{pathParser:i}=this,{currentPoint:r,rX:s,rY:n,sweepFlag:a,xAxisRotation:h,centp:o,a1:l,ad:u}=ct.pathA(i),g=1-a?1:-1,c=l+g*(u/2),d=new X(o.x+s*Math.cos(c),o.y+n*Math.sin(c));if(i.addMarkerAngle(d,c-g*Math.PI/2),i.addMarkerAngle(r,c-g*Math.PI),e.addPoint(r.x,r.y),t&&!isNaN(l)&&!isNaN(u)){var p=s>n?s:n,y=s>n?1:s/n,f=s>n?n/s:1;t.translate(o.x,o.y),t.rotate(h),t.scale(y,f),t.arc(0,0,p,l,l+u,Boolean(1-a)),t.scale(1/y,1/f),t.rotate(-h),t.translate(-o.x,-o.y)}}static pathZ(t){t.current=t.start}pathZ(t,e){ct.pathZ(this.pathParser),t&&e.x1!==e.x2&&e.y1!==e.y2&&t.closePath()}}class dt extends ct{constructor(t,e,i){super(t,e,i),this.type="glyph",this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber(),this.unicode=this.getAttribute("unicode").getString(),this.arabicForm=this.getAttribute("arabic-form").getString()}}class pt extends gt{constructor(t,e,i){super(t,e,new.target===pt||i),this.type="text",this.x=0,this.y=0,this.measureCache=-1}setContext(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];super.setContext(t,e);var i=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();i&&(t.textBaseline=i)}initializeCoordinates(){this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY}getBoundingBox(t){if("text"!==this.type)return this.getTElementBoundingBox(t);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t);var e=null;return this.children.forEach(((i,r)=>{var s=this.getChildBoundingBox(t,this,this,r);e?e.addBoundingBox(s):e=s})),e}getFontSize(){var{document:t,parent:e}=this,i=ot.parse(t.ctx.font).fontSize;return e.getStyle("font-size").getNumber(i)}getTElementBoundingBox(t){var e=this.getFontSize();return new lt(this.x,this.y-e,this.x+this.measureText(t),this.y)}getGlyph(t,e,i){var r=e[i],s=null;if(t.isArabic){var n=e.length,a=e[i-1],h=e[i+1],o="isolated";if((0===i||" "===a)&&i<n-1&&" "!==h&&(o="terminal"),i>0&&" "!==a&&i<n-1&&" "!==h&&(o="medial"),i>0&&" "!==a&&(i===n-1||" "===h)&&(o="initial"),void 0!==t.glyphs[r]){var l=t.glyphs[r];s=l instanceof dt?l:l[o]}}else s=t.glyphs[r];return s||(s=t.missingGlyph),s}getText(){return""}getTextFromNode(t){var e=t||this.node,i=Array.from(e.parentNode.childNodes),r=i.indexOf(e),s=i.length-1,n=g(e.textContent||"");return 0===r&&(n=c(n)),r===s&&(n=d(n)),n}renderChildren(t){if("text"===this.type){this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t),this.children.forEach(((e,i)=>{this.renderChild(t,this,this,i)}));var{mouse:e}=this.document.screen;e.isWorking()&&e.checkBoundingBox(this,this.getBoundingBox(t))}else this.renderTElementChildren(t)}renderTElementChildren(t){var{document:e,parent:i}=this,r=this.getText(),s=i.getStyle("font-family").getDefinition();if(s)for(var{unitsPerEm:n}=s.fontFace,a=ot.parse(e.ctx.font),h=i.getStyle("font-size").getNumber(a.fontSize),o=i.getStyle("font-style").getString(a.fontStyle),l=h/n,u=s.isRTL?r.split("").reverse().join(""):r,g=p(i.getAttribute("dx").getString()),c=u.length,d=0;d<c;d++){var y=this.getGlyph(s,u,d);t.translate(this.x,this.y),t.scale(l,-l);var f=t.lineWidth;t.lineWidth=t.lineWidth*n/h,"italic"===o&&t.transform(1,0,.4,1,0,0),y.render(t),"italic"===o&&t.transform(1,0,-.4,1,0,0),t.lineWidth=f,t.scale(1/l,-1/l),t.translate(-this.x,-this.y),this.x+=h*(y.horizAdvX||s.horizAdvX)/n,void 0===g[d]||isNaN(g[d])||(this.x+=g[d])}else{var{x:m,y:v}=this;t.fillStyle&&t.fillText(r,m,v),t.strokeStyle&&t.strokeText(r,m,v)}}applyAnchoring(){if(!(this.textChunkStart>=this.leafTexts.length)){var t,e=this.leafTexts[this.textChunkStart],i=e.getStyle("text-anchor").getString("start");t="start"===i?e.x-this.minX:"end"===i?e.x-this.maxX:e.x-(this.minX+this.maxX)/2;for(var r=this.textChunkStart;r<this.leafTexts.length;r++)this.leafTexts[r].x+=t;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length}}adjustChildCoordinatesRecursive(t){this.children.forEach(((e,i)=>{this.adjustChildCoordinatesRecursiveCore(t,this,this,i)})),this.applyAnchoring()}adjustChildCoordinatesRecursiveCore(t,e,i,r){var s=i.children[r];s.children.length>0?s.children.forEach(((i,r)=>{e.adjustChildCoordinatesRecursiveCore(t,e,s,r)})):this.adjustChildCoordinates(t,e,i,r)}adjustChildCoordinates(t,e,i,r){var s=i.children[r];if("function"!=typeof s.measureText)return s;t.save(),s.setContext(t,!0);var n=s.getAttribute("x"),a=s.getAttribute("y"),h=s.getAttribute("dx"),o=s.getAttribute("dy"),l=s.getStyle("font-family").getDefinition(),u=Boolean(l)&&l.isRTL;0===r&&(n.hasValue()||n.setValue(s.getInheritedAttribute("x")),a.hasValue()||a.setValue(s.getInheritedAttribute("y")),h.hasValue()||h.setValue(s.getInheritedAttribute("dx")),o.hasValue()||o.setValue(s.getInheritedAttribute("dy")));var g=s.measureText(t);return u&&(e.x-=g),n.hasValue()?(e.applyAnchoring(),s.x=n.getPixels("x"),h.hasValue()&&(s.x+=h.getPixels("x"))):(h.hasValue()&&(e.x+=h.getPixels("x")),s.x=e.x),e.x=s.x,u||(e.x+=g),a.hasValue()?(s.y=a.getPixels("y"),o.hasValue()&&(s.y+=o.getPixels("y"))):(o.hasValue()&&(e.y+=o.getPixels("y")),s.y=e.y),e.y=s.y,e.leafTexts.push(s),e.minX=Math.min(e.minX,s.x,s.x+g),e.maxX=Math.max(e.maxX,s.x,s.x+g),s.clearContext(t),t.restore(),s}getChildBoundingBox(t,e,i,r){var s=i.children[r];if("function"!=typeof s.getBoundingBox)return null;var n=s.getBoundingBox(t);return n?(s.children.forEach(((i,r)=>{var a=e.getChildBoundingBox(t,e,s,r);n.addBoundingBox(a)})),n):null}renderChild(t,e,i,r){var s=i.children[r];s.render(t),s.children.forEach(((i,r)=>{e.renderChild(t,e,s,r)}))}measureText(t){var{measureCache:e}=this;if(~e)return e;var i=this.getText(),r=this.measureTargetText(t,i);return this.measureCache=r,r}measureTargetText(t,e){if(!e.length)return 0;var{parent:i}=this,r=i.getStyle("font-family").getDefinition();if(r){for(var s=this.getFontSize(),n=r.isRTL?e.split("").reverse().join(""):e,a=p(i.getAttribute("dx").getString()),h=n.length,o=0,l=0;l<h;l++)o+=(this.getGlyph(r,n,l).horizAdvX||r.horizAdvX)*s/r.fontFace.unitsPerEm,void 0===a[l]||isNaN(a[l])||(o+=a[l]);return o}if(!t.measureText)return 10*e.length;t.save(),this.setContext(t,!0);var{width:u}=t.measureText(e);return this.clearContext(t),t.restore(),u}getInheritedAttribute(t){for(var e=this;e instanceof pt&&e.isFirstChild();){var i=e.parent.getAttribute(t);if(i.hasValue(!0))return i.getValue("0");e=e.parent}return null}}class yt extends pt{constructor(t,e,i){super(t,e,new.target===yt||i),this.type="tspan",this.text=this.children.length>0?"":this.getTextFromNode()}getText(){return this.text}}class ft extends yt{constructor(){super(...arguments),this.type="textNode"}}class mt extends gt{constructor(){super(...arguments),this.type="svg",this.root=!1}setContext(t){var e,{document:i}=this,{screen:r,window:s}=i,n=t.canvas;if(r.setDefaults(t),n.style&&void 0!==t.font&&s&&void 0!==s.getComputedStyle){t.font=s.getComputedStyle(n).getPropertyValue("font");var a=new F(i,"fontSize",ot.parse(t.font).fontSize);a.hasValue()&&(i.rootEmSize=a.getPixels("y"),i.emSize=i.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);var{width:h,height:o}=r.viewPort;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%"),this.getStyle("color").hasValue()||this.getStyle("color",!0).setValue("black");var l=this.getAttribute("refX"),u=this.getAttribute("refY"),g=this.getAttribute("viewBox"),c=g.hasValue()?p(g.getString()):null,d=!this.root&&"visible"!==this.getStyle("overflow").getValue("hidden"),y=0,f=0,m=0,v=0;c&&(y=c[0],f=c[1]),this.root||(h=this.getStyle("width").getPixels("x"),o=this.getStyle("height").getPixels("y"),"marker"===this.type&&(m=y,v=f,y=0,f=0)),r.viewPort.setCurrent(h,o),!this.node||this.parent&&"foreignObject"!==(null===(e=this.node.parentNode)||void 0===e?void 0:e.nodeName)||!this.getStyle("transform",!1,!0).hasValue()||this.getStyle("transform-origin",!1,!0).hasValue()||this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),super.setContext(t),t.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),c&&(h=c[2],o=c[3]),i.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:r.viewPort.width,desiredWidth:h,height:r.viewPort.height,desiredHeight:o,minX:y,minY:f,refX:l.getValue(),refY:u.getValue(),clip:d,clipX:m,clipY:v}),c&&(r.viewPort.removeCurrent(),r.viewPort.setCurrent(h,o))}clearContext(t){super.clearContext(t),this.document.screen.viewPort.removeCurrent()}resize(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.getAttribute("width",!0),s=this.getAttribute("height",!0),n=this.getAttribute("viewBox"),a=this.getAttribute("style"),h=r.getNumber(0),o=s.getNumber(0);if(i)if("string"==typeof i)this.getAttribute("preserveAspectRatio",!0).setValue(i);else{var l=this.getAttribute("preserveAspectRatio");l.hasValue()&&l.setValue(l.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(r.setValue(t),s.setValue(e),n.hasValue()||n.setValue("0 0 ".concat(h||t," ").concat(o||e)),a.hasValue()){var u=this.getStyle("width"),g=this.getStyle("height");u.hasValue()&&u.setValue("".concat(t,"px")),g.hasValue()&&g.setValue("".concat(e,"px"))}}}class vt extends ct{constructor(){super(...arguments),this.type="rect"}path(t){var e=this.getAttribute("x").getPixels("x"),i=this.getAttribute("y").getPixels("y"),r=this.getStyle("width",!1,!0).getPixels("x"),s=this.getStyle("height",!1,!0).getPixels("y"),n=this.getAttribute("rx"),a=this.getAttribute("ry"),h=n.getPixels("x"),o=a.getPixels("y");if(n.hasValue()&&!a.hasValue()&&(o=h),a.hasValue()&&!n.hasValue()&&(h=o),h=Math.min(h,r/2),o=Math.min(o,s/2),t){var l=(Math.sqrt(2)-1)/3*4;t.beginPath(),s>0&&r>0&&(t.moveTo(e+h,i),t.lineTo(e+r-h,i),t.bezierCurveTo(e+r-h+l*h,i,e+r,i+o-l*o,e+r,i+o),t.lineTo(e+r,i+s-o),t.bezierCurveTo(e+r,i+s-o+l*o,e+r-h+l*h,i+s,e+r-h,i+s),t.lineTo(e+h,i+s),t.bezierCurveTo(e+h-l*h,i+s,e,i+s-o+l*o,e,i+s-o),t.lineTo(e,i+o),t.bezierCurveTo(e,i+o-l*o,e+h-l*h,i,e+h,i),t.closePath())}return new lt(e,i,e+r,i+s)}getMarkers(){return null}}class xt extends ct{constructor(){super(...arguments),this.type="circle"}path(t){var e=this.getAttribute("cx").getPixels("x"),i=this.getAttribute("cy").getPixels("y"),r=this.getAttribute("r").getPixels();return t&&r>0&&(t.beginPath(),t.arc(e,i,r,0,2*Math.PI,!1),t.closePath()),new lt(e-r,i-r,e+r,i+r)}getMarkers(){return null}}class bt extends ct{constructor(){super(...arguments),this.type="ellipse"}path(t){var e=(Math.sqrt(2)-1)/3*4,i=this.getAttribute("rx").getPixels("x"),r=this.getAttribute("ry").getPixels("y"),s=this.getAttribute("cx").getPixels("x"),n=this.getAttribute("cy").getPixels("y");return t&&i>0&&r>0&&(t.beginPath(),t.moveTo(s+i,n),t.bezierCurveTo(s+i,n+e*r,s+e*i,n+r,s,n+r),t.bezierCurveTo(s-e*i,n+r,s-i,n+e*r,s-i,n),t.bezierCurveTo(s-i,n-e*r,s-e*i,n-r,s,n-r),t.bezierCurveTo(s+e*i,n-r,s+i,n-e*r,s+i,n),t.closePath()),new lt(s-i,n-r,s+i,n+r)}getMarkers(){return null}}class St extends ct{constructor(){super(...arguments),this.type="line"}getPoints(){return[new X(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new X(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(t){var[{x:e,y:i},{x:r,y:s}]=this.getPoints();return t&&(t.beginPath(),t.moveTo(e,i),t.lineTo(r,s)),new lt(e,i,r,s)}getMarkers(){var[t,e]=this.getPoints(),i=t.angleTo(e);return[[t,i],[e,i]]}}class Pt extends ct{constructor(t,e,i){super(t,e,i),this.type="polyline",this.points=[],this.points=X.parsePath(this.getAttribute("points").getString())}path(t){var{points:e}=this,[{x:i,y:r}]=e,s=new lt(i,r);return t&&(t.beginPath(),t.moveTo(i,r)),e.forEach((e=>{var{x:i,y:r}=e;s.addPoint(i,r),t&&t.lineTo(i,r)})),s}getMarkers(){var{points:t}=this,e=t.length-1,i=[];return t.forEach(((r,s)=>{s!==e&&i.push([r,r.angleTo(t[s+1])])})),i.length>0&&i.push([t[t.length-1],i[i.length-1][1]]),i}}class wt extends Pt{constructor(){super(...arguments),this.type="polygon"}path(t){var e=super.path(t),[{x:i,y:r}]=this.points;return t&&(t.lineTo(i,r),t.closePath()),e}}class At extends rt{constructor(){super(...arguments),this.type="pattern"}createPattern(t,e,i){var r=this.getStyle("width").getPixels("x",!0),s=this.getStyle("height").getPixels("y",!0),n=new mt(this.document,null);n.attributes.viewBox=new F(this.document,"viewBox",this.getAttribute("viewBox").getValue()),n.attributes.width=new F(this.document,"width","".concat(r,"px")),n.attributes.height=new F(this.document,"height","".concat(s,"px")),n.attributes.transform=new F(this.document,"transform",this.getAttribute("patternTransform").getValue()),n.children=this.children;var a=this.document.createCanvas(r,s),h=a.getContext("2d"),o=this.getAttribute("x"),l=this.getAttribute("y");o.hasValue()&&l.hasValue()&&h.translate(o.getPixels("x",!0),l.getPixels("y",!0)),i.hasValue()?this.styles["fill-opacity"]=i:Reflect.deleteProperty(this.styles,"fill-opacity");for(var u=-1;u<=1;u++)for(var g=-1;g<=1;g++)h.save(),n.attributes.x=new F(this.document,"x",u*a.width),n.attributes.y=new F(this.document,"y",g*a.height),n.render(h),h.restore();return t.createPattern(a,"repeat")}}class Ct extends rt{constructor(){super(...arguments),this.type="marker"}render(t,e,i){if(e){var{x:r,y:s}=e,n=this.getAttribute("orient").getString("auto"),a=this.getAttribute("markerUnits").getString("strokeWidth");t.translate(r,s),"auto"===n&&t.rotate(i),"strokeWidth"===a&&t.scale(t.lineWidth,t.lineWidth),t.save();var h=new mt(this.document,null);h.type=this.type,h.attributes.viewBox=new F(this.document,"viewBox",this.getAttribute("viewBox").getValue()),h.attributes.refX=new F(this.document,"refX",this.getAttribute("refX").getValue()),h.attributes.refY=new F(this.document,"refY",this.getAttribute("refY").getValue()),h.attributes.width=new F(this.document,"width",this.getAttribute("markerWidth").getValue()),h.attributes.height=new F(this.document,"height",this.getAttribute("markerHeight").getValue()),h.attributes.overflow=new F(this.document,"overflow",this.getAttribute("overflow").getValue()),h.attributes.fill=new F(this.document,"fill",this.getAttribute("fill").getColor("black")),h.attributes.stroke=new F(this.document,"stroke",this.getAttribute("stroke").getValue("none")),h.children=this.children,h.render(t),t.restore(),"strokeWidth"===a&&t.scale(1/t.lineWidth,1/t.lineWidth),"auto"===n&&t.rotate(-i),t.translate(-r,-s)}}}class Tt extends rt{constructor(){super(...arguments),this.type="defs"}render(){}}class Vt extends gt{constructor(){super(...arguments),this.type="g"}getBoundingBox(t){var e=new lt;return this.children.forEach((i=>{e.addBoundingBox(i.getBoundingBox(t))})),e}}class Et extends rt{constructor(t,e,i){super(t,e,i),this.attributesToInherit=["gradientUnits"],this.stops=[];var{stops:r,children:s}=this;s.forEach((t=>{"stop"===t.type&&r.push(t)}))}getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}createGradient(t,e,i){var r=this;this.getHrefAttribute().hasValue()&&(r=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(r));var{stops:s}=r,n=this.getGradient(t,e);if(!n)return this.addParentOpacity(i,s[s.length-1].color);if(s.forEach((t=>{n.addColorStop(t.offset,this.addParentOpacity(i,t.color))})),this.getAttribute("gradientTransform").hasValue()){var{document:a}=this,{MAX_VIRTUAL_PIXELS:h,viewPort:o}=a.screen,[l]=o.viewPorts,u=new vt(a,null);u.attributes.x=new F(a,"x",-h/3),u.attributes.y=new F(a,"y",-h/3),u.attributes.width=new F(a,"width",h),u.attributes.height=new F(a,"height",h);var g=new Vt(a,null);g.attributes.transform=new F(a,"transform",this.getAttribute("gradientTransform").getValue()),g.children=[u];var c=new mt(a,null);c.attributes.x=new F(a,"x",0),c.attributes.y=new F(a,"y",0),c.attributes.width=new F(a,"width",l.width),c.attributes.height=new F(a,"height",l.height),c.children=[g];var d=a.createCanvas(l.width,l.height),p=d.getContext("2d");return p.fillStyle=n,c.render(p),p.createPattern(d,"no-repeat")}return n}inheritStopContainer(t){this.attributesToInherit.forEach((e=>{!this.getAttribute(e).hasValue()&&t.getAttribute(e).hasValue()&&this.getAttribute(e,!0).setValue(t.getAttribute(e).getValue())}))}addParentOpacity(t,e){return t.hasValue()?new F(this.document,"color",e).addOpacity(t).getColor():e}}class Mt extends Et{constructor(t,e,i){super(t,e,i),this.type="linearGradient",this.attributesToInherit.push("x1","y1","x2","y2")}getGradient(t,e){var i="objectBoundingBox"===this.getGradientUnits(),r=i?e.getBoundingBox(t):null;if(i&&!r)return null;this.getAttribute("x1").hasValue()||this.getAttribute("y1").hasValue()||this.getAttribute("x2").hasValue()||this.getAttribute("y2").hasValue()||(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));var s=i?r.x+r.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),n=i?r.y+r.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),a=i?r.x+r.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),h=i?r.y+r.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return s===a&&n===h?null:t.createLinearGradient(s,n,a,h)}}class kt extends Et{constructor(t,e,i){super(t,e,i),this.type="radialGradient",this.attributesToInherit.push("cx","cy","r","fx","fy","fr")}getGradient(t,e){var i="objectBoundingBox"===this.getGradientUnits(),r=e.getBoundingBox(t);if(i&&!r)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");var s=i?r.x+r.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),n=i?r.y+r.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),a=s,h=n;this.getAttribute("fx").hasValue()&&(a=i?r.x+r.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(h=i?r.y+r.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var o=i?(r.width+r.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),l=this.getAttribute("fr").getPixels();return t.createRadialGradient(a,h,l,s,n,o)}}class Ot extends rt{constructor(t,e,i){super(t,e,i),this.type="stop";var r=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber())),s=this.getStyle("stop-opacity"),n=this.getStyle("stop-color",!0);""===n.getString()&&n.setValue("#000"),s.hasValue()&&(n=n.addOpacity(s)),this.offset=r,this.color=n.getColor()}}class Nt extends rt{constructor(t,e,i){super(t,e,i),this.type="animate",this.duration=0,this.initialValue=null,this.initialUnits="",this.removed=!1,this.frozen=!1,t.screen.animations.push(this),this.begin=this.getAttribute("begin").getMilliseconds(),this.maxDuration=this.begin+this.getAttribute("dur").getMilliseconds(),this.from=this.getAttribute("from"),this.to=this.getAttribute("to"),this.values=new F(t,"values",null);var r=this.getAttribute("values");r.hasValue()&&this.values.setValue(r.getString().split(";"))}getProperty(){var t=this.getAttribute("attributeType").getString(),e=this.getAttribute("attributeName").getString();return"CSS"===t?this.parent.getStyle(e,!0):this.parent.getAttribute(e,!0)}calcValue(){var{initialUnits:t}=this,{progress:e,from:i,to:r}=this.getProgress(),s=i.getNumber()+(r.getNumber()-i.getNumber())*e;return"%"===t&&(s*=100),"".concat(s).concat(t)}update(t){var{parent:e}=this,i=this.getProperty();if(this.initialValue||(this.initialValue=i.getString(),this.initialUnits=i.getUnits()),this.duration>this.maxDuration){var r=this.getAttribute("fill").getString("remove");if("indefinite"===this.getAttribute("repeatCount").getString()||"indefinite"===this.getAttribute("repeatDur").getString())this.duration=0;else if("freeze"!==r||this.frozen){if("remove"===r&&!this.removed)return this.removed=!0,i.setValue(e.animationFrozen?e.animationFrozenValue:this.initialValue),!0}else this.frozen=!0,e.animationFrozen=!0,e.animationFrozenValue=i.getString();return!1}this.duration+=t;var s=!1;if(this.begin<this.duration){var n=this.calcValue(),a=this.getAttribute("type");if(a.hasValue()){var h=a.getString();n="".concat(h,"(").concat(n,")")}i.setValue(n),s=!0}return s}getProgress(){var{document:t,values:e}=this,i={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(e.hasValue()){var r=i.progress*(e.getValue().length-1),s=Math.floor(r),n=Math.ceil(r);i.from=new F(t,"from",parseFloat(e.getValue()[s])),i.to=new F(t,"to",parseFloat(e.getValue()[n])),i.progress=(r-s)/(n-s)}else i.from=this.from,i.to=this.to;return i}}class Dt extends Nt{constructor(){super(...arguments),this.type="animateColor"}calcValue(){var{progress:t,from:e,to:i}=this.getProgress(),r=new a(e.getColor()),s=new a(i.getColor());if(r.ok&&s.ok){var n=r.r+(s.r-r.r)*t,h=r.g+(s.g-r.g)*t,o=r.b+(s.b-r.b)*t;return"rgb(".concat(Math.floor(n),", ").concat(Math.floor(h),", ").concat(Math.floor(o),")")}return this.getAttribute("from").getColor()}}class zt extends Nt{constructor(){super(...arguments),this.type="animateTransform"}calcValue(){var{progress:t,from:e,to:i}=this.getProgress(),r=p(e.getString()),s=p(i.getString()),n=r.map(((e,i)=>e+(s[i]-e)*t)).join(" ");return n}}class Bt extends rt{constructor(t,e,i){super(t,e,i),this.type="font",this.glyphs={},this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber();var{definitions:r}=t,{children:s}=this;for(var n of s)switch(n.type){case"font-face":this.fontFace=n;var a=n.getStyle("font-family");a.hasValue()&&(r[a.getString()]=this);break;case"missing-glyph":this.missingGlyph=n;break;case"glyph":var h=n;h.arabicForm?(this.isRTL=!0,this.isArabic=!0,void 0===this.glyphs[h.unicode]&&(this.glyphs[h.unicode]={}),this.glyphs[h.unicode][h.arabicForm]=h):this.glyphs[h.unicode]=h}}render(){}}class Lt extends rt{constructor(t,e,i){super(t,e,i),this.type="font-face",this.ascent=this.getAttribute("ascent").getNumber(),this.descent=this.getAttribute("descent").getNumber(),this.unitsPerEm=this.getAttribute("units-per-em").getNumber()}}class It extends ct{constructor(){super(...arguments),this.type="missing-glyph",this.horizAdvX=0}}class Rt extends pt{constructor(){super(...arguments),this.type="tref"}getText(){var t=this.getHrefAttribute().getDefinition();if(t){var e=t.children[0];if(e)return e.getText()}return""}}class Ft extends pt{constructor(t,e,i){super(t,e,i),this.type="a";var{childNodes:r}=e,s=r[0],n=r.length>0&&Array.from(r).every((t=>3===t.nodeType));this.hasText=n,this.text=n?this.getTextFromNode(s):""}getText(){return this.text}renderChildren(t){if(this.hasText){super.renderChildren(t);var{document:e,x:i,y:r}=this,{mouse:s}=e.screen,n=new F(e,"fontSize",ot.parse(e.ctx.font).fontSize);s.isWorking()&&s.checkBoundingBox(this,new lt(i,r-n.getPixels("y"),i+this.measureText(t),r))}else if(this.children.length>0){var a=new Vt(this.document,null);a.children=this.children,a.parent=this,a.render(t)}}onClick(){var{window:t}=this.document;t&&t.open(this.getHrefAttribute().getString())}onMouseMove(){this.document.ctx.canvas.style.cursor="pointer"}}function _t(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,r)}return i}function Xt(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?_t(Object(i),!0).forEach((function(e){(0,s.Z)(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):_t(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}class jt extends pt{constructor(t,e,i){super(t,e,i),this.type="textPath",this.textWidth=0,this.textHeight=0,this.pathLength=-1,this.glyphInfo=null,this.letterSpacingCache=[],this.measuresCache=new Map([["",0]]);var r=this.getHrefAttribute().getDefinition();this.text=this.getTextFromNode(),this.dataArray=this.parsePathData(r)}getText(){return this.text}path(t){var{dataArray:e}=this;t&&t.beginPath(),e.forEach((e=>{var{type:i,points:r}=e;switch(i){case ut.LINE_TO:t&&t.lineTo(r[0],r[1]);break;case ut.MOVE_TO:t&&t.moveTo(r[0],r[1]);break;case ut.CURVE_TO:t&&t.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]);break;case ut.QUAD_TO:t&&t.quadraticCurveTo(r[0],r[1],r[2],r[3]);break;case ut.ARC:var[s,n,a,h,o,l,u,g]=r,c=a>h?a:h,d=a>h?1:a/h,p=a>h?h/a:1;t&&(t.translate(s,n),t.rotate(u),t.scale(d,p),t.arc(0,0,c,o,o+l,Boolean(1-g)),t.scale(1/d,1/p),t.rotate(-u),t.translate(-s,-n));break;case ut.CLOSE_PATH:t&&t.closePath()}}))}renderChildren(t){this.setTextData(t),t.save();var e=this.parent.getStyle("text-decoration").getString(),i=this.getFontSize(),{glyphInfo:r}=this,s=t.fillStyle;"underline"===e&&t.beginPath(),r.forEach(((r,s)=>{var{p0:n,p1:a,rotation:h,text:o}=r;t.save(),t.translate(n.x,n.y),t.rotate(h),t.fillStyle&&t.fillText(o,0,0),t.strokeStyle&&t.strokeText(o,0,0),t.restore(),"underline"===e&&(0===s&&t.moveTo(n.x,n.y+i/8),t.lineTo(a.x,a.y+i/5))})),"underline"===e&&(t.lineWidth=i/20,t.strokeStyle=s,t.stroke(),t.closePath()),t.restore()}getLetterSpacingAt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.letterSpacingCache[t]||0}findSegmentToFitChar(t,e,i,r,s,n,a,h,o){var l=n,u=this.measureText(t,h);" "===h&&"justify"===e&&i<r&&(u+=(r-i)/s),o>-1&&(l+=this.getLetterSpacingAt(o));var g=this.textHeight/20,c=this.getEquidistantPointOnPath(l,g,0),d=this.getEquidistantPointOnPath(l+u,g,0),p={p0:c,p1:d},y=c&&d?Math.atan2(d.y-c.y,d.x-c.x):0;if(a){var f=Math.cos(Math.PI/2+y)*a,m=Math.cos(-y)*a;p.p0=Xt(Xt({},c),{},{x:c.x+f,y:c.y+m}),p.p1=Xt(Xt({},d),{},{x:d.x+f,y:d.y+m})}return{offset:l+=u,segment:p,rotation:y}}measureText(t,e){var{measuresCache:i}=this,r=e||this.getText();if(i.has(r))return i.get(r);var s=this.measureTargetText(t,r);return i.set(r,s),s}setTextData(t){if(!this.glyphInfo){var e=this.getText(),i=e.split(""),r=e.split(" ").length-1,s=this.parent.getAttribute("dx").split().map((t=>t.getPixels("x"))),n=this.parent.getAttribute("dy").getPixels("y"),a=this.parent.getStyle("text-anchor").getString("start"),h=this.getStyle("letter-spacing"),o=this.parent.getStyle("letter-spacing"),l=0;h.hasValue()&&"inherit"!==h.getValue()?h.hasValue()&&"initial"!==h.getValue()&&"unset"!==h.getValue()&&(l=h.getPixels()):l=o.getPixels();var u=[],g=e.length;this.letterSpacingCache=u;for(var c=0;c<g;c++)u.push(void 0!==s[c]?s[c]:l);var d=u.reduce(((t,e,i)=>0===i?0:t+e||0),0),p=this.measureText(t),y=Math.max(p+d,0);this.textWidth=p,this.textHeight=this.getFontSize(),this.glyphInfo=[];var f=this.getPathLength(),m=this.getStyle("startOffset").getNumber(0)*f,v=0;"middle"!==a&&"center"!==a||(v=-y/2),"end"!==a&&"right"!==a||(v=-y),v+=m,i.forEach(((e,s)=>{var{offset:h,segment:o,rotation:l}=this.findSegmentToFitChar(t,a,y,f,r,v,n,e,s);v=h,o.p0&&o.p1&&this.glyphInfo.push({text:i[s],p0:o.p0,p1:o.p1,rotation:l})}))}}parsePathData(t){if(this.pathLength=-1,!t)return[];var e=[],{pathParser:i}=t;for(i.reset();!i.isEnd();){var{current:r}=i,s=r?r.x:0,n=r?r.y:0,a=i.next(),h=a.type,o=[];switch(a.type){case ut.MOVE_TO:this.pathM(i,o);break;case ut.LINE_TO:h=this.pathL(i,o);break;case ut.HORIZ_LINE_TO:h=this.pathH(i,o);break;case ut.VERT_LINE_TO:h=this.pathV(i,o);break;case ut.CURVE_TO:this.pathC(i,o);break;case ut.SMOOTH_CURVE_TO:h=this.pathS(i,o);break;case ut.QUAD_TO:this.pathQ(i,o);break;case ut.SMOOTH_QUAD_TO:h=this.pathT(i,o);break;case ut.ARC:o=this.pathA(i);break;case ut.CLOSE_PATH:ct.pathZ(i)}a.type!==ut.CLOSE_PATH?e.push({type:h,points:o,start:{x:s,y:n},pathLength:this.calcLength(s,n,h,o)}):e.push({type:ut.CLOSE_PATH,points:[],pathLength:0})}return e}pathM(t,e){var{x:i,y:r}=ct.pathM(t).point;e.push(i,r)}pathL(t,e){var{x:i,y:r}=ct.pathL(t).point;return e.push(i,r),ut.LINE_TO}pathH(t,e){var{x:i,y:r}=ct.pathH(t).point;return e.push(i,r),ut.LINE_TO}pathV(t,e){var{x:i,y:r}=ct.pathV(t).point;return e.push(i,r),ut.LINE_TO}pathC(t,e){var{point:i,controlPoint:r,currentPoint:s}=ct.pathC(t);e.push(i.x,i.y,r.x,r.y,s.x,s.y)}pathS(t,e){var{point:i,controlPoint:r,currentPoint:s}=ct.pathS(t);return e.push(i.x,i.y,r.x,r.y,s.x,s.y),ut.CURVE_TO}pathQ(t,e){var{controlPoint:i,currentPoint:r}=ct.pathQ(t);e.push(i.x,i.y,r.x,r.y)}pathT(t,e){var{controlPoint:i,currentPoint:r}=ct.pathT(t);return e.push(i.x,i.y,r.x,r.y),ut.QUAD_TO}pathA(t){var{rX:e,rY:i,sweepFlag:r,xAxisRotation:s,centp:n,a1:a,ad:h}=ct.pathA(t);return 0===r&&h>0&&(h-=2*Math.PI),1===r&&h<0&&(h+=2*Math.PI),[n.x,n.y,e,i,a,h,s,r]}calcLength(t,e,i,r){var s=0,n=null,a=null,h=0;switch(i){case ut.LINE_TO:return this.getLineLength(t,e,r[0],r[1]);case ut.CURVE_TO:for(s=0,n=this.getPointOnCubicBezier(0,t,e,r[0],r[1],r[2],r[3],r[4],r[5]),h=.01;h<=1;h+=.01)a=this.getPointOnCubicBezier(h,t,e,r[0],r[1],r[2],r[3],r[4],r[5]),s+=this.getLineLength(n.x,n.y,a.x,a.y),n=a;return s;case ut.QUAD_TO:for(s=0,n=this.getPointOnQuadraticBezier(0,t,e,r[0],r[1],r[2],r[3]),h=.01;h<=1;h+=.01)a=this.getPointOnQuadraticBezier(h,t,e,r[0],r[1],r[2],r[3]),s+=this.getLineLength(n.x,n.y,a.x,a.y),n=a;return s;case ut.ARC:s=0;var o=r[4],l=r[5],u=r[4]+l,g=Math.PI/180;if(Math.abs(o-u)<g&&(g=Math.abs(o-u)),n=this.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],o,0),l<0)for(h=o-g;h>u;h-=g)a=this.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],h,0),s+=this.getLineLength(n.x,n.y,a.x,a.y),n=a;else for(h=o+g;h<u;h+=g)a=this.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],h,0),s+=this.getLineLength(n.x,n.y,a.x,a.y),n=a;return a=this.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],u,0),s+this.getLineLength(n.x,n.y,a.x,a.y)}return 0}getPointOnLine(t,e,i,r,s){var n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:i,h=(s-i)/(r-e+E),o=Math.sqrt(t*t/(1+h*h));r<e&&(o*=-1);var l=h*o,u=null;if(r===e)u={x:n,y:a+l};else if((a-i)/(n-e+E)===h)u={x:n+o,y:a+l};else{var g,c,d=this.getLineLength(e,i,r,s);if(d<E)return null;var p=(n-e)*(r-e)+(a-i)*(s-i);g=e+(p/=d*d)*(r-e),c=i+p*(s-i);var y=this.getLineLength(n,a,g,c),f=Math.sqrt(t*t-y*y);o=Math.sqrt(f*f/(1+h*h)),r<e&&(o*=-1),u={x:g+o,y:c+(l=h*o)}}return u}getPointOnPath(t){var e=this.getPathLength(),i=0,r=null;if(t<-5e-5||t-5e-5>e)return null;var{dataArray:s}=this;for(var n of s){if(!n||!(n.pathLength<5e-5||i+n.pathLength+5e-5<t)){var a=t-i,h=0;switch(n.type){case ut.LINE_TO:r=this.getPointOnLine(a,n.start.x,n.start.y,n.points[0],n.points[1],n.start.x,n.start.y);break;case ut.ARC:var o=n.points[4],l=n.points[5],u=n.points[4]+l;if(h=o+a/n.pathLength*l,l<0&&h<u||l>=0&&h>u)break;r=this.getPointOnEllipticalArc(n.points[0],n.points[1],n.points[2],n.points[3],h,n.points[6]);break;case ut.CURVE_TO:(h=a/n.pathLength)>1&&(h=1),r=this.getPointOnCubicBezier(h,n.start.x,n.start.y,n.points[0],n.points[1],n.points[2],n.points[3],n.points[4],n.points[5]);break;case ut.QUAD_TO:(h=a/n.pathLength)>1&&(h=1),r=this.getPointOnQuadraticBezier(h,n.start.x,n.start.y,n.points[0],n.points[1],n.points[2],n.points[3])}if(r)return r;break}i+=n.pathLength}return null}getLineLength(t,e,i,r){return Math.sqrt((i-t)*(i-t)+(r-e)*(r-e))}getPathLength(){return-1===this.pathLength&&(this.pathLength=this.dataArray.reduce(((t,e)=>e.pathLength>0?t+e.pathLength:t),0)),this.pathLength}getPointOnCubicBezier(t,e,i,r,s,n,a,h,o){return{x:h*N(t)+n*D(t)+r*z(t)+e*B(t),y:o*N(t)+a*D(t)+s*z(t)+i*B(t)}}getPointOnQuadraticBezier(t,e,i,r,s,n,a){return{x:n*L(t)+r*I(t)+e*R(t),y:a*L(t)+s*I(t)+i*R(t)}}getPointOnEllipticalArc(t,e,i,r,s,n){var a=Math.cos(n),h=Math.sin(n),o=i*Math.cos(s),l=r*Math.sin(s);return{x:t+(o*a-l*h),y:e+(o*h+l*a)}}buildEquidistantCache(t,e){var i=this.getPathLength(),r=e||.25,s=t||i/100;if(!this.equidistantCache||this.equidistantCache.step!==s||this.equidistantCache.precision!==r){this.equidistantCache={step:s,precision:r,points:[]};for(var n=0,a=0;a<=i;a+=r){var h=this.getPointOnPath(a),o=this.getPointOnPath(a+r);h&&o&&(n+=this.getLineLength(h.x,h.y,o.x,o.y))>=s&&(this.equidistantCache.points.push({x:h.x,y:h.y,distance:a}),n-=s)}}}getEquidistantPointOnPath(t,e,i){if(this.buildEquidistantCache(e,i),t<0||t-this.getPathLength()>5e-5)return null;var r=Math.round(t/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[r]||null}}var Ut=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class Yt extends gt{constructor(t,e,i){super(t,e,i),this.type="image",this.loaded=!1;var r=this.getHrefAttribute().getString();if(r){var s=r.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(r);t.images.push(this),s?this.loadSvg(r):this.loadImage(r),this.isSvg=s}}loadImage(t){var e=this;return(0,r.Z)((function*(){try{var i=yield e.document.createImage(t);e.image=i}catch(e){console.error('Error while loading image "'.concat(t,'":'),e)}e.loaded=!0}))()}loadSvg(t){var e=this;return(0,r.Z)((function*(){var i=Ut.exec(t);if(i){var r=i[5];"base64"===i[4]?e.image=atob(r):e.image=decodeURIComponent(r)}else try{var s=yield e.document.fetch(t),n=yield s.text();e.image=n}catch(e){console.error('Error while loading image "'.concat(t,'":'),e)}e.loaded=!0}))()}renderChildren(t){var{document:e,image:i,loaded:r}=this,s=this.getAttribute("x").getPixels("x"),n=this.getAttribute("y").getPixels("y"),a=this.getStyle("width").getPixels("x"),h=this.getStyle("height").getPixels("y");if(r&&i&&a&&h){if(t.save(),t.translate(s,n),this.isSvg){var o=e.canvg.forkString(t,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:a,scaleHeight:h});o.document.documentElement.parent=this,o.render()}else{var l=this.image;e.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:a,desiredWidth:l.width,height:h,desiredHeight:l.height}),this.loaded&&(void 0===l.complete||l.complete)&&t.drawImage(l,0,0)}t.restore()}}getBoundingBox(){var t=this.getAttribute("x").getPixels("x"),e=this.getAttribute("y").getPixels("y"),i=this.getStyle("width").getPixels("x"),r=this.getStyle("height").getPixels("y");return new lt(t,e,t+i,e+r)}}class Ht extends gt{constructor(){super(...arguments),this.type="symbol"}render(t){}}class Wt{constructor(t){this.document=t,this.loaded=!1,t.fonts.push(this)}load(t,e){var i=this;return(0,r.Z)((function*(){try{var{document:r}=i,s=(yield r.canvg.parser.load(e)).getElementsByTagName("font");Array.from(s).forEach((e=>{var i=r.createElement(e);r.definitions[t]=i}))}catch(t){console.error('Error while loading font "'.concat(e,'":'),t)}i.loaded=!0}))()}}class qt extends rt{constructor(t,e,i){super(t,e,i),this.type="style",g(Array.from(e.childNodes).map((t=>t.textContent)).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")).split("}").forEach((e=>{var i=e.trim();if(i){var r=i.split("{"),s=r[0].split(","),n=r[1].split(";");s.forEach((e=>{var i=e.trim();if(i){var r=t.styles[i]||{};if(n.forEach((e=>{var i=e.indexOf(":"),s=e.substr(0,i).trim(),n=e.substr(i+1,e.length-i).trim();s&&n&&(r[s]=new F(t,s,n))})),t.styles[i]=r,t.stylesSpecificity[i]=V(i),"@font-face"===i){var s=r["font-family"].getString().replace(/"|'/g,"");r.src.getString().split(",").forEach((e=>{if(e.indexOf('format("svg")')>0){var i=m(e);i&&new Wt(t).load(s,i)}}))}}}))}}))}}qt.parseExternalUrl=m;class Gt extends gt{constructor(){super(...arguments),this.type="use"}setContext(t){super.setContext(t);var e=this.getAttribute("x"),i=this.getAttribute("y");e.hasValue()&&t.translate(e.getPixels("x"),0),i.hasValue()&&t.translate(0,i.getPixels("y"))}path(t){var{element:e}=this;e&&e.path(t)}renderChildren(t){var{document:e,element:i}=this;if(i){var r=i;if("symbol"===i.type&&((r=new mt(e,null)).attributes.viewBox=new F(e,"viewBox",i.getAttribute("viewBox").getString()),r.attributes.preserveAspectRatio=new F(e,"preserveAspectRatio",i.getAttribute("preserveAspectRatio").getString()),r.attributes.overflow=new F(e,"overflow",i.getAttribute("overflow").getString()),r.children=i.children,i.styles.opacity=new F(e,"opacity",this.calculateOpacity())),"svg"===r.type){var s=this.getStyle("width",!1,!0),n=this.getStyle("height",!1,!0);s.hasValue()&&(r.attributes.width=new F(e,"width",s.getString())),n.hasValue()&&(r.attributes.height=new F(e,"height",n.getString()))}var a=r.parent;r.parent=this,r.render(t),r.parent=a}}getBoundingBox(t){var{element:e}=this;return e?e.getBoundingBox(t):null}elementTransform(){var{document:t,element:e}=this;return it.fromElement(t,e)}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}function $t(t,e,i,r,s,n){return t[i*r*4+4*e+n]}function Qt(t,e,i,r,s,n,a){t[i*r*4+4*e+n]=a}function Zt(t,e,i){return t[e]*i}function Jt(t,e,i,r){return e+Math.cos(t)*i+Math.sin(t)*r}class Kt extends rt{constructor(t,e,i){super(t,e,i),this.type="feColorMatrix";var r=p(this.getAttribute("values").getString());switch(this.getAttribute("type").getString("matrix")){case"saturate":var s=r[0];r=[.213+.787*s,.715-.715*s,.072-.072*s,0,0,.213-.213*s,.715+.285*s,.072-.072*s,0,0,.213-.213*s,.715-.715*s,.072+.928*s,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var n=r[0]*Math.PI/180;r=[Jt(n,.213,.787,-.213),Jt(n,.715,-.715,-.715),Jt(n,.072,-.072,.928),0,0,Jt(n,.213,-.213,.143),Jt(n,.715,.285,.14),Jt(n,.072,-.072,-.283),0,0,Jt(n,.213,-.213,-.787),Jt(n,.715,-.715,.715),Jt(n,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1]}this.matrix=r,this.includeOpacity=this.getAttribute("includeOpacity").hasValue()}apply(t,e,i,r,s){for(var{includeOpacity:n,matrix:a}=this,h=t.getImageData(0,0,r,s),o=0;o<s;o++)for(var l=0;l<r;l++){var u=$t(h.data,l,o,r,0,0),g=$t(h.data,l,o,r,0,1),c=$t(h.data,l,o,r,0,2),d=$t(h.data,l,o,r,0,3),p=Zt(a,0,u)+Zt(a,1,g)+Zt(a,2,c)+Zt(a,3,d)+Zt(a,4,1),y=Zt(a,5,u)+Zt(a,6,g)+Zt(a,7,c)+Zt(a,8,d)+Zt(a,9,1),f=Zt(a,10,u)+Zt(a,11,g)+Zt(a,12,c)+Zt(a,13,d)+Zt(a,14,1),m=Zt(a,15,u)+Zt(a,16,g)+Zt(a,17,c)+Zt(a,18,d)+Zt(a,19,1);n&&(p=0,y=0,f=0,m*=d/255),Qt(h.data,l,o,r,0,0,p),Qt(h.data,l,o,r,0,1,y),Qt(h.data,l,o,r,0,2,f),Qt(h.data,l,o,r,0,3,m)}t.clearRect(0,0,r,s),t.putImageData(h,0,0)}}class te extends rt{constructor(){super(...arguments),this.type="mask"}apply(t,e){var{document:i}=this,r=this.getAttribute("x").getPixels("x"),s=this.getAttribute("y").getPixels("y"),n=this.getStyle("width").getPixels("x"),a=this.getStyle("height").getPixels("y");if(!n&&!a){var h=new lt;this.children.forEach((e=>{h.addBoundingBox(e.getBoundingBox(t))})),r=Math.floor(h.x1),s=Math.floor(h.y1),n=Math.floor(h.width),a=Math.floor(h.height)}var o=this.removeStyles(e,te.ignoreStyles),l=i.createCanvas(r+n,s+a),u=l.getContext("2d");i.screen.setDefaults(u),this.renderChildren(u),new Kt(i,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(u,0,0,r+n,s+a);var g=i.createCanvas(r+n,s+a),c=g.getContext("2d");i.screen.setDefaults(c),e.render(c),c.globalCompositeOperation="destination-in",c.fillStyle=u.createPattern(l,"no-repeat"),c.fillRect(0,0,r+n,s+a),t.fillStyle=c.createPattern(g,"no-repeat"),t.fillRect(0,0,r+n,s+a),this.restoreStyles(e,o)}render(t){}}te.ignoreStyles=["mask","transform","clip-path"];var ee=()=>{};class ie extends rt{constructor(){super(...arguments),this.type="clipPath"}apply(t){var{document:e}=this,i=Reflect.getPrototypeOf(t),{beginPath:r,closePath:s}=t;i&&(i.beginPath=ee,i.closePath=ee),Reflect.apply(r,t,[]),this.children.forEach((r=>{if(void 0!==r.path){var n=void 0!==r.elementTransform?r.elementTransform():null;n||(n=it.fromElement(e,r)),n&&n.apply(t),r.path(t),i&&(i.closePath=s),n&&n.unapply(t)}})),Reflect.apply(s,t,[]),t.clip(),i&&(i.beginPath=r,i.closePath=s)}render(t){}}class re extends rt{constructor(){super(...arguments),this.type="filter"}apply(t,e){var{document:i,children:r}=this,s=e.getBoundingBox(t);if(s){var n=0,a=0;r.forEach((t=>{var e=t.extraFilterDistance||0;n=Math.max(n,e),a=Math.max(a,e)}));var h=Math.floor(s.width),o=Math.floor(s.height),l=h+2*n,u=o+2*a;if(!(l<1||u<1)){var g=Math.floor(s.x),c=Math.floor(s.y),d=this.removeStyles(e,re.ignoreStyles),p=i.createCanvas(l,u),y=p.getContext("2d");i.screen.setDefaults(y),y.translate(-g+n,-c+a),e.render(y),r.forEach((t=>{"function"==typeof t.apply&&t.apply(y,0,0,l,u)})),t.drawImage(p,0,0,l,u,g-n,c-a,l,u),this.restoreStyles(e,d)}}}render(t){}}re.ignoreStyles=["filter","transform","clip-path"];class se extends rt{constructor(t,e,i){super(t,e,i),this.type="feDropShadow",this.addStylesFromStyleDefinition()}apply(t,e,i,r,s){}}class ne extends rt{constructor(){super(...arguments),this.type="feMorphology"}apply(t,e,i,r,s){}}class ae extends rt{constructor(){super(...arguments),this.type="feComposite"}apply(t,e,i,r,s){}}class he extends rt{constructor(t,e,i){super(t,e,i),this.type="feGaussianBlur",this.blurRadius=Math.floor(this.getAttribute("stdDeviation").getNumber()),this.extraFilterDistance=this.blurRadius}apply(t,e,i,r,s){var{document:n,blurRadius:a}=this,h=n.window?n.window.document.body:null,l=t.canvas;l.id=n.getUniqueId(),h&&(l.style.display="none",h.appendChild(l)),(0,o.vR)(l,e,i,r,s,a),h&&h.removeChild(l)}}class oe extends rt{constructor(){super(...arguments),this.type="title"}}class le extends rt{constructor(){super(...arguments),this.type="desc"}}var ue={svg:mt,rect:vt,circle:xt,ellipse:bt,line:St,polyline:Pt,polygon:wt,path:ct,pattern:At,marker:Ct,defs:Tt,linearGradient:Mt,radialGradient:kt,stop:Ot,animate:Nt,animateColor:Dt,animateTransform:zt,font:Bt,"font-face":Lt,"missing-glyph":It,glyph:dt,text:pt,tspan:yt,tref:Rt,a:Ft,textPath:jt,image:Yt,g:Vt,symbol:Ht,style:qt,use:Gt,mask:te,clipPath:ie,filter:re,feDropShadow:se,feMorphology:ne,feComposite:ae,feColorMatrix:Kt,feGaussianBlur:he,title:oe,desc:le};function ge(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,r)}return i}function ce(){return ce=(0,r.Z)((function*(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=document.createElement("img");return e&&(i.crossOrigin="Anonymous"),new Promise(((e,r)=>{i.onload=()=>{e(i)},i.onerror=(t,e,i,s,n)=>{r(n)},i.src=t}))})),ce.apply(this,arguments)}class de{constructor(t){var{rootEmSize:e=12,emSize:i=12,createCanvas:r=de.createCanvas,createImage:s=de.createImage,anonymousCrossOrigin:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.canvg=t,this.definitions={},this.styles={},this.stylesSpecificity={},this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=t.screen,this.rootEmSize=e,this.emSize=i,this.createCanvas=r,this.createImage=this.bindCreateImage(s,n),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}bindCreateImage(t,e){return"boolean"==typeof e?(i,r)=>t(i,"boolean"==typeof r?r:e):t}get window(){return this.screen.window}get fetch(){return this.screen.fetch}get ctx(){return this.screen.ctx}get emSize(){var{emSizeStack:t}=this;return t[t.length-1]}set emSize(t){var{emSizeStack:e}=this;e.push(t)}popEmSize(){var{emSizeStack:t}=this;t.pop()}getUniqueId(){return"canvg".concat(++this.uniqueId)}isImagesLoaded(){return this.images.every((t=>t.loaded))}isFontsLoaded(){return this.fonts.every((t=>t.loaded))}createDocumentElement(t){var e=this.createElement(t.documentElement);return e.root=!0,e.addStylesFromStyleDefinition(),this.documentElement=e,e}createElement(t){var e=t.nodeName.replace(/^[^:]+:/,""),i=de.elementTypes[e];return void 0!==i?new i(this,t):new st(this,t)}createTextNode(t){return new ft(this,t)}setViewBox(t){this.screen.setViewBox(function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ge(Object(i),!0).forEach((function(e){(0,s.Z)(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ge(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({document:this},t))}}function pe(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,r)}return i}function ye(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?pe(Object(i),!0).forEach((function(e){(0,s.Z)(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):pe(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}de.createCanvas=function(t,e){var i=document.createElement("canvas");return i.width=t,i.height=e,i},de.createImage=function(t){return ce.apply(this,arguments)},de.elementTypes=ue;class fe{constructor(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.parser=new G(i),this.screen=new H(t,i),this.options=i;var r=new de(this,i),s=r.createDocumentElement(e);this.document=r,this.documentElement=s}static from(t,e){var i=arguments;return(0,r.Z)((function*(){var r=i.length>2&&void 0!==i[2]?i[2]:{},s=new G(r),n=yield s.parse(e);return new fe(t,n,r)}))()}static fromString(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=new G(i).parseFromString(e);return new fe(t,r,i)}fork(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return fe.from(t,e,ye(ye({},this.options),i))}forkString(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return fe.fromString(t,e,ye(ye({},this.options),i))}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}render(){var t=arguments,e=this;return(0,r.Z)((function*(){var i=t.length>0&&void 0!==t[0]?t[0]:{};e.start(ye({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},i)),yield e.ready(),e.stop()}))()}start(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{documentElement:e,screen:i,options:r}=this;i.start(e,ye(ye({enableRedraw:!0},r),t))}stop(){this.screen.stop()}resize(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.documentElement.resize(t,e,i)}}}}]);
Binary file
Binary file