diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fa51ffe..f0bf2663 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # SOE Profile +11.2.1 +------------------------------------------------------------------------------- +- Provide items per page for graphql views +- Expose event image via graphql +- Added external image url for events content from Localist + 11.2.1 ------------------------------------------------------------------------------- - Fixed logger syntax during site install. diff --git a/composer.json b/composer.json index 777d8c72..f7f0f963 100644 --- a/composer.json +++ b/composer.json @@ -87,6 +87,7 @@ "drupal/graphql_compose": "^2.0", "drupal/hook_event_dispatcher": "^4.0@beta", "drupal/image_effects": "^3.2", + "drupal/imagecache_external": "^3.0", "drupal/imagemagick": "^3.1", "drupal/jquery_ui_draggable": "^2.0", "drupal/jsonapi_extras": "^3.20", diff --git a/config/sync/core.entity_form_display.node.stanford_event.default.yml b/config/sync/core.entity_form_display.node.stanford_event.default.yml index 3a78723a..c2f718ec 100644 --- a/config/sync/core.entity_form_display.node.stanford_event.default.yml +++ b/config/sync/core.entity_form_display.node.stanford_event.default.yml @@ -383,6 +383,7 @@ hidden: path: true promote: true sticky: true + su_event_ext_image: true uid: true unpublish_on: true url_redirects: true diff --git a/config/sync/core.entity_view_display.node.stanford_event.default.yml b/config/sync/core.entity_view_display.node.stanford_event.default.yml index 2b08c659..a9a53402 100644 --- a/config/sync/core.entity_view_display.node.stanford_event.default.yml +++ b/config/sync/core.entity_view_display.node.stanford_event.default.yml @@ -806,6 +806,7 @@ hidden: layout_builder__layout: true search_api_excerpt: true stanford_intranet__access: true + su_event_ext_image: true su_event_groups: true su_event_keywords: true su_event_schedule: true diff --git a/config/sync/core.entity_view_display.node.stanford_event.search_indexing.yml b/config/sync/core.entity_view_display.node.stanford_event.search_indexing.yml index d6257642..ca3856db 100644 --- a/config/sync/core.entity_view_display.node.stanford_event.search_indexing.yml +++ b/config/sync/core.entity_view_display.node.stanford_event.search_indexing.yml @@ -206,6 +206,7 @@ hidden: links: true search_api_excerpt: true stanford_intranet__access: true + su_event_ext_image: true su_event_groups: true su_event_keywords: true su_event_subject: true diff --git a/config/sync/core.entity_view_display.node.stanford_event.stanford_card.yml b/config/sync/core.entity_view_display.node.stanford_event.stanford_card.yml index 72a44120..6525e25f 100644 --- a/config/sync/core.entity_view_display.node.stanford_event.stanford_card.yml +++ b/config/sync/core.entity_view_display.node.stanford_event.stanford_card.yml @@ -257,6 +257,7 @@ hidden: su_event_cta: true su_event_dek: true su_event_email: true + su_event_ext_image: true su_event_groups: true su_event_keywords: true su_event_map_link: true diff --git a/config/sync/core.entity_view_display.node.stanford_event.teaser.yml b/config/sync/core.entity_view_display.node.stanford_event.teaser.yml index 5556aed2..fd574dec 100644 --- a/config/sync/core.entity_view_display.node.stanford_event.teaser.yml +++ b/config/sync/core.entity_view_display.node.stanford_event.teaser.yml @@ -267,6 +267,7 @@ hidden: su_event_contact_info: true su_event_cta: true su_event_email: true + su_event_ext_image: true su_event_groups: true su_event_keywords: true su_event_map_link: true diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index 6ba6681f..9d10797d 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -89,6 +89,7 @@ module: hook_event_dispatcher: 0 image: 0 image_effects: 0 + imagecache_external: 0 imagemagick: 0 inline_entity_form: 0 inline_form_errors: 0 diff --git a/config/sync/field.field.node.stanford_event.su_event_ext_image.yml b/config/sync/field.field.node.stanford_event.su_event_ext_image.yml new file mode 100644 index 00000000..d3e2a9be --- /dev/null +++ b/config/sync/field.field.node.stanford_event.su_event_ext_image.yml @@ -0,0 +1,19 @@ +uuid: 95b1e2c6-5f15-48c0-acd8-22f2d2b427ee +langcode: en +status: true +dependencies: + config: + - field.storage.node.su_event_ext_image + - node.type.stanford_event +id: node.stanford_event.su_event_ext_image +field_name: su_event_ext_image +entity_type: node +bundle: stanford_event +label: 'External Image' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/config/sync/field.storage.node.su_event_ext_image.yml b/config/sync/field.storage.node.su_event_ext_image.yml new file mode 100644 index 00000000..6c137792 --- /dev/null +++ b/config/sync/field.storage.node.su_event_ext_image.yml @@ -0,0 +1,25 @@ +uuid: aae7ab5a-9634-43b4-a6b0-eee8a54cc8bd +langcode: en +status: true +dependencies: + module: + - field_permissions + - node +third_party_settings: + field_permissions: + permission_type: custom +id: node.su_event_ext_image +field_name: su_event_ext_image +entity_type: node +type: string +settings: + max_length: 255 + case_sensitive: false + is_ascii: false +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/graphql_compose.settings.yml b/config/sync/graphql_compose.settings.yml index da38b01b..1eae9ed8 100644 --- a/config/sync/graphql_compose.settings.yml +++ b/config/sync/graphql_compose.settings.yml @@ -459,6 +459,8 @@ field_config: enabled: true su_event_email: enabled: true + su_event_ext_image: + enabled: true su_event_groups: enabled: true su_event_keywords: diff --git a/config/sync/imagecache_external.settings.yml b/config/sync/imagecache_external.settings.yml new file mode 100644 index 00000000..b408cc4a --- /dev/null +++ b/config/sync/imagecache_external.settings.yml @@ -0,0 +1,25 @@ +_core: + default_config_hash: epwG9LevfsqBi6thp5KK9oC2bdwklXNQzvouyiLWq2g +imagecache_directory: externals +imagecache_subdirectories: false +imagecache_default_extension: .jpg +imagecache_external_batch_flush_limit: 1000 +imagecache_external_hosts: "localist-images.azureedge.net\r\nstanford.edu" +imagecache_external_management: unmanaged +imagecache_external_use_whitelist: true +imagecache_fallback_image: 0 +imagecache_external_allowed_mimetypes: + - image/jpg + - image/jpg;charset=utf-8 + - image/jpeg + - image/jpeg;charset=utf-8 + - image/png + - image/png;charset=utf-8 + - image/gif + - image/gif;charset=utf-8 + - image/webp + - image/webp;charset=utf-8 + - application/octet-stream + - application/octet-stream;charset=utf-8 + - binary/octet-stream +imagecache_external_cron_flush_frequency: 7 diff --git a/config/sync/migrate_plus.migration.stanford_localist_importer.yml b/config/sync/migrate_plus.migration.stanford_localist_importer.yml index dda30ac1..04776793 100644 --- a/config/sync/migrate_plus.migration.stanford_localist_importer.yml +++ b/config/sync/migrate_plus.migration.stanford_localist_importer.yml @@ -494,6 +494,7 @@ process: entity_type: taxonomy_term ignore_case: true source: name + su_event_ext_image: photo_url destination: plugin: 'entity:node' overwrite_properties: @@ -511,6 +512,7 @@ destination: - su_event_date_time/end_value - su_event_date_time/timezone - su_event_date_time/value + - su_event_ext_image - su_event_groups - su_event_keywords - su_event_map_link/title diff --git a/config/sync/ultimate_cron.job.imagecache_external_cron.yml b/config/sync/ultimate_cron.job.imagecache_external_cron.yml new file mode 100644 index 00000000..0976672a --- /dev/null +++ b/config/sync/ultimate_cron.job.imagecache_external_cron.yml @@ -0,0 +1,17 @@ +uuid: 32036a98-2245-430e-a74f-cccaa050c552 +langcode: en +status: true +dependencies: + module: + - imagecache_external +title: 'Default cron handler' +id: imagecache_external_cron +weight: 0 +module: imagecache_external +callback: imagecache_external_cron +scheduler: + id: simple +launcher: + id: serial +logger: + id: database diff --git a/config/sync/user.role.anonymous.yml b/config/sync/user.role.anonymous.yml index bc765967..24da0339 100644 --- a/config/sync/user.role.anonymous.yml +++ b/config/sync/user.role.anonymous.yml @@ -48,6 +48,7 @@ permissions: - 'view stanford_global_message config page entity' - 'view stanford_local_footer config page entity' - 'view stanford_super_footer config page entity' + - 'view su_event_ext_image' - 'view su_metatags' - 'view su_policy_auto_prefix' - 'view su_policy_chapter' diff --git a/config/sync/user.role.authenticated.yml b/config/sync/user.role.authenticated.yml index 6bb48026..f5dbf86f 100644 --- a/config/sync/user.role.authenticated.yml +++ b/config/sync/user.role.authenticated.yml @@ -45,6 +45,7 @@ permissions: - 'view own su_site_url' - 'view policy log' - 'view printer friendly versions' + - 'view su_event_ext_image' - 'view su_metatags' - 'view su_policy_auto_prefix' - 'view su_policy_chapter' diff --git a/config/sync/views.view.stanford_basic_pages.yml b/config/sync/views.view.stanford_basic_pages.yml index b7415bf8..ebd7e257 100644 --- a/config/sync/views.view.stanford_basic_pages.yml +++ b/config/sync/views.view.stanford_basic_pages.yml @@ -615,10 +615,26 @@ display: position: 99 display_options: pager: - type: some + type: full options: offset: 0 - items_per_page: 20 + items_per_page: 21 + total_pages: null + id: 0 + tags: + next: 'Next ›' + previous: '‹ Previous' + first: '« First' + last: 'Last »' + expose: + items_per_page: true + items_per_page_label: items + items_per_page_options: '3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,90,93,96,99' + items_per_page_options_all: true + items_per_page_options_all_label: all + offset: true + offset_label: offset + quantity: 9 display_description: '' display_extenders: { } graphql_query_name: stanfordBasicPages @@ -628,6 +644,7 @@ display: - 'languages:language_content' - 'languages:language_interface' - url + - url.query_args - 'user.node_grants:view' - user.permissions tags: @@ -680,10 +697,26 @@ display: position: 99 display_options: pager: - type: some + type: full options: offset: 0 items_per_page: 3 + total_pages: null + id: 0 + tags: + next: 'Next ›' + previous: '‹ Previous' + first: '« First' + last: 'Last »' + expose: + items_per_page: true + items_per_page_label: items + items_per_page_options: '3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,90,93,96,99' + items_per_page_options_all: true + items_per_page_options_all_label: all + offset: true + offset_label: offset + quantity: 9 style: type: graphql options: @@ -704,6 +737,7 @@ display: - 'languages:language_content' - 'languages:language_interface' - url + - url.query_args - 'user.node_grants:view' - user.permissions tags: diff --git a/config/sync/views.view.stanford_courses.yml b/config/sync/views.view.stanford_courses.yml index ce2432cb..e59ea69c 100644 --- a/config/sync/views.view.stanford_courses.yml +++ b/config/sync/views.view.stanford_courses.yml @@ -1981,10 +1981,26 @@ display: output_url_as_text: false absolute: false pager: - type: some + type: full options: offset: 0 - items_per_page: 20 + items_per_page: 21 + total_pages: null + id: 0 + tags: + next: 'Next ›' + previous: '‹ Previous' + first: '« First' + last: 'Last »' + expose: + items_per_page: true + items_per_page_label: items + items_per_page_options: '3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,90,93,96,99' + items_per_page_options_all: true + items_per_page_options_all_label: all + offset: true + offset_label: offset + quantity: 9 arguments: term_node_taxonomy_name_depth: id: term_node_taxonomy_name_depth @@ -2039,6 +2055,7 @@ display: - 'languages:language_content' - 'languages:language_interface' - url + - url.query_args - 'user.node_grants:view' - user.permissions tags: @@ -3796,10 +3813,26 @@ display: separator: ', ' field_api_classes: false pager: - type: some + type: full options: offset: 0 items_per_page: 3 + total_pages: null + id: 0 + tags: + next: 'Next ›' + previous: '‹ Previous' + first: '« First' + last: 'Last »' + expose: + items_per_page: true + items_per_page_label: items + items_per_page_options: '3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,90,93,96,99' + items_per_page_options_all: true + items_per_page_options_all_label: all + offset: true + offset_label: offset + quantity: 9 style: type: graphql options: null @@ -3820,6 +3853,7 @@ display: - 'languages:language_content' - 'languages:language_interface' - url + - url.query_args - 'user.node_grants:view' - user.permissions tags: diff --git a/config/sync/views.view.stanford_events.yml b/config/sync/views.view.stanford_events.yml index d4ead218..c64b3222 100644 --- a/config/sync/views.view.stanford_events.yml +++ b/config/sync/views.view.stanford_events.yml @@ -1030,10 +1030,26 @@ display: separator: ', ' field_api_classes: false pager: - type: some + type: full options: offset: 0 items_per_page: 3 + total_pages: null + id: 0 + tags: + next: 'Next ›' + previous: '‹ Previous' + first: '« First' + last: 'Last »' + expose: + items_per_page: true + items_per_page_label: items + items_per_page_options: '3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,90,93,96,99' + items_per_page_options_all: true + items_per_page_options_all_label: all + offset: true + offset_label: offset + quantity: 9 arguments: term_node_taxonomy_name_depth: id: term_node_taxonomy_name_depth @@ -1211,6 +1227,7 @@ display: - 'languages:language_content' - 'languages:language_interface' - url + - url.query_args - 'user.node_grants:view' - user.permissions tags: { } @@ -4166,10 +4183,26 @@ display: output_url_as_text: false absolute: false pager: - type: some + type: full options: offset: 0 - items_per_page: 20 + items_per_page: 21 + total_pages: null + id: 0 + tags: + next: 'Next ›' + previous: '‹ Previous' + first: '« First' + last: 'Last »' + expose: + items_per_page: true + items_per_page_label: items + items_per_page_options: '3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,90,93,96,99' + items_per_page_options_all: true + items_per_page_options_all_label: all + offset: true + offset_label: offset + quantity: 9 arguments: term_node_taxonomy_name_depth: id: term_node_taxonomy_name_depth @@ -4344,6 +4377,7 @@ display: - 'languages:language_content' - 'languages:language_interface' - url + - url.query_args - 'user.node_grants:view' - user.permissions tags: diff --git a/config/sync/views.view.stanford_news.yml b/config/sync/views.view.stanford_news.yml index e9fa6547..c883efd0 100644 --- a/config/sync/views.view.stanford_news.yml +++ b/config/sync/views.view.stanford_news.yml @@ -928,10 +928,26 @@ display: position: 9 display_options: pager: - type: some + type: full options: offset: 0 - items_per_page: 20 + items_per_page: 21 + total_pages: null + id: 0 + tags: + next: 'Next ›' + previous: '‹ Previous' + first: '« First' + last: 'Last »' + expose: + items_per_page: true + items_per_page_label: items + items_per_page_options: '3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,90,93,96,99' + items_per_page_options_all: true + items_per_page_options_all_label: all + offset: true + offset_label: offset + quantity: 9 exposed_form: type: basic options: @@ -1083,6 +1099,7 @@ display: - 'languages:language_content' - 'languages:language_interface' - url + - url.query_args - 'user.node_grants:view' - user.permissions tags: @@ -1626,10 +1643,26 @@ display: position: 99 display_options: pager: - type: some + type: full options: offset: 0 items_per_page: 3 + total_pages: null + id: 0 + tags: + next: 'Next ›' + previous: '‹ Previous' + first: '« First' + last: 'Last »' + expose: + items_per_page: true + items_per_page_label: items + items_per_page_options: '3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,90,93,96,99' + items_per_page_options_all: true + items_per_page_options_all_label: all + offset: true + offset_label: offset + quantity: 9 arguments: term_node_taxonomy_name_depth: id: term_node_taxonomy_name_depth @@ -1736,6 +1769,7 @@ display: - 'languages:language_content' - 'languages:language_interface' - url + - url.query_args - 'user.node_grants:view' - user.permissions tags: diff --git a/config/sync/views.view.stanford_person.yml b/config/sync/views.view.stanford_person.yml index 95b2641e..03db28bd 100644 --- a/config/sync/views.view.stanford_person.yml +++ b/config/sync/views.view.stanford_person.yml @@ -1254,6 +1254,27 @@ display: text: 'edit this item' output_url_as_text: false absolute: false + pager: + type: full + options: + offset: 0 + items_per_page: 60 + total_pages: null + id: 0 + tags: + next: 'Next ›' + previous: '‹ Previous' + first: '« First' + last: 'Last »' + expose: + items_per_page: true + items_per_page_label: items + items_per_page_options: '3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,90,93,96,99' + items_per_page_options_all: true + items_per_page_options_all_label: all + offset: true + offset_label: offset + quantity: 9 arguments: term_node_taxonomy_name_depth: id: term_node_taxonomy_name_depth @@ -1307,6 +1328,7 @@ display: - 'languages:language_content' - 'languages:language_interface' - url + - url.query_args - 'user.node_grants:view' - user.permissions tags: diff --git a/config/sync/views.view.stanford_publications.yml b/config/sync/views.view.stanford_publications.yml index 3476003b..57b7e950 100644 --- a/config/sync/views.view.stanford_publications.yml +++ b/config/sync/views.view.stanford_publications.yml @@ -701,10 +701,26 @@ display: output_url_as_text: true absolute: true pager: - type: some + type: full options: offset: 0 - items_per_page: 20 + items_per_page: 21 + total_pages: null + id: 0 + tags: + next: 'Next ›' + previous: '‹ Previous' + first: '« First' + last: 'Last »' + expose: + items_per_page: true + items_per_page_label: items + items_per_page_options: '3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,90,93,96,99' + items_per_page_options_all: true + items_per_page_options_all_label: all + offset: true + offset_label: offset + quantity: 9 defaults: fields: false display_description: '' @@ -716,6 +732,7 @@ display: - 'languages:language_content' - 'languages:language_interface' - url + - url.query_args - 'user.node_grants:view' - user.permissions tags: diff --git a/config/sync/views.view.stanford_shared_tags.yml b/config/sync/views.view.stanford_shared_tags.yml index a785cd83..0cbd8952 100644 --- a/config/sync/views.view.stanford_shared_tags.yml +++ b/config/sync/views.view.stanford_shared_tags.yml @@ -300,10 +300,26 @@ display: position: 99 display_options: pager: - type: some + type: full options: offset: 0 items_per_page: 3 + total_pages: null + id: 0 + tags: + next: 'Next ›' + previous: '‹ Previous' + first: '« First' + last: 'Last »' + expose: + items_per_page: true + items_per_page_label: items + items_per_page_options: '3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,90,93,96,99' + items_per_page_options_all: true + items_per_page_options_all_label: all + offset: true + offset_label: offset + quantity: 9 display_description: '' display_extenders: { } graphql_query_name: stanfordSharedTags @@ -313,6 +329,7 @@ display: - 'languages:language_content' - 'languages:language_interface' - url + - url.query_args - 'user.node_grants:view' - user.permissions tags: { } diff --git a/soe_profile.info.yml b/soe_profile.info.yml index 6e819679..cb000f0e 100644 --- a/soe_profile.info.yml +++ b/soe_profile.info.yml @@ -1,6 +1,6 @@ name: 'SOE Profile' description: 'Jumpstart Website Profile' -version: 11.2.1 +version: 11.2.2 type: profile project: Stanford core_version_requirement: ^9 || ^10 diff --git a/themes/stanford_basic/algolia-search/dist/islands/algolia-search.island.js b/themes/stanford_basic/algolia-search/dist/islands/algolia-search.island.js index f9a2f7d1..212d7d1f 100644 --- a/themes/stanford_basic/algolia-search/dist/islands/algolia-search.island.js +++ b/themes/stanford_basic/algolia-search/dist/islands/algolia-search.island.js @@ -1,5 +1,5 @@ /*! For license information please see algolia-search.island.js.LICENSE.txt */ -!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(self,(()=>(()=>{var e={331:e=>{function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function n(e){return"object"==typeof e&&null!==e}function i(e){return void 0===e}e.exports=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,o,a,s,c,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(i(o=this._events[e]))return!1;if(r(o))switch(arguments.length){case 1:o.call(this);break;case 2:o.call(this,arguments[1]);break;case 3:o.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),o.apply(this,s)}else if(n(o))for(s=Array.prototype.slice.call(arguments,1),a=(u=o.slice()).length,c=0;c0&&this._events[e].length>a&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},t.prototype.removeListener=function(e,t){var i,o,a,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(i=this._events[e]).length,o=-1,i===t||r(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(n(i)){for(s=a;s-- >0;)if(i[s]===t||i[s].listener&&i[s].listener===t){o=s;break}if(o<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},766:(e,t,r)=>{"use strict";var n=r(374),i=r(775),o=r(76);function a(e,t,r){return new n(e,t,r)}a.version=r(336),a.AlgoliaSearchHelper=n,a.SearchParameters=i,a.SearchResults=o,e.exports=a},78:(e,t,r)=>{"use strict";var n=r(331);function i(e,t){this.main=e,this.fn=t,this.lastResults=null}r(853)(i,n),i.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},i.prototype.getModifiedState=function(e){return this.fn(e)},e.exports=i},437:(e,t,r)=>{"use strict";var n=r(344),i=r(116),o=r(803),a={addRefinement:function(e,t,r){if(a.isRefined(e,t,r))return e;var i=""+r,o=e[t]?e[t].concat(i):[i],s={};return s[t]=o,n({},s,e)},removeRefinement:function(e,t,r){if(void 0===r)return a.clearRefinement(e,(function(e,r){return t===r}));var n=""+r;return a.clearRefinement(e,(function(e,r){return t===r&&n===e}))},toggleRefinement:function(e,t,r){if(void 0===r)throw new Error("toggleRefinement should be used with a value");return a.isRefined(e,t,r)?a.removeRefinement(e,t,r):a.addRefinement(e,t,r)},clearRefinement:function(e,t,r){if(void 0===t)return i(e)?{}:e;if("string"==typeof t)return o(e,[t]);if("function"==typeof t){var n=!1,a=Object.keys(e).reduce((function(i,o){var a=e[o]||[],s=a.filter((function(e){return!t(e,o,r)}));return s.length!==a.length&&(n=!0),i[o]=s,i}),{});return n?a:e}},isRefined:function(e,t,r){var n=Boolean(e[t])&&e[t].length>0;if(void 0===r||!n)return n;var i=""+r;return-1!==e[t].indexOf(i)}};e.exports=a},775:(e,t,r)=>{"use strict";var n=r(344),i=r(888),o=r(686),a=r(185),s=r(116),c=r(803),u=r(23),l=r(801),f=r(437);function h(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,r){return h(t[r],e)})):e===t}function p(e){var t=e?p._parseNumbers(e):{};void 0===t.userToken||l(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var r=this;Object.keys(t).forEach((function(e){var n=-1!==p.PARAMETERS.indexOf(e),i=void 0!==t[e];!n&&i&&(r[e]=t[e])}))}p.PARAMETERS=Object.keys(new p),p._parseNumbers=function(e){if(e instanceof p)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach((function(r){var n=e[r];if("string"==typeof n){var i=parseFloat(n);t[r]=isNaN(i)?n:i}})),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map((function(e){return Array.isArray(e)?e.map((function(e){return parseFloat(e)})):e}))),e.numericRefinements){var r={};Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t]||{};r[t]={},Object.keys(n).forEach((function(e){var i=n[e].map((function(e){return Array.isArray(e)?e.map((function(e){return"string"==typeof e?parseFloat(e):e})):"string"==typeof e?parseFloat(e):e}));r[t][e]=i}))})),t.numericRefinements=r}return a({},e,t)},p.make=function(e){var t=new p(e);return(e.hierarchicalFacets||[]).forEach((function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(r=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},p.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&r.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&r.numericRefinements&&s(r.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):s(e.numericRefinements)&&r.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},p.prototype={constructor:p,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:f.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:f.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:f.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:f.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var n=u(r);if(this.isNumericRefined(e,t,n))return this;var i=a({},this.numericRefinements);return i[e]=a({},i[e]),i[e][t]?(i[e][t]=i[e][t].slice(),i[e][t].push(n)):i[e][t]=[n],this.setQueryParameters({numericRefinements:i})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,r){var n=r;return void 0!==n?this.isNumericRefined(e,t,n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,i){return i===e&&r.op===t&&h(r.val,u(n))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,n){return n===e&&r.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,r){return r===e}))}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return s(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return c(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,r=this.numericRefinements,n=Object.keys(r).reduce((function(n,i){var o=r[i],a={};return o=o||{},Object.keys(o).forEach((function(r){var n=o[r]||[],s=[];n.forEach((function(t){e({val:t,op:r},i,"numeric")||s.push(t)})),s.length!==n.length&&(t=!0),a[r]=s})),n[i]=a,n}),{});return t?n:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:f.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:f.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:f.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter((function(t){return t!==e}))}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter((function(t){return t!==e}))}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter((function(t){return t.name!==e}))}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:f.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:f.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:f.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter((function(t){return t!==e}))};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:f.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:f.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:f.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),i={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?i[e]=[]:i[e]=[t.slice(0,t.lastIndexOf(r))]:i[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},i,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:n({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&f.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var r=this.getHierarchicalRefinement(e);return t?-1!==r.indexOf(t):r.length>0},isNumericRefined:function(e,t,r){if(void 0===r&&void 0===t)return Boolean(this.numericRefinements[e]);var n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!n)return n;var o,a,s=u(r),c=void 0!==(o=this.numericRefinements[e][t],a=s,i(o,(function(e){return h(e,a)})));return n&&c},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=o(Object.keys(this.numericRefinements).filter((function(t){return Object.keys(e.numericRefinements[t]).length>0})),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter((function(t){return e.disjunctiveFacetsRefinements[t].length>0})).concat(t).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var e=this;return o(this.hierarchicalFacets.map((function(e){return e.name})),Object.keys(this.hierarchicalFacetsRefinements).filter((function(t){return e.hierarchicalFacetsRefinements[t].length>0}))).sort()},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter((function(t){return-1===e.indexOf(t)}))},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},r=this;return Object.keys(this).forEach((function(n){var i=r[n];-1===e.indexOf(n)&&void 0!==i&&(t[n]=i)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=p.validate(this,e);if(t)throw t;var r=this,n=p._parseNumbers(e),i=Object.keys(this).reduce((function(e,t){return e[t]=r[t],e}),{}),o=Object.keys(n).reduce((function(e,t){var r=void 0!==e[t],i=void 0!==n[t];return r&&!i?c(e,[t]):(i&&(e[t]=n[t]),e)}),i);return new this.constructor(o)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return i(this.hierarchicalFacets,(function(t){return t.name===e}))},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(r).map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},e.exports=p},210:(e,t,r)=>{"use strict";e.exports=function(e){return function(t,r){var n=e.hierarchicalFacets[r],u=e.hierarchicalFacetsRefinements[n.name]&&e.hierarchicalFacetsRefinements[n.name][0]||"",l=e._getHierarchicalFacetSeparator(n),f=e._getHierarchicalRootPath(n),h=e._getHierarchicalShowParentLevel(n),p=o(e._getHierarchicalFacetSortBy(n)),d=t.every((function(e){return e.exhaustive})),m=function(e,t,r,n,o){return function(u,l,f){var h=u;if(f>0){var p=0;for(h=u;p{"use strict";var n=r(587),i=r(344),o=r(39),a=r(888),s=r(725),c=r(293),u=r(185),l=r(148),f=o.escapeFacetValue,h=o.unescapeFacetValue,p=r(210);function d(e){var t={};return e.forEach((function(e,r){t[e]=r})),t}function m(e,t,r){t&&t[r]&&(e.stats=t[r])}function y(e,t,r){var o=t[0];this._rawResults=t;var c=this;Object.keys(o).forEach((function(e){c[e]=o[e]})),Object.keys(r||{}).forEach((function(e){c[e]=r[e]})),this.processingTimeMS=t.reduce((function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS}),0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map((function(){return[]})),this.facets=[];var l=e.getRefinedDisjunctiveFacets(),f=d(e.facets),y=d(e.disjunctiveFacets),v=1,g=o.facets||{};Object.keys(g).forEach((function(t){var r,n,i=g[t],u=(r=e.hierarchicalFacets,n=t,a(r,(function(e){return(e.attributes||[]).indexOf(n)>-1})));if(u){var l=u.attributes.indexOf(t),h=s(e.hierarchicalFacets,(function(e){return e.name===u.name}));c.hierarchicalFacets[h][l]={attribute:t,data:i,exhaustive:o.exhaustiveFacetsCount}}else{var p,d=-1!==e.disjunctiveFacets.indexOf(t),v=-1!==e.facets.indexOf(t);d&&(p=y[t],c.disjunctiveFacets[p]={name:t,data:i,exhaustive:o.exhaustiveFacetsCount},m(c.disjunctiveFacets[p],o.facets_stats,t)),v&&(p=f[t],c.facets[p]={name:t,data:i,exhaustive:o.exhaustiveFacetsCount},m(c.facets[p],o.facets_stats,t))}})),this.hierarchicalFacets=n(this.hierarchicalFacets),l.forEach((function(r){var n=t[v],a=n&&n.facets?n.facets:{},l=e.getHierarchicalFacetByName(r);Object.keys(a).forEach((function(t){var r,f=a[t];if(l){r=s(e.hierarchicalFacets,(function(e){return e.name===l.name}));var p=s(c.hierarchicalFacets[r],(function(e){return e.attribute===t}));if(-1===p)return;c.hierarchicalFacets[r][p].data=u({},c.hierarchicalFacets[r][p].data,f)}else{r=y[t];var d=o.facets&&o.facets[t]||{};c.disjunctiveFacets[r]={name:t,data:i({},f,d),exhaustive:n.exhaustiveFacetsCount},m(c.disjunctiveFacets[r],n.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(n){!c.disjunctiveFacets[r].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(h(n))>-1&&(c.disjunctiveFacets[r].data[n]=0)}))}})),v++})),e.getRefinedHierarchicalFacets().forEach((function(r){var n=e.getHierarchicalFacetByName(r),o=e._getHierarchicalFacetSeparator(n),a=e.getHierarchicalRefinement(r);0===a.length||a[0].split(o).length<2||t.slice(v).forEach((function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach((function(t){var u=r[t],l=s(e.hierarchicalFacets,(function(e){return e.name===n.name})),f=s(c.hierarchicalFacets[l],(function(e){return e.attribute===t}));if(-1!==f){var h={};if(a.length>0){var p=a[0].split(o)[0];h[p]=c.hierarchicalFacets[l][f].data[p]}c.hierarchicalFacets[l][f].data=i(h,u,c.hierarchicalFacets[l][f].data)}})),v++}))})),Object.keys(e.facetsExcludes).forEach((function(t){var r=e.facetsExcludes[t],n=f[t];c.facets[n]={name:t,data:g[t],exhaustive:o.exhaustiveFacetsCount},r.forEach((function(e){c.facets[n]=c.facets[n]||{name:t},c.facets[n].data=c.facets[n].data||{},c.facets[n].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(p(e)),this.facets=n(this.facets),this.disjunctiveFacets=n(this.disjunctiveFacets),this._state=e}function v(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=a(e.facets,r);return n?Object.keys(n.data).map((function(r){var i=f(r);return{name:r,escapedValue:i,count:n.data[r],isRefined:e._state.isFacetRefined(t,i),isExcluded:e._state.isExcludeRefined(t,r)}})):[]}if(e._state.isDisjunctiveFacet(t)){var i=a(e.disjunctiveFacets,r);return i?Object.keys(i.data).map((function(r){var n=f(r);return{name:r,escapedValue:n,count:i.data[r],isRefined:e._state.isDisjunctiveFacetRefined(t,n)}})):[]}if(e._state.isHierarchicalFacet(t)){var o=a(e.hierarchicalFacets,r);if(!o)return o;var s=e._state.getHierarchicalFacetByName(t),c=e._state._getHierarchicalFacetSeparator(s),u=h(e._state.getHierarchicalRefinement(t)[0]||"");0===u.indexOf(s.rootPath)&&(u=u.replace(s.rootPath+c,""));var l=u.split(c);return l.unshift(t),g(o,l,0),o}}function g(e,t,r){e.isRefined=e.name===t[r],e.data&&e.data.forEach((function(e){g(e,t,r+1)}))}function b(e,t,r,n){if(n=n||0,Array.isArray(t))return e(t,r[n]);if(!t.data||0===t.data.length)return t;var o=t.data.map((function(t){return b(e,t,r,n+1)})),a=e(o,r[n]);return i({data:a},t)}function _(e,t){var r=a(e,(function(e){return e.name===t}));return r&&r.stats}function S(e,t,r,n,i){var o=a(i,(function(e){return e.name===r})),s=o&&o.data&&o.data[n]?o.data[n]:0,c=o&&o.exhaustive||!1;return{type:t,attributeName:r,name:n,count:s,exhaustive:c}}y.prototype.getFacetByName=function(e){function t(t){return t.name===e}return a(this.facets,t)||a(this.disjunctiveFacets,t)||a(this.hierarchicalFacets,t)},y.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],y.prototype.getFacetValues=function(e,t){var r=v(this,e);if(r){var n,o=i({},t,{sortBy:y.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),a=this;if(Array.isArray(r))n=[e];else n=a._state.getHierarchicalFacetByName(r.name).attributes;return b((function(e,t){if(o.facetOrdering){var r=function(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}(a,t);if(r)return function(e,t){var r=[],n=[],i=(t.order||[]).reduce((function(e,t,r){return e[t]=r,e}),{});e.forEach((function(e){var t=e.path||e.name;void 0!==i[t]?r[i[t]]=e:n.push(e)})),r=r.filter((function(e){return e}));var o,a=t.sortRemainingBy;return"hidden"===a?r:(o="alpha"===a?[["path","name"],["asc","asc"]]:[["count"],["desc"]],r.concat(l(n,o[0],o[1])))}(e,r)}if(Array.isArray(o.sortBy)){var n=c(o.sortBy,y.DEFAULT_SORT);return l(e,n[0],n[1])}if("function"==typeof o.sortBy)return function(e,t){return t.sort(e)}(o.sortBy,e);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}),r,n)}},y.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?_(this.facets,e):this._state.isDisjunctiveFacet(e)?_(this.disjunctiveFacets,e):void 0},y.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach((function(n){e.facetsRefinements[n].forEach((function(i){r.push(S(e,"facet",n,i,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(n){e.facetsExcludes[n].forEach((function(i){r.push(S(e,"exclude",n,i,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(n){e.disjunctiveFacetsRefinements[n].forEach((function(i){r.push(S(e,"disjunctive",n,i,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(n){e.hierarchicalFacetsRefinements[n].forEach((function(i){r.push(function(e,t,r,n){var i=e.getHierarchicalFacetByName(t),o=e._getHierarchicalFacetSeparator(i),s=r.split(o),c=a(n,(function(e){return e.name===t})),u=s.reduce((function(e,t){var r=e&&a(e.data,(function(e){return e.name===t}));return void 0!==r?r:e}),c),l=u&&u.count||0,f=u&&u.exhaustive||!1,h=u&&u.path||"";return{type:"hierarchical",attributeName:t,name:h,count:l,exhaustive:f}}(e,n,i,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t];Object.keys(n).forEach((function(e){n[e].forEach((function(n){r.push({type:"numeric",attributeName:t,name:n,numericValue:n,operator:e})}))}))})),e.tagRefinements.forEach((function(e){r.push({type:"tag",attributeName:"_tags",name:e})})),r},e.exports=y},374:(e,t,r)=>{"use strict";var n=r(331),i=r(78),o=r(39).escapeFacetValue,a=r(853),s=r(185),c=r(116),u=r(803),l=r(394),f=r(775),h=r(76),p=r(336);function d(e,t,r){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+p+")"),this.setClient(e);var n=r||{};n.index=t,this.state=f.make(n),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0}function m(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function y(){return this.state.page}a(d,n),d.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},d.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},d.prototype.getQuery=function(){var e=this.state;return l._getHitsSearchParams(e)},d.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,n=l._getQueries(r.index,r),i=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),!t)return this.client.search(n).then((function(e){return i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),{content:new h(r,e.results),state:r,_originalResponse:e}}),(function(e){throw i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),e}));this.client.search(n).then((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(null,new h(r,e.results),r)})).catch((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(e,null,r)}))},d.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var n=r.getModifiedState(t),i=s({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:u(l._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),o="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!=typeof this.client.initIndex)throw new Error(o);var a=this.client.initIndex(n.index);if("function"!=typeof a.findAnswers)throw new Error(o);return a.findAnswers(n.query,e.queryLanguages,i)},d.prototype.searchForFacetValues=function(e,t,r,n){var i="function"==typeof this.client.searchForFacetValues,a="function"==typeof this.client.initIndex;if(!i&&!a&&"function"!=typeof this.client.search)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var s=this.state.setQueryParameters(n||{}),c=s.isDisjunctiveFacet(e),u=l.getSearchForFacetQuery(e,t,r,s);this._currentNbQueries++;var f,h=this;return i?f=this.client.searchForFacetValues([{indexName:s.index,params:u}]):a?f=this.client.initIndex(s.index).searchForFacetValues(u):(delete u.facetName,f=this.client.search([{type:"facet",facet:e,indexName:s.index,params:u}]).then((function(e){return e.results[0]}))),this.emit("searchForFacetValues",{state:s,facet:e,query:t}),f.then((function(t){return h._currentNbQueries--,0===h._currentNbQueries&&h.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach((function(t){t.escapedValue=o(t.value),t.isRefined=c?s.isDisjunctiveFacetRefined(e,t.escapedValue):s.isFacetRefined(e,t.escapedValue)})),t}),(function(e){throw h._currentNbQueries--,0===h._currentNbQueries&&h.emit("searchQueueEmpty"),e}))},d.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},d.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},d.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},d.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},d.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},d.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},d.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},d.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},d.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},d.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},d.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},d.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},d.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},d.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},d.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},d.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},d.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},d.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},d.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},d.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},d.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},d.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},d.prototype.setCurrentPage=m,d.prototype.setPage=m,d.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},d.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},d.prototype.setState=function(e){return this._change({state:f.make(e),isPageReset:!1}),this},d.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new f(e),this},d.prototype.hasRefinements=function(e){return!!c(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},d.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},d.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},d.prototype.hasTag=function(e){return this.state.isTagRefined(e)},d.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},d.prototype.getIndex=function(){return this.state.index},d.prototype.getCurrentPage=y,d.prototype.getPage=y,d.prototype.getTags=function(){return this.state.tagRefinements},d.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"conjunctive"})})),this.state.getExcludeRefinements(e).forEach((function(e){t.push({value:e,type:"exclude"})}));else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach((function(e){var n=r[e];t.push({value:n,operator:e,type:"numeric"})})),t},d.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},d.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},d.prototype._search=function(e){var t=this.state,r=[],n=[];e.onlyWithDerivedHelpers||(n=l._getQueries(t.index,t),r.push({state:t,queriesCount:n.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map((function(e){var n=e.getModifiedState(t),i=n.index?l._getQueries(n.index,n):[];return r.push({state:n,queriesCount:i.length,helper:e}),e.emit("search",{state:n,results:e.lastResults}),i})),o=Array.prototype.concat.apply(n,i),a=this._queryId++;if(this._currentNbQueries++,!o.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,r,a));try{this.client.search(o).then(this._dispatchAlgoliaResponse.bind(this,r,a)).catch(this._dispatchAlgoliaError.bind(this,a))}catch(e){this.emit("error",{error:e})}},d.prototype._dispatchAlgoliaResponse=function(e,t,r){if(!(t0},d.prototype._change=function(e){var t=e.state,r=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))},d.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},d.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+p+")"),this.client=e),this},d.prototype.getClient=function(){return this.client},d.prototype.derive=function(e){var t=new i(this,e);return this.derivedHelpers.push(t),t},d.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},d.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=d},587:e=>{"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},344:e=>{"use strict";e.exports=function(){return Array.prototype.slice.call(arguments).reduceRight((function(e,t){return Object.keys(Object(t)).forEach((function(r){void 0!==t[r]&&(void 0!==e[r]&&delete e[r],e[r]=t[r])})),e}),{})}},39:e=>{"use strict";e.exports={escapeFacetValue:function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},unescapeFacetValue:function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")}}},888:e=>{"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var r=0;r{"use strict";e.exports=function(e,t){if(!Array.isArray(e))return-1;for(var r=0;r{"use strict";var n=r(888);e.exports=function(e,t){var r=(t||[]).map((function(e){return e.split(":")}));return e.reduce((function(e,t){var i=t.split(":"),o=n(r,(function(e){return e[0]===i[0]}));return i.length>1||!o?(e[0].push(i[0]),e[1].push(i[1]),e):(e[0].push(o[0]),e[1].push(o[1]),e)}),[[],[]])}},853:e=>{"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},686:e=>{"use strict";e.exports=function(e,t){return e.filter((function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n}))}},185:e=>{"use strict";function t(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function r(e,n){if(e===n)return e;for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&"__proto__"!==i&&"constructor"!==i){var o=n[i],a=e[i];void 0!==a&&void 0===o||(t(a)&&t(o)?e[i]=r(a,o):e[i]="object"==typeof(s=o)&&null!==s?r(Array.isArray(s)?[]:{},s):s)}var s;return e}e.exports=function(e){t(e)||(e={});for(var n=1,i=arguments.length;n{"use strict";e.exports=function(e){return e&&Object.keys(e).length>0}},803:e=>{"use strict";e.exports=function(e,t){if(null===e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}},148:e=>{"use strict";function t(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=void 0!==t,o=null===t;if(!o&&e>t||n&&i||!r)return 1;if(!n&&e=n.length?o:"desc"===n[i]?-o:o}return e.index-r.index})),i.map((function(e){return e.value}))}},23:e=>{"use strict";e.exports=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")}},394:(e,t,r)=>{"use strict";var n=r(185);function i(e){return Object.keys(e).sort().reduce((function(t,r){return t[r]=e[r],t}),{})}var o={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:o._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach((function(n){r.push({indexName:e,params:o._getDisjunctiveFacetSearchParams(t,n)})})),t.getRefinedHierarchicalFacets().forEach((function(n){var i=t.getHierarchicalFacetByName(n),a=t.getHierarchicalRefinement(n),s=t._getHierarchicalFacetSeparator(i);if(a.length>0&&a[0].split(s).length>1){var c=a[0].split(s).slice(0,-1).reduce((function(e,t,r){return e.concat({attribute:i.attributes[r],value:0===r?t:[e[e.length-1].value,t].join(s)})}),[]);c.forEach((function(n,a){var s=o._getDisjunctiveFacetSearchParams(t,n.attribute,0===a);function u(e){return i.attributes.some((function(t){return t===e.split(":")[0]}))}var l=(s.facetFilters||[]).reduce((function(e,t){if(Array.isArray(t)){var r=t.filter((function(e){return!u(e)}));r.length>0&&e.push(r)}return"string"!=typeof t||u(t)||e.push(t),e}),[]),f=c[a-1];s.facetFilters=a>0?l.concat(f.attribute+":"+f.value):l.length>0?l:void 0,r.push({indexName:e,params:s})}))}})),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(o._getHitsHierarchicalFacetsAttributes(e)).sort(),r=o._getFacetFilters(e),a=o._getNumericFilters(e),s=o._getTagFilters(e),c={facets:t.indexOf("*")>-1?["*"]:t,tagFilters:s};return r.length>0&&(c.facetFilters=r),a.length>0&&(c.numericFilters=a),i(n({},e.getQueryParams(),c))},_getDisjunctiveFacetSearchParams:function(e,t,r){var a=o._getFacetFilters(e,t,r),s=o._getNumericFilters(e,t),c=o._getTagFilters(e),u={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};c.length>0&&(u.tagFilters=c);var l=e.getHierarchicalFacetByName(t);return u.facets=l?o._getDisjunctiveHierarchicalFacetAttribute(e,l,r):t,s.length>0&&(u.numericFilters=s),a.length>0&&(u.facetFilters=a),i(n({},e.getQueryParams(),u))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return Object.keys(e.numericRefinements).forEach((function(n){var i=e.numericRefinements[n]||{};Object.keys(i).forEach((function(e){var o=i[e]||[];t!==n&&o.forEach((function(t){if(Array.isArray(t)){var i=t.map((function(t){return n+e+t}));r.push(i)}else r.push(n+e+t)}))}))})),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var n=[],i=e.facetsRefinements||{};Object.keys(i).sort().forEach((function(e){(i[e]||[]).sort().forEach((function(t){n.push(e+":"+t)}))}));var o=e.facetsExcludes||{};Object.keys(o).sort().forEach((function(e){(o[e]||[]).sort().forEach((function(t){n.push(e+":-"+t)}))}));var a=e.disjunctiveFacetsRefinements||{};Object.keys(a).sort().forEach((function(e){var r=a[e]||[];if(e!==t&&r&&0!==r.length){var i=[];r.sort().forEach((function(t){i.push(e+":"+t)})),n.push(i)}}));var s=e.hierarchicalFacetsRefinements||{};return Object.keys(s).sort().forEach((function(i){var o=(s[i]||[])[0];if(void 0!==o){var a,c,u=e.getHierarchicalFacetByName(i),l=e._getHierarchicalFacetSeparator(u),f=e._getHierarchicalRootPath(u);if(t===i){if(-1===o.indexOf(l)||!f&&!0===r||f&&f.split(l).length===o.split(l).length)return;f?(c=f.split(l).length-1,o=f):(c=o.split(l).length-2,o=o.slice(0,o.lastIndexOf(l))),a=u.attributes[c]}else c=o.split(l).length-1,a=u.attributes[c];a&&n.push([a+":"+o])}})),n},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce((function(t,r){var n=e.getHierarchicalRefinement(r.name)[0];if(!n)return t.push(r.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(r),o=n.split(i).length,a=r.attributes.slice(0,o+1);return t.concat(a)}),[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(!0===r){var i=e._getHierarchicalRootPath(t),o=0;return i&&(o=i.split(n).length),[t.attributes[o]]}var a=(e.getHierarchicalRefinement(t.name)[0]||"").split(n).length-1;return t.attributes.slice(0,a+1)},getSearchForFacetQuery:function(e,t,r,a){var s=a.isDisjunctiveFacet(e)?a.clearRefinements(e):a,c={facetQuery:t,facetName:e};return"number"==typeof r&&(c.maxFacetHits=r),i(n({},o._getHitsSearchParams(s),c))}};e.exports=o},801:e=>{"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},336:e=>{"use strict";e.exports="3.15.0"},290:function(e){e.exports=function(){"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(r){for(var n=1;n=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function o(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){s();var t=JSON.stringify(e);return o()[t]})).then((function(e){return Promise.all([e?e.value:t(),void 0!==e])})).then((function(e){var t=i(e,2),n=t[0],o=t[1];return Promise.all([n,o||r.miss(n)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=o();return i[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},n().setItem(r,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=o();delete t[JSON.stringify(e)],n().setItem(r,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){n().removeItem(r)}))}}}function s(e){var t=o(e.caches),r=t.shift();return void 0===r?{get:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,r.miss(e)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(e,n,i).catch((function(){return s({caches:t}).get(e,n,i)}))},set:function(e,n){return r.set(e,n).catch((function(){return s({caches:t}).set(e,n)}))},delete:function(e){return r.delete(e).catch((function(){return s({caches:t}).delete(e)}))},clear:function(){return r.clear().catch((function(){return s({caches:t}).clear()}))}}}function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},o=JSON.stringify(r);if(o in t)return Promise.resolve(e.serializable?JSON.parse(t[o]):t[o]);var a=n(),s=i&&i.miss||function(){return Promise.resolve()};return a.then((function(e){return s(e)})).then((function(){return a}))},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function u(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function l(e,t){return t?(Object.keys(t).forEach((function(r){e[r]=t[r](e)})),e):e}function f(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var d={Read:1,Write:2,Any:3},m=1,y=2,v=3;function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:m;return r(r({},e),{},{status:t,lastUpdate:Date.now()})}function b(e){return"string"==typeof e?{protocol:"https",url:e,accept:d.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||d.Any}}var _="GET",S="POST";function O(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(g(t))}))}))).then((function(e){var r=e.filter((function(e){return function(e){return e.status===m||Date.now()-e.lastUpdate>12e4}(e)})),n=e.filter((function(e){return function(e){return e.status===v&&Date.now()-e.lastUpdate<=12e4}(e)})),i=[].concat(o(r),o(n));return{getTimeout:function(e,t){return(0===n.length&&0===e?1:n.length+3+e)*t},statelessHosts:i.length>0?i.map((function(e){return b(e)})):t}}))}function w(e,t,n,i){var a=[],s=function(e,t){if(e.method!==_&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:r(r({},e.data),t.data);return JSON.stringify(n)}}(n,i),c=function(e,t){var n=r(r({},e.headers),t.headers),i={};return Object.keys(n).forEach((function(e){var t=n[e];i[e.toLowerCase()]=t})),i}(e,i),u=n.method,l=n.method!==_?{}:r(r({},n.data),i.data),f=r(r(r({"x-algolia-agent":e.userAgent.value},e.queryParameters),l),i.queryParameters),h=0,p=function t(r,o){var l=r.pop();if(void 0===l)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:x(a)};var p={data:s,headers:c,method:u,url:P(l,n.path,f),connectTimeout:o(h,e.timeouts.connect),responseTimeout:o(h,i.timeout)},d=function(e){var t={request:p,response:e,host:l,triesLeft:r.length};return a.push(t),t},m={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e)},onRetry:function(n){var i=d(n);return n.isTimedOut&&h++,Promise.all([e.logger.info("Retryable failure",E(i)),e.hostsCache.set(l,g(l,n.isTimedOut?v:y))]).then((function(){return t(r,o)}))},onFail:function(e){throw d(e),function(e,t){var r=e.content,n=e.status,i=r;try{i=JSON.parse(r).message}catch(e){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(i,n,t)}(e,x(a))}};return e.requester.send(p).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,r=e.status;return!t&&0==~~r}(e)||2!=~~(t/100)&&4!=~~(t/100)}(e)?t.onRetry(e):2==~~(e.status/100)?t.onSuccess(e):t.onFail(e)}(e,m)}))};return O(e.hostsCache,t).then((function(e){return p(o(e.statelessHosts).reverse(),e.getTimeout)}))}function j(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var r="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(r)&&(t.value="".concat(t.value).concat(r)),t}};return t}function P(e,t,r){var n=R(r),i="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return n.length&&(i+="?".concat(n)),i}function R(e){return Object.keys(e).map((function(t){return f("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function x(e){return e.map((function(e){return E(e)}))}function E(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return r(r({},e),{},{request:r(r({},e.request),{},{headers:r(r({},e.request.headers),t)})})}var F=function(e){var t=e.appId,n=function(e,t,r){var n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:function(){return e===h.WithinHeaders?n:{}},queryParameters:function(){return e===h.WithinQueryParameters?n:{}}}}(void 0!==e.authMode?e.authMode:h.WithinHeaders,t,e.apiKey),o=function(e){var t=e.hostsCache,r=e.logger,n=e.requester,o=e.requestsCache,a=e.responsesCache,s=e.timeouts,c=e.userAgent,u=e.hosts,l=e.queryParameters,f={hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:a,timeouts:s,userAgent:c,headers:e.headers,queryParameters:l,hosts:u.map((function(e){return b(e)})),read:function(e,t){var r=p(t,f.timeouts.read),n=function(){return w(f,f.hosts.filter((function(e){return 0!=(e.accept&d.Read)})),e,r)};if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();var o={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(o,(function(){return f.requestsCache.get(o,(function(){return f.requestsCache.set(o,n()).then((function(e){return Promise.all([f.requestsCache.delete(o),e])}),(function(e){return Promise.all([f.requestsCache.delete(o),Promise.reject(e)])})).then((function(e){var t=i(e,2);return t[0],t[1]}))}))}),{miss:function(e){return f.responsesCache.set(o,e)}})},write:function(e,t){return w(f,f.hosts.filter((function(e){return 0!=(e.accept&d.Write)})),e,p(t,f.timeouts.write))}};return f}(r(r({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:d.Read},{url:"".concat(t,".algolia.net"),accept:d.Write}].concat(u([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e),{},{headers:r(r(r({},n.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:r(r({},n.queryParameters()),e.queryParameters)}));return l({transporter:o,appId:t,addAlgoliaAgent:function(e,t){o.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([o.requestsCache.clear(),o.responsesCache.clear()]).then((function(){}))}},e.methods)},N=function(e){return function(t,r){return t.method===_?e.transporter.read(t,r):e.transporter.write(t,r)}},A=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l({transporter:e.transporter,appId:e.appId,indexName:t},r.methods)}},T=function(e){return function(t,n){var i=t.map((function(e){return r(r({},e),{},{params:R(e.params||{})})}));return e.transporter.read({method:S,path:"1/indexes/*/queries",data:{requests:i},cacheable:!0},n)}},I=function(e){return function(t,i){return Promise.all(t.map((function(t){var o=t.params,a=o.facetName,s=o.facetQuery,c=n(o,["facetName","facetQuery"]);return A(e)(t.indexName,{methods:{searchForFacetValues:D}}).searchForFacetValues(a,s,r(r({},i),c))})))}},C=function(e){return function(t,r,n){return e.transporter.read({method:S,path:f("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n)}},k=function(e){return function(t,r){return e.transporter.read({method:S,path:f("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r)}},D=function(e){return function(t,r,n){return e.transporter.read({method:S,path:f("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n)}},H=1,L=2,$=3;function M(e,t,n){var i,o={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return r.setRequestHeader(t,e.headers[t])}));var n,i=function(e,n){return setTimeout((function(){r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e)},o=i(e.connectTimeout,"Connection timeout");r.onreadystatechange=function(){r.readyState>r.OPENED&&void 0===n&&(clearTimeout(o),n=i(e.responseTimeout,"Socket timeout"))},r.onerror=function(){0===r.status&&(clearTimeout(o),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=function(){clearTimeout(o),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},logger:(i=$,{debug:function(e,t){return H>=i&&console.debug(e,t),Promise.resolve()},info:function(e,t){return L>=i&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:c(),requestsCache:c({serializable:!1}),hostsCache:s({caches:[a({key:"".concat("4.20.0","-").concat(e)}),c()]}),userAgent:j("4.20.0").add({segment:"Browser",version:"lite"}),authMode:h.WithinQueryParameters};return F(r(r(r({},o),n),{},{methods:{search:T,searchForFacetValues:I,multipleQueries:T,multipleSearchForFacetValues:I,customRequest:N,initIndex:function(e){return function(t){return A(e)(t,{methods:{search:k,searchForFacetValues:D,findAnswers:C}})}}}}))}return M.version="4.20.0",M}()},904:e=>{"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC1738",i="RFC3986";e.exports={default:i,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:n,RFC3986:i}},368:(e,t,r)=>{"use strict";var n=r(307),i=r(316),o=r(904);e.exports={formats:o,parse:i,stringify:n}},316:(e,t,r)=>{"use strict";var n=r(84),i=Object.prototype.hasOwnProperty,o=Array.isArray,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},c=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},u=function(e,t,r,n){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(o),u=s?o.slice(0,s.index):o,l=[];if(u){if(!r.plainObjects&&i.call(Object.prototype,u)&&!r.allowPrototypes)return;l.push(u)}for(var f=0;r.depth>0&&null!==(s=a.exec(o))&&f=0;--o){var a,s=e[o];if("[]"===s&&r.parseArrays)a=[].concat(i);else{a=r.plainObjects?Object.create(null):{};var u="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(u,10);r.parseArrays||""!==u?!isNaN(l)&&s!==u&&String(l)===u&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(a=[])[l]=i:"__proto__"!==u&&(a[u]=i):a={0:i}}i=a}return i}(l,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var l="string"==typeof e?function(e,t){var r,u={},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,h=l.split(t.delimiter,f),p=-1,d=t.charset;if(t.charsetSentinel)for(r=0;r-1&&(y=o(y)?[y]:y),i.call(u,m)?u[m]=n.combine(u[m],y):u[m]=y}return u}(e,r):e,f=r.plainObjects?Object.create(null):{},h=Object.keys(l),p=0;p{"use strict";var n=r(84),i=r(904),o=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,c=String.prototype.split,u=Array.prototype.push,l=function(e,t){u.apply(e,s(t)?t:[t])},f=Date.prototype.toISOString,h=i.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,format:h,formatter:i.formatters[h],indices:!1,serializeDate:function(e){return f.call(e)},skipNulls:!1,strictNullHandling:!1},d=function e(t,r,i,o,a,u,f,h,d,m,y,v,g,b){var _,S=t;if("function"==typeof f?S=f(r,S):S instanceof Date?S=m(S):"comma"===i&&s(S)&&(S=n.maybeMap(S,(function(e){return e instanceof Date?m(e):e}))),null===S){if(o)return u&&!g?u(r,p.encoder,b,"key",y):r;S=""}if("string"==typeof(_=S)||"number"==typeof _||"boolean"==typeof _||"symbol"==typeof _||"bigint"==typeof _||n.isBuffer(S)){if(u){var O=g?r:u(r,p.encoder,b,"key",y);if("comma"===i&&g){for(var w=c.call(String(S),","),j="",P=0;P0?S.join(",")||null:void 0}];else if(s(f))R=f;else{var E=Object.keys(S);R=h?E.sort(h):E}for(var F=0;F0?g+v:""}},84:(e,t,r)=>{"use strict";var n=r(904),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n1;){var t=e.pop(),r=t.obj[t.prop];if(o(r)){for(var n=[],i=0;i=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||o===n.RFC1738&&(40===l||41===l)?c+=s.charAt(u):l<128?c+=a[l]:l<2048?c+=a[192|l>>6]+a[128|63&l]:l<55296||l>=57344?c+=a[224|l>>12]+a[128|l>>6&63]+a[128|63&l]:(u+=1,l=65536+((1023&l)<<10|1023&s.charCodeAt(u)),c+=a[240|l>>18]+a[128|l>>12&63]+a[128|l>>6&63]+a[128|63&l])}return c},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var r=[],n=0;n{"use strict";r.r(t),r.d(t,{Children:()=>V,Component:()=>s.wA,Fragment:()=>s.HY,PureComponent:()=>$,StrictMode:()=>Ae,Suspense:()=>J,SuspenseList:()=>X,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>Se,cloneElement:()=>Re,createContext:()=>s.kr,createElement:()=>s.az,createFactory:()=>we,createPortal:()=>ne,createRef:()=>s.Vf,default:()=>Le,findDOMNode:()=>Ee,flushSync:()=>Ne,forwardRef:()=>Q,hydrate:()=>fe,isElement:()=>De,isFragment:()=>Pe,isValidElement:()=>je,lazy:()=>Z,memo:()=>M,render:()=>le,startTransition:()=>Te,unmountComponentAtNode:()=>xe,unstable_batchedUpdates:()=>Fe,useCallback:()=>j,useContext:()=>P,useDebugValue:()=>R,useDeferredValue:()=>Ie,useEffect:()=>b,useErrorBoundary:()=>x,useId:()=>E,useImperativeHandle:()=>O,useInsertionEffect:()=>ke,useLayoutEffect:()=>_,useMemo:()=>w,useReducer:()=>g,useRef:()=>S,useState:()=>v,useSyncExternalStore:()=>He,useTransition:()=>Ce,version:()=>Oe});var n,i,o,a,s=r(400),c=0,u=[],l=[],f=s.YM.__b,h=s.YM.__r,p=s.YM.diffed,d=s.YM.__c,m=s.YM.unmount;function y(e,t){s.YM.__h&&s.YM.__h(i,e,c||t),c=0;var r=i.__H||(i.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:l}),r.__[e]}function v(e){return c=1,g(k,e)}function g(e,t,r){var o=y(n++,2);if(o.t=e,!o.__c&&(o.__=[r?r(t):k(void 0,t),function(e){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,e);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}))}],o.__c=i,!i.u)){var a=function(e,t,r){if(!o.__c.__H)return!0;var n=o.__c.__H.__.filter((function(e){return e.__c}));if(n.every((function(e){return!e.__N})))return!s||s.call(this,e,t,r);var i=!1;return n.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}})),!(!i&&o.__c.props===e)&&(!s||s.call(this,e,t,r))};i.u=!0;var s=i.shouldComponentUpdate,c=i.componentWillUpdate;i.componentWillUpdate=function(e,t,r){if(this.__e){var n=s;s=void 0,a(e,t,r),s=n}c&&c.call(this,e,t,r)},i.shouldComponentUpdate=a}return o.__N||o.__}function b(e,t){var r=y(n++,3);!s.YM.__s&&C(r.__H,t)&&(r.__=e,r.i=t,i.__H.__h.push(r))}function _(e,t){var r=y(n++,4);!s.YM.__s&&C(r.__H,t)&&(r.__=e,r.i=t,i.__h.push(r))}function S(e){return c=5,w((function(){return{current:e}}),[])}function O(e,t,r){c=6,_((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==r?r:r.concat(e))}function w(e,t){var r=y(n++,7);return C(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function j(e,t){return c=8,w((function(){return e}),t)}function P(e){var t=i.context[e.__c],r=y(n++,9);return r.c=e,t?(null==r.__&&(r.__=!0,t.sub(i)),t.props.value):e.__}function R(e,t){s.YM.useDebugValue&&s.YM.useDebugValue(t?t(e):e)}function x(e){var t=y(n++,10),r=v();return t.__=e,i.componentDidCatch||(i.componentDidCatch=function(e,n){t.__&&t.__(e,n),r[1](e)}),[r[0],function(){r[1](void 0)}]}function E(){var e=y(n++,11);if(!e.__){for(var t=i.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function F(){for(var e;e=u.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(T),e.__H.__h.forEach(I),e.__H.__h=[]}catch(t){e.__H.__h=[],s.YM.__e(t,e.__v)}}s.YM.__b=function(e){i=null,f&&f(e)},s.YM.__r=function(e){h&&h(e),n=0;var t=(i=e.__c).__H;t&&(o===i?(t.__h=[],i.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=l,e.__N=e.i=void 0}))):(t.__h.forEach(T),t.__h.forEach(I),t.__h=[],n=0)),o=i},s.YM.diffed=function(e){p&&p(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==u.push(t)&&a===s.YM.requestAnimationFrame||((a=s.YM.requestAnimationFrame)||A)(F)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==l&&(e.__=e.__V),e.i=void 0,e.__V=l}))),o=i=null},s.YM.__c=function(e,t){t.some((function(e){try{e.__h.forEach(T),e.__h=e.__h.filter((function(e){return!e.__||I(e)}))}catch(r){t.some((function(e){e.__h&&(e.__h=[])})),t=[],s.YM.__e(r,e.__v)}})),d&&d(e,t)},s.YM.unmount=function(e){m&&m(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{T(e)}catch(e){t=e}})),r.__H=void 0,t&&s.YM.__e(t,r.__v))};var N="function"==typeof requestAnimationFrame;function A(e){var t,r=function(){clearTimeout(n),N&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);N&&(t=requestAnimationFrame(r))}function T(e){var t=i,r=e.__c;"function"==typeof r&&(e.__c=void 0,r()),i=t}function I(e){var t=i;e.__c=e.__(),i=t}function C(e,t){return!e||e.length!==t.length||t.some((function(t,r){return t!==e[r]}))}function k(e,t){return"function"==typeof t?t(e):t}function D(e,t){for(var r in t)e[r]=t[r];return e}function H(e,t){for(var r in e)if("__source"!==r&&!(r in t))return!0;for(var n in t)if("__source"!==n&&e[n]!==t[n])return!0;return!1}function L(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function $(e){this.props=e}function M(e,t){function r(e){var r=this.props.ref,n=r==e.ref;return!n&&r&&(r.call?r(null):r.current=null),t?!t(this.props,e)||!n:H(this.props,e)}function n(t){return this.shouldComponentUpdate=r,(0,s.az)(e,t)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}($.prototype=new s.wA).isPureReactComponent=!0,$.prototype.shouldComponentUpdate=function(e,t){return H(this.props,e)||H(this.state,t)};var U=s.YM.__b;s.YM.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),U&&U(e)};var W="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Q(e){function t(t){var r=D({},t);return delete r.ref,e(r,t.ref||null)}return t.$$typeof=W,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var q=function(e,t){return null==e?null:(0,s.bR)((0,s.bR)(e).map(t))},V={map:q,forEach:q,count:function(e){return e?(0,s.bR)(e).length:0},only:function(e){var t=(0,s.bR)(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:s.bR},B=s.YM.__e;s.YM.__e=function(e,t,r,n){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=r.__e,t.__k=r.__k),i.__c(e,t);B(e,t,r,n)};var Y=s.YM.unmount;function z(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=D({},e)).__c&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return z(e,t,r)}))),e}function G(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return G(e,t,r)})),e.__c&&e.__c.__P===t&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}function J(){this.__u=0,this.t=null,this.__b=null}function K(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Z(e){var t,r,n;function i(i){if(t||(t=e()).then((function(e){r=e.default||e}),(function(e){n=e})),n)throw n;if(!r)throw t;return(0,s.az)(r,i)}return i.displayName="Lazy",i.__f=!0,i}function X(){this.u=null,this.o=null}s.YM.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Y&&Y(e)},(J.prototype=new s.wA).__c=function(e,t){var r=t.__c,n=this;null==n.t&&(n.t=[]),n.t.push(r);var i=K(n.__v),o=!1,a=function(){o||(o=!0,r.__R=null,i?i(s):s())};r.__R=a;var s=function(){if(! --n.__u){if(n.state.__a){var e=n.state.__a;n.__v.__k[0]=G(e,e.__c.__P,e.__c.__O)}var t;for(n.setState({__a:n.__b=null});t=n.t.pop();)t.forceUpdate()}},c=!0===t.__h;n.__u++||c||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(a,a)},J.prototype.componentWillUnmount=function(){this.t=[]},J.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=z(this.__b,r,n.__O=n.__P)}this.__b=null}var i=t.__a&&(0,s.az)(s.HY,null,e.fallback);return i&&(i.__h=null),[(0,s.az)(s.HY,null,t.__a?null:e.children),i]};var ee=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]>>1,1),t.i.removeChild(e)}}),(0,s.sY)((0,s.az)(te,{context:t.context},e.__v),t.l)}function ne(e,t){var r=(0,s.az)(re,{__v:e,i:t});return r.containerInfo=t,r}(X.prototype=new s.wA).__a=function(e){var t=this,r=K(t.__v),n=t.o.get(e);return n[0]++,function(i){var o=function(){t.props.revealOrder?(n.push(i),ee(t,e,n)):i()};r?r(o):o()}},X.prototype.render=function(e){this.u=null,this.o=new Map;var t=(0,s.bR)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},X.prototype.componentDidUpdate=X.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,r){ee(e,r,t)}))};var ie="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,oe=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ae=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,se=/[A-Z0-9]/g,ce="undefined"!=typeof document,ue=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function le(e,t,r){return null==t.__k&&(t.textContent=""),(0,s.sY)(e,t),"function"==typeof r&&r(),e?e.__c:null}function fe(e,t,r){return(0,s.ZB)(e,t),"function"==typeof r&&r(),e?e.__c:null}s.wA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(s.wA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var he=s.YM.event;function pe(){}function de(){return this.cancelBubble}function me(){return this.defaultPrevented}s.YM.event=function(e){return he&&(e=he(e)),e.persist=pe,e.isPropagationStopped=de,e.isDefaultPrevented=me,e.nativeEvent=e};var ye,ve={enumerable:!1,configurable:!0,get:function(){return this.class}},ge=s.YM.vnode;s.YM.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,r=e.type,n={};for(var i in t){var o=t[i];if(!("value"===i&&"defaultValue"in t&&null==o||ce&&"children"===i&&"noscript"===r||"class"===i||"className"===i)){var a=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===o?o="":"ondoubleclick"===a?i="ondblclick":"onchange"!==a||"input"!==r&&"textarea"!==r||ue(t.type)?"onfocus"===a?i="onfocusin":"onblur"===a?i="onfocusout":ae.test(i)?i=a:-1===r.indexOf("-")&&oe.test(i)?i=i.replace(se,"-$&").toLowerCase():null===o&&(o=void 0):a=i="oninput","oninput"===a&&n[i=a]&&(i="oninputCapture"),n[i]=o}}"select"==r&&n.multiple&&Array.isArray(n.value)&&(n.value=(0,s.bR)(t.children).forEach((function(e){e.props.selected=-1!=n.value.indexOf(e.props.value)}))),"select"==r&&null!=n.defaultValue&&(n.value=(0,s.bR)(t.children).forEach((function(e){e.props.selected=n.multiple?-1!=n.defaultValue.indexOf(e.props.value):n.defaultValue==e.props.value}))),t.class&&!t.className?(n.class=t.class,Object.defineProperty(n,"className",ve)):(t.className&&!t.class||t.class&&t.className)&&(n.class=n.className=t.className),e.props=n}(e),e.$$typeof=ie,ge&&ge(e)};var be=s.YM.__r;s.YM.__r=function(e){be&&be(e),ye=e.__c};var _e=s.YM.diffed;s.YM.diffed=function(e){_e&&_e(e);var t=e.props,r=e.__e;null!=r&&"textarea"===e.type&&"value"in t&&t.value!==r.value&&(r.value=null==t.value?"":t.value),ye=null};var Se={ReactCurrentDispatcher:{current:{readContext:function(e){return ye.__n[e.__c].props.value}}}},Oe="17.0.2";function we(e){return s.az.bind(null,e)}function je(e){return!!e&&e.$$typeof===ie}function Pe(e){return je(e)&&e.type===s.HY}function Re(e){return je(e)?s.Tm.apply(null,arguments):e}function xe(e){return!!e.__k&&((0,s.sY)(null,e),!0)}function Ee(e){return e&&(e.base||1===e.nodeType&&e)||null}var Fe=function(e,t){return e(t)},Ne=function(e,t){return e(t)},Ae=s.HY;function Te(e){e()}function Ie(e){return e}function Ce(){return[!1,Te]}var ke=_,De=je;function He(e,t){var r=t(),n=v({h:{__:r,v:t}}),i=n[0].h,o=n[1];return _((function(){i.__=r,i.v=t,L(i.__,t())||o({h:i})}),[e,r,t]),b((function(){return L(i.__,i.v())||o({h:i}),e((function(){L(i.__,i.v())||o({h:i})}))}),[e]),r}var Le={useState:v,useId:E,useReducer:g,useEffect:b,useLayoutEffect:_,useInsertionEffect:ke,useTransition:Ce,useDeferredValue:Ie,useSyncExternalStore:He,startTransition:Te,useRef:S,useImperativeHandle:O,useMemo:w,useCallback:j,useContext:P,useDebugValue:R,version:"17.0.2",Children:V,render:le,hydrate:fe,unmountComponentAtNode:xe,createPortal:ne,createElement:s.az,createContext:s.kr,createFactory:we,cloneElement:Re,createRef:s.Vf,Fragment:s.HY,isValidElement:je,isElement:De,isFragment:Pe,findDOMNode:Ee,Component:s.wA,PureComponent:$,memo:M,forwardRef:Q,flushSync:Ne,unstable_batchedUpdates:Fe,StrictMode:Ae,Suspense:J,SuspenseList:X,lazy:Z,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Se}},400:(e,t,r)=>{"use strict";r.d(t,{HY:()=>_,Tm:()=>Q,Vf:()=>b,YM:()=>i,ZB:()=>W,az:()=>v,bR:()=>E,h:()=>v,kr:()=>q,sY:()=>U,wA:()=>S});var n,i,o,a,s,c,u,l,f={},h=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,d=Array.isArray;function m(e,t){for(var r in t)e[r]=t[r];return e}function y(e){var t=e.parentNode;t&&t.removeChild(e)}function v(e,t,r){var i,o,a,s={};for(a in t)"key"==a?i=t[a]:"ref"==a?o=t[a]:s[a]=t[a];if(arguments.length>2&&(s.children=arguments.length>3?n.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===s[a]&&(s[a]=e.defaultProps[a]);return g(e,s,i,o,null)}function g(e,t,r,n,a){var s={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++o:a};return null==a&&null!=i.vnode&&i.vnode(s),s}function b(){return{current:null}}function _(e){return e.children}function S(e,t){this.props=e,this.context=t}function O(e,t){if(null==t)return e.__?O(e.__,e.__.__k.indexOf(e)+1):null;for(var r;tt&&a.sort(u));P.__r=0}function R(e,t,r,n,i,o,a,s,c,u,l){var p,m,y,v,b,S,w,j,P,R=0,E=n&&n.__k||h,A=E.length,T=A,I=t.length;for(r.__k=[],p=0;p0?g(v.type,v.props,v.key,v.ref?v.ref:null,v.__v):v)?(v.__=r,v.__b=r.__b+1,-1===(j=N(v,E,w=p+R,T))?y=f:(y=E[j]||f,E[j]=void 0,T--),k(e,v,y,i,o,a,s,c,u,l),b=v.__e,(m=v.ref)&&y.ref!=m&&(y.ref&&L(y.ref,null,v),l.push(m,v.__c||b,v)),null!=b&&(null==S&&(S=b),(P=y===f||null===y.__v)?-1==j&&R--:j!==w&&(j===w+1?R++:j>w?T>I-w?R+=j-w:R--:R=j(null!=c?1:0))for(;a>=0||s=0){if((c=t[a])&&i==c.key&&o===c.type)return a;a--}if(s2&&(c.children=arguments.length>3?n.call(arguments,2):r),g(e.type,c,i||e.key,o||e.ref,null)}function q(e,t){var r={__c:t="__cC"+l++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,n;return this.getChildContext||(r=[],(n={})[t]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&r.some((function(e){e.__e=!0,j(e)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return r.Provider.__=r.Consumer.contextType=r}n=h.slice,i={__e:function(e,t,r,n){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,n||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},o=0,S.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=m({},this.state),"function"==typeof e&&(e=e(m({},r),this.props)),e&&m(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),j(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),j(this))},S.prototype.render=_,a=[],c="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,u=function(e,t){return e.__v.__b-t.__v.__b},P.__r=0,l=0},774:e=>{e.exports=function(e,t,r,n){var i=r?r.call(n,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c{"use strict";var n=r(748);var i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,a=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=o({inst:{value:r,getSnapshot:t}}),i=n[0].inst,l=n[1];return s((function(){i.value=r,i.getSnapshot=t,u(i)&&l({inst:i})}),[e,r,t]),a((function(){return u(i)&&l({inst:i}),e((function(){u(i)&&l({inst:i})}))}),[e]),c(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:l},688:(e,t,r)=>{"use strict";e.exports=r(250)}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nc=void 0;var n={};return(()=>{"use strict";r.r(n);var e=r(290),t=r.n(e),i=r(400),o=r(748);function a(){return a=Object.assign||function(e){for(var t=1;te instanceof ShadowRoot,c=e=>{const t=e.getRootNode()instanceof ShadowRoot?e.getRootNode().host:e,{dataset:r}=t,n={};for(var i in r){if(!1===r.hasOwnProperty(i))return;const e=`${(o=i.split(/(props?)/).pop()||"").charAt(0).toLowerCase()}${o.slice(1)}`;e&&(n[e]=r[i])}var o;return n},u=e=>["text/props","application/json"].includes(e.getAttribute("type")||""),l=e=>s(e)?[]:Array.from(e.getElementsByTagName("script")).filter(u),f=e=>Array.from(document.querySelectorAll(e)).filter(u),h=e=>{let t={};return e.forEach((e=>{try{t=a({},t,JSON.parse(e.innerHTML))}catch(e){}})),t},p=(e,t,r={},n)=>{const i=c(t),o=e._executedScript?c(e._executedScript):{},s=h(l(t));return a({},r,i,o,n?h(f(n)):{},s)};function d(e,t){var r=(t=[].concat(t))[t.length-1].nextSibling;function n(t,n){e.insertBefore(t,n||r)}return e.__k={nodeType:1,parentNode:e,firstChild:t[0],childNodes:t,insertBefore:n,appendChild:n,removeChild:function(t){e.removeChild(t)}}}const m=({island:e,widget:t,rootFragment:r,props:n})=>{e.props=n,(0,i.sY)((0,i.h)(t,n),r)};var y=(0,o.createContext)(null);var v=(0,o.createContext)(null);var g=r(331),b=r(766);function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}var S="_ALGOLIA";function O(){return function(e){if("object"===("undefined"==typeof document?"undefined":_(document))&&"string"==typeof document.cookie)for(var t="".concat(e,"="),r=document.cookie.split(";"),n=0;n1&&void 0!==arguments[1]?arguments[1]:{fallback:function(){}}).fallback;return"undefined"==typeof window?t():e({window})}function j(){}function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{},t=e.insightsClient,r=e.insightsInitParams,n=e.onEvent,i=e.$$internal,o=void 0!==i&&i,a=e.$$automatic,s=void 0!==a&&a,c=t;t||null===t||w((function(e){var t=e.window,r=t.AlgoliaAnalyticsObject||"aa";"string"==typeof r&&(c=t[r]),c||(t.AlgoliaAnalyticsObject=r,t[r]||(t[r]=function(){t[r].queue||(t[r].queue=[]);for(var e=arguments.length,n=new Array(e),i=0;i1&&void 0!==arguments[1]&&arguments[1];if(e){var n=c.state.userToken;r?i():setTimeout(i,0)}function i(){c.overrideStateWithoutTriggeringChangeEvent(x(x({},c.state),{},{userToken:e})),n&&n!==e&&t.scheduleSearch()}},r=O();r&&e(r,!0),m?(e(m,!0),u("setUserToken",m)):d&&(e(d,!0),u("setUserToken",d)),u("onUserTokenChange",e,{immediate:!0});var i=u;D(u)&&(i=function(e,t){return u(e,t,{headers:{"X-Algolia-Application-Id":h,"X-Algolia-API-Key":p}})}),t.sendEventToInsights=function(e){n?n(e,i):e.insightsMethod&&(e.payload.algoliaSource=["instantsearch"],s&&e.payload.algoliaSource.push("instantsearch-automatic"),"internal"===e.eventModifier&&e.payload.algoliaSource.push("instantsearch-internal"),i(e.insightsMethod,e.payload))}},unsubscribe:function(){u("onUserTokenChange",void 0),t.sendEventToInsights=j,c&&a&&(c.overrideStateWithoutTriggeringChangeEvent(x(x({},c.state),a)),t.scheduleSearch())}}}}function D(e){var t=F((e.version||"").split(".").map(Number),2),r=t[0],n=t[1];return r>=3||2===r&&n>=6||1===r&&n>=10}function H(e,t,r){var n=t.getHelper();return{uiState:r,helper:n,parent:t,instantSearchInstance:e,state:n.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,scopedResults:[],searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}function L(e,t){var r=t.getResults(),n=t.getHelper();return{helper:n,parent:t,instantSearchInstance:e,results:r,scopedResults:t.getScopedResults(),state:r?r._state:n.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}function $(e,t,r){var n=H(t,t.mainIndex,t._initialUiState);e.forEach((function(e){var i={};if(e.getWidgetRenderState){var o=e.getWidgetRenderState(n);o&&o.widgetParams&&(i=o.widgetParams)}var a=Object.keys(i).filter((function(e){return void 0!==i[e]}));r.widgets.push({type:e.$$type,widgetType:e.$$widgetType,params:a}),"ais.index"===e.$$type&&$(e.getWidgets(),t,r)}))}function M(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).$$internal,t=void 0!==e&&e;return function(e){var r=e.instantSearchInstance,n={widgets:[]},i=document.createElement("meta"),o=document.querySelector("head");return i.name="instantsearch:widgets",{$$type:"ais.metadata",$$internal:t,onStateChange:function(){},subscribe:function(){setTimeout((function(){var e=r.client;n.ua=e.transporter&&e.transporter.userAgent?e.transporter.userAgent.value:e._ua,$(r.mainIndex.getWidgets(),r,n),r.middleware.forEach((function(e){return n.widgets.push({middleware:!0,type:e.instance.$$type,internal:e.instance.$$internal})})),i.content=JSON.stringify(n),o.appendChild(i)}),0)},started:function(){},unsubscribe:function(){i.remove()}}}}var U=r(368);function W(e){return W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},W(e)}function Q(e,t){for(var r=0;r=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ee(e){e.configure;return X(e,G)}function te(e){return e!==Object(e)}function re(e,t){if(e===t)return!0;if(te(e)||te(t)||"function"==typeof e||"function"==typeof t)return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var r=0,n=Object.keys(e);r0&&void 0!==arguments[0]?arguments[0]:{},t=e.router,r=void 0===t?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.createURL,r=void 0===t?function(e){var t=e.qsModule,r=e.routeState,n=e.location,i=n.protocol,o=n.hostname,a=n.port,s=void 0===a?"":a,c=n.pathname,u=n.hash,l=t.stringify(r),f=""===s?"":":".concat(s);return l?"".concat(i,"//").concat(o).concat(f).concat(c,"?").concat(l).concat(u):"".concat(i,"//").concat(o).concat(f).concat(c).concat(u)}:t,n=e.parseURL,i=void 0===n?function(e){var t=e.qsModule,r=e.location;return t.parse(r.search.slice(1),{arrayLimit:99})}:n,o=e.writeDelay,a=void 0===o?400:o,s=e.windowTitle,c=e.getLocation,u=void 0===c?function(){return w((function(e){return e.window.location}),{fallback:function(){throw new Error("You need to provide `getLocation` to the `history` router in environments where `window` does not exist.")}})}:c,l=e.start,f=e.dispose,h=e.push;return new Y({createURL:r,parseURL:i,writeDelay:a,windowTitle:s,getLocation:u,start:l,dispose:f,push:h})}():t,n=e.stateMapping,i=void 0===n?{$$type:"ais.simple",stateToRoute:function(e){return Object.keys(e).reduce((function(t,r){return K(K({},t),{},Z({},r,ee(e[r])))}),{})},routeToState:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,r){return K(K({},t),{},Z({},r,ee(e[r])))}),{})}}:n,o=e.$$internal,a=void 0!==o&&o;return function(e){var t=e.instantSearchInstance;t._createURL=function(e){var n=0===t.mainIndex.getWidgets().length?t._initialUiState:t.mainIndex.getWidgetUiState({}),o=Object.keys(e).reduce((function(t,r){return oe(oe({},t),{},ae({},r,e[r]))}),n),a=i.stateToRoute(o);return r.createURL(a)};var n=void 0,o=t._initialUiState;return{$$type:"ais.router({router:".concat(r.$$type||"__unknown__",", stateMapping:").concat(i.$$type||"__unknown__","})"),$$internal:a,onStateChange:function(e){var t=e.uiState,o=i.stateToRoute(t);void 0!==n&&re(n,o)||(r.write(o),n=o)},subscribe:function(){t._initialUiState=oe(oe({},o),i.routeToState(r.read())),r.onUpdate((function(e){t.mainIndex.getWidgets().length>0&&t.setUiState(i.routeToState(e))}))},started:function(){var e;null===(e=r.start)||void 0===e||e.call(r)},unsubscribe:function(){r.dispose()}}}};function ce(){for(var e=arguments.length,t=new Array(e),r=0;r=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var ye=function(e,t){return e.setQueryParameters({hierarchicalFacets:t.hierarchicalFacets.reduce((function(e,t){var r=function(e,t){if(!Array.isArray(e))return-1;for(var r=0;r0?e.setQueryParameters({ruleContexts:r}):e}(c,t),l=function(e,t){return t.facets.reduce((function(e,t){return e.addFacet(t)}),e)}(u,t);return function(e,t){t.facets,t.disjunctiveFacets,t.facetsRefinements,t.facetsExcludes,t.disjunctiveFacetsRefinements,t.numericRefinements,t.tagRefinements,t.hierarchicalFacets,t.hierarchicalFacetsRefinements,t.ruleContexts;var r=me(t,fe);return e.setQueryParameters(r)}(l,t)}))};function ge(e){return ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ge(e)}var be=["initialSearchParameters"];function _e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Se(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var Re=ce({name:"index-widget"});function xe(e,t){var r=t.state,n=t.isPageReset,i=t._uiState;r!==e.state&&(e.state=r,e.emit("change",{state:e.state,results:e.lastResults,isPageReset:n,_uiState:i}))}function Ee(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.reduce((function(e,r){return ue(r)?e:r.getWidgetUiState||r.getWidgetState?r.getWidgetUiState?r.getWidgetUiState(e,t):r.getWidgetState(e,t):e}),r)}function Fe(e,t){var r=t.initialSearchParameters,n=Pe(t,be);return e.filter((function(e){return!ue(e)})).reduce((function(e,t){return t.getWidgetSearchParameters?t.getWidgetSearchParameters(e,n):e}),r)}function Ne(e){var t=e.filter(ue);0!==t.length&&t.forEach((function(e){var t=e.getHelper();xe(t,{state:t.state.resetPage(),isPageReset:!0}),Ne(e.getWidgets())}))}function Ae(e){return e.filter(ue).reduce((function(e,t){return e.concat.apply(e,[{indexId:t.getIndexId(),results:t.getResults(),helper:t.getHelper()}].concat(we(Ae(t.getWidgets()))))}),[])}const Te=function(e){if(void 0===e||void 0===e.indexName)throw new Error(Re("The `indexName` option is required."));var t=e.indexName,r=e.indexId,n=void 0===r?t:r,i=[],o={},a=null,s=null,c=null,u=null,l=null;return{$$type:"ais.index",$$widgetType:"ais.index",getIndexName:function(){return t},getIndexId:function(){return n},getHelper:function(){return c},getResults:function(){var e;return null!==(e=u)&&void 0!==e&&e.lastResults?(u.lastResults._state=c.state,u.lastResults):null},getPreviousState:function(){return l},getScopedResults:function(){var e=this.getParent();return Ae(e?e.getWidgets():[this])},getParent:function(){return s},createURL:function(e){return"function"==typeof e?a._createURL(Oe({},n,e(o))):a._createURL(Oe({},n,Ee(i,{searchParameters:e,helper:c})))},getWidgets:function(){return i},addWidgets:function(e){var t=this;if(!Array.isArray(e))throw new Error(Re("The `addWidgets` method expects an array of widgets."));if(e.some((function(e){return"function"!=typeof e.init&&"function"!=typeof e.render})))throw new Error(Re("The widget definition expects a `render` and/or an `init` method."));return i=i.concat(e),a&&Boolean(e.length)&&(xe(c,{state:Fe(i,{uiState:o,initialSearchParameters:c.state}),_uiState:o}),e.forEach((function(e){e.getRenderState&&Ie({renderState:e.getRenderState(a.renderState[t.getIndexId()]||{},H(a,t,a._initialUiState)),instantSearchInstance:a,parent:t})})),e.forEach((function(e){e.init&&e.init(H(a,t,a._initialUiState))})),a.scheduleSearch()),this},removeWidgets:function(e){var t=this;if(!Array.isArray(e))throw new Error(Re("The `removeWidgets` method expects an array of widgets."));if(e.some((function(e){return"function"!=typeof e.dispose})))throw new Error(Re("The widget definition expects a `dispose` method."));if(i=i.filter((function(t){return-1===e.indexOf(t)})),a&&Boolean(e.length)){var r=e.reduce((function(e,r){return r.dispose({helper:c,state:e,parent:t})||e}),c.state),n=a.future.preserveSharedStateOnUnmount?Fe(i,{uiState:o,initialSearchParameters:new b.SearchParameters({index:this.getIndexName()})}):Fe(i,{uiState:Ee(i,{searchParameters:r,helper:c}),initialSearchParameters:r});o=Ee(i,{searchParameters:n,helper:c}),c.setState(n),i.length&&a.scheduleSearch()}return this},init:function(e){var r,f=this,h=e.instantSearchInstance,p=e.parent,d=e.uiState;if(null===c){a=h,s=p,o=d[n]||{};var m=h.mainHelper,y=Fe(i,{uiState:o,initialSearchParameters:new b.SearchParameters({index:t})});(c=b({},y.index,y)).search=function(){return h.onStateChange?(h.onStateChange({uiState:h.mainIndex.getWidgetUiState({}),setUiState:function(e){return h.setUiState(e,!1)}}),m):m.search()},c.searchWithoutTriggeringOnStateChange=function(){return m.search()},c.searchForFacetValues=function(e,t,r,n){var i=c.state.setQueryParameters(n);return m.searchForFacetValues(e,t,r,i)},u=m.derive((function(){return ve.apply(void 0,[m.state].concat(we(function(e){for(var t=e.getParent(),r=[e.getHelper().state];null!==t;)r=[t.getHelper().state].concat(r),t=t.getParent();return r}(f))))}));var v=null===(r=h._initialResults)||void 0===r?void 0:r[this.getIndexId()];if(v){var g=new b.SearchResults(new b.SearchParameters(v.state),v.results);u.lastResults=g,c.lastResults=g}c.on("change",(function(e){e.isPageReset&&Ne(i)})),u.on("search",(function(){h.scheduleStalledRender()})),u.on("result",(function(e){var t=e.results;h.scheduleRender(),c.lastResults=t,l=null==t?void 0:t._state})),i.forEach((function(e){e.getRenderState&&Ie({renderState:e.getRenderState(h.renderState[f.getIndexId()]||{},H(h,f,d)),instantSearchInstance:h,parent:f})})),i.forEach((function(e){e.init&&e.init(H(h,f,d))})),c.on("change",(function(e){var t=e.state,r=e._uiState;o=Ee(i,{searchParameters:t,helper:c},r||{}),h.onStateChange||h.onInternalStateChange()})),v&&h.scheduleRender()}},render:function(e){var t=this,r=e.instantSearchInstance;"error"===r.status&&!r.mainHelper.hasPendingRequests()&&l&&c.setState(l);var n=this.getResults()?i:i.filter(ue);n.forEach((function(e){e.getRenderState&&Ie({renderState:e.getRenderState(r.renderState[t.getIndexId()]||{},L(r,t)),instantSearchInstance:r,parent:t})})),n.forEach((function(e){e.render&&e.render(L(r,t))}))},dispose:function(){var e,t,r=this;i.forEach((function(e){e.dispose&&e.dispose({helper:c,state:c.state,parent:r})})),a=null,s=null,null===(e=c)||void 0===e||e.removeAllListeners(),c=null,null===(t=u)||void 0===t||t.detach(),u=null},getWidgetUiState:function(e){return i.filter(ue).reduce((function(e,t){return t.getWidgetUiState(e)}),Se(Se({},e),{},Oe({},n,Se(Se({},e[n]),o))))},getWidgetState:function(e){return this.getWidgetUiState(e)},getWidgetSearchParameters:function(e,t){var r=t.uiState;return Fe(i,{uiState:r,initialSearchParameters:e})},refreshUiState:function(){o=Ee(i,{searchParameters:this.getHelper().state,helper:this.getHelper()},o)},setIndexUiState:function(e){var t="function"==typeof e?e(o):e;a.setUiState((function(e){return Se(Se({},e),{},Oe({},n,t))}))}}};function Ie(e){var t=e.renderState,r=e.instantSearchInstance,n=e.parent,i=n?n.getIndexId():r.mainIndex.getIndexId();r.renderState=Se(Se({},r.renderState),{},Oe({},i,Se(Se({},r.renderState[i]),t)))}var Ce=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.descendantName,n=t.modifierName,i=r?"-".concat(r):"",o=n?"--".concat(n):"";return"".concat("ais","-").concat(e).concat(i).concat(o)}};function ke(e,t){return(Array.isArray(t)?t:t.split(".")).reduce((function(e,t){return e&&e[t]}),e)}var De={"&":"&","<":"<",">":">",'"':""","'":"'"},He=/[&<>"']/g,Le=RegExp(He.source);var $e={"&":"&","<":"<",">":">",""":'"',"'":"'"},Me=/&(amp|quot|lt|gt|#39);/g,Ue=RegExp(Me.source);function We(e){return e&&Ue.test(e)?e.replace(Me,(function(e){return $e[e]})):e}function Qe(e){return Qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qe(e)}function qe(e){if(!function(e){return"object"===Qe(e)&&null!==e}(e)||"[object Object]"!==function(e){return null===e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}(e))return!1;if(null===Object.getPrototypeOf(e))return!0;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Ve(e){return Ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ve(e)}function Be(){return Be=Object.assign?Object.assign.bind():function(e){for(var t=1;t",highlightPostTag:""};function Ze(e){return function(e){return e&&Le.test(e)?e.replace(He,(function(e){return De[e]})):e}(e).replace(new RegExp(Je.highlightPreTag,"g"),Ke.highlightPreTag).replace(new RegExp(Je.highlightPostTag,"g"),Ke.highlightPostTag)}function Xe(e){return qe(e)&&"string"!=typeof e.value?Object.keys(e).reduce((function(t,r){return ze(ze({},t),{},Ge({},r,Xe(e[r])))}),{}):Array.isArray(e)?e.map(Xe):ze(ze({},e),{},{value:Ze(e.value)})}function et(e){return void 0===e.__escaped&&((e=e.map((function(e){var t=Be({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return t._highlightResult&&(t._highlightResult=Xe(t._highlightResult)),t._snippetResult&&(t._snippetResult=Xe(t._snippetResult)),t}))).__escaped=!0),e}var tt=Ce("Highlight");function rt(e){var t=Ke.highlightPreTag,r=Ke.highlightPostTag;return e.map((function(e){return e.isHighlighted?t+e.value+r:e.value})).join("")}var nt=new RegExp(/\w/i);function it(e,t){var r,n,i=e[t],o=(null===(r=e[t+1])||void 0===r?void 0:r.isHighlighted)||!0,a=(null===(n=e[t-1])||void 0===n?void 0:n.isHighlighted)||!0;return nt.test(We(i.value))||a!==o?i.isHighlighted:a}function ot(e){return ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ot(e)}function at(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function st(e){for(var t=1;t')).replace(new RegExp(Ke.highlightPostTag,"g"),""))}(bt(bt({},JSON.parse(e)),{},{hit:this})))}catch(e){throw new Error('\nThe highlight helper expects a JSON object of the format:\n{ "attribute": "name", "highlightedTagName": "mark" }')}},reverseHighlight:function(e,t){try{return t(function(e){var t=e.attribute,r=e.highlightedTagName,n=void 0===r?"mark":r,i=e.hit,o=e.cssClasses,a=void 0===o?{}:o,s=(ke(i._highlightResult,t)||{}).value,c=void 0===s?"":s,u=ft({descendantName:"highlighted"})+(a.highlighted?" ".concat(a.highlighted):"");return rt(ut(lt(c))).replace(new RegExp(Ke.highlightPreTag,"g"),"<".concat(n,' class="').concat(u,'">')).replace(new RegExp(Ke.highlightPostTag,"g"),""))}(bt(bt({},JSON.parse(e)),{},{hit:this})))}catch(e){throw new Error('\n The reverseHighlight helper expects a JSON object of the format:\n { "attribute": "name", "highlightedTagName": "mark" }')}},snippet:function(e,t){try{return t(function(e){var t=e.attribute,r=e.highlightedTagName,n=void 0===r?"mark":r,i=e.hit,o=e.cssClasses,a=void 0===o?{}:o,s=(ke(i._snippetResult,t)||{}).value,c=void 0===s?"":s,u=ht({descendantName:"highlighted"})+(a.highlighted?" ".concat(a.highlighted):"");return c.replace(new RegExp(Ke.highlightPreTag,"g"),"<".concat(n,' class="').concat(u,'">')).replace(new RegExp(Ke.highlightPostTag,"g"),""))}(bt(bt({},JSON.parse(e)),{},{hit:this})))}catch(e){throw new Error('\nThe snippet helper expects a JSON object of the format:\n{ "attribute": "name", "highlightedTagName": "mark" }')}},reverseSnippet:function(e,t){try{return t(function(e){var t=e.attribute,r=e.highlightedTagName,n=void 0===r?"mark":r,i=e.hit,o=e.cssClasses,a=void 0===o?{}:o,s=(ke(i._snippetResult,t)||{}).value,c=void 0===s?"":s,u=pt({descendantName:"highlighted"})+(a.highlighted?" ".concat(a.highlighted):"");return rt(ut(lt(c))).replace(new RegExp(Ke.highlightPreTag,"g"),"<".concat(n,' class="').concat(u,'">')).replace(new RegExp(Ke.highlightPostTag,"g"),""))}(bt(bt({},JSON.parse(e)),{},{hit:this})))}catch(e){throw new Error('\n The reverseSnippet helper expects a JSON object of the format:\n { "attribute": "name", "highlightedTagName": "mark" }')}},insights:function(e,t){try{var r=JSON.parse(e),n=r.method,i=r.payload;return t(yt(n,bt({objectIDs:[this.objectID]},i)))}catch(e){throw new Error('\nThe insights helper expects a JSON object of the format:\n{ "method": "method-name", "payload": { "eventName": "name of the event" } }')}}}}var Ot=Promise.resolve();function wt(e){var t=null,r=!1,n=function(){for(var n=arguments.length,i=new Array(n),o=0;o1?n-1:0),o=1;o1?t-1:0),n=1;n1?t-1:0),n=1;n0&&void 0!==arguments[0])||arguments[0];null!==(e=t.mainHelper)&&void 0!==e&&e.hasPendingRequests()||(clearTimeout(t._searchStalledTimer),t._searchStalledTimer=null,r&&(t.status="idle",t.error=void 0)),t.mainIndex.render({instantSearchInstance:Dt(t)}),t.emit("render")}))),Lt(Dt(t),"onInternalStateChange",wt((function(){var e=t.mainIndex.getWidgetUiState({});t.middleware.forEach((function(t){t.instance.onStateChange({uiState:e})}))}))),t.setMaxListeners(100);var r=e.indexName,n=void 0===r?"":r,a=e.numberLocale,s=e.initialUiState,c=void 0===s?{}:s,u=e.routing,l=void 0===u?null:u,f=e.insights,h=void 0===f?void 0:f,p=e.searchFunction,d=e.stalledSearchDelay,m=void 0===d?200:d,y=e.searchClient,v=void 0===y?null:y,g=e.insightsClient,b=void 0===g?null:g,_=e.onStateChange,S=void 0===_?null:_,O=e.future,P=void 0===O?Tt(Tt({},Wt),e.future||{}):O;if(null===v)throw new Error(Mt("The `searchClient` option is required."));if("function"!=typeof v.search)throw new Error("The `searchClient` must implement a `search` method.\n\nSee: https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/backend-instantsearch/js/");if("function"==typeof v.addAlgoliaAgent&&v.addAlgoliaAgent("instantsearch.js (".concat("4.60.0",")")),b&&"function"!=typeof b)throw new Error(Mt("The `insightsClient` option should be a function."));if(t.client=v,t.future=P,t.insightsClient=b,t.indexName=n,t.helper=null,t.mainHelper=null,t.mainIndex=Te({indexName:n}),t.onStateChange=S,t.started=!1,t.templatesConfig={helpers:St({numberLocale:a}),compileOptions:{}},t._stalledSearchDelay=m,t._searchStalledTimer=null,t._createURL=Ut,t._initialUiState=c,t._initialResults=null,t._insights=h,p&&(t._searchFunction=p),t.sendEventToInsights=j,l){var R="boolean"==typeof l?{}:l;R.$$internal=!0,t.use(se(R))}if(h){var x="boolean"==typeof h?{}:h;x.$$internal=!0,t.use(k(x))}return w((function(e){var t,r;return(null===(t=e.window.navigator)||void 0===t||null===(r=t.userAgent)||void 0===r?void 0:r.indexOf("Algolia Crawler"))>-1}),{fallback:function(){return!1}})&&t.use(M({$$internal:!0})),t}return t=o,r=[{key:"_isSearchStalled",get:function(){return"stalled"===this.status}},{key:"use",value:function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n0&&this.scheduleSearch();this.helper=this.mainIndex.getHelper(),this.started=!0,this.middleware.forEach((function(e){e.instance.started()})),void 0===this._insights&&t.derivedHelpers[0].once("result",(function(){e.mainIndex.getScopedResults().some((function(e){var t=e.results;return null==t?void 0:t._automaticInsights}))&&e.use(k({$$internal:!0,$$automatic:!0}))}))}},{key:"dispose",value:function(){var e;this.scheduleSearch.cancel(),this.scheduleRender.cancel(),clearTimeout(this._searchStalledTimer),this.removeWidgets(this.mainIndex.getWidgets()),this.mainIndex.dispose(),this.started=!1,this.removeAllListeners(),null===(e=this.mainHelper)||void 0===e||e.removeAllListeners(),this.mainHelper=null,this.helper=null,this.middleware.forEach((function(e){e.instance.unsubscribe()}))}},{key:"scheduleStalledRender",value:function(){var e=this;this._searchStalledTimer||(this._searchStalledTimer=setTimeout((function(){e.status="stalled",e.scheduleRender()}),this._stalledSearchDelay))}},{key:"setUiState",value:function(e){var t=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!this.mainHelper)throw new Error(Mt("The `start` method needs to be called before `setUiState`."));this.mainIndex.refreshUiState();var n="function"==typeof e?e(this.mainIndex.getWidgetUiState({})):e;this.onStateChange&&r?this.onStateChange({uiState:n,setUiState:function(e){Ft("function"==typeof e?e(n):e,t.mainIndex),t.scheduleSearch(),t.onInternalStateChange()}}):(Ft(n,this.mainIndex),this.scheduleSearch(),this.onInternalStateChange())}},{key:"getUiState",value:function(){return this.started&&this.mainIndex.refreshUiState(),this.mainIndex.getWidgetUiState({})}},{key:"createURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.started)throw new Error(Mt("The `start` method needs to be called before `createURL`."));return this._createURL(e)}},{key:"refresh",value:function(){if(!this.mainHelper)throw new Error(Mt("The `start` method needs to be called before `refresh`."));this.mainHelper.clearCache().search()}}],r&&It(t.prototype,r),n&&It(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}(g);const qt=Qt;var Vt=r(688);const Bt="7.3.0";function Yt(e){return Yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yt(e)}var zt=Object.prototype.hasOwnProperty;function Gt(e,t,r){if(null!=r&&r(e,t))return!0;var n,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((i=e.length)===t.length)for(;i--&&Gt(e[i],t[i],r););return-1===i}if(!n||"object"===Yt(e)){for(n in i=0,e){if(zt.call(e,n)&&++i&&!zt.call(t,n))return!1;if(!(n in t)||!Gt(e[n],t[n],r))return!1}return Object.keys(t).length===i}}return e!=e&&t!=t}function Jt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Kt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Kt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Kt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function dr(e){var t=e.children,r=lr(pr(e,hr));return r.started?o.default.createElement(v.Provider,{value:r},o.default.createElement(y.Provider,{value:r.mainIndex},t)):null}function mr(e,t){if(void 0===e||"function"!=typeof e)throw new Error("The render function is not valid (received type ".concat((r=e,Object.prototype.toString.call(r).slice(8,-1)),").\n\n").concat(t));var r}function yr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function vr(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:20,r=[],n=0;n1&&void 0!==arguments[1]?arguments[1]:j;return mr(e,kr()),function(r){var n,i,o=r||{},a=o.escapeHTML,s=void 0===a||a,c=o.transformItems,u=void 0===c?function(e){return e}:c;return{$$type:"ais.hits",init:function(t){e(Ir(Ir({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){var r=this.getWidgetRenderState(t);e(Ir(Ir({},r),{},{instantSearchInstance:t.instantSearchInstance}),!1),r.sendEvent("view:internal",r.hits)},getRenderState:function(e,t){return Ir(Ir({},e),{},{hits:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,o=e.helper,a=e.instantSearchInstance;if(n||(n=function(e){var t=e.instantSearchInstance,r=e.index,n=e.widgetType,i={},o=void 0;return function(){for(var e=arguments.length,a=new Array(e),s=0;s0&&(t.hits=et(t.hits));var c,l,f,h=function(e,t){return t?e.map((function(e){return Fr(Fr({},e),{},{__queryID:t})})):e}((c=t.hits,l=t.page,f=t.hitsPerPage,c.map((function(e,t){return Pr(Pr({},e),{},{__position:f*l+t+1})}))),t.queryID);return{hits:u(h,{results:t}),results:t,sendEvent:n,bindEvent:i,widgetParams:r}},dispose:function(e){var r=e.state;return t(),s?r.setQueryParameters(Object.keys(Je).reduce((function(e,t){return Ir(Ir({},e),{},Cr({},t,void 0))}),{})):r},getWidgetSearchParameters:function(e){return s?e.setQueryParameters(Je):e}}}};function Hr(e){var t,r,n;return new b.SearchResults(e,[{query:null!==(t=e.query)&&void 0!==t?t:"",page:null!==(r=e.page)&&void 0!==r?r:0,hitsPerPage:null!==(n=e.hitsPerPage)&&void 0!==n?n:20,hits:[],nbHits:0,nbPages:0,params:"",exhaustiveNbHits:!0,exhaustiveFacetsCount:!0,processingTimeMS:0,index:e.index}],{__isArtificial:!0})}function Lr(e){return Lr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lr(e)}function $r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Mr(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function sn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=Xt(),i=Vr(),a=qr(),s=zr(t),c=zr(r),u=(0,o.useRef)(!0),l=(0,o.useRef)(null),f=(0,o.useRef)(i.status),h=(0,o.useMemo)((function(){var t=e((function(e,t){if(t)u.current=!0;else if(u.current){var r=e.instantSearchInstance,n=(e.widgetParams,an(e,Zr));Gt(n,l.current,(function(e,t){return(null==e?void 0:e.constructor)===Function&&(null==t?void 0:t.constructor)===Function}))&&r.status===f.current||(m(n),l.current=n,f.current=r.status)}}),(function(){u.current=!1}));return nn(nn({},t(s)),c)}),[e,s,c]),p=en((0,o.useState)((function(){if(h.getWidgetRenderState){var e,t=a.getHelper(),r=a.getWidgetUiState({})[a.getIndexId()];t.state=(null===(e=h.getWidgetSearchParameters)||void 0===e?void 0:e.call(h,t.state,{uiState:r}))||t.state;var n=Wr(a),o=n.results,s=n.scopedResults,c=h.getWidgetRenderState({helper:t,parent:a,instantSearchInstance:i,results:o,scopedResults:s,state:t.state,renderState:i.renderState,templatesConfig:i.templatesConfig,createURL:a.createURL,searchMetadata:{isSearchStalled:"stalled"===i.status},status:i.status,error:i.error});c.widgetParams;return an(c,Xr)}return{}})),2),d=p[0],m=p[1];return function(e){var t,r=e.widget,n=e.parentIndex,i=e.props,a=e.shouldSsr,s=rr(),c=(0,o.useRef)(i);(0,o.useEffect)((function(){c.current=i}),[i]);var u=(0,o.useRef)(r);(0,o.useEffect)((function(){u.current=r}),[r]);var l,f=(0,o.useRef)(null),h=a&&!n.getWidgets().includes(r),p=Vr();Jr((function(){var e=u.current;return f.current?(clearTimeout(f.current),Gt(i,c.current)||(n.removeWidgets([e]),n.addWidgets([r]))):h||n.addWidgets([r]),function(){f.current=setTimeout((function(){p._schedule((function(){p._preventWidgetCleanup||n.removeWidgets([e])}))}))}}),[n,r,h,p,i]),(h||"pending"===(null==s||null===(t=s.current)||void 0===t?void 0:t.status))&&n.addWidgets([r]),"undefined"==typeof window&&null!=s&&s.current&&"ais.index"!==r.$$type&&(Gr(s.current),"ais.dynamicWidgets"!==r.$$type&&null!==(l=p.helper)&&void 0!==l&&l.lastResults&&Gr(s.current))}({widget:h,parentIndex:a,props:s,shouldSsr:Boolean(n)}),d}function cn(){for(var e=arguments.length,t=new Array(e),r=0;r=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function hn(e){var t=e.hit;return o.default.createElement("div",{style:{wordBreak:"break-all"}},JSON.stringify(t).slice(0,100),"…")}function pn(e){var t=e.hits,r=e.sendEvent,n=e.hitComponent,i=void 0===n?hn:n,a=e.classNames,s=void 0===a?{}:a,c=fn(e,un);return o.default.createElement("div",ln({},c,{className:cn("ais-Hits",s.root,0===t.length&&cn("ais-Hits--empty",s.emptyRoot),c.className)}),o.default.createElement("ol",{className:cn("ais-Hits-list",s.list)},t.map((function(e){return o.default.createElement("li",{key:e.objectID,className:cn("ais-Hits-item",s.item),onClick:function(){r("click:internal",e,"Hit Clicked")},onAuxClick:function(){r("click:internal",e,"Hit Clicked")}},o.default.createElement(i,{hit:e,sendEvent:r}))}))))}var dn=["escapeHTML","transformItems"];function mn(){return mn=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function vn(e){var t=e.escapeHTML,r=e.transformItems,n=yn(e,dn),i=function(e,t){return sn(Dr,e,t)}({escapeHTML:t,transformItems:r},{$$widgetType:"ais.hits"}),a={hits:i.hits,sendEvent:i.sendEvent};return o.default.createElement(pn,mn({},n,a))}function gn(e){return gn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gn(e)}function bn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _n(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:j;return mr(e,On()),function(r){var n,i,o=(r||{}).queryHook,a=void 0===o?wn:o;return{$$type:"ais.searchBox",init:function(t){var r=t.instantSearchInstance;e(_n(_n({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!0)},render:function(t){var r=t.instantSearchInstance;e(_n(_n({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!1)},dispose:function(e){var r=e.state;return t(),r.setQueryParameter("query",void 0)},getRenderState:function(e,t){return _n(_n({},e),{},{searchBox:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.helper,o=e.searchMetadata,s=e.state;return n||(n=function(e){a(e,(function(e){return t.setQuery(e).search()}))},i=function(){t.setQuery("").search()}),{query:s.query||"",refine:n,clear:i,widgetParams:r,isSearchStalled:o.isSearchStalled}},getWidgetUiState:function(e,t){var r=t.searchParameters.query||"";return""===r||e&&e.query===r?e:_n(_n({},e),{},{query:r})},getWidgetSearchParameters:function(e,t){var r=t.uiState;return e.setQueryParameter("query",r.query||"")}}}};function Pn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Rn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Rn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{}).catchError,t=Vr(),r=function(){var e=Vr(),t=qr(),r=t.getIndexId(),n=xn((0,o.useState)((function(){return e.getUiState()})),2),i=n[0],a=n[1],s=i[r],c=xn((0,o.useState)((function(){return e.renderState})),2),u=c[0],l=c[1],f=u[r]||{},h=(0,o.useCallback)((function(t){e.setUiState(t)}),[e]),p=(0,o.useCallback)((function(e){t.setIndexUiState(e)}),[t]);return(0,o.useEffect)((function(){function t(){a(e.getUiState()),l(e.renderState)}return e.addListener("render",t),function(){e.removeListener("render",t)}}),[e]),{uiState:i,setUiState:h,indexUiState:s,setIndexUiState:p,renderState:u,indexRenderState:f}}(),n=r.uiState,i=r.setUiState,a=r.indexUiState,s=r.setIndexUiState,c=r.renderState,u=r.indexRenderState,l=function(){var e=Vr(),t=qr(),r=Pn((0,o.useState)((function(){return Wr(t)})),2),n=r[0],i=r[1];return(0,o.useEffect)((function(){function r(){var e=t.getResults();null!==e&&i({results:e,scopedResults:t.getScopedResults()})}return e.addListener("render",r),function(){e.removeListener("render",r)}}),[e,t]),n}(),f=l.results,h=l.scopedResults,p=(0,o.useCallback)((function(){for(var e=arguments.length,r=new Array(e),n=0;n{let r="loading"===e?"Loading":null;return"loading"!=e&&t&&(r=`Showing results for "${t}"`),An("div",{className:"visually-hidden","aria-live":"polite",children:r})},In=e=>{const{query:t,refine:r}=function(e,t){return sn(jn,e,t)}(e),{status:n}=Fn(),[i,a]=(0,o.useState)(t),s=(0,o.useRef)(null),c=(0,o.useId)(),u="stalled"===n;return An("form",{action:"",role:"search",noValidate:!0,onSubmit:e=>{e.preventDefault(),e.stopPropagation(),s.current&&s.current.blur(),r(i)},onReset:e=>{e.preventDefault(),e.stopPropagation(),a(""),r(""),s.current&&s.current.focus()},style:{marginBottom:"20px"},children:[An("div",{children:[An("label",{htmlFor:c,children:["Keywords",An("span",{className:"visually-hidden",children:" Search"})]}),An("input",{id:c,ref:s,autoComplete:"on",autoCorrect:"on",autoCapitalize:"off",spellCheck:!1,maxLength:512,type:"search",value:i,onChange:e=>a(e.currentTarget.value),autoFocus:!0})]}),An("div",{style:{display:"flex",gap:"1rem",marginTop:"1rem"},children:[An("button",{type:"submit",children:"Submit"}),An("button",{type:"reset",hidden:0===i.length||u,children:"Reset"})]}),An(Tn,{status:n,query:t})]})};var Cn=function(){return Cn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0?ei(fi,--ui):0,si--,10===li&&(si=1,ai--),li}function yi(){return li=ui2||_i(li)>3?"":" "}function Pi(e,t){for(;--t&&yi()&&!(li<48||li>102||li>57&&li<65||li>70&&li<97););return bi(e,gi()+(t<6&&32==vi()&&32==yi()))}function Ri(e){for(;yi();)switch(li){case e:return ui;case 34:case 39:34!==e&&39!==e&&Ri(li);break;case 40:41===e&&Ri(e);break;case 92:yi()}return ui}function xi(e,t){for(;yi()&&e+li!==57&&(e+li!==84||47!==vi()););return"/*"+bi(t,ui-1)+"*"+zn(47===e?e:yi())}function Ei(e){for(;!_i(vi());)yi();return bi(e,ui)}function Fi(e,t){for(var r="",n=0;n6)switch(ei(e,t+1)){case 109:if(45!==ei(e,t+4))break;case 102:return Zn(e,/(.+:)(.+)-([^]+)/,"$1"+Mn+"$2-$3$1"+$n+(108==ei(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Xn(e,"stretch")?Ai(Zn(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return Zn(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(t,r,n,i,o,a,s){return Ln+r+":"+n+s+(i?Ln+r+"-span:"+(o?a:+a-+n)+s:"")+e}));case 4949:if(121===ei(e,t+6))return Zn(e,":",":"+Mn)+e;break;case 6444:switch(ei(e,45===ei(e,14)?18:11)){case 120:return Zn(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Mn+(45===ei(e,14)?"inline-":"")+"box$3$1"+Mn+"$2$3$1"+Ln+"$2box$3")+e;case 100:return Zn(e,":",":"+Ln)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Zn(e,"scroll-","scroll-snap-")+e}return e}function Ti(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case Qn:return void(e.return=Ai(e.value,e.length,r));case Vn:return Fi([pi(e,{value:Zn(e.value,"@","@"+Mn)})],n);case Wn:if(e.length)return function(e,t){return e.map(t).join("")}(r=e.props,(function(t){switch(Kn(t,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":di(pi(e,{props:[Zn(t,/:(read-\w+)/,":"+$n+"$1")]})),di(pi(e,{props:[t]})),Gn(e,{props:oi(r,n)});break;case"::placeholder":di(pi(e,{props:[Zn(t,/:(plac\w+)/,":"+Mn+"input-$1")]})),di(pi(e,{props:[Zn(t,/:(plac\w+)/,":"+$n+"$1")]})),di(pi(e,{props:[Zn(t,/:(plac\w+)/,Ln+"input-$1")]})),di(pi(e,{props:[t]})),Gn(e,{props:oi(r,n)})}return""}))}}function Ii(e){return Oi(Ci("",null,null,null,[""],e=Si(e),0,[0],e))}function Ci(e,t,r,n,i,o,a,s,c){for(var u=0,l=0,f=a,h=0,p=0,d=0,m=1,y=1,v=1,g=0,b="",_=i,S=o,O=n,w=b;y;)switch(d=g,g=yi()){case 40:if(108!=d&&58==ei(w,f-1)){-1!=Xn(w+=Zn(wi(g),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:w+=wi(g);break;case 9:case 10:case 13:case 32:w+=ji(d);break;case 92:w+=Pi(gi()-1,7);continue;case 47:switch(vi()){case 42:case 47:ii(Di(xi(yi(),gi()),t,r,c),c);break;default:w+="/"}break;case 123*m:s[u++]=ri(w)*v;case 125*m:case 59:case 0:switch(g){case 0:case 125:y=0;case 59+l:-1==v&&(w=Zn(w,/\f/g,"")),p>0&&ri(w)-f&&ii(p>32?Hi(w+";",n,r,f-1,c):Hi(Zn(w," ","")+";",n,r,f-2,c),c);break;case 59:w+=";";default:if(ii(O=ki(w,t,r,u,l,i,s,b,_=[],S=[],f,o),o),123===g)if(0===l)Ci(w,t,O,O,_,o,f,s,S);else switch(99===h&&110===ei(w,3)?100:h){case 100:case 108:case 109:case 115:Ci(e,O,O,n&&ii(ki(e,O,O,0,0,i,s,b,i,_=[],f,S),S),i,S,f,s,n?_:S);break;default:Ci(w,O,O,O,[""],S,0,s,S)}}u=l=p=0,m=v=1,b=w="",f=a;break;case 58:f=1+ri(w),p=d;default:if(m<1)if(123==g)--m;else if(125==g&&0==m++&&125==mi())continue;switch(w+=zn(g),g*m){case 38:v=l>0?1:(w+="\f",-1);break;case 44:s[u++]=(ri(w)-1)*v,v=1;break;case 64:45===vi()&&(w+=wi(yi())),h=vi(),l=f=ri(b=w+=Ei(gi())),g++;break;case 45:45===d&&2==ri(w)&&(m=0)}}return o}function ki(e,t,r,n,i,o,a,s,c,u,l,f){for(var h=i-1,p=0===i?o:[""],d=ni(p),m=0,y=0,v=0;m0?p[g]+" "+b:Zn(b,/&\f/g,p[g])))&&(c[v++]=_);return hi(e,t,r,0===i?Wn:s,c,u,l,f)}function Di(e,t,r,n){return hi(e,t,r,Un,zn(li),ti(e,2,-2),0,n)}function Hi(e,t,r,n,i){return hi(e,t,r,Qn,ti(e,0,n),ti(e,n+1,-1),n,i)}var Li={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},$i="undefined"!=typeof process&&("MISSING_ENV_VAR".REACT_APP_SC_ATTR||"MISSING_ENV_VAR".SC_ATTR)||"data-styled",Mi="undefined"!=typeof window&&"HTMLElement"in window,Ui=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!=="MISSING_ENV_VAR".REACT_APP_SC_DISABLE_SPEEDY&&""!=="MISSING_ENV_VAR".REACT_APP_SC_DISABLE_SPEEDY?"false"!=="MISSING_ENV_VAR".REACT_APP_SC_DISABLE_SPEEDY&&"MISSING_ENV_VAR".REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!=="MISSING_ENV_VAR".SC_DISABLE_SPEEDY&&""!=="MISSING_ENV_VAR".SC_DISABLE_SPEEDY&&("false"!=="MISSING_ENV_VAR".SC_DISABLE_SPEEDY&&"MISSING_ENV_VAR".SC_DISABLE_SPEEDY)),Wi=(new Set,Object.freeze([])),Qi=Object.freeze({});function qi(e,t,r){return void 0===r&&(r=Qi),e.theme!==r.theme&&e.theme||t||r.theme}var Vi=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),Bi=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Yi=/(^-|-$)/g;function zi(e){return e.replace(Bi,"-").replace(Yi,"")}var Gi=/(a)(d)/gi,Ji=function(e){return String.fromCharCode(e+(e>25?39:97))};function Ki(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=Ji(t%52)+r;return(Ji(t%52)+r).replace(Gi,"$1-$2")}var Zi,Xi=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},eo=function(e){return Xi(5381,e)};function to(e){return Ki(eo(e)>>>0)}function ro(e){return e.displayName||e.name||"Component"}function no(e){return"string"==typeof e&&!0}var io="function"==typeof Symbol&&Symbol.for,oo=io?Symbol.for("react.memo"):60115,ao=io?Symbol.for("react.forward_ref"):60112,so={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},co={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},uo={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},lo=((Zi={})[ao]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Zi[oo]=uo,Zi);function fo(e){return("type"in(t=e)&&t.type.$$typeof)===oo?uo:"$$typeof"in e?lo[e.$$typeof]:so;var t}var ho=Object.defineProperty,po=Object.getOwnPropertyNames,mo=Object.getOwnPropertySymbols,yo=Object.getOwnPropertyDescriptor,vo=Object.getPrototypeOf,go=Object.prototype;function bo(e,t,r){if("string"!=typeof t){if(go){var n=vo(t);n&&n!==go&&bo(e,n,r)}var i=po(t);mo&&(i=i.concat(mo(t)));for(var o=fo(e),a=fo(t),s=0;s0?" Args: ".concat(t.join(", ")):""))}var Eo=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,r=0;r=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,i=n;e>=i;)if((i<<=1)<0)throw xo(16,"".concat(e));this.groupSizes=new Uint32Array(i),this.groupSizes.set(r),this.length=i;for(var o=n;o=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),i=n+r,o=n;o=0){var r=document.createTextNode(t);return this.element.insertBefore(r,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e0&&(c+="".concat(e,","))})),n+="".concat(a).concat(s,'{content:"').concat(c,'"}').concat("/*!sc*/\n")},o=0;o0?".".concat(t):e},l=c.slice();l.push((function(e){e.type===Wn&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(Bo,r).replace(n,u))})),a.prefix&&l.push(Ti),l.push(Ni);var f=function(e,i,o,s){void 0===i&&(i=""),void 0===o&&(o=""),void 0===s&&(s="&"),t=s,r=i,n=new RegExp("\\".concat(r,"\\b"),"g");var c=e.replace(Yo,""),u=Ii(o||i?"".concat(o," ").concat(i," { ").concat(c," }"):c);a.namespace&&(u=zo(u,a.namespace));var f,h,p,d=[];return Fi(u,(f=l.concat((p=function(e){return d.push(e)},function(e){e.root||(e=e.return)&&p(e)})),h=ni(f),function(e,t,r,n){for(var i="",o=0;o="A"&&e<="Z"};function ia(e){for(var t="",r=0;r>>0);if(!t.hasNameForId(this.componentId,o)){var a=r(i,".".concat(o),void 0,this.componentId);t.insertRules(this.componentId,o,a)}n=Oo(n,o),this.staticRulesId=o}else{for(var s=Xi(this.baseHash,r.hash),c="",u=0;u>>0);t.hasNameForId(this.componentId,h)||t.insertRules(this.componentId,h,r(c,".".concat(h),void 0,this.componentId)),n=Oo(n,h)}}return n},e}(),fa=o.default.createContext(void 0);fa.Consumer;var ha={};new Set;function pa(e,t,r){var n=So(e),i=e,a=!no(e),s=t.attrs,c=void 0===s?Wi:s,u=t.componentId,l=void 0===u?function(e,t){var r="string"!=typeof e?"sc":zi(e);ha[r]=(ha[r]||0)+1;var n="".concat(r,"-").concat(to("6.1.1"+r+ha[r]));return t?"".concat(t,"-").concat(n):n}(t.displayName,t.parentComponentId):u,f=t.displayName,h=void 0===f?function(e){return no(e)?"styled.".concat(e):"Styled(".concat(ro(e),")")}(e):f,p=t.displayName&&t.componentId?"".concat(zi(t.displayName),"-").concat(t.componentId):t.componentId||l,d=n&&i.attrs?i.attrs.concat(c).filter(Boolean):c,m=t.shouldForwardProp;if(n&&i.shouldForwardProp){var y=i.shouldForwardProp;if(t.shouldForwardProp){var v=t.shouldForwardProp;m=function(e,t){return y(e,t)&&v(e,t)}}else m=y}var g=new la(r,p,n?i.componentStyle:void 0);function b(e,t){return function(e,t,r){var n=e.attrs,i=e.componentStyle,a=e.defaultProps,s=e.foldedComponentIds,c=e.styledComponentId,u=e.target,l=o.default.useContext(fa),f=ea(),h=e.shouldForwardProp||f.shouldForwardProp,p=function(e,t,r){for(var n,i=Cn(Cn({},t),{className:void 0,theme:r}),o=0;o2&&Vo.registerId(this.componentId+e),this.removeStyles(e,r),this.createStyles(e,t,r,n)}}();(function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString(),r=Lo(),n=wo([r&&'nonce="'.concat(r,'"'),"".concat($i,'="true"'),"".concat("data-styled-version",'="').concat("6.1.1",'"')].filter(Boolean)," ");return"")},this.getStyleTags=function(){if(e.sealed)throw xo(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw xo(2);var r=((t={})[$i]="",t["data-styled-version"]="6.1.1",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),n=Lo();return n&&(r.nonce=n),[o.default.createElement("style",Cn({},r,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new Vo({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw xo(2);return o.default.createElement(ta,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw xo(3)}})(),"__sc-".concat($i,"__");var _a=["parts","highlightedTagName","nonHighlightedTagName","separator","className","classNames"];function Sa(){return Sa=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function wa(e){var t=e.classNames,r=e.children,n=e.highlightedTagName,i=e.isHighlighted,a=e.nonHighlightedTagName,s=i?n:a;return o.default.createElement(s,{className:i?t.highlighted:t.nonHighlighted},r)}function ja(e){var t=e.parts,r=e.highlightedTagName,n=void 0===r?"mark":r,i=e.nonHighlightedTagName,a=void 0===i?"span":i,s=e.separator,c=void 0===s?", ":s,u=e.className,l=e.classNames,f=Oa(e,_a);return o.default.createElement("span",Sa({},f,{className:cn(l.root,u)}),t.map((function(e,r){var i=r===t.length-1;return o.default.createElement(o.Fragment,{key:r},e.map((function(e,t){return o.default.createElement(wa,{key:t,classNames:l,highlightedTagName:n,nonHighlightedTagName:a,isHighlighted:e.isHighlighted},e.value)})),!i&&o.default.createElement("span",{className:l.separator},c))})))}var Pa=["classNames"];function Ra(){return Ra=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Ea(e){var t=e.classNames,r=void 0===t?{}:t,n=xa(e,Pa);return o.default.createElement(ja,Ra({classNames:{root:cn("ais-Highlight",r.root),highlighted:cn("ais-Highlight-highlighted",r.highlighted),nonHighlighted:cn("ais-Highlight-nonHighlighted",r.nonHighlighted),separator:cn("ais-Highlight-separator",r.separator)}},n))}var Fa=["hit","attribute","highlightedTagName","nonHighlightedTagName","separator"];function Na(){return Na=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Ta(e){var t=e.hit,r=e.attribute,n=e.highlightedTagName,i=e.nonHighlightedTagName,a=e.separator,s=Aa(e,Fa),c=ke(t._highlightResult,r)||[],u=(Array.isArray(c)?c:[c]).map((function(e){return lt(We(e.value||""))}));return o.default.createElement(Ea,Na({},s,{parts:u,highlightedTagName:n,nonHighlightedTagName:i,separator:a}))}var Ia=["classNames"];function Ca(){return Ca=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Da(e){var t=e.classNames,r=void 0===t?{}:t,n=ka(e,Ia);return o.default.createElement(ja,Ca({classNames:{root:cn("ais-Snippet",r.root),highlighted:cn("ais-Snippet-highlighted",r.highlighted),nonHighlighted:cn("ais-Snippet-nonHighlighted",r.nonHighlighted),separator:cn("ais-Snippet-separator",r.separator)}},n))}var Ha=["hit","attribute","highlightedTagName","nonHighlightedTagName","separator"];function La(){return La=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Ma(e){var t=e.hit,r=e.attribute,n=e.highlightedTagName,i=e.nonHighlightedTagName,a=e.separator,s=$a(e,Ha),c=ke(t._snippetResult,r)||[],u=(Array.isArray(c)?c:[c]).map((function(e){return lt(We(e.value||""))}));return o.default.createElement(Da,La({},s,{parts:u,highlightedTagName:n,nonHighlightedTagName:i,separator:a}))}const Ua=ba.article` +!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(self,(()=>(()=>{var e={331:e=>{function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function n(e){return"object"==typeof e&&null!==e}function i(e){return void 0===e}e.exports=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,o,a,s,c,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(i(o=this._events[e]))return!1;if(r(o))switch(arguments.length){case 1:o.call(this);break;case 2:o.call(this,arguments[1]);break;case 3:o.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),o.apply(this,s)}else if(n(o))for(s=Array.prototype.slice.call(arguments,1),a=(u=o.slice()).length,c=0;c0&&this._events[e].length>a&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},t.prototype.removeListener=function(e,t){var i,o,a,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(i=this._events[e]).length,o=-1,i===t||r(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(n(i)){for(s=a;s-- >0;)if(i[s]===t||i[s].listener&&i[s].listener===t){o=s;break}if(o<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},131:(e,t,r)=>{"use strict";var n=r(374),i=r(775),o=r(76);function a(e,t,r){return new n(e,t,r)}a.version=r(336),a.AlgoliaSearchHelper=n,a.SearchParameters=i,a.SearchResults=o,e.exports=a},78:(e,t,r)=>{"use strict";var n=r(331);function i(e,t){this.main=e,this.fn=t,this.lastResults=null}r(853)(i,n),i.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},i.prototype.getModifiedState=function(e){return this.fn(e)},e.exports=i},437:(e,t,r)=>{"use strict";var n=r(344),i=r(116),o=r(803),a={addRefinement:function(e,t,r){if(a.isRefined(e,t,r))return e;var i=""+r,o=e[t]?e[t].concat(i):[i],s={};return s[t]=o,n({},s,e)},removeRefinement:function(e,t,r){if(void 0===r)return a.clearRefinement(e,(function(e,r){return t===r}));var n=""+r;return a.clearRefinement(e,(function(e,r){return t===r&&n===e}))},toggleRefinement:function(e,t,r){if(void 0===r)throw new Error("toggleRefinement should be used with a value");return a.isRefined(e,t,r)?a.removeRefinement(e,t,r):a.addRefinement(e,t,r)},clearRefinement:function(e,t,r){if(void 0===t)return i(e)?{}:e;if("string"==typeof t)return o(e,[t]);if("function"==typeof t){var n=!1,a=Object.keys(e).reduce((function(i,o){var a=e[o]||[],s=a.filter((function(e){return!t(e,o,r)}));return s.length!==a.length&&(n=!0),i[o]=s,i}),{});return n?a:e}},isRefined:function(e,t,r){var n=Boolean(e[t])&&e[t].length>0;if(void 0===r||!n)return n;var i=""+r;return-1!==e[t].indexOf(i)}};e.exports=a},775:(e,t,r)=>{"use strict";var n=r(344),i=r(888),o=r(686),a=r(185),s=r(116),c=r(803),u=r(23),l=r(801),f=r(437);function h(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,r){return h(t[r],e)})):e===t}function d(e){var t=e?d._parseNumbers(e):{};void 0===t.userToken||l(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var r=this;Object.keys(t).forEach((function(e){var n=-1!==d.PARAMETERS.indexOf(e),i=void 0!==t[e];!n&&i&&(r[e]=t[e])}))}d.PARAMETERS=Object.keys(new d),d._parseNumbers=function(e){if(e instanceof d)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach((function(r){var n=e[r];if("string"==typeof n){var i=parseFloat(n);t[r]=isNaN(i)?n:i}})),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map((function(e){return Array.isArray(e)?e.map((function(e){return parseFloat(e)})):e}))),e.numericRefinements){var r={};Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t]||{};r[t]={},Object.keys(n).forEach((function(e){var i=n[e].map((function(e){return Array.isArray(e)?e.map((function(e){return"string"==typeof e?parseFloat(e):e})):"string"==typeof e?parseFloat(e):e}));r[t][e]=i}))})),t.numericRefinements=r}return a({},e,t)},d.make=function(e){var t=new d(e);return(e.hierarchicalFacets||[]).forEach((function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(r=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},d.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&r.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&r.numericRefinements&&s(r.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):s(e.numericRefinements)&&r.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},d.prototype={constructor:d,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:f.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:f.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:f.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:f.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var n=u(r);if(this.isNumericRefined(e,t,n))return this;var i=a({},this.numericRefinements);return i[e]=a({},i[e]),i[e][t]?(i[e][t]=i[e][t].slice(),i[e][t].push(n)):i[e][t]=[n],this.setQueryParameters({numericRefinements:i})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,r){var n=r;return void 0!==n?this.isNumericRefined(e,t,n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,i){return i===e&&r.op===t&&h(r.val,u(n))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,n){return n===e&&r.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,r){return r===e}))}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return s(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return c(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,r=this.numericRefinements,n=Object.keys(r).reduce((function(n,i){var o=r[i],a={};return o=o||{},Object.keys(o).forEach((function(r){var n=o[r]||[],s=[];n.forEach((function(t){e({val:t,op:r},i,"numeric")||s.push(t)})),s.length!==n.length&&(t=!0),a[r]=s})),n[i]=a,n}),{});return t?n:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:f.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:f.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:f.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter((function(t){return t!==e}))}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter((function(t){return t!==e}))}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter((function(t){return t.name!==e}))}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:f.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:f.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:f.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter((function(t){return t!==e}))};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:f.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:f.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:f.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),i={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?i[e]=[]:i[e]=[t.slice(0,t.lastIndexOf(r))]:i[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},i,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:n({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&f.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var r=this.getHierarchicalRefinement(e);return t?-1!==r.indexOf(t):r.length>0},isNumericRefined:function(e,t,r){if(void 0===r&&void 0===t)return Boolean(this.numericRefinements[e]);var n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!n)return n;var o,a,s=u(r),c=void 0!==(o=this.numericRefinements[e][t],a=s,i(o,(function(e){return h(e,a)})));return n&&c},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=o(Object.keys(this.numericRefinements).filter((function(t){return Object.keys(e.numericRefinements[t]).length>0})),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter((function(t){return e.disjunctiveFacetsRefinements[t].length>0})).concat(t).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var e=this;return o(this.hierarchicalFacets.map((function(e){return e.name})),Object.keys(this.hierarchicalFacetsRefinements).filter((function(t){return e.hierarchicalFacetsRefinements[t].length>0}))).sort()},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter((function(t){return-1===e.indexOf(t)}))},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},r=this;return Object.keys(this).forEach((function(n){var i=r[n];-1===e.indexOf(n)&&void 0!==i&&(t[n]=i)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=d.validate(this,e);if(t)throw t;var r=this,n=d._parseNumbers(e),i=Object.keys(this).reduce((function(e,t){return e[t]=r[t],e}),{}),o=Object.keys(n).reduce((function(e,t){var r=void 0!==e[t],i=void 0!==n[t];return r&&!i?c(e,[t]):(i&&(e[t]=n[t]),e)}),i);return new this.constructor(o)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return i(this.hierarchicalFacets,(function(t){return t.name===e}))},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(r).map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},e.exports=d},210:(e,t,r)=>{"use strict";e.exports=function(e){return function(t,r){var n=e.hierarchicalFacets[r],u=e.hierarchicalFacetsRefinements[n.name]&&e.hierarchicalFacetsRefinements[n.name][0]||"",l=e._getHierarchicalFacetSeparator(n),f=e._getHierarchicalRootPath(n),h=e._getHierarchicalShowParentLevel(n),d=o(e._getHierarchicalFacetSortBy(n)),p=t.every((function(e){return e.exhaustive})),m=function(e,t,r,n,o){return function(u,l,f){var h=u;if(f>0){var d=0;for(h=u;d{"use strict";var n=r(587),i=r(344),o=r(39),a=r(888),s=r(725),c=r(293),u=r(185),l=r(148),f=o.escapeFacetValue,h=o.unescapeFacetValue,d=r(210);function p(e){var t={};return e.forEach((function(e,r){t[e]=r})),t}function m(e,t,r){t&&t[r]&&(e.stats=t[r])}function y(e,t,r){var o=t[0];this._rawResults=t;var c=this;Object.keys(o).forEach((function(e){c[e]=o[e]})),Object.keys(r||{}).forEach((function(e){c[e]=r[e]})),this.processingTimeMS=t.reduce((function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS}),0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map((function(){return[]})),this.facets=[];var l=e.getRefinedDisjunctiveFacets(),f=p(e.facets),y=p(e.disjunctiveFacets),v=1,g=o.facets||{};Object.keys(g).forEach((function(t){var r,n,i=g[t],u=(r=e.hierarchicalFacets,n=t,a(r,(function(e){return(e.attributes||[]).indexOf(n)>-1})));if(u){var l=u.attributes.indexOf(t),h=s(e.hierarchicalFacets,(function(e){return e.name===u.name}));c.hierarchicalFacets[h][l]={attribute:t,data:i,exhaustive:o.exhaustiveFacetsCount}}else{var d,p=-1!==e.disjunctiveFacets.indexOf(t),v=-1!==e.facets.indexOf(t);p&&(d=y[t],c.disjunctiveFacets[d]={name:t,data:i,exhaustive:o.exhaustiveFacetsCount},m(c.disjunctiveFacets[d],o.facets_stats,t)),v&&(d=f[t],c.facets[d]={name:t,data:i,exhaustive:o.exhaustiveFacetsCount},m(c.facets[d],o.facets_stats,t))}})),this.hierarchicalFacets=n(this.hierarchicalFacets),l.forEach((function(r){var n=t[v],a=n&&n.facets?n.facets:{},l=e.getHierarchicalFacetByName(r);Object.keys(a).forEach((function(t){var r,f=a[t];if(l){r=s(e.hierarchicalFacets,(function(e){return e.name===l.name}));var d=s(c.hierarchicalFacets[r],(function(e){return e.attribute===t}));if(-1===d)return;c.hierarchicalFacets[r][d].data=u({},c.hierarchicalFacets[r][d].data,f)}else{r=y[t];var p=o.facets&&o.facets[t]||{};c.disjunctiveFacets[r]={name:t,data:i({},f,p),exhaustive:n.exhaustiveFacetsCount},m(c.disjunctiveFacets[r],n.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(n){!c.disjunctiveFacets[r].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(h(n))>-1&&(c.disjunctiveFacets[r].data[n]=0)}))}})),v++})),e.getRefinedHierarchicalFacets().forEach((function(r){var n=e.getHierarchicalFacetByName(r),o=e._getHierarchicalFacetSeparator(n),a=e.getHierarchicalRefinement(r);0===a.length||a[0].split(o).length<2||t.slice(v).forEach((function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach((function(t){var u=r[t],l=s(e.hierarchicalFacets,(function(e){return e.name===n.name})),f=s(c.hierarchicalFacets[l],(function(e){return e.attribute===t}));if(-1!==f){var h={};if(a.length>0){var d=a[0].split(o)[0];h[d]=c.hierarchicalFacets[l][f].data[d]}c.hierarchicalFacets[l][f].data=i(h,u,c.hierarchicalFacets[l][f].data)}})),v++}))})),Object.keys(e.facetsExcludes).forEach((function(t){var r=e.facetsExcludes[t],n=f[t];c.facets[n]={name:t,data:g[t],exhaustive:o.exhaustiveFacetsCount},r.forEach((function(e){c.facets[n]=c.facets[n]||{name:t},c.facets[n].data=c.facets[n].data||{},c.facets[n].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(d(e)),this.facets=n(this.facets),this.disjunctiveFacets=n(this.disjunctiveFacets),this._state=e}function v(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=a(e.facets,r);return n?Object.keys(n.data).map((function(r){var i=f(r);return{name:r,escapedValue:i,count:n.data[r],isRefined:e._state.isFacetRefined(t,i),isExcluded:e._state.isExcludeRefined(t,r)}})):[]}if(e._state.isDisjunctiveFacet(t)){var i=a(e.disjunctiveFacets,r);return i?Object.keys(i.data).map((function(r){var n=f(r);return{name:r,escapedValue:n,count:i.data[r],isRefined:e._state.isDisjunctiveFacetRefined(t,n)}})):[]}if(e._state.isHierarchicalFacet(t)){var o=a(e.hierarchicalFacets,r);if(!o)return o;var s=e._state.getHierarchicalFacetByName(t),c=e._state._getHierarchicalFacetSeparator(s),u=h(e._state.getHierarchicalRefinement(t)[0]||"");0===u.indexOf(s.rootPath)&&(u=u.replace(s.rootPath+c,""));var l=u.split(c);return l.unshift(t),g(o,l,0),o}}function g(e,t,r){e.isRefined=e.name===t[r],e.data&&e.data.forEach((function(e){g(e,t,r+1)}))}function b(e,t,r,n){if(n=n||0,Array.isArray(t))return e(t,r[n]);if(!t.data||0===t.data.length)return t;var o=t.data.map((function(t){return b(e,t,r,n+1)})),a=e(o,r[n]);return i({data:a},t)}function _(e,t){var r=a(e,(function(e){return e.name===t}));return r&&r.stats}function S(e,t,r,n,i){var o=a(i,(function(e){return e.name===r})),s=o&&o.data&&o.data[n]?o.data[n]:0,c=o&&o.exhaustive||!1;return{type:t,attributeName:r,name:n,count:s,exhaustive:c}}y.prototype.getFacetByName=function(e){function t(t){return t.name===e}return a(this.facets,t)||a(this.disjunctiveFacets,t)||a(this.hierarchicalFacets,t)},y.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],y.prototype.getFacetValues=function(e,t){var r=v(this,e);if(r){var n,o=i({},t,{sortBy:y.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),a=this;if(Array.isArray(r))n=[e];else n=a._state.getHierarchicalFacetByName(r.name).attributes;return b((function(e,t){if(o.facetOrdering){var r=function(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}(a,t);if(r)return function(e,t){var r=[],n=[],i=(t.order||[]).reduce((function(e,t,r){return e[t]=r,e}),{});e.forEach((function(e){var t=e.path||e.name;void 0!==i[t]?r[i[t]]=e:n.push(e)})),r=r.filter((function(e){return e}));var o,a=t.sortRemainingBy;return"hidden"===a?r:(o="alpha"===a?[["path","name"],["asc","asc"]]:[["count"],["desc"]],r.concat(l(n,o[0],o[1])))}(e,r)}if(Array.isArray(o.sortBy)){var n=c(o.sortBy,y.DEFAULT_SORT);return l(e,n[0],n[1])}if("function"==typeof o.sortBy)return function(e,t){return t.sort(e)}(o.sortBy,e);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}),r,n)}},y.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?_(this.facets,e):this._state.isDisjunctiveFacet(e)?_(this.disjunctiveFacets,e):void 0},y.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach((function(n){e.facetsRefinements[n].forEach((function(i){r.push(S(e,"facet",n,i,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(n){e.facetsExcludes[n].forEach((function(i){r.push(S(e,"exclude",n,i,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(n){e.disjunctiveFacetsRefinements[n].forEach((function(i){r.push(S(e,"disjunctive",n,i,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(n){e.hierarchicalFacetsRefinements[n].forEach((function(i){r.push(function(e,t,r,n){var i=e.getHierarchicalFacetByName(t),o=e._getHierarchicalFacetSeparator(i),s=r.split(o),c=a(n,(function(e){return e.name===t})),u=s.reduce((function(e,t){var r=e&&a(e.data,(function(e){return e.name===t}));return void 0!==r?r:e}),c),l=u&&u.count||0,f=u&&u.exhaustive||!1,h=u&&u.path||"";return{type:"hierarchical",attributeName:t,name:h,count:l,exhaustive:f}}(e,n,i,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t];Object.keys(n).forEach((function(e){n[e].forEach((function(n){r.push({type:"numeric",attributeName:t,name:n,numericValue:n,operator:e})}))}))})),e.tagRefinements.forEach((function(e){r.push({type:"tag",attributeName:"_tags",name:e})})),r},e.exports=y},374:(e,t,r)=>{"use strict";var n=r(331),i=r(78),o=r(39).escapeFacetValue,a=r(853),s=r(185),c=r(116),u=r(803),l=r(394),f=r(775),h=r(76),d=r(336);function p(e,t,r){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+d+")"),this.setClient(e);var n=r||{};n.index=t,this.state=f.make(n),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0}function m(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function y(){return this.state.page}a(p,n),p.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},p.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},p.prototype.getQuery=function(){var e=this.state;return l._getHitsSearchParams(e)},p.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,n=l._getQueries(r.index,r),i=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),!t)return this.client.search(n).then((function(e){return i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),{content:new h(r,e.results),state:r,_originalResponse:e}}),(function(e){throw i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),e}));this.client.search(n).then((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(null,new h(r,e.results),r)})).catch((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(e,null,r)}))},p.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var n=r.getModifiedState(t),i=s({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:u(l._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),o="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!=typeof this.client.initIndex)throw new Error(o);var a=this.client.initIndex(n.index);if("function"!=typeof a.findAnswers)throw new Error(o);return a.findAnswers(n.query,e.queryLanguages,i)},p.prototype.searchForFacetValues=function(e,t,r,n){var i="function"==typeof this.client.searchForFacetValues,a="function"==typeof this.client.initIndex;if(!i&&!a&&"function"!=typeof this.client.search)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var s=this.state.setQueryParameters(n||{}),c=s.isDisjunctiveFacet(e),u=l.getSearchForFacetQuery(e,t,r,s);this._currentNbQueries++;var f,h=this;return i?f=this.client.searchForFacetValues([{indexName:s.index,params:u}]):a?f=this.client.initIndex(s.index).searchForFacetValues(u):(delete u.facetName,f=this.client.search([{type:"facet",facet:e,indexName:s.index,params:u}]).then((function(e){return e.results[0]}))),this.emit("searchForFacetValues",{state:s,facet:e,query:t}),f.then((function(t){return h._currentNbQueries--,0===h._currentNbQueries&&h.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach((function(t){t.escapedValue=o(t.value),t.isRefined=c?s.isDisjunctiveFacetRefined(e,t.escapedValue):s.isFacetRefined(e,t.escapedValue)})),t}),(function(e){throw h._currentNbQueries--,0===h._currentNbQueries&&h.emit("searchQueueEmpty"),e}))},p.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},p.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},p.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},p.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},p.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},p.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},p.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},p.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},p.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},p.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},p.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},p.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},p.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},p.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},p.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},p.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},p.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},p.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},p.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},p.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},p.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},p.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},p.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},p.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},p.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},p.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},p.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},p.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},p.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},p.prototype.setCurrentPage=m,p.prototype.setPage=m,p.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},p.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},p.prototype.setState=function(e){return this._change({state:f.make(e),isPageReset:!1}),this},p.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new f(e),this},p.prototype.hasRefinements=function(e){return!!c(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},p.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},p.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},p.prototype.hasTag=function(e){return this.state.isTagRefined(e)},p.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},p.prototype.getIndex=function(){return this.state.index},p.prototype.getCurrentPage=y,p.prototype.getPage=y,p.prototype.getTags=function(){return this.state.tagRefinements},p.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"conjunctive"})})),this.state.getExcludeRefinements(e).forEach((function(e){t.push({value:e,type:"exclude"})}));else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach((function(e){var n=r[e];t.push({value:n,operator:e,type:"numeric"})})),t},p.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},p.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},p.prototype._search=function(e){var t=this.state,r=[],n=[];e.onlyWithDerivedHelpers||(n=l._getQueries(t.index,t),r.push({state:t,queriesCount:n.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map((function(e){var n=e.getModifiedState(t),i=n.index?l._getQueries(n.index,n):[];return r.push({state:n,queriesCount:i.length,helper:e}),e.emit("search",{state:n,results:e.lastResults}),i})),o=Array.prototype.concat.apply(n,i),a=this._queryId++;if(this._currentNbQueries++,!o.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,r,a));try{this.client.search(o).then(this._dispatchAlgoliaResponse.bind(this,r,a)).catch(this._dispatchAlgoliaError.bind(this,a))}catch(e){this.emit("error",{error:e})}},p.prototype._dispatchAlgoliaResponse=function(e,t,r){if(!(t0},p.prototype._change=function(e){var t=e.state,r=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))},p.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},p.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+d+")"),this.client=e),this},p.prototype.getClient=function(){return this.client},p.prototype.derive=function(e){var t=new i(this,e);return this.derivedHelpers.push(t),t},p.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},p.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=p},587:e=>{"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},344:e=>{"use strict";e.exports=function(){return Array.prototype.slice.call(arguments).reduceRight((function(e,t){return Object.keys(Object(t)).forEach((function(r){void 0!==t[r]&&(void 0!==e[r]&&delete e[r],e[r]=t[r])})),e}),{})}},39:e=>{"use strict";e.exports={escapeFacetValue:function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},unescapeFacetValue:function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")}}},888:e=>{"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var r=0;r{"use strict";e.exports=function(e,t){if(!Array.isArray(e))return-1;for(var r=0;r{"use strict";var n=r(888);e.exports=function(e,t){var r=(t||[]).map((function(e){return e.split(":")}));return e.reduce((function(e,t){var i=t.split(":"),o=n(r,(function(e){return e[0]===i[0]}));return i.length>1||!o?(e[0].push(i[0]),e[1].push(i[1]),e):(e[0].push(o[0]),e[1].push(o[1]),e)}),[[],[]])}},853:e=>{"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},686:e=>{"use strict";e.exports=function(e,t){return e.filter((function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n}))}},185:e=>{"use strict";function t(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function r(e,n){if(e===n)return e;for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&"__proto__"!==i&&"constructor"!==i){var o=n[i],a=e[i];void 0!==a&&void 0===o||(t(a)&&t(o)?e[i]=r(a,o):e[i]="object"==typeof(s=o)&&null!==s?r(Array.isArray(s)?[]:{},s):s)}var s;return e}e.exports=function(e){t(e)||(e={});for(var n=1,i=arguments.length;n{"use strict";e.exports=function(e){return e&&Object.keys(e).length>0}},803:e=>{"use strict";e.exports=function(e,t){if(null===e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}},148:e=>{"use strict";function t(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=void 0!==t,o=null===t;if(!o&&e>t||n&&i||!r)return 1;if(!n&&e=n.length?o:"desc"===n[i]?-o:o}return e.index-r.index})),i.map((function(e){return e.value}))}},23:e=>{"use strict";e.exports=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")}},394:(e,t,r)=>{"use strict";var n=r(185);function i(e){return Object.keys(e).sort().reduce((function(t,r){return t[r]=e[r],t}),{})}var o={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:o._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach((function(n){r.push({indexName:e,params:o._getDisjunctiveFacetSearchParams(t,n)})})),t.getRefinedHierarchicalFacets().forEach((function(n){var i=t.getHierarchicalFacetByName(n),a=t.getHierarchicalRefinement(n),s=t._getHierarchicalFacetSeparator(i);if(a.length>0&&a[0].split(s).length>1){var c=a[0].split(s).slice(0,-1).reduce((function(e,t,r){return e.concat({attribute:i.attributes[r],value:0===r?t:[e[e.length-1].value,t].join(s)})}),[]);c.forEach((function(n,a){var s=o._getDisjunctiveFacetSearchParams(t,n.attribute,0===a);function u(e){return i.attributes.some((function(t){return t===e.split(":")[0]}))}var l=(s.facetFilters||[]).reduce((function(e,t){if(Array.isArray(t)){var r=t.filter((function(e){return!u(e)}));r.length>0&&e.push(r)}return"string"!=typeof t||u(t)||e.push(t),e}),[]),f=c[a-1];s.facetFilters=a>0?l.concat(f.attribute+":"+f.value):l.length>0?l:void 0,r.push({indexName:e,params:s})}))}})),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(o._getHitsHierarchicalFacetsAttributes(e)).sort(),r=o._getFacetFilters(e),a=o._getNumericFilters(e),s=o._getTagFilters(e),c={facets:t.indexOf("*")>-1?["*"]:t,tagFilters:s};return r.length>0&&(c.facetFilters=r),a.length>0&&(c.numericFilters=a),i(n({},e.getQueryParams(),c))},_getDisjunctiveFacetSearchParams:function(e,t,r){var a=o._getFacetFilters(e,t,r),s=o._getNumericFilters(e,t),c=o._getTagFilters(e),u={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};c.length>0&&(u.tagFilters=c);var l=e.getHierarchicalFacetByName(t);return u.facets=l?o._getDisjunctiveHierarchicalFacetAttribute(e,l,r):t,s.length>0&&(u.numericFilters=s),a.length>0&&(u.facetFilters=a),i(n({},e.getQueryParams(),u))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return Object.keys(e.numericRefinements).forEach((function(n){var i=e.numericRefinements[n]||{};Object.keys(i).forEach((function(e){var o=i[e]||[];t!==n&&o.forEach((function(t){if(Array.isArray(t)){var i=t.map((function(t){return n+e+t}));r.push(i)}else r.push(n+e+t)}))}))})),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var n=[],i=e.facetsRefinements||{};Object.keys(i).sort().forEach((function(e){(i[e]||[]).sort().forEach((function(t){n.push(e+":"+t)}))}));var o=e.facetsExcludes||{};Object.keys(o).sort().forEach((function(e){(o[e]||[]).sort().forEach((function(t){n.push(e+":-"+t)}))}));var a=e.disjunctiveFacetsRefinements||{};Object.keys(a).sort().forEach((function(e){var r=a[e]||[];if(e!==t&&r&&0!==r.length){var i=[];r.sort().forEach((function(t){i.push(e+":"+t)})),n.push(i)}}));var s=e.hierarchicalFacetsRefinements||{};return Object.keys(s).sort().forEach((function(i){var o=(s[i]||[])[0];if(void 0!==o){var a,c,u=e.getHierarchicalFacetByName(i),l=e._getHierarchicalFacetSeparator(u),f=e._getHierarchicalRootPath(u);if(t===i){if(-1===o.indexOf(l)||!f&&!0===r||f&&f.split(l).length===o.split(l).length)return;f?(c=f.split(l).length-1,o=f):(c=o.split(l).length-2,o=o.slice(0,o.lastIndexOf(l))),a=u.attributes[c]}else c=o.split(l).length-1,a=u.attributes[c];a&&n.push([a+":"+o])}})),n},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce((function(t,r){var n=e.getHierarchicalRefinement(r.name)[0];if(!n)return t.push(r.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(r),o=n.split(i).length,a=r.attributes.slice(0,o+1);return t.concat(a)}),[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(!0===r){var i=e._getHierarchicalRootPath(t),o=0;return i&&(o=i.split(n).length),[t.attributes[o]]}var a=(e.getHierarchicalRefinement(t.name)[0]||"").split(n).length-1;return t.attributes.slice(0,a+1)},getSearchForFacetQuery:function(e,t,r,a){var s=a.isDisjunctiveFacet(e)?a.clearRefinements(e):a,c={facetQuery:t,facetName:e};return"number"==typeof r&&(c.maxFacetHits=r),i(n({},o._getHitsSearchParams(s),c))}};e.exports=o},801:e=>{"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},336:e=>{"use strict";e.exports="3.15.0"},290:function(e){e.exports=function(){"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(r){for(var n=1;n=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function o(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){s();var t=JSON.stringify(e);return o()[t]})).then((function(e){return Promise.all([e?e.value:t(),void 0!==e])})).then((function(e){var t=i(e,2),n=t[0],o=t[1];return Promise.all([n,o||r.miss(n)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=o();return i[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},n().setItem(r,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=o();delete t[JSON.stringify(e)],n().setItem(r,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){n().removeItem(r)}))}}}function s(e){var t=o(e.caches),r=t.shift();return void 0===r?{get:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,r.miss(e)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(e,n,i).catch((function(){return s({caches:t}).get(e,n,i)}))},set:function(e,n){return r.set(e,n).catch((function(){return s({caches:t}).set(e,n)}))},delete:function(e){return r.delete(e).catch((function(){return s({caches:t}).delete(e)}))},clear:function(){return r.clear().catch((function(){return s({caches:t}).clear()}))}}}function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},o=JSON.stringify(r);if(o in t)return Promise.resolve(e.serializable?JSON.parse(t[o]):t[o]);var a=n(),s=i&&i.miss||function(){return Promise.resolve()};return a.then((function(e){return s(e)})).then((function(){return a}))},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function u(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function l(e,t){return t?(Object.keys(t).forEach((function(r){e[r]=t[r](e)})),e):e}function f(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var p={Read:1,Write:2,Any:3},m=1,y=2,v=3;function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:m;return r(r({},e),{},{status:t,lastUpdate:Date.now()})}function b(e){return"string"==typeof e?{protocol:"https",url:e,accept:p.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||p.Any}}var _="GET",S="POST";function w(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(g(t))}))}))).then((function(e){var r=e.filter((function(e){return function(e){return e.status===m||Date.now()-e.lastUpdate>12e4}(e)})),n=e.filter((function(e){return function(e){return e.status===v&&Date.now()-e.lastUpdate<=12e4}(e)})),i=[].concat(o(r),o(n));return{getTimeout:function(e,t){return(0===n.length&&0===e?1:n.length+3+e)*t},statelessHosts:i.length>0?i.map((function(e){return b(e)})):t}}))}function O(e,t,n,i){var a=[],s=function(e,t){if(e.method!==_&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:r(r({},e.data),t.data);return JSON.stringify(n)}}(n,i),c=function(e,t){var n=r(r({},e.headers),t.headers),i={};return Object.keys(n).forEach((function(e){var t=n[e];i[e.toLowerCase()]=t})),i}(e,i),u=n.method,l=n.method!==_?{}:r(r({},n.data),i.data),f=r(r(r({"x-algolia-agent":e.userAgent.value},e.queryParameters),l),i.queryParameters),h=0,d=function t(r,o){var l=r.pop();if(void 0===l)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:x(a)};var d={data:s,headers:c,method:u,url:P(l,n.path,f),connectTimeout:o(h,e.timeouts.connect),responseTimeout:o(h,i.timeout)},p=function(e){var t={request:d,response:e,host:l,triesLeft:r.length};return a.push(t),t},m={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e)},onRetry:function(n){var i=p(n);return n.isTimedOut&&h++,Promise.all([e.logger.info("Retryable failure",E(i)),e.hostsCache.set(l,g(l,n.isTimedOut?v:y))]).then((function(){return t(r,o)}))},onFail:function(e){throw p(e),function(e,t){var r=e.content,n=e.status,i=r;try{i=JSON.parse(r).message}catch(e){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(i,n,t)}(e,x(a))}};return e.requester.send(d).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,r=e.status;return!t&&0==~~r}(e)||2!=~~(t/100)&&4!=~~(t/100)}(e)?t.onRetry(e):2==~~(e.status/100)?t.onSuccess(e):t.onFail(e)}(e,m)}))};return w(e.hostsCache,t).then((function(e){return d(o(e.statelessHosts).reverse(),e.getTimeout)}))}function j(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var r="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(r)&&(t.value="".concat(t.value).concat(r)),t}};return t}function P(e,t,r){var n=R(r),i="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return n.length&&(i+="?".concat(n)),i}function R(e){return Object.keys(e).map((function(t){return f("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function x(e){return e.map((function(e){return E(e)}))}function E(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return r(r({},e),{},{request:r(r({},e.request),{},{headers:r(r({},e.request.headers),t)})})}var F=function(e){var t=e.appId,n=function(e,t,r){var n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:function(){return e===h.WithinHeaders?n:{}},queryParameters:function(){return e===h.WithinQueryParameters?n:{}}}}(void 0!==e.authMode?e.authMode:h.WithinHeaders,t,e.apiKey),o=function(e){var t=e.hostsCache,r=e.logger,n=e.requester,o=e.requestsCache,a=e.responsesCache,s=e.timeouts,c=e.userAgent,u=e.hosts,l=e.queryParameters,f={hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:a,timeouts:s,userAgent:c,headers:e.headers,queryParameters:l,hosts:u.map((function(e){return b(e)})),read:function(e,t){var r=d(t,f.timeouts.read),n=function(){return O(f,f.hosts.filter((function(e){return 0!=(e.accept&p.Read)})),e,r)};if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();var o={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(o,(function(){return f.requestsCache.get(o,(function(){return f.requestsCache.set(o,n()).then((function(e){return Promise.all([f.requestsCache.delete(o),e])}),(function(e){return Promise.all([f.requestsCache.delete(o),Promise.reject(e)])})).then((function(e){var t=i(e,2);return t[0],t[1]}))}))}),{miss:function(e){return f.responsesCache.set(o,e)}})},write:function(e,t){return O(f,f.hosts.filter((function(e){return 0!=(e.accept&p.Write)})),e,d(t,f.timeouts.write))}};return f}(r(r({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:p.Read},{url:"".concat(t,".algolia.net"),accept:p.Write}].concat(u([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e),{},{headers:r(r(r({},n.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:r(r({},n.queryParameters()),e.queryParameters)}));return l({transporter:o,appId:t,addAlgoliaAgent:function(e,t){o.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([o.requestsCache.clear(),o.responsesCache.clear()]).then((function(){}))}},e.methods)},A=function(e){return function(t,r){return t.method===_?e.transporter.read(t,r):e.transporter.write(t,r)}},N=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l({transporter:e.transporter,appId:e.appId,indexName:t},r.methods)}},T=function(e){return function(t,n){var i=t.map((function(e){return r(r({},e),{},{params:R(e.params||{})})}));return e.transporter.read({method:S,path:"1/indexes/*/queries",data:{requests:i},cacheable:!0},n)}},I=function(e){return function(t,i){return Promise.all(t.map((function(t){var o=t.params,a=o.facetName,s=o.facetQuery,c=n(o,["facetName","facetQuery"]);return N(e)(t.indexName,{methods:{searchForFacetValues:D}}).searchForFacetValues(a,s,r(r({},i),c))})))}},C=function(e){return function(t,r,n){return e.transporter.read({method:S,path:f("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n)}},k=function(e){return function(t,r){return e.transporter.read({method:S,path:f("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r)}},D=function(e){return function(t,r,n){return e.transporter.read({method:S,path:f("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n)}},H=1,L=2,U=3;function $(e,t,n){var i,o={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return r.setRequestHeader(t,e.headers[t])}));var n,i=function(e,n){return setTimeout((function(){r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e)},o=i(e.connectTimeout,"Connection timeout");r.onreadystatechange=function(){r.readyState>r.OPENED&&void 0===n&&(clearTimeout(o),n=i(e.responseTimeout,"Socket timeout"))},r.onerror=function(){0===r.status&&(clearTimeout(o),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=function(){clearTimeout(o),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},logger:(i=U,{debug:function(e,t){return H>=i&&console.debug(e,t),Promise.resolve()},info:function(e,t){return L>=i&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:c(),requestsCache:c({serializable:!1}),hostsCache:s({caches:[a({key:"".concat("4.20.0","-").concat(e)}),c()]}),userAgent:j("4.20.0").add({segment:"Browser",version:"lite"}),authMode:h.WithinQueryParameters};return F(r(r(r({},o),n),{},{methods:{search:T,searchForFacetValues:I,multipleQueries:T,multipleSearchForFacetValues:I,customRequest:A,initIndex:function(e){return function(t){return N(e)(t,{methods:{search:k,searchForFacetValues:D,findAnswers:C}})}}}}))}return $.version="4.20.0",$}()},904:e=>{"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC1738",i="RFC3986";e.exports={default:i,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:n,RFC3986:i}},368:(e,t,r)=>{"use strict";var n=r(307),i=r(316),o=r(904);e.exports={formats:o,parse:i,stringify:n}},316:(e,t,r)=>{"use strict";var n=r(84),i=Object.prototype.hasOwnProperty,o=Array.isArray,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},c=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},u=function(e,t,r,n){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(o),u=s?o.slice(0,s.index):o,l=[];if(u){if(!r.plainObjects&&i.call(Object.prototype,u)&&!r.allowPrototypes)return;l.push(u)}for(var f=0;r.depth>0&&null!==(s=a.exec(o))&&f=0;--o){var a,s=e[o];if("[]"===s&&r.parseArrays)a=[].concat(i);else{a=r.plainObjects?Object.create(null):{};var u="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(u,10);r.parseArrays||""!==u?!isNaN(l)&&s!==u&&String(l)===u&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(a=[])[l]=i:"__proto__"!==u&&(a[u]=i):a={0:i}}i=a}return i}(l,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var l="string"==typeof e?function(e,t){var r,u={},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,h=l.split(t.delimiter,f),d=-1,p=t.charset;if(t.charsetSentinel)for(r=0;r-1&&(y=o(y)?[y]:y),i.call(u,m)?u[m]=n.combine(u[m],y):u[m]=y}return u}(e,r):e,f=r.plainObjects?Object.create(null):{},h=Object.keys(l),d=0;d{"use strict";var n=r(84),i=r(904),o=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,c=String.prototype.split,u=Array.prototype.push,l=function(e,t){u.apply(e,s(t)?t:[t])},f=Date.prototype.toISOString,h=i.default,d={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,format:h,formatter:i.formatters[h],indices:!1,serializeDate:function(e){return f.call(e)},skipNulls:!1,strictNullHandling:!1},p=function e(t,r,i,o,a,u,f,h,p,m,y,v,g,b){var _,S=t;if("function"==typeof f?S=f(r,S):S instanceof Date?S=m(S):"comma"===i&&s(S)&&(S=n.maybeMap(S,(function(e){return e instanceof Date?m(e):e}))),null===S){if(o)return u&&!g?u(r,d.encoder,b,"key",y):r;S=""}if("string"==typeof(_=S)||"number"==typeof _||"boolean"==typeof _||"symbol"==typeof _||"bigint"==typeof _||n.isBuffer(S)){if(u){var w=g?r:u(r,d.encoder,b,"key",y);if("comma"===i&&g){for(var O=c.call(String(S),","),j="",P=0;P0?S.join(",")||null:void 0}];else if(s(f))R=f;else{var E=Object.keys(S);R=h?E.sort(h):E}for(var F=0;F0?g+v:""}},84:(e,t,r)=>{"use strict";var n=r(904),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n1;){var t=e.pop(),r=t.obj[t.prop];if(o(r)){for(var n=[],i=0;i=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||o===n.RFC1738&&(40===l||41===l)?c+=s.charAt(u):l<128?c+=a[l]:l<2048?c+=a[192|l>>6]+a[128|63&l]:l<55296||l>=57344?c+=a[224|l>>12]+a[128|l>>6&63]+a[128|63&l]:(u+=1,l=65536+((1023&l)<<10|1023&s.charCodeAt(u)),c+=a[240|l>>18]+a[128|l>>12&63]+a[128|l>>6&63]+a[128|63&l])}return c},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var r=[],n=0;n{"use strict";r.r(t),r.d(t,{Children:()=>V,Component:()=>s.wA,Fragment:()=>s.HY,PureComponent:()=>U,StrictMode:()=>Ne,Suspense:()=>J,SuspenseList:()=>X,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>Se,cloneElement:()=>Re,createContext:()=>s.kr,createElement:()=>s.az,createFactory:()=>Oe,createPortal:()=>ne,createRef:()=>s.Vf,default:()=>Le,findDOMNode:()=>Ee,flushSync:()=>Ae,forwardRef:()=>Q,hydrate:()=>fe,isElement:()=>De,isFragment:()=>Pe,isValidElement:()=>je,lazy:()=>Z,memo:()=>$,render:()=>le,startTransition:()=>Te,unmountComponentAtNode:()=>xe,unstable_batchedUpdates:()=>Fe,useCallback:()=>j,useContext:()=>P,useDebugValue:()=>R,useDeferredValue:()=>Ie,useEffect:()=>b,useErrorBoundary:()=>x,useId:()=>E,useImperativeHandle:()=>w,useInsertionEffect:()=>ke,useLayoutEffect:()=>_,useMemo:()=>O,useReducer:()=>g,useRef:()=>S,useState:()=>v,useSyncExternalStore:()=>He,useTransition:()=>Ce,version:()=>we});var n,i,o,a,s=r(400),c=0,u=[],l=[],f=s.YM.__b,h=s.YM.__r,d=s.YM.diffed,p=s.YM.__c,m=s.YM.unmount;function y(e,t){s.YM.__h&&s.YM.__h(i,e,c||t),c=0;var r=i.__H||(i.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:l}),r.__[e]}function v(e){return c=1,g(k,e)}function g(e,t,r){var o=y(n++,2);if(o.t=e,!o.__c&&(o.__=[r?r(t):k(void 0,t),function(e){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,e);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}))}],o.__c=i,!i.u)){var a=function(e,t,r){if(!o.__c.__H)return!0;var n=o.__c.__H.__.filter((function(e){return e.__c}));if(n.every((function(e){return!e.__N})))return!s||s.call(this,e,t,r);var i=!1;return n.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}})),!(!i&&o.__c.props===e)&&(!s||s.call(this,e,t,r))};i.u=!0;var s=i.shouldComponentUpdate,c=i.componentWillUpdate;i.componentWillUpdate=function(e,t,r){if(this.__e){var n=s;s=void 0,a(e,t,r),s=n}c&&c.call(this,e,t,r)},i.shouldComponentUpdate=a}return o.__N||o.__}function b(e,t){var r=y(n++,3);!s.YM.__s&&C(r.__H,t)&&(r.__=e,r.i=t,i.__H.__h.push(r))}function _(e,t){var r=y(n++,4);!s.YM.__s&&C(r.__H,t)&&(r.__=e,r.i=t,i.__h.push(r))}function S(e){return c=5,O((function(){return{current:e}}),[])}function w(e,t,r){c=6,_((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==r?r:r.concat(e))}function O(e,t){var r=y(n++,7);return C(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function j(e,t){return c=8,O((function(){return e}),t)}function P(e){var t=i.context[e.__c],r=y(n++,9);return r.c=e,t?(null==r.__&&(r.__=!0,t.sub(i)),t.props.value):e.__}function R(e,t){s.YM.useDebugValue&&s.YM.useDebugValue(t?t(e):e)}function x(e){var t=y(n++,10),r=v();return t.__=e,i.componentDidCatch||(i.componentDidCatch=function(e,n){t.__&&t.__(e,n),r[1](e)}),[r[0],function(){r[1](void 0)}]}function E(){var e=y(n++,11);if(!e.__){for(var t=i.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function F(){for(var e;e=u.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(T),e.__H.__h.forEach(I),e.__H.__h=[]}catch(t){e.__H.__h=[],s.YM.__e(t,e.__v)}}s.YM.__b=function(e){i=null,f&&f(e)},s.YM.__r=function(e){h&&h(e),n=0;var t=(i=e.__c).__H;t&&(o===i?(t.__h=[],i.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=l,e.__N=e.i=void 0}))):(t.__h.forEach(T),t.__h.forEach(I),t.__h=[],n=0)),o=i},s.YM.diffed=function(e){d&&d(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==u.push(t)&&a===s.YM.requestAnimationFrame||((a=s.YM.requestAnimationFrame)||N)(F)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==l&&(e.__=e.__V),e.i=void 0,e.__V=l}))),o=i=null},s.YM.__c=function(e,t){t.some((function(e){try{e.__h.forEach(T),e.__h=e.__h.filter((function(e){return!e.__||I(e)}))}catch(r){t.some((function(e){e.__h&&(e.__h=[])})),t=[],s.YM.__e(r,e.__v)}})),p&&p(e,t)},s.YM.unmount=function(e){m&&m(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{T(e)}catch(e){t=e}})),r.__H=void 0,t&&s.YM.__e(t,r.__v))};var A="function"==typeof requestAnimationFrame;function N(e){var t,r=function(){clearTimeout(n),A&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);A&&(t=requestAnimationFrame(r))}function T(e){var t=i,r=e.__c;"function"==typeof r&&(e.__c=void 0,r()),i=t}function I(e){var t=i;e.__c=e.__(),i=t}function C(e,t){return!e||e.length!==t.length||t.some((function(t,r){return t!==e[r]}))}function k(e,t){return"function"==typeof t?t(e):t}function D(e,t){for(var r in t)e[r]=t[r];return e}function H(e,t){for(var r in e)if("__source"!==r&&!(r in t))return!0;for(var n in t)if("__source"!==n&&e[n]!==t[n])return!0;return!1}function L(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function U(e){this.props=e}function $(e,t){function r(e){var r=this.props.ref,n=r==e.ref;return!n&&r&&(r.call?r(null):r.current=null),t?!t(this.props,e)||!n:H(this.props,e)}function n(t){return this.shouldComponentUpdate=r,(0,s.az)(e,t)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(U.prototype=new s.wA).isPureReactComponent=!0,U.prototype.shouldComponentUpdate=function(e,t){return H(this.props,e)||H(this.state,t)};var M=s.YM.__b;s.YM.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),M&&M(e)};var W="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Q(e){function t(t){var r=D({},t);return delete r.ref,e(r,t.ref||null)}return t.$$typeof=W,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var q=function(e,t){return null==e?null:(0,s.bR)((0,s.bR)(e).map(t))},V={map:q,forEach:q,count:function(e){return e?(0,s.bR)(e).length:0},only:function(e){var t=(0,s.bR)(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:s.bR},B=s.YM.__e;s.YM.__e=function(e,t,r,n){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=r.__e,t.__k=r.__k),i.__c(e,t);B(e,t,r,n)};var Y=s.YM.unmount;function z(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=D({},e)).__c&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return z(e,t,r)}))),e}function G(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return G(e,t,r)})),e.__c&&e.__c.__P===t&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}function J(){this.__u=0,this.t=null,this.__b=null}function K(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Z(e){var t,r,n;function i(i){if(t||(t=e()).then((function(e){r=e.default||e}),(function(e){n=e})),n)throw n;if(!r)throw t;return(0,s.az)(r,i)}return i.displayName="Lazy",i.__f=!0,i}function X(){this.u=null,this.o=null}s.YM.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Y&&Y(e)},(J.prototype=new s.wA).__c=function(e,t){var r=t.__c,n=this;null==n.t&&(n.t=[]),n.t.push(r);var i=K(n.__v),o=!1,a=function(){o||(o=!0,r.__R=null,i?i(s):s())};r.__R=a;var s=function(){if(! --n.__u){if(n.state.__a){var e=n.state.__a;n.__v.__k[0]=G(e,e.__c.__P,e.__c.__O)}var t;for(n.setState({__a:n.__b=null});t=n.t.pop();)t.forceUpdate()}},c=!0===t.__h;n.__u++||c||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(a,a)},J.prototype.componentWillUnmount=function(){this.t=[]},J.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=z(this.__b,r,n.__O=n.__P)}this.__b=null}var i=t.__a&&(0,s.az)(s.HY,null,e.fallback);return i&&(i.__h=null),[(0,s.az)(s.HY,null,t.__a?null:e.children),i]};var ee=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]>>1,1),t.i.removeChild(e)}}),(0,s.sY)((0,s.az)(te,{context:t.context},e.__v),t.l)}function ne(e,t){var r=(0,s.az)(re,{__v:e,i:t});return r.containerInfo=t,r}(X.prototype=new s.wA).__a=function(e){var t=this,r=K(t.__v),n=t.o.get(e);return n[0]++,function(i){var o=function(){t.props.revealOrder?(n.push(i),ee(t,e,n)):i()};r?r(o):o()}},X.prototype.render=function(e){this.u=null,this.o=new Map;var t=(0,s.bR)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},X.prototype.componentDidUpdate=X.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,r){ee(e,r,t)}))};var ie="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,oe=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ae=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,se=/[A-Z0-9]/g,ce="undefined"!=typeof document,ue=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function le(e,t,r){return null==t.__k&&(t.textContent=""),(0,s.sY)(e,t),"function"==typeof r&&r(),e?e.__c:null}function fe(e,t,r){return(0,s.ZB)(e,t),"function"==typeof r&&r(),e?e.__c:null}s.wA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(s.wA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var he=s.YM.event;function de(){}function pe(){return this.cancelBubble}function me(){return this.defaultPrevented}s.YM.event=function(e){return he&&(e=he(e)),e.persist=de,e.isPropagationStopped=pe,e.isDefaultPrevented=me,e.nativeEvent=e};var ye,ve={enumerable:!1,configurable:!0,get:function(){return this.class}},ge=s.YM.vnode;s.YM.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,r=e.type,n={};for(var i in t){var o=t[i];if(!("value"===i&&"defaultValue"in t&&null==o||ce&&"children"===i&&"noscript"===r||"class"===i||"className"===i)){var a=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===o?o="":"ondoubleclick"===a?i="ondblclick":"onchange"!==a||"input"!==r&&"textarea"!==r||ue(t.type)?"onfocus"===a?i="onfocusin":"onblur"===a?i="onfocusout":ae.test(i)?i=a:-1===r.indexOf("-")&&oe.test(i)?i=i.replace(se,"-$&").toLowerCase():null===o&&(o=void 0):a=i="oninput","oninput"===a&&n[i=a]&&(i="oninputCapture"),n[i]=o}}"select"==r&&n.multiple&&Array.isArray(n.value)&&(n.value=(0,s.bR)(t.children).forEach((function(e){e.props.selected=-1!=n.value.indexOf(e.props.value)}))),"select"==r&&null!=n.defaultValue&&(n.value=(0,s.bR)(t.children).forEach((function(e){e.props.selected=n.multiple?-1!=n.defaultValue.indexOf(e.props.value):n.defaultValue==e.props.value}))),t.class&&!t.className?(n.class=t.class,Object.defineProperty(n,"className",ve)):(t.className&&!t.class||t.class&&t.className)&&(n.class=n.className=t.className),e.props=n}(e),e.$$typeof=ie,ge&&ge(e)};var be=s.YM.__r;s.YM.__r=function(e){be&&be(e),ye=e.__c};var _e=s.YM.diffed;s.YM.diffed=function(e){_e&&_e(e);var t=e.props,r=e.__e;null!=r&&"textarea"===e.type&&"value"in t&&t.value!==r.value&&(r.value=null==t.value?"":t.value),ye=null};var Se={ReactCurrentDispatcher:{current:{readContext:function(e){return ye.__n[e.__c].props.value}}}},we="17.0.2";function Oe(e){return s.az.bind(null,e)}function je(e){return!!e&&e.$$typeof===ie}function Pe(e){return je(e)&&e.type===s.HY}function Re(e){return je(e)?s.Tm.apply(null,arguments):e}function xe(e){return!!e.__k&&((0,s.sY)(null,e),!0)}function Ee(e){return e&&(e.base||1===e.nodeType&&e)||null}var Fe=function(e,t){return e(t)},Ae=function(e,t){return e(t)},Ne=s.HY;function Te(e){e()}function Ie(e){return e}function Ce(){return[!1,Te]}var ke=_,De=je;function He(e,t){var r=t(),n=v({h:{__:r,v:t}}),i=n[0].h,o=n[1];return _((function(){i.__=r,i.v=t,L(i.__,t())||o({h:i})}),[e,r,t]),b((function(){return L(i.__,i.v())||o({h:i}),e((function(){L(i.__,i.v())||o({h:i})}))}),[e]),r}var Le={useState:v,useId:E,useReducer:g,useEffect:b,useLayoutEffect:_,useInsertionEffect:ke,useTransition:Ce,useDeferredValue:Ie,useSyncExternalStore:He,startTransition:Te,useRef:S,useImperativeHandle:w,useMemo:O,useCallback:j,useContext:P,useDebugValue:R,version:"17.0.2",Children:V,render:le,hydrate:fe,unmountComponentAtNode:xe,createPortal:ne,createElement:s.az,createContext:s.kr,createFactory:Oe,cloneElement:Re,createRef:s.Vf,Fragment:s.HY,isValidElement:je,isElement:De,isFragment:Pe,findDOMNode:Ee,Component:s.wA,PureComponent:U,memo:$,forwardRef:Q,flushSync:Ae,unstable_batchedUpdates:Fe,StrictMode:Ne,Suspense:J,SuspenseList:X,lazy:Z,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Se}},400:(e,t,r)=>{"use strict";r.d(t,{HY:()=>_,Tm:()=>Q,Vf:()=>b,YM:()=>i,ZB:()=>W,az:()=>v,bR:()=>E,h:()=>v,kr:()=>q,sY:()=>M,wA:()=>S});var n,i,o,a,s,c,u,l,f={},h=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,p=Array.isArray;function m(e,t){for(var r in t)e[r]=t[r];return e}function y(e){var t=e.parentNode;t&&t.removeChild(e)}function v(e,t,r){var i,o,a,s={};for(a in t)"key"==a?i=t[a]:"ref"==a?o=t[a]:s[a]=t[a];if(arguments.length>2&&(s.children=arguments.length>3?n.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===s[a]&&(s[a]=e.defaultProps[a]);return g(e,s,i,o,null)}function g(e,t,r,n,a){var s={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++o:a};return null==a&&null!=i.vnode&&i.vnode(s),s}function b(){return{current:null}}function _(e){return e.children}function S(e,t){this.props=e,this.context=t}function w(e,t){if(null==t)return e.__?w(e.__,e.__.__k.indexOf(e)+1):null;for(var r;tt&&a.sort(u));P.__r=0}function R(e,t,r,n,i,o,a,s,c,u,l){var d,m,y,v,b,S,O,j,P,R=0,E=n&&n.__k||h,N=E.length,T=N,I=t.length;for(r.__k=[],d=0;d0?g(v.type,v.props,v.key,v.ref?v.ref:null,v.__v):v)?(v.__=r,v.__b=r.__b+1,-1===(j=A(v,E,O=d+R,T))?y=f:(y=E[j]||f,E[j]=void 0,T--),k(e,v,y,i,o,a,s,c,u,l),b=v.__e,(m=v.ref)&&y.ref!=m&&(y.ref&&L(y.ref,null,v),l.push(m,v.__c||b,v)),null!=b&&(null==S&&(S=b),(P=y===f||null===y.__v)?-1==j&&R--:j!==O&&(j===O+1?R++:j>O?T>I-O?R+=j-O:R--:R=j(null!=c?1:0))for(;a>=0||s=0){if((c=t[a])&&i==c.key&&o===c.type)return a;a--}if(s2&&(c.children=arguments.length>3?n.call(arguments,2):r),g(e.type,c,i||e.key,o||e.ref,null)}function q(e,t){var r={__c:t="__cC"+l++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,n;return this.getChildContext||(r=[],(n={})[t]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&r.some((function(e){e.__e=!0,j(e)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return r.Provider.__=r.Consumer.contextType=r}n=h.slice,i={__e:function(e,t,r,n){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,n||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},o=0,S.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=m({},this.state),"function"==typeof e&&(e=e(m({},r),this.props)),e&&m(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),j(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),j(this))},S.prototype.render=_,a=[],c="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,u=function(e,t){return e.__v.__b-t.__v.__b},P.__r=0,l=0},774:e=>{e.exports=function(e,t,r,n){var i=r?r.call(n,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c{"use strict";var n=r(748);var i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,a=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=o({inst:{value:r,getSnapshot:t}}),i=n[0].inst,l=n[1];return s((function(){i.value=r,i.getSnapshot=t,u(i)&&l({inst:i})}),[e,r,t]),a((function(){return u(i)&&l({inst:i}),e((function(){u(i)&&l({inst:i})}))}),[e]),c(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:l},688:(e,t,r)=>{"use strict";e.exports=r(250)}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nc=void 0;var n={};return(()=>{"use strict";r.r(n);var e=r(290),t=r.n(e),i=r(400),o=r(748);function a(){return a=Object.assign||function(e){for(var t=1;te instanceof ShadowRoot,c=e=>{const t=e.getRootNode()instanceof ShadowRoot?e.getRootNode().host:e,{dataset:r}=t,n={};for(var i in r){if(!1===r.hasOwnProperty(i))return;const e=`${(o=i.split(/(props?)/).pop()||"").charAt(0).toLowerCase()}${o.slice(1)}`;e&&(n[e]=r[i])}var o;return n},u=e=>["text/props","application/json"].includes(e.getAttribute("type")||""),l=e=>s(e)?[]:Array.from(e.getElementsByTagName("script")).filter(u),f=e=>Array.from(document.querySelectorAll(e)).filter(u),h=e=>{let t={};return e.forEach((e=>{try{t=a({},t,JSON.parse(e.innerHTML))}catch(e){}})),t},d=(e,t,r={},n)=>{const i=c(t),o=e._executedScript?c(e._executedScript):{},s=h(l(t));return a({},r,i,o,n?h(f(n)):{},s)};function p(e,t){var r=(t=[].concat(t))[t.length-1].nextSibling;function n(t,n){e.insertBefore(t,n||r)}return e.__k={nodeType:1,parentNode:e,firstChild:t[0],childNodes:t,insertBefore:n,appendChild:n,removeChild:function(t){e.removeChild(t)}}}const m=({island:e,widget:t,rootFragment:r,props:n})=>{e.props=n,(0,i.sY)((0,i.h)(t,n),r)};function y(){for(var e=arguments.length,t=new Array(e),r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:20,r=[],n=0;n":">",'"':""","'":"'"},E=/[&<>"']/g,F=RegExp(E.source);var A={"&":"&","<":"<",">":">",""":'"',"'":"'"},N=/&(amp|quot|lt|gt|#39);/g,T=RegExp(N.source);function I(e){return e&&T.test(e)?e.replace(N,(function(e){return A[e]})):e}function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}function k(e){if(!function(e){return"object"===C(e)&&null!==e}(e)||"[object Object]"!==function(e){return null===e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}(e))return!1;if(null===Object.getPrototypeOf(e))return!0;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}function H(){return H=Object.assign?Object.assign.bind():function(e){for(var t=1;t",highlightPostTag:""};function Q(e){return function(e){return e&&F.test(e)?e.replace(E,(function(e){return x[e]})):e}(e).replace(new RegExp(M.highlightPreTag,"g"),W.highlightPreTag).replace(new RegExp(M.highlightPostTag,"g"),W.highlightPostTag)}function q(e){return k(e)&&"string"!=typeof e.value?Object.keys(e).reduce((function(t,r){return U(U({},t),{},$({},r,q(e[r])))}),{}):Array.isArray(e)?e.map(q):U(U({},e),{},{value:Q(e.value)})}function V(e){return void 0===e.__escaped&&((e=e.map((function(e){var t=H({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return t._highlightResult&&(t._highlightResult=q(t._highlightResult)),t._snippetResult&&(t._snippetResult=q(t._snippetResult)),t}))).__escaped=!0),e}function B(e){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B(e)}function Y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function z(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:v;return g(e,ie()),function(r){var n,i,o=r||{},a=o.escapeHTML,s=void 0===a||a,c=o.transformItems,u=void 0===c?function(e){return e}:c;return{$$type:"ais.hits",init:function(t){e(re(re({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){var r=this.getWidgetRenderState(t);e(re(re({},r),{},{instantSearchInstance:t.instantSearchInstance}),!1),r.sendEvent("view:internal",r.hits)},getRenderState:function(e,t){return re(re({},e),{},{hits:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,o=e.helper,a=e.instantSearchInstance;if(n||(n=function(e){var t=e.instantSearchInstance,r=e.index,n=e.widgetType,i={},o=void 0;return function(){for(var e=arguments.length,a=new Array(e),s=0;s0&&(t.hits=V(t.hits));var c,l,f,h=function(e,t){return t?e.map((function(e){return Z(Z({},e),{},{__queryID:t})})):e}((c=t.hits,l=t.page,f=t.hitsPerPage,c.map((function(e,t){return z(z({},e),{},{__position:f*l+t+1})}))),t.queryID);return{hits:u(h,{results:t}),results:t,sendEvent:n,bindEvent:i,widgetParams:r}},dispose:function(e){var r=e.state;return t(),s?r.setQueryParameters(Object.keys(M).reduce((function(e,t){return re(re({},e),{},ne({},t,void 0))}),{})):r},getWidgetSearchParameters:function(e){return s?e.setQueryParameters(M):e}}}};function ae(e){return ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ae(e)}var se=Object.prototype.hasOwnProperty;function ce(e,t,r){if(null!=r&&r(e,t))return!0;var n,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((i=e.length)===t.length)for(;i--&&ce(e[i],t[i],r););return-1===i}if(!n||"object"===ae(e)){for(n in i=0,e){if(se.call(e,n)&&++i&&!se.call(t,n))return!1;if(!(n in t)||!ce(e[n],t[n],r))return!1}return Object.keys(t).length===i}}return e!=e&&t!=t}var ue=r(131);function le(e){var t,r,n;return new ue.SearchResults(e,[{query:null!==(t=e.query)&&void 0!==t?t:"",page:null!==(r=e.page)&&void 0!==r?r:0,hitsPerPage:null!==(n=e.hitsPerPage)&&void 0!==n?n:20,hits:[],nbHits:0,nbPages:0,params:"",exhaustiveNbHits:!0,exhaustiveFacetsCount:!0,processingTimeMS:0,index:e.index}],{__isArtificial:!0})}function fe(e){return fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fe(e)}function he(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function de(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Ue(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=we(),i=_e(),a=ge(),s=Pe(t),c=Pe(r),u=(0,o.useRef)(!0),l=(0,o.useRef)(null),f=(0,o.useRef)(i.status),h=(0,o.useMemo)((function(){var t=e((function(e,t){if(t)u.current=!0;else if(u.current){var r=e.instantSearchInstance,n=(e.widgetParams,Le(e,Ne));ce(n,l.current,(function(e,t){return(null==e?void 0:e.constructor)===Function&&(null==t?void 0:t.constructor)===Function}))&&r.status===f.current||(m(n),l.current=n,f.current=r.status)}}),(function(){u.current=!1}));return De(De({},t(s)),c)}),[e,s,c]),d=Ie((0,o.useState)((function(){if(h.getWidgetRenderState){var e,t=a.getHelper(),r=a.getWidgetUiState({})[a.getIndexId()];t.state=(null===(e=h.getWidgetSearchParameters)||void 0===e?void 0:e.call(h,t.state,{uiState:r}))||t.state;var n=me(a),o=n.results,s=n.scopedResults,c=h.getWidgetRenderState({helper:t,parent:a,instantSearchInstance:i,results:o,scopedResults:s,state:t.state,renderState:i.renderState,templatesConfig:i.templatesConfig,createURL:a.createURL,searchMetadata:{isSearchStalled:"stalled"===i.status},status:i.status,error:i.error});c.widgetParams;return Le(c,Te)}return{}})),2),p=d[0],m=d[1];return function(e){var t,r=e.widget,n=e.parentIndex,i=e.props,a=e.shouldSsr,s=Fe(),c=(0,o.useRef)(i);(0,o.useEffect)((function(){c.current=i}),[i]);var u=(0,o.useRef)(r);(0,o.useEffect)((function(){u.current=r}),[r]);var l,f=(0,o.useRef)(null),h=a&&!n.getWidgets().includes(r),d=_e();xe((function(){var e=u.current;return f.current?(clearTimeout(f.current),ce(i,c.current)||(n.removeWidgets([e]),n.addWidgets([r]))):h||n.addWidgets([r]),function(){f.current=setTimeout((function(){d._schedule((function(){d._preventWidgetCleanup||n.removeWidgets([e])}))}))}}),[n,r,h,d,i]),(h||"pending"===(null==s||null===(t=s.current)||void 0===t?void 0:t.status))&&n.addWidgets([r]),"undefined"==typeof window&&null!=s&&s.current&&"ais.index"!==r.$$type&&(Re(s.current),"ais.dynamicWidgets"!==r.$$type&&null!==(l=d.helper)&&void 0!==l&&l.lastResults&&Re(s.current))}({widget:h,parentIndex:a,props:s,shouldSsr:Boolean(n)}),p}var $e=r(331);function Me(e){return Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me(e)}var We="_ALGOLIA";function Qe(){return function(e){if("object"===("undefined"==typeof document?"undefined":Me(document))&&"string"==typeof document.cookie)for(var t="".concat(e,"="),r=document.cookie.split(";"),n=0;n1&&void 0!==arguments[1]?arguments[1]:{fallback:function(){}}).fallback;return"undefined"==typeof window?t():e({window})}function Ve(e){return Ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ve(e)}function Be(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ye(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{},t=e.insightsClient,r=e.insightsInitParams,n=e.onEvent,i=e.$$internal,o=void 0!==i&&i,a=e.$$automatic,s=void 0!==a&&a,c=t;t||null===t||qe((function(e){var t=e.window,r=t.AlgoliaAnalyticsObject||"aa";"string"==typeof r&&(c=t[r]),c||(t.AlgoliaAnalyticsObject=r,t[r]||(t[r]=function(){t[r].queue||(t[r].queue=[]);for(var e=arguments.length,n=new Array(e),i=0;i1&&void 0!==arguments[1]&&arguments[1];if(e){var n=c.state.userToken;r?i():setTimeout(i,0)}function i(){c.overrideStateWithoutTriggeringChangeEvent(Ye(Ye({},c.state),{},{userToken:e})),n&&n!==e&&t.scheduleSearch()}},r=Qe();r&&e(r,!0),m?(e(m,!0),u("setUserToken",m)):p&&(e(p,!0),u("setUserToken",p)),u("onUserTokenChange",e,{immediate:!0});var i=u;rt(u)&&(i=function(e,t){return u(e,t,{headers:{"X-Algolia-Application-Id":h,"X-Algolia-API-Key":d}})}),t.sendEventToInsights=function(e){n?n(e,i):e.insightsMethod&&(e.payload.algoliaSource=["instantsearch"],s&&e.payload.algoliaSource.push("instantsearch-automatic"),"internal"===e.eventModifier&&e.payload.algoliaSource.push("instantsearch-internal"),i(e.insightsMethod,e.payload))}},unsubscribe:function(){u("onUserTokenChange",void 0),t.sendEventToInsights=v,c&&a&&(c.overrideStateWithoutTriggeringChangeEvent(Ye(Ye({},c.state),a)),t.scheduleSearch())}}}}function rt(e){var t=Ge((e.version||"").split(".").map(Number),2),r=t[0],n=t[1];return r>=3||2===r&&n>=6||1===r&&n>=10}function nt(e,t,r){var n=t.getHelper();return{uiState:r,helper:n,parent:t,instantSearchInstance:e,state:n.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,scopedResults:[],searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}function it(e,t){var r=t.getResults(),n=t.getHelper();return{helper:n,parent:t,instantSearchInstance:e,results:r,scopedResults:t.getScopedResults(),state:r?r._state:n.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}function ot(e,t,r){var n=nt(t,t.mainIndex,t._initialUiState);e.forEach((function(e){var i={};if(e.getWidgetRenderState){var o=e.getWidgetRenderState(n);o&&o.widgetParams&&(i=o.widgetParams)}var a=Object.keys(i).filter((function(e){return void 0!==i[e]}));r.widgets.push({type:e.$$type,widgetType:e.$$widgetType,params:a}),"ais.index"===e.$$type&&ot(e.getWidgets(),t,r)}))}function at(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).$$internal,t=void 0!==e&&e;return function(e){var r=e.instantSearchInstance,n={widgets:[]},i=document.createElement("meta"),o=document.querySelector("head");return i.name="instantsearch:widgets",{$$type:"ais.metadata",$$internal:t,onStateChange:function(){},subscribe:function(){setTimeout((function(){var e=r.client;n.ua=e.transporter&&e.transporter.userAgent?e.transporter.userAgent.value:e._ua,ot(r.mainIndex.getWidgets(),r,n),r.middleware.forEach((function(e){return n.widgets.push({middleware:!0,type:e.instance.$$type,internal:e.instance.$$internal})})),i.content=JSON.stringify(n),o.appendChild(i)}),0)},started:function(){},unsubscribe:function(){i.remove()}}}}var st=r(368);function ct(e){return ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ct(e)}function ut(e,t){for(var r=0;r=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function _t(e){e.configure;return bt(e,mt)}function St(e){return e!==Object(e)}function wt(e,t){if(e===t)return!0;if(St(e)||St(t)||"function"==typeof e||"function"==typeof t)return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var r=0,n=Object.keys(e);r0&&void 0!==arguments[0]?arguments[0]:{},t=e.router,r=void 0===t?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.createURL,r=void 0===t?function(e){var t=e.qsModule,r=e.routeState,n=e.location,i=n.protocol,o=n.hostname,a=n.port,s=void 0===a?"":a,c=n.pathname,u=n.hash,l=t.stringify(r),f=""===s?"":":".concat(s);return l?"".concat(i,"//").concat(o).concat(f).concat(c,"?").concat(l).concat(u):"".concat(i,"//").concat(o).concat(f).concat(c).concat(u)}:t,n=e.parseURL,i=void 0===n?function(e){var t=e.qsModule,r=e.location;return t.parse(r.search.slice(1),{arrayLimit:99})}:n,o=e.writeDelay,a=void 0===o?400:o,s=e.windowTitle,c=e.getLocation,u=void 0===c?function(){return qe((function(e){return e.window.location}),{fallback:function(){throw new Error("You need to provide `getLocation` to the `history` router in environments where `window` does not exist.")}})}:c,l=e.start,f=e.dispose,h=e.push;return new dt({createURL:r,parseURL:i,writeDelay:a,windowTitle:s,getLocation:u,start:l,dispose:f,push:h})}():t,n=e.stateMapping,i=void 0===n?{$$type:"ais.simple",stateToRoute:function(e){return Object.keys(e).reduce((function(t,r){return vt(vt({},t),{},gt({},r,_t(e[r])))}),{})},routeToState:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,r){return vt(vt({},t),{},gt({},r,_t(e[r])))}),{})}}:n,o=e.$$internal,a=void 0!==o&&o;return function(e){var t=e.instantSearchInstance;t._createURL=function(e){var n=0===t.mainIndex.getWidgets().length?t._initialUiState:t.mainIndex.getWidgetUiState({}),o=Object.keys(e).reduce((function(t,r){return Pt(Pt({},t),{},Rt({},r,e[r]))}),n),a=i.stateToRoute(o);return r.createURL(a)};var n=void 0,o=t._initialUiState;return{$$type:"ais.router({router:".concat(r.$$type||"__unknown__",", stateMapping:").concat(i.$$type||"__unknown__","})"),$$internal:a,onStateChange:function(e){var t=e.uiState,o=i.stateToRoute(t);void 0!==n&&wt(n,o)||(r.write(o),n=o)},subscribe:function(){t._initialUiState=Pt(Pt({},o),i.routeToState(r.read())),r.onUpdate((function(e){t.mainIndex.getWidgets().length>0&&t.setUiState(i.routeToState(e))}))},started:function(){var e;null===(e=r.start)||void 0===e||e.call(r)},unsubscribe:function(){r.dispose()}}}};function Et(e){return"ais.index"===e.$$type}function Ft(e){return Ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ft(e)}var At=["facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements","ruleContexts"];function Nt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Tt(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var kt=function(e,t){return e.setQueryParameters({hierarchicalFacets:t.hierarchicalFacets.reduce((function(e,t){var r=function(e,t){if(!Array.isArray(e))return-1;for(var r=0;r0?e.setQueryParameters({ruleContexts:r}):e}(c,t),l=function(e,t){return t.facets.reduce((function(e,t){return e.addFacet(t)}),e)}(u,t);return function(e,t){t.facets,t.disjunctiveFacets,t.facetsRefinements,t.facetsExcludes,t.disjunctiveFacetsRefinements,t.numericRefinements,t.tagRefinements,t.hierarchicalFacets,t.hierarchicalFacetsRefinements,t.ruleContexts;var r=Ct(t,At);return e.setQueryParameters(r)}(l,t)}))};function Ht(e){return Ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ht(e)}var Lt=["initialSearchParameters"];function Ut(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function $t(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var Vt=y({name:"index-widget"});function Bt(e,t){var r=t.state,n=t.isPageReset,i=t._uiState;r!==e.state&&(e.state=r,e.emit("change",{state:e.state,results:e.lastResults,isPageReset:n,_uiState:i}))}function Yt(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.reduce((function(e,r){return Et(r)?e:r.getWidgetUiState||r.getWidgetState?r.getWidgetUiState?r.getWidgetUiState(e,t):r.getWidgetState(e,t):e}),r)}function zt(e,t){var r=t.initialSearchParameters,n=qt(t,Lt);return e.filter((function(e){return!Et(e)})).reduce((function(e,t){return t.getWidgetSearchParameters?t.getWidgetSearchParameters(e,n):e}),r)}function Gt(e){var t=e.filter(Et);0!==t.length&&t.forEach((function(e){var t=e.getHelper();Bt(t,{state:t.state.resetPage(),isPageReset:!0}),Gt(e.getWidgets())}))}function Jt(e){return e.filter(Et).reduce((function(e,t){return e.concat.apply(e,[{indexId:t.getIndexId(),results:t.getResults(),helper:t.getHelper()}].concat(Wt(Jt(t.getWidgets()))))}),[])}const Kt=function(e){if(void 0===e||void 0===e.indexName)throw new Error(Vt("The `indexName` option is required."));var t=e.indexName,r=e.indexId,n=void 0===r?t:r,i=[],o={},a=null,s=null,c=null,u=null,l=null;return{$$type:"ais.index",$$widgetType:"ais.index",getIndexName:function(){return t},getIndexId:function(){return n},getHelper:function(){return c},getResults:function(){var e;return null!==(e=u)&&void 0!==e&&e.lastResults?(u.lastResults._state=c.state,u.lastResults):null},getPreviousState:function(){return l},getScopedResults:function(){var e=this.getParent();return Jt(e?e.getWidgets():[this])},getParent:function(){return s},createURL:function(e){return"function"==typeof e?a._createURL(Mt({},n,e(o))):a._createURL(Mt({},n,Yt(i,{searchParameters:e,helper:c})))},getWidgets:function(){return i},addWidgets:function(e){var t=this;if(!Array.isArray(e))throw new Error(Vt("The `addWidgets` method expects an array of widgets."));if(e.some((function(e){return"function"!=typeof e.init&&"function"!=typeof e.render})))throw new Error(Vt("The widget definition expects a `render` and/or an `init` method."));return i=i.concat(e),a&&Boolean(e.length)&&(Bt(c,{state:zt(i,{uiState:o,initialSearchParameters:c.state}),_uiState:o}),e.forEach((function(e){e.getRenderState&&Zt({renderState:e.getRenderState(a.renderState[t.getIndexId()]||{},nt(a,t,a._initialUiState)),instantSearchInstance:a,parent:t})})),e.forEach((function(e){e.init&&e.init(nt(a,t,a._initialUiState))})),a.scheduleSearch()),this},removeWidgets:function(e){var t=this;if(!Array.isArray(e))throw new Error(Vt("The `removeWidgets` method expects an array of widgets."));if(e.some((function(e){return"function"!=typeof e.dispose})))throw new Error(Vt("The widget definition expects a `dispose` method."));if(i=i.filter((function(t){return-1===e.indexOf(t)})),a&&Boolean(e.length)){var r=e.reduce((function(e,r){return r.dispose({helper:c,state:e,parent:t})||e}),c.state),n=a.future.preserveSharedStateOnUnmount?zt(i,{uiState:o,initialSearchParameters:new ue.SearchParameters({index:this.getIndexName()})}):zt(i,{uiState:Yt(i,{searchParameters:r,helper:c}),initialSearchParameters:r});o=Yt(i,{searchParameters:n,helper:c}),c.setState(n),i.length&&a.scheduleSearch()}return this},init:function(e){var r,f=this,h=e.instantSearchInstance,d=e.parent,p=e.uiState;if(null===c){a=h,s=d,o=p[n]||{};var m=h.mainHelper,y=zt(i,{uiState:o,initialSearchParameters:new ue.SearchParameters({index:t})});(c=ue({},y.index,y)).search=function(){return h.onStateChange?(h.onStateChange({uiState:h.mainIndex.getWidgetUiState({}),setUiState:function(e){return h.setUiState(e,!1)}}),m):m.search()},c.searchWithoutTriggeringOnStateChange=function(){return m.search()},c.searchForFacetValues=function(e,t,r,n){var i=c.state.setQueryParameters(n);return m.searchForFacetValues(e,t,r,i)},u=m.derive((function(){return Dt.apply(void 0,[m.state].concat(Wt(function(e){for(var t=e.getParent(),r=[e.getHelper().state];null!==t;)r=[t.getHelper().state].concat(r),t=t.getParent();return r}(f))))}));var v=null===(r=h._initialResults)||void 0===r?void 0:r[this.getIndexId()];if(v){var g=new ue.SearchResults(new ue.SearchParameters(v.state),v.results);u.lastResults=g,c.lastResults=g}c.on("change",(function(e){e.isPageReset&&Gt(i)})),u.on("search",(function(){h.scheduleStalledRender()})),u.on("result",(function(e){var t=e.results;h.scheduleRender(),c.lastResults=t,l=null==t?void 0:t._state})),i.forEach((function(e){e.getRenderState&&Zt({renderState:e.getRenderState(h.renderState[f.getIndexId()]||{},nt(h,f,p)),instantSearchInstance:h,parent:f})})),i.forEach((function(e){e.init&&e.init(nt(h,f,p))})),c.on("change",(function(e){var t=e.state,r=e._uiState;o=Yt(i,{searchParameters:t,helper:c},r||{}),h.onStateChange||h.onInternalStateChange()})),v&&h.scheduleRender()}},render:function(e){var t=this,r=e.instantSearchInstance;"error"===r.status&&!r.mainHelper.hasPendingRequests()&&l&&c.setState(l);var n=this.getResults()?i:i.filter(Et);n.forEach((function(e){e.getRenderState&&Zt({renderState:e.getRenderState(r.renderState[t.getIndexId()]||{},it(r,t)),instantSearchInstance:r,parent:t})})),n.forEach((function(e){e.render&&e.render(it(r,t))}))},dispose:function(){var e,t,r=this;i.forEach((function(e){e.dispose&&e.dispose({helper:c,state:c.state,parent:r})})),a=null,s=null,null===(e=c)||void 0===e||e.removeAllListeners(),c=null,null===(t=u)||void 0===t||t.detach(),u=null},getWidgetUiState:function(e){return i.filter(Et).reduce((function(e,t){return t.getWidgetUiState(e)}),$t($t({},e),{},Mt({},n,$t($t({},e[n]),o))))},getWidgetState:function(e){return this.getWidgetUiState(e)},getWidgetSearchParameters:function(e,t){var r=t.uiState;return zt(i,{uiState:r,initialSearchParameters:e})},refreshUiState:function(){o=Yt(i,{searchParameters:this.getHelper().state,helper:this.getHelper()},o)},setIndexUiState:function(e){var t="function"==typeof e?e(o):e;a.setUiState((function(e){return $t($t({},e),{},Mt({},n,t))}))}}};function Zt(e){var t=e.renderState,r=e.instantSearchInstance,n=e.parent,i=n?n.getIndexId():r.mainIndex.getIndexId();r.renderState=$t($t({},r.renderState),{},Mt({},i,$t($t({},r.renderState[i]),t)))}var Xt=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.descendantName,n=t.modifierName,i=r?"-".concat(r):"",o=n?"--".concat(n):"";return"".concat("ais","-").concat(e).concat(i).concat(o)}};function er(e,t){return(Array.isArray(t)?t:t.split(".")).reduce((function(e,t){return e&&e[t]}),e)}var tr=Xt("Highlight");function rr(e){var t=W.highlightPreTag,r=W.highlightPostTag;return e.map((function(e){return e.isHighlighted?t+e.value+r:e.value})).join("")}var nr=new RegExp(/\w/i);function ir(e,t){var r,n,i=e[t],o=(null===(r=e[t+1])||void 0===r?void 0:r.isHighlighted)||!0,a=(null===(n=e[t-1])||void 0===n?void 0:n.isHighlighted)||!0;return nr.test(I(i.value))||a!==o?i.isHighlighted:a}function or(e){return or="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},or(e)}function ar(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function sr(e){for(var t=1;t')).replace(new RegExp(W.highlightPostTag,"g"),""))}(gr(gr({},JSON.parse(e)),{},{hit:this})))}catch(e){throw new Error('\nThe highlight helper expects a JSON object of the format:\n{ "attribute": "name", "highlightedTagName": "mark" }')}},reverseHighlight:function(e,t){try{return t(function(e){var t=e.attribute,r=e.highlightedTagName,n=void 0===r?"mark":r,i=e.hit,o=e.cssClasses,a=void 0===o?{}:o,s=(er(i._highlightResult,t)||{}).value,c=void 0===s?"":s,u=fr({descendantName:"highlighted"})+(a.highlighted?" ".concat(a.highlighted):"");return rr(ur(lr(c))).replace(new RegExp(W.highlightPreTag,"g"),"<".concat(n,' class="').concat(u,'">')).replace(new RegExp(W.highlightPostTag,"g"),""))}(gr(gr({},JSON.parse(e)),{},{hit:this})))}catch(e){throw new Error('\n The reverseHighlight helper expects a JSON object of the format:\n { "attribute": "name", "highlightedTagName": "mark" }')}},snippet:function(e,t){try{return t(function(e){var t=e.attribute,r=e.highlightedTagName,n=void 0===r?"mark":r,i=e.hit,o=e.cssClasses,a=void 0===o?{}:o,s=(er(i._snippetResult,t)||{}).value,c=void 0===s?"":s,u=hr({descendantName:"highlighted"})+(a.highlighted?" ".concat(a.highlighted):"");return c.replace(new RegExp(W.highlightPreTag,"g"),"<".concat(n,' class="').concat(u,'">')).replace(new RegExp(W.highlightPostTag,"g"),""))}(gr(gr({},JSON.parse(e)),{},{hit:this})))}catch(e){throw new Error('\nThe snippet helper expects a JSON object of the format:\n{ "attribute": "name", "highlightedTagName": "mark" }')}},reverseSnippet:function(e,t){try{return t(function(e){var t=e.attribute,r=e.highlightedTagName,n=void 0===r?"mark":r,i=e.hit,o=e.cssClasses,a=void 0===o?{}:o,s=(er(i._snippetResult,t)||{}).value,c=void 0===s?"":s,u=dr({descendantName:"highlighted"})+(a.highlighted?" ".concat(a.highlighted):"");return rr(ur(lr(c))).replace(new RegExp(W.highlightPreTag,"g"),"<".concat(n,' class="').concat(u,'">')).replace(new RegExp(W.highlightPostTag,"g"),""))}(gr(gr({},JSON.parse(e)),{},{hit:this})))}catch(e){throw new Error('\n The reverseSnippet helper expects a JSON object of the format:\n { "attribute": "name", "highlightedTagName": "mark" }')}},insights:function(e,t){try{var r=JSON.parse(e),n=r.method,i=r.payload;return t(mr(n,gr({objectIDs:[this.objectID]},i)))}catch(e){throw new Error('\nThe insights helper expects a JSON object of the format:\n{ "method": "method-name", "payload": { "eventName": "name of the event" } }')}}}}var Sr=Promise.resolve();function wr(e){var t=null,r=!1,n=function(){for(var n=arguments.length,i=new Array(n),o=0;o1?n-1:0),o=1;o1?t-1:0),n=1;n1?t-1:0),n=1;n0&&void 0!==arguments[0])||arguments[0];null!==(e=t.mainHelper)&&void 0!==e&&e.hasPendingRequests()||(clearTimeout(t._searchStalledTimer),t._searchStalledTimer=null,r&&(t.status="idle",t.error=void 0)),t.mainIndex.render({instantSearchInstance:kr(t)}),t.emit("render")}))),Hr(kr(t),"onInternalStateChange",wr((function(){var e=t.mainIndex.getWidgetUiState({});t.middleware.forEach((function(t){t.instance.onStateChange({uiState:e})}))}))),t.setMaxListeners(100);var r=e.indexName,n=void 0===r?"":r,a=e.numberLocale,s=e.initialUiState,c=void 0===s?{}:s,u=e.routing,l=void 0===u?null:u,f=e.insights,h=void 0===f?void 0:f,d=e.searchFunction,p=e.stalledSearchDelay,m=void 0===p?200:p,y=e.searchClient,g=void 0===y?null:y,b=e.insightsClient,_=void 0===b?null:b,S=e.onStateChange,w=void 0===S?null:S,O=e.future,j=void 0===O?Nr(Nr({},Mr),e.future||{}):O;if(null===g)throw new Error(Ur("The `searchClient` option is required."));if("function"!=typeof g.search)throw new Error("The `searchClient` must implement a `search` method.\n\nSee: https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/backend-instantsearch/js/");if("function"==typeof g.addAlgoliaAgent&&g.addAlgoliaAgent("instantsearch.js (".concat("4.60.0",")")),_&&"function"!=typeof _)throw new Error(Ur("The `insightsClient` option should be a function."));if(t.client=g,t.future=j,t.insightsClient=_,t.indexName=n,t.helper=null,t.mainHelper=null,t.mainIndex=Kt({indexName:n}),t.onStateChange=w,t.started=!1,t.templatesConfig={helpers:_r({numberLocale:a}),compileOptions:{}},t._stalledSearchDelay=m,t._searchStalledTimer=null,t._createURL=$r,t._initialUiState=c,t._initialResults=null,t._insights=h,d&&(t._searchFunction=d),t.sendEventToInsights=v,l){var P="boolean"==typeof l?{}:l;P.$$internal=!0,t.use(xt(P))}if(h){var R="boolean"==typeof h?{}:h;R.$$internal=!0,t.use(tt(R))}return qe((function(e){var t,r;return(null===(t=e.window.navigator)||void 0===t||null===(r=t.userAgent)||void 0===r?void 0:r.indexOf("Algolia Crawler"))>-1}),{fallback:function(){return!1}})&&t.use(at({$$internal:!0})),t}return t=o,r=[{key:"_isSearchStalled",get:function(){return"stalled"===this.status}},{key:"use",value:function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n0&&this.scheduleSearch();this.helper=this.mainIndex.getHelper(),this.started=!0,this.middleware.forEach((function(e){e.instance.started()})),void 0===this._insights&&t.derivedHelpers[0].once("result",(function(){e.mainIndex.getScopedResults().some((function(e){var t=e.results;return null==t?void 0:t._automaticInsights}))&&e.use(tt({$$internal:!0,$$automatic:!0}))}))}},{key:"dispose",value:function(){var e;this.scheduleSearch.cancel(),this.scheduleRender.cancel(),clearTimeout(this._searchStalledTimer),this.removeWidgets(this.mainIndex.getWidgets()),this.mainIndex.dispose(),this.started=!1,this.removeAllListeners(),null===(e=this.mainHelper)||void 0===e||e.removeAllListeners(),this.mainHelper=null,this.helper=null,this.middleware.forEach((function(e){e.instance.unsubscribe()}))}},{key:"scheduleStalledRender",value:function(){var e=this;this._searchStalledTimer||(this._searchStalledTimer=setTimeout((function(){e.status="stalled",e.scheduleRender()}),this._stalledSearchDelay))}},{key:"setUiState",value:function(e){var t=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!this.mainHelper)throw new Error(Ur("The `start` method needs to be called before `setUiState`."));this.mainIndex.refreshUiState();var n="function"==typeof e?e(this.mainIndex.getWidgetUiState({})):e;this.onStateChange&&r?this.onStateChange({uiState:n,setUiState:function(e){Er("function"==typeof e?e(n):e,t.mainIndex),t.scheduleSearch(),t.onInternalStateChange()}}):(Er(n,this.mainIndex),this.scheduleSearch(),this.onInternalStateChange())}},{key:"getUiState",value:function(){return this.started&&this.mainIndex.refreshUiState(),this.mainIndex.getWidgetUiState({})}},{key:"createURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.started)throw new Error(Ur("The `start` method needs to be called before `createURL`."));return this._createURL(e)}},{key:"refresh",value:function(){if(!this.mainHelper)throw new Error(Ur("The `start` method needs to be called before `refresh`."));this.mainHelper.clearCache().search()}}],r&&Tr(t.prototype,r),n&&Tr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}($e);const Qr=Wr;var qr=r(688);const Vr="7.3.0";function Br(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Yr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function sn(e){var t=e.children,r=rn(an(e,on));return r.started?o.default.createElement(be.Provider,{value:r},o.default.createElement(ve.Provider,{value:r.mainIndex},t)):null}function cn(e){return cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cn(e)}function un(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ln(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:v;return g(e,hn()),function(r){var n,i,o=(r||{}).queryHook,a=void 0===o?dn:o;return{$$type:"ais.searchBox",init:function(t){var r=t.instantSearchInstance;e(ln(ln({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!0)},render:function(t){var r=t.instantSearchInstance;e(ln(ln({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!1)},dispose:function(e){var r=e.state;return t(),r.setQueryParameter("query",void 0)},getRenderState:function(e,t){return ln(ln({},e),{},{searchBox:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.helper,o=e.searchMetadata,s=e.state;return n||(n=function(e){a(e,(function(e){return t.setQuery(e).search()}))},i=function(){t.setQuery("").search()}),{query:s.query||"",refine:n,clear:i,widgetParams:r,isSearchStalled:o.isSearchStalled}},getWidgetUiState:function(e,t){var r=t.searchParameters.query||"";return""===r||e&&e.query===r?e:ln(ln({},e),{},{query:r})},getWidgetSearchParameters:function(e,t){var r=t.uiState;return e.setQueryParameter("query",r.query||"")}}}};function mn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return yn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{}).catchError,t=_e(),r=function(){var e=_e(),t=ge(),r=t.getIndexId(),n=vn((0,o.useState)((function(){return e.getUiState()})),2),i=n[0],a=n[1],s=i[r],c=vn((0,o.useState)((function(){return e.renderState})),2),u=c[0],l=c[1],f=u[r]||{},h=(0,o.useCallback)((function(t){e.setUiState(t)}),[e]),d=(0,o.useCallback)((function(e){t.setIndexUiState(e)}),[t]);return(0,o.useEffect)((function(){function t(){a(e.getUiState()),l(e.renderState)}return e.addListener("render",t),function(){e.removeListener("render",t)}}),[e]),{uiState:i,setUiState:h,indexUiState:s,setIndexUiState:d,renderState:u,indexRenderState:f}}(),n=r.uiState,i=r.setUiState,a=r.indexUiState,s=r.setIndexUiState,c=r.renderState,u=r.indexRenderState,l=function(){var e=_e(),t=ge(),r=mn((0,o.useState)((function(){return me(t)})),2),n=r[0],i=r[1];return(0,o.useEffect)((function(){function r(){var e=t.getResults();null!==e&&i({results:e,scopedResults:t.getScopedResults()})}return e.addListener("render",r),function(){e.removeListener("render",r)}}),[e,t]),n}(),f=l.results,h=l.scopedResults,d=(0,o.useCallback)((function(){for(var e=arguments.length,r=new Array(e),n=0;n{let r="loading"===e?"Loading":null;return"loading"!=e&&t&&(r=`Showing results for "${t}"`),Sn("div",{className:"visually-hidden","aria-live":"polite",children:r})},On=e=>{const{query:t,refine:r}=function(e,t){return Ue(pn,e,t)}(e),{status:n}=bn(),[i,a]=(0,o.useState)(t),s=(0,o.useRef)(null),c=(0,o.useId)(),u="stalled"===n;return Sn("form",{action:"",role:"search",noValidate:!0,onSubmit:e=>{e.preventDefault(),e.stopPropagation(),s.current&&s.current.blur(),r(i)},onReset:e=>{e.preventDefault(),e.stopPropagation(),a(""),r(""),s.current&&s.current.focus()},style:{marginBottom:"20px"},children:[Sn("div",{children:[Sn("label",{htmlFor:c,children:["Keywords",Sn("span",{className:"visually-hidden",children:" Search"})]}),Sn("input",{id:c,ref:s,autoComplete:"on",autoCorrect:"on",autoCapitalize:"off",spellCheck:!1,maxLength:512,type:"search",value:i,onChange:e=>a(e.currentTarget.value),autoFocus:!0})]}),Sn("div",{style:{display:"flex",gap:"1rem",marginTop:"1rem"},children:[Sn("button",{type:"submit",children:"Submit"}),Sn("button",{type:"reset",hidden:0===i.length||u,children:"Reset"})]}),Sn(wn,{status:n,query:t})]})};var jn=function(){return jn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0?qn(ti,--Xn):0,Kn--,10===ei&&(Kn=1,Jn--),ei}function ai(){return ei=Xn2||li(ei)>3?"":" "}function mi(e,t){for(;--t&&ai()&&!(ei<48||ei>102||ei>57&&ei<65||ei>70&&ei<97););return ui(e,ci()+(t<6&&32==si()&&32==ai()))}function yi(e){for(;ai();)switch(ei){case e:return Xn;case 34:case 39:34!==e&&39!==e&&yi(ei);break;case 40:41===e&&yi(e);break;case 92:ai()}return Xn}function vi(e,t){for(;ai()&&e+ei!==57&&(e+ei!==84||47!==si()););return"/*"+ui(t,Xn-1)+"*"+Ln(47===e?e:ai())}function gi(e){for(;!li(si());)ai();return ui(e,Xn)}function bi(e,t){for(var r="",n=0;n6)switch(qn(e,t+1)){case 109:if(45!==qn(e,t+4))break;case 102:return Wn(e,/(.+:)(.+)-([^]+)/,"$1"+An+"$2-$3$1"+Fn+(108==qn(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Qn(e,"stretch")?Si(Wn(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return Wn(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(t,r,n,i,o,a,s){return En+r+":"+n+s+(i?En+r+"-span:"+(o?a:+a-+n)+s:"")+e}));case 4949:if(121===qn(e,t+6))return Wn(e,":",":"+An)+e;break;case 6444:switch(qn(e,45===qn(e,14)?18:11)){case 120:return Wn(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+An+(45===qn(e,14)?"inline-":"")+"box$3$1"+An+"$2$3$1"+En+"$2box$3")+e;case 100:return Wn(e,":",":"+En)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Wn(e,"scroll-","scroll-snap-")+e}return e}function wi(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case In:return void(e.return=Si(e.value,e.length,r));case kn:return bi([ni(e,{value:Wn(e.value,"@","@"+An)})],n);case Tn:if(e.length)return function(e,t){return e.map(t).join("")}(r=e.props,(function(t){switch(Mn(t,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":ii(ni(e,{props:[Wn(t,/:(read-\w+)/,":"+Fn+"$1")]})),ii(ni(e,{props:[t]})),Un(e,{props:Gn(r,n)});break;case"::placeholder":ii(ni(e,{props:[Wn(t,/:(plac\w+)/,":"+An+"input-$1")]})),ii(ni(e,{props:[Wn(t,/:(plac\w+)/,":"+Fn+"$1")]})),ii(ni(e,{props:[Wn(t,/:(plac\w+)/,En+"input-$1")]})),ii(ni(e,{props:[t]})),Un(e,{props:Gn(r,n)})}return""}))}}function Oi(e){return hi(ji("",null,null,null,[""],e=fi(e),0,[0],e))}function ji(e,t,r,n,i,o,a,s,c){for(var u=0,l=0,f=a,h=0,d=0,p=0,m=1,y=1,v=1,g=0,b="",_=i,S=o,w=n,O=b;y;)switch(p=g,g=ai()){case 40:if(108!=p&&58==qn(O,f-1)){-1!=Qn(O+=Wn(di(g),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:O+=di(g);break;case 9:case 10:case 13:case 32:O+=pi(p);break;case 92:O+=mi(ci()-1,7);continue;case 47:switch(si()){case 42:case 47:zn(Ri(vi(ai(),ci()),t,r,c),c);break;default:O+="/"}break;case 123*m:s[u++]=Bn(O)*v;case 125*m:case 59:case 0:switch(g){case 0:case 125:y=0;case 59+l:-1==v&&(O=Wn(O,/\f/g,"")),d>0&&Bn(O)-f&&zn(d>32?xi(O+";",n,r,f-1,c):xi(Wn(O," ","")+";",n,r,f-2,c),c);break;case 59:O+=";";default:if(zn(w=Pi(O,t,r,u,l,i,s,b,_=[],S=[],f,o),o),123===g)if(0===l)ji(O,t,w,w,_,o,f,s,S);else switch(99===h&&110===qn(O,3)?100:h){case 100:case 108:case 109:case 115:ji(e,w,w,n&&zn(Pi(e,w,w,0,0,i,s,b,i,_=[],f,S),S),i,S,f,s,n?_:S);break;default:ji(O,w,w,w,[""],S,0,s,S)}}u=l=d=0,m=v=1,b=O="",f=a;break;case 58:f=1+Bn(O),d=p;default:if(m<1)if(123==g)--m;else if(125==g&&0==m++&&125==oi())continue;switch(O+=Ln(g),g*m){case 38:v=l>0?1:(O+="\f",-1);break;case 44:s[u++]=(Bn(O)-1)*v,v=1;break;case 64:45===si()&&(O+=di(ai())),h=si(),l=f=Bn(b=O+=gi(ci())),g++;break;case 45:45===p&&2==Bn(O)&&(m=0)}}return o}function Pi(e,t,r,n,i,o,a,s,c,u,l,f){for(var h=i-1,d=0===i?o:[""],p=Yn(d),m=0,y=0,v=0;m0?d[g]+" "+b:Wn(b,/&\f/g,d[g])))&&(c[v++]=_);return ri(e,t,r,0===i?Tn:s,c,u,l,f)}function Ri(e,t,r,n){return ri(e,t,r,Nn,Ln(ei),Vn(e,2,-2),0,n)}function xi(e,t,r,n,i){return ri(e,t,r,In,Vn(e,0,n),Vn(e,n+1,-1),n,i)}var Ei={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Fi="undefined"!=typeof process&&("MISSING_ENV_VAR".REACT_APP_SC_ATTR||"MISSING_ENV_VAR".SC_ATTR)||"data-styled",Ai="undefined"!=typeof window&&"HTMLElement"in window,Ni=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!=="MISSING_ENV_VAR".REACT_APP_SC_DISABLE_SPEEDY&&""!=="MISSING_ENV_VAR".REACT_APP_SC_DISABLE_SPEEDY?"false"!=="MISSING_ENV_VAR".REACT_APP_SC_DISABLE_SPEEDY&&"MISSING_ENV_VAR".REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!=="MISSING_ENV_VAR".SC_DISABLE_SPEEDY&&""!=="MISSING_ENV_VAR".SC_DISABLE_SPEEDY&&("false"!=="MISSING_ENV_VAR".SC_DISABLE_SPEEDY&&"MISSING_ENV_VAR".SC_DISABLE_SPEEDY)),Ti=(new Set,Object.freeze([])),Ii=Object.freeze({});function Ci(e,t,r){return void 0===r&&(r=Ii),e.theme!==r.theme&&e.theme||t||r.theme}var ki=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),Di=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Hi=/(^-|-$)/g;function Li(e){return e.replace(Di,"-").replace(Hi,"")}var Ui=/(a)(d)/gi,$i=function(e){return String.fromCharCode(e+(e>25?39:97))};function Mi(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=$i(t%52)+r;return($i(t%52)+r).replace(Ui,"$1-$2")}var Wi,Qi=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},qi=function(e){return Qi(5381,e)};function Vi(e){return Mi(qi(e)>>>0)}function Bi(e){return e.displayName||e.name||"Component"}function Yi(e){return"string"==typeof e&&!0}var zi="function"==typeof Symbol&&Symbol.for,Gi=zi?Symbol.for("react.memo"):60115,Ji=zi?Symbol.for("react.forward_ref"):60112,Ki={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Zi={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Xi={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},eo=((Wi={})[Ji]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Wi[Gi]=Xi,Wi);function to(e){return("type"in(t=e)&&t.type.$$typeof)===Gi?Xi:"$$typeof"in e?eo[e.$$typeof]:Ki;var t}var ro=Object.defineProperty,no=Object.getOwnPropertyNames,io=Object.getOwnPropertySymbols,oo=Object.getOwnPropertyDescriptor,ao=Object.getPrototypeOf,so=Object.prototype;function co(e,t,r){if("string"!=typeof t){if(so){var n=ao(t);n&&n!==so&&co(e,n,r)}var i=no(t);io&&(i=i.concat(io(t)));for(var o=to(e),a=to(t),s=0;s0?" Args: ".concat(t.join(", ")):""))}var go=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,r=0;r=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,i=n;e>=i;)if((i<<=1)<0)throw vo(16,"".concat(e));this.groupSizes=new Uint32Array(i),this.groupSizes.set(r),this.length=i;for(var o=n;o=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),i=n+r,o=n;o=0){var r=document.createTextNode(t);return this.element.insertBefore(r,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e0&&(c+="".concat(e,","))})),n+="".concat(a).concat(s,'{content:"').concat(c,'"}').concat("/*!sc*/\n")},o=0;o0?".".concat(t):e},l=c.slice();l.push((function(e){e.type===Tn&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(Do,r).replace(n,u))})),a.prefix&&l.push(wi),l.push(_i);var f=function(e,i,o,s){void 0===i&&(i=""),void 0===o&&(o=""),void 0===s&&(s="&"),t=s,r=i,n=new RegExp("\\".concat(r,"\\b"),"g");var c=e.replace(Ho,""),u=Oi(o||i?"".concat(o," ").concat(i," { ").concat(c," }"):c);a.namespace&&(u=Lo(u,a.namespace));var f,h,d,p=[];return bi(u,(f=l.concat((d=function(e){return p.push(e)},function(e){e.root||(e=e.return)&&d(e)})),h=Yn(f),function(e,t,r,n){for(var i="",o=0;o="A"&&e<="Z"};function zo(e){for(var t="",r=0;r>>0);if(!t.hasNameForId(this.componentId,o)){var a=r(i,".".concat(o),void 0,this.componentId);t.insertRules(this.componentId,o,a)}n=fo(n,o),this.staticRulesId=o}else{for(var s=Qi(this.baseHash,r.hash),c="",u=0;u>>0);t.hasNameForId(this.componentId,h)||t.insertRules(this.componentId,h,r(c,".".concat(h),void 0,this.componentId)),n=fo(n,h)}}return n},e}(),ta=o.default.createContext(void 0);ta.Consumer;var ra={};new Set;function na(e,t,r){var n=lo(e),i=e,a=!Yi(e),s=t.attrs,c=void 0===s?Ti:s,u=t.componentId,l=void 0===u?function(e,t){var r="string"!=typeof e?"sc":Li(e);ra[r]=(ra[r]||0)+1;var n="".concat(r,"-").concat(Vi("6.1.1"+r+ra[r]));return t?"".concat(t,"-").concat(n):n}(t.displayName,t.parentComponentId):u,f=t.displayName,h=void 0===f?function(e){return Yi(e)?"styled.".concat(e):"Styled(".concat(Bi(e),")")}(e):f,d=t.displayName&&t.componentId?"".concat(Li(t.displayName),"-").concat(t.componentId):t.componentId||l,p=n&&i.attrs?i.attrs.concat(c).filter(Boolean):c,m=t.shouldForwardProp;if(n&&i.shouldForwardProp){var y=i.shouldForwardProp;if(t.shouldForwardProp){var v=t.shouldForwardProp;m=function(e,t){return y(e,t)&&v(e,t)}}else m=y}var g=new ea(r,d,n?i.componentStyle:void 0);function b(e,t){return function(e,t,r){var n=e.attrs,i=e.componentStyle,a=e.defaultProps,s=e.foldedComponentIds,c=e.styledComponentId,u=e.target,l=o.default.useContext(ta),f=qo(),h=e.shouldForwardProp||f.shouldForwardProp,d=function(e,t,r){for(var n,i=jn(jn({},t),{className:void 0,theme:r}),o=0;o2&&ko.registerId(this.componentId+e),this.removeStyles(e,r),this.createStyles(e,t,r,n)}}();(function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString(),r=Eo(),n=ho([r&&'nonce="'.concat(r,'"'),"".concat(Fi,'="true"'),"".concat("data-styled-version",'="').concat("6.1.1",'"')].filter(Boolean)," ");return"")},this.getStyleTags=function(){if(e.sealed)throw vo(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw vo(2);var r=((t={})[Fi]="",t["data-styled-version"]="6.1.1",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),n=Eo();return n&&(r.nonce=n),[o.default.createElement("style",jn({},r,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new ko({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw vo(2);return o.default.createElement(Vo,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw vo(3)}})(),"__sc-".concat(Fi,"__");function la(){for(var e=arguments.length,t=new Array(e),r=0;r=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function pa(e){var t=e.classNames,r=e.children,n=e.highlightedTagName,i=e.isHighlighted,a=e.nonHighlightedTagName,s=i?n:a;return o.default.createElement(s,{className:i?t.highlighted:t.nonHighlighted},r)}function ma(e){var t=e.parts,r=e.highlightedTagName,n=void 0===r?"mark":r,i=e.nonHighlightedTagName,a=void 0===i?"span":i,s=e.separator,c=void 0===s?", ":s,u=e.className,l=e.classNames,f=da(e,fa);return o.default.createElement("span",ha({},f,{className:la(l.root,u)}),t.map((function(e,r){var i=r===t.length-1;return o.default.createElement(o.Fragment,{key:r},e.map((function(e,t){return o.default.createElement(pa,{key:t,classNames:l,highlightedTagName:n,nonHighlightedTagName:a,isHighlighted:e.isHighlighted},e.value)})),!i&&o.default.createElement("span",{className:l.separator},c))})))}var ya=["classNames"];function va(){return va=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ba(e){var t=e.classNames,r=void 0===t?{}:t,n=ga(e,ya);return o.default.createElement(ma,va({classNames:{root:la("ais-Highlight",r.root),highlighted:la("ais-Highlight-highlighted",r.highlighted),nonHighlighted:la("ais-Highlight-nonHighlighted",r.nonHighlighted),separator:la("ais-Highlight-separator",r.separator)}},n))}var _a=["hit","attribute","highlightedTagName","nonHighlightedTagName","separator"];function Sa(){return Sa=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Oa(e){var t=e.hit,r=e.attribute,n=e.highlightedTagName,i=e.nonHighlightedTagName,a=e.separator,s=wa(e,_a),c=er(t._highlightResult,r)||[],u=(Array.isArray(c)?c:[c]).map((function(e){return lr(I(e.value||""))}));return o.default.createElement(ba,Sa({},s,{parts:u,highlightedTagName:n,nonHighlightedTagName:i,separator:a}))}var ja=["classNames"];function Pa(){return Pa=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function xa(e){var t=e.classNames,r=void 0===t?{}:t,n=Ra(e,ja);return o.default.createElement(ma,Pa({classNames:{root:la("ais-Snippet",r.root),highlighted:la("ais-Snippet-highlighted",r.highlighted),nonHighlighted:la("ais-Snippet-nonHighlighted",r.nonHighlighted),separator:la("ais-Snippet-separator",r.separator)}},n))}var Ea=["hit","attribute","highlightedTagName","nonHighlightedTagName","separator"];function Fa(){return Fa=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Na(e){var t=e.hit,r=e.attribute,n=e.highlightedTagName,i=e.nonHighlightedTagName,a=e.separator,s=Aa(e,Ea),c=er(t._snippetResult,r)||[],u=(Array.isArray(c)?c:[c]).map((function(e){return lr(I(e.value||""))}));return o.default.createElement(xa,Fa({},s,{parts:u,highlightedTagName:n,nonHighlightedTagName:i,separator:a}))}const Ta=ua.article` display: flex; flex-direction: column; justify-content: space-between; @@ -16,11 +16,11 @@ max-height: 300px; object-fit: cover; } -`,Wa=ba.div` +`,Ia=ua.div` display: flex; flex-direction: column; justify-content: space-between; -`,Qa=({hit:e})=>{const t=new URL(e.url);return An(Ua,{children:[An(Wa,{children:[An("div",{children:[An("h2",{children:An("a",{href:e.url.replace(t.origin,""),children:e.title})}),An("p",{children:[e.summary&&An(Ta,{hit:e,attribute:"summary"}),!e.summary&&e.html&&An(i.HY,{children:["...",An(Ma,{hit:e,attribute:"html"}),"..."]})]})]}),e.updated&&An("div",{children:["Last Updated: ",new Date(1e3*e.updated).toLocaleDateString("en-us",{month:"long",day:"numeric",year:"numeric"})]})]}),e.photo&&An("img",{src:e.photo.replace(t.origin,""),alt:""})]})},qa=({hit:e})=>An(Qa,{hit:e}),Va=({hit:e})=>An(Qa,{hit:e});var Ba,Ya;const za="algolia-search",Ga=(null===(Ba=window.drupalSettings)||void 0===Ba?void 0:Ba.stanfordAlgolia.appId)||"MISSING_ENV_VAR".ALGOLIA_APP_ID,Ja=(null===(Ya=window.drupalSettings)||void 0===Ya?void 0:Ya.stanfordAlgolia.searchKey)||"MISSING_ENV_VAR".ALGOLIA_SEARCH_KEY,Ka=t()(Ga,Ja),Za=({hit:e})=>"Event"===e.type?An(qa,{hit:e}):"News"===e.type?An(Va,{hit:e}):An(Qa,{hit:e}),Xa=ba.div` +`,Ca=({hit:e})=>{const t=new URL(e.url);return Sn(Ta,{children:[Sn(Ia,{children:[Sn("div",{children:[Sn("h2",{children:Sn("a",{href:e.url.replace(t.origin,""),children:e.title})}),e.summary&&Sn("p",{className:"summary",children:Sn(Oa,{hit:e,attribute:"summary"})}),!e.summary&&e.html&&Sn("p",{children:Sn(Na,{hit:e,attribute:"html"})})]}),e.updated&&Sn("div",{children:["Last Updated: ",new Date(1e3*e.updated).toLocaleDateString("en-us",{month:"long",day:"numeric",year:"numeric"})]})]}),e.photo&&Sn("img",{src:e.photo.replace(t.origin,""),alt:""})]})},ka=({hit:e})=>Sn(Ca,{hit:e}),Da=({hit:e})=>Sn(Ca,{hit:e});var Ha,La;const Ua="algolia-search",$a=(null===(Ha=window.drupalSettings)||void 0===Ha?void 0:Ha.stanfordAlgolia.appId)||"MISSING_ENV_VAR".ALGOLIA_APP_ID,Ma=(null===(La=window.drupalSettings)||void 0===La?void 0:La.stanfordAlgolia.searchKey)||"MISSING_ENV_VAR".ALGOLIA_KEY,Wa=t()($a,Ma),Qa=({hit:e})=>"Event"===e.type?Sn(ka,{hit:e}):"News"===e.type?Sn(Da,{hit:e}):Sn(Ca,{hit:e}),qa=ua.div` li { margin-bottom: 30px; border-bottom: 1px solid black; @@ -29,4 +29,4 @@ border-bottom: none; } } -`,es=((e,t)=>{if(null==customElements.get(e)){class t extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}}customElements.define(e,t)}const r=(e=>{const t={_rootsToObservers:new WeakMap,_roots:[],_executedScript:document.currentScript,props:{},render:({selector:r,clean:n=!1,replace:i=!1,inline:o=!1,initialProps:c={},propsSelector:u,elementName:h})=>{let y=!1;const v=()=>{if(!0===y)return;const v=(({selector:e,inline:t,elementName:r})=>{const n=document.currentScript;if(t&&null!=n&&n.parentNode)return[n.parentNode];const i=null==n?void 0:n.dataset.mountIn;return i?Array.from(document.querySelectorAll(i)).map((e=>{if(null!=r){const t=document.createElement(r),n=e.appendChild(t);return null!=n.shadowRoot?n.shadowRoot:n}return e})):e?Array.from(document.querySelectorAll(e)).map((e=>null!=e.shadowRoot?e.shadowRoot:e)):[]})({selector:r,inline:o,elementName:h});if(0===v.length)return;const{rootFragments:g}=(({island:e,widget:t,hostElements:r,clean:n,replace:i,initialProps:o,propsSelector:c})=>{const u=[];return r.forEach((r=>{const h=p(e,r,o,c);let y;if(n&&r.replaceChildren(),i)y=d(r.parentElement||document.body,r);else{const e=document.createElement("div");r.appendChild(e),y=d(r,e)}u.push(y),m({island:e,widget:t,rootFragment:y,props:h});const v=(({island:e,hostElement:t,initialProps:r,onNewProps:n,propsSelector:i})=>{const o=new MutationObserver((function(o){o.forEach((function(){n(p(e,t,r,i))}))})),c={attributes:!0,childList:!0,characterData:!0};return e._executedScript&&o.observe(e._executedScript,c),l(t).forEach((e=>{o.observe(e,a({},c,{subtree:!0}))})),i&&f(i).forEach((e=>{o.observe(e,a({},c,{subtree:!0}))})),o.observe(s(t)?t.host:t,c),o})({island:e,hostElement:r,initialProps:o,onNewProps:r=>{m({island:e,widget:t,rootFragment:y,props:r})},propsSelector:c});e._rootsToObservers.set(y,v)})),{rootFragments:u}})({island:t,widget:e,clean:n,hostElements:v,replace:i,initialProps:c,propsSelector:u});t._roots=t._roots.concat(g),y=!0};v(),document.addEventListener("DOMContentLoaded",v),document.addEventListener("load",v)},rerender:r=>{t._roots.forEach((n=>{m({island:t,widget:e,rootFragment:n,props:a({},t.props,r)})}))},destroy:()=>{t._roots.forEach((e=>{var r;null==(r=t._rootsToObservers.get(e))||r.disconnect(),(0,i.sY)(null,e)}))}};return t})(t);return a({},r,{render:t=>r.render(a({elementName:e},t)),injectStyles:e=>{r._roots.forEach((t=>{const r=document.createElement("style");r.innerHTML=e,t.parentNode.prepend(r)}))}})})(za,(()=>{var e;const t=new URL(window.location.href).searchParams.get("key"),r=(null===(e=window.drupalSettings)||void 0===e?void 0:e.stanfordAlgolia.index)||"MISSING_ENV_VAR".ALGOLIA_INDEX;return An(dr,{searchClient:Ka,indexName:r,initialUiState:{[r]:{query:t}},children:An(Xa,{children:[An(In,{}),An(vn,{hitComponent:Za,classNames:{list:"su-list-unstyled"}})]})})}));es.render({selector:`${za}, #${za}`})})(),n})())); \ No newline at end of file +`,Va=e=>{const{hits:t}=function(e,t){return Ue(oe,e,t)}(e);return 0===t.length?Sn("p",{children:"No results for your search. Please try another search."}):Sn("ul",{children:t.map((e=>Sn("li",{children:Sn(Qa,{hit:e})},e.objectID)))})},Ba=((e,t)=>{if(null==customElements.get(e)){class t extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}}customElements.define(e,t)}const r=(e=>{const t={_rootsToObservers:new WeakMap,_roots:[],_executedScript:document.currentScript,props:{},render:({selector:r,clean:n=!1,replace:i=!1,inline:o=!1,initialProps:c={},propsSelector:u,elementName:h})=>{let y=!1;const v=()=>{if(!0===y)return;const v=(({selector:e,inline:t,elementName:r})=>{const n=document.currentScript;if(t&&null!=n&&n.parentNode)return[n.parentNode];const i=null==n?void 0:n.dataset.mountIn;return i?Array.from(document.querySelectorAll(i)).map((e=>{if(null!=r){const t=document.createElement(r),n=e.appendChild(t);return null!=n.shadowRoot?n.shadowRoot:n}return e})):e?Array.from(document.querySelectorAll(e)).map((e=>null!=e.shadowRoot?e.shadowRoot:e)):[]})({selector:r,inline:o,elementName:h});if(0===v.length)return;const{rootFragments:g}=(({island:e,widget:t,hostElements:r,clean:n,replace:i,initialProps:o,propsSelector:c})=>{const u=[];return r.forEach((r=>{const h=d(e,r,o,c);let y;if(n&&r.replaceChildren(),i)y=p(r.parentElement||document.body,r);else{const e=document.createElement("div");r.appendChild(e),y=p(r,e)}u.push(y),m({island:e,widget:t,rootFragment:y,props:h});const v=(({island:e,hostElement:t,initialProps:r,onNewProps:n,propsSelector:i})=>{const o=new MutationObserver((function(o){o.forEach((function(){n(d(e,t,r,i))}))})),c={attributes:!0,childList:!0,characterData:!0};return e._executedScript&&o.observe(e._executedScript,c),l(t).forEach((e=>{o.observe(e,a({},c,{subtree:!0}))})),i&&f(i).forEach((e=>{o.observe(e,a({},c,{subtree:!0}))})),o.observe(s(t)?t.host:t,c),o})({island:e,hostElement:r,initialProps:o,onNewProps:r=>{m({island:e,widget:t,rootFragment:y,props:r})},propsSelector:c});e._rootsToObservers.set(y,v)})),{rootFragments:u}})({island:t,widget:e,clean:n,hostElements:v,replace:i,initialProps:c,propsSelector:u});t._roots=t._roots.concat(g),y=!0};v(),document.addEventListener("DOMContentLoaded",v),document.addEventListener("load",v)},rerender:r=>{t._roots.forEach((n=>{m({island:t,widget:e,rootFragment:n,props:a({},t.props,r)})}))},destroy:()=>{t._roots.forEach((e=>{var r;null==(r=t._rootsToObservers.get(e))||r.disconnect(),(0,i.sY)(null,e)}))}};return t})(t);return a({},r,{render:t=>r.render(a({elementName:e},t)),injectStyles:e=>{r._roots.forEach((t=>{const r=document.createElement("style");r.innerHTML=e,t.parentNode.prepend(r)}))}})})(Ua,(()=>{var e;const t=new URL(window.location.href).searchParams.get("key"),r=(null===(e=window.drupalSettings)||void 0===e?void 0:e.stanfordAlgolia.index)||"MISSING_ENV_VAR".ALGOLIA_INDEX;return Sn(sn,{searchClient:Wa,indexName:r,initialUiState:{[r]:{query:t}},children:Sn(qa,{children:[Sn(On,{}),Sn(Va,{})]})})}));Ba.render({selector:`${Ua}, #${Ua}`})})(),n})())); \ No newline at end of file diff --git a/themes/stanford_basic/algolia-search/src/algolia-search.island.tsx b/themes/stanford_basic/algolia-search/src/algolia-search.island.tsx index c3efe1a2..e192242a 100644 --- a/themes/stanford_basic/algolia-search/src/algolia-search.island.tsx +++ b/themes/stanford_basic/algolia-search/src/algolia-search.island.tsx @@ -1,6 +1,6 @@ import algoliasearch from 'algoliasearch/lite'; import {createIslandWebComponent} from 'preact-island' -import {Hits, HitsProps, InstantSearch} from 'react-instantsearch'; +import {Hits, HitsProps, InstantSearch, useHits} from 'react-instantsearch'; import SearchBox from "./search-box"; import EventHit from "./hits/events"; import NewsHit from "./hits/news"; @@ -9,8 +9,9 @@ import styled from "styled-components"; import {StanfordHit} from "./hits/hit.types"; const islandName = 'algolia-search' + const appId = window.drupalSettings?.stanfordAlgolia.appId || process.env.ALGOLIA_APP_ID -const key = window.drupalSettings?.stanfordAlgolia.searchKey || process.env.ALGOLIA_SEARCH_KEY +const key = window.drupalSettings?.stanfordAlgolia.searchKey || process.env.ALGOLIA_KEY const searchClient = algoliasearch(appId, key); @@ -32,6 +33,23 @@ const Container = styled.div` } ` +const CustomHits = (props) => { + const {hits} = useHits(props); + if (hits.length === 0) return ( +

No results for your search. Please try another search.

+ ) + + return ( +
    + {hits.map(hit => +
  • + +
  • + )} +
+ ) +} + const Search = () => { const currentUrl = new URL(window.location.href); const initialSearch = currentUrl.searchParams.get('key'); @@ -46,8 +64,8 @@ const Search = () => { }} > - - + + ) diff --git a/themes/stanford_basic/algolia-search/src/hits/default-hit.tsx b/themes/stanford_basic/algolia-search/src/hits/default-hit.tsx index 11c4c8ec..b0a8571d 100644 --- a/themes/stanford_basic/algolia-search/src/hits/default-hit.tsx +++ b/themes/stanford_basic/algolia-search/src/hits/default-hit.tsx @@ -39,17 +39,17 @@ const DefaultHit = ({hit}) => { -

- {hit.summary && + {hit.summary && +

- } +

+ } - {(!hit.summary && hit.html) && - <> - ...... - - } -

+ {(!hit.summary && hit.html) && +

+ +

+ } {hit.updated &&