diff --git a/client/dist/js/bundle.js b/client/dist/js/bundle.js
index e1a30cfc..12b919ba 100644
--- a/client/dist/js/bundle.js
+++ b/client/dist/js/bundle.js
@@ -1,4 +1,4 @@
-!function(){"use strict";var e,t,n={274:function(e,t,n){var r=a(n(180)),o=a(n(521));function a(e){return e&&e.__esModule?e:{default:e}}window.document.addEventListener("DOMContentLoaded",(()=>{(0,o.default)(),(0,r.default)()}))},521:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(648)),o=s(n(93)),a=s(n(436)),i=s(n(149));function s(e){return e&&e.__esModule?e:{default:e}}t.default=()=>{r.default.component.register("AnchorSelectorField",o.default),r.default.transform("pages-history",(e=>{e.component("HistoryViewer.pages-controller-cms-content",a.default,"PageHistoryViewer")})),r.default.transform("pages-history-revert",(e=>{e.component("HistoryViewerToolbar.VersionedAdmin.HistoryViewer.SiteTree.HistoryViewerVersionDetail",i.default,"PageRevertMutation")}))}},180:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(648)),o=n(827),a=i(n(572));function i(e){return e&&e.__esModule?e:{default:e}}t.default=()=>{r.default.reducer.register("cms",(0,o.combineReducers)({anchorSelector:a.default}))}},93:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ConnectedAnchorSelectorField=t.Component=void 0;var r=b(n(754)),o=b(n(363)),a=b(n(875)),i=n(624),s=n(827),l=n(762),u=b(n(277)),c=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(r,a,i):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(447)),d=b(n(892)),f=b(n(42)),p=n(967),h=b(n(720)),v=b(n(820)),m=b(n(86));function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}function b(e){return e&&e.__esModule?e:{default:e}}const y=()=>null;class _ extends u.default{constructor(e){super(e),this.handleChange=this.handleChange.bind(this),this.handleLoadingError=this.handleLoadingError.bind(this)}componentDidMount(){this.ensurePagesLoaded()}componentDidUpdate(e){this.props.pageId!==e.pageId&&this.ensurePagesLoaded()}ensurePagesLoaded(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;if(e.loadingState===d.default.UPDATING||e.loadingState===d.default.SUCCESS||!e.pageId)return Promise.resolve();let t=[];e.loadingState===d.default.FIELD_ONLY&&(t=this.props.anchors),e.actions.anchorSelector.beginUpdating(e.pageId);const n=e.data.endpoint.replace(/:id/,e.pageId);return(0,a.default)(n,{credentials:"same-origin"}).then((e=>e.json())).then((n=>{const r=[...new Set([...n,...t])];return e.actions.anchorSelector.updated(e.pageId,r),r})).catch((t=>{e.actions.anchorSelector.updateFailed(e.pageId),this.handleLoadingError(t,e)}))}getDropdownOptions(){const e=this.props.anchors.map((e=>({value:e})));return this.props.value&&!this.props.anchors.find((e=>e===this.props.value))&&e.unshift({value:this.props.value}),e}handleChange(e){"function"==typeof this.props.onChange&&this.props.onChange(e?e.value:"")}handleLoadingError(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.props;if(t.onLoadingError===y)throw e;return t.onLoadingError({errors:[{value:e.message,type:"error"}]})}render(){const e={id:this.props.id},t=(0,v.default)("anchorselectorfield",this.props.extraClass),n=this.getDropdownOptions(),a=this.props.value||"",i=r.default._t("CMS.ANCHOR_SELECT_OR_TYPE","Select or enter anchor");return o.default.createElement(p.Creatable,{searchable:!0,options:n,className:t,name:this.props.name,inputProps:e,onChange:this.handleChange,onBlurResetsInput:!0,value:a,placeholder:i,labelKey:"value"})}}t.Component=_,_.propTypes={extraClass:m.default.string,id:m.default.string,name:m.default.string.isRequired,onChange:m.default.func,value:m.default.string,attributes:m.default.oneOfType([m.default.object,m.default.array]),pageId:m.default.number,anchors:m.default.array,loadingState:m.default.oneOf(Object.keys(d.default).map((e=>d.default[e]))),onLoadingError:m.default.func,data:m.default.shape({endpoint:m.default.string,targetFieldName:m.default.string})},_.defaultProps={value:"",extraClass:"",onLoadingError:y,attributes:{}};const w=(0,i.connect)((function(e,t){const n=(0,l.formValueSelector)(t.formid,h.default),r=t&&t.data&&t.data.targetFieldName||"PageID",o=Number(n(e,r)||0);let a=[];const i=o?e.cms.anchorSelector.pages.find((e=>e.id===o)):null;!i||i.loadingState!==d.default.SUCCESS&&i.loadingState!==d.default.DIRTY&&i.loadingState!==d.default.FIELD_ONLY||(a=i.anchors);let s=null;return s=i?i.loadingState:o?d.default.DIRTY:d.default.SUCCESS,{pageId:o,anchors:a,loadingState:s}}),(function(e){return{actions:{anchorSelector:(0,s.bindActionCreators)(c,e)}}}))(_);t.ConnectedAnchorSelectorField=w;var C=(0,f.default)(w);t.default=C},554:function(e,t,n){var r;((r=n(311))&&r.__esModule?r:{default:r}).default.entwine("ss",(function(e){e(".TreeDropdownField").entwine({OldValue:null}),e("#Form_AddForm_ParentID_Holder .treedropdownfield").entwine({onmatch(){this._super(),e(".cms-add-form").updateTypeList()}}),e(".cms-add-form .parent-mode :input").entwine({onclick:function(e){var t=this.closest("form").find("#Form_AddForm_ParentID_Holder .TreeDropdownField");"top"==this.val()?(t.setOldValue(t.getValue()),t.setValue(0)):(t.setValue(t.getOldValue()||0),t.setOldValue(null)),t.refresh(),t.trigger("change")}}),e(".cms-add-form").entwine({ParentCache:{},onadd:function(){var t=this;this.find("#Form_AddForm_ParentID_Holder .TreeDropdownField").on("change",(function(){t.updateTypeList()})),this.find(".SelectionGroup.parent-mode").on("change",(function(){t.updateTypeList()})),"top"==e(".cms-add-form .parent-mode :input").val()&&this.updateTypeList()},loadCachedChildren:function(e){var t=this.getParentCache();return void 0!==t[e]?t[e]:null},saveCachedChildren:function(e,t){var n=this.getParentCache();n[e]=t,this.setParentCache(n)},updateTypeList:function(){var t=this.data("hints"),n=this.find("#Form_AddForm_ParentID"),r=this.find("input[name=ParentModeField]:checked").val(),o=n.data("metadata"),a="child"===r?n.getValue():null,i=o?o.ClassName:null,s=i&&"child"===r&&a?i:"Root",l=void 0!==t[s]?t[s]:null,u=this,c=l&&void 0!==l.defaultChild?l.defaultChild:null,d=[];if(a){if(this.hasClass("loading"))return;return this.addClass("loading"),null!==(d=this.loadCachedChildren(a))?(this.updateSelectionFilter(d,c),void this.removeClass("loading")):(e.ajax({url:u.data("childfilter"),data:{ParentID:a},success:function(e){u.saveCachedChildren(a,e),u.updateSelectionFilter(e,c)},complete:function(){u.removeClass("loading")}}),!1)}d=l&&void 0!==l.disallowedChildren?l.disallowedChildren:[],this.updateSelectionFilter(d,c)},updateSelectionFilter:function(t,n){var r=this.find("#Form_AddForm_PageType div.radio.selected")[0],o=!1,a=null;if(this.find("#Form_AddForm_PageType div.radio").each((function(n,i){var s=e(this).find("input").val(),l=-1===e.inArray(s,t);i===r&&l&&(o=!0),e(this).setEnabled(l),l||e(this).setSelected(!1),a=(null===a||a)&&l})),o)var i=e(r).parents("li:first");else if(n)i=this.find("#Form_AddForm_PageType div.radio input[value="+n+"]").parents("li:first");else i=this.find("#Form_AddForm_PageType div.radio:not(.disabled):first");i.setSelected(!0),i.siblings().setSelected(!1),this.find("#Form_AddForm_PageType div.radio:not(.disabled)").length?this.find("button[name=action_doAdd]").removeAttr("disabled"):this.find("button[name=action_doAdd]").attr("disabled","disabled"),this.find(".message-restricted")[a?"hide":"show"]()}}),e(".cms-add-form #Form_AddForm_PageType div.radio").entwine({onclick:function(e){this.setSelected(!0)},setSelected:function(e){var t=this.find("input");e&&!t.is(":disabled")?(this.siblings().setSelected(!1),this.toggleClass("selected",!0),t.prop("checked",!0)):(this.toggleClass("selected",!1),t.prop("checked",!1))},setEnabled:function(t){e(this).toggleClass("disabled",!t),t?e(this).find("input").removeAttr("disabled"):e(this).find("input").attr("disabled","disabled").removeAttr("checked")}}),e(".cms-content-addpage-button").entwine({onclick:function(t){var n,r=e(".cms-tree"),o=e(".cms-list"),a=0;if(r.is(":visible")){var i=r.jstree("get_selected");a=i?e(i[0]).data("id"):null}else{var s=o.find('input[name="Page[GridState]"]').val();s&&(a=parseInt(JSON.parse(s).ParentID,10))}var l,u={selector:this.data("targetPanel"),pjax:this.data("pjax")};a?(n=this.data("extraParams")?this.data("extraParams"):"",l=e.path.addSearchParams(i18n.sprintf(this.data("urlAddpage"),a),n)):l=this.attr("href"),e(".cms-container").loadPanel(l,null,u),t.preventDefault(),this.blur()}})}))},649:function(e,t,n){var r=i(n(311)),o=i(n(754)),a=i(n(141));function i(e){return e&&e.__esModule?e:{default:e}}r.default.entwine("ss",(function(e){e(".cms-edit-form :input#Form_EditForm_ClassName").entwine({onchange:function(){alert(o.default._t("CMS.ALERTCLASSNAME"))}}),e(".cms-edit-form input[name=Title]").entwine({onmatch:function(){var t=this;t.data("OrigVal",t.val());var n=t.closest("form"),r=e("input:text[name=URLSegment]",n),o=e("input[name=LiveLink]",n);r.length>0&&(t._addActions(),this.on("change",(function(n){var a=t.data("OrigVal"),i=t.val();t.data("OrigVal",i),0===r.val().indexOf(r.data("defaultUrl"))&&""==o.val()?t.updateURLSegment(i):e(".update",t.parent()).show().parent(".form__field-holder").addClass("input-group"),t.updateRelatedFields(i,a),t.updateBreadcrumbLabel(i)}))),this._super()},onunmatch:function(){this._super()},updateRelatedFields:function(t,n){this.parents("form").find("input[name=MetaTitle], input[name=MenuTitle]").each((function(){var r=e(this);r.val()==n&&(r.val(t),r.updatedRelatedFields&&r.updatedRelatedFields())}))},updateURLSegment:function(t){var n=e("input:text[name=URLSegment]",this.closest("form")).closest(".field.urlsegment"),r=e(".update",this.parent());n.update(t),r.is(":visible")&&r.hide().parent(".form__field-holder").removeClass("input-group")},updateBreadcrumbLabel:function(t){e(".cms-edit-form input[name=ID]").val();var n=e("span.cms-panel-link.crumb");t&&""!=t&&n.text(t)},_addActions:function(){var t,n=this;(t=e("",{class:"update btn btn-outline-secondary form__field-update-url",text:o.default._t("CMS.UpdateURL"),type:"button",click:function(e){e.preventDefault(),n.updateURLSegment(n.val())}})).insertAfter(n),t.hide()}}),e(".cms-edit-form .parentTypeSelector").entwine({onmatch:function(){var e=this;this.find(":input[name=ParentType]").on("click",(function(t){e._toggleSelection(t)})),this.find(".TreeDropdownField").on("change",(function(t){e._changeParentId(t)})),this._changeParentId(),this._toggleSelection(),this._super()},onunmatch:function(){this._super()},_toggleSelection:function(t){var n=this.find(":input[name=ParentType]:checked").val(),r=this.find("#Form_EditForm_ParentID_Holder");"root"==n?this.find(":input[name=ParentID]").val(0):this.find(":input[name=ParentID]").val(this.find("#Form_EditForm_ParentType_subpage").data("parentIdValue")),"root"!=n?r.slideDown(400,(function(){e(this).css("overflow","visible")})):r.slideUp()},_changeParentId:function(e){var t=this.find(":input[name=ParentID]").val();this.find("#Form_EditForm_ParentType_subpage").data("parentIdValue",t)}}),e(".cms-edit-form .btn-toolbar #Form_EditForm_action_doRollback, .cms-edit-form .btn-toolbar #Form_EditForm_action_rollback").entwine({onclick:function(e){if(this.is(":disabled"))return e.preventDefault(),!1;const t=this.parents("form:first").find(":input[name=Version]").val(),n=t?o.default.sprintf(o.default._t("CMS.RollbackToVersion","Do you really want to roll back to version #%s of this page?"),t):o.default._t("CMS.ConfirmRestoreFromLive","Are you sure you want to revert draft to when the page was last published?");return confirm(n)?(this.parents("form:first").addClass("loading"),this._super(e)):(e.preventDefault(),!1)}}),e(".cms-edit-form .btn-toolbar #Form_EditForm_action_archive:not(.homepage-warning)").entwine({onclick:function(e){var t;return t=this.parents("form:first").find("input[name=ArchiveWarningMessage]").val().replace(/\\n/g,"\n"),!!confirm(t)&&(this.parents("form:first").addClass("loading"),this._super(e))}}),e(".cms-edit-form .btn-toolbar #Form_EditForm_action_restore").entwine({onclick:function(e){var t,n=this.parents("form:first").find(":input[name=Version]").val(),r=this.data("toRoot");return t=o.default.sprintf(o.default._t(r?"CMS.RestoreToRoot":"CMS.Restore"),n),!!confirm(t)&&(this.parents("form:first").addClass("loading"),this._super(e))}}),e(".cms-edit-form .btn-toolbar #Form_EditForm_action_unpublish:not(.homepage-warning)").entwine({onclick:function(e){var t,n=this.parents("form:first").find(":input[name=Version]").val();return t=o.default.sprintf(o.default._t("CMS.Unpublish"),n),!!confirm(t)&&(this.parents("form:first").addClass("loading"),this._super(e))}}),e(".cms-edit-form.changed").entwine({onmatch:function(t){this.find("button[data-text-alternate]").each((function(){const t=e(this),n=t.find(".btn__title"),r=t.data("textAlternate");r&&(t.data("textStandard",n.text()),n.text(r));const o=t.data("btnAlternate");o&&(t.data("btnStandard",t.attr("class")),t.attr("class",o),t.removeClass("btn-outline-secondary").addClass("btn-primary"));const a=t.data("btnAlternateAdd");a&&t.addClass(a);const i=t.data("btnAlternateRemove");i&&t.removeClass(i)})),this._super(t)},onunmatch:function(t){this.find("button[data-text-alternate]").each((function(){const t=e(this),n=t.find(".btn__title"),r=t.data("textStandard");r&&n.text(r);const o=t.data("btnStandard");o&&(t.attr("class",o),t.addClass("btn-outline-secondary").removeClass("btn-primary"));const a=t.data("btnAlternateAdd");a&&t.removeClass(a);const i=t.data("btnAlternateRemove");i&&t.addClass(i)})),this._super(t)}}),e(".cms-edit-form .btn-toolbar button[name=action_publish]").entwine({onbuttonafterrefreshalternate:function(){this.data("showingAlternate")?(this.addClass("btn-primary"),this.removeClass("btn-secondary")):(this.removeClass("btn-primary"),this.addClass("btn-secondary"))}}),e(".cms-edit-form .btn-toolbar button[name=action_save]").entwine({onbuttonafterrefreshalternate:function(){this.data("showingAlternate")?(this.addClass("btn-primary"),this.removeClass("btn-secondary")):(this.removeClass("btn-primary"),this.addClass("btn-secondary"))}}),e('.cms-edit-form.CMSPageSettingsController input[name="ParentType"]:checked').entwine({onmatch:function(){this.redraw(),this._super()},onunmatch:function(){this._super()},redraw:function(){var t=e(".cms-edit-form.CMSPageSettingsController #Form_EditForm_ParentID_Holder");"Form_EditForm_ParentType_root"==e(this).attr("id")?t.slideUp():t.slideDown()},onclick:function(){this.redraw()}}),"Form_EditForm_ParentType_root"==e('.cms-edit-form.CMSPageSettingsController input[name="ParentType"]:checked').attr("id")&&e(".cms-edit-form.CMSPageSettingsController #Form_EditForm_ParentID_Holder").hide();var t=!1;e(".cms-edit-form .btn-toolbar #Form_EditForm_action_unpublish.homepage-warning,.cms-edit-form .btn-toolbar #Form_EditForm_action_archive.homepage-warning,#Form_EditForm_URLSegment_Holder.homepage-warning .btn.update").entwine({onclick:async function(e){if(t)return this._super(e);e.stopPropagation();var n=o.default._t("CMS.RemoveHomePageWarningMessage","Warning: This page is the home page. By changing the URL segment visitors will not be able to view it.");return await(0,a.default)(n,{title:o.default._t("CMS.RemoveHomePageWarningTitle","Remove your home page?"),confirmLabel:o.default._t("CMS.RemoveHomePageWarningLabel","Remove"),confirmColor:"danger"})&&(t=!0,this.trigger("click"),t=!1),!1}})}))},978:function(e,t,n){var r=i(n(311)),o=i(n(754)),a=i(n(141));function i(e){return e&&e.__esModule?e:{default:e}}r.default.entwine("ss.tree",(function(e){e(".cms-tree").entwine({fromDocument:{"oncontext_show.vakata":function(e){this.adjustContextClass()}},adjustContextClass:function(){var t=e("#vakata-contextmenu").find("ul ul");t.each((function(n){var r="1",o=e(t[n]).find("li").length;o>20?r="3":o>10&&(r="2"),e(t[n]).addClass("vakata-col-"+r).removeClass("right"),e(t[n]).find("li").on("mouseenter",(function(t){e(this).parent("ul").removeClass("right")}))}))},showListViewFor:function(t){localStorage.setItem("ss.pages-view-type","listview");const n=this.closest(".cms-content-view").data("url-listviewroot"),r=e.path.addSearchParams(n,{ParentID:t}),o=e("base").attr("href")||"";window.location.assign(o+r)},getTreeConfig:function(){var t=this,n=this._super();this.getHints();return n.plugins.push("contextmenu"),n.contextmenu={items:function(n){var r={edit:{label:n.hasClass("edit-disabled")?o.default._t("CMS.EditPage","Edit page",100,"Used in the context menu when right-clicking on a page node in the CMS tree"):o.default._t("CMS.ViewPage","View page",100,"Used in the context menu when right-clicking on a page node in the CMS tree"),action:function(n){e(".cms-container").entwine(".ss").loadPanel(o.default.sprintf(t.data("urlEditpage"),n.data("id")))}}};n.hasClass("nochildren")||(r.showaslist={label:o.default._t("CMS.ShowAsList"),action:function(e){t.showListViewFor(e.data("id"))}});n.data("pagetype");var a=n.data("id"),i=n.find(">a .item").data("allowedchildren"),s={},l=!1;return e.each(i,(function(n,r){l=!0,s["allowedchildren-"+r.ClassName]={label:''+r.Title,_class:"class-"+r.ClassName.replace(/[^a-zA-Z0-9\-_:.]+/g,"_"),action:function(n){e(".cms-container").entwine(".ss").loadPanel(e.path.addSearchParams(o.default.sprintf(t.data("urlAddpage"),a,r.ClassName),t.data("extraParams")))}}})),l&&(r.addsubpage={label:o.default._t("CMS.AddSubPage","Add page under this page",100,"Used in the context menu when right-clicking on a page node in the CMS tree"),submenu:s}),n.hasClass("edit-disabled")||(r.duplicate={label:o.default._t("CMS.Duplicate"),submenu:[{label:o.default._t("CMS.ThisPageOnly"),action:function(n){e(".cms-container").entwine(".ss").loadPanel(e.path.addSearchParams(o.default.sprintf(t.data("urlDuplicate"),n.data("id")),t.data("extraParams")))}},{label:o.default._t("CMS.ThisPageAndSubpages"),action:function(n){e(".cms-container").entwine(".ss").loadPanel(e.path.addSearchParams(o.default.sprintf(t.data("urlDuplicatewithchildren"),n.data("id")),t.data("extraParams")))}}]}),r}},n},canMove:async function(e){if(!(e.rslt.o.find(".homepage").first().length>0))return!0;if(e.rslt.op.data("id")===e.rslt.np.data("id"))return!0;var t=o.default._t("CMS.RemoveHomePageWarningMessage","Warning: This page is the home page. By changing the URL segment visitors will not be able to view it.");return await(0,a.default)(t,{title:o.default._t("CMS.RemoveHomePageWarningTitle","Remove your home page?"),confirmLabel:o.default._t("CMS.RemoveHomePageWarningLabel","Remove"),confirmColor:"danger"})}}),e(".cms-tree a.jstree-clicked").entwine({onmatch:function(){var e=this,t=e.parents(".cms-tree-view-sidebar");if(e.offset().top<0||e.offset().top>t.height()-e.height()){var n=e.parent();n.prev().length&&(n=n.prev()),n.get(0).scrollIntoView()}}}),e(".cms-tree-filtered .clear-filter").entwine({onclick:function(){window.location=location.protocol+"//"+location.host+location.pathname}}),e(".cms-tree .subtree-list-link").entwine({onclick:function(e){e.preventDefault(),this.closest(".cms-tree").showListViewFor(this.data("id"))}})}))},580:function(e,t,n){var r;((r=n(311))&&r.__esModule?r:{default:r}).default.entwine("ss",(function(e){const t="treeview",n="listview";e(".cms-content-header-info").entwine({"from .cms-panel":{ontoggle:function(e){var t=this.closest(".cms-content").find(e.target);0!==t.length&&this.parent()[t.hasClass("collapsed")?"addClass":"removeClass"]("collapsed")}}}),e(".cms-panel-deferred.cms-content-view").entwine({onadd:function(){if(this.data("no-ajax"))return;var e=localStorage.getItem("ss.pages-view-type")||t;this.closest(".cms-content-tools").length>0&&(e=t);const r=this.data(`url-${e}`);let o=localStorage.getItem("ss.pages-view-filtered");"string"==typeof o&&"false"===o.toLowerCase()&&(o=!1),localStorage.setItem("ss.pages-view-filtered",!1),this.data("deferredNoCache",o||e===n),this.data("url",r+location.search),this._super()}}),e(".js-injector-boot .search-holder--cms").entwine({search(e){localStorage.setItem("ss.pages-view-filtered",!0),this._super(e)}}),e(".cms .page-view-link").entwine({onclick:function(t){t.preventDefault();const r=e(this).data("view"),o=this.closest(".cms-content-view"),a=o.data(`url-${r}`),i=0!==o.closest(".cms-content-tools").length;if(localStorage.setItem("ss.pages-view-type",r),i&&r===n){const t=e("base").attr("href")||"";window.location.assign(t+o.data("url-listviewroot"))}else o.data("url",a+location.search),o.redraw()}}),e(".cms .cms-clear-filter").entwine({onclick:function(t){t.preventDefault(),window.location=e(this).prop("href")}}),e(".cms-content-toolbar").entwine({onmatch:function(){var t=this;this._super(),e.each(this.find(".cms-actions-buttons-row .tool-button"),(function(){var n=e(this),r=n.data("toolid");n.hasClass("active");void 0!==r&&(n.data("active",!1).removeClass("active"),e("#"+r).hide(),t.bindActionButtonEvents(n))}))},onunmatch:function(){var t=this;this._super(),e.each(this.find(".cms-actions-buttons-row .tool-button"),(function(){var n=e(this);t.unbindActionButtonEvents(n)}))},bindActionButtonEvents:function(e){var t=this;e.on("click.cmsContentToolbar",(function(n){t.showHideTool(e)}))},unbindActionButtonEvents:function(e){e.off(".cmsContentToolbar")},showHideTool:function(t){var n=t.data("active"),r=t.data("toolid"),o=e("#"+r);e.each(this.find(".cms-actions-buttons-row .tool-button"),(function(){var t=e(this),n=e("#"+t.data("toolid"));t.data("toolid")!==r&&(n.hide(),t.data("active",!1))})),t[n?"removeClass":"addClass"]("active"),o[n?"hide":"show"](),t.data("active",!n)}})}))},907:function(e,t,n){var r;((r=n(311))&&r.__esModule?r:{default:r}).default.entwine("ss",(function(e){e("#Form_EditForm_RedirectionType input").entwine({onmatch:function(){e(this).attr("checked")&&this.toggle(),this._super()},onunmatch:function(){this._super()},onclick:function(){this.toggle()},toggle:function(){"Internal"==e(this).attr("value")?(e("#Form_EditForm_ExternalURL_Holder").hide(),e("#Form_EditForm_LinkToID_Holder").show(),e("#Form_EditForm_LinkToFile_Holder").hide()):"External"==e(this).attr("value")?(e("#Form_EditForm_ExternalURL_Holder").show(),e("#Form_EditForm_LinkToID_Holder").hide(),e("#Form_EditForm_LinkToFile_Holder").hide()):(e("#Form_EditForm_LinkToFile_Holder").show(),e("#Form_EditForm_ExternalURL_Holder").hide(),e("#Form_EditForm_LinkToID_Holder").hide())}})}))},806:function(e,t,n){var r;((r=n(311))&&r.__esModule?r:{default:r}).default.entwine("ss",(function(e){e(".field.urlsegment:not(.readonly)").entwine({MaxPreviewLength:55,Ellipsis:"...",onmatch:function(){this.find(":text").length&&this.toggleEdit(!1),this.redraw(),this._super()},redraw:function(){var e=this.find(":text"),t=decodeURI(e.data("prefix")+e.val()),n=t;t.length>this.getMaxPreviewLength()&&(n=this.getEllipsis()+t.substr(t.length-this.getMaxPreviewLength(),t.length)),this.find(".URL-link").attr("href",encodeURI(t+e.data("suffix"))).text(n)},toggleEdit:function(e){var t=this.find(":text");this.find(".preview-holder")[e?"hide":"show"](),this.find(".edit-holder")[e?"show":"hide"](),e&&(t.data("origval",t.val()),t.focus())},update:function(){var e=this,t=this.find(":text"),n=t.data("origval"),r=arguments[0],o=r&&""!==r?r:t.val();n!=o?(this.addClass("loading"),this.suggest(o,(function(n){t.val(decodeURIComponent(n.value)),e.toggleEdit(!1),e.removeClass("loading"),e.redraw()}))):(this.toggleEdit(!1),this.redraw())},cancel:function(){var e=this.find(":text");e.val(e.data("origval")),this.toggleEdit(!1)},suggest:function(t,n){var r=this,o=r.find(":text"),a=e.path.parseUrl(r.closest("form").attr("action")),i=a.hrefNoSearch+"/field/"+o.attr("name")+"/suggest/?value="+encodeURIComponent(t);a.search&&(i+="&"+a.search.replace(/^\?/,"")),e.ajax({url:i,success:function(e){n.apply(this,arguments)},error:function(e,t){e.statusText=e.responseText},complete:function(){r.removeClass("loading")}})}}),e(".field.urlsegment .text").entwine({onkeydown:function(e){13===e.keyCode&&(e.preventDefault(),this.closest(".field").update())}}),e(".field.urlsegment .edit").entwine({onclick:function(e){e.preventDefault(),this.closest(".field").toggleEdit(!0)}}),e(".field.urlsegment .update").entwine({onclick:function(e){e.preventDefault(),this.closest(".field").update()}}),e(".field.urlsegment .cancel").entwine({onclick:function(e){e.preventDefault(),this.closest(".field").cancel()}})}))},964:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={ANCHORSELECTOR_CURRENT_FIELD:"ANCHORSELECTOR_CURRENT_FIELD",ANCHORSELECTOR_UPDATED:"ANCHORSELECTOR_UPDATED",ANCHORSELECTOR_UPDATING:"ANCHORSELECTOR_UPDATING",ANCHORSELECTOR_UPDATE_FAILED:"ANCHORSELECTOR_UPDATE_FAILED"}},447:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.beginUpdating=function(e){return{type:o.default.ANCHORSELECTOR_UPDATING,payload:{pageId:e}}},t.updateFailed=function(e){return{type:o.default.ANCHORSELECTOR_UPDATE_FAILED,payload:{pageId:e}}},t.updated=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:o.default.ANCHORSELECTOR_UPDATED,payload:{pageId:e,anchors:t,cacheResult:n}}},t.updatedCurrentField=function(e,t,n){return{type:o.default.ANCHORSELECTOR_CURRENT_FIELD,payload:{pageId:e,anchors:t,fieldID:n}}};var r,o=(r=n(964))&&r.__esModule?r:{default:r}},572:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=(n,o)=>{const a=t.payload.pageId;return(0,r.default)({pages:[...e.pages.filter((e=>e.id!==a)),{id:a,loadingState:n,anchors:o}].sort(((e,t)=>e.id-t.id))})};switch(t.type){case o.default.ANCHORSELECTOR_UPDATING:return n(a.default.UPDATING,[]);case o.default.ANCHORSELECTOR_UPDATED:{const{anchors:e,cacheResult:r}=t.payload,{SUCCESS:o,DIRTY:i}=a.default;return n(r?o:i,e)}case o.default.ANCHORSELECTOR_CURRENT_FIELD:{const{anchors:e}=t.payload;return n(a.default.FIELD_ONLY,e)}case o.default.ANCHORSELECTOR_UPDATE_FAILED:return n(a.default.FAILED,[]);default:return e}};var r=i(n(752)),o=i(n(964)),a=i(n(892));function i(e){return e&&e.__esModule?e:{default:e}}const s=(0,r.default)({pages:[]})},892:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={SUCCESS:"SUCCESS",DIRTY:"DIRTY",FIELD_ONLY:"FIELD_ONLY",UPDATING:"UPDATING",FAILED:"FAILED"}},436:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.query=t.default=t.config=void 0;var r,o=n(588);const a=((r=n(306))&&r.__esModule?r:{default:r}).default`
+!function(){"use strict";var e,t,n={274:function(e,t,n){var r=i(n(180)),o=i(n(521));function i(e){return e&&e.__esModule?e:{default:e}}window.document.addEventListener("DOMContentLoaded",(()=>{(0,o.default)(),(0,r.default)()}))},521:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(648)),o=s(n(93)),i=s(n(436)),a=s(n(149));function s(e){return e&&e.__esModule?e:{default:e}}t.default=()=>{r.default.component.register("AnchorSelectorField",o.default),r.default.transform("pages-history",(e=>{e.component("HistoryViewer.pages-controller-cms-content",i.default,"PageHistoryViewer")})),r.default.transform("pages-history-revert",(e=>{e.component("HistoryViewerToolbar.VersionedAdmin.HistoryViewer.SiteTree.HistoryViewerVersionDetail",a.default,"PageRevertMutation")}))}},180:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(648)),o=n(827),i=a(n(572));function a(e){return e&&e.__esModule?e:{default:e}}t.default=()=>{r.default.reducer.register("cms",(0,o.combineReducers)({anchorSelector:i.default}))}},93:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ConnectedAnchorSelectorField=t.Component=void 0;var r=b(n(754)),o=b(n(363)),i=b(n(875)),a=n(624),s=n(827),u=n(762),l=b(n(277)),c=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(447)),d=b(n(892)),f=b(n(42)),p=b(n(251)),h=b(n(720)),m=b(n(820)),v=b(n(86));function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}function b(e){return e&&e.__esModule?e:{default:e}}const y=()=>null;class w extends l.default{constructor(e){super(e),this.handleChange=this.handleChange.bind(this),this.handleLoadingError=this.handleLoadingError.bind(this)}componentDidMount(){this.ensurePagesLoaded()}componentDidUpdate(e){this.props.pageId!==e.pageId&&this.ensurePagesLoaded()}ensurePagesLoaded(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;if(e.loadingState===d.default.UPDATING||e.loadingState===d.default.SUCCESS||!e.pageId)return Promise.resolve();let t=[];e.loadingState===d.default.FIELD_ONLY&&(t=this.props.anchors),e.actions.anchorSelector.beginUpdating(e.pageId);const n=e.data.endpoint.replace(/:id/,e.pageId);return(0,i.default)(n,{credentials:"same-origin"}).then((e=>e.json())).then((n=>{const r=[...new Set([...n,...t])];return e.actions.anchorSelector.updated(e.pageId,r),r})).catch((t=>{e.actions.anchorSelector.updateFailed(e.pageId),this.handleLoadingError(t,e)}))}getDropdownOptions(){const e=this.props.anchors.map((e=>({value:e})));return this.props.value&&!this.props.anchors.find((e=>e===this.props.value))&&e.unshift({value:this.props.value}),e}handleChange(e){console.log(e),"function"==typeof this.props.onChange&&this.props.onChange(e?e.value:"")}handleLoadingError(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.props;if(t.onLoadingError===y)throw e;return t.onLoadingError({errors:[{value:e.message,type:"error"}]})}render(){const e=(0,m.default)("anchorselectorfield",this.props.extraClass),t=this.getDropdownOptions(),n=this.props.value||"",i=r.default._t("CMS.ANCHOR_SELECT_OR_TYPE","Select or enter anchor");return o.default.createElement(p.default,{isSearchable:!0,isClearable:!0,options:t,className:e,name:this.props.name,onChange:this.handleChange,value:{value:n},noOptionsMessage:()=>r.default._t("CMS.ANCHOR_NO_OPTIONS","No options"),placeholder:i,getOptionLabel:e=>{let{value:t}=e;return t},classNamePrefix:"anchorselectorfield"})}}t.Component=w,w.propTypes={extraClass:v.default.string,id:v.default.string,name:v.default.string.isRequired,onChange:v.default.func,value:v.default.string,attributes:v.default.oneOfType([v.default.object,v.default.array]),pageId:v.default.number,anchors:v.default.array,loadingState:v.default.oneOf(Object.keys(d.default).map((e=>d.default[e]))),onLoadingError:v.default.func,data:v.default.shape({endpoint:v.default.string,targetFieldName:v.default.string})},w.defaultProps={value:"",extraClass:"",onLoadingError:y,attributes:{}};const O=(0,a.connect)((function(e,t){const n=(0,u.formValueSelector)(t.formid,h.default),r=t&&t.data&&t.data.targetFieldName||"PageID",o=Number(n(e,r)||0);let i=[];const a=o?e.cms.anchorSelector.pages.find((e=>e.id===o)):null;!a||a.loadingState!==d.default.SUCCESS&&a.loadingState!==d.default.DIRTY&&a.loadingState!==d.default.FIELD_ONLY||(i=a.anchors);let s=null;return s=a?a.loadingState:o?d.default.DIRTY:d.default.SUCCESS,{pageId:o,anchors:i,loadingState:s}}),(function(e){return{actions:{anchorSelector:(0,s.bindActionCreators)(c,e)}}}))(w);t.ConnectedAnchorSelectorField=O;var C=(0,f.default)(O);t.default=C},554:function(e,t,n){var r;((r=n(311))&&r.__esModule?r:{default:r}).default.entwine("ss",(function(e){e(".TreeDropdownField").entwine({OldValue:null}),e("#Form_AddForm_ParentID_Holder .treedropdownfield").entwine({onmatch(){this._super(),e(".cms-add-form").updateTypeList()}}),e(".cms-add-form .parent-mode :input").entwine({onclick:function(e){var t=this.closest("form").find("#Form_AddForm_ParentID_Holder .TreeDropdownField");"top"==this.val()?(t.setOldValue(t.getValue()),t.setValue(0)):(t.setValue(t.getOldValue()||0),t.setOldValue(null)),t.refresh(),t.trigger("change")}}),e(".cms-add-form").entwine({ParentCache:{},onadd:function(){var t=this;this.find("#Form_AddForm_ParentID_Holder .TreeDropdownField").on("change",(function(){t.updateTypeList()})),this.find(".SelectionGroup.parent-mode").on("change",(function(){t.updateTypeList()})),"top"==e(".cms-add-form .parent-mode :input").val()&&this.updateTypeList()},loadCachedChildren:function(e){var t=this.getParentCache();return void 0!==t[e]?t[e]:null},saveCachedChildren:function(e,t){var n=this.getParentCache();n[e]=t,this.setParentCache(n)},updateTypeList:function(){var t=this.data("hints"),n=this.find("#Form_AddForm_ParentID"),r=this.find("input[name=ParentModeField]:checked").val(),o=n.data("metadata"),i="child"===r?n.getValue():null,a=o?o.ClassName:null,s=a&&"child"===r&&i?a:"Root",u=void 0!==t[s]?t[s]:null,l=this,c=u&&void 0!==u.defaultChild?u.defaultChild:null,d=[];if(i){if(this.hasClass("loading"))return;return this.addClass("loading"),null!==(d=this.loadCachedChildren(i))?(this.updateSelectionFilter(d,c),void this.removeClass("loading")):(e.ajax({url:l.data("childfilter"),data:{ParentID:i},success:function(e){l.saveCachedChildren(i,e),l.updateSelectionFilter(e,c)},complete:function(){l.removeClass("loading")}}),!1)}d=u&&void 0!==u.disallowedChildren?u.disallowedChildren:[],this.updateSelectionFilter(d,c)},updateSelectionFilter:function(t,n){var r=this.find("#Form_AddForm_PageType div.radio.selected")[0],o=!1,i=null;if(this.find("#Form_AddForm_PageType div.radio").each((function(n,a){var s=e(this).find("input").val(),u=-1===e.inArray(s,t);a===r&&u&&(o=!0),e(this).setEnabled(u),u||e(this).setSelected(!1),i=(null===i||i)&&u})),o)var a=e(r).parents("li:first");else if(n)a=this.find("#Form_AddForm_PageType div.radio input[value="+n+"]").parents("li:first");else a=this.find("#Form_AddForm_PageType div.radio:not(.disabled):first");a.setSelected(!0),a.siblings().setSelected(!1),this.find("#Form_AddForm_PageType div.radio:not(.disabled)").length?this.find("button[name=action_doAdd]").removeAttr("disabled"):this.find("button[name=action_doAdd]").attr("disabled","disabled"),this.find(".message-restricted")[i?"hide":"show"]()}}),e(".cms-add-form #Form_AddForm_PageType div.radio").entwine({onclick:function(e){this.setSelected(!0)},setSelected:function(e){var t=this.find("input");e&&!t.is(":disabled")?(this.siblings().setSelected(!1),this.toggleClass("selected",!0),t.prop("checked",!0)):(this.toggleClass("selected",!1),t.prop("checked",!1))},setEnabled:function(t){e(this).toggleClass("disabled",!t),t?e(this).find("input").removeAttr("disabled"):e(this).find("input").attr("disabled","disabled").removeAttr("checked")}}),e(".cms-content-addpage-button").entwine({onclick:function(t){var n,r=e(".cms-tree"),o=e(".cms-list"),i=0;if(r.is(":visible")){var a=r.jstree("get_selected");i=a?e(a[0]).data("id"):null}else{var s=o.find('input[name="Page[GridState]"]').val();s&&(i=parseInt(JSON.parse(s).ParentID,10))}var u,l={selector:this.data("targetPanel"),pjax:this.data("pjax")};i?(n=this.data("extraParams")?this.data("extraParams"):"",u=e.path.addSearchParams(i18n.sprintf(this.data("urlAddpage"),i),n)):u=this.attr("href"),e(".cms-container").loadPanel(u,null,l),t.preventDefault(),this.blur()}})}))},649:function(e,t,n){var r=a(n(311)),o=a(n(754)),i=a(n(141));function a(e){return e&&e.__esModule?e:{default:e}}r.default.entwine("ss",(function(e){e(".cms-edit-form :input#Form_EditForm_ClassName").entwine({onchange:function(){alert(o.default._t("CMS.ALERTCLASSNAME"))}}),e(".cms-edit-form input[name=Title]").entwine({onmatch:function(){var t=this;t.data("OrigVal",t.val());var n=t.closest("form"),r=e("input:text[name=URLSegment]",n),o=e("input[name=LiveLink]",n);r.length>0&&(t._addActions(),this.on("change",(function(n){var i=t.data("OrigVal"),a=t.val();t.data("OrigVal",a),0===r.val().indexOf(r.data("defaultUrl"))&&""==o.val()?t.updateURLSegment(a):e(".update",t.parent()).show().parent(".form__field-holder").addClass("input-group"),t.updateRelatedFields(a,i),t.updateBreadcrumbLabel(a)}))),this._super()},onunmatch:function(){this._super()},updateRelatedFields:function(t,n){this.parents("form").find("input[name=MetaTitle], input[name=MenuTitle]").each((function(){var r=e(this);r.val()==n&&(r.val(t),r.updatedRelatedFields&&r.updatedRelatedFields())}))},updateURLSegment:function(t){var n=e("input:text[name=URLSegment]",this.closest("form")).closest(".field.urlsegment"),r=e(".update",this.parent());n.update(t),r.is(":visible")&&r.hide().parent(".form__field-holder").removeClass("input-group")},updateBreadcrumbLabel:function(t){e(".cms-edit-form input[name=ID]").val();var n=e("span.cms-panel-link.crumb");t&&""!=t&&n.text(t)},_addActions:function(){var t,n=this;(t=e("",{class:"update btn btn-outline-secondary form__field-update-url",text:o.default._t("CMS.UpdateURL"),type:"button",click:function(e){e.preventDefault(),n.updateURLSegment(n.val())}})).insertAfter(n),t.hide()}}),e(".cms-edit-form .parentTypeSelector").entwine({onmatch:function(){var e=this;this.find(":input[name=ParentType]").on("click",(function(t){e._toggleSelection(t)})),this.find(".TreeDropdownField").on("change",(function(t){e._changeParentId(t)})),this._changeParentId(),this._toggleSelection(),this._super()},onunmatch:function(){this._super()},_toggleSelection:function(t){var n=this.find(":input[name=ParentType]:checked").val(),r=this.find("#Form_EditForm_ParentID_Holder");"root"==n?this.find(":input[name=ParentID]").val(0):this.find(":input[name=ParentID]").val(this.find("#Form_EditForm_ParentType_subpage").data("parentIdValue")),"root"!=n?r.slideDown(400,(function(){e(this).css("overflow","visible")})):r.slideUp()},_changeParentId:function(e){var t=this.find(":input[name=ParentID]").val();this.find("#Form_EditForm_ParentType_subpage").data("parentIdValue",t)}}),e(".cms-edit-form .btn-toolbar #Form_EditForm_action_doRollback, .cms-edit-form .btn-toolbar #Form_EditForm_action_rollback").entwine({onclick:function(e){if(this.is(":disabled"))return e.preventDefault(),!1;const t=this.parents("form:first").find(":input[name=Version]").val(),n=t?o.default.sprintf(o.default._t("CMS.RollbackToVersion","Do you really want to roll back to version #%s of this page?"),t):o.default._t("CMS.ConfirmRestoreFromLive","Are you sure you want to revert draft to when the page was last published?");return confirm(n)?(this.parents("form:first").addClass("loading"),this._super(e)):(e.preventDefault(),!1)}}),e(".cms-edit-form .btn-toolbar #Form_EditForm_action_archive:not(.homepage-warning)").entwine({onclick:function(e){var t;return t=this.parents("form:first").find("input[name=ArchiveWarningMessage]").val().replace(/\\n/g,"\n"),!!confirm(t)&&(this.parents("form:first").addClass("loading"),this._super(e))}}),e(".cms-edit-form .btn-toolbar #Form_EditForm_action_restore").entwine({onclick:function(e){var t,n=this.parents("form:first").find(":input[name=Version]").val(),r=this.data("toRoot");return t=o.default.sprintf(o.default._t(r?"CMS.RestoreToRoot":"CMS.Restore"),n),!!confirm(t)&&(this.parents("form:first").addClass("loading"),this._super(e))}}),e(".cms-edit-form .btn-toolbar #Form_EditForm_action_unpublish:not(.homepage-warning)").entwine({onclick:function(e){var t,n=this.parents("form:first").find(":input[name=Version]").val();return t=o.default.sprintf(o.default._t("CMS.Unpublish"),n),!!confirm(t)&&(this.parents("form:first").addClass("loading"),this._super(e))}}),e(".cms-edit-form.changed").entwine({onmatch:function(t){this.find("button[data-text-alternate]").each((function(){const t=e(this),n=t.find(".btn__title"),r=t.data("textAlternate");r&&(t.data("textStandard",n.text()),n.text(r));const o=t.data("btnAlternate");o&&(t.data("btnStandard",t.attr("class")),t.attr("class",o),t.removeClass("btn-outline-secondary").addClass("btn-primary"));const i=t.data("btnAlternateAdd");i&&t.addClass(i);const a=t.data("btnAlternateRemove");a&&t.removeClass(a)})),this._super(t)},onunmatch:function(t){this.find("button[data-text-alternate]").each((function(){const t=e(this),n=t.find(".btn__title"),r=t.data("textStandard");r&&n.text(r);const o=t.data("btnStandard");o&&(t.attr("class",o),t.addClass("btn-outline-secondary").removeClass("btn-primary"));const i=t.data("btnAlternateAdd");i&&t.removeClass(i);const a=t.data("btnAlternateRemove");a&&t.addClass(a)})),this._super(t)}}),e(".cms-edit-form .btn-toolbar button[name=action_publish]").entwine({onbuttonafterrefreshalternate:function(){this.data("showingAlternate")?(this.addClass("btn-primary"),this.removeClass("btn-secondary")):(this.removeClass("btn-primary"),this.addClass("btn-secondary"))}}),e(".cms-edit-form .btn-toolbar button[name=action_save]").entwine({onbuttonafterrefreshalternate:function(){this.data("showingAlternate")?(this.addClass("btn-primary"),this.removeClass("btn-secondary")):(this.removeClass("btn-primary"),this.addClass("btn-secondary"))}}),e('.cms-edit-form.CMSPageSettingsController input[name="ParentType"]:checked').entwine({onmatch:function(){this.redraw(),this._super()},onunmatch:function(){this._super()},redraw:function(){var t=e(".cms-edit-form.CMSPageSettingsController #Form_EditForm_ParentID_Holder");"Form_EditForm_ParentType_root"==e(this).attr("id")?t.slideUp():t.slideDown()},onclick:function(){this.redraw()}}),"Form_EditForm_ParentType_root"==e('.cms-edit-form.CMSPageSettingsController input[name="ParentType"]:checked').attr("id")&&e(".cms-edit-form.CMSPageSettingsController #Form_EditForm_ParentID_Holder").hide();var t=!1;e(".cms-edit-form .btn-toolbar #Form_EditForm_action_unpublish.homepage-warning,.cms-edit-form .btn-toolbar #Form_EditForm_action_archive.homepage-warning,#Form_EditForm_URLSegment_Holder.homepage-warning .btn.update").entwine({onclick:async function(e){if(t)return this._super(e);e.stopPropagation();var n=o.default._t("CMS.RemoveHomePageWarningMessage","Warning: This page is the home page. By changing the URL segment visitors will not be able to view it.");return await(0,i.default)(n,{title:o.default._t("CMS.RemoveHomePageWarningTitle","Remove your home page?"),confirmLabel:o.default._t("CMS.RemoveHomePageWarningLabel","Remove"),confirmColor:"danger"})&&(t=!0,this.trigger("click"),t=!1),!1}})}))},978:function(e,t,n){var r=a(n(311)),o=a(n(754)),i=a(n(141));function a(e){return e&&e.__esModule?e:{default:e}}r.default.entwine("ss.tree",(function(e){e(".cms-tree").entwine({fromDocument:{"oncontext_show.vakata":function(e){this.adjustContextClass()}},adjustContextClass:function(){var t=e("#vakata-contextmenu").find("ul ul");t.each((function(n){var r="1",o=e(t[n]).find("li").length;o>20?r="3":o>10&&(r="2"),e(t[n]).addClass("vakata-col-"+r).removeClass("right"),e(t[n]).find("li").on("mouseenter",(function(t){e(this).parent("ul").removeClass("right")}))}))},showListViewFor:function(t){localStorage.setItem("ss.pages-view-type","listview");const n=this.closest(".cms-content-view").data("url-listviewroot"),r=e.path.addSearchParams(n,{ParentID:t}),o=e("base").attr("href")||"";window.location.assign(o+r)},getTreeConfig:function(){var t=this,n=this._super();this.getHints();return n.plugins.push("contextmenu"),n.contextmenu={items:function(n){var r={edit:{label:n.hasClass("edit-disabled")?o.default._t("CMS.EditPage","Edit page",100,"Used in the context menu when right-clicking on a page node in the CMS tree"):o.default._t("CMS.ViewPage","View page",100,"Used in the context menu when right-clicking on a page node in the CMS tree"),action:function(n){e(".cms-container").entwine(".ss").loadPanel(o.default.sprintf(t.data("urlEditpage"),n.data("id")))}}};n.hasClass("nochildren")||(r.showaslist={label:o.default._t("CMS.ShowAsList"),action:function(e){t.showListViewFor(e.data("id"))}});n.data("pagetype");var i=n.data("id"),a=n.find(">a .item").data("allowedchildren"),s={},u=!1;return e.each(a,(function(n,r){u=!0,s["allowedchildren-"+r.ClassName]={label:''+r.Title,_class:"class-"+r.ClassName.replace(/[^a-zA-Z0-9\-_:.]+/g,"_"),action:function(n){e(".cms-container").entwine(".ss").loadPanel(e.path.addSearchParams(o.default.sprintf(t.data("urlAddpage"),i,r.ClassName),t.data("extraParams")))}}})),u&&(r.addsubpage={label:o.default._t("CMS.AddSubPage","Add page under this page",100,"Used in the context menu when right-clicking on a page node in the CMS tree"),submenu:s}),n.hasClass("edit-disabled")||(r.duplicate={label:o.default._t("CMS.Duplicate"),submenu:[{label:o.default._t("CMS.ThisPageOnly"),action:function(n){e(".cms-container").entwine(".ss").loadPanel(e.path.addSearchParams(o.default.sprintf(t.data("urlDuplicate"),n.data("id")),t.data("extraParams")))}},{label:o.default._t("CMS.ThisPageAndSubpages"),action:function(n){e(".cms-container").entwine(".ss").loadPanel(e.path.addSearchParams(o.default.sprintf(t.data("urlDuplicatewithchildren"),n.data("id")),t.data("extraParams")))}}]}),r}},n},canMove:async function(e){if(!(e.rslt.o.find(".homepage").first().length>0))return!0;if(e.rslt.op.data("id")===e.rslt.np.data("id"))return!0;var t=o.default._t("CMS.RemoveHomePageWarningMessage","Warning: This page is the home page. By changing the URL segment visitors will not be able to view it.");return await(0,i.default)(t,{title:o.default._t("CMS.RemoveHomePageWarningTitle","Remove your home page?"),confirmLabel:o.default._t("CMS.RemoveHomePageWarningLabel","Remove"),confirmColor:"danger"})}}),e(".cms-tree a.jstree-clicked").entwine({onmatch:function(){var e=this,t=e.parents(".cms-tree-view-sidebar");if(e.offset().top<0||e.offset().top>t.height()-e.height()){var n=e.parent();n.prev().length&&(n=n.prev()),n.get(0).scrollIntoView()}}}),e(".cms-tree-filtered .clear-filter").entwine({onclick:function(){window.location=location.protocol+"//"+location.host+location.pathname}}),e(".cms-tree .subtree-list-link").entwine({onclick:function(e){e.preventDefault(),this.closest(".cms-tree").showListViewFor(this.data("id"))}})}))},580:function(e,t,n){var r;((r=n(311))&&r.__esModule?r:{default:r}).default.entwine("ss",(function(e){const t="treeview",n="listview";e(".cms-content-header-info").entwine({"from .cms-panel":{ontoggle:function(e){var t=this.closest(".cms-content").find(e.target);0!==t.length&&this.parent()[t.hasClass("collapsed")?"addClass":"removeClass"]("collapsed")}}}),e(".cms-panel-deferred.cms-content-view").entwine({onadd:function(){if(this.data("no-ajax"))return;var e=localStorage.getItem("ss.pages-view-type")||t;this.closest(".cms-content-tools").length>0&&(e=t);const r=this.data(`url-${e}`);let o=localStorage.getItem("ss.pages-view-filtered");"string"==typeof o&&"false"===o.toLowerCase()&&(o=!1),localStorage.setItem("ss.pages-view-filtered",!1),this.data("deferredNoCache",o||e===n),this.data("url",r+location.search),this._super()}}),e(".js-injector-boot .search-holder--cms").entwine({search(e){localStorage.setItem("ss.pages-view-filtered",!0),this._super(e)}}),e(".cms .page-view-link").entwine({onclick:function(t){t.preventDefault();const r=e(this).data("view"),o=this.closest(".cms-content-view"),i=o.data(`url-${r}`),a=0!==o.closest(".cms-content-tools").length;if(localStorage.setItem("ss.pages-view-type",r),a&&r===n){const t=e("base").attr("href")||"";window.location.assign(t+o.data("url-listviewroot"))}else o.data("url",i+location.search),o.redraw()}}),e(".cms .cms-clear-filter").entwine({onclick:function(t){t.preventDefault(),window.location=e(this).prop("href")}}),e(".cms-content-toolbar").entwine({onmatch:function(){var t=this;this._super(),e.each(this.find(".cms-actions-buttons-row .tool-button"),(function(){var n=e(this),r=n.data("toolid");n.hasClass("active");void 0!==r&&(n.data("active",!1).removeClass("active"),e("#"+r).hide(),t.bindActionButtonEvents(n))}))},onunmatch:function(){var t=this;this._super(),e.each(this.find(".cms-actions-buttons-row .tool-button"),(function(){var n=e(this);t.unbindActionButtonEvents(n)}))},bindActionButtonEvents:function(e){var t=this;e.on("click.cmsContentToolbar",(function(n){t.showHideTool(e)}))},unbindActionButtonEvents:function(e){e.off(".cmsContentToolbar")},showHideTool:function(t){var n=t.data("active"),r=t.data("toolid"),o=e("#"+r);e.each(this.find(".cms-actions-buttons-row .tool-button"),(function(){var t=e(this),n=e("#"+t.data("toolid"));t.data("toolid")!==r&&(n.hide(),t.data("active",!1))})),t[n?"removeClass":"addClass"]("active"),o[n?"hide":"show"](),t.data("active",!n)}})}))},907:function(e,t,n){var r;((r=n(311))&&r.__esModule?r:{default:r}).default.entwine("ss",(function(e){e("#Form_EditForm_RedirectionType input").entwine({onmatch:function(){e(this).attr("checked")&&this.toggle(),this._super()},onunmatch:function(){this._super()},onclick:function(){this.toggle()},toggle:function(){"Internal"==e(this).attr("value")?(e("#Form_EditForm_ExternalURL_Holder").hide(),e("#Form_EditForm_LinkToID_Holder").show(),e("#Form_EditForm_LinkToFile_Holder").hide()):"External"==e(this).attr("value")?(e("#Form_EditForm_ExternalURL_Holder").show(),e("#Form_EditForm_LinkToID_Holder").hide(),e("#Form_EditForm_LinkToFile_Holder").hide()):(e("#Form_EditForm_LinkToFile_Holder").show(),e("#Form_EditForm_ExternalURL_Holder").hide(),e("#Form_EditForm_LinkToID_Holder").hide())}})}))},806:function(e,t,n){var r;((r=n(311))&&r.__esModule?r:{default:r}).default.entwine("ss",(function(e){e(".field.urlsegment:not(.readonly)").entwine({MaxPreviewLength:55,Ellipsis:"...",onmatch:function(){this.find(":text").length&&this.toggleEdit(!1),this.redraw(),this._super()},redraw:function(){var e=this.find(":text"),t=decodeURI(e.data("prefix")+e.val()),n=t;t.length>this.getMaxPreviewLength()&&(n=this.getEllipsis()+t.substr(t.length-this.getMaxPreviewLength(),t.length)),this.find(".URL-link").attr("href",encodeURI(t+e.data("suffix"))).text(n)},toggleEdit:function(e){var t=this.find(":text");this.find(".preview-holder")[e?"hide":"show"](),this.find(".edit-holder")[e?"show":"hide"](),e&&(t.data("origval",t.val()),t.focus())},update:function(){var e=this,t=this.find(":text"),n=t.data("origval"),r=arguments[0],o=r&&""!==r?r:t.val();n!=o?(this.addClass("loading"),this.suggest(o,(function(n){t.val(decodeURIComponent(n.value)),e.toggleEdit(!1),e.removeClass("loading"),e.redraw()}))):(this.toggleEdit(!1),this.redraw())},cancel:function(){var e=this.find(":text");e.val(e.data("origval")),this.toggleEdit(!1)},suggest:function(t,n){var r=this,o=r.find(":text"),i=e.path.parseUrl(r.closest("form").attr("action")),a=i.hrefNoSearch+"/field/"+o.attr("name")+"/suggest/?value="+encodeURIComponent(t);i.search&&(a+="&"+i.search.replace(/^\?/,"")),e.ajax({url:a,success:function(e){n.apply(this,arguments)},error:function(e,t){e.statusText=e.responseText},complete:function(){r.removeClass("loading")}})}}),e(".field.urlsegment .text").entwine({onkeydown:function(e){13===e.keyCode&&(e.preventDefault(),this.closest(".field").update())}}),e(".field.urlsegment .edit").entwine({onclick:function(e){e.preventDefault(),this.closest(".field").toggleEdit(!0)}}),e(".field.urlsegment .update").entwine({onclick:function(e){e.preventDefault(),this.closest(".field").update()}}),e(".field.urlsegment .cancel").entwine({onclick:function(e){e.preventDefault(),this.closest(".field").cancel()}})}))},964:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={ANCHORSELECTOR_CURRENT_FIELD:"ANCHORSELECTOR_CURRENT_FIELD",ANCHORSELECTOR_UPDATED:"ANCHORSELECTOR_UPDATED",ANCHORSELECTOR_UPDATING:"ANCHORSELECTOR_UPDATING",ANCHORSELECTOR_UPDATE_FAILED:"ANCHORSELECTOR_UPDATE_FAILED"}},447:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.beginUpdating=function(e){return{type:o.default.ANCHORSELECTOR_UPDATING,payload:{pageId:e}}},t.updateFailed=function(e){return{type:o.default.ANCHORSELECTOR_UPDATE_FAILED,payload:{pageId:e}}},t.updated=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:o.default.ANCHORSELECTOR_UPDATED,payload:{pageId:e,anchors:t,cacheResult:n}}},t.updatedCurrentField=function(e,t,n){return{type:o.default.ANCHORSELECTOR_CURRENT_FIELD,payload:{pageId:e,anchors:t,fieldID:n}}};var r,o=(r=n(964))&&r.__esModule?r:{default:r}},572:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=(n,o)=>{const i=t.payload.pageId;return(0,r.default)({pages:[...e.pages.filter((e=>e.id!==i)),{id:i,loadingState:n,anchors:o}].sort(((e,t)=>e.id-t.id))})};switch(t.type){case o.default.ANCHORSELECTOR_UPDATING:return n(i.default.UPDATING,[]);case o.default.ANCHORSELECTOR_UPDATED:{const{anchors:e,cacheResult:r}=t.payload,{SUCCESS:o,DIRTY:a}=i.default;return n(r?o:a,e)}case o.default.ANCHORSELECTOR_CURRENT_FIELD:{const{anchors:e}=t.payload;return n(i.default.FIELD_ONLY,e)}case o.default.ANCHORSELECTOR_UPDATE_FAILED:return n(i.default.FAILED,[]);default:return e}};var r=a(n(752)),o=a(n(964)),i=a(n(892));function a(e){return e&&e.__esModule?e:{default:e}}const s=(0,r.default)({pages:[]})},892:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={SUCCESS:"SUCCESS",DIRTY:"DIRTY",FIELD_ONLY:"FIELD_ONLY",UPDATING:"UPDATING",FAILED:"FAILED"}},436:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.query=t.default=t.config=void 0;var r,o=n(588);const i=((r=n(306))&&r.__esModule?r:{default:r}).default`
query ReadHistoryViewerPage ($page_id: ID!, $limit: Int!, $offset: Int!) {
readOnePage(
versioning: {
@@ -36,7 +36,7 @@ query ReadHistoryViewerPage ($page_id: ID!, $limit: Int!, $offset: Int!) {
}
}
}
-`;t.query=a;const i={options(e){let{recordId:t,limit:n,page:r}=e;return{variables:{limit:n,offset:((r||1)-1)*n,page_id:t},fetchPolicy:"network-only"}},props(e){let{data:{error:t,refetch:n,readOnePage:r,loading:o},ownProps:{actions:a={versions:{}},limit:i,recordId:s}}=e;const l=r||null;return{loading:o||!l,versions:l,graphQLErrors:t&&t.graphQLErrors&&t.graphQLErrors.map((e=>e.message)),actions:{...a,versions:{...l,goToPage(e){n({offset:((e||1)-1)*i,limit:i,page_id:s})}}}}}};t.config=i;var s=(0,o.graphql)(a,i);t.default=s},149:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.mutation=t.default=t.config=void 0;var r,o=n(588);const a=((r=n(306))&&r.__esModule?r:{default:r}).default`
+`;t.query=i;const a={options(e){let{recordId:t,limit:n,page:r}=e;return{variables:{limit:n,offset:((r||1)-1)*n,page_id:t},fetchPolicy:"network-only"}},props(e){let{data:{error:t,refetch:n,readOnePage:r,loading:o},ownProps:{actions:i={versions:{}},limit:a,recordId:s}}=e;const u=r||null;return{loading:o||!u,versions:u,graphQLErrors:t&&t.graphQLErrors&&t.graphQLErrors.map((e=>e.message)),actions:{...i,versions:{...u,goToPage(e){n({offset:((e||1)-1)*a,limit:a,page_id:s})}}}}}};t.config=a;var s=(0,o.graphql)(i,a);t.default=s},149:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.mutation=t.default=t.config=void 0;var r,o=n(588);const i=((r=n(306))&&r.__esModule?r:{default:r}).default`
mutation rollbackPage($id:ID!, $toVersion:Int!) {
rollbackPage(
id: $id
@@ -45,4 +45,4 @@ mutation rollbackPage($id:ID!, $toVersion:Int!) {
id
}
}
-`;t.mutation=a;const i={props:e=>{let{mutate:t,ownProps:{actions:n}}=e;const r=(e,n)=>t({variables:{id:e,toVersion:n}});return{actions:{...n,rollbackPage:r,revertToVersion:r}}},options:{refetchQueries:["ReadHistoryViewerPage"]}};t.config=i;var s=(0,o.graphql)(a,i);t.default=s},679:function(e,t,n){var r=n(864),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?i:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=i;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var i=c(n);d&&(i=i.concat(d(n)));for(var s=l(t),v=l(n),m=0;m=p){var t=console[e]||console.log;return t.apply(console,arguments)}}}!function(e){e.debug=h("debug"),e.log=h("log"),e.warn=h("warn"),e.error=h("error")}(d||(d={}));function v(e){try{return e()}catch(e){}}var m=v((function(){return globalThis}))||v((function(){return window}))||v((function(){return self}))||v((function(){return global}))||v((function(){return v.constructor("return this")()})),g="__",b=[g,g].join("DEV");var y=function(){try{return Boolean(__DEV__)}catch(e){return Object.defineProperty(m,b,{value:"production"!==v((function(){return"production"})),enumerable:!1,configurable:!0,writable:!0}),m[b]}}();function _(e){try{return e()}catch(e){}}var w=_((function(){return globalThis}))||_((function(){return window}))||_((function(){return self}))||_((function(){return global}))||_((function(){return _.constructor("return this")()})),C=!1;function S(){C&&(delete w.process,C=!1)}!w||_((function(){return"production"}))||_((function(){return process}))||(Object.defineProperty(w,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),C=!0);class O{constructor(e,t="GraphQL request",n={line:1,column:1}){var r;"string"==typeof e||devAssert(!1,`Body must be a string. Received: ${e,formatValue(r,[])}.`),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||devAssert(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||devAssert(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}var E;S(),__DEV__?d("boolean"==typeof y,y):d("boolean"==typeof y,38),function(e){e[e.Query=0]="Query",e[e.Mutation=1]="Mutation",e[e.Subscription=2]="Subscription"}(E||(E={}));var P=new Map;function R(e){var t;switch(e){case E.Query:t="Query";break;case E.Mutation:t="Mutation";break;case E.Subscription:t="Subscription"}return t}function D(e){var t,n,r=P.get(e);if(r)return r;__DEV__?d(!!e&&!!e.kind,"Argument of ".concat(e," passed to parser was not a valid GraphQL ")+"DocumentNode. You may need to use 'graphql-tag' or another method to convert your operation into a document"):d(!!e&&!!e.kind,32);for(var o=[],a=[],i=[],s=[],l=0,u=e.definitions;l=0}))||!1,V=L&&!N,U=!1,H=T.useSyncExternalStore||function(e,t,n){var r=t();__DEV__&&!U&&r!==t()&&(U=!0,__DEV__&&d.error("The result of getSnapshot should be cached to avoid an infinite loop"));var o=j.useState({inst:{value:r,getSnapshot:t}}),a=o[0].inst,i=o[1];return V?j.useLayoutEffect((function(){Object.assign(a,{value:r,getSnapshot:t}),Q(a)&&i({inst:a})}),[e,r,t]):Object.assign(a,{value:r,getSnapshot:t}),j.useEffect((function(){return Q(a)&&i({inst:a}),e((function(){Q(a)&&i({inst:a})}))}),[e]),r};function Q(e){var t=e.value,n=e.getSnapshot;try{return t!==n()}catch(e){return!0}}var q=Object.prototype,$=q.toString,W=q.hasOwnProperty,B=Function.prototype.toString,G=new Map;function Y(e,t){try{return z(e,t)}finally{G.clear()}}function z(e,t){if(e===t)return!0;var n,r,o,a=$.call(e);if(a!==$.call(t))return!1;switch(a){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(Z(e,t))return!0;var i=X(e),s=X(t),l=i.length;if(l!==s.length)return!1;for(var u=0;u=0&&n.indexOf(r,o)===o))}return!1}function X(e){return Object.keys(e).filter(J,e)}function J(e){return void 0!==this[e]}var K="{ [native code] }";function Z(e,t){var n=G.get(e);if(n){if(n.has(t))return!0}else G.set(e,n=new Set);return n.add(t),!1}function ee(){for(var e=[],t=0;t0}var ae,ie=function(e){function t(n){var r,o,a=n.graphQLErrors,i=n.clientErrors,s=n.networkError,l=n.errorMessage,u=n.extraInfo,c=e.call(this,l)||this;return c.graphQLErrors=a||[],c.clientErrors=i||[],c.networkError=s||null,c.message=l||(o="",(oe((r=c).graphQLErrors)||oe(r.clientErrors))&&(r.graphQLErrors||[]).concat(r.clientErrors||[]).forEach((function(e){var t=e?e.message:"Error message not found.";o+="".concat(t,"\n")})),r.networkError&&(o+="".concat(r.networkError.message,"\n")),o=o.replace(/\n$/,"")),c.extraInfo=u,c.__proto__=t.prototype,c}return o(t,e),t}(Error);function se(e){var t=(0,j.useContext)(re()),n=e||t.client;return __DEV__?d(!!n,'Could not find "client" in the context or passed in as an option. Wrap the root component in an , or pass an ApolloClient instance in via options.'):d(!!n,31),n}function le(e){return null!==e&&"object"==typeof e}function ue(e){var t=new Set([e]);return t.forEach((function(e){le(e)&&function(e){if(__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(e){if(e instanceof TypeError)return null;throw e}return e}(e)===e&&Object.getOwnPropertyNames(e).forEach((function(n){le(e[n])&&t.add(e[n])}))})),e}function ce(e){return __DEV__&&ue(e),e}!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(ae||(ae={}));var de=Object.prototype.hasOwnProperty;function fe(e,t){return void 0===t&&(t=Object.create(null)),function(e,t){var n=(0,j.useRef)();n.current&&e===n.current.client&&t===n.current.query||(n.current=new pe(e,t,n.current));var r=n.current,o=(0,j.useState)(0),a=(o[0],o[1]);return r.forceUpdate=function(){a((function(e){return e+1}))},r}(se(t.client),e).useQuery(t)}var pe=function(){function e(e,t,n){this.client=e,this.query=t,this.asyncResolveFns=new Set,this.optionsToIgnoreOnce=new(x?WeakSet:Set),this.ssrDisabledResult=ce({loading:!0,data:void 0,error:void 0,networkStatus:ae.loading}),this.skipStandbyResult=ce({loading:!1,data:void 0,error:void 0,networkStatus:ae.ready}),this.toQueryResultCache=new(I?WeakMap:Map),F(t,E.Query);var r=n&&n.result,o=r&&r.data;o&&(this.previousData=o)}return e.prototype.forceUpdate=function(){__DEV__&&d.warn("Calling default no-op implementation of InternalState#forceUpdate")},e.prototype.asyncUpdate=function(){var e=this;return new Promise((function(t){e.asyncResolveFns.add(t),e.optionsToIgnoreOnce.add(e.watchQueryOptions),e.forceUpdate()}))},e.prototype.useQuery=function(e){var t=this;this.renderPromises=(0,j.useContext)(re()).renderPromises,this.useOptions(e);var n=this.useObservableQuery(),r=H((0,j.useCallback)((function(){if(t.renderPromises)return function(){};var e=function(){var e=t.result,r=n.getCurrentResult();e&&e.loading===r.loading&&e.networkStatus===r.networkStatus&&Y(e.data,r.data)||t.setResult(r)},r=function(a){var i=n.last;o.unsubscribe();try{n.resetLastResults(),o=n.subscribe(e,r)}finally{n.last=i}if(!de.call(a,"graphQLErrors"))throw a;var s=t.result;(!s||s&&s.loading||!Y(a,s.error))&&t.setResult({data:s&&s.data,error:a,loading:!1,networkStatus:ae.error})},o=n.subscribe(e,r);return function(){return o.unsubscribe()}}),[n,this.renderPromises,this.client.disableNetworkFetches]),(function(){return t.getCurrentResult()}),(function(){return t.getCurrentResult()}));this.unsafeHandlePartialRefetch(r);var o=this.toQueryResult(r);return!o.loading&&this.asyncResolveFns.size&&(this.asyncResolveFns.forEach((function(e){return e(o)})),this.asyncResolveFns.clear()),o},e.prototype.useOptions=function(t){var n,r=this.createWatchQueryOptions(this.queryHookOptions=t),o=this.watchQueryOptions;!this.optionsToIgnoreOnce.has(o)&&Y(r,o)||(this.watchQueryOptions=r,o&&this.observable&&(this.optionsToIgnoreOnce.delete(o),this.observable.reobserve(this.getObsQueryOptions()),this.previousData=(null===(n=this.result)||void 0===n?void 0:n.data)||this.previousData,this.result=void 0)),this.onCompleted=t.onCompleted||e.prototype.onCompleted,this.onError=t.onError||e.prototype.onError,!this.renderPromises&&!this.client.disableNetworkFetches||!1!==this.queryHookOptions.ssr||this.queryHookOptions.skip?this.queryHookOptions.skip||"standby"===this.watchQueryOptions.fetchPolicy?this.result=this.skipStandbyResult:this.result!==this.ssrDisabledResult&&this.result!==this.skipStandbyResult||(this.result=void 0):this.result=this.ssrDisabledResult},e.prototype.getObsQueryOptions=function(){var e=[],t=this.client.defaultOptions.watchQuery;return t&&e.push(t),this.queryHookOptions.defaultOptions&&e.push(this.queryHookOptions.defaultOptions),e.push(ee(this.observable&&this.observable.options,this.watchQueryOptions)),e.reduce(te)},e.prototype.createWatchQueryOptions=function(e){var t;void 0===e&&(e={});var n=e.skip,r=(e.ssr,e.onCompleted,e.onError,e.defaultOptions,i(e,["skip","ssr","onCompleted","onError","defaultOptions"])),o=Object.assign(r,{query:this.query});if(!this.renderPromises||"network-only"!==o.fetchPolicy&&"cache-and-network"!==o.fetchPolicy||(o.fetchPolicy="cache-first"),o.variables||(o.variables={}),n){var a=o.fetchPolicy,s=void 0===a?this.getDefaultFetchPolicy():a,l=o.initialFetchPolicy,u=void 0===l?s:l;Object.assign(o,{initialFetchPolicy:u,fetchPolicy:"standby"})}else o.fetchPolicy||(o.fetchPolicy=(null===(t=this.observable)||void 0===t?void 0:t.options.initialFetchPolicy)||this.getDefaultFetchPolicy());return o},e.prototype.getDefaultFetchPolicy=function(){var e,t;return(null===(e=this.queryHookOptions.defaultOptions)||void 0===e?void 0:e.fetchPolicy)||(null===(t=this.client.defaultOptions.watchQuery)||void 0===t?void 0:t.fetchPolicy)||"cache-first"},e.prototype.onCompleted=function(e){},e.prototype.onError=function(e){},e.prototype.useObservableQuery=function(){var e=this.observable=this.renderPromises&&this.renderPromises.getSSRObservable(this.watchQueryOptions)||this.observable||this.client.watchQuery(this.getObsQueryOptions());this.obsQueryFields=(0,j.useMemo)((function(){return{refetch:e.refetch.bind(e),reobserve:e.reobserve.bind(e),fetchMore:e.fetchMore.bind(e),updateQuery:e.updateQuery.bind(e),startPolling:e.startPolling.bind(e),stopPolling:e.stopPolling.bind(e),subscribeToMore:e.subscribeToMore.bind(e)}}),[e]);var t=!(!1===this.queryHookOptions.ssr||this.queryHookOptions.skip);return this.renderPromises&&t&&(this.renderPromises.registerSSRObservable(e),e.getCurrentResult().loading&&this.renderPromises.addObservableQueryPromise(e)),e},e.prototype.setResult=function(e){var t=this.result;t&&t.data&&(this.previousData=t.data),this.result=e,this.forceUpdate(),this.handleErrorOrCompleted(e)},e.prototype.handleErrorOrCompleted=function(e){var t=this;e.loading||Promise.resolve().then((function(){e.error?t.onError(e.error):e.data&&t.onCompleted(e.data)})).catch((function(e){__DEV__&&d.warn(e)}))},e.prototype.getCurrentResult=function(){return this.result||this.handleErrorOrCompleted(this.result=this.observable.getCurrentResult()),this.result},e.prototype.toQueryResult=function(e){var t=this.toQueryResultCache.get(e);if(t)return t;var n=e.data,r=(e.partial,i(e,["data","partial"]));return this.toQueryResultCache.set(e,t=a(a(a({data:n},r),this.obsQueryFields),{client:this.client,observable:this.observable,variables:this.observable.variables,called:!this.queryHookOptions.skip,previousData:this.previousData})),!t.error&&oe(e.errors)&&(t.error=new ie({graphQLErrors:e.errors})),t},e.prototype.unsafeHandlePartialRefetch=function(e){!e.partial||!this.queryHookOptions.partialRefetch||e.loading||e.data&&0!==Object.keys(e.data).length||"cache-only"===this.observable.options.fetchPolicy||(Object.assign(e,{loading:!0,networkStatus:ae.refetch}),this.observable.refetch())},e}();function he(e){var t=e.children,n=fe(e.query,i(e,["children","query"]));return n?t(n):null}he.propTypes={client:A.object,children:A.func.isRequired,fetchPolicy:A.string,notifyOnNetworkStatusChange:A.bool,onCompleted:A.func,onError:A.func,pollInterval:A.number,query:A.object.isRequired,variables:A.object,ssr:A.bool,partialRefetch:A.bool,returnPartialData:A.bool};var ve=function(){return{}},me=function(){return!1};function ge(e){return e.displayName||e.name||"Component"}function be(e,t){for(var n={},r=0,o=e.variables;r0&&(c.variables=be(n,l)),j.createElement(he,a({},c,{displayName:s,skip:u,query:e}),(function(e){e.client;var n,s,c=e.data,d=i(e,["client","data"]);if(t.withRef&&(o.withRef=!0,l=Object.assign({},l,{ref:o.setWrappedInstance})),u)return j.createElement(r,a({},l,{}));var f=Object.assign(d,c||{}),h=t.name||"data",v=((n={})[h]=f,n);if(t.props){var m=((s={})[h]=f,s.ownProps=l,s);v=p=t.props(m,p)}return j.createElement(r,a({},l,v))}))},u.displayName=s,u.WrappedComponent=r,u}(ye);return k(l,r,{})}}function we(e){var t=function(e,t){var n=se(null==t?void 0:t.client);F(e,E.Mutation);var r=(0,j.useState)({called:!1,loading:!1,client:n}),o=r[0],i=r[1],s=(0,j.useRef)({result:o,mutationId:0,isMounted:!0,client:n,mutation:e,options:t});Object.assign(s.current,{client:n,options:t,mutation:e});var l=(0,j.useCallback)((function(e){void 0===e&&(e={});var t=s.current,n=t.client,r=t.options,o=t.mutation,l=a(a({},r),{mutation:o});s.current.result.loading||l.ignoreResults||!s.current.isMounted||i(s.current.result={loading:!0,error:void 0,data:void 0,called:!0,client:n});var u=++s.current.mutationId,c=te(l,e);return n.mutate(c).then((function(t){var r,o,a,l=t.data,d=t.errors,f=d&&d.length>0?new ie({graphQLErrors:d}):void 0;if(u===s.current.mutationId&&!c.ignoreResults){var p={called:!0,loading:!1,data:l,error:f,client:n};s.current.isMounted&&!Y(s.current.result,p)&&i(s.current.result=p)}return null===(o=null===(r=s.current.options)||void 0===r?void 0:r.onCompleted)||void 0===o||o.call(r,t.data,c),null===(a=e.onCompleted)||void 0===a||a.call(e,t.data,c),t})).catch((function(t){var r,o,a,l;if(u===s.current.mutationId&&s.current.isMounted){var d={loading:!1,error:t,data:void 0,called:!0,client:n};Y(s.current.result,d)||i(s.current.result=d)}if((null===(r=s.current.options)||void 0===r?void 0:r.onError)||c.onError)return null===(a=null===(o=s.current.options)||void 0===o?void 0:o.onError)||void 0===a||a.call(o,t,c),null===(l=e.onError)||void 0===l||l.call(e,t,c),{data:void 0,errors:t};throw t}))}),[]),u=(0,j.useCallback)((function(){s.current.isMounted&&i({called:!1,loading:!1,client:n})}),[]);return(0,j.useEffect)((function(){return s.current.isMounted=!0,function(){s.current.isMounted=!1}}),[]),[l,a({reset:u},o)]}(e.mutation,e),n=t[0],r=t[1];return e.children?e.children(n,r):null}function Ce(e,t){void 0===t&&(t={});var n=D(e),r=t.options,s=void 0===r?ve:r,l=t.alias,u=void 0===l?"Apollo":l,c=s;return"function"!=typeof c&&(c=function(){return s}),function(r){var s="".concat(u,"(").concat(ge(r),")"),l=function(l){function u(){return null!==l&&l.apply(this,arguments)||this}return o(u,l),u.prototype.render=function(){var o=this.props,s=c(o);return t.withRef&&(this.withRef=!0,o=Object.assign({},o,{ref:this.setWrappedInstance})),!s.variables&&n.variables.length>0&&(s.variables=be(n,o)),j.createElement(we,a({ignoreResults:!0},s,{mutation:e}),(function(e,n){var s,l,u=n.data,c=i(n,["data"]),d=Object.assign(c,u||{}),f=t.name||"mutate",p=t.name?"".concat(f,"Result"):"result",h=((s={})[f]=e,s[p]=d,s);if(t.props){var v=((l={})[f]=e,l[p]=d,l.ownProps=o,l);h=t.props(v)}return j.createElement(r,a({},o,h))}))},u.displayName=s,u.WrappedComponent=r,u}(ye);return k(l,r,{})}}function Se(e){var t=function(e,t){var n=(0,j.useRef)(!1),r=se(null==t?void 0:t.client);F(e,E.Subscription);var o=(0,j.useState)({loading:!(null==t?void 0:t.skip),error:void 0,data:void 0,variables:null==t?void 0:t.variables}),a=o[0],i=o[1];n.current||(n.current=!0,(null==t?void 0:t.onSubscriptionData)&&__DEV__&&d.warn(t.onData?"'useSubscription' supports only the 'onSubscriptionData' or 'onData' option, but not both. Only the 'onData' option will be used.":"'onSubscriptionData' is deprecated and will be removed in a future major version. Please use the 'onData' option instead."),(null==t?void 0:t.onSubscriptionComplete)&&__DEV__&&d.warn(t.onComplete?"'useSubscription' supports only the 'onSubscriptionComplete' or 'onComplete' option, but not both. Only the 'onComplete' option will be used.":"'onSubscriptionComplete' is deprecated and will be removed in a future major version. Please use the 'onComplete' option instead."));var s=(0,j.useState)((function(){return(null==t?void 0:t.skip)?null:r.subscribe({query:e,variables:null==t?void 0:t.variables,fetchPolicy:null==t?void 0:t.fetchPolicy,context:null==t?void 0:t.context})})),l=s[0],u=s[1],c=(0,j.useRef)(!1);(0,j.useEffect)((function(){return function(){c.current=!0}}),[]);var f=(0,j.useRef)({client:r,subscription:e,options:t});return(0,j.useEffect)((function(){var n,o,a,s,l=null==t?void 0:t.shouldResubscribe;"function"==typeof l&&(l=!!l(t)),(null==t?void 0:t.skip)?(!(null==t?void 0:t.skip)!=!(null===(n=f.current.options)||void 0===n?void 0:n.skip)||c.current)&&(i({loading:!1,data:void 0,error:void 0,variables:null==t?void 0:t.variables}),u(null),c.current=!1):(!1===l||r===f.current.client&&e===f.current.subscription&&(null==t?void 0:t.fetchPolicy)===(null===(o=f.current.options)||void 0===o?void 0:o.fetchPolicy)&&!(null==t?void 0:t.skip)==!(null===(a=f.current.options)||void 0===a?void 0:a.skip)&&Y(null==t?void 0:t.variables,null===(s=f.current.options)||void 0===s?void 0:s.variables))&&!c.current||(i({loading:!0,data:void 0,error:void 0,variables:null==t?void 0:t.variables}),u(r.subscribe({query:e,variables:null==t?void 0:t.variables,fetchPolicy:null==t?void 0:t.fetchPolicy,context:null==t?void 0:t.context})),c.current=!1),Object.assign(f.current,{client:r,subscription:e,options:t})}),[r,e,t,c.current]),(0,j.useEffect)((function(){if(l){var e=l.subscribe({next:function(e){var n,o,a={loading:!1,data:e.data,error:void 0,variables:null==t?void 0:t.variables};i(a),(null===(n=f.current.options)||void 0===n?void 0:n.onData)?f.current.options.onData({client:r,data:a}):(null===(o=f.current.options)||void 0===o?void 0:o.onSubscriptionData)&&f.current.options.onSubscriptionData({client:r,subscriptionData:a})},error:function(e){var n,r;i({loading:!1,data:void 0,error:e,variables:null==t?void 0:t.variables}),null===(r=null===(n=f.current.options)||void 0===n?void 0:n.onError)||void 0===r||r.call(n,e)},complete:function(){var e,t;(null===(e=f.current.options)||void 0===e?void 0:e.onComplete)?f.current.options.onComplete():(null===(t=f.current.options)||void 0===t?void 0:t.onSubscriptionComplete)&&f.current.options.onSubscriptionComplete()}});return function(){e.unsubscribe()}}}),[l]),a}(e.subscription,e);return e.children&&t?e.children(t):null}function Oe(e,t){void 0===t&&(t={});var n=D(e),r=t.options,s=void 0===r?ve:r,l=t.skip,u=void 0===l?me:l,c=t.alias,d=void 0===c?"Apollo":c,f=t.shouldResubscribe,p=s;"function"!=typeof p&&(p=function(){return s});var h,v=u;return"function"!=typeof v&&(v=function(){return u}),function(r){var s="".concat(d,"(").concat(ge(r),")"),l=function(l){function u(e){var t=l.call(this,e)||this;return t.state={resubscribe:!1},t}return o(u,l),u.prototype.updateResubscribe=function(e){this.setState({resubscribe:e})},u.prototype.componentDidUpdate=function(e){var t=!(!f||!f(e,this.props));this.state.resubscribe!==t&&this.updateResubscribe(t)},u.prototype.render=function(){var o=this,l=this.props,u=v(l),c=u?Object.create(null):p(l);return!u&&!c.variables&&n.variables.length>0&&(c.variables=be(n,l)),j.createElement(Se,a({},c,{displayName:s,skip:u,subscription:e,shouldResubscribe:this.state.resubscribe}),(function(e){var n,s,c=e.data,d=i(e,["data"]);if(t.withRef&&(o.withRef=!0,l=Object.assign({},l,{ref:o.setWrappedInstance})),u)return j.createElement(r,a({},l,{}));var f=Object.assign(d,c||{}),p=t.name||"data",v=((n={})[p]=f,n);if(t.props){var m=((s={})[p]=f,s.ownProps=l,s);v=h=t.props(m,h)}return j.createElement(r,a({},l,v))}))},u.displayName=s,u.WrappedComponent=r,u}(ye);return k(l,r,{})}}function Ee(e,t){switch(void 0===t&&(t={}),D(e).type){case E.Mutation:return Ce(e,t);case E.Subscription:return Oe(e,t);case E.Query:default:return _e(e,t)}}we.propTypes={mutation:A.object.isRequired,variables:A.object,optimisticResponse:A.oneOfType([A.object,A.func]),refetchQueries:A.oneOfType([A.arrayOf(A.oneOfType([A.string,A.object])),A.func]),awaitRefetchQueries:A.bool,update:A.func,children:A.func.isRequired,onCompleted:A.func,onError:A.func,fetchPolicy:A.string},Se.propTypes={subscription:A.object.isRequired,variables:A.object,children:A.func,onSubscriptionData:A.func,onData:A.func,onSubscriptionComplete:A.func,onComplete:A.func,shouldResubscribe:A.oneOfType([A.func,A.bool])};var Pe=function(e){var t=re();return j.createElement(t.Consumer,null,(function(t){return __DEV__?d(t&&t.client,'Could not find "client" in the context of ApolloConsumer. Wrap the root component in an .'):d(t&&t.client,27),e.children(t.client)}))};function Re(e,t){void 0===t&&(t={});var n="withApollo(".concat(function(e){return e.displayName||e.name||"Component"}(e),")"),r=function(r){function i(e){var t=r.call(this,e)||this;return t.setWrappedInstance=t.setWrappedInstance.bind(t),t}return o(i,r),i.prototype.getWrappedInstance=function(){return __DEV__?d(t.withRef,"To access the wrapped instance, you need to specify { withRef: true } in the options"):d(t.withRef,30),this.wrappedInstance},i.prototype.setWrappedInstance=function(e){this.wrappedInstance=e},i.prototype.render=function(){var n=this;return j.createElement(Pe,null,(function(r){var o=Object.assign({},n.props,{client:r,ref:t.withRef?n.setWrappedInstance:void 0});return j.createElement(e,a({},o))}))},i.displayName=n,i.WrappedComponent=e,i}(j.Component);return k(r,e,{})}}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={exports:{}};return n[e](a,a.exports,o),a.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var a=Object.create(null);o.r(a);var i={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&n;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((function(e){i[e]=function(){return n[e]}}));return i.default=function(){return n},o.d(a,i),a},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o(554),o(649),o(580),o(978),o(907),o(806),o(274)}();
\ No newline at end of file
+`;t.mutation=i;const a={props:e=>{let{mutate:t,ownProps:{actions:n}}=e;const r=(e,n)=>t({variables:{id:e,toVersion:n}});return{actions:{...n,rollbackPage:r,revertToVersion:r}}},options:{refetchQueries:["ReadHistoryViewerPage"]}};t.config=a;var s=(0,o.graphql)(i,a);t.default=s},679:function(e,t,n){var r=n(864),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var l=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var a=c(n);d&&(a=a.concat(d(n)));for(var s=u(t),m=u(n),v=0;ve.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?_(L,--D):0,I--,10===F&&(I=1,k--),F}function j(){return F=D2||$(F)>3?"":" "}function Q(e,t){for(;--t&&j()&&!(F<48||F>102||F>57&&F<65||F>70&&F<97););return U(e,H()+(t<6&&32==N()&&32==j()))}function G(e){for(;j();)switch(F){case e:return D;case 34:case 39:34!==e&&39!==e&&G(F);break;case 40:41===e&&G(e);break;case 92:j()}return D}function Y(e,t){for(;j()&&e+F!==57&&(e+F!==84||47!==N()););return"/*"+U(t,D-1)+"*"+y(47===e?e:j())}function X(e){for(;!$(N());)j();return U(e,D)}var K="-ms-",Z="-moz-",J="-webkit-",ee="comm",te="rule",ne="decl",re="@keyframes";function oe(e,t){for(var n="",r=x(e),o=0;o0&&P(k)-d&&R(p>32?ce(k+";",r,n,d-1):ce(C(k," ","")+";",r,n,d-2),u);break;case 59:k+=";";default:if(R(x=ue(k,t,n,l,c,o,s,w,O=[],E=[],d),i),123===b)if(0===c)se(k,t,x,x,O,i,d,s,E);else switch(99===f&&110===_(k,3)?100:f){case 100:case 109:case 115:se(e,x,x,r&&R(ue(e,x,x,0,0,o,s,w,o,O=[],d),E),o,E,d,s,r?O:E);break;default:se(k,x,x,x,[""],E,0,s,E)}}l=c=p=0,m=g=1,w=k="",d=a;break;case 58:d=1+P(k),p=h;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==A())continue;switch(k+=y(b),b*m){case 38:g=c>0?1:(k+="\f",-1);break;case 44:s[l++]=(P(k)-1)*g,g=1;break;case 64:45===N()&&(k+=B(j())),f=N(),c=d=P(w=k+=X(H())),b++;break;case 45:45===h&&2==P(k)&&(m=0)}}return i}function ue(e,t,n,r,o,i,a,s,u,l,c){for(var d=o-1,f=0===o?i:[""],p=x(f),h=0,m=0,v=0;h0?f[g]+" "+y:C(y,/&\f/g,f[g])))&&(u[v++]=w);return T(e,t,n,0===o?te:s,u,l,c)}function le(e,t,n){return T(e,t,n,ee,y(F),E(e,2,-2),0)}function ce(e,t,n,r){return T(e,t,n,ne,E(e,0,r),E(e,r+1,-1),r)}var de=function(e,t,n){for(var r=0,o=0;r=o,o=N(),38===r&&12===o&&(t[n]=1),!$(o);)j();return U(e,D)},fe=function(e,t){return W(function(e,t){var n=-1,r=44;do{switch($(r)){case 0:38===r&&12===N()&&(t[n]=1),e[n]+=de(D-1,t,n);break;case 2:e[n]+=B(r);break;case 4:if(44===r){e[++n]=58===N()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=y(r)}}while(r=j());return e}(z(e),t))},pe=new WeakMap,he=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||pe.get(n))&&!r){pe.set(e,!0);for(var o=[],i=fe(t,o),a=n.props,s=0,u=0;s6)switch(_(e,t+1)){case 109:if(45!==_(e,t+4))break;case 102:return C(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1-moz-"+(108==_(e,t+3)?"$3":"$2-$3"))+e;case 115:return~S(e,"stretch")?ve(C(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==_(e,t+1))break;case 6444:switch(_(e,P(e)-3-(~S(e,"!important")&&10))){case 107:return C(e,":",":-webkit-")+e;case 101:return C(e,/(.+:)([^;!]+)(;|!.+)?/,"$1-webkit-"+(45===_(e,14)?"inline-":"")+"box$3$1"+"-webkit-$2$3$1"+"-ms-$2box$3")+e}break;case 5936:switch(_(e,t+11)){case 114:return J+e+K+C(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return J+e+K+C(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return J+e+K+C(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return J+e+K+e+e}return e}var ge=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case ne:e.return=ve(e.value,e.length);break;case re:return oe([V(e,{value:C(e.value,"@","@-webkit-")})],r);case te:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return oe([V(e,{props:[C(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return oe([V(e,{props:[C(t,/:(plac\w+)/,":-webkit-input-$1")]}),V(e,{props:[C(t,/:(plac\w+)/,":-moz-$1")]}),V(e,{props:[C(t,/:(plac\w+)/,"-ms-input-$1")]})],r)}return""}))}}],be=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r=e.stylisPlugins||ge;var o,i,a={},s=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},Se={animationIterationCount: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};var _e=/[A-Z]|^ms/g,Ee=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Pe=function(e){return 45===e.charCodeAt(1)},xe=function(e){return null!=e&&"boolean"!=typeof e},Re=function(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return Pe(e)?e:e.replace(_e,"-$&").toLowerCase()})),ke=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Ee,(function(e,t,n){return Me={name:t,styles:n,next:Me},t}))}return 1===Se[e]||Pe(e)||"number"!=typeof t||0===t?t:t+"px"};function Ie(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Me={name:n.name,styles:n.styles,next:Me},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)Me={name:r.name,styles:r.styles,next:Me},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Ke(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||m(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.")}()}var Ze=n(394);Math.min,Math.max;const Je=["top","right","bottom","left"];Je.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);function et(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function tt(e){if(null==e)return window;if(!et(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function nt(e){return tt(e).getComputedStyle(e)}function rt(e){return et(e)?"":e?(e.nodeName||"").toLowerCase():""}function ot(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function it(e){return e instanceof tt(e).HTMLElement}function at(e){return e instanceof tt(e).Element}function st(e){return"undefined"!=typeof ShadowRoot&&(e instanceof tt(e).ShadowRoot||e instanceof ShadowRoot)}function ut(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=nt(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(o)}function lt(){return!/^((?!chrome|android).)*safari/i.test(ot())}function ct(e){return["html","body","#document"].includes(rt(e))}Math.min,Math.max;const dt=Math.round;function ft(e,t,n){var r,o,i,a;void 0===t&&(t=!1),void 0===n&&(n=!1);const s=e.getBoundingClientRect();let u=1,l=1;t&&it(e)&&(u=e.offsetWidth>0&&dt(s.width)/e.offsetWidth||1,l=e.offsetHeight>0&&dt(s.height)/e.offsetHeight||1);const c=at(e)?tt(e):window,d=!lt()&&n,f=(s.left+(d&&null!=(r=null==(o=c.visualViewport)?void 0:o.offsetLeft)?r:0))/u,p=(s.top+(d&&null!=(i=null==(a=c.visualViewport)?void 0:a.offsetTop)?i:0))/l,h=s.width/u,m=s.height/l;return{width:h,height:m,top:p,right:f+h,bottom:p+m,left:f,x:f,y:p}}function pt(e){return(t=e,(t instanceof tt(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function ht(e){return"html"===rt(e)?e:e.assignedSlot||e.parentNode||(st(e)?e.host:null)||pt(e)}function mt(e){const t=ht(e);return ct(t)?e.ownerDocument.body:it(t)&&ut(t)?t:mt(t)}function vt(e,t){var n;void 0===t&&(t=[]);const r=mt(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=tt(r),a=o?[i].concat(i.visualViewport||[],ut(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(vt(a))}var gt=o.useLayoutEffect,bt=["className","clearValue","cx","getStyles","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],yt=function(){};function wt(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function Ot(e,t,n){var r=[n];if(t&&e)for(var o in t)t.hasOwnProperty(o)&&t[o]&&r.push("".concat(wt(e,o)));return r.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var Ct=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===d(e)&&null!==e?[e]:[];var t},St=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,s({},Xe(e,bt))};function _t(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Et(e){return _t(e)?window.pageYOffset:e.scrollTop}function Pt(e,t){_t(e)?window.scrollTo(0,t):e.scrollTop=t}function xt(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function Rt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:yt,o=Et(e),i=t-o,a=10,s=0;function u(){var t=xt(s+=a,o,i,n);Pt(e,t),sn.bottom?Pt(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o=h)return{placement:"bottom",maxHeight:t};if(_>=h&&!a)return i&&Rt(u,E,x),{placement:"bottom",maxHeight:t};if(!a&&_>=r||a&&C>=r)return i&&Rt(u,E,x),{placement:"bottom",maxHeight:a?C-y:_-y};if("auto"===o||a){var R=t,k=a?O:S;return k>=r&&(R=Math.min(k-y-s.controlHeight,t)),{placement:"top",maxHeight:R}}if("bottom"===o)return i&&Pt(u,E),{placement:"bottom",maxHeight:t};break;case"top":if(O>=h)return{placement:"top",maxHeight:t};if(S>=h&&!a)return i&&Rt(u,P,x),{placement:"top",maxHeight:t};if(!a&&S>=r||a&&O>=r){var I=t;return(!a&&S>=r||a&&O>=r)&&(I=a?O-w:S-w),i&&Rt(u,P,x),{placement:"top",maxHeight:I}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return l}var jt=function(e){return"auto"===e?"bottom":e},Nt=(0,o.createContext)(null),Ht=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,i=e.menuPlacement,a=e.menuPosition,u=e.menuShouldScrollIntoView,l=e.theme,c=((0,o.useContext)(Nt)||{}).setPortalPlacement,d=(0,o.useRef)(null),f=Ke((0,o.useState)(r),2),p=f[0],h=f[1],m=Ke((0,o.useState)(null),2),v=m[0],g=m[1];return gt((function(){var e=d.current;if(e){var t="fixed"===a,o=At({maxHeight:r,menuEl:e,minHeight:n,placement:i,shouldScroll:u&&!t,isFixedPosition:t,theme:l});h(o.maxHeight),g(o.placement),null==c||c(o.placement)}}),[r,i,a,u,n,c,l]),t({ref:d,placerProps:s(s({},e),{},{placement:v||jt(i),maxHeight:p})})},Ut=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:"".concat(2*n,"px ").concat(3*n,"px"),textAlign:"center"}},$t=Ut,zt=Ut,Wt=function(e){var t=e.children,n=e.className,o=e.cx,i=e.getStyles,a=e.innerProps;return We("div",r({css:i("noOptionsMessage",e),className:o({"menu-notice":!0,"menu-notice--no-options":!0},n)},a),t)};Wt.defaultProps={children:"No options"};var Bt=function(e){var t=e.children,n=e.className,o=e.cx,i=e.getStyles,a=e.innerProps;return We("div",r({css:i("loadingMessage",e),className:o({"menu-notice":!0,"menu-notice--loading":!0},n)},a),t)};Bt.defaultProps={children:"Loading..."};var qt,Qt=["size"];var Gt,Yt,Xt={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Kt=function(e){var t=e.size,n=Xe(e,Qt);return We("svg",r({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Xt},n))},Zt=function(e){return We(Kt,r({size:20},e),We("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Jt=function(e){return We(Kt,r({size:20},e),We("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},en=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{label:"indicatorContainer",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},tn=en,nn=en,rn=function(){var e=Be.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(qt||(Gt=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],Yt||(Yt=Gt.slice(0)),qt=Object.freeze(Object.defineProperties(Gt,{raw:{value:Object.freeze(Yt)}})))),on=function(e){var t=e.delay,n=e.offset;return We("span",{css:Be({animation:"".concat(rn," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},an=function(e){var t=e.className,n=e.cx,o=e.getStyles,i=e.innerProps,a=e.isRtl;return We("div",r({css:o("loadingIndicator",e),className:n({indicator:!0,"loading-indicator":!0},t)},i),We(on,{delay:0,offset:a}),We(on,{delay:160,offset:!0}),We(on,{delay:320,offset:!a}))};an.defaultProps={size:4};var sn=["data"],un=["innerRef","isDisabled","isHidden","inputClassName"],ln={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},cn={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":s({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},ln)},dn=function(e){return s({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},ln)},fn=function(e){var t=e.children,n=e.innerProps;return We("div",n,t)};var pn={ClearIndicator:function(e){var t=e.children,n=e.className,o=e.cx,i=e.getStyles,a=e.innerProps;return We("div",r({css:i("clearIndicator",e),className:o({indicator:!0,"clear-indicator":!0},n)},a),t||We(Zt,null))},Control:function(e){var t=e.children,n=e.cx,o=e.getStyles,i=e.className,a=e.isDisabled,s=e.isFocused,u=e.innerRef,l=e.innerProps,c=e.menuIsOpen;return We("div",r({ref:u,css:o("control",e),className:n({control:!0,"control--is-disabled":a,"control--is-focused":s,"control--menu-is-open":c},i)},l),t)},DropdownIndicator:function(e){var t=e.children,n=e.className,o=e.cx,i=e.getStyles,a=e.innerProps;return We("div",r({css:i("dropdownIndicator",e),className:o({indicator:!0,"dropdown-indicator":!0},n)},a),t||We(Jt,null))},DownChevron:Jt,CrossIcon:Zt,Group:function(e){var t=e.children,n=e.className,o=e.cx,i=e.getStyles,a=e.Heading,s=e.headingProps,u=e.innerProps,l=e.label,c=e.theme,d=e.selectProps;return We("div",r({css:i("group",e),className:o({group:!0},n)},u),We(a,r({},s,{selectProps:d,theme:c,getStyles:i,cx:o}),l),We("div",null,t))},GroupHeading:function(e){var t=e.getStyles,n=e.cx,o=e.className,i=St(e);i.data;var a=Xe(i,sn);return We("div",r({css:t("groupHeading",e),className:n({"group-heading":!0},o)},a))},IndicatorsContainer:function(e){var t=e.children,n=e.className,o=e.cx,i=e.innerProps,a=e.getStyles;return We("div",r({css:a("indicatorsContainer",e),className:o({indicators:!0},n)},i),t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,o=e.getStyles,i=e.innerProps;return We("span",r({},i,{css:o("indicatorSeparator",e),className:n({"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,o=e.getStyles,i=e.value,a=St(e),s=a.innerRef,u=a.isDisabled,l=a.isHidden,c=a.inputClassName,d=Xe(a,un);return We("div",{className:n({"input-container":!0},t),css:o("input",e),"data-value":i||""},We("input",r({className:n({input:!0},c),ref:s,style:dn(l),disabled:u},d)))},LoadingIndicator:an,Menu:function(e){var t=e.children,n=e.className,o=e.cx,i=e.getStyles,a=e.innerRef,s=e.innerProps;return We("div",r({css:i("menu",e),className:o({menu:!0},n),ref:a},s),t)},MenuList:function(e){var t=e.children,n=e.className,o=e.cx,i=e.getStyles,a=e.innerProps,s=e.innerRef,u=e.isMulti;return We("div",r({css:i("menuList",e),className:o({"menu-list":!0,"menu-list--is-multi":u},n),ref:s},a),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,i=e.className,a=e.controlElement,s=e.cx,u=e.innerProps,l=e.menuPlacement,c=e.menuPosition,d=e.getStyles,f=(0,o.useRef)(null),p=(0,o.useRef)(null),h=Ke((0,o.useState)(jt(l)),2),m=h[0],v=h[1],g=(0,o.useMemo)((function(){return{setPortalPlacement:v}}),[]),b=Ke((0,o.useState)(null),2),y=b[0],w=b[1],O=(0,o.useCallback)((function(){if(a){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(a),t="fixed"===c?0:window.pageYOffset,n=e[m]+t;n===(null==y?void 0:y.offset)&&e.left===(null==y?void 0:y.rect.left)&&e.width===(null==y?void 0:y.rect.width)||w({offset:n,rect:e})}}),[a,c,m,null==y?void 0:y.offset,null==y?void 0:y.rect.left,null==y?void 0:y.rect.width]);gt((function(){O()}),[O]);var C=(0,o.useCallback)((function(){"function"==typeof p.current&&(p.current(),p.current=null),a&&f.current&&(p.current=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=r,u=o&&!s,l=u||i?[...at(e)?vt(e):e.contextElement?vt(e.contextElement):[],...vt(t)]:[];l.forEach((e=>{u&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));let c,d=null;if(a){let r=!0;d=new ResizeObserver((()=>{r||n(),r=!1})),at(e)&&!s&&d.observe(e),at(e)||!e.contextElement||s||d.observe(e.contextElement),d.observe(t)}let f=s?ft(e):null;return s&&function t(){const r=ft(e);!f||r.x===f.x&&r.y===f.y&&r.width===f.width&&r.height===f.height||n(),f=r,c=requestAnimationFrame(t)}(),n(),()=>{var e;l.forEach((e=>{u&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==(e=d)||e.disconnect(),d=null,s&&cancelAnimationFrame(c)}}(a,f.current,O,{elementResize:"ResizeObserver"in window}))}),[a,O]);gt((function(){C()}),[C]);var S=(0,o.useCallback)((function(e){f.current=e,C()}),[C]);if(!t&&"fixed"!==c||!y)return null;var _=We("div",r({ref:S,css:d("menuPortal",{offset:y.offset,position:c,rect:y.rect}),className:s({"menu-portal":!0},i)},u),n);return We(Nt.Provider,{value:g},t?(0,Ze.createPortal)(_,t):_)},LoadingMessage:Bt,NoOptionsMessage:Wt,MultiValue:function(e){var t=e.children,n=e.className,r=e.components,o=e.cx,i=e.data,a=e.getStyles,u=e.innerProps,l=e.isDisabled,c=e.removeProps,d=e.selectProps,f=r.Container,p=r.Label,h=r.Remove;return We(Ye,null,(function(r){var m=r.css,v=r.cx;return We(f,{data:i,innerProps:s({className:v(m(a("multiValue",e)),o({"multi-value":!0,"multi-value--is-disabled":l},n))},u),selectProps:d},We(p,{data:i,innerProps:{className:v(m(a("multiValueLabel",e)),o({"multi-value__label":!0},n))},selectProps:d},t),We(h,{data:i,innerProps:s({className:v(m(a("multiValueRemove",e)),o({"multi-value__remove":!0},n)),"aria-label":"Remove ".concat(t||"option")},c),selectProps:d}))}))},MultiValueContainer:fn,MultiValueLabel:fn,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return We("div",r({role:"button"},n),t||We(Zt,{size:14}))},Option:function(e){var t=e.children,n=e.className,o=e.cx,i=e.getStyles,a=e.isDisabled,s=e.isFocused,u=e.isSelected,l=e.innerRef,c=e.innerProps;return We("div",r({css:i("option",e),className:o({option:!0,"option--is-disabled":a,"option--is-focused":s,"option--is-selected":u},n),ref:l,"aria-disabled":a},c),t)},Placeholder:function(e){var t=e.children,n=e.className,o=e.cx,i=e.getStyles,a=e.innerProps;return We("div",r({css:i("placeholder",e),className:o({placeholder:!0},n)},a),t)},SelectContainer:function(e){var t=e.children,n=e.className,o=e.cx,i=e.getStyles,a=e.innerProps,s=e.isDisabled,u=e.isRtl;return We("div",r({css:i("container",e),className:o({"--is-disabled":s,"--is-rtl":u},n)},a),t)},SingleValue:function(e){var t=e.children,n=e.className,o=e.cx,i=e.getStyles,a=e.isDisabled,s=e.innerProps;return We("div",r({css:i("singleValue",e),className:o({"single-value":!0,"single-value--is-disabled":a},n)},s),t)},ValueContainer:function(e){var t=e.children,n=e.className,o=e.cx,i=e.innerProps,a=e.isMulti,s=e.getStyles,u=e.hasValue;return We("div",r({css:s("valueContainer",e),className:o({"value-container":!0,"value-container--is-multi":a,"value-container--has-value":u},n)},i),t)}},hn=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function mn(e,t){if(e.length!==t.length)return!1;for(var n=0;n1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,s=e.isDisabled,u=e.isSelected,l=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(l(a,n),".");if("menu"===t){var c=s?" disabled":"",d="".concat(u?"selected":"focused").concat(c);return"option ".concat(i," ").concat(d,", ").concat(l(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},yn=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,i=e.focusableOptions,a=e.isFocused,u=e.selectValue,l=e.selectProps,c=e.id,d=l.ariaLiveMessages,f=l.getOptionLabel,p=l.inputValue,h=l.isMulti,m=l.isOptionDisabled,v=l.isSearchable,g=l.menuIsOpen,b=l.options,y=l.screenReaderStatus,w=l.tabSelectsValue,O=l["aria-label"],C=l["aria-live"],S=(0,o.useMemo)((function(){return s(s({},bn),d||{})}),[d]),_=(0,o.useMemo)((function(){var e,n="";if(t&&S.onChange){var r=t.option,o=t.options,i=t.removedValue,a=t.removedValues,l=t.value,c=i||r||(e=l,Array.isArray(e)?null:e),d=c?f(c):"",p=o||a||void 0,h=p?p.map(f):[],v=s({isDisabled:c&&m(c,u),label:d,labels:h},t);n=S.onChange(v)}return n}),[t,S,m,u,f]),E=(0,o.useMemo)((function(){var e="",t=n||r,o=!!(n&&u&&u.includes(n));if(t&&S.onFocus){var a={focused:t,label:f(t),isDisabled:m(t,u),isSelected:o,options:i,context:t===n?"menu":"value",selectValue:u};e=S.onFocus(a)}return e}),[n,r,f,m,S,i,u]),P=(0,o.useMemo)((function(){var e="";if(g&&b.length&&S.onFilter){var t=y({count:i.length});e=S.onFilter({inputValue:p,resultsMessage:t})}return e}),[i,p,g,S,b,y]),x=(0,o.useMemo)((function(){var e="";if(S.guidance){var t=r?"value":g?"menu":"input";e=S.guidance({"aria-label":O,context:t,isDisabled:n&&m(n,u),isMulti:h,isSearchable:v,tabSelectsValue:w})}return e}),[O,n,r,h,m,v,g,S,u,w]),R="".concat(E," ").concat(P," ").concat(x),k=We(o.Fragment,null,We("span",{id:"aria-selection"},_),We("span",{id:"aria-context"},R)),I="initial-input-focus"===(null==t?void 0:t.action);return We(o.Fragment,null,We(gn,{id:c},I&&k),We(gn,{"aria-live":C,"aria-atomic":"false","aria-relevant":"additions text"},a&&!I&&k))},wn=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],On=new RegExp("["+wn.map((function(e){return e.letters})).join("")+"]","g"),Cn={},Sn=0;Sn1?t-1:0),r=1;r0,m=d-f-l,v=!1;m>t&&s.current&&(r&&r(e),s.current=!1),h&&u.current&&(a&&a(e),u.current=!1),h&&t>m?(n&&!s.current&&n(e),p.scrollTop=d,v=!0,s.current=!0):!h&&-t>l&&(i&&!u.current&&i(e),p.scrollTop=0,v=!0,u.current=!0),v&&function(e){e.preventDefault(),e.stopPropagation()}(e)}}),[n,r,i,a]),f=(0,o.useCallback)((function(e){d(e,e.deltaY)}),[d]),p=(0,o.useCallback)((function(e){l.current=e.changedTouches[0].clientY}),[]),h=(0,o.useCallback)((function(e){var t=l.current-e.changedTouches[0].clientY;d(e,t)}),[d]),m=(0,o.useCallback)((function(e){if(e){var t=!!Lt&&{passive:!1};e.addEventListener("wheel",f,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",h,t)}}),[h,p,f]),v=(0,o.useCallback)((function(e){e&&(e.removeEventListener("wheel",f,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",h,!1))}),[h,p,f]);return(0,o.useEffect)((function(){if(t){var e=c.current;return m(e),function(){v(e)}}}),[t,m,v]),function(e){c.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),a=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,i=(0,o.useRef)({}),a=(0,o.useRef)(null),s=(0,o.useCallback)((function(e){if(jn){var t=document.body,n=t&&t.style;if(r&&Dn.forEach((function(e){var t=n&&n[e];i.current[e]=t})),r&&Nn<1){var o=parseInt(i.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+o||0;Object.keys(Fn).forEach((function(e){var t=Fn[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&An()&&(t.addEventListener("touchmove",Ln,Hn),e&&(e.addEventListener("touchstart",Vn,Hn),e.addEventListener("touchmove",Tn,Hn))),Nn+=1}}),[r]),u=(0,o.useCallback)((function(e){if(jn){var t=document.body,n=t&&t.style;Nn=Math.max(Nn-1,0),r&&Nn<1&&Dn.forEach((function(e){var t=i.current[e];n&&(n[e]=t)})),t&&An()&&(t.removeEventListener("touchmove",Ln,Hn),e&&(e.removeEventListener("touchstart",Vn,Hn),e.removeEventListener("touchmove",Tn,Hn)))}}),[r]);return(0,o.useEffect)((function(){if(t){var e=a.current;return s(e),function(){u(e)}}}),[t,s,u]),function(e){a.current=e}}({isEnabled:n});return We(o.Fragment,null,n&&We("div",{onClick:Un,css:$n}),t((function(e){i(e),a(e)})))}var Wn={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Bn=function(e){var t=e.name,n=e.onFocus;return We("input",{required:!0,name:t,tabIndex:-1,onFocus:n,css:Wn,value:"",onChange:function(){}})},qn=function(e){return e.label},Qn=function(e){return e.value},Gn={clearIndicator:nn,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,i=r.borderRadius,a=r.spacing;return{label:"control",alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(o.primary):void 0,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:tn,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.value,r=e.theme,o=r.spacing,i=r.colors;return s({margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,visibility:t?"hidden":"visible",color:i.neutral80,transform:n?"translateZ(0)":""},cn)},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,i=r.spacing.baseUnit;return{label:"loadingIndicator",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*i,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:zt,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,a=r.spacing,s=r.colors;return i(t={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),i(t,"backgroundColor",s.neutral0),i(t,"borderRadius",o),i(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),i(t,"marginBottom",a.menuGutter),i(t,"marginTop",a.menuGutter),i(t,"position","absolute"),i(t,"width","100%"),i(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o||void 0===o?"ellipsis":void 0,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused?o.dangerLight:void 0,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:$t,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,i=o.spacing,a=o.colors;return{label:"option",backgroundColor:r?a.primary:n?a.primary25:"transparent",color:t?a.neutral20:r?a.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*i.baseUnit,"px ").concat(3*i.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:t?void 0:r?a.primary:a.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,gridArea:"1 / 1 / 2 / 3",marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{label:"singleValue",color:t?o.neutral40:o.neutral80,gridArea:"1 / 1 / 2 / 3",marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},valueContainer:function(e){var t=e.theme.spacing,n=e.isMulti,r=e.hasValue,o=e.selectProps.controlShouldRenderValue;return{alignItems:"center",display:n&&r&&o?"flex":"grid",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}};var Yn,Xn={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Kn={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:It(),captureMenuScroll:!It(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=s({ignoreCase:!0,ignoreAccents:!0,stringify:kn,trim:!0,matchFrom:"any"},Yn),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,u=n.matchFrom,l=a?Rn(t):t,c=a?Rn(i(e)):i(e);return r&&(l=l.toLowerCase(),c=c.toLowerCase()),o&&(l=xn(l),c=Pn(c)),"start"===u?c.substr(0,l.length)===l:c.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:qn,getOptionValue:Qn,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0};function Zn(e,t,n,r){return{type:"option",data:t,isDisabled:or(e,t,n),isSelected:ir(e,t,n),label:nr(e,t),value:rr(e,t),index:r}}function Jn(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return Zn(e,n,t,r)})).filter((function(t){return tr(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=Zn(e,n,t,r);return tr(e,i)?i:void 0})).filter(Tt)}function er(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,v(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function tr(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,s=t.value;return(!sr(e)||!i)&&ar(e,{label:a,value:s,data:o},r)}var nr=function(e,t){return e.getOptionLabel(t)},rr=function(e,t){return e.getOptionValue(t)};function or(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function ir(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=rr(e,t);return n.some((function(t){return rr(e,t)===r}))}function ar(e,t,n){return!e.filterOption||e.filterOption(t,n)}var sr=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},ur=1,lr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(c,e);var t,n,i,a=p(c);function c(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(t=a.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},t.blockOptionHover=!1,t.isComposing=!1,t.commonProps=void 0,t.initialTouchX=0,t.initialTouchY=0,t.instancePrefix="",t.openAfterFocus=!1,t.scrollToFocusedOptionOnUpdate=!1,t.userIsDragging=void 0,t.controlRef=null,t.getControlRef=function(e){t.controlRef=e},t.focusedOptionRef=null,t.getFocusedOptionRef=function(e){t.focusedOptionRef=e},t.menuListRef=null,t.getMenuListRef=function(e){t.menuListRef=e},t.inputRef=null,t.getInputRef=function(e){t.inputRef=e},t.focus=t.focusInput,t.blur=t.blurInput,t.onChange=function(e,n){var r=t.props,o=r.onChange,i=r.name;n.name=i,t.ariaOnChange(e,n),o(e,n)},t.setValue=function(e,n,r){var o=t.props,i=o.closeMenuOnSelect,a=o.isMulti,s=o.inputValue;t.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(t.setState({inputIsHiddenAfterUpdate:!a}),t.onMenuClose()),t.setState({clearFocusValueOnUpdate:!0}),t.onChange(e,{action:n,option:r})},t.selectOption=function(e){var n=t.props,r=n.blurInputOnSelect,o=n.isMulti,i=n.name,a=t.state.selectValue,s=o&&t.isOptionSelected(e,a),u=t.isOptionDisabled(e,a);if(s){var l=t.getOptionValue(e);t.setValue(a.filter((function(e){return t.getOptionValue(e)!==l})),"deselect-option",e)}else{if(u)return void t.ariaOnChange(e,{action:"select-option",option:e,name:i});o?t.setValue([].concat(v(a),[e]),"select-option",e):t.setValue(e,"select-option")}r&&t.blurInput()},t.removeValue=function(e){var n=t.props.isMulti,r=t.state.selectValue,o=t.getOptionValue(e),i=r.filter((function(e){return t.getOptionValue(e)!==o})),a=Vt(n,i,i[0]||null);t.onChange(a,{action:"remove-value",removedValue:e}),t.focusInput()},t.clearValue=function(){var e=t.state.selectValue;t.onChange(Vt(t.props.isMulti,[],null),{action:"clear",removedValues:e})},t.popValue=function(){var e=t.props.isMulti,n=t.state.selectValue,r=n[n.length-1],o=n.slice(0,n.length-1),i=Vt(e,o,o[0]||null);t.onChange(i,{action:"pop-value",removedValue:r})},t.getValue=function(){return t.state.selectValue},t.cx=function(){for(var e=arguments.length,n=new Array(e),r=0;r5||i>5}},t.onTouchEnd=function(e){t.userIsDragging||(t.controlRef&&!t.controlRef.contains(e.target)&&t.menuListRef&&!t.menuListRef.contains(e.target)&&t.blurInput(),t.initialTouchX=0,t.initialTouchY=0)},t.onControlTouchEnd=function(e){t.userIsDragging||t.onControlMouseDown(e)},t.onClearIndicatorTouchEnd=function(e){t.userIsDragging||t.onClearIndicatorMouseDown(e)},t.onDropdownIndicatorTouchEnd=function(e){t.userIsDragging||t.onDropdownIndicatorMouseDown(e)},t.handleInputChange=function(e){var n=t.props.inputValue,r=e.currentTarget.value;t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange(r,{action:"input-change",prevInputValue:n}),t.props.menuIsOpen||t.onMenuOpen()},t.onInputFocus=function(e){t.props.onFocus&&t.props.onFocus(e),t.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(t.openAfterFocus||t.props.openMenuOnFocus)&&t.openMenu("first"),t.openAfterFocus=!1},t.onInputBlur=function(e){var n=t.props.inputValue;t.menuListRef&&t.menuListRef.contains(document.activeElement)?t.inputRef.focus():(t.props.onBlur&&t.props.onBlur(e),t.onInputChange("",{action:"input-blur",prevInputValue:n}),t.onMenuClose(),t.setState({focusedValue:null,isFocused:!1}))},t.onOptionHover=function(e){t.blockOptionHover||t.state.focusedOption===e||t.setState({focusedOption:e})},t.shouldHideSelectedOptions=function(){return sr(t.props)},t.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),t.focus()},t.onKeyDown=function(e){var n=t.props,r=n.isMulti,o=n.backspaceRemovesValue,i=n.escapeClearsValue,a=n.inputValue,s=n.isClearable,u=n.isDisabled,l=n.menuIsOpen,c=n.onKeyDown,d=n.tabSelectsValue,f=n.openMenuOnFocus,p=t.state,h=p.focusedOption,m=p.focusedValue,v=p.selectValue;if(!(u||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(t.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||a)return;t.focusValue("previous");break;case"ArrowRight":if(!r||a)return;t.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)t.removeValue(m);else{if(!o)return;r?t.popValue():s&&t.clearValue()}break;case"Tab":if(t.isComposing)return;if(e.shiftKey||!l||!d||!h||f&&t.isOptionSelected(h,v))return;t.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(l){if(!h)return;if(t.isComposing)return;t.selectOption(h);break}return;case"Escape":l?(t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange("",{action:"menu-close",prevInputValue:a}),t.onMenuClose()):s&&i&&t.clearValue();break;case" ":if(a)return;if(!l){t.openMenu("first");break}if(!h)return;t.selectOption(h);break;case"ArrowUp":l?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":l?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!l)return;t.focusOption("pageup");break;case"PageDown":if(!l)return;t.focusOption("pagedown");break;case"Home":if(!l)return;t.focusOption("first");break;case"End":if(!l)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.instancePrefix="react-select-"+(t.props.instanceId||++ur),t.state.selectValue=Ct(e.value),e.menuIsOpen&&t.state.selectValue.length){var n=t.buildFocusableOptions(),r=n.indexOf(t.state.selectValue[0]);t.state.focusedOption=n[r]}return t}return t=c,n=[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&kt(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(kt(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a]},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Xn):s(s({},Xn),this.props.theme):Xn}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getValue,o=this.selectOption,i=this.setValue,a=this.props,s=a.isMulti,u=a.isRtl,l=a.options;return{clearValue:e,cx:t,getStyles:n,getValue:r,hasValue:this.hasValue(),isMulti:s,isRtl:u,options:l,selectOption:o,selectProps:a,setValue:i,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return or(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return ir(this.props,e,t)}},{key:"filterOption",value:function(e,t){return ar(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,i=e.inputId,a=e.inputValue,u=e.tabIndex,l=e.form,c=e.menuIsOpen,d=e.required,f=this.getComponents().Input,p=this.state,h=p.inputIsHidden,m=p.ariaSelection,v=this.commonProps,g=i||this.getElementId("input"),b=s(s(s({"aria-autocomplete":"list","aria-expanded":c,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":d,role:"combobox"},c&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==m?void 0:m.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?o.createElement(f,r({},v,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:g,innerRef:this.getInputRef,isDisabled:t,isHidden:h,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:l,type:"text",value:a},b)):o.createElement(Mn,r({id:g,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:yt,onFocus:this.onInputFocus,disabled:t,tabIndex:u,inputMode:"none",form:l,value:""},b))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,i=t.MultiValueContainer,a=t.MultiValueLabel,s=t.MultiValueRemove,u=t.SingleValue,l=t.Placeholder,c=this.commonProps,d=this.props,f=d.controlShouldRenderValue,p=d.isDisabled,h=d.isMulti,m=d.inputValue,v=d.placeholder,g=this.state,b=g.selectValue,y=g.focusedValue,w=g.isFocused;if(!this.hasValue()||!f)return m?null:o.createElement(l,r({},c,{key:"placeholder",isDisabled:p,isFocused:w,innerProps:{id:this.getElementId("placeholder")}}),v);if(h)return b.map((function(t,u){var l=t===y,d="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return o.createElement(n,r({},c,{components:{Container:i,Label:a,Remove:s},isFocused:l,isDisabled:p,key:d,index:u,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(m)return null;var O=b[0];return o.createElement(u,r({},c,{data:O,isDisabled:p}),this.formatOptionLabel(O,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,i=n.isDisabled,a=n.isLoading,s=this.state.isFocused;if(!this.isClearable()||!e||i||!this.hasValue()||a)return null;var u={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return o.createElement(e,r({},t,{innerProps:u,isFocused:s}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,i=n.isDisabled,a=n.isLoading,s=this.state.isFocused;return e&&a?o.createElement(e,r({},t,{innerProps:{"aria-hidden":"true"},isDisabled:i,isFocused:s})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var i=this.commonProps,a=this.props.isDisabled,s=this.state.isFocused;return o.createElement(n,r({},i,{isDisabled:a,isFocused:s}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,i=this.state.isFocused,a={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return o.createElement(e,r({},t,{innerProps:a,isDisabled:n,isFocused:i}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,i=t.GroupHeading,a=t.Menu,s=t.MenuList,u=t.MenuPortal,l=t.LoadingMessage,c=t.NoOptionsMessage,d=t.Option,f=this.commonProps,p=this.state.focusedOption,h=this.props,m=h.captureMenuScroll,v=h.inputValue,g=h.isLoading,b=h.loadingMessage,y=h.minMenuHeight,w=h.maxMenuHeight,O=h.menuIsOpen,C=h.menuPlacement,S=h.menuPosition,_=h.menuPortalTarget,E=h.menuShouldBlockScroll,P=h.menuShouldScrollIntoView,x=h.noOptionsMessage,R=h.onMenuScrollToTop,k=h.onMenuScrollToBottom;if(!O)return null;var I,M=function(t,n){var i=t.type,a=t.data,s=t.isDisabled,u=t.isSelected,l=t.label,c=t.value,h=p===a,m=s?void 0:function(){return e.onOptionHover(a)},v=s?void 0:function(){return e.selectOption(a)},g="".concat(e.getElementId("option"),"-").concat(n),b={id:g,onClick:v,onMouseMove:m,onMouseOver:m,tabIndex:-1};return o.createElement(d,r({},f,{innerProps:b,data:a,isDisabled:s,isSelected:u,key:g,label:l,type:i,value:c,isFocused:h,innerRef:h?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())I=this.getCategorizedOptions().map((function(t){if("group"===t.type){var a=t.data,s=t.options,u=t.index,l="".concat(e.getElementId("group"),"-").concat(u),c="".concat(l,"-heading");return o.createElement(n,r({},f,{key:l,data:a,options:s,Heading:i,headingProps:{id:c,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return M(e,"".concat(u,"-").concat(e.index))})))}if("option"===t.type)return M(t,"".concat(t.index))}));else if(g){var D=b({inputValue:v});if(null===D)return null;I=o.createElement(l,f,D)}else{var F=x({inputValue:v});if(null===F)return null;I=o.createElement(c,f,F)}var L={minMenuHeight:y,maxMenuHeight:w,menuPlacement:C,menuPosition:S,menuShouldScrollIntoView:P},T=o.createElement(Ht,r({},f,L),(function(t){var n=t.ref,i=t.placerProps,u=i.placement,l=i.maxHeight;return o.createElement(a,r({},f,L,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove,id:e.getElementId("listbox")},isLoading:g,placement:u}),o.createElement(zn,{captureEnabled:m,onTopArrive:R,onBottomArrive:k,lockEnabled:E},(function(t){return o.createElement(s,r({},f,{innerRef:function(n){e.getMenuListRef(n),t(n)},isLoading:g,maxHeight:l,focusedOption:p}),I)})))}));return _||"fixed"===S?o.createElement(u,r({},f,{appendTo:_,controlElement:this.controlRef,menuPlacement:C,menuPosition:S}),T):T}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,i=t.isMulti,a=t.name,s=t.required,u=this.state.selectValue;if(a&&!r){if(s&&!this.hasValue())return o.createElement(Bn,{name:a,onFocus:this.onValueInputFocus});if(i){if(n){var l=u.map((function(t){return e.getOptionValue(t)})).join(n);return o.createElement("input",{name:a,type:"hidden",value:l})}var c=u.length>0?u.map((function(t,n){return o.createElement("input",{key:"i-".concat(n),name:a,type:"hidden",value:e.getOptionValue(t)})})):o.createElement("input",{name:a,type:"hidden",value:""});return o.createElement("div",null,c)}var d=u[0]?this.getOptionValue(u[0]):"";return o.createElement("input",{name:a,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,i=t.focusedOption,a=t.focusedValue,s=t.isFocused,u=t.selectValue,l=this.getFocusableOptions();return o.createElement(yn,r({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:i,focusedValue:a,isFocused:s,selectValue:u,focusableOptions:l}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,i=e.SelectContainer,a=e.ValueContainer,s=this.props,u=s.className,l=s.id,c=s.isDisabled,d=s.menuIsOpen,f=this.state.isFocused,p=this.commonProps=this.getCommonProps();return o.createElement(i,r({},p,{className:u,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:f}),this.renderLiveRegion(),o.createElement(t,r({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:f,menuIsOpen:d}),o.createElement(a,r({},p,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),o.createElement(n,r({},p,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],i=[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,u=t.prevWasFocused,l=e.options,c=e.value,d=e.menuIsOpen,f=e.inputValue,p=e.isMulti,h=Ct(c),m={};if(n&&(c!==n.value||l!==n.options||d!==n.menuIsOpen||f!==n.inputValue)){var v=d?function(e,t){return er(Jn(e,t))}(e,h):[],g=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r-1?n:t[0]}(t,v);m={selectValue:h,focusedOption:b,focusedValue:g,clearFocusValueOnUpdate:!1}}var y=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},w=i,O=a&&u;return a&&!O&&(w={value:Vt(p,h,h[0]||null),options:h,action:"initial-input-focus"},O=!u),"initial-input-focus"===(null==i?void 0:i.action)&&(w=null),s(s(s({},m),y),{},{prevProps:e,ariaSelection:w,prevWasFocused:O})}}],n&&u(t.prototype,n),i&&u(t,i),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.Component);lr.defaultProps=Kn;var cr=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];var dr=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],fr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=String(e).toLowerCase(),o=String(n.getOptionValue(t)).toLowerCase(),i=String(n.getOptionLabel(t)).toLowerCase();return o===r||i===r},pr={formatCreateLabel:function(e){return'Create "'.concat(e,'"')},isValidNewOption:function(e,t,n,r){return!(!e||t.some((function(t){return fr(e,t,r)}))||n.some((function(t){return fr(e,t,r)})))},getNewOptionData:function(e,t){return{label:t,value:e,__isNew__:!0}}};function hr(e){var t=e.allowCreateWhileLoading,n=void 0!==t&&t,r=e.createOptionPosition,i=void 0===r?"last":r,a=e.formatCreateLabel,u=void 0===a?pr.formatCreateLabel:a,l=e.isValidNewOption,c=void 0===l?pr.isValidNewOption:l,d=e.getNewOptionData,f=void 0===d?pr.getNewOptionData:d,p=e.onCreateOption,h=e.options,m=void 0===h?[]:h,g=e.onChange,b=Xe(e,dr),y=b.getOptionValue,w=void 0===y?Qn:y,O=b.getOptionLabel,C=void 0===O?qn:O,S=b.inputValue,_=b.isLoading,E=b.isMulti,P=b.value,x=b.name,R=(0,o.useMemo)((function(){return c(S,Ct(P),m,{getOptionValue:w,getOptionLabel:C})?f(S,u(S)):void 0}),[u,f,C,w,S,c,m,P]),k=(0,o.useMemo)((function(){return!n&&_||!R?m:"first"===i?[R].concat(v(m)):[].concat(v(m),[R])}),[n,i,_,R,m]),I=(0,o.useCallback)((function(e,t){if("select-option"!==t.action)return g(e,t);var n=Array.isArray(e)?e:[e];if(n[n.length-1]!==R)g(e,t);else if(p)p(S);else{var r=f(S,S),o={action:"create-option",name:x,option:r};g(Vt(E,[].concat(v(Ct(P)),[r]),r),o)}}),[f,S,E,x,R,p,g,P]);return s(s({},b),{},{options:k,onChange:I})}var mr=(0,o.forwardRef)((function(e,t){var n=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,i=void 0!==r&&r,a=e.defaultValue,u=void 0===a?null:a,l=e.inputValue,c=e.menuIsOpen,d=e.onChange,f=e.onInputChange,p=e.onMenuClose,h=e.onMenuOpen,m=e.value,v=Xe(e,cr),g=Ke((0,o.useState)(void 0!==l?l:n),2),b=g[0],y=g[1],w=Ke((0,o.useState)(void 0!==c?c:i),2),O=w[0],C=w[1],S=Ke((0,o.useState)(void 0!==m?m:u),2),_=S[0],E=S[1],P=(0,o.useCallback)((function(e,t){"function"==typeof d&&d(e,t),E(e)}),[d]),x=(0,o.useCallback)((function(e,t){var n;"function"==typeof f&&(n=f(e,t)),y(void 0!==n?n:e)}),[f]),R=(0,o.useCallback)((function(){"function"==typeof h&&h(),C(!0)}),[h]),k=(0,o.useCallback)((function(){"function"==typeof p&&p(),C(!1)}),[p]),I=void 0!==l?l:b,M=void 0!==c?c:O,D=void 0!==m?m:_;return s(s({},v),{},{inputValue:I,menuIsOpen:M,onChange:P,onInputChange:x,onMenuClose:k,onMenuOpen:R,value:D})}(e),i=hr(n);return o.createElement(lr,r({ref:t},i))})),vr=mr},112:function(e,t,n){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=e[a]}o.default=e,n&&n.set(e,o);return o}(n(363)),a=(o=n(86))&&o.__esModule?o:{default:o},s=n(127);function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function l(){return l=Object.assign||function(e){for(var t=1;t=p){var t=console[e]||console.log;return t.apply(console,arguments)}}}!function(e){e.debug=h("debug"),e.log=h("log"),e.warn=h("warn"),e.error=h("error")}(d||(d={}));function m(e){try{return e()}catch(e){}}var v=m((function(){return globalThis}))||m((function(){return window}))||m((function(){return self}))||m((function(){return global}))||m((function(){return m.constructor("return this")()})),g="__",b=[g,g].join("DEV");var y=function(){try{return Boolean(__DEV__)}catch(e){return Object.defineProperty(v,b,{value:"production"!==m((function(){return"production"})),enumerable:!1,configurable:!0,writable:!0}),v[b]}}();function w(e){try{return e()}catch(e){}}var O=w((function(){return globalThis}))||w((function(){return window}))||w((function(){return self}))||w((function(){return global}))||w((function(){return w.constructor("return this")()})),C=!1;function S(){C&&(delete O.process,C=!1)}!O||w((function(){return"production"}))||w((function(){return process}))||(Object.defineProperty(O,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),C=!0);class _{constructor(e,t="GraphQL request",n={line:1,column:1}){var r;"string"==typeof e||devAssert(!1,`Body must be a string. Received: ${e,formatValue(r,[])}.`),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||devAssert(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||devAssert(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}var E;S(),__DEV__?d("boolean"==typeof y,y):d("boolean"==typeof y,38),function(e){e[e.Query=0]="Query",e[e.Mutation=1]="Mutation",e[e.Subscription=2]="Subscription"}(E||(E={}));var P=new Map;function x(e){var t;switch(e){case E.Query:t="Query";break;case E.Mutation:t="Mutation";break;case E.Subscription:t="Subscription"}return t}function R(e){var t,n,r=P.get(e);if(r)return r;__DEV__?d(!!e&&!!e.kind,"Argument of ".concat(e," passed to parser was not a valid GraphQL ")+"DocumentNode. You may need to use 'graphql-tag' or another method to convert your operation into a document"):d(!!e&&!!e.kind,32);for(var o=[],i=[],a=[],s=[],u=0,l=e.definitions;u=0}))||!1,N=A&&!j,H=!1,U=M.useSyncExternalStore||function(e,t,n){var r=t();__DEV__&&!H&&r!==t()&&(H=!0,__DEV__&&d.error("The result of getSnapshot should be cached to avoid an infinite loop"));var o=I.useState({inst:{value:r,getSnapshot:t}}),i=o[0].inst,a=o[1];return N?I.useLayoutEffect((function(){Object.assign(i,{value:r,getSnapshot:t}),$(i)&&a({inst:i})}),[e,r,t]):Object.assign(i,{value:r,getSnapshot:t}),I.useEffect((function(){return $(i)&&a({inst:i}),e((function(){$(i)&&a({inst:i})}))}),[e]),r};function $(e){var t=e.value,n=e.getSnapshot;try{return t!==n()}catch(e){return!0}}var z=Object.prototype,W=z.toString,B=z.hasOwnProperty,q=Function.prototype.toString,Q=new Map;function G(e,t){try{return Y(e,t)}finally{Q.clear()}}function Y(e,t){if(e===t)return!0;var n,r,o,i=W.call(e);if(i!==W.call(t))return!1;switch(i){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(J(e,t))return!0;var a=X(e),s=X(t),u=a.length;if(u!==s.length)return!1;for(var l=0;l=0&&n.indexOf(r,o)===o))}return!1}function X(e){return Object.keys(e).filter(K,e)}function K(e){return void 0!==this[e]}var Z="{ [native code] }";function J(e,t){var n=Q.get(e);if(n){if(n.has(t))return!0}else Q.set(e,n=new Set);return n.add(t),!1}function ee(){for(var e=[],t=0;t0}var ie,ae=function(e){function t(n){var r,o,i=n.graphQLErrors,a=n.clientErrors,s=n.networkError,u=n.errorMessage,l=n.extraInfo,c=e.call(this,u)||this;return c.graphQLErrors=i||[],c.clientErrors=a||[],c.networkError=s||null,c.message=u||(o="",(oe((r=c).graphQLErrors)||oe(r.clientErrors))&&(r.graphQLErrors||[]).concat(r.clientErrors||[]).forEach((function(e){var t=e?e.message:"Error message not found.";o+="".concat(t,"\n")})),r.networkError&&(o+="".concat(r.networkError.message,"\n")),o=o.replace(/\n$/,"")),c.extraInfo=l,c.__proto__=t.prototype,c}return o(t,e),t}(Error);function se(e){var t=(0,I.useContext)(re()),n=e||t.client;return __DEV__?d(!!n,'Could not find "client" in the context or passed in as an option. Wrap the root component in an , or pass an ApolloClient instance in via options.'):d(!!n,31),n}function ue(e){return null!==e&&"object"==typeof e}function le(e){var t=new Set([e]);return t.forEach((function(e){ue(e)&&function(e){if(__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(e){if(e instanceof TypeError)return null;throw e}return e}(e)===e&&Object.getOwnPropertyNames(e).forEach((function(n){ue(e[n])&&t.add(e[n])}))})),e}function ce(e){return __DEV__&&le(e),e}!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(ie||(ie={}));var de=Object.prototype.hasOwnProperty;function fe(e,t){return void 0===t&&(t=Object.create(null)),function(e,t){var n=(0,I.useRef)();n.current&&e===n.current.client&&t===n.current.query||(n.current=new pe(e,t,n.current));var r=n.current,o=(0,I.useState)(0),i=(o[0],o[1]);return r.forceUpdate=function(){i((function(e){return e+1}))},r}(se(t.client),e).useQuery(t)}var pe=function(){function e(e,t,n){this.client=e,this.query=t,this.asyncResolveFns=new Set,this.optionsToIgnoreOnce=new(T?WeakSet:Set),this.ssrDisabledResult=ce({loading:!0,data:void 0,error:void 0,networkStatus:ie.loading}),this.skipStandbyResult=ce({loading:!1,data:void 0,error:void 0,networkStatus:ie.ready}),this.toQueryResultCache=new(L?WeakMap:Map),k(t,E.Query);var r=n&&n.result,o=r&&r.data;o&&(this.previousData=o)}return e.prototype.forceUpdate=function(){__DEV__&&d.warn("Calling default no-op implementation of InternalState#forceUpdate")},e.prototype.asyncUpdate=function(){var e=this;return new Promise((function(t){e.asyncResolveFns.add(t),e.optionsToIgnoreOnce.add(e.watchQueryOptions),e.forceUpdate()}))},e.prototype.useQuery=function(e){var t=this;this.renderPromises=(0,I.useContext)(re()).renderPromises,this.useOptions(e);var n=this.useObservableQuery(),r=U((0,I.useCallback)((function(){if(t.renderPromises)return function(){};var e=function(){var e=t.result,r=n.getCurrentResult();e&&e.loading===r.loading&&e.networkStatus===r.networkStatus&&G(e.data,r.data)||t.setResult(r)},r=function(i){var a=n.last;o.unsubscribe();try{n.resetLastResults(),o=n.subscribe(e,r)}finally{n.last=a}if(!de.call(i,"graphQLErrors"))throw i;var s=t.result;(!s||s&&s.loading||!G(i,s.error))&&t.setResult({data:s&&s.data,error:i,loading:!1,networkStatus:ie.error})},o=n.subscribe(e,r);return function(){return o.unsubscribe()}}),[n,this.renderPromises,this.client.disableNetworkFetches]),(function(){return t.getCurrentResult()}),(function(){return t.getCurrentResult()}));this.unsafeHandlePartialRefetch(r);var o=this.toQueryResult(r);return!o.loading&&this.asyncResolveFns.size&&(this.asyncResolveFns.forEach((function(e){return e(o)})),this.asyncResolveFns.clear()),o},e.prototype.useOptions=function(t){var n,r=this.createWatchQueryOptions(this.queryHookOptions=t),o=this.watchQueryOptions;!this.optionsToIgnoreOnce.has(o)&&G(r,o)||(this.watchQueryOptions=r,o&&this.observable&&(this.optionsToIgnoreOnce.delete(o),this.observable.reobserve(this.getObsQueryOptions()),this.previousData=(null===(n=this.result)||void 0===n?void 0:n.data)||this.previousData,this.result=void 0)),this.onCompleted=t.onCompleted||e.prototype.onCompleted,this.onError=t.onError||e.prototype.onError,!this.renderPromises&&!this.client.disableNetworkFetches||!1!==this.queryHookOptions.ssr||this.queryHookOptions.skip?this.queryHookOptions.skip||"standby"===this.watchQueryOptions.fetchPolicy?this.result=this.skipStandbyResult:this.result!==this.ssrDisabledResult&&this.result!==this.skipStandbyResult||(this.result=void 0):this.result=this.ssrDisabledResult},e.prototype.getObsQueryOptions=function(){var e=[],t=this.client.defaultOptions.watchQuery;return t&&e.push(t),this.queryHookOptions.defaultOptions&&e.push(this.queryHookOptions.defaultOptions),e.push(ee(this.observable&&this.observable.options,this.watchQueryOptions)),e.reduce(te)},e.prototype.createWatchQueryOptions=function(e){var t;void 0===e&&(e={});var n=e.skip,r=(e.ssr,e.onCompleted,e.onError,e.defaultOptions,a(e,["skip","ssr","onCompleted","onError","defaultOptions"])),o=Object.assign(r,{query:this.query});if(!this.renderPromises||"network-only"!==o.fetchPolicy&&"cache-and-network"!==o.fetchPolicy||(o.fetchPolicy="cache-first"),o.variables||(o.variables={}),n){var i=o.fetchPolicy,s=void 0===i?this.getDefaultFetchPolicy():i,u=o.initialFetchPolicy,l=void 0===u?s:u;Object.assign(o,{initialFetchPolicy:l,fetchPolicy:"standby"})}else o.fetchPolicy||(o.fetchPolicy=(null===(t=this.observable)||void 0===t?void 0:t.options.initialFetchPolicy)||this.getDefaultFetchPolicy());return o},e.prototype.getDefaultFetchPolicy=function(){var e,t;return(null===(e=this.queryHookOptions.defaultOptions)||void 0===e?void 0:e.fetchPolicy)||(null===(t=this.client.defaultOptions.watchQuery)||void 0===t?void 0:t.fetchPolicy)||"cache-first"},e.prototype.onCompleted=function(e){},e.prototype.onError=function(e){},e.prototype.useObservableQuery=function(){var e=this.observable=this.renderPromises&&this.renderPromises.getSSRObservable(this.watchQueryOptions)||this.observable||this.client.watchQuery(this.getObsQueryOptions());this.obsQueryFields=(0,I.useMemo)((function(){return{refetch:e.refetch.bind(e),reobserve:e.reobserve.bind(e),fetchMore:e.fetchMore.bind(e),updateQuery:e.updateQuery.bind(e),startPolling:e.startPolling.bind(e),stopPolling:e.stopPolling.bind(e),subscribeToMore:e.subscribeToMore.bind(e)}}),[e]);var t=!(!1===this.queryHookOptions.ssr||this.queryHookOptions.skip);return this.renderPromises&&t&&(this.renderPromises.registerSSRObservable(e),e.getCurrentResult().loading&&this.renderPromises.addObservableQueryPromise(e)),e},e.prototype.setResult=function(e){var t=this.result;t&&t.data&&(this.previousData=t.data),this.result=e,this.forceUpdate(),this.handleErrorOrCompleted(e)},e.prototype.handleErrorOrCompleted=function(e){var t=this;e.loading||Promise.resolve().then((function(){e.error?t.onError(e.error):e.data&&t.onCompleted(e.data)})).catch((function(e){__DEV__&&d.warn(e)}))},e.prototype.getCurrentResult=function(){return this.result||this.handleErrorOrCompleted(this.result=this.observable.getCurrentResult()),this.result},e.prototype.toQueryResult=function(e){var t=this.toQueryResultCache.get(e);if(t)return t;var n=e.data,r=(e.partial,a(e,["data","partial"]));return this.toQueryResultCache.set(e,t=i(i(i({data:n},r),this.obsQueryFields),{client:this.client,observable:this.observable,variables:this.observable.variables,called:!this.queryHookOptions.skip,previousData:this.previousData})),!t.error&&oe(e.errors)&&(t.error=new ae({graphQLErrors:e.errors})),t},e.prototype.unsafeHandlePartialRefetch=function(e){!e.partial||!this.queryHookOptions.partialRefetch||e.loading||e.data&&0!==Object.keys(e.data).length||"cache-only"===this.observable.options.fetchPolicy||(Object.assign(e,{loading:!0,networkStatus:ie.refetch}),this.observable.refetch())},e}();function he(e){var t=e.children,n=fe(e.query,a(e,["children","query"]));return n?t(n):null}he.propTypes={client:F.object,children:F.func.isRequired,fetchPolicy:F.string,notifyOnNetworkStatusChange:F.bool,onCompleted:F.func,onError:F.func,pollInterval:F.number,query:F.object.isRequired,variables:F.object,ssr:F.bool,partialRefetch:F.bool,returnPartialData:F.bool};var me=function(){return{}},ve=function(){return!1};function ge(e){return e.displayName||e.name||"Component"}function be(e,t){for(var n={},r=0,o=e.variables;r0&&(c.variables=be(n,u)),I.createElement(he,i({},c,{displayName:s,skip:l,query:e}),(function(e){e.client;var n,s,c=e.data,d=a(e,["client","data"]);if(t.withRef&&(o.withRef=!0,u=Object.assign({},u,{ref:o.setWrappedInstance})),l)return I.createElement(r,i({},u,{}));var f=Object.assign(d,c||{}),h=t.name||"data",m=((n={})[h]=f,n);if(t.props){var v=((s={})[h]=f,s.ownProps=u,s);m=p=t.props(v,p)}return I.createElement(r,i({},u,m))}))},l.displayName=s,l.WrappedComponent=r,l}(ye);return D(u,r,{})}}function Oe(e){var t=function(e,t){var n=se(null==t?void 0:t.client);k(e,E.Mutation);var r=(0,I.useState)({called:!1,loading:!1,client:n}),o=r[0],a=r[1],s=(0,I.useRef)({result:o,mutationId:0,isMounted:!0,client:n,mutation:e,options:t});Object.assign(s.current,{client:n,options:t,mutation:e});var u=(0,I.useCallback)((function(e){void 0===e&&(e={});var t=s.current,n=t.client,r=t.options,o=t.mutation,u=i(i({},r),{mutation:o});s.current.result.loading||u.ignoreResults||!s.current.isMounted||a(s.current.result={loading:!0,error:void 0,data:void 0,called:!0,client:n});var l=++s.current.mutationId,c=te(u,e);return n.mutate(c).then((function(t){var r,o,i,u=t.data,d=t.errors,f=d&&d.length>0?new ae({graphQLErrors:d}):void 0;if(l===s.current.mutationId&&!c.ignoreResults){var p={called:!0,loading:!1,data:u,error:f,client:n};s.current.isMounted&&!G(s.current.result,p)&&a(s.current.result=p)}return null===(o=null===(r=s.current.options)||void 0===r?void 0:r.onCompleted)||void 0===o||o.call(r,t.data,c),null===(i=e.onCompleted)||void 0===i||i.call(e,t.data,c),t})).catch((function(t){var r,o,i,u;if(l===s.current.mutationId&&s.current.isMounted){var d={loading:!1,error:t,data:void 0,called:!0,client:n};G(s.current.result,d)||a(s.current.result=d)}if((null===(r=s.current.options)||void 0===r?void 0:r.onError)||c.onError)return null===(i=null===(o=s.current.options)||void 0===o?void 0:o.onError)||void 0===i||i.call(o,t,c),null===(u=e.onError)||void 0===u||u.call(e,t,c),{data:void 0,errors:t};throw t}))}),[]),l=(0,I.useCallback)((function(){s.current.isMounted&&a({called:!1,loading:!1,client:n})}),[]);return(0,I.useEffect)((function(){return s.current.isMounted=!0,function(){s.current.isMounted=!1}}),[]),[u,i({reset:l},o)]}(e.mutation,e),n=t[0],r=t[1];return e.children?e.children(n,r):null}function Ce(e,t){void 0===t&&(t={});var n=R(e),r=t.options,s=void 0===r?me:r,u=t.alias,l=void 0===u?"Apollo":u,c=s;return"function"!=typeof c&&(c=function(){return s}),function(r){var s="".concat(l,"(").concat(ge(r),")"),u=function(u){function l(){return null!==u&&u.apply(this,arguments)||this}return o(l,u),l.prototype.render=function(){var o=this.props,s=c(o);return t.withRef&&(this.withRef=!0,o=Object.assign({},o,{ref:this.setWrappedInstance})),!s.variables&&n.variables.length>0&&(s.variables=be(n,o)),I.createElement(Oe,i({ignoreResults:!0},s,{mutation:e}),(function(e,n){var s,u,l=n.data,c=a(n,["data"]),d=Object.assign(c,l||{}),f=t.name||"mutate",p=t.name?"".concat(f,"Result"):"result",h=((s={})[f]=e,s[p]=d,s);if(t.props){var m=((u={})[f]=e,u[p]=d,u.ownProps=o,u);h=t.props(m)}return I.createElement(r,i({},o,h))}))},l.displayName=s,l.WrappedComponent=r,l}(ye);return D(u,r,{})}}function Se(e){var t=function(e,t){var n=(0,I.useRef)(!1),r=se(null==t?void 0:t.client);k(e,E.Subscription);var o=(0,I.useState)({loading:!(null==t?void 0:t.skip),error:void 0,data:void 0,variables:null==t?void 0:t.variables}),i=o[0],a=o[1];n.current||(n.current=!0,(null==t?void 0:t.onSubscriptionData)&&__DEV__&&d.warn(t.onData?"'useSubscription' supports only the 'onSubscriptionData' or 'onData' option, but not both. Only the 'onData' option will be used.":"'onSubscriptionData' is deprecated and will be removed in a future major version. Please use the 'onData' option instead."),(null==t?void 0:t.onSubscriptionComplete)&&__DEV__&&d.warn(t.onComplete?"'useSubscription' supports only the 'onSubscriptionComplete' or 'onComplete' option, but not both. Only the 'onComplete' option will be used.":"'onSubscriptionComplete' is deprecated and will be removed in a future major version. Please use the 'onComplete' option instead."));var s=(0,I.useState)((function(){return(null==t?void 0:t.skip)?null:r.subscribe({query:e,variables:null==t?void 0:t.variables,fetchPolicy:null==t?void 0:t.fetchPolicy,context:null==t?void 0:t.context})})),u=s[0],l=s[1],c=(0,I.useRef)(!1);(0,I.useEffect)((function(){return function(){c.current=!0}}),[]);var f=(0,I.useRef)({client:r,subscription:e,options:t});return(0,I.useEffect)((function(){var n,o,i,s,u=null==t?void 0:t.shouldResubscribe;"function"==typeof u&&(u=!!u(t)),(null==t?void 0:t.skip)?(!(null==t?void 0:t.skip)!=!(null===(n=f.current.options)||void 0===n?void 0:n.skip)||c.current)&&(a({loading:!1,data:void 0,error:void 0,variables:null==t?void 0:t.variables}),l(null),c.current=!1):(!1===u||r===f.current.client&&e===f.current.subscription&&(null==t?void 0:t.fetchPolicy)===(null===(o=f.current.options)||void 0===o?void 0:o.fetchPolicy)&&!(null==t?void 0:t.skip)==!(null===(i=f.current.options)||void 0===i?void 0:i.skip)&&G(null==t?void 0:t.variables,null===(s=f.current.options)||void 0===s?void 0:s.variables))&&!c.current||(a({loading:!0,data:void 0,error:void 0,variables:null==t?void 0:t.variables}),l(r.subscribe({query:e,variables:null==t?void 0:t.variables,fetchPolicy:null==t?void 0:t.fetchPolicy,context:null==t?void 0:t.context})),c.current=!1),Object.assign(f.current,{client:r,subscription:e,options:t})}),[r,e,t,c.current]),(0,I.useEffect)((function(){if(u){var e=u.subscribe({next:function(e){var n,o,i={loading:!1,data:e.data,error:void 0,variables:null==t?void 0:t.variables};a(i),(null===(n=f.current.options)||void 0===n?void 0:n.onData)?f.current.options.onData({client:r,data:i}):(null===(o=f.current.options)||void 0===o?void 0:o.onSubscriptionData)&&f.current.options.onSubscriptionData({client:r,subscriptionData:i})},error:function(e){var n,r;a({loading:!1,data:void 0,error:e,variables:null==t?void 0:t.variables}),null===(r=null===(n=f.current.options)||void 0===n?void 0:n.onError)||void 0===r||r.call(n,e)},complete:function(){var e,t;(null===(e=f.current.options)||void 0===e?void 0:e.onComplete)?f.current.options.onComplete():(null===(t=f.current.options)||void 0===t?void 0:t.onSubscriptionComplete)&&f.current.options.onSubscriptionComplete()}});return function(){e.unsubscribe()}}}),[u]),i}(e.subscription,e);return e.children&&t?e.children(t):null}function _e(e,t){void 0===t&&(t={});var n=R(e),r=t.options,s=void 0===r?me:r,u=t.skip,l=void 0===u?ve:u,c=t.alias,d=void 0===c?"Apollo":c,f=t.shouldResubscribe,p=s;"function"!=typeof p&&(p=function(){return s});var h,m=l;return"function"!=typeof m&&(m=function(){return l}),function(r){var s="".concat(d,"(").concat(ge(r),")"),u=function(u){function l(e){var t=u.call(this,e)||this;return t.state={resubscribe:!1},t}return o(l,u),l.prototype.updateResubscribe=function(e){this.setState({resubscribe:e})},l.prototype.componentDidUpdate=function(e){var t=!(!f||!f(e,this.props));this.state.resubscribe!==t&&this.updateResubscribe(t)},l.prototype.render=function(){var o=this,u=this.props,l=m(u),c=l?Object.create(null):p(u);return!l&&!c.variables&&n.variables.length>0&&(c.variables=be(n,u)),I.createElement(Se,i({},c,{displayName:s,skip:l,subscription:e,shouldResubscribe:this.state.resubscribe}),(function(e){var n,s,c=e.data,d=a(e,["data"]);if(t.withRef&&(o.withRef=!0,u=Object.assign({},u,{ref:o.setWrappedInstance})),l)return I.createElement(r,i({},u,{}));var f=Object.assign(d,c||{}),p=t.name||"data",m=((n={})[p]=f,n);if(t.props){var v=((s={})[p]=f,s.ownProps=u,s);m=h=t.props(v,h)}return I.createElement(r,i({},u,m))}))},l.displayName=s,l.WrappedComponent=r,l}(ye);return D(u,r,{})}}function Ee(e,t){switch(void 0===t&&(t={}),R(e).type){case E.Mutation:return Ce(e,t);case E.Subscription:return _e(e,t);case E.Query:default:return we(e,t)}}Oe.propTypes={mutation:F.object.isRequired,variables:F.object,optimisticResponse:F.oneOfType([F.object,F.func]),refetchQueries:F.oneOfType([F.arrayOf(F.oneOfType([F.string,F.object])),F.func]),awaitRefetchQueries:F.bool,update:F.func,children:F.func.isRequired,onCompleted:F.func,onError:F.func,fetchPolicy:F.string},Se.propTypes={subscription:F.object.isRequired,variables:F.object,children:F.func,onSubscriptionData:F.func,onData:F.func,onSubscriptionComplete:F.func,onComplete:F.func,shouldResubscribe:F.oneOfType([F.func,F.bool])};var Pe=function(e){var t=re();return I.createElement(t.Consumer,null,(function(t){return __DEV__?d(t&&t.client,'Could not find "client" in the context of ApolloConsumer. Wrap the root component in an .'):d(t&&t.client,27),e.children(t.client)}))};function xe(e,t){void 0===t&&(t={});var n="withApollo(".concat(function(e){return e.displayName||e.name||"Component"}(e),")"),r=function(r){function a(e){var t=r.call(this,e)||this;return t.setWrappedInstance=t.setWrappedInstance.bind(t),t}return o(a,r),a.prototype.getWrappedInstance=function(){return __DEV__?d(t.withRef,"To access the wrapped instance, you need to specify { withRef: true } in the options"):d(t.withRef,30),this.wrappedInstance},a.prototype.setWrappedInstance=function(e){this.wrappedInstance=e},a.prototype.render=function(){var n=this;return I.createElement(Pe,null,(function(r){var o=Object.assign({},n.props,{client:r,ref:t.withRef?n.setWrappedInstance:void 0});return I.createElement(e,i({},o))}))},a.displayName=n,a.WrappedComponent=e,a}(I.Component);return D(r,e,{})}}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return n[e](i,i.exports,o),i.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);o.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&n;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((function(e){a[e]=function(){return n[e]}}));return a.default=function(){return n},o.d(i,a),i},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o(554),o(649),o(580),o(978),o(907),o(806),o(274)}();
\ No newline at end of file
diff --git a/client/src/components/AnchorSelectorField/AnchorSelectorField.js b/client/src/components/AnchorSelectorField/AnchorSelectorField.js
index 2bd77e81..4fc5573f 100644
--- a/client/src/components/AnchorSelectorField/AnchorSelectorField.js
+++ b/client/src/components/AnchorSelectorField/AnchorSelectorField.js
@@ -8,7 +8,7 @@ import SilverStripeComponent from 'lib/SilverStripeComponent';
import * as anchorSelectorActions from 'state/anchorSelector/AnchorSelectorActions';
import anchorSelectorStates from 'state/anchorSelector/AnchorSelectorStates';
import fieldHolder from 'components/FieldHolder/FieldHolder';
-import { Creatable } from 'react-select';
+import CreatableSelect from 'react-select/creatable';
import getFormState from 'lib/getFormState';
import classnames from 'classnames';
import PropTypes from 'prop-types';
@@ -95,6 +95,7 @@ class AnchorSelectorField extends SilverStripeComponent {
* @param {String} value
*/
handleChange(value) {
+ console.log(value);
if (typeof this.props.onChange === 'function') {
this.props.onChange(value ? value.value : '');
}
@@ -117,25 +118,23 @@ class AnchorSelectorField extends SilverStripeComponent {
}
render() {
- const inputProps = {
- id: this.props.id,
- };
const className = classnames('anchorselectorfield', this.props.extraClass);
const options = this.getDropdownOptions();
- const value = this.props.value || '';
+ const rawValue = this.props.value || '';
const placeholder = i18n._t('CMS.ANCHOR_SELECT_OR_TYPE', 'Select or enter anchor');
return (
- i18n._t('CMS.ANCHOR_NO_OPTIONS', 'No options')}
placeholder={placeholder}
- labelKey="value"
+ getOptionLabel={({ value }) => value}
+ classNamePrefix="anchorselectorfield"
/>
);
}
diff --git a/tests/behat/features/insert-anchor-link.feature b/tests/behat/features/insert-anchor-link.feature
index 74b160e2..1d0ac61d 100644
--- a/tests/behat/features/insert-anchor-link.feature
+++ b/tests/behat/features/insert-anchor-link.feature
@@ -19,12 +19,10 @@ So that I can link to a external website or a page on my site
And I press the "Insert link" HTML field button
And I click "Anchor on a page" in the ".tox-collection__group" element
Then I should see an "form#Form_editorAnchorLink" element
- And I should see "About Us" in the "#Form_editorAnchorLink_PageID_Holder .Select-multi-value-wrapper" element
- When I click "About Us" in the "#Form_editorAnchorLink_PageID_Holder .Select-multi-value-wrapper" element
- And I click "Details" in the "#Form_editorAnchorLink_PageID_Holder .Select-menu-outer" element
- And I click "Select or enter anchor" in the "#Form_editorAnchorLink_Anchor_Holder .Select-multi-value-wrapper" element
- And I click "youranchor" in the "#Form_editorAnchorLink_Anchor_Holder .Select-menu-outer" element
- Then I should see "youranchor" in the "#Form_editorAnchorLink_Anchor_Holder .Select-value" element
+ And I should see "About Us" in the ".treedropdownfield__value-container" element
+ When I select "Details" in the "#Form_editorAnchorLink_PageID_Holder" tree dropdown
+ And I select "youranchor" in the "#Form_editorAnchorLink_Anchor_Holder" anchor dropdown
+ Then I should see "youranchor" in the ".anchorselectorfield__value-container" element
When I fill in "my desc" for "Link description"
And I press the "Insert link" button
Then the "Content" HTML field should contain "awesome"
@@ -36,11 +34,9 @@ So that I can link to a external website or a page on my site
And I press the "Insert link" HTML field button
And I click "Anchor on a page" in the ".tox-collection__group" element
Then I should see an "form#Form_editorAnchorLink" element
- And I should see "About Us" in the "#Form_editorAnchorLink_PageID_Holder .Select-multi-value-wrapper" element
- When I click "Select or enter anchor" in the "#Form_editorAnchorLink_Anchor_Holder .Select-multi-value-wrapper" element
- Then I should see "dataobject-anchor" in the "#Form_editorAnchorLink_Anchor_Holder .Select-menu-outer" element
- When I click "dataobject-anchor" in the "#Form_editorAnchorLink_Anchor_Holder .Select-menu-outer" element
- Then I should see "dataobject-anchor" in the "#Form_editorAnchorLink_Anchor_Holder .Select-value" element
+ And I should see "About Us" in the ".treedropdownfield__value-container" element
+ When I select "dataobject-anchor" in the "#Form_editorAnchorLink_Anchor_Holder" anchor dropdown
+ Then I should see "dataobject-anchor" in the ".anchorselectorfield__value-container" element
When I fill in "my desc" for "Link description"
And I press the "Insert link" button
Then the "Content" HTML field should contain "awesome"
@@ -53,12 +49,11 @@ So that I can link to a external website or a page on my site
And I press the "Insert link" HTML field button
And I click "Anchor on a page" in the ".tox-collection__group" element
Then I should see an "form#Form_editorAnchorLink" element
- And I should see "About Us" in the "#Form_editorAnchorLink_PageID_Holder .Select-multi-value-wrapper" element
- When I click "Select or enter anchor" in the "#Form_editorAnchorLink_Anchor_Holder .Select-multi-value-wrapper" element
- Then I should see "unsaved-anchor" in the "#Form_editorAnchorLink_Anchor_Holder .Select-menu-outer" element
- And I should see "dataobject-anchor" in the "#Form_editorAnchorLink_Anchor_Holder .Select-menu-outer" element
- When I click "unsaved-anchor" in the "#Form_editorAnchorLink_Anchor_Holder .Select-menu-outer" element
- Then I should see "unsaved-anchor" in the "#Form_editorAnchorLink_Anchor_Holder .Select-value" element
+ And I should see "About Us" in the ".treedropdownfield__value-container" element
+ When I click on the ".anchorselectorfield__dropdown-indicator" element
+ Then I should see "dataobject-anchor" in the ".anchorselectorfield__menu-list" element
+ When I select "unsaved-anchor" in the "#Form_editorAnchorLink_Anchor_Holder" anchor dropdown
+ Then I should see "unsaved-anchor" in the ".anchorselectorfield__value-container" element
When I fill in "my desc" for "Link description"
And I press the "Insert link" button
Then the "Content" HTML field should contain "awesome"
diff --git a/tests/behat/src/FixtureContext.php b/tests/behat/src/FixtureContext.php
index b216a281..d261ec9f 100644
--- a/tests/behat/src/FixtureContext.php
+++ b/tests/behat/src/FixtureContext.php
@@ -8,6 +8,7 @@ use Behat\Mink\Element\NodeElement;
use PHPUnit\Framework\Assert;
use SilverStripe\BehatExtension\Context\BasicContext;
use SilverStripe\BehatExtension\Context\FixtureContext as BehatFixtureContext;
+use SilverStripe\BehatExtension\Utility\StepHelper;
use SilverStripe\CMS\Model\RedirectorPage;
use SilverStripe\CMS\Model\SiteTree;
use SilverStripe\Core\ClassInfo;
@@ -20,6 +21,8 @@ use SilverStripe\Versioned\Versioned;
*/
class FixtureContext extends BehatFixtureContext
{
+ use StepHelper;
+
/**
* @var BasicContext
*/
@@ -139,4 +142,33 @@ JS;
$actual = $this->getMainContext()->getSession()->evaluateScript($js);
Assert::assertEquals($expected, $actual);
}
+
+ /**
+ * Select a value in the anchor selector field
+ *
+ * @When /^I select "([^"]*)" in the "([^"]*)" anchor dropdown$/
+ */
+ public function iSelectValueInAnchorDropdown($text, $selector)
+ {
+ $page = $this->getMainContext()->getSession()->getPage();
+ /** @var NodeElement $parentElement */
+ $parentElement = null;
+ $this->retryThrowable(function () use (&$parentElement, &$page, $selector) {
+ $parentElement = $page->find('css', $selector);
+ Assert::assertNotNull($parentElement, sprintf('"%s" element not found', $selector));
+ $page = $this->getMainContext()->getSession()->getPage();
+ });
+
+ $this->retryThrowable(function () use ($parentElement, $selector) {
+ $dropdown = $parentElement->find('css', '.anchorselectorfield__dropdown-indicator');
+ Assert::assertNotNull($dropdown, sprintf('Unable to find the dropdown in "%s"', $selector));
+ $dropdown->click();
+ });
+
+ $this->retryThrowable(function () use ($text, $parentElement, $selector) {
+ $element = $parentElement->find('xpath', sprintf('//*[count(*)=0 and .="%s"]', $text));
+ Assert::assertNotNull($element, sprintf('"%s" not found in "%s"', $text, $selector));
+ $element->click();
+ });
+ }
}