(()=>{"use strict";var e,t={5585:function(e,t,r){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var a=o(r(5311));window.createPageChooser=function(e,t,r){var o=(0,a.default)("#"+e+"-chooser"),n=o.find(".title"),l=(0,a.default)("#"+e),i=o.find(".edit-link"),u=o.data("chooserUrl"),s=null;l.val()&&(s={id:l.val(),parentId:t,adminTitle:n.text(),editUrl:i.attr("href")});var c={getState:function(){return s},getValue:function(){return s&&s.id},setState:function(e){e?(l.val(e.id),n.text(e.adminTitle),o.removeClass("blank"),i.attr("href",e.editUrl)):(l.val(""),o.addClass("blank")),s=e},getTextLabel:function(e){if(!s)return null;var t=s.adminTitle;return e&&e.maxLength&&t.length>e.maxLength?t.substring(0,e.maxLength-1)+"…":t},focus:function(){(0,a.default)(".action-choose",o).focus()},openChooserModal:function(){var e=u;s&&s.parentId&&(e+=s.parentId+"/");var t={page_type:r.model_names.join(",")};r.target_pages&&(t.target_pages=r.target_pages),r.match_subclass&&(t.match_subclass=r.match_subclass),r.can_choose_root&&(t.can_choose_root="true"),r.user_perms&&(t.user_perms=r.user_perms),ModalWorkflow({url:e,urlParams:t,onload:PAGE_CHOOSER_MODAL_ONLOAD_HANDLERS,responses:{pageChosen:function(e){c.setState(e)}}})},clear:function(){c.setState(null)}};return(0,a.default)(".action-choose",o).on("click",(function(){c.openChooserModal()})),(0,a.default)(".action-clear",o).on("click",(function(){c.clear()})),c}},5311:e=>{e.exports=jQuery}},r={};function o(e){var a=r[e];if(void 0!==a)return a.exports;var n=r[e]={exports:{}};return t[e].call(n.exports,n,n.exports,o),n.exports}o.m=t,e=[],o.O=(t,r,a,n)=>{if(!r){var l=1/0;for(c=0;c<e.length;c++){for(var[r,a,n]=e[c],i=!0,u=0;u<r.length;u++)(!1&n||l>=n)&&Object.keys(o.O).every((e=>o.O[e](r[u])))?r.splice(u--,1):(i=!1,n<l&&(l=n));if(i){e.splice(c--,1);var s=a();void 0!==s&&(t=s)}}return t}n=n||0;for(var c=e.length;c>0&&e[c-1][2]>n;c--)e[c]=e[c-1];e[c]=[r,a,n]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.j=6957,(()=>{var e={6957:0};o.O.j=t=>0===e[t];var t=(t,r)=>{var a,n,[l,i,u]=r,s=0;if(l.some((t=>0!==e[t]))){for(a in i)o.o(i,a)&&(o.m[a]=i[a]);if(u)var c=u(o)}for(t&&t(r);s<l.length;s++)n=l[s],o.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return o.O(c)},r=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var a=o.O(void 0,[2751],(()=>o(5585)));a=o.O(a)})();