diff --git a/tests/Gistr Demo/.obsidian/community-plugins.json b/tests/Gistr Demo/.obsidian/community-plugins.json index 4eab0f97..58965b4d 100644 --- a/tests/Gistr Demo/.obsidian/community-plugins.json +++ b/tests/Gistr Demo/.obsidian/community-plugins.json @@ -1,7 +1,7 @@ [ "obsidian42-brat", - "gistr", "obsidian-style-settings", "obsidian-minimal-settings", - "obsidian-link-embed" + "obsidian-link-embed", + "gistr" ] \ No newline at end of file diff --git a/tests/Gistr Demo/.obsidian/plugins/gistr/data.json b/tests/Gistr Demo/.obsidian/plugins/gistr/data.json index ba846dcd..2a2fa40a 100644 --- a/tests/Gistr Demo/.obsidian/plugins/gistr/data.json +++ b/tests/Gistr Demo/.obsidian/plugins/gistr/data.json @@ -24,6 +24,7 @@ "gh_clr_tx_light": "#2A2626", "gh_clr_tx_dark": "#CAD3F5", "gh_opacity": 1, + "ge_enable_ribbon_icons": false, "sy_enable_ribbon_icons": true, "sy_enable_autoupdate": true, "sy_enable_autosave": false, @@ -33,7 +34,8 @@ "sy_save_list_showall": false, "sy_save_list_datetime": "MM.DD.YYYY h:m:s a", "sy_save_duration": 15, - "context_sorting": [], + "ge_contextmenu_sorting": [], "portals": {}, - "uuid": "" + "uuid": "", + "context_sorting": [] } \ No newline at end of file diff --git a/tests/Gistr Demo/.obsidian/plugins/gistr/main.js b/tests/Gistr Demo/.obsidian/plugins/gistr/main.js index 6dcebeeb..877fd0da 100644 --- a/tests/Gistr Demo/.obsidian/plugins/gistr/main.js +++ b/tests/Gistr Demo/.obsidian/plugins/gistr/main.js @@ -1,13 +1,13 @@ /** - * @name: gistr v1.4.6 + * @name: gistr v1.6.1 * @author: Aetherinox * @url: https://github.com/Aetherinox/obsidian-gistr.git * @copyright: (c) 2024 Aetherinox * @license: MIT - * @build: 2024-03-23T17:41:40.000Z + * @build: 2024-03-30T23:39:48.000Z * @guid: 0a7f5dc4-b2fa-5064-9e54-f6e17fd14273 - * @uuid: 535cd4d3-cf1a-54a9-bd4b-adc460934c9a + * @uuid: 76fd2cca-57f0-524a-b050-c652ea9b4253 */ -Object.defineProperty(exports,"__esModule",{value:!0});var e=require("obsidian"),t=require("yaml"),s=require("crypto");function r(e,t,s,r){return new(s||(s=Promise))(((n,i)=>{function o(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof s?t:new s((e=>{e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;const n={keyword:"gistr",firststart:!0,css_og:"",css_gh:"",theme:"Light",blk_pad_t:16,blk_pad_b:19,textwrap:"Enabled",notitime:10,ge_enable_updatenoti:!0,sy_clr_lst_icon:"#757575E6",og_clr_bg_light:"#CBCBCB",og_clr_bg_dark:"#121315",og_clr_sb_light:"#BA4956",og_clr_sb_dark:"#4960ba",og_clr_tx_light:"#2A2626",og_clr_tx_dark:"#CAD3F5",og_opacity:1,gh_clr_bg_light:"#E5E5E5",gh_clr_bg_dark:"#121315",gh_clr_sb_light:"#BA4956",gh_clr_sb_dark:"#BA496A",gh_clr_tx_light:"#2A2626",gh_clr_tx_dark:"#CAD3F5",gh_opacity:1,ge_enable_ribbon_icons:!1,sy_enable_ribbon_icons:!0,sy_enable_autoupdate:!0,sy_enable_autosave:!1,sy_enable_autosave_strict:!1,sy_enable_autosave_notice:!1,sy_add_frontmatter:!1,sy_save_list_showall:!1,sy_save_list_datetime:"MM.DD.YYYY h:m:s a",sy_save_duration:15,ge_contextmenu_sorting:[],portals:{},uuid:""};var i={base_underdev_title:"Feature Under Development",base_underdev_msg:'I am currently working with the developer of OpenGist to make minor changes to how OpenGist pastes appear, including moving the "view raw" button to the bottom so that Obsidian\'s edit button does not overlap.',base_opt_enabled:"Enabled",base_opt_disabled:"Disabled",base_theme_light:"Light",base_theme_dark:"Dark",base_time_am:"AM",base_time_pm:"PM",base_component_reset:"Reset to Default",base_debug_loading:"Loading {0} v{1} [ {2} ]",base_debug_updater_1:"{0} Update Check",base_debug_updater_2:"{0} {1}",base_context_nofocus:"Obsidian does not have focus, please open a file",base_reload_notice:"Successfully reloaded Gistr",cfg_context_gist_public:"Save Gist (Github Public)",cfg_context_gist_secret:"Save Gist (Github Secret)",cfg_context_gist_copy:"Copy Gist URL",cfg_context_gist_reload:"Reload Gistr",cfg_modal_desc:"Gistr allows you to embed gists directly from Github and Opengist. You can also turn your notes into gists which can be updated manually, or monitored with autosave. For a detailed set of examples, view the demo vault in the support section below.",cfg_modal_expand:"Expand",cfg_tab_ge_title:"Global",cfg_tab_ge_header:"These settings affect all aspects of this plugin, including both Opengist and Github. If you change the trigger keyword, ensure you go back through your existing gist snippets and change the keyword at the top of each codeblock; otherwise embedded gists will not appear.",cfg_tab_sy_title:"Gist Save & Sync",cfg_tab_sy_header:"These settings allow you to create gists from your notes. The contents of your notes will be directly uploaded to Github under an existing account. You may also choose to create only new notes, or manage new and existing.",cfg_tab_og_title:"OpenGist",cfg_tab_og_header:"Opengist is a self-hosted pastebin powered by Git. All snippets are stored in a Git repository and can be read and/or modified using standard Git commands, or with the web interface. It is similiar to GitHub Gist, but open-source and is self-hosted. OpenGist supports Windows, Linux, and MacOS.",cfg_tab_gh_title:"Github",cfg_tab_gh_header:"Github Gists let you store and distribute code snippets without setting up a full-fledged repository. Store snippets such as strings, bash scripts, markdown, text files, and other small pieces of data.",cfg_tab_po_title:"Portal (Developer)",cfg_tab_po_header:"These settings display currently registered portals for Gistr.",cfg_tab_sp_title:"Support",cfg_tab_ge_keyword_name:"Trigger keyword",cfg_tab_ge_keyword_desc:"Word to use inside codeblocks to designate as a portal for showing gists",cfg_tab_ge_theme_name:"Theme",cfg_tab_ge_theme_desc:'This determines what color scheme will be used for gists. You can however, customize the colors in the Github and OpenGist categories below.

Note: When this is changed, place your cursor in the codeblock and then leave the codeblock to refresh it. Automatic refreshing only works in reading mode',cfg_tab_ge_wrap_name:"Text wrapping",cfg_tab_ge_wrap_desc:"If enabled, text will wrap to the next line. If disabled, you will see a horizontal scrollbar. This does not include gists that have no spaces anywhere in the body.",cfg_tab_ge_noti_dur_name:"Notification duration",cfg_tab_ge_noti_dur_desc:'How long a notification will display for (in seconds). Set to 0 to keep notification up until user dismisses it.',cfg_tab_ge_noti_update_name:"Enable Gistr update notifications",cfg_tab_ge_noti_update_desc:'Enabled: When launching Obsidian, you will get a notification if a new version of Gistr is available. This includes beta releases not available to the public yet.

Disabled: You will not get any notifications alerting you to new Gistr updates. You must manually check or use the Obsidian plugin checker.

Note: This update notification includes beta releases of Gistr. The Obsidian plugin updater does not track beta.',cfg_tab_ge_tog_enable_ribbon_debug_name:"Enable refresh icon",cfg_tab_ge_tog_enable_ribbon_debug_desc:'Enabled: Adds a special icon to your top header ribbon which allows you to force all embedded gists to be refreshed.
This is useful when modifying the colors / settings for Gistr, since all codeblocks are cached and changes do not appear immediately. The button added to your ribbon will force-refresh all codeblocks and immediately show new changes.',cfg_tab_ge_tog_enable_ribbon_debug_tip:"",cfg_tab_og_cb_light_name:"Codeblock bg (Light)",cfg_tab_og_cb_light_desc:'Color for Github codeblock background color (Light Theme)',cfg_tab_og_cb_dark_name:"Codeblock bg (Dark)",cfg_tab_og_cb_dark_desc:'Color for Github codeblock background color (Dark Theme)',cfg_tab_og_sb_light_name:"Scrollbar track (Light)",cfg_tab_og_sb_light_desc:'Color for gist scrollbar track (Light Theme)',cfg_tab_og_sb_dark_name:"Scrollbar track (Dark)",cfg_tab_og_sb_dark_desc:'Color for gist scrollbar track (Dark Theme)',cfg_tab_og_tx_light_name:"Codeblock text (Light)",cfg_tab_og_tx_light_desc:'Color for codeblock text color (Light Theme)',cfg_tab_og_tx_dark_name:"Codeblock text (Dark)",cfg_tab_og_tx_dark_desc:'Color for codeblock text color (Dark Theme)',cfg_tab_og_opacity_name:"Codeblock opacity",cfg_tab_og_opacity_desc:"Total opacity for codeblock. Do not set this too low, or your codeblocks will be invisible",cfg_tab_og_pad_top_name:"Padding: top",cfg_tab_og_pad_top_desc:"Padding between gist codeblock header and code.",cfg_tab_og_pad_btm_name:"Padding: bottom",cfg_tab_og_pad_btm_desc:"Padding between gist codeblock and the bottom scrollbar.",cfg_tab_og_css_name:"Custom CSS",cfg_tab_og_css_desc:"This textarea allows you to enter custom CSS properties to override existing colors.",cfg_tab_og_css_pholder:"Paste CSS here",cfg_tab_gh_cb_light_name:"Codeblock bg (Light)",cfg_tab_gh_cb_light_desc:'Color for Opengist codeblock background color (Light Theme)',cfg_tab_gh_cb_dark_name:"Codeblock bg (Dark)",cfg_tab_gh_cb_dark_desc:'Color for Opengist codeblock background color (Dark Theme)',cfg_tab_gh_sb_light_name:"Scrollbar track (Light)",cfg_tab_gh_sb_light_desc:'Color for gist scrollbar track (Light Theme)',cfg_tab_gh_sb_dark_name:"Scrollbar track (Dark)",cfg_tab_gh_sb_dark_desc:'Color for gist scrollbar track (Dark Theme)',cfg_tab_gh_tx_light_name:"Codeblock text (Light)",cfg_tab_gh_tx_light_desc:'Color for codeblock text color (Light Theme)',cfg_tab_gh_tx_dark_name:"Codeblock text (Dark)",cfg_tab_gh_tx_dark_desc:'Color for codeblock text color (Dark Theme)',cfg_tab_gh_opacity_name:"Codeblock opacity",cfg_tab_gh_opacity_desc:"Total opacity for codeblock. Do not set this too low, or your codeblocks will be invisible",cfg_tab_gh_css_name:"Custom CSS",cfg_tab_gh_css_desc:"This textarea allows you to enter custom CSS properties to override existing colors.",cfg_tab_gh_css_pholder:"Paste CSS here",cfg_tab_gh_pat_name:"Personal access token",cfg_tab_gh_pat_desc:"The personal access token (PAT) generated on Github.com which allows you to write gists from your Obsidian vault to Github gist.",cfg_tab_gh_pat_pholder:"githubpat_XXXXXX",cfg_tab_gh_pat_btn_tip_state_show:"Show token",cfg_tab_gh_pat_btn_tip_state_hide:"Hide token",cfg_tab_gh_pat_desc_l1:'This token allows you to authenticate with the GitHub API.
Create Token: here',cfg_tab_gh_pat_desc_l2:'For this to function with secret gists, select "All repositories" or "Only select repositories" from the dropdown on the Github Token page. The token must have at least the following permissions:',cfg_tab_gh_pat_perm_1:'Account Permissions ► Gists                                                                          Read-and-write',cfg_tab_gh_pat_perm_2:'Repository Permissions ► Pull Requests                                      Read-only',cfg_tab_gh_pat_perm_3:'Repository Permissions ► Contents                                                    Read-only',cfg_tab_gh_pat_perm_4:'Repository Permissions ► Issues                                                              Read-only',cfg_tab_gh_pat_footer:"Github icon to the right will turn into a checkmark when you've entered a valid token.",cfg_tab_gh_pat_help:'What is this for? Read the docs',cfg_tab_gh_pat_url_btn:"https://github.com/settings/tokens?type=beta",cfg_tab_gh_pat_ok_btn_tip:"Valid Github API Token",cfg_tab_gh_pat_bad_btn_tip:"Invalid Github API Token entered\n\nClick here to generate one",cfg_tab_gh_pat_invalid_btn_tip:"Github API token is not valid, ensure you type it correctly\n\nClick here to generate one",cfg_tag_gh_pat_notice_msg_success:"Gistr has detected a valid Github personal access token which has been saved",cfg_tag_gh_pat_notice_msg_cleared:"Personal access token cleared",cfg_tab_gh_pat_notice_type_fine:"Fine-Grained Github Token Detected",cfg_tab_gh_pat_notice_type_classic:"Classic Github Token Detected",cfg_tab_su_desc:"The following buttons are associated to useful resources for this plugin.",cfg_tab_su_gs_name:"Introduction",cfg_tab_su_gs_desc:"View brief introduction to getting started with this plugin",cfg_tab_su_gs_btn:"Open",cfg_tab_su_repo_label:"Plugin repo",cfg_tab_su_repo_url:"https://github.com/Aetherinox/obsidian-gistr",cfg_tab_su_repo_btn:"View",cfg_tab_su_vault_label:"Plugin demo vault",cfg_tab_su_vault_url:"https://github.com/Aetherinox/obsidian-gistr/tree/main/tests/gistr-vault",cfg_tab_su_vault_btn:"View",cfg_tab_su_ogrepo_label:"OpenGist: download",cfg_tab_su_ogrepo_url:"https://github.com/thomiceli/opengist/releases",cfg_tab_su_ogrepo_btn:"View",cfg_tab_su_ogdocs_label:"OpenGist: docs",cfg_tab_su_ogdocs_url:"https://github.com/thomiceli/opengist/blob/master/docs/index.md",cfg_tab_su_ogdocs_btn:"View",cfg_tab_su_ogdemo_label:"OpenGist: demo",cfg_tab_su_ogdemo_url:"https://opengist.thomice.li/all",cfg_tab_su_ogdemo_btn:"View",cfg_tab_su_gist_label:"Github gist",cfg_tab_su_gist_url:"https://gist.github.com/",cfg_tab_su_gist_btn:"View",cfg_tab_su_ver_cur_name:"Current version",cfg_tab_su_ver_cur_desc:"Current running version of Gistr",cfg_tab_su_guid_cur_name:"GUID",cfg_tab_su_guid_cur_desc:"Gistr plugin release",cfg_tab_su_guid_btn_tip:"Copy to clipboard",cfg_tab_su_guid_notice:"Copied Gistr GUID to clipboard\n\n{0}",cfg_tab_su_uuid_cur_name:"UUID",cfg_tab_su_uuid_cur_desc:"Unique id for your current running release of Gistr",cfg_tab_su_uuid_btn_tip:"Copy to clipboard",cfg_tab_su_uuid_notice:"Copied Gistr release UUID to clipboard\n\n{0}",cfg_tab_su_ver_stable:"Latest stable release ",cfg_tab_su_ver_beta:"Latest beta release ",cfg_tab_su_ver_connection_issues:"Server communication failed",cfg_tab_su_ver_status_checking:"Checking for newer version of Gistr",cfg_tab_su_ver_status_checking_btn_tip:"Checking for newer version of Gistr",cfg_tab_su_ver_status_updated_btn_tip:"You are running the latest version of Gistr",cfg_tab_su_ver_status_new_stable_btn_tip:"A newer stable release of Gistr is available",cfg_tab_su_ver_status_new_beta_btn_tip:"A newer beta release of Gistr is available",cfg_tab_su_ver_status_error_btn_tip:"Could not communicate with the gistr server, retrying later",cfg_tab_su_ver_releases:"https://github.com/Aetherinox/obsidian-gistr/releases",cfg_tab_po_create_name:"Create Portal",cfg_tab_po_create_desc:"Created a new registered portal",cfg_tab_po_create_btn:"Create",cfg_tab_po_list_desc:"List of portals registered:",cfg_tab_po_list_none_title:"No Portals Found",cfg_tab_po_list_none_msg:"No created portals can be found. Click the **Create Portal** button at the top of this settings interface to create your first",cfg_po_edit_url_name:"URL",cfg_po_edit_url_desc:"Direct path URL which leads to your assigned website portal",cfg_po_edit_url_hold:"https://gist.github.com/username/XXXXXXXXX",cfg_po_edit_name_name:"Name",cfg_po_edit_name_desc:"Name assigned to the portal window. This can be used in a codeblock to call the name of the portal using a YAML structure.",cfg_po_edit_name_hold:"Portal Name",cfg_po_edit_icon_name:"Icon",cfg_po_edit_icon_desc:"Icon displayed in the portal",cfg_po_edit_icon_hold:"Leave blank to auto-detect",cfg_po_edit_agent_name:"User agent",cfg_po_edit_agent_desc:"Leave this alone if you are unsure what it does",cfg_po_edit_agent_hold:"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0/HBpt3US8-18",cfg_po_edit_dock_name:"Dock / Position",cfg_po_edit_dock_desc:"Sets the position for the page",cfg_po_edit_pin_name:"Pin to menu",cfg_po_edit_pin_desc:"If enabled: Portal will be pinned to the left bar",cfg_po_edit_pkey_name:"Profile key",cfg_po_edit_pkey_desc:"Portals with the same profile key will share cookies & storage",cfg_po_edit_pkey_hold:"",cfg_po_edit_zoom_name:"Zoom",cfg_po_edit_zoom_desc:"Allows a webpage to be zoomed in or out on load",cfg_po_edit_css_name:"CSS",cfg_po_edit_css_desc:"Override CSS / stylesheet for window",cfg_po_edit_css_hold:"No custom CSS provided",cfg_po_edit_js_name:"JS",cfg_po_edit_js_desc:"Override JS / javascript for window",cfg_po_edit_js_hold:"No custom Javascript provided",cfg_po_edit_advtoggle_name:"Advanced Settings",cfg_po_edit_advtoggle_desc:"Make advanced menu options appear",cfg_po_button_name:"Portal Actions",cfg_po_button_desc:"Save or update settings for your configured portals",cfg_po_button_opt_create:"Create Portal",cfg_po_button_opt_update:"Update Portal",po_url_missing:"Missing url parameter",po_notice_restart_obsidian:"Change(s) will take effect after you restart Obsidian",po_notice_portal_not_found:"Portal not found",cfg_tab_sy_list_save_showall_name:"Gist save list: Show All Saves",cfg_tab_sy_list_save_showall_desc:'This setting effects how the gist save list displays saved gists.

Enabled: When saving an existing gist, the suggestion box will display ALL saves for that note in the same list; both public and secret.

Disabled: Public and secret gist saves will be separated when being displayed in the existing gist save list.',cfg_tab_sy_list_icon_name:"Gist save list: Icon color",cfg_tab_sy_list_icon_desc:"Color for icon in gist save list",cfg_tab_sy_list_datetime_name:"Gist save list: Datetime format",cfg_tab_sy_list_datetime_desc:'Defines what format the date and time will display as.
Datetime Format Options: view here',cfg_tab_sy_tog_enable_ribbon_name:"Enable ribbon icons",cfg_tab_sy_tog_enable_ribbon_desc:'Enabled: Adds Save Public / Secret Gist icons to left-side ribbon in Obsidian.

Disabled: You will only be able to access the save menu options from your right-click menu, or the Obsidian command palette',cfg_tab_sy_tog_enable_ribbon_tip:"",cfg_tab_sy_tog_allow_gist_updates_name:"Allow updating gists",cfg_tab_sy_tog_allow_gist_updates_desc:'Enabled: After you initially create a new gist, the note can be updated with newer revisions.

Disabled: Gists can only be created; no updates are allowed.

To update a gist after enabling this setting, right-click on the note, or open the Obsidian command palette and select Save Gist',cfg_tab_sy_tog_allow_gist_updates_tip:"",cfg_tab_sy_tog_autosave_enable_name:"Enable autosave",cfg_tab_sy_tog_autosave_enable_desc:'Enabled: This will allow gists to be updated once they are created. It will also enable autosaving which will detect new changes and push them.

Disabled: You will only be able to create gists by manually doing so; there will be no way to update them.

If you wish to keep this disabled, you can create gists by right-clicking in the note and selecting Save Gist. Or opening your command palette and selecting the save option from there.',cfg_tab_sy_tog_autosave_enable_tip:"",cfg_tab_sy_tog_autosave_strict_name:"Enable autosave strict saving",cfg_tab_sy_tog_autosave_strict_desc:'Enabled: Your notes will be saved to the gist service precisely on time every {0} seconds, whether you are still typing or not.

Disabled: Time until save will not start until you have finished typing in that note. If you continue typing, the saving countdown will not start until your final key is pressed.

Autosave duration can be modified further down in these settings.',cfg_tab_sy_tog_autosave_strict_tip:"",cfg_tab_sy_tog_autosave_noti_name:"Enable autosave notices",cfg_tab_sy_tog_autosave_noti_desc:'Each time your note is saved automatically, a notice will appear on-screen informing you of the action. This only works if Autosave is enabled.',cfg_tab_sy_tog_autosave_noti_tip:"",cfg_tab_sy_num_save_dur_name:"Autosave duration",cfg_tab_sy_num_save_dur_desc:'How often autosave will execute in seconds. Set this to a fair amount so that the calls aren\'t being ran excessively to the gist API server (Github or OpenGist).

The save countdown timer will begin shortly after you stop typing.

If you wish to change this to save precisely every {0} seconds, enable the setting Autosave Strict Saving located above.',cfg_tab_sy_tog_inc_fm_name:"Include frontmatter",cfg_tab_sy_tog_inc_fm_desc:'When saving a note as a new gist, frontmatter will be added to the top of your note with information about the gist.

Enabled: the note will be cleaned before it is pushed to the gist service and no frontmatter fields will be present in the online version.

Disabled: frontmatter added to your notes will be included when your note is pushed to a gist service.

Frontmatter can be found at the very top of each note, in-between `---` ',cfg_tab_sy_tog_inc_fm_tip:"Frontmatter starts with three hyphens `---`",gist_upload_req_allowupload:'Must enable "Allow Uploading Gists" in the Gistr settings before you can use this command.',gist_upload_no_active_file:"No active file present. Open a note in Obsidian before continuing.",gist_copy_fail_notagist:"No URL to copy. You must turn your note into a gist first.",gist_copy_success_file:"Copied {0} URL to your clipboard",gist_copy_success:"Copied gist URL to clipboard.",gist_upload_fail_api:"GitHub API error: {0}",gist_upload_success:"File {0} has been updated successfully to your gist service.",gist_status_operational_raw:"operational",gist_status_connecting:"connecting ...",gist_status_connected:"Connected to API ...",gist_status_no_api:"Github token missing, no connection",gist_status_no_api_btn_tip:"You must create and specify a Github API token.\n\nAborting connection",gist_status_noconnection:"Failed to communicate with Github",gist_status_degraded_performance:"Degraded Performance",gist_status_partial_outage:"Partial Outage",gist_status_major_outage:"Major Outage",gist_status_issues:"service issues",gist_status_connecting_btn_tip:"Connecting to Github ...",gist_status_success_btn_tip:"Connected to Github API",gist_status_issues_btn_tip:"Github API is currently experiencing issues\n\nClick to view details.",gist_btn_create_new:"Create New Gist",gist_not_found:"Could not locate the specified Gist. Did you possibly delete it from Github?\n\nTo update this note as a new gist, remove the frontmatter text at the top of the note.",gs_base_header:"This plugin allows you to integrate both OpenGist and Github Gist pastes within your Obsidian notes. To use this plugin, you can either create a new Github gist, or setup your own OpenGist server. OpenGist is free, and takes only minutes to configure.",gs_og_btn_repo:"Download OpenGist",gs_og_btn_docs:"OpenGist Docs",gs_og_sub_1:"Once you install and set up OpenGist, you can sign in to your OpenGist website and create your first Gist. After your Gist is created, return to your Obsidian node, and integrate your Gist into your note using code similar to the following:",gs_og_name:"OpenGist integration",gs_og_desc:"OpenGist supports Windows, Linux, MacOS, and Docker. To download and set up OpenGist, click below.",gs_gh_name:"Github integration",gs_gh_desc:"To paste a Github Gist into your note, use a command similar to the following examples:",gs_btn_settings_open:"Open Settings",gs_btn_close:"Close",gh_status_error_api:"Github API Error: {0}",ver_update_stable:"An update is available for the Gistr plugin. Update to check out the latest features!",ver_update_stable_dn_title:"{0} Update Available ► Stable",ver_update_stable_dn_msg:"New stable release available for Gistr plugin.\n\n{0} ► {1}",ver_update_beta:"A new beta release is available for the Gistr plugin. Update to check out the latest features coming to stable!",ver_update_beta_dn_title:"{0} Update Available ► Beta",ver_update_beta_dn_msg:"New beta release available for Gistr plugin.\n\n{0} ► {1}",ver_url:"https://raw.githubusercontent.com/Aetherinox/obsidian-gistr/{0}/package.json",pickr_dialog:"Color Picker",pickr_swatch:"Color Swatch",pickr_toggle:"Pick Color",pickr_last:"Use Last Color",pickr_save:"Save",pickr_cancel:"Cancel",pickr_clear:"Clear",pickr_restore_default_btn_tip:"Restore default color",pickr_dev_unknown:"Gistr: Unknown color format: {0}",err_gist_token_missing:"Github API token missing. Open the Gistr plugin settings, click the Github tab, and enter your token. Instructions are found on the settings page.",err_gist_loading_fail_name:"⚠️ Gistr: Failed to load the specified gist:",err_gist_loading_fail_resp:"{0}",err_gist_loading_fail_detail:"Could not load a valid Javascript from gist url: {0}",err_gist_loading_fail_url:"Could not find gist id -- Make sure correct URL is specified. {0}",lst_repotype_pub:"Public",lst_repotype_pri:"Secret"};const o={en:i}[e.moment.locale()];function a(t,...s){return o||console.error("Gistr language not found",e.moment.locale()),(o&&o[t]||i[t]).replace(/{(\d+)}/g,((e,t)=>{const r=s[t];return void 0!==r?r:e}))}var c,l,u,d;(e=>{e.HEX="HEX",e.RGB="RGB",e.HSL="HSL",e.CIELab="CIELab",e.CMYK="CMYK"})(c||(c={})),(e=>{e.ANALOGOUS="ANALOGOUS",e.COMPLEMENTARY="COMPLEMENTARY",e.SPLIT_COMPLEMENTARY="SPLIT_COMPLEMENTARY",e.TRIADIC="TRIADIC",e.TETRADIC="TETRADIC",e.SQUARE="SQUARE"})(l||(l={})),(e=>{e.ADDITIVE="ADDITIVE",e.SUBTRACTIVE="SUBTRACTIVE"})(u||(u={})),(e=>{e.black="#000000",e.silver="#C0C0C0",e.gray="#808080",e.white="#FFFFFF",e.maroon="#800000",e.red="#FF0000",e.purple="#800080",e.fuchsia="#FF00FF",e.green="#008000",e.lime="#00FF00",e.olive="#808000",e.yellow="#FFFF00",e.navy="#000080",e.blue="#0000FF",e.teal="#008080",e.aqua="#00FFFF",e.orange="#FFA500",e.aliceblue="#F0F8FF",e.antiquewhite="#FAEBD7",e.aquamarine="#7FFFD4",e.azure="#F0FFFF",e.beige="#F5F5DC",e.bisque="#FFE4C4",e.blanchedalmond="#FFEBCD",e.blueviolet="#8A2BE2",e.brown="#A52A2A",e.burlywood="#DEB887",e.cadetblue="#5F9EA0",e.chartreuse="#7FFF00",e.chocolate="#D2691E",e.coral="#FF7F50",e.cornflowerblue="#6495ED",e.cornsilk="#FFF8DC",e.crimson="#DC143C",e.cyan="#00FFFF",e.darkblue="#00008B",e.darkcyan="#008B8B",e.darkgoldenrod="#B8860B",e.darkgray="#A9A9A9",e.darkgreen="#006400",e.darkgrey="#A9A9A9",e.darkkhaki="#BDB76B",e.darkmagenta="#8B008B",e.darkolivegreen="#556B2F",e.darkorange="#FF8C00",e.darkorchid="#9932CC",e.darkred="#8B0000",e.darksalmon="#E9967A",e.darkseagreen="#8FBC8F",e.darkslateblue="#483D8B",e.darkslategray="#2F4F4F",e.darkslategrey="#2F4F4F",e.darkturquoise="#00CED1",e.darkviolet="#9400D3",e.deeppink="#FF1493",e.deepskyblue="#00BFFF",e.dimgray="#696969",e.dimgrey="#696969",e.dodgerblue="#1E90FF",e.firebrick="#B22222",e.floralwhite="#FFFAF0",e.forestgreen="#228B22",e.gainsboro="#DCDCDC",e.ghostwhite="#F8F8FF",e.gold="#FFD700",e.goldenrod="#DAA520",e.greenyellow="#ADFF2F",e.grey="#808080",e.honeydew="#F0FFF0",e.hotpink="#FF69B4",e.indianred="#CD5C5C",e.indigo="#4B0082",e.ivory="#FFFFF0",e.khaki="#F0E68C",e.lavender="#E6E6FA",e.lavenderblush="#FFF0F5",e.lawngreen="#7CFC00",e.lemonchiffon="#FFFACD",e.lightblue="#ADD8E6",e.lightcoral="#F08080",e.lightcyan="#E0FFFF",e.lightgoldenrodyellow="#FAFAD2",e.lightgray="#D3D3D3",e.lightgreen="#90EE90",e.lightgrey="#D3D3D3",e.lightpink="#FFB6C1",e.lightsalmon="#FFA07A",e.lightseagreen="#20B2AA",e.lightskyblue="#87CEFA",e.lightslategray="#778899",e.lightslategrey="#778899",e.lightsteelblue="#B0C4DE",e.lightyellow="#FFFFE0",e.limegreen="#32CD32",e.linen="#FAF0E6",e.magenta="#FF00FF",e.mediumaquamarine="#66CDAA",e.mediumblue="#0000CD",e.mediumorchid="#BA55D3",e.mediumpurple="#9370DB",e.mediumseagreen="#3CB371",e.mediumslateblue="#7B68EE",e.mediumspringgreen="#00FA9A",e.mediumturquoise="#48D1CC",e.mediumvioletred="#C71585",e.midnightblue="#191970",e.mintcream="#F5FFFA",e.mistyrose="#FFE4E1",e.moccasin="#FFE4B5",e.navajowhite="#FFDEAD",e.oldlace="#FDF5E6",e.olivedrab="#6B8E23",e.orangered="#FF4500",e.orchid="#DA70D6",e.palegoldenrod="#EEE8AA",e.palegreen="#98FB98",e.paleturquoise="#AFEEEE",e.palevioletred="#DB7093",e.papayawhip="#FFEFD5",e.peachpuff="#FFDAB9",e.peru="#CD853F",e.pink="#FFC0CB",e.plum="#DDA0DD",e.powderblue="#B0E0E6",e.rosybrown="#BC8F8F",e.royalblue="#4169E1",e.saddlebrown="#8B4513",e.salmon="#FA8072",e.sandybrown="#F4A460",e.seagreen="#2E8B57",e.seashell="#FFF5EE",e.sienna="#A0522D",e.skyblue="#87CEEB",e.slateblue="#6A5ACD",e.slategray="#708090",e.slategrey="#708090",e.snow="#FFFAFA",e.springgreen="#00FF7F",e.steelblue="#4682B4",e.tan="#D2B48C",e.thistle="#D8BFD8",e.tomato="#FF6347",e.turquoise="#40E0D0",e.violet="#EE82EE",e.wheat="#F5DEB3",e.whitesmoke="#F5F5F5",e.yellowgreen="#9ACD32",e.rebeccapurple="#663399"})(d||(d={}));const p=Object.keys(d),g={HEX:["R","G","B","A"],RGB:["R","G","B","A"],HSL:["H","S","L","A"],CIELab:["L","a","b","A"],CMYK:["C","M","Y","K","A"]},h={BGR:c.RGB,ABGR:c.RGB,HLS:c.HSL,AHLS:c.HSL,LAB:c.CIELab,ALAB:c.CIELab,CKMY:c.CMYK,ACKMY:c.CMYK};var m;(e=>{e.NUMBER="number",e.BOOLEAN="boolean"})(m||(m={}));const _={[c.HEX]:/^#(?:([a-f\d])([a-f\d])([a-f\d])([a-f\d])?|([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?)$/i,[c.RGB]:/^rgba?\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)(?:\s*,\s*((?:\d*\.)?\d+))?|((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,[c.HSL]:/^hsla?\s*\(\s*(?:(-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s*,\s*((?:\d*\.)?\d+)%\s*,\s*((?:\d*\.)?\d+)%(?:\s*,\s*((?:\d*\.)?\d+))?|(-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s*((?:\d*\.)?\d+)%\s*((?:\d*\.)?\d+)%(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,[c.CIELab]:/^lab\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*(-?(?:\d*\.)?\d+%?)\s*(-?(?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,[c.CMYK]:/^(?:device-cmyk|cmyk)\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)(?:\s*,\s*((?:\d*\.)?\d+))?|((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/},f=/^(-?(?:\d*\.)?\d+)((?:deg|grad|rad|turn)?)$/,b=/^(-?\d+(?:\.\d+)?|-?\.\d+)%$/,A=/^0x([a-f\d]{1,2})$/i,w=/\{(\d+)\}/g,E=/,( +|\d+)/g,y=/ +/;var v,T,k;(e=>{e.NONE="none",e.DEGREES="deg",e.GRADIANS="grad",e.RADIANS="rad",e.TURNS="turn"})(v||(v={})),(e=>{e.NONE="none",e.PERCENT="percent"})(T||(T={})),(e=>{e.DEVICE_CMYK="device-cmyk",e.CMYK="cmyk"})(k||(k={}));const S={decimals:6,legacyCSS:!1,spacesAfterCommas:!1,anglesUnit:v.NONE,rgbUnit:T.NONE,labUnit:T.NONE,cmykUnit:T.PERCENT,alphaUnit:T.NONE,cmykFunction:k.DEVICE_CMYK},D=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),C=e=>+`${e}`.replace(b,"$1"),G=e=>b.test(`${e}`)?C(e):Math.min(+e,100),O=e=>(1===e.length&&(e+=e),parseInt(e,16)),I=e=>{const t=B(e,0).toString(16).toUpperCase();return 1===t.length?`0x0${t}`:`0x${t}`},L=(e,t=!1)=>!t&&b.test(e)?Math.min(255*C(e)/100,255):A.test(e)?(3===e.length&&(e+=e.slice(-1)),t?B(e)/255:B(e)):Math.min(+e,t?1:255),R=e=>b.test(e)?x(125*C(e)/100,-125,125):x(+e,-125,125),F=e=>Math.min(b.test(e)?C(e)/100:+e,1),P=e=>[...e].sort().join("").toUpperCase(),B=(e,t=6)=>{const s=Math.pow(10,t);return Math.round(+e*s)/s},x=(e,t,s)=>Math.max(t,Math.min(e,s)),M=e=>{if("string"==typeof e){const t=e.match(f),s=+t[1];switch(t[2]){case v.RADIANS:e=B(180*s/Math.PI);break;case v.TURNS:e=B(360*s);break;case v.GRADIANS:e=B(.9*s);break;case v.DEGREES:default:e=s}}return(e>360||e<0)&&(e-=360*Math.floor(e/360)),e},N=(e,...t)=>{const s=[],r=[],n=[],i=[],o=[],a=[],c=Object.values(v),l=Object.values(T),u=Object.values(k),d={legacyCSS:0,spacesAfterCommas:0,cmykFunction:0};for(const e of t)if("string"==typeof e){if(s.push(e),e.includes(",")){d.legacyCSS++;const t=e.match(E);1===new Set(t).size&&y.test(t[0].slice(1))&&d.spacesAfterCommas++}if(e.match(_.HSL)){const t=e.match(_.HSL),s=t[1]||t[5],n=t[8],i=s.match(f)[2];r.push(""===i?v.NONE:i),a.push(b.test(n));continue}if(_.RGB.test(e)){const t=e.match(_.RGB),s=t[1]||t[5],r=t[2]||t[6],i=t[3]||t[7],o=t[8];n.push(b.test(s)&&b.test(r)&&b.test(i)),a.push(b.test(o));continue}if(_.CIELab.test(e)){const t=e.match(_.CIELab),s=t[1],r=t[2],n=t[3],o=t[4];i.push(b.test(s)&&b.test(r)&&b.test(n)),a.push(b.test(o));continue}if(e.match(_.CMYK)){const t=e.match(_.CMYK),s=t[1]||t[6],r=t[2]||t[7],n=t[3]||t[8],i=t[4]||t[9],c=t[10];o.push(b.test(s)&&b.test(r)&&b.test(n)&&b.test(i)),e.startsWith("cmyk")&&d.cmykFunction++,a.push(b.test(c))}}return{decimals:typeof e.decimals===m.NUMBER?e.decimals:S.decimals,legacyCSS:typeof e.legacyCSS===m.BOOLEAN?e.legacyCSS:Boolean(s.length&&d.legacyCSS===s.length)||S.legacyCSS,spacesAfterCommas:typeof e.spacesAfterCommas===m.BOOLEAN?e.spacesAfterCommas:Boolean(s.length&&d.spacesAfterCommas===s.length)||S.spacesAfterCommas,anglesUnit:e.anglesUnit&&c.includes(e.anglesUnit)?e.anglesUnit:1===new Set(r).size?r[0]:S.anglesUnit,rgbUnit:e.rgbUnit&&l.includes(e.rgbUnit)?e.rgbUnit:1===new Set(n).size&&n[0]?T.PERCENT:S.rgbUnit,labUnit:e.labUnit&&l.includes(e.labUnit)?e.labUnit:1===new Set(i).size&&i[0]?T.PERCENT:S.labUnit,cmykUnit:e.cmykUnit&&l.includes(e.cmykUnit)?e.cmykUnit:1!==new Set(o).size||o[0]?S.cmykUnit:T.NONE,alphaUnit:e.alphaUnit&&l.includes(e.alphaUnit)?e.alphaUnit:1===new Set(a).size&&a[0]?T.PERCENT:S.alphaUnit,cmykFunction:e.cmykFunction&&u.includes(e.cmykFunction)?e.cmykFunction:o.length&&o.length===d.cmykFunction?k.CMYK:S.cmykFunction}},H=e=>`${e}`in u,U=[[.4360747,.3850649,.1430804],[.2225045,.7168786,.0606169],[.0139322,.0971045,.7141733]],Y=[[3.1338561,-1.6168667,-.4906146],[-.9787684,1.9161415,.033454],[.0719453,-.2289914,1.4052427]],j=U.map((e=>e.reduce(((e,t)=>e+t),0))),Q=(e,t,s)=>(s<0&&(s+=6),s>=6&&(s-=6),B(s<1?255*((t-e)*s+e):s<3?255*t:s<4?255*((t-e)*(4-s)+e):255*e)),W=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4,z=e=>e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055,Z=(e,t,s,r)=>{const n=[0,0,0],i=[e,t,s];return r.forEach(((e,t)=>{e.forEach(((e,s)=>{n[t]+=e*i[s]}))})),n},J=(e,t,s)=>{t/=100;const r=(s/=100)<=.5?s*(t+1):s+t-s*t,n=2*s-r;return{R:Q(n,r,2+(e/=60)),G:Q(n,r,e),B:Q(n,r,e-2)}},V=(e,t,s,r=1)=>{e/=255,t/=255,s/=255,r=Math.min(r,1);const n=Math.max(e,t,s),i=Math.min(e,t,s),o=n-i;let a=0,c=0;const l=(n+i)/2;if(0!==o){switch(n){case e:a=(t-s)/o%6;break;case t:a=(s-e)/o+2;break;case s:a=(e-t)/o+4}a=B(60*a),a<0&&(a+=360),c=o/(1-Math.abs(2*l-1))}return{H:a,S:B(100*c),L:B(100*l),A:r}},X=(e,t,s)=>{const r=[e/255,t/255,s/255].map(W),n=Z(r[0],r[1],r[2],U),i=((e,t,s)=>{const r=e=>e>(6/29)**3?Math.cbrt(e):e/(3*(6/29)**2)+4/29,n=r(e/j[0]),i=r(t/j[1]);return[116*i-16,500*(n-i),200*(i-r(s/j[2]))]})(n[0],n[1],n[2]);return{L:i[0],a:i[1],b:i[2]}},K=(e,t,s)=>{const r=((e,t,s)=>{const r=e=>e>6/29?e**3:3*(6/29)**2*(e-4/29),n=(e+16)/116,i=t/500,o=s/200;return[j[0]*r(n+i),j[1]*r(n),j[2]*r(n-o)]})(e,t,s),n=Z(r[0],r[1],r[2],Y).map(z);return{R:x(255*n[0],0,255),G:x(255*n[1],0,255),B:x(255*n[2],0,255)}},q=(e,t,s,r)=>({R:B(255*(1-e)*(r=1-r)),G:B(255*(1-t)*r),B:B(255*(1-s)*r)}),$=(e,t,s)=>{e/=255,t/=255,s/=255;const r=1-Math.max(e,t,s),n=1-r,i=n&&(n-t)/n,o=n&&(n-s)/n;return{C:B(100*(n&&(n-e)/n)),M:B(100*i),Y:B(100*o),K:B(100*r)}},ee=(e,t)=>{if(e<0&&(e+=360),e>360&&(e-=360),360===e||0===e)return e;const s=[[0,120],[120,180],[180,240],[240,360]],r=[[0,60],[60,120],[120,240],[240,360]],n=t?r:s;let i=0,o=0,a=0,c=0;return(t?s:r).find(((t,s)=>e>=t[0]&&ee?", ":",",se=(e,t)=>{const s=P(Object.keys(e));return g[h[s]].reduce(((s,r,n)=>{const i=e[r];return void 0!==i&&s.push(t(i,n)),s}),[])},re=(e,t)=>e.replace(w,((e,s)=>`${t[+s-1]}`)),ne=(e,t,s=!1)=>{const{alphaUnit:r,legacyCSS:n,decimals:i}=t;return r!==T.PERCENT||n&&!s?B(e,i):`${B(100*e,i)}%`},ie={[c.HEX]:e=>{const t=se(e,(e=>(e=>{let t=B(e,0).toString(16).toUpperCase();return 1===t.length&&(t=`0${t}`),t})(B(e)))),s=4===t.length?"#{1}{2}{3}{4}":"#{1}{2}{3}";return re(s,t)},[c.RGB]:(e,t)=>{const{decimals:s,legacyCSS:r,spacesAfterCommas:n,rgbUnit:i}=t,o=te(n),a=se(e,((e,r)=>i===T.PERCENT&&r<3?`${((e,t)=>B(e/255*100,t))(e,s)}%`:3===r?ne(e,t):B(e,s))),c=r?4===a.length?`rgba({1}${o}{2}${o}{3}${o}{4})`:`rgb({1}${o}{2}${o}{3})`:4===a.length?"rgb({1} {2} {3} / {4})":"rgb({1} {2} {3})";return re(c,a)},[c.HSL]:(e,t)=>{const{decimals:s,legacyCSS:r,spacesAfterCommas:n,anglesUnit:i}=t,o=te(n),a=se(e,((e,r)=>0===r&&i!==v.NONE?`${B(((e,t)=>{let s;switch(t){case v.RADIANS:s=B((e=>e*Math.PI/180)(e));break;case v.TURNS:s=B(e/360);break;case v.GRADIANS:s=B(10/9*e);break;case v.DEGREES:case v.NONE:default:s=e}return s})(e,i),s)}${i}`:3===r?ne(e,t):B(e,s))),c=r?4===a.length?`hsla({1}${o}{2}%${o}{3}%${o}{4})`:`hsl({1}${o}{2}%${o}{3}%)`:4===a.length?"hsl({1} {2}% {3}% / {4})":"hsl({1} {2}% {3}%)";return re(c,a)},[c.CIELab]:(e,t)=>{const{decimals:s,labUnit:r}=t,n=se(e,((e,n)=>{if(0===n){const t=B(G(e),s);return r===T.PERCENT?`${t}%`:`${t}`}return n<3?r===T.PERCENT?`${((e,t)=>B(e/125*100,t))(e,s)}%`:B(e,s):ne(e,t,!0)})),i=4===n.length?"lab({1} {2} {3} / {4})":"lab({1} {2} {3})";return re(i,n)},[c.CMYK]:(e,t)=>{const{decimals:s,legacyCSS:r,spacesAfterCommas:n,cmykUnit:i,cmykFunction:o}=t,a=te(n),c=se(e,((e,r)=>i===T.PERCENT&&r<4?`${B(e,s)}%`:4===r?ne(e,t):B(e/100,s))),l=r?5===c.length?`${o}({1}${a}{2}${a}{3}${a}{4}${a}{5})`:`${o}({1}${a}{2}${a}{3}${a}{4})`:5===c.length?`${o}({1} {2} {3} {4} / {5})`:`${o}({1} {2} {3} {4})`;return re(l,c)}},oe=e=>("string"==typeof e&&(e=b.test(e)?C(e)/100:+e),isNaN(+e)||e>1?1:B(e)),ae=(e,t,s)=>t.reduce(((t,r)=>[...t,{...e,H:s===u.ADDITIVE?M(e.H+r):M(ee(ee(e.H,!1)+r,!0))}]),[{...e}]),ce=(e,t)=>ae(e,[30,-30],t),le=(e,t)=>ae(e,[180],t),ue=(e,t)=>ae(e,[150,-150],t),de=(e,t)=>ae(e,[120,-120],t),pe=(e,t)=>ae(e,[60,-120,180],t),ge=(e,t)=>ae(e,[90,-90,180],t),he=e=>"string"==typeof e?(e=>{let t;if(Object.keys(c).some((s=>{if(_[s].test(e))return t=s,!0})),!t&&~p.indexOf(e)&&(t=c.HEX),!t)throw new Error("The provided string color doesn't have a correct format");return t})(e):(e=>{let t,s=!1;const r=P(Object.keys(e));if(h[r]&&(t=h[r]),t&&t===c.RGB){const r=Object.entries(e).some((e=>!A.test(`${e[1]}`))),n=Object.entries(e).some((e=>!(b.test(`${e[1]}`)||!A.test(`${e[1]}`)&&!isNaN(+e[1])&&+e[1]<=255)));r&&n&&(s=!0),r||(t=c.HEX)}if(!t||s)throw new Error("The provided color object doesn't have the proper keys or format");return t})(e),me={[c.HEX](e){const t=(~p.indexOf(e)?d[e]:e).match(_.HEX),s={R:O(t[1]||t[5]),G:O(t[2]||t[6]),B:O(t[3]||t[7])},r=t[4]||t[8];return void 0!==r&&(s.A=O(r)/255),s},[c.RGB](e){const t=e.match(_.RGB),s=L(t[1]||t[5]),r=L(t[2]||t[6]),n=L(t[3]||t[7]),i=t[4]||t[8],o={R:Math.min(s,255),G:Math.min(r,255),B:Math.min(n,255)};return void 0!==i&&(o.A=oe(i)),o},[c.HSL](e){const t=e.match(_.HSL),s=M(t[1]||t[5]),r=G(t[2]||t[6]),n=G(t[3]||t[7]),i=t[4]||t[8],o=J(s,r,n);return void 0!==i&&(o.A=oe(i)),o},[c.CIELab](e){const t=e.match(_.CIELab),s=G(t[1]),r=R(t[2]),n=R(t[3]),i=t[4],o=K(s,r,n);return void 0!==i&&(o.A=oe(i)),o},[c.CMYK](e){const t=e.match(_.CMYK),s=F(t[1]||t[6]),r=F(t[2]||t[7]),n=F(t[3]||t[8]),i=F(t[4]||t[9]),o=t[5]||t[10],a=q(s,r,n,i);return void 0!==o&&(a.A=oe(o)),a}},_e={[c.HEX](e){const t={R:L(`${e.R}`),G:L(`${e.G}`),B:L(`${e.B}`)};return D(e,"A")&&(t.A=Math.min(L(`${e.A}`,!0),1)),t},[c.RGB](e){return this.HEX(e)},[c.HSL](e){const t=G(`${e.S}`),s=G(`${e.L}`),r=J(M(e.H),t,s);return D(e,"A")&&(r.A=oe(e.A)),r},[c.CIELab](e){const t=G(`${e.L}`),s=R(`${e.a}`),r=R(`${e.b}`),n=K(t,s,r);return D(e,"A")&&(n.A=oe(e.A)),n},[c.CMYK](e){const t=F(`${e.C}`),s=F(`${e.M}`),r=F(`${e.Y}`),n=F(`${e.K}`),i=q(t,s,r,n);return D(e,"A")&&(i.A=oe(e.A)),i}},fe=(e,t=he(e))=>"string"==typeof e?me[t](e):_e[t](e),be={[c.HEX]:e=>({R:I(e.R),G:I(e.G),B:I(e.B)}),HEXA(e){const t=be.HEX(e);return t.A=D(e,"A")?I(255*e.A):"0xFF",t},[c.RGB](e,t){const s=ye(e,t);return D(s,"A")&&delete s.A,s},RGBA(e,t){const s=be.RGB(e,t);return s.A=D(e,"A")?B(e.A):1,s},[c.HSL](e,t){const s=V(e.R,e.G,e.B);return delete s.A,ve(s,t)},HSLA(e,t){const s=be.HSL(e,t);return s.A=D(e,"A")?B(e.A,t):1,s},[c.CIELab](e,t){const s=X(e.R,e.G,e.B);return Te(s,t)},CIELabA(e,t){const s=be.CIELab(e,t);return s.A=D(e,"A")?B(e.A,t):1,s},[c.CMYK]:(e,t)=>ke($(e.R,e.G,e.B),t),CMYKA(e,t){const s=be.CMYK(e,t);return s.A=D(e,"A")?B(e.A,t):1,s}},Ae=(e,t,s,r)=>{const n=he(e),i="string"==typeof e,o=fe(e,n),a="string"==typeof e&&D(o,"A")||"string"!=typeof e&&D(e,"A"),l=V(o.R,o.G,o.B,o.A);a||delete l.A;const u=s?l.L/(t+1):(100-l.L)/(t+1),d=Array(t).fill(null).map(((e,t)=>({...l,L:l.L+u*(t+1)*(1-2*+s)})));switch(n){case c.HEX:default:return d.map((e=>{const t=J(e.H,e.S,e.L);return a&&(t.A=e.A),i?a?ie.HEX({...t,A:B(255*t.A)}):ie.HEX(t):a?be.HEXA(t):be.HEX(t)}));case c.RGB:return d.map((e=>{const t=J(e.H,e.S,e.L);return a&&(t.A=e.A),i?ie.RGB(t,r):a?be.RGBA(t,r.decimals):be.RGB(t,r.decimals)}));case c.HSL:return d.map((e=>i?ie.HSL(e,r):a?be.HSLA({...J(e.H,e.S,e.L),A:e.A},r.decimals):be.HSL(J(e.H,e.S,e.L),r.decimals)));case c.CIELab:return d.map((e=>{const t=J(e.H,e.S,e.L);return i?ie.CIELab(a?be.CIELabA(t,r.decimals):be.CIELab(t,r.decimals),r):a?be.CIELabA({...t,A:e.A},r.decimals):be.CIELab(t,r.decimals)}))}},we={buildHarmony(e,t,s,r){const n=he(e),i=fe(e,n),o=V(i.R,i.G,i.B,i.A),a="string"==typeof e&&D(i,"A")||"string"!=typeof e&&D(e,"A"),l="string"==typeof e;switch(n){case c.HEX:default:return a?this.HEXA(ve(o,0),t,s,l):this.HEX(ve(o,0),t,s,l);case c.HSL:return a?this.HSLA(o,t,s,l,r):this.HSL(o,t,s,l,r);case c.RGB:return a?this.RGBA(o,t,s,l,r):this.RGB(o,t,s,l,r);case c.CIELab:return a?this.CIELabA(o,t,s,l,r):this.CIELab(o,t,s,l,r)}},[c.HEX]:(e,t,s,r)=>t(e,s).map((e=>r?ie.HEX(J(e.H,e.S,e.L)):be.HEX(J(e.H,e.S,e.L)))),HEXA:(e,t,s,r)=>t(e,s).map((e=>r?ie.HEX({...J(e.H,e.S,e.L),A:255*oe(e.A)}):be.HEXA({...J(e.H,e.S,e.L),A:oe(e.A)}))),[c.RGB]:(e,t,s,r,n)=>t(e,s).map((e=>r?ie.RGB(J(e.H,e.S,e.L),n):be.RGB(J(e.H,e.S,e.L),n.decimals))),RGBA:(e,t,s,r,n)=>t(e,s).map((e=>r?ie.RGB({...J(e.H,e.S,e.L),A:oe(e.A)},n):be.RGBA({...J(e.H,e.S,e.L),A:oe(e.A)},n.decimals))),[c.HSL]:(e,t,s,r,n)=>t(e,s).map((e=>r?ie.HSL({H:e.H,S:e.S,L:e.L},n):be.HSL(J(e.H,e.S,e.L),n.decimals))),HSLA:(e,t,s,r,n)=>t(e,s).map((e=>r?ie.HSL({...e,A:oe(e.A)},n):be.HSLA({...J(e.H,e.S,e.L),A:oe(e.A)},n.decimals))),[c.CIELab]:(e,t,s,r,n)=>t(e,s).map((e=>{const t=J(e.H,e.S,e.L);return r?ie.CIELab(X(t.R,t.G,t.B),n):be.CIELab(t,n.decimals)})),CIELabA:(e,t,s,r,n)=>t(e,s).map((e=>{const t=J(e.H,e.S,e.L);return r?ie.CIELab({...X(t.R,t.G,t.B),A:oe(e.A)},n):be.CIELabA({...t,A:oe(e.A)},n.decimals)}))},Ee={mix(e,t){const s=e.map((e=>{const t=he(e);return fe(e,t)})),r=t===u.SUBTRACTIVE?s.map((e=>{const t=((e,t,s)=>{const r=Math.min(e,t,s),n=Math.min(255-e,255-t,255-s),i=e-r,o=t-r,a=s-r,c=Math.min(i,o),l=i-c,u=(o+c)/2,d=(a+o-c)/2,p=Math.max(l,u,d)/Math.max(i,o,a),g=isNaN(p)||p===1/0||p<=0?1:p;return{R:l/g+n,Y:u/g+n,B:d/g+n}})(e.R,e.G,e.B);return D(e,"A")&&(t.A=e.A),t})):null;function n(e){const s=t===u.ADDITIVE?{R:0,G:0,B:0,A:0}:{R:0,Y:0,B:0,A:0};return e.reduce(((e,s)=>{const r=D(s,"A")?s.A:1,n={R:Math.min(e.R+s.R*r,255),B:Math.min(e.B+s.B*r,255),A:1-(1-r)*(1-e.A)},i="G"in e?e.G:e.Y,o="G"in s?s.G:s.Y;return{...n,...t===u.ADDITIVE?{G:Math.min(i+o*r,255)}:{Y:Math.min(i+o*r,255)}}}),s)}let i;if(t===u.ADDITIVE)i=n(s);else{const e=n(r);i=((e,t,s)=>{const r=Math.min(e,t,s),n=Math.min(255-e,255-t,255-s),i=e-r,o=t-r,a=s-r,c=Math.min(o,a),l=i+o-c,u=o+c,d=2*(a-c),p=Math.max(l,u,d)/Math.max(i,o,a),g=isNaN(p)||p===1/0||p<=0?1:p;return{R:l/g+n,G:u/g+n,B:d/g+n}})(e.R,e.Y,e.B),i.A=e.A}return{R:B(i.R),G:B(i.G),B:B(i.B),A:x(i.A,0,1)}},[c.HEX](e,t,s){const r=this.mix(e,t);return delete r.A,s?ie.HEX(r):be.HEX(r)},HEXA(e,t,s){const r=this.mix(e,t);return r.A=s?255*oe(r.A):oe(r.A),s?ie.HEX(r):be.HEXA(r)},[c.RGB](e,t,s,r){const n=this.mix(e,t);return delete n.A,s?ie.RGB(n,r):be.RGB(n,r.decimals)},RGBA(e,t,s,r){const n=this.mix(e,t);return s?ie.RGB(n,r):be.RGBA(n,r.decimals)},[c.HSL](e,t,s,r){const n=this.mix(e,t),i=V(n.R,n.G,n.B);return delete n.A,delete i.A,s?ie.HSL(i,r):be.HSL(n,r.decimals)},HSLA(e,t,s,r){const n=this.mix(e,t),i=V(n.R,n.G,n.B,n.A);return s?ie.HSL(i,r):be.HSLA(n,r.decimals)},[c.CIELab](e,t,s,r){const n=this.mix(e,t),i=X(n.R,n.G,n.B);return delete n.A,s?ie.CIELab(i,r):be.CIELabA(n,r.decimals)},CIELabA(e,t,s,r){const n=this.mix(e,t),i=X(n.R,n.G,n.B);return D(n,"A")&&(i.A=n.A),s?ie.CIELab(i,r):be.CIELabA(n,r.decimals)}},ye=(e,t)=>({R:B(e.R,t),G:B(e.G,t),B:B(e.B,t),...D(e,"A")?{A:B(e.A,t)}:{}}),ve=(e,t)=>({H:B(e.H,t),S:B(e.S,t),L:B(e.L,t),...D(e,"A")?{A:B(e.A,t)}:{}}),Te=(e,t)=>({L:B(e.L,t),a:B(e.a,t),b:B(e.b,t)}),ke=(e,t)=>({C:B(e.C,t),M:B(e.M,t),Y:B(e.Y,t),K:B(e.K,t)}),Se=(e,t,s,r)=>r(fe(e,t),s),De=(e,t,s,r,n)=>{s<1&&(s=5);const i=((e,t,s)=>{const r=s-1,n=(t.R-e.R)/r,i=(t.G-e.G)/r,o=(t.B-e.B)/r,a=oe(e.A),c=(oe(t.A)-a)/r;return Array(s).fill(null).map(((s,l)=>0===l?e:l===r?t:{R:B(e.R+n*l),G:B(e.G+i*l),B:B(e.B+o*l),A:B(a+c*l)}))})(fe(e),fe(t),s);return i.map((e=>n(e,r)))},Ce=(e,t,s,r)=>({[l.ANALOGOUS]:we.buildHarmony(t,ce,s,r),[l.COMPLEMENTARY]:we.buildHarmony(t,le,s,r),[l.SPLIT_COMPLEMENTARY]:we.buildHarmony(t,ue,s,r),[l.TRIADIC]:we.buildHarmony(t,de,s,r),[l.TETRADIC]:we.buildHarmony(t,pe,s,r),[l.SQUARE]:we.buildHarmony(t,ge,s,r)}[e]);class Ge{constructor(e,t={}){this._options=N(t,e),this.rgb=fe(e),this.updateHSL(),this.updateLab(),this.updateCMYK()}updateRGB(){this.rgb={...J(this.hsl.H,this.hsl.S,this.hsl.L),A:this.hsl.A}}updateRGBFromCMYK(){this.rgb={...q(this.cmyk.C,this.cmyk.M,this.cmyk.Y,this.cmyk.K),A:this.rgb.A}}updateRGBFromLab(){this.rgb={...K(this.lab.L,this.lab.a,this.lab.b),A:this.rgb.A}}updateHSL(){this.hsl=V(this.rgb.R,this.rgb.G,this.rgb.B,this.rgb.A)}updateLab(){this.lab={...X(this.rgb.R,this.rgb.G,this.rgb.B),A:this.rgb.A}}updateCMYK(){this.cmyk=$(this.rgb.R,this.rgb.G,this.rgb.B)}setOptions(e={}){return this._options={...this._options,...e},this}setH(e){return this.hsl.H=M(e),this.updateRGB(),this.updateLab(),this.updateCMYK(),this}setS(e){return this.hsl.S=x(e,0,100),this.updateRGB(),this.updateLab(),this.updateCMYK(),this}setL(e){return this.hsl.L=x(e,0,100),this.updateRGB(),this.updateLab(),this.updateCMYK(),this}setR(e){this.rgb.R=x(e,0,255),this.updateHSL(),this.updateLab(),this.updateCMYK()}setG(e){return this.rgb.G=x(e,0,255),this.updateHSL(),this.updateLab(),this.updateCMYK(),this}setB(e){return this.rgb.B=x(e,0,255),this.updateHSL(),this.updateLab(),this.updateCMYK(),this}setCIEL(e){return this.lab.L=x(e,0,100),this.updateRGBFromLab(),this.updateHSL(),this.updateCMYK(),this}setCIEa(e){return this.lab.a=x(e,-125,125),this.updateRGBFromLab(),this.updateHSL(),this.updateCMYK(),this}setCIEb(e){return this.lab.b=x(e,-125,125),this.updateRGBFromLab(),this.updateHSL(),this.updateCMYK(),this}setA(e){return this.hsl.A=this.rgb.A=x(e,0,1),this}setC(e){return this.cmyk.C=x(e,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this}setM(e){return this.cmyk.M=x(e,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this}setY(e){return this.cmyk.Y=x(e,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this}setK(e){return this.cmyk.K=x(e,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this}get options(){return this._options}get H(){return B(this.hsl.H,this.options.decimals)}get S(){return B(this.hsl.S,this.options.decimals)}get L(){return B(this.hsl.L,this.options.decimals)}get CIEL(){return B(this.lab.L,this.options.decimals)}get CIEa(){return B(this.lab.a,this.options.decimals)}get CIEb(){return B(this.lab.b,this.options.decimals)}get R(){return B(this.rgb.R,this.options.decimals)}get G(){return B(this.rgb.G,this.options.decimals)}get B(){return B(this.rgb.B,this.options.decimals)}get A(){return B(this.hsl.A,this.options.decimals)}get C(){return B(this.cmyk.C,this.options.decimals)}get M(){return B(this.cmyk.M,this.options.decimals)}get Y(){return B(this.cmyk.Y,this.options.decimals)}get K(){return B(this.cmyk.K,this.options.decimals)}get HEXObject(){return be.HEX(this.rgb)}get HEXAObject(){return be.HEXA(this.rgb)}get RGBObject(){return{R:this.R,G:this.G,B:this.B}}get RGBAObject(){return{...this.RGBObject,A:this.A}}get HSLObject(){return{H:this.H,S:this.S,L:this.L}}get HSLAObject(){return{...this.HSLObject,A:this.A}}get CIELabObject(){return{L:this.CIEL,a:this.CIEa,b:this.CIEb}}get CIELabAObject(){return{...this.CIELabObject,A:this.A}}get CMYKObject(){return{C:this.C,M:this.M,Y:this.Y,K:this.K}}get CMYKAObject(){return{...this.CMYKObject,A:this.A}}get HEX(){return ie.HEX({R:this.R,G:this.G,B:this.B})}get HEXA(){return ie.HEX({R:this.R,G:this.G,B:this.B,A:255*this.A})}get RGB(){return ie.RGB({R:this.R,G:this.G,B:this.B},this.options)}get RGBA(){return ie.RGB({R:this.R,G:this.G,B:this.B,A:this.A},this.options)}get HSL(){return ie.HSL({H:this.H,S:this.S,L:this.L},this.options)}get HSLA(){return ie.HSL({H:this.H,S:this.S,L:this.L,A:this.A},this.options)}get CIELab(){return ie.CIELab({L:this.CIEL,a:this.CIEa,b:this.CIEb},this.options)}get CIELabA(){return ie.CIELab({L:this.CIEL,a:this.CIEa,b:this.CIEb,A:this.A},this.options)}get CMYK(){return ie.CMYK({C:this.C,M:this.M,Y:this.Y,K:this.K},this.options)}get CMYKA(){return ie.CMYK({C:this.C,M:this.M,Y:this.Y,K:this.K,A:this.A},this.options)}static toHEXObject(e){const t=he(e);return Se(e,t,0,be.HEX)}static toHEX(e){return ie.HEX(Ge.toHEXObject(e))}static toHEXAObject(e){const t=he(e);return Se(e,t,0,be.HEXA)}static toHEXA(e){return ie.HEX(Ge.toHEXAObject(e))}static toRGBObject(e,t={}){const s=he(e);return Se(e,s,t.decimals,be.RGB)}static toRGB(e,t={}){const s=he(e),r=N(t,e),n=Se(e,s,t.decimals,be.RGB);return ie.RGB(n,r)}static toRGBAObject(e,t={}){const s=he(e);return Se(e,s,t.decimals,be.RGBA)}static toRGBA(e,t={}){const s=he(e),r=N(t,e),n=Se(e,s,t.decimals,be.RGBA);return ie.RGB(n,r)}static toHSLObject(e,t={}){const s=he(e);return Se(e,s,t.decimals,be.HSL)}static toHSL(e,t={}){const s=he(e),r=N(t,e),n=Se(e,s,t.decimals,be.HSL);return ie.HSL(n,r)}static toHSLAObject(e,t={}){const s=he(e);return Se(e,s,t.decimals,be.HSLA)}static toHSLA(e,t={}){const s=he(e),r=N(t,e),n=Se(e,s,t.decimals,be.HSLA);return ie.HSL(n,r)}static toCIELabObject(e,t={}){const s=he(e);return Se(e,s,t.decimals,be.CIELab)}static toCIELab(e,t={}){const s=he(e),r=N(t,e),n=Se(e,s,t.decimals,be.CIELab);return ie.CIELab(n,r)}static toCIELabAObject(e,t={}){const s=he(e);return Se(e,s,t.decimals,be.CIELabA)}static toCIELabA(e,t={}){const s=he(e),r=N(t,e),n=Se(e,s,t.decimals,be.CIELabA);return ie.CIELab(n,r)}static toCMYKObject(e,t={}){const s=he(e);return Se(e,s,t.decimals,be.CMYK)}static toCMYK(e,t={}){const s=he(e),r=N(t,e),n=Se(e,s,t.decimals,be.CMYK);return ie.CMYK(n,r)}static toCMYKAObject(e,t={}){const s=he(e);return Se(e,s,t.decimals,be.CMYKA)}static toCMYKA(e,t={}){const s=he(e),r=N(t,e),n=Se(e,s,t.decimals,be.CMYKA);return ie.CMYK(n,r)}static getBlendHEXObject(e,t,s=5){return De(e,t,s,0,be.HEX)}static getBlendHEX(e,t,s=5){return Ge.getBlendHEXObject(e,t,s).map((e=>ie.HEX(e)))}static getBlendHEXAObject(e,t,s=5){return De(e,t,s,0,be.HEXA)}static getBlendHEXA(e,t,s=5){return Ge.getBlendHEXAObject(e,t,s).map((e=>ie.HEX(e)))}static getBlendRGBObject(e,t,s,r){return"number"==typeof s?De(e,t,s,r?.decimals,be.RGB):De(e,t,5,s?.decimals,be.RGB)}static getBlendRGB(e,t,s,r){return"number"==typeof s?De(e,t,s,r?.decimals,be.RGB).map((s=>ie.RGB(s,N(r||{},e,t)))):De(e,t,5,s?.decimals,be.RGB).map((r=>ie.RGB(r,N(s||{},e,t))))}static getBlendRGBAObject(e,t,s,r){return"number"==typeof s?De(e,t,s,r?.decimals,be.RGBA):De(e,t,5,s?.decimals,be.RGBA)}static getBlendRGBA(e,t,s,r){return"number"==typeof s?De(e,t,s,r?.decimals,be.RGBA).map((s=>ie.RGB(s,N(r||{},e,t)))):De(e,t,5,s?.decimals,be.RGBA).map((r=>ie.RGB(r,N(s||{},e,t))))}static getBlendHSLObject(e,t,s,r){return De(e,t,"number"==typeof s?s:5,r?.decimals,be.HSL)}static getBlendHSL(e,t,s,r){return"number"==typeof s?De(e,t,s,r?.decimals,be.HSL).map((s=>ie.HSL(s,N(r||{},e,t)))):De(e,t,5,s?.decimals,be.HSL).map((r=>ie.HSL(r,N(s||{},e,t))))}static getBlendHSLAObject(e,t,s,r){return"number"==typeof s?De(e,t,s,r?.decimals,be.HSLA):De(e,t,5,s?.decimals,be.HSLA)}static getBlendHSLA(e,t,s,r){return"number"==typeof s?De(e,t,s,r?.decimals,be.HSLA).map((s=>ie.HSL(s,N(r||{},e,t)))):De(e,t,5,s?.decimals,be.HSLA).map((r=>ie.HSL(r,N(s||{},e,t))))}static getBlendCIELabObject(e,t,s,r){return"number"==typeof s?De(e,t,s,r?.decimals,be.CIELab):De(e,t,5,s?.decimals,be.CIELab)}static getBlendCIELab(e,t,s,r){return"number"==typeof s?De(e,t,s,r?.decimals,be.CIELab).map((s=>ie.CIELab(s,N(r||{},e,t)))):De(e,t,5,s?.decimals,be.CIELab).map((r=>ie.CIELab(r,N(s||{},e,t))))}static getBlendCIELabAObject(e,t,s,r){return"number"==typeof s?De(e,t,s,r?.decimals,be.CIELabA):De(e,t,5,s?.decimals,be.CIELabA)}static getBlendCIELabA(e,t,s,r){return"number"==typeof s?De(e,t,s,r?.decimals,be.CIELabA).map((s=>ie.CIELab(s,N(r||{},e,t)))):De(e,t,5,s?.decimals,be.CIELabA).map((r=>ie.CIELab(r,N(s||{},e,t))))}static getMixHEXObject(e,t=u.ADDITIVE){return Ee.HEX(e,t,!1)}static getMixHEX(e,t=u.ADDITIVE){return Ee.HEX(e,t,!0)}static getMixHEXAObject(e,t=u.ADDITIVE){return Ee.HEXA(e,t,!1)}static getMixHEXA(e,t=u.ADDITIVE){return Ee.HEXA(e,t,!0)}static getMixRGBObject(e,t,s){return"string"==typeof t?Ee.RGB(e,t,!1,N(s||{},...e)):Ee.RGB(e,u.ADDITIVE,!1,N(t||{},...e))}static getMixRGB(e,t,s){return"string"==typeof t?Ee.RGB(e,t,!0,N(s||{},...e)):Ee.RGB(e,u.ADDITIVE,!0,N(t||{},...e))}static getMixRGBAObject(e,t,s){return"string"==typeof t?Ee.RGBA(e,t,!1,N(s||{},...e)):Ee.RGBA(e,u.ADDITIVE,!1,N(t||{},...e))}static getMixRGBA(e,t,s){return"string"==typeof t?Ee.RGBA(e,t,!0,N(s||{},...e)):Ee.RGBA(e,u.ADDITIVE,!0,N(t||{},...e))}static getMixHSLObject(e,t,s){return"string"==typeof t?Ee.HSL(e,t,!1,N(s||{},...e)):Ee.HSL(e,u.ADDITIVE,!1,N(t||{},...e))}static getMixHSL(e,t,s){return"string"==typeof t?Ee.HSL(e,t,!0,N(s||{},...e)):Ee.HSL(e,u.ADDITIVE,!0,N(t||{},...e))}static getMixHSLAObject(e,t,s){return"string"==typeof t?Ee.HSLA(e,t,!1,N(s||{},...e)):Ee.HSLA(e,u.ADDITIVE,!1,N(t||{},...e))}static getMixHSLA(e,t,s){return"string"==typeof t?Ee.HSLA(e,t,!0,N(s||{},...e)):Ee.HSLA(e,u.ADDITIVE,!0,N(t||{},...e))}static getMixCIELabObject(e,t,s){return"string"==typeof t?Ee.CIELab(e,t,!1,N(s||{},...e)):Ee.CIELab(e,u.ADDITIVE,!1,N(t||{},...e))}static getMixCIELab(e,t,s){return"string"==typeof t?Ee.CIELab(e,t,!0,N(s||{},...e)):Ee.CIELab(e,u.ADDITIVE,!0,N(t||{},...e))}static getMixCIELabAObject(e,t,s){return"string"==typeof t?Ee.CIELabA(e,t,!1,N(s||{},...e)):Ee.CIELabA(e,u.ADDITIVE,!1,N(t||{},...e))}static getMixCIELabA(e,t,s){return"string"==typeof t?Ee.CIELabA(e,t,!0,N(s||{},...e)):Ee.CIELabA(e,u.ADDITIVE,!0,N(t||{},...e))}static getShades(e,t,s){return"number"==typeof t?Ae(e,t,!0,N(s||{},e)):Ae(e,5,!0,N(t||{},e))}static getTints(e,t,s){return"number"==typeof t?Ae(e,t,!1,N(s||{},e)):Ae(e,5,!1,N(t||{},e))}static getHarmony(e,t,s,r){return`${t}`in l?Ce(t,e,H(s)?s:u.ADDITIVE,N(H(s)?r||{}:s||{},e)):H(t)?Ce(l.COMPLEMENTARY,e,t,N(s||{},e)):Ce(l.COMPLEMENTARY,e,u.ADDITIVE,N(t||{},e))}}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function Oe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ie(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach((t=>{var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,r.get?r:{enumerable:!0,get:()=>e[t]})})),s}var Le,Re={exports:{}};Le=Re,((e,t)=>{Le.exports=t()})(self,(()=>(()=>{var e={d:(t,s)=>{for(var r in s)e.o(s,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:s[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.d(t,{default:()=>S});var s={};function r(e,t,s,r,n={}){t instanceof HTMLCollection||t instanceof NodeList?t=Array.from(t):Array.isArray(t)||(t=[t]),Array.isArray(s)||(s=[s]);for(const i of t)for(const t of s)i[e](t,r,{capture:!1,...n});return Array.prototype.slice.call(arguments,1)}e.r(s),e.d(s,{adjustableInputNumbers:()=>u,createElementFromString:()=>o,createFromTemplate:()=>a,eventPath:()=>c,off:()=>i,on:()=>n,resolveElement:()=>l});const n=r.bind(null,"addEventListener"),i=r.bind(null,"removeEventListener");function o(e){const t=document.createElement("div");return t.innerHTML=e.trim(),t.firstElementChild}function a(e){const t=(e,t)=>{const s=e.getAttribute(t);return e.removeAttribute(t),s},s=(e,r={})=>{const n=t(e,":obj"),i=t(e,":ref"),o=n?r[n]={}:r;i&&(r[i]=e);for(const r of Array.from(e.children)){const e=t(r,":arr"),n=s(r,e?{}:o);e&&(o[e]||(o[e]=[])).push(Object.keys(n).length?n:r)}return r};return s(o(e))}function c(e){let t=e.path||e.composedPath&&e.composedPath();if(t)return t;let s=e.target.parentElement;for(t=[e.target,s];s=s.parentElement;)t.push(s);return t.push(document,window),t}function l(e){return e instanceof Element?e:"string"==typeof e?e.split(/>>/g).reduce(((e,t,s,r)=>(e=e.querySelector(t),se)){function s(s){const r=[.001,.01,.1][Number(s.shiftKey||2*s.ctrlKey)]*(s.deltaY<0?1:-1);let n=0,i=e.selectionStart;e.value=e.value.replace(/[\d.]+/g,((e,s)=>s<=i&&s+e.length>=i?(i=s,t(Number(e),r,n)):(n++,e))),e.focus(),e.setSelectionRange(i,i),s.preventDefault(),e.dispatchEvent(new Event("input"))}n(e,"focus",(()=>n(window,"wheel",s,{passive:!1}))),n(e,"blur",(()=>i(window,"wheel",s)))}const{min:d,max:p,floor:g,round:h}=Math;function m(e,t,s){t/=100,s/=100;const r=g(e=e/360*6),n=e-r,i=s*(1-t),o=s*(1-n*t),a=s*(1-(1-n)*t),c=r%6;return[255*[s,o,i,i,a,s][c],255*[a,s,s,o,i,i][c],255*[i,i,a,s,s,o][c]]}function _(e,t,s){const r=(2-(t/=100))*(s/=100)/2;return 0!==r&&(t=1===r?0:r<.5?t*s/(2*r):t*s/(2-2*r)),[e,100*t,100*r]}function f(e,t,s){const r=d(e/=255,t/=255,s/=255),n=p(e,t,s),i=n-r;let o,a;if(0===i)o=a=0;else{a=i/n;const r=((n-e)/6+i/2)/i,c=((n-t)/6+i/2)/i,l=((n-s)/6+i/2)/i;e===n?o=l-c:t===n?o=1/3+r-l:s===n&&(o=2/3+c-r),o<0?o+=1:o>1&&(o-=1)}return[360*o,100*a,100*n]}function b(e,t,s,r){return t/=100,s/=100,[...f(255*(1-d(1,(e/=100)*(1-(r/=100))+r)),255*(1-d(1,t*(1-r)+r)),255*(1-d(1,s*(1-r)+r)))]}function A(e,t,s){t/=100;const r=2*(t*=(s/=100)<.5?s:1-s)/(s+t)*100,n=100*(s+t);return[e,isNaN(r)?0:r,n]}function w(e){return f(...e.match(/.{2}/g).map((e=>parseInt(e,16))))}function E(e=0,t=0,s=0,r=1){const n=(e,t)=>(s=-1)=>t(~s?e.map((e=>Number(e.toFixed(s)))):e),i={h:e,s:t,v:s,a:r,toHSVA(){const e=[i.h,i.s,i.v,i.a];return e.toString=n(e,(e=>`hsva(${e[0]}, ${e[1]}%, ${e[2]}%, ${i.a})`)),e},toHSLA(){const e=[..._(i.h,i.s,i.v),i.a];return e.toString=n(e,(e=>`hsla(${e[0]}, ${e[1]}%, ${e[2]}%, ${i.a})`)),e},toRGBA(){const e=[...m(i.h,i.s,i.v),i.a];return e.toString=n(e,(e=>`rgba(${e[0]}, ${e[1]}, ${e[2]}, ${i.a})`)),e},toCMYK(){const e=((e,t,s)=>{const r=m(e,t,s),n=r[0]/255,i=r[1]/255,o=r[2]/255,a=d(1-n,1-i,1-o);return[100*(1===a?0:(1-n-a)/(1-a)),100*(1===a?0:(1-i-a)/(1-a)),100*(1===a?0:(1-o-a)/(1-a)),100*a]})(i.h,i.s,i.v);return e.toString=n(e,(e=>`cmyk(${e[0]}%, ${e[1]}%, ${e[2]}%, ${e[3]}%)`)),e},toHEXA(){const e=((e,t,s)=>m(e,t,s).map((e=>h(e).toString(16).padStart(2,"0"))))(i.h,i.s,i.v),t=i.a>=1?"":Number((255*i.a).toFixed(0)).toString(16).toUpperCase().padStart(2,"0");return t&&e.push(t),e.toString=()=>`#${e.join("").toUpperCase()}`,e},clone:()=>E(i.h,i.s,i.v,i.a)};return i}const y=e=>Math.max(Math.min(e,1),0);function v(e){const t={options:Object.assign({lock:null,onchange:()=>0,onstop:()=>0},e),_keyboard(e){const{options:s}=t,{type:r,key:n}=e;if(document.activeElement===s.wrapper){const{lock:s}=t.options,i="ArrowUp"===n,o="ArrowRight"===n,a="ArrowDown"===n,c="ArrowLeft"===n;if("keydown"===r&&(i||o||a||c)){let r=0,n=0;"v"===s?r=i||o?1:-1:"h"===s?r=i||o?-1:1:(n=i?-1:a?1:0,r=c?-1:o?1:0),t.update(y(t.cache.x+.01*r),y(t.cache.y+.01*n)),e.preventDefault()}else n.startsWith("Arrow")&&(t.options.onstop(),e.preventDefault())}},_tapstart(e){n(document,["mouseup","touchend","touchcancel"],t._tapstop),n(document,["mousemove","touchmove"],t._tapmove),e.cancelable&&e.preventDefault(),t._tapmove(e)},_tapmove(e){const{options:s,cache:r}=t,{lock:n,element:i,wrapper:o}=s,a=o.getBoundingClientRect();let c=0,l=0;if(e){const t=e&&e.touches&&e.touches[0];c=e?(t||e).clientX:0,l=e?(t||e).clientY:0,ca.left+a.width&&(c=a.left+a.width),la.top+a.height&&(l=a.top+a.height),c-=a.left,l-=a.top}else r&&(c=r.x*a.width,l=r.y*a.height);"h"!==n&&(i.style.left=`calc(${c/a.width*100}% - ${i.offsetWidth/2}px)`),"v"!==n&&(i.style.top=`calc(${l/a.height*100}% - ${i.offsetHeight/2}px)`),t.cache={x:c/a.width,y:l/a.height};const u=y(c/a.width),d=y(l/a.height);switch(n){case"v":return s.onchange(u);case"h":return s.onchange(d);default:return s.onchange(u,d)}},_tapstop(){t.options.onstop(),i(document,["mouseup","touchend","touchcancel"],t._tapstop),i(document,["mousemove","touchmove"],t._tapmove)},trigger(){t._tapmove()},update(e=0,s=0){const{left:r,top:n,width:i,height:o}=t.options.wrapper.getBoundingClientRect();"h"===t.options.lock&&(s=e),t._tapmove({clientX:r+i*e,clientY:n+o*s})},destroy(){const{options:e,_tapstart:s,_keyboard:r}=t;i(document,["keydown","keyup"],r),i([e.wrapper,e.element],"mousedown",s),i([e.wrapper,e.element],"touchstart",s,{passive:!1})}},{options:s,_tapstart:r,_keyboard:o}=t;return n([s.wrapper,s.element],"mousedown",r),n([s.wrapper,s.element],"touchstart",r,{passive:!1}),n(document,["keydown","keyup"],o),t}function T(e={}){e=Object.assign({onchange:()=>0,className:"",elements:[]},e);const t=n(e.elements,"click",(t=>{e.elements.forEach((s=>s.classList[t.target===s?"add":"remove"](e.className))),e.onchange(t),t.stopPropagation()}));return{destroy:()=>i(...t)}}const k={variantFlipOrder:{start:"sme",middle:"mse",end:"ems"},positionFlipOrder:{top:"tbrl",right:"rltb",bottom:"btrl",left:"lrbt"},position:"bottom",margin:8,padding:0};class S{static utils=s;static version="1.9.0";static I18N_DEFAULTS={"ui:dialog":"color picker dialog","btn:toggle":"toggle color picker dialog","btn:swatch":"color swatch","btn:last-color":"use previous color","btn:save":"Save","btn:cancel":"Cancel","btn:clear":"Clear","aria:btn:save":"save and close","aria:btn:cancel":"cancel and close","aria:btn:clear":"clear and close","aria:input":"color input field","aria:palette":"color selection area","aria:hue":"hue selection slider","aria:opacity":"selection slider"};static DEFAULT_OPTIONS={appClass:null,theme:"classic",useAsButton:!1,padding:8,disabled:!1,comparison:!0,closeOnScroll:!1,outputPrecision:0,lockOpacity:!1,autoReposition:!0,container:"body",components:{interaction:{}},i18n:{},swatches:null,inline:!1,sliders:null,default:"#42445a",defaultRepresentation:null,position:"bottom-middle",adjustableNumbers:!0,showAlways:!1,closeWithKey:"Escape"};_initializingActive=!0;_recalc=!0;_nanopop=null;_root=null;_color=E();_lastColor=E();_swatchColors=[];_setupAnimationFrame=null;_eventListener={init:[],save:[],hide:[],show:[],clear:[],change:[],changestop:[],cancel:[],swatchselect:[]};constructor(e){this.options=e=Object.assign({...S.DEFAULT_OPTIONS},e);const{swatches:t,components:s,theme:r,sliders:n,lockOpacity:i,padding:o}=e;["nano","monolith"].includes(r)&&!n&&(e.sliders="h"),s.interaction||(s.interaction={});const{preview:a,opacity:c,hue:l,palette:u}=s;s.opacity=!i&&c,s.palette=u||a||c||l,this._preBuild(),this._buildComponents(),this._bindEvents(),this._finalBuild(),t&&t.length&&t.forEach((e=>this.addSwatch(e)));const{button:d,app:p}=this._root;this._nanopop=((e,t,s)=>{const r="object"!=typeof e||e instanceof HTMLElement?{reference:e,popper:t,...s}:e;return{update(e=r){const{reference:t,popper:s}=Object.assign(r,e);if(!s||!t)throw new Error("Popper- or reference-element missing.");return((e,t,s)=>{const{container:r,arrow:n,margin:i,padding:o,position:a,variantFlipOrder:c,positionFlipOrder:l}={container:document.documentElement.getBoundingClientRect(),...k,...s},{left:u,top:d}=t.style;t.style.left="0",t.style.top="0";const p=e.getBoundingClientRect(),g=t.getBoundingClientRect(),h={t:p.top-g.height-i,b:p.bottom+i,r:p.right+i,l:p.left-g.width-i},m={vs:p.left,vm:p.left+p.width/2-g.width/2,ve:p.left+p.width-g.width,hs:p.top,hm:p.bottom-p.height/2-g.height/2,he:p.bottom-g.height},[_,f="middle"]=a.split("-"),b=l[_],A=c[f],{top:w,left:E,bottom:y,right:v}=r;for(const e of b){const s="t"===e||"b"===e;let r=h[e];const[i,a]=s?["top","left"]:["left","top"],[c,l]=s?[g.height,g.width]:[g.width,g.height],[u,d]=s?[y,v]:[v,y],[_,f]=s?[w,E]:[E,w];if(!(r<_||r+c+o>u))for(const u of A){let h=m[(s?"v":"h")+u];if(!(hd)){if(h-=g[a],r-=g[i],t.style[a]=`${h}px`,t.style[i]=`${r}px`,n){const e=s?p.width/2:p.height/2,t=2*enew S(e);_preBuild(){const{options:e}=this;for(const t of["el","container"])e[t]=l(e[t]);this._root=(e=>{const{components:t,useAsButton:s,inline:r,appClass:n,theme:i,lockOpacity:o}=e.options,c=e=>e?"":'style="display:none" hidden',l=t=>e._t(t),u=a(`\n
\n\n ${s?"":''}\n\n
\n
\n
\n \n
\n
\n\n
\n
\n
\n
\n\n
\n
\n
\n
\n\n
\n
\n
\n
\n
\n\n
\n\n
\n \n\n \n \n \n \n \n\n \n \n \n
\n
\n
\n `),d=u.interaction;return d.options.find((e=>!e.hidden&&!e.classList.add("active"))),d.type=()=>d.options.find((e=>e.classList.contains("active"))),u})(this),e.useAsButton&&(this._root.button=e.el),e.container.appendChild(this._root.root)}_finalBuild(){const e=this.options,t=this._root;if(e.container.removeChild(t.root),e.inline){const s=e.el.parentElement;e.el.nextSibling?s.insertBefore(t.app,e.el.nextSibling):s.appendChild(t.app)}else e.container.appendChild(t.app);e.useAsButton?e.inline&&e.el.remove():e.el.parentNode.replaceChild(t.root,e.el),e.disabled&&this.disable(),e.comparison||(t.button.style.transition="none",e.useAsButton||(t.preview.lastColor.style.transition="none")),this.hide()}_buildComponents(){const e=this,t=this.options.components,s=(e.options.sliders||"v").repeat(2),[r,n]=s.match(/^[vh]+$/g)?s:[],i=()=>this._color||(this._color=this._lastColor.clone()),o={palette:v({element:e._root.palette.picker,wrapper:e._root.palette.palette,onstop:()=>e._emit("changestop","slider",e),onchange(s,r){if(!t.palette)return;const n=i(),{_root:o,options:a}=e,{lastColor:c,currentColor:l}=o.preview;e._recalc&&(n.s=100*s,n.v=100-100*r,n.v<0&&(n.v=0),e._updateOutput("slider"));const u=n.toRGBA().toString(0);this.element.style.background=u,this.wrapper.style.background=`\n linear-gradient(to top, rgba(0, 0, 0, ${n.a}), transparent),\n linear-gradient(to left, hsla(${n.h}, 100%, 50%, ${n.a}), rgba(255, 255, 255, ${n.a}))\n `,a.comparison?a.useAsButton||e._lastColor||c.style.setProperty("--pcr-color",u):(o.button.style.setProperty("--pcr-color",u),o.button.classList.remove("clear"));const d=n.toHEXA().toString();for(const{el:t,color:s}of e._swatchColors)t.classList[d===s.toHEXA().toString()?"add":"remove"]("pcr-active");l.style.setProperty("--pcr-color",u)}}),hue:v({lock:"v"===n?"h":"v",element:e._root.hue.picker,wrapper:e._root.hue.slider,onstop:()=>e._emit("changestop","slider",e),onchange(s){if(!t.hue||!t.palette)return;const r=i();e._recalc&&(r.h=360*s),this.element.style.backgroundColor=`hsl(${r.h}, 100%, 50%)`,o.palette.trigger()}}),opacity:v({lock:"v"===r?"h":"v",element:e._root.opacity.picker,wrapper:e._root.opacity.slider,onstop:()=>e._emit("changestop","slider",e),onchange(s){if(!t.opacity||!t.palette)return;const r=i();e._recalc&&(r.a=Math.round(100*s)/100),this.element.style.background=`rgba(0, 0, 0, ${r.a})`,o.palette.trigger()}}),selectable:T({elements:e._root.interaction.options,className:"active",onchange(t){e._representation=t.target.getAttribute("data-type").toUpperCase(),e._recalc&&e._updateOutput("swatch")}})};this._components=o}_bindEvents(){const{_root:e,options:t}=this,s=[n(e.interaction.clear,"click",(()=>this._clearColor())),n([e.interaction.cancel,e.preview.lastColor],"click",(()=>{this.setHSVA(...(this._lastColor||this._color).toHSVA(),!0),this._emit("cancel")})),n(e.interaction.save,"click",(()=>{!this.applyColor()&&!t.showAlways&&this.hide()})),n(e.interaction.result,["keyup","input"],(e=>{this.setColor(e.target.value,!0)&&!this._initializingActive&&(this._emit("change",this._color,"input",this),this._emit("changestop","input",this)),e.stopImmediatePropagation()})),n(e.interaction.result,["focus","blur"],(e=>{this._recalc="blur"===e.type,this._recalc&&this._updateOutput(null)})),n([e.palette.palette,e.palette.picker,e.hue.slider,e.hue.picker,e.opacity.slider,e.opacity.picker],["mousedown","touchstart"],(()=>this._recalc=!0),{passive:!0})];if(!t.showAlways){const r=t.closeWithKey;s.push(n(e.button,"click",(()=>this.isOpen()?this.hide():this.show())),n(document,"keyup",(e=>this.isOpen()&&(e.key===r||e.code===r)&&this.hide())),n(document,["touchstart","mousedown"],(t=>{this.isOpen()&&!c(t).some((t=>t===e.app||t===e.button))&&this.hide()}),{capture:!0}))}if(t.adjustableNumbers){const t={rgba:[255,255,255,1],hsva:[360,100,100,1],hsla:[360,100,100,1],cmyk:[100,100,100,100]};u(e.interaction.result,((e,s,r)=>{const n=t[this.getColorRepresentation().toLowerCase()];if(n){const t=n[r],i=e+(t>=100?1e3*s:s);return i<=0?0:Number((i{r.isOpen()&&(t.closeOnScroll&&r.hide(),null===e?(e=setTimeout((()=>e=null),100),requestAnimationFrame((function t(){r._rePositioningPicker(),null!==e&&requestAnimationFrame(t)}))):(clearTimeout(e),e=setTimeout((()=>e=null),100)))}),{capture:!0}))}this._eventBindings=s}_rePositioningPicker(){const{options:e}=this;if(!e.inline&&!this._nanopop.update({container:document.body.getBoundingClientRect(),position:e.position})){const e=this._root.app,t=e.getBoundingClientRect();e.style.top=(window.innerHeight-t.height)/2+"px",e.style.left=(window.innerWidth-t.width)/2+"px"}}_updateOutput(e){const{_root:t,_color:s,options:r}=this;if(t.interaction.type()){const e=`to${t.interaction.type().getAttribute("data-type")}`;t.interaction.result.value="function"==typeof s[e]?s[e]().toString(r.outputPrecision):""}!this._initializingActive&&this._recalc&&this._emit("change",s,e,this)}_clearColor(e=!1){const{_root:t,options:s}=this;s.useAsButton||t.button.style.setProperty("--pcr-color","rgba(0, 0, 0, 0.15)"),t.button.classList.add("clear"),s.showAlways||this.hide(),this._lastColor=null,this._initializingActive||e||(this._emit("save",null),this._emit("clear"))}_parseLocalColor(e){const{values:t,type:s,a:r}=(e=>{e=e.match(/^[a-zA-Z]+$/)?(e=>{if("black"===e.toLowerCase())return"#000";const t=document.createElement("canvas").getContext("2d");return t.fillStyle=e,"#000"===t.fillStyle?null:t.fillStyle})(e):e;const t={cmyk:/^cmyk\D+([\d.]+)\D+([\d.]+)\D+([\d.]+)\D+([\d.]+)/i,rgba:/^rgba?\D+([\d.]+)(%?)\D+([\d.]+)(%?)\D+([\d.]+)(%?)\D*?(([\d.]+)(%?)|$)/i,hsla:/^hsla?\D+([\d.]+)\D+([\d.]+)\D+([\d.]+)\D*?(([\d.]+)(%?)|$)/i,hsva:/^hsva?\D+([\d.]+)\D+([\d.]+)\D+([\d.]+)\D*?(([\d.]+)(%?)|$)/i,hexa:/^#?(([\dA-Fa-f]{3,4})|([\dA-Fa-f]{6})|([\dA-Fa-f]{8}))$/i},s=e=>e.map((e=>/^(|\d+)\.\d+|\d+$/.test(e)?Number(e):void 0));let r;e:for(const n in t)if(r=t[n].exec(e))switch(n){case"cmyk":{const[,e,t,i,o]=s(r);if(e>100||t>100||i>100||o>100)break e;return{values:b(e,t,i,o),type:n}}case"rgba":{let[,e,,t,,i,,,o]=s(r);if(e="%"===r[2]?e/100*255:e,t="%"===r[4]?t/100*255:t,i="%"===r[6]?i/100*255:i,o="%"===r[9]?o/100:o,e>255||t>255||i>255||o<0||o>1)break e;return{values:[...f(e,t,i),o],a:o,type:n}}case"hexa":{let[,e]=r;4!==e.length&&3!==e.length||(e=e.split("").map((e=>e+e)).join(""));const t=e.substring(0,6);let s=e.substring(6);return s=s?parseInt(s,16)/255:void 0,{values:[...w(t),s],a:s,type:n}}case"hsla":{let[,e,t,i,,o]=s(r);if(o="%"===r[6]?o/100:o,e>360||t>100||i>100||o<0||o>1)break e;return{values:[...A(e,t,i),o],a:o,type:n}}case"hsva":{let[,e,t,i,,o]=s(r);if(o="%"===r[6]?o/100:o,e>360||t>100||i>100||o<0||o>1)break e;return{values:[e,t,i,o],a:o,type:n}}}return{values:null,type:null}})(e),{lockOpacity:n}=this.options,i=void 0!==r&&1!==r;return t&&3===t.length&&(t[3]=void 0),{values:!t||n&&i?null:t,type:s}}_t(e){return this.options.i18n[e]||S.I18N_DEFAULTS[e]}_emit(e,...t){this._eventListener[e].forEach((e=>e(...t,this)))}on(e,t){return this._eventListener[e].push(t),this}off(e,t){const s=this._eventListener[e]||[],r=s.indexOf(t);return~r&&s.splice(r,1),this}addSwatch(e){const{values:t}=this._parseLocalColor(e);if(t){const{_swatchColors:e,_root:s}=this,r=E(...t),i=o(`