diff --git a/readthedocsext/theme/static/readthedocsext/theme/js/site.js b/readthedocsext/theme/static/readthedocsext/theme/js/site.js index 9e7211c7..ffcd0585 100644 --- a/readthedocsext/theme/static/readthedocsext/theme/js/site.js +++ b/readthedocsext/theme/static/readthedocsext/theme/js/site.js @@ -1,3 +1,3 @@ -(()=>{"use strict";var e,t,n,r,o,i={286:()=>{},8488:e=>{if("undefined"==typeof moment){var t=new Error("Cannot find module 'moment'");throw t.code="MODULE_NOT_FOUND",t}e.exports=moment},738:(e,t,n)=>{var r=n(9755),o=n(8527),i=n(2152),a=n(5142);function u(e){return u="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},u(e)}function c(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"body";console.debug("Attaching application to selector:",e),o.applyBindings(this,r(e)[0])}},{key:"show_modal",value:function(e){return function(t,n){var o="[data-modal-id="+e+"]";console.debug("Showing modal:",o),0===r(o).modal("show").length&&console.debug("Modal not found:",o)}}},{key:"post_child_form",value:function(e,t){var n=t.currentTarget.querySelector(":scope > form");return n&&n.submit(),!1}}],n&&c(t.prototype,n),i&&c(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();globalThis.jQuery=r;var f=n(2876),d=(n(4238),n(7239),n(8105),n(7030),n(83),n(4567),n(1714),n(5082),n(8225),n(4696),n(5812),n(2208),n(3441),n(4671),n(9610),n(4115),n(2445),n(6426),n(3150),n(8329),n(1307),n(8182),n(9755));function p(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,u=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?o-1:0),a=1;a1&&void 0!==arguments[1]&&arguments[1])&&(t.trackLocalhost=!0);var n=(0,f.Z)(t).trackEvent;return(0,(0,f.Z)(t).trackPageview)(),this.each((function(e,t){var o,i,a=r(t).data(),u=(null===(o=a.analyticsEvents)||void 0===o?void 0:o.split(/,/))||(null===(i=a.analytics)||void 0===i?void 0:i.split(/,/))||[],c={};function s(e){var r=null!=t.tagName&&"a"==t.tagName.toLowerCase(),o="auxclick"==e.type&&2==e.which,i="click"==e.type,a=r&&i&&!t.target&&!(e.ctrlKey||e.metaKey||e.shiftKey);if((o||i)&&Promise.all(u.map((function(e){return new Promise((function(t,r){n(e,{callback:t,props:c}),setTimeout((function(){r()}),1e3)}))}))).catch((function(e){console.debug("Plausible didn't receive a response for one or more event")})).finally((function(){console.debug("Plausible tracked events:",u,c),a&&t.href&&"#"!=t.href&&(console.debug("Plausible replaying click event",t.href),window.location=t.href)})),a)return e.preventDefault(),!1}Object.keys(a).forEach((function(e){var t=e.match(/analyticsProperty(.*)/);if(t){var n=p(t,2),r=(n[0],n[1]);c[r.toLowerCase()]=a[e]}})),t.addEventListener("click",s),t.addEventListener("auxclick",s)}))}function E(e){return this.each((function(t,n){d(n).find(".item").tab(e)}))}function j(e){return j="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},j(e)}function P(e,t,n){return P=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&A(o,n.prototype),o},P.apply(null,arguments)}function A(e,t){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},A(e,t)}function N(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,u=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return x(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&n.is_expanded(!0)})),this.output=o.observable(),this.output_lines=o.computed((function(){return n.output().split(/\n/).map((function(e,t){return new J({command:n,output:e,line_number:t+1})}))}),null,{deferEvaluation:!0}),this.output(t.output)}return G(e,[{key:"color_output",value:function(e){return n.e("ansi_up").then(n.t.bind(n,4431,19)).then((function(t){var n=new(0,t.default);return n.use_classes=!0,e=n.ansi_to_html(e)}))}},{key:"toggle_expanded",value:function(){return this.is_expanded(!this.is_expanded()),!1}}]),e}(),K=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0;Y(this,e),this.id=n.id,this.url_api_build=i,this.url_api_notifications=a,this.success=o.observable(n.success),this.error=o.observable(n.error),this.notifications=o.observableArray(),this.has_notifications=o.computed((function(){return t.notifications().length>0})),this.state=o.observable(n.state),this.state_display=o.observable(n.state_display),this.is_finished=o.observable(!1),this.is_loading=o.observable(!0),this.can_cancel=o.observable(!1),this.can_retry=o.observable(!1),this.can_view_docs=o.observable(!1),this.is_wrapped=o.observable(!0),this.state.subscribe((function(e){t.update_state(e)})),this.progress_config=o.computed((function(){var e=t.state(),n=["triggered","queued","cloning","installing","building","uploading","finished"];if(o.computedContext.isInitial())return{autoSuccess:!1,value:n.indexOf(e),total:n.length-1,label:t.state_display()};if(t.is_finished()){var r="cancelled"===e,i=t.error()||!1===t.success();return r?function(e){e("set warning","Build cancelled")}:i?function(e){e("set error","Build failed")}:function(e){e("set success","Build succeeded")}}return function(r){r("set progress",n.indexOf(e)),r("set label",t.state_display())}})).extend({deferred:!0}),this.date=o.observable(n.date),this.length=o.observable(n.length),this.date_display=o.observable(),this.date_display_since=o.observable(),this.length_display=o.observable(),this.date.subscribe((function(e){var n=U(e);t.date_display(n.format("llll")),t.date_display_since(n.fromNow())})),this.length.subscribe((function(e){var n;if(e)n=U.duration(e,"seconds");else{var r=U(),o=U(t.date());n=U.duration(r.diff(o))}var i=["s[s]"];n.minutes()&&i.unshift("m[m]"),n.hours()&&i.unshift("H[h]"),t.length_display(n.format(i.join(" ")))})),this.config=o.observable(),this.builder=o.observable(n.builder),this.commands=o.observableArray(n.commands),this.commit=o.observable(n.commit),this.commit_short=o.computed((function(){var e=t.commit();if(e)return e.substring(0,8)})),this.docs_url=o.observable(n.docs_url),this.commit_url=o.observable(n.commit_url),this.legacy_output=o.observable(!1),this.selected_hash=o.observable(r(location).attr("hash")),this.selected_hash.subscribe((function(e){r(location).attr("hash",e)})),this.selected_line=o.observable(),this.selected_line.subscribe((function(e){e&&e.is_selected(!1)}),this,"beforeChange"),this.selected_line.subscribe((function(e){e.command.is_debug()&&t.show_debug(!0),e.command.is_expanded(!0),e.is_selected(!0),t.selected_hash(e.anchor_id())})),this.show_debug=o.observable(!1),this.is_polling=o.observable(!0),this.is_polling.subscribe((function(e){e||t.set_selected_line_from_hash(t.selected_hash())})),this.url_api_build&&this.poll_api_build(),this.url_api_notifications&&this.poll_api_notifications()}return G(e,[{key:"poll_api_build",value:function(){var e=this;r.getJSON(this.url_api_build).then((function(t){e.date(t.date),e.success(t.success),e.error(t.error),e.length(t.length),e.commit(t.commit),e.docs_url(t.docs_url),e.commit_url(t.commit_url),e.builder(t.builder),e.config(t.config),e.state(t.state),e.state_display(t.state_display),e.date.valueHasMutated(),e.length.valueHasMutated(),e.add_command({id:0,command:"readthedocs-build --show-config",output:JSON.stringify(t.config,null," "),exit_code:0,run_time:0,is_debug:!0});var n,r=W(t.commands);try{for(r.s();!(n=r.n()).done;){var o=n.value;e.add_command(o)}}catch(e){r.e(e)}finally{r.f()}e.is_loading(!1)})).then((function(){e.is_finished()?e.is_polling(!1):setTimeout((function(){e.poll_api_build(),e.poll_api_notifications()}),2e3)}))}},{key:"poll_api_notifications",value:function(){var e=this;r.getJSON(this.url_api_notifications,{state__in:"read,unread"}).then((function(t){t.results&&e.notifications(t.results)}))}},{key:"add_command",value:function(e){var t=o.utils.arrayFirst(this.commands(),(function(t){return t.id()===e.id}));t?(t.output(e.output),t.exit_code(e.exit_code||0),t.run_time(e.run_time),t.end_time(e.end_time)):this.commands.push(new X(e))}},{key:"set_selected_line",value:function(e){this.selected_line(e);var t=document.querySelector("[data-selected=true]");return t&&(t.scrollIntoView?t.scrollIntoView({behavior:"auto",block:"center",inline:"center"}):r(t).focus()),!1}},{key:"set_selected_line_from_hash",value:function(e){if(e){var t=e.match(/^#(\d+)--(\d+)$/);if(!t)return;var n=o.utils.arrayFirst(this.commands(),(function(e){return e.id()==t[1]}));if(n){var r=o.utils.arrayFirst(n.output_lines(),(function(e){return e.line_number()==t[2]}));r&&this.set_selected_line(r)}}}},{key:"show_legacy_output",value:function(){this.legacy_output(!0)}},{key:"toggle_debug",value:function(){var e=this.show_debug();this.show_debug(!e)}},{key:"update_state",value:function(e){["finished","cancelled"].includes(e)?(this.is_finished(!0),this.can_cancel(!1),this.can_retry(!0),this.success()&&this.can_view_docs(!0)):this.can_cancel(!0)}}]),e}();function Z(e){return Z="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},Z(e)}function Q(e,t){for(var n=0;n=re[o];t.device[o](i)}}));var n=r(window),i=function(){t.viewport_width(n.width())};n.on("resize",i),i()})),ie=function(){function e(t){ne(this,e),this.id=t.id,this.url=t.url,this.loaded=o.observable(!1),this.loading=o.observable(!1),this.promise=null,this.data=o.observable()}return ee(e,[{key:"fetch",value:function(){var e=this;if(this.promise)return this.promise;this.promise=new Promise((function(t,n){if(e.loaded())return t(e.data());e.loading(!0),r.getJSON(e.url).then((function(n){return e.data(n),e.loaded(!0),e.loading(!1),t(n)}))}))}}]),e}(),ae=ee((function e(){var t=this;ne(this,e),this.config=o.observable(),this.search_project_config=o.observable(),this.config.subscribe((function(e){if(void 0!==e){var n=new URL(e.api_projects_list_url,window.location.origin);n.search="?name={query}",t.search_project_config({type:"category",apiSettings:{url:n.href,onResponse:function(e){return{results:{"category-projects":{name:"Projects",results:e.results.map((function(e,t){var n=e.slug;e.subproject_of?n="Subproject of "+e.subproject_of.name:e.translation_of&&(n=e.language.name+" translation of "+e.translation_of.name);var r=new URL(e.urls.home),o=new URL(window.location.href);return r.hostname!=o.hostname&&(r.hostname=o.hostname),{title:e.name,description:n,url:r.toString()}}))}}}}},minCharacters:2})}}))}));!function(e,t,n){(t=te(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(ae,"view_name","HeaderView"),M.add_view(ae);var ue=n(6566);function ce(e){return ce="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},ce(e)}function se(e,t){for(var n=0;n"])))}},{key:"updated",value:function(e){if(e.has("seed")&&this.seed){var t=pe.ZP.xoroshiro128plus(this.seed),n=pe.ZP.unsafeUniformIntDistribution(0,99,t),r=pe.ZP.unsafeUniformIntDistribution(0,99,t);this.style.setProperty("--avatar-x",n),this.style.setProperty("--avatar-y",r)}e.has("url")&&this.url&&this.style.setProperty("--avatar-background-image",'url("'.concat(this.url,'")'))}}])&&Ee(t.prototype,n),r&&Ee(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(de.oi);function Ce(e){return Ce="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},Ce(e)}function Ie(e,t){for(var n=0;n div {\n background-image: var(--avatar-background-image);\n background-repeat: no-repeat;\n background-size: calc(100 * -1 * var(--avatar-scale))\n calc(100 * -1 * var(--avatar-scale));\n background-position-x: calc(var(--avatar-x) * var(--avatar-scale));\n background-position-y: calc(var(--avatar-y) * var(--avatar-scale));\n image-rendering: pixelated;\n width: calc(var(--avatar-scale) * -4);\n height: calc(var(--avatar-scale) * -4);\n }\n "])))),customElements.define("readthedocs-avatar",Re);var De=function(){function e(){var t=this,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.is_collapsed=o.observable(n),this.dropdown_class=o.computed((function(){return t.is_collapsed()?"fa-caret-down":"fa-caret-up"}))}var t,n,r;return t=e,n=[{key:"toggle_collapsed",value:function(){var e=this.is_collapsed();this.is_collapsed(!e)}}],n&&Ie(t.prototype,n),r&&Ie(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Me(e){return Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me(e)}function Ue(e,t){for(var n=0;n\n \n \n '])),(0,Qe.$)({disabled:this.disabled,loading:!this.disabled&&this.state===yt.LOADING}),(null===(e=this.data)||void 0===e||null===(e=e.urls)||void 0===e?void 0:e.documentation)||"#",this.queueEvent,t,t,(0,et.g)(!this.disabled,(function(){return(0,de.dy)(We||(We=nt(["0"])))}),(function(){return(0,de.dy)(qe||(qe=nt(["-1"])))})))}}]),n}(_t);customElements.define("readthedocs-item-docs",wt);var St=function(e){at(n,e);var t=ct(n);function n(){return rt(this,n),t.apply(this,arguments)}return it(n,[{key:"render",value:function(){var e,t,n,r,o,i,a=this.label||(0,Ze.WI)("Offline formats");return(0,de.dy)($e||($e=nt(['\n \n \n \n \n "])),(0,Qe.$)({disabled:this.disabled}),a,a,(0,et.g)(this.disabled,(function(){return(0,de.dy)(Ge||(Ge=nt(["0"])))}),(function(){return(0,de.dy)(Ve||(Ve=nt(["-1"])))})),(0,Ze.WI)("Offline formats"),null===(e=this.data)||void 0===e||null===(e=e.downloads)||void 0===e?void 0:e.pdf,(0,Qe.$)({disabled:!(null!==(t=this.data)&&void 0!==t&&null!==(t=t.downloads)&&void 0!==t&&t.pdf)}),(0,Ze.WI)("PDF file"),null===(n=this.data)||void 0===n||null===(n=n.downloads)||void 0===n?void 0:n.epub,(0,Qe.$)({disabled:!(null!==(r=this.data)&&void 0!==r&&null!==(r=r.downloads)&&void 0!==r&&r.epub)}),(0,Ze.WI)("ePUB file"),null===(o=this.data)||void 0===o||null===(o=o.downloads)||void 0===o?void 0:o.htmlzip,(0,Qe.$)({disabled:!(null!==(i=this.data)&&void 0!==i&&null!==(i=i.downloads)&&void 0!==i&&i.htmlzip)}),(0,Ze.WI)("HTML archive"))}}]),n}(_t);customElements.define("readthedocs-item-downloads",St);var Ot=function(e){at(n,e);var t=ct(n);function n(){return rt(this,n),t.apply(this,arguments)}return it(n,[{key:"render",value:function(){var e,t,n=null===(e=this.data)||void 0===e||null===(e=e.permissions)||void 0===e?void 0:e.admin,r=(null===(t=this.data)||void 0===t||null===(t=t.urls)||void 0===t?void 0:t.settings)||this.urlSettings;return(0,de.dy)(Ye||(Ye=nt(['\n
','
\n \n \n ',"\n \n "])),(0,Ze.WI)("Admin"),(0,Qe.$)({disabled:!n}),r,(0,Ze.WI)("Configure project"))}}],[{key:"properties",get:function(){var e=_t.properties;return e.urlSettings={type:String,attribute:"url-settings"},e}}]),n}(_t);customElements.define("readthedocs-menu-project-admin",Ot);var Tt=n(2386),kt=n(3011); +(()=>{"use strict";var e,t,n,r,o,i={286:()=>{},8488:e=>{if("undefined"==typeof moment){var t=new Error("Cannot find module 'moment'");throw t.code="MODULE_NOT_FOUND",t}e.exports=moment},738:(e,t,n)=>{var r=n(9755),o=n(8527),i=n(2152),a=n(5142);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function s(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"body";console.debug("Attaching application to selector:",e),o.applyBindings(this,r(e)[0])}},{key:"show_modal",value:function(e){return function(t,n){var o="[data-modal-id="+e+"]";console.debug("Showing modal:",o),0===r(o).modal("show").length&&console.debug("Modal not found:",o)}}},{key:"post_child_form",value:function(e,t){var n=t.currentTarget.querySelector(":scope > form");return n&&n.submit(),!1}}],n&&s(t.prototype,n),i&&s(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();globalThis.jQuery=r;var f=n(2876),d=(n(4238),n(7239),n(8105),n(7030),n(83),n(4567),n(1714),n(5082),n(8225),n(4696),n(5812),n(2208),n(3441),n(4671),n(9610),n(4115),n(2445),n(6426),n(3150),n(8329),n(1307),n(8182),n(9755));function p(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,c=[],s=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?o-1:0),a=1;a1&&void 0!==arguments[1]&&arguments[1])&&(t.trackLocalhost=!0);var n=(0,f.Z)(t).trackEvent;return(0,(0,f.Z)(t).trackPageview)(),this.each((function(e,t){var o,i,a=r(t).data(),c=(null===(o=a.analyticsEvents)||void 0===o?void 0:o.split(/,/))||(null===(i=a.analytics)||void 0===i?void 0:i.split(/,/))||[],s={};function u(e){var r=null!=t.tagName&&"a"==t.tagName.toLowerCase(),o="auxclick"==e.type&&2==e.which,i="click"==e.type,a=r&&i&&!t.target&&!(e.ctrlKey||e.metaKey||e.shiftKey);if((o||i)&&Promise.all(c.map((function(e){return new Promise((function(t,r){n(e,{callback:t,props:s}),setTimeout((function(){r()}),1e3)}))}))).catch((function(e){console.debug("Plausible didn't receive a response for one or more event")})).finally((function(){console.debug("Plausible tracked events:",c,s),a&&t.href&&"#"!=t.href&&(console.debug("Plausible replaying click event",t.href),window.location=t.href)})),a)return e.preventDefault(),!1}Object.keys(a).forEach((function(e){var t=e.match(/analyticsProperty(.*)/);if(t){var n=p(t,2),r=(n[0],n[1]);s[r.toLowerCase()]=a[e]}})),t.addEventListener("click",u),t.addEventListener("auxclick",u)}))}function E(e){return this.each((function(t,n){d(n).find(".item").tab(e)}))}function j(e){return j="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},j(e)}function P(e,t,n){return P=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&x(o,n.prototype),o},P.apply(null,arguments)}function x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}function A(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,c=[],s=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&n.is_expanded(!0)})),this.output=o.observable(),this.output_lines=o.computed((function(){return n.output().split(/\n/).map((function(e,t){return new J({command:n,output:e,line_number:t+1})}))}),null,{deferEvaluation:!0}),this.output(t.output)}return V(e,[{key:"color_output",value:function(e){return n.e("ansi_up").then(n.t.bind(n,4431,19)).then((function(t){var n=new(0,t.default);return n.use_classes=!0,e=n.ansi_to_html(e)}))}},{key:"toggle_expanded",value:function(){return this.is_expanded(!this.is_expanded()),!1}}]),e}(),K=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0;Y(this,e),this.id=n.id,this.url_api_build=i,this.url_api_notifications=a,this.success=o.observable(n.success),this.error=o.observable(n.error),this.notifications=o.observableArray(),this.has_notifications=o.computed((function(){return t.notifications().length>0})),this.state=o.observable(n.state),this.state_display=o.observable(n.state_display),this.is_finished=o.observable(!1),this.is_loading=o.observable(!0),this.can_cancel=o.observable(!1),this.can_retry=o.observable(!1),this.can_view_docs=o.observable(!1),this.is_wrapped=o.observable(!0),this.state.subscribe((function(e){t.update_state(e)})),this.progress_config=o.computed((function(){var e=t.state(),n=["triggered","queued","cloning","installing","building","uploading","finished"];if(o.computedContext.isInitial())return{autoSuccess:!1,value:n.indexOf(e),total:n.length-1,label:t.state_display()};if(t.is_finished()){var r="cancelled"===e,i=t.error()||!1===t.success();return r?function(e){e("set warning","Build cancelled")}:i?function(e){e("set error","Build failed")}:function(e){e("set success","Build succeeded")}}return function(r){r("set progress",n.indexOf(e)),r("set label",t.state_display())}})).extend({deferred:!0}),this.date=o.observable(n.date),this.length=o.observable(n.length),this.date_display=o.observable(),this.date_display_since=o.observable(),this.length_display=o.observable(),this.date.subscribe((function(e){var n=U(e);t.date_display(n.format("llll")),t.date_display_since(n.fromNow())})),this.length.subscribe((function(e){var n;if(e)n=U.duration(e,"seconds");else{var r=U(),o=U(t.date());n=U.duration(r.diff(o))}var i=["s[s]"];n.minutes()&&i.unshift("m[m]"),n.hours()&&i.unshift("H[h]"),t.length_display(n.format(i.join(" ")))})),this.config=o.observable(),this.builder=o.observable(n.builder),this.commands=o.observableArray(n.commands),this.commit=o.observable(n.commit),this.commit_short=o.computed((function(){var e=t.commit();if(e)return e.substring(0,8)})),this.docs_url=o.observable(n.docs_url),this.commit_url=o.observable(n.commit_url),this.legacy_output=o.observable(!1),this.selected_hash=o.observable(r(location).attr("hash")),this.selected_hash.subscribe((function(e){r(location).attr("hash",e)})),this.selected_line=o.observable(),this.selected_line.subscribe((function(e){e&&e.is_selected(!1)}),this,"beforeChange"),this.selected_line.subscribe((function(e){e.command.is_debug()&&t.show_debug(!0),e.command.is_expanded(!0),e.is_selected(!0),t.selected_hash(e.anchor_id())})),this.show_debug=o.observable(!1),this.is_polling=o.observable(!0),this.is_polling.subscribe((function(e){e||t.set_selected_line_from_hash(t.selected_hash())})),this.url_api_build&&this.poll_api_build(),this.url_api_notifications&&this.poll_api_notifications()}return V(e,[{key:"poll_api_build",value:function(){var e=this;r.getJSON(this.url_api_build).then((function(t){e.date(t.date),e.success(t.success),e.error(t.error),e.length(t.length),e.commit(t.commit),e.docs_url(t.docs_url),e.commit_url(t.commit_url),e.builder(t.builder),e.config(t.config),e.state(t.state),e.state_display(t.state_display),e.date.valueHasMutated(),e.length.valueHasMutated(),e.add_command({id:0,command:"readthedocs-build --show-config",output:JSON.stringify(t.config,null," "),exit_code:0,run_time:0,is_debug:!0});var n,r=W(t.commands);try{for(r.s();!(n=r.n()).done;){var o=n.value;e.add_command(o)}}catch(e){r.e(e)}finally{r.f()}e.is_loading(!1)})).then((function(){e.is_finished()?e.is_polling(!1):setTimeout((function(){e.poll_api_build(),e.poll_api_notifications()}),2e3)}))}},{key:"poll_api_notifications",value:function(){var e=this;r.getJSON(this.url_api_notifications,{state__in:"read,unread"}).then((function(t){t.results&&e.notifications(t.results)}))}},{key:"add_command",value:function(e){var t=o.utils.arrayFirst(this.commands(),(function(t){return t.id()===e.id}));t?(t.output(e.output),t.exit_code(e.exit_code||0),t.run_time(e.run_time),t.end_time(e.end_time)):this.commands.push(new X(e))}},{key:"set_selected_line",value:function(e){this.selected_line(e);var t=document.querySelector("[data-selected=true]");return t&&(t.scrollIntoView?t.scrollIntoView({behavior:"auto",block:"center",inline:"center"}):r(t).focus()),!1}},{key:"set_selected_line_from_hash",value:function(e){if(e){var t=e.match(/^#(\d+)--(\d+)$/);if(!t)return;var n=o.utils.arrayFirst(this.commands(),(function(e){return e.id()==t[1]}));if(n){var r=o.utils.arrayFirst(n.output_lines(),(function(e){return e.line_number()==t[2]}));r&&this.set_selected_line(r)}}}},{key:"show_legacy_output",value:function(){this.legacy_output(!0)}},{key:"toggle_debug",value:function(){var e=this.show_debug();this.show_debug(!e)}},{key:"update_state",value:function(e){["finished","cancelled"].includes(e)?(this.is_finished(!0),this.can_cancel(!1),this.can_retry(!0),this.success()&&this.can_view_docs(!0)):this.can_cancel(!0)}}]),e}();function Z(e){return Z="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},Z(e)}function Q(e,t){for(var n=0;n=re[o];t.device[o](i)}}));var n=r(window),i=function(){t.viewport_width(n.width())};n.on("resize",i),i()})),ie=function(){function e(t){ne(this,e),this.id=t.id,this.url=t.url,this.loaded=o.observable(!1),this.loading=o.observable(!1),this.promise=null,this.data=o.observable()}return ee(e,[{key:"fetch",value:function(){var e=this;if(this.promise)return this.promise;this.promise=new Promise((function(t,n){if(e.loaded())return t(e.data());e.loading(!0),r.getJSON(e.url).then((function(n){return e.data(n),e.loaded(!0),e.loading(!1),t(n)}))}))}}]),e}(),ae=ee((function e(){var t=this;ne(this,e),this.config=o.observable(),this.search_project_config=o.observable(),this.config.subscribe((function(e){if(void 0!==e){var n=new URL(e.api_projects_list_url,window.location.origin);n.search="?name={query}",t.search_project_config({type:"category",apiSettings:{url:n.href,onResponse:function(e){return{results:{"category-projects":{name:"Projects",results:e.results.map((function(e,t){var n=e.slug;e.subproject_of?n="Subproject of "+e.subproject_of.name:e.translation_of&&(n=e.language.name+" translation of "+e.translation_of.name);var r=new URL(e.urls.home),o=new URL(window.location.href);return r.hostname!=o.hostname&&(r.hostname=o.hostname),{title:e.name,description:n,url:r.toString()}}))}}}}},minCharacters:2})}}))}));!function(e,t,n){(t=te(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(ae,"view_name","HeaderView"),M.add_view(ae);var ce=n(6566);function se(e){return se="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},se(e)}function ue(e,t){for(var n=0;n"])))}},{key:"updated",value:function(e){if(e.has("seed")&&this.seed){var t=pe.ZP.xoroshiro128plus(this.seed),n=pe.ZP.unsafeUniformIntDistribution(0,99,t),r=pe.ZP.unsafeUniformIntDistribution(0,99,t);this.style.setProperty("--avatar-x",n),this.style.setProperty("--avatar-y",r)}e.has("url")&&this.url&&this.style.setProperty("--avatar-background-image",'url("'.concat(this.url,'")'))}}])&&Ee(t.prototype,n),r&&Ee(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(de.oi);function Ce(e){return Ce="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},Ce(e)}function Ie(e,t){for(var n=0;n div {\n background-image: var(--avatar-background-image);\n background-repeat: no-repeat;\n background-size: calc(100 * -1 * var(--avatar-scale))\n calc(100 * -1 * var(--avatar-scale));\n background-position-x: calc(var(--avatar-x) * var(--avatar-scale));\n background-position-y: calc(var(--avatar-y) * var(--avatar-scale));\n image-rendering: pixelated;\n width: calc(var(--avatar-scale) * -4);\n height: calc(var(--avatar-scale) * -4);\n }\n "])))),customElements.define("readthedocs-avatar",Re);var De=function(){function e(){var t=this,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.is_collapsed=o.observable(n),this.dropdown_class=o.computed((function(){return t.is_collapsed()?"fa-caret-down":"fa-caret-up"}))}var t,n,r;return t=e,n=[{key:"toggle_collapsed",value:function(){var e=this.is_collapsed();this.is_collapsed(!e)}}],n&&Ie(t.prototype,n),r&&Ie(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Me(e){return Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me(e)}function Ue(e,t){for(var n=0;n\n \n \n '])),(0,Qe.$)({disabled:this.disabled,loading:!this.disabled&&this.state===yt.LOADING}),(null===(e=this.data)||void 0===e||null===(e=e.urls)||void 0===e?void 0:e.documentation)||"#",this.queueEvent,t,t,(0,et.g)(!this.disabled,(function(){return(0,de.dy)(We||(We=nt(["0"])))}),(function(){return(0,de.dy)(qe||(qe=nt(["-1"])))})))}}]),n}(_t);customElements.define("readthedocs-item-docs",wt);var St=function(e){at(n,e);var t=st(n);function n(){return rt(this,n),t.apply(this,arguments)}return it(n,[{key:"render",value:function(){var e,t,n,r,o,i,a=this.label||(0,Ze.WI)("Offline formats");return(0,de.dy)(Ge||(Ge=nt(['\n \n \n \n \n "])),(0,Qe.$)({disabled:this.disabled}),a,a,(0,et.g)(this.disabled,(function(){return(0,de.dy)(Ve||(Ve=nt(["0"])))}),(function(){return(0,de.dy)($e||($e=nt(["-1"])))})),(0,Ze.WI)("Offline formats"),null===(e=this.data)||void 0===e||null===(e=e.downloads)||void 0===e?void 0:e.pdf,(0,Qe.$)({disabled:!(null!==(t=this.data)&&void 0!==t&&null!==(t=t.downloads)&&void 0!==t&&t.pdf)}),(0,Ze.WI)("PDF file"),null===(n=this.data)||void 0===n||null===(n=n.downloads)||void 0===n?void 0:n.epub,(0,Qe.$)({disabled:!(null!==(r=this.data)&&void 0!==r&&null!==(r=r.downloads)&&void 0!==r&&r.epub)}),(0,Ze.WI)("ePUB file"),null===(o=this.data)||void 0===o||null===(o=o.downloads)||void 0===o?void 0:o.htmlzip,(0,Qe.$)({disabled:!(null!==(i=this.data)&&void 0!==i&&null!==(i=i.downloads)&&void 0!==i&&i.htmlzip)}),(0,Ze.WI)("HTML archive"))}}]),n}(_t);customElements.define("readthedocs-item-downloads",St);var Ot=function(e){at(n,e);var t=st(n);function n(){return rt(this,n),t.apply(this,arguments)}return it(n,[{key:"render",value:function(){var e,t,n=null===(e=this.data)||void 0===e||null===(e=e.permissions)||void 0===e?void 0:e.admin,r=(null===(t=this.data)||void 0===t||null===(t=t.urls)||void 0===t?void 0:t.settings)||this.urlSettings;return(0,de.dy)(Ye||(Ye=nt(['\n
','
\n \n \n ',"\n \n "])),(0,Ze.WI)("Admin"),(0,Qe.$)({disabled:!n}),r,(0,Ze.WI)("Configure project"))}}],[{key:"properties",get:function(){var e=_t.properties;return e.urlSettings={type:String,attribute:"url-settings"},e}}]),n}(_t);customElements.define("readthedocs-menu-project-admin",Ot);var Tt=n(2386),kt=n(3011); /*! @license DOMPurify 3.2.2 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.2/LICENSE */ -const{entries:Et,setPrototypeOf:jt,isFrozen:Pt,getPrototypeOf:At,getOwnPropertyDescriptor:Nt}=Object;let{freeze:xt,seal:Rt,create:Ct}=Object,{apply:It,construct:Lt}="undefined"!=typeof Reflect&&Reflect;xt||(xt=function(e){return e}),Rt||(Rt=function(e){return e}),It||(It=function(e,t,n){return e.apply(t,n)}),Lt||(Lt=function(e,t){return new e(...t)});const Dt=Jt(Array.prototype.forEach),Mt=Jt(Array.prototype.pop),Ut=Jt(Array.prototype.push),zt=Jt(String.prototype.toLowerCase),Ht=Jt(String.prototype.toString),Bt=Jt(String.prototype.match),Ft=Jt(String.prototype.replace),Wt=Jt(String.prototype.indexOf),qt=Jt(String.prototype.trim),$t=Jt(Object.prototype.hasOwnProperty),Gt=Jt(RegExp.prototype.test),Vt=(Yt=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),o=1;o2&&void 0!==arguments[2]?arguments[2]:zt;jt&&jt(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(Pt(t)||(t[r]=e),o=e)}e[o]=!0}return e}function Kt(e){for(let t=0;t/gm),bn=Rt(/\${[\w\W]*}/gm),mn=Rt(/^data-[\-\w.\u00B7-\uFFFF]/),hn=Rt(/^aria-[\-\w]+$/),vn=Rt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),yn=Rt(/^(?:\w+script|data):/i),gn=Rt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),_n=Rt(/^html$/i),wn=Rt(/^[a-z][.\w]*(-[.\w]+)+$/i);var Sn=Object.freeze({__proto__:null,ARIA_ATTR:hn,ATTR_WHITESPACE:gn,CUSTOM_ELEMENT:wn,DATA_ATTR:mn,DOCTYPE_NAME:_n,ERB_EXPR:pn,IS_ALLOWED_URI:vn,IS_SCRIPT_OR_DATA:yn,MUSTACHE_EXPR:dn,TMPLIT_EXPR:bn});const On=1,Tn=3,kn=7,En=8,jn=9,Pn=function(){return"undefined"==typeof window?null:window};var An,Nn,xn=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Pn();const n=t=>e(t);if(n.version="3.2.2",n.removed=[],!t||!t.document||t.document.nodeType!==jn)return n.isSupported=!1,n;let{document:r}=t;const o=r,i=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:u,Node:c,Element:s,NodeFilter:l,NamedNodeMap:f=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:p,trustedTypes:b}=t,m=s.prototype,h=Qt(m,"cloneNode"),v=Qt(m,"remove"),y=Qt(m,"nextSibling"),g=Qt(m,"childNodes"),_=Qt(m,"parentNode");if("function"==typeof u){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let w,S="";const{implementation:O,createNodeIterator:T,createDocumentFragment:k,getElementsByTagName:E}=r,{importNode:j}=o;let P={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof Et&&"function"==typeof _&&O&&void 0!==O.createHTMLDocument;const{MUSTACHE_EXPR:A,ERB_EXPR:N,TMPLIT_EXPR:x,DATA_ATTR:R,ARIA_ATTR:C,IS_SCRIPT_OR_DATA:I,ATTR_WHITESPACE:L,CUSTOM_ELEMENT:D}=Sn;let{IS_ALLOWED_URI:M}=Sn,U=null;const z=Xt({},[...en,...tn,...nn,...on,...un]);let H=null;const B=Xt({},[...cn,...sn,...ln,...fn]);let F=Object.seal(Ct(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),W=null,q=null,$=!0,G=!0,V=!1,Y=!0,J=!1,X=!0,K=!1,Z=!1,Q=!1,ee=!1,te=!1,ne=!1,re=!0,oe=!1,ie=!0,ae=!1,ue={},ce=null;const se=Xt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let le=null;const fe=Xt({},["audio","video","img","source","image","track"]);let de=null;const pe=Xt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),be="http://www.w3.org/1998/Math/MathML",me="http://www.w3.org/2000/svg",he="http://www.w3.org/1999/xhtml";let ve=he,ye=!1,ge=null;const _e=Xt({},[be,me,he],Ht);let we=Xt({},["mi","mo","mn","ms","mtext"]),Se=Xt({},["annotation-xml"]);const Oe=Xt({},["title","style","font","a","script"]);let Te=null;const ke=["application/xhtml+xml","text/html"];let Ee=null,je=null;const Pe=r.createElement("form"),Ae=function(e){return e instanceof RegExp||e instanceof Function},Ne=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!je||je!==e){if(e&&"object"==typeof e||(e={}),e=Zt(e),Te=-1===ke.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ee="application/xhtml+xml"===Te?Ht:zt,U=$t(e,"ALLOWED_TAGS")?Xt({},e.ALLOWED_TAGS,Ee):z,H=$t(e,"ALLOWED_ATTR")?Xt({},e.ALLOWED_ATTR,Ee):B,ge=$t(e,"ALLOWED_NAMESPACES")?Xt({},e.ALLOWED_NAMESPACES,Ht):_e,de=$t(e,"ADD_URI_SAFE_ATTR")?Xt(Zt(pe),e.ADD_URI_SAFE_ATTR,Ee):pe,le=$t(e,"ADD_DATA_URI_TAGS")?Xt(Zt(fe),e.ADD_DATA_URI_TAGS,Ee):fe,ce=$t(e,"FORBID_CONTENTS")?Xt({},e.FORBID_CONTENTS,Ee):se,W=$t(e,"FORBID_TAGS")?Xt({},e.FORBID_TAGS,Ee):{},q=$t(e,"FORBID_ATTR")?Xt({},e.FORBID_ATTR,Ee):{},ue=!!$t(e,"USE_PROFILES")&&e.USE_PROFILES,$=!1!==e.ALLOW_ARIA_ATTR,G=!1!==e.ALLOW_DATA_ATTR,V=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Y=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,J=e.SAFE_FOR_TEMPLATES||!1,X=!1!==e.SAFE_FOR_XML,K=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,Q=e.FORCE_BODY||!1,re=!1!==e.SANITIZE_DOM,oe=e.SANITIZE_NAMED_PROPS||!1,ie=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,M=e.ALLOWED_URI_REGEXP||vn,ve=e.NAMESPACE||he,we=e.MATHML_TEXT_INTEGRATION_POINTS||we,Se=e.HTML_INTEGRATION_POINTS||Se,F=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ae(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(F.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ae(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(F.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(F.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),J&&(G=!1),te&&(ee=!0),ue&&(U=Xt({},un),H=[],!0===ue.html&&(Xt(U,en),Xt(H,cn)),!0===ue.svg&&(Xt(U,tn),Xt(H,sn),Xt(H,fn)),!0===ue.svgFilters&&(Xt(U,nn),Xt(H,sn),Xt(H,fn)),!0===ue.mathMl&&(Xt(U,on),Xt(H,ln),Xt(H,fn))),e.ADD_TAGS&&(U===z&&(U=Zt(U)),Xt(U,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(H===B&&(H=Zt(H)),Xt(H,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&Xt(de,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(ce===se&&(ce=Zt(ce)),Xt(ce,e.FORBID_CONTENTS,Ee)),ie&&(U["#text"]=!0),K&&Xt(U,["html","head","body"]),U.table&&(Xt(U,["tbody"]),delete W.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Vt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Vt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=e.TRUSTED_TYPES_POLICY,S=w.createHTML("")}else void 0===w&&(w=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(b,i)),null!==w&&"string"==typeof S&&(S=w.createHTML(""));xt&&xt(e),je=e}},xe=Xt({},[...tn,...nn,...rn]),Re=Xt({},[...on,...an]),Ce=function(e){Ut(n.removed,{element:e});try{_(e).removeChild(e)}catch(t){v(e)}},Ie=function(e,t){try{Ut(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Ut(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{Ce(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Le=function(e){let t=null,n=null;if(Q)e=""+e;else{const t=Bt(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Te&&ve===he&&(e=''+e+"");const o=w?w.createHTML(e):e;if(ve===he)try{t=(new p).parseFromString(o,Te)}catch(e){}if(!t||!t.documentElement){t=O.createDocument(ve,"template",null);try{t.documentElement.innerHTML=ye?S:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),ve===he?E.call(t,K?"html":"body")[0]:K?t.documentElement:i},De=function(e){return T.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Me=function(e){return e instanceof d&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof f)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Ue=function(e){return"function"==typeof c&&e instanceof c};function ze(e,t,r){Dt(e,(e=>{e.call(n,t,r,je)}))}const He=function(e){let t=null;if(ze(P.beforeSanitizeElements,e,null),Me(e))return Ce(e),!0;const r=Ee(e.nodeName);if(ze(P.uponSanitizeElement,e,{tagName:r,allowedTags:U}),e.hasChildNodes()&&!Ue(e.firstElementChild)&&Gt(/<[/\w]/g,e.innerHTML)&&Gt(/<[/\w]/g,e.textContent))return Ce(e),!0;if(e.nodeType===kn)return Ce(e),!0;if(X&&e.nodeType===En&&Gt(/<[/\w]/g,e.data))return Ce(e),!0;if(!U[r]||W[r]){if(!W[r]&&Fe(r)){if(F.tagNameCheck instanceof RegExp&&Gt(F.tagNameCheck,r))return!1;if(F.tagNameCheck instanceof Function&&F.tagNameCheck(r))return!1}if(ie&&!ce[r]){const t=_(e)||e.parentNode,n=g(e)||e.childNodes;if(n&&t){for(let r=n.length-1;r>=0;--r){const o=h(n[r],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,y(e))}}}return Ce(e),!0}return e instanceof s&&!function(e){let t=_(e);t&&t.tagName||(t={namespaceURI:ve,tagName:"template"});const n=zt(e.tagName),r=zt(t.tagName);return!!ge[e.namespaceURI]&&(e.namespaceURI===me?t.namespaceURI===he?"svg"===n:t.namespaceURI===be?"svg"===n&&("annotation-xml"===r||we[r]):Boolean(xe[n]):e.namespaceURI===be?t.namespaceURI===he?"math"===n:t.namespaceURI===me?"math"===n&&Se[r]:Boolean(Re[n]):e.namespaceURI===he?!(t.namespaceURI===me&&!Se[r])&&!(t.namespaceURI===be&&!we[r])&&!Re[n]&&(Oe[n]||!xe[n]):!("application/xhtml+xml"!==Te||!ge[e.namespaceURI]))}(e)?(Ce(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!Gt(/<\/no(script|embed|frames)/i,e.innerHTML)?(J&&e.nodeType===Tn&&(t=e.textContent,Dt([A,N,x],(e=>{t=Ft(t,e," ")})),e.textContent!==t&&(Ut(n.removed,{element:e.cloneNode()}),e.textContent=t)),ze(P.afterSanitizeElements,e,null),!1):(Ce(e),!0)},Be=function(e,t,n){if(re&&("id"===t||"name"===t)&&(n in r||n in Pe))return!1;if(G&&!q[t]&&Gt(R,t));else if($&&Gt(C,t));else if(!H[t]||q[t]){if(!(Fe(e)&&(F.tagNameCheck instanceof RegExp&&Gt(F.tagNameCheck,e)||F.tagNameCheck instanceof Function&&F.tagNameCheck(e))&&(F.attributeNameCheck instanceof RegExp&&Gt(F.attributeNameCheck,t)||F.attributeNameCheck instanceof Function&&F.attributeNameCheck(t))||"is"===t&&F.allowCustomizedBuiltInElements&&(F.tagNameCheck instanceof RegExp&&Gt(F.tagNameCheck,n)||F.tagNameCheck instanceof Function&&F.tagNameCheck(n))))return!1}else if(de[t]);else if(Gt(M,Ft(n,L,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Wt(n,"data:")||!le[e]){if(V&&!Gt(I,Ft(n,L,"")));else if(n)return!1}else;return!0},Fe=function(e){return"annotation-xml"!==e&&Bt(e,D)},We=function(e){ze(P.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t)return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H,forceKeepAttr:void 0};let o=t.length;for(;o--;){const i=t[o],{name:a,namespaceURI:u,value:c}=i,s=Ee(a);let l="value"===a?c:qt(c);if(r.attrName=s,r.attrValue=l,r.keepAttr=!0,r.forceKeepAttr=void 0,ze(P.uponSanitizeAttribute,e,r),l=r.attrValue,!oe||"id"!==s&&"name"!==s||(Ie(a,e),l="user-content-"+l),X&&Gt(/((--!?|])>)|<\/(style|title)/i,l)){Ie(a,e);continue}if(r.forceKeepAttr)continue;if(Ie(a,e),!r.keepAttr)continue;if(!Y&&Gt(/\/>/i,l)){Ie(a,e);continue}J&&Dt([A,N,x],(e=>{l=Ft(l,e," ")}));const f=Ee(e.nodeName);if(Be(f,s,l)){if(w&&"object"==typeof b&&"function"==typeof b.getAttributeType)if(u);else switch(b.getAttributeType(f,s)){case"TrustedHTML":l=w.createHTML(l);break;case"TrustedScriptURL":l=w.createScriptURL(l)}try{u?e.setAttributeNS(u,a,l):e.setAttribute(a,l),Me(e)?Ce(e):Mt(n.removed)}catch(e){}}}ze(P.afterSanitizeAttributes,e,null)},qe=function e(t){let n=null;const r=De(t);for(ze(P.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)ze(P.uponSanitizeShadowNode,n,null),He(n)||(n.content instanceof a&&e(n.content),We(n));ze(P.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,u=null,s=null;if(ye=!e,ye&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Ue(e)){if("function"!=typeof e.toString)throw Vt("toString is not a function");if("string"!=typeof(e=e.toString()))throw Vt("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Z||Ne(t),n.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ee(e.nodeName);if(!U[t]||W[t])throw Vt("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)r=Le("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),i.nodeType===On&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!ee&&!J&&!K&&-1===e.indexOf("<"))return w&&ne?w.createHTML(e):e;if(r=Le(e),!r)return ee?null:ne?S:""}r&&Q&&Ce(r.firstChild);const l=De(ae?e:r);for(;u=l.nextNode();)He(u)||(u.content instanceof a&&qe(u.content),We(u));if(ae)return e;if(ee){if(te)for(s=k.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(H.shadowroot||H.shadowrootmode)&&(s=j.call(o,s,!0)),s}let f=K?r.outerHTML:r.innerHTML;return K&&U["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&Gt(_n,r.ownerDocument.doctype.name)&&(f="\n"+f),J&&Dt([A,N,x],(e=>{f=Ft(f,e," ")})),w&&ne?w.createHTML(f):f},n.setConfig=function(){Ne(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Z=!0},n.clearConfig=function(){je=null,Z=!1},n.isValidAttribute=function(e,t,n){je||Ne({});const r=Ee(e),o=Ee(t);return Be(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&Ut(P[e],t)},n.removeHook=function(e){return Mt(P[e])},n.removeHooks=function(e){P[e]=[]},n.removeAllHooks=function(){P={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();function Rn(e){return Rn="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},Rn(e)}function Cn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function In(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ln(e,t){for(var n=0;n\n ','\n
\n \n ',"\n
\n

","

\n \n "])),(0,Qe.$)(t),(0,et.g)(this.notification.dismissable,(function(){return(0,de.dy)(Nn||(Nn=Cn(['\n 0)setTimeout(o,2e3);else{var r=e.statusText;e.responseJSON&&(r=e.responseJSON.detail),t.reject({message:r})}}))}),2e3),t})(e).then((function(){t.resolve()})).fail((function(e){t.reject(e)}))},error:function(e){var n=e.responseJSON.detail||e.statusText;t.reject({message:n})}}),t}function gr(e){return gr="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},gr(e)}function _r(e,t){return _r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_r(e,t)}function wr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Sr(e);if(t){var o=Sr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===gr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function Sr(e){return Sr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Sr(e)}function Or(e,t){for(var n=0;n0}))})),xr=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&&_r(e,t)}(n,e);var t=wr(n);function n(){var e;return Er(this,n),(e=t.call(this)).config=o.observable(),e.search_config=o.observable(),e.selected=o.observable(),e.is_loading=o.observable(!1),e.is_syncing=o.observable(!1),e.is_selected=o.computed((function(){return void 0!==e.selected()})),e.allow_private_repos=o.observable(!1),e.error=o.observable(),e.config.subscribe((function(t){void 0!==t&&(e.allow_private_repos(t.allow_private_repos),e.init_search())})),e}return Tr(n,[{key:"sync_remote_repos",value:function(){var e=this,t=this.config(),n={url:t.urls.api_sync_remote_repositories,token:t.csrf_token};return this.is_syncing(!0),this.is_loading(!0),yr(n).fail((function(t){console.error("Error syncing remote repositories:",t.message),e.error(t.message)})).always((function(){e.is_syncing(!1),e.is_loading(!1)}))}},{key:"init_search",value:function(){var e=this,t=this.config().urls.remoterepository_list+"?full_name={query}";this.search_config({type:"knockout",templates:{knockout:function(e){var t=r("
");o.applyBindingsToNode(t[0],{template:{name:"remote-repo-results",data:{remote_repos:e.results.map((function(e){return new Nr(e)}))}}});var n=t.html();return t.remove(),n}},apiSettings:{url:t},selector:{prompt:".ui.text",title:".title .text"},fullTextSearch:!0,onSelect:function(t,n){e.selected(new Nr(t))}})}},{key:"is_repository_supported",value:function(e){return!e.is_private()||this.allow_private_repos()}}]),n}(oe);function Rr(e){return Rr="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},Rr(e)}function Cr(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Ir(e,t){for(var n=0;n\n ',"\n
\n "])),(0,rr.U)(e.results,(function(e){return(0,de.dy)(Pr||(Pr=Cr(['\n \n
\n
\n
\n ','\n \n ','\n
\n
\n ',"\n
\n
\n
\n "])),e.verbose_name,(0,Qe.$)({"fa-code-branch":"branch"===e.type,"fa-tag":"tag"===e.type}),(0,et.g)(e.active,(function(){return(0,de.dy)(Ar||(Ar=Cr(['\n \n \n Active\n \n '])))})),e.identifier)})));(0,de.sY)(n,t);var r=t.innerHTML;return t.remove(),r}}}}}]),e}();Br(qr,"view_name","ProjectVersionCreateView"),M.add_view(qr);var $r=function(e){Mr(n,e);var t=zr(n);function n(e){var r;return Dr(this,n),(r=t.call(this,e)).url_pdf=o.observable(),r.url_epub=o.observable(),r.url_html=o.observable(),r.url_docs=o.observable(),r.is_built=o.observable(!0),r.data.subscribe((function(e){r.url_pdf(e.downloads.pdf),r.url_epub(e.downloads.epub),r.url_html(e.downloads.htmlzip),r.url_docs(e.urls.documentation),r.is_built(e.built)})),r}return Lr(n,[{key:"trigger_build",value:function(e,t){return function(n,o){r.ajax({type:"POST",url:e,data:{csrfmiddlewaretoken:t}}).then((function(e){e.build.urls.build?window.location.href=e.build.urls.build:console.debug("Redirect to new build failed")})).catch((function(e){console.error(e)}))}}}]),n}(ie);Br($r,"view_name","VersionListItemView"),M.add_view($r);var Gr=function(){function e(t){Dr(this,e),this.cache_key=t,this.prefix_key="announcements",this.storage_key="".concat(this.prefix_key,".").concat(this.cache_key),this.closed=o.observable(),localStorage.getItem(this.storage_key)?this.closed(!0):this.closed(!1)}return Lr(e,[{key:"close_announcement",value:function(){this.closed(!0),localStorage.setItem(this.storage_key,!0)}}]),e}();function Vr(e){return Vr="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},Vr(e)}function Yr(e,t){for(var n=0;n select").dropdown({placeholder:""}),r("[data-content]:not([data-semanticui-popup])").popup({position:"top center",delay:{show:500},variation:"small"}),r(".ui.menu > .item[data-tab]").tab(),new i("[data-clipboard-text], [data-clipboard-target]"),r("[data-clipboard-text], [data-clipboard-target]").popup({on:"click",hoverable:!1,content:"Copied!"}),r("[data-analytics], [data-analytics-events]").plausible(this.config.production_domain,this.config.debug)}}])&&Zr(t.prototype,u),c&&Zr(t,c),Object.defineProperty(t,"prototype",{writable:!1}),e}();r(document).ready((function(){(new eo).run()}))}},a={};function u(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return i[e].call(n.exports,n,n.exports,u),n.exports}u.m=i,e=[],u.O=(t,n,r,o)=>{if(!n){var i=1/0;for(l=0;l=o)&&Object.keys(u.O).every((e=>u.O[e](n[c])))?n.splice(c--,1):(a=!1,o0&&e[l-1][2]>o;l--)e[l]=e[l-1];e[l]=[n,r,o]},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,u.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);u.r(o);var i={};t=t||[null,n({}),n([]),n(n)];for(var a=2&r&&e;"object"==typeof a&&!~t.indexOf(a);a=n(a))Object.getOwnPropertyNames(a).forEach((t=>i[t]=()=>e[t]));return i.default=()=>e,u.d(o,i),o},u.d=(e,t)=>{for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},u.f={},u.e=e=>Promise.all(Object.keys(u.f).reduce(((t,n)=>(u.f[n](e,t),t)),[])),u.u=e=>"js/vendors~"+e+".js?"+{chartjs:"88d308352093cb9caa38",ansi_up:"d27561856946166026c2"}[e],u.miniCssF=e=>{},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},o="readthedocsext-theme:",u.l=(e,t,n,i)=>{if(r[e])r[e].push(t);else{var a,c;if(void 0!==n)for(var s=document.getElementsByTagName("script"),l=0;l{a.onerror=a.onload=null,clearTimeout(p);var o=r[e];if(delete r[e],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach((e=>e(n))),t)return t(n)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.bind(null,a.onload),c&&document.head.appendChild(a)}},u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.p="./",(()=>{var e={site:0};u.f.j=(t,n)=>{var r=u.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var i=u.p+u.u(t),a=new Error;u.l(i,(n=>{if(u.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,r[1](a)}}),"chunk-"+t,t)}},u.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,[i,a,c]=n,s=0;if(i.some((t=>0!==e[t]))){for(r in a)u.o(a,r)&&(u.m[r]=a[r]);if(c)var l=c(u)}for(t&&t(n);su(286)));var c=u.O(void 0,["vendor"],(()=>u(738)));c=u.O(c)})(); \ No newline at end of file +const{entries:Et,setPrototypeOf:jt,isFrozen:Pt,getPrototypeOf:xt,getOwnPropertyDescriptor:At}=Object;let{freeze:Nt,seal:Rt,create:Ct}=Object,{apply:It,construct:Lt}="undefined"!=typeof Reflect&&Reflect;Nt||(Nt=function(e){return e}),Rt||(Rt=function(e){return e}),It||(It=function(e,t,n){return e.apply(t,n)}),Lt||(Lt=function(e,t){return new e(...t)});const Dt=Jt(Array.prototype.forEach),Mt=Jt(Array.prototype.pop),Ut=Jt(Array.prototype.push),zt=Jt(String.prototype.toLowerCase),Ht=Jt(String.prototype.toString),Bt=Jt(String.prototype.match),Ft=Jt(String.prototype.replace),Wt=Jt(String.prototype.indexOf),qt=Jt(String.prototype.trim),Gt=Jt(Object.prototype.hasOwnProperty),Vt=Jt(RegExp.prototype.test),$t=(Yt=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),o=1;o2&&void 0!==arguments[2]?arguments[2]:zt;jt&&jt(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(Pt(t)||(t[r]=e),o=e)}e[o]=!0}return e}function Kt(e){for(let t=0;t/gm),mn=Rt(/\${[\w\W]*}/gm),bn=Rt(/^data-[\-\w.\u00B7-\uFFFF]/),hn=Rt(/^aria-[\-\w]+$/),vn=Rt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),yn=Rt(/^(?:\w+script|data):/i),gn=Rt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),_n=Rt(/^html$/i),wn=Rt(/^[a-z][.\w]*(-[.\w]+)+$/i);var Sn=Object.freeze({__proto__:null,ARIA_ATTR:hn,ATTR_WHITESPACE:gn,CUSTOM_ELEMENT:wn,DATA_ATTR:bn,DOCTYPE_NAME:_n,ERB_EXPR:pn,IS_ALLOWED_URI:vn,IS_SCRIPT_OR_DATA:yn,MUSTACHE_EXPR:dn,TMPLIT_EXPR:mn});const On=1,Tn=3,kn=7,En=8,jn=9,Pn=function(){return"undefined"==typeof window?null:window};var xn,An,Nn=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Pn();const n=t=>e(t);if(n.version="3.2.2",n.removed=[],!t||!t.document||t.document.nodeType!==jn)return n.isSupported=!1,n;let{document:r}=t;const o=r,i=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:c,Node:s,Element:u,NodeFilter:l,NamedNodeMap:f=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:p,trustedTypes:m}=t,b=u.prototype,h=Qt(b,"cloneNode"),v=Qt(b,"remove"),y=Qt(b,"nextSibling"),g=Qt(b,"childNodes"),_=Qt(b,"parentNode");if("function"==typeof c){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let w,S="";const{implementation:O,createNodeIterator:T,createDocumentFragment:k,getElementsByTagName:E}=r,{importNode:j}=o;let P={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof Et&&"function"==typeof _&&O&&void 0!==O.createHTMLDocument;const{MUSTACHE_EXPR:x,ERB_EXPR:A,TMPLIT_EXPR:N,DATA_ATTR:R,ARIA_ATTR:C,IS_SCRIPT_OR_DATA:I,ATTR_WHITESPACE:L,CUSTOM_ELEMENT:D}=Sn;let{IS_ALLOWED_URI:M}=Sn,U=null;const z=Xt({},[...en,...tn,...nn,...on,...cn]);let H=null;const B=Xt({},[...sn,...un,...ln,...fn]);let F=Object.seal(Ct(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),W=null,q=null,G=!0,V=!0,$=!1,Y=!0,J=!1,X=!0,K=!1,Z=!1,Q=!1,ee=!1,te=!1,ne=!1,re=!0,oe=!1,ie=!0,ae=!1,ce={},se=null;const ue=Xt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let le=null;const fe=Xt({},["audio","video","img","source","image","track"]);let de=null;const pe=Xt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),me="http://www.w3.org/1998/Math/MathML",be="http://www.w3.org/2000/svg",he="http://www.w3.org/1999/xhtml";let ve=he,ye=!1,ge=null;const _e=Xt({},[me,be,he],Ht);let we=Xt({},["mi","mo","mn","ms","mtext"]),Se=Xt({},["annotation-xml"]);const Oe=Xt({},["title","style","font","a","script"]);let Te=null;const ke=["application/xhtml+xml","text/html"];let Ee=null,je=null;const Pe=r.createElement("form"),xe=function(e){return e instanceof RegExp||e instanceof Function},Ae=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!je||je!==e){if(e&&"object"==typeof e||(e={}),e=Zt(e),Te=-1===ke.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ee="application/xhtml+xml"===Te?Ht:zt,U=Gt(e,"ALLOWED_TAGS")?Xt({},e.ALLOWED_TAGS,Ee):z,H=Gt(e,"ALLOWED_ATTR")?Xt({},e.ALLOWED_ATTR,Ee):B,ge=Gt(e,"ALLOWED_NAMESPACES")?Xt({},e.ALLOWED_NAMESPACES,Ht):_e,de=Gt(e,"ADD_URI_SAFE_ATTR")?Xt(Zt(pe),e.ADD_URI_SAFE_ATTR,Ee):pe,le=Gt(e,"ADD_DATA_URI_TAGS")?Xt(Zt(fe),e.ADD_DATA_URI_TAGS,Ee):fe,se=Gt(e,"FORBID_CONTENTS")?Xt({},e.FORBID_CONTENTS,Ee):ue,W=Gt(e,"FORBID_TAGS")?Xt({},e.FORBID_TAGS,Ee):{},q=Gt(e,"FORBID_ATTR")?Xt({},e.FORBID_ATTR,Ee):{},ce=!!Gt(e,"USE_PROFILES")&&e.USE_PROFILES,G=!1!==e.ALLOW_ARIA_ATTR,V=!1!==e.ALLOW_DATA_ATTR,$=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Y=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,J=e.SAFE_FOR_TEMPLATES||!1,X=!1!==e.SAFE_FOR_XML,K=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,Q=e.FORCE_BODY||!1,re=!1!==e.SANITIZE_DOM,oe=e.SANITIZE_NAMED_PROPS||!1,ie=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,M=e.ALLOWED_URI_REGEXP||vn,ve=e.NAMESPACE||he,we=e.MATHML_TEXT_INTEGRATION_POINTS||we,Se=e.HTML_INTEGRATION_POINTS||Se,F=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&xe(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(F.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&xe(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(F.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(F.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),J&&(V=!1),te&&(ee=!0),ce&&(U=Xt({},cn),H=[],!0===ce.html&&(Xt(U,en),Xt(H,sn)),!0===ce.svg&&(Xt(U,tn),Xt(H,un),Xt(H,fn)),!0===ce.svgFilters&&(Xt(U,nn),Xt(H,un),Xt(H,fn)),!0===ce.mathMl&&(Xt(U,on),Xt(H,ln),Xt(H,fn))),e.ADD_TAGS&&(U===z&&(U=Zt(U)),Xt(U,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(H===B&&(H=Zt(H)),Xt(H,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&Xt(de,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(se===ue&&(se=Zt(se)),Xt(se,e.FORBID_CONTENTS,Ee)),ie&&(U["#text"]=!0),K&&Xt(U,["html","head","body"]),U.table&&(Xt(U,["tbody"]),delete W.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw $t('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw $t('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=e.TRUSTED_TYPES_POLICY,S=w.createHTML("")}else void 0===w&&(w=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(m,i)),null!==w&&"string"==typeof S&&(S=w.createHTML(""));Nt&&Nt(e),je=e}},Ne=Xt({},[...tn,...nn,...rn]),Re=Xt({},[...on,...an]),Ce=function(e){Ut(n.removed,{element:e});try{_(e).removeChild(e)}catch(t){v(e)}},Ie=function(e,t){try{Ut(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Ut(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{Ce(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Le=function(e){let t=null,n=null;if(Q)e=""+e;else{const t=Bt(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Te&&ve===he&&(e=''+e+"");const o=w?w.createHTML(e):e;if(ve===he)try{t=(new p).parseFromString(o,Te)}catch(e){}if(!t||!t.documentElement){t=O.createDocument(ve,"template",null);try{t.documentElement.innerHTML=ye?S:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),ve===he?E.call(t,K?"html":"body")[0]:K?t.documentElement:i},De=function(e){return T.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Me=function(e){return e instanceof d&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof f)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Ue=function(e){return"function"==typeof s&&e instanceof s};function ze(e,t,r){Dt(e,(e=>{e.call(n,t,r,je)}))}const He=function(e){let t=null;if(ze(P.beforeSanitizeElements,e,null),Me(e))return Ce(e),!0;const r=Ee(e.nodeName);if(ze(P.uponSanitizeElement,e,{tagName:r,allowedTags:U}),e.hasChildNodes()&&!Ue(e.firstElementChild)&&Vt(/<[/\w]/g,e.innerHTML)&&Vt(/<[/\w]/g,e.textContent))return Ce(e),!0;if(e.nodeType===kn)return Ce(e),!0;if(X&&e.nodeType===En&&Vt(/<[/\w]/g,e.data))return Ce(e),!0;if(!U[r]||W[r]){if(!W[r]&&Fe(r)){if(F.tagNameCheck instanceof RegExp&&Vt(F.tagNameCheck,r))return!1;if(F.tagNameCheck instanceof Function&&F.tagNameCheck(r))return!1}if(ie&&!se[r]){const t=_(e)||e.parentNode,n=g(e)||e.childNodes;if(n&&t){for(let r=n.length-1;r>=0;--r){const o=h(n[r],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,y(e))}}}return Ce(e),!0}return e instanceof u&&!function(e){let t=_(e);t&&t.tagName||(t={namespaceURI:ve,tagName:"template"});const n=zt(e.tagName),r=zt(t.tagName);return!!ge[e.namespaceURI]&&(e.namespaceURI===be?t.namespaceURI===he?"svg"===n:t.namespaceURI===me?"svg"===n&&("annotation-xml"===r||we[r]):Boolean(Ne[n]):e.namespaceURI===me?t.namespaceURI===he?"math"===n:t.namespaceURI===be?"math"===n&&Se[r]:Boolean(Re[n]):e.namespaceURI===he?!(t.namespaceURI===be&&!Se[r])&&!(t.namespaceURI===me&&!we[r])&&!Re[n]&&(Oe[n]||!Ne[n]):!("application/xhtml+xml"!==Te||!ge[e.namespaceURI]))}(e)?(Ce(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!Vt(/<\/no(script|embed|frames)/i,e.innerHTML)?(J&&e.nodeType===Tn&&(t=e.textContent,Dt([x,A,N],(e=>{t=Ft(t,e," ")})),e.textContent!==t&&(Ut(n.removed,{element:e.cloneNode()}),e.textContent=t)),ze(P.afterSanitizeElements,e,null),!1):(Ce(e),!0)},Be=function(e,t,n){if(re&&("id"===t||"name"===t)&&(n in r||n in Pe))return!1;if(V&&!q[t]&&Vt(R,t));else if(G&&Vt(C,t));else if(!H[t]||q[t]){if(!(Fe(e)&&(F.tagNameCheck instanceof RegExp&&Vt(F.tagNameCheck,e)||F.tagNameCheck instanceof Function&&F.tagNameCheck(e))&&(F.attributeNameCheck instanceof RegExp&&Vt(F.attributeNameCheck,t)||F.attributeNameCheck instanceof Function&&F.attributeNameCheck(t))||"is"===t&&F.allowCustomizedBuiltInElements&&(F.tagNameCheck instanceof RegExp&&Vt(F.tagNameCheck,n)||F.tagNameCheck instanceof Function&&F.tagNameCheck(n))))return!1}else if(de[t]);else if(Vt(M,Ft(n,L,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Wt(n,"data:")||!le[e]){if($&&!Vt(I,Ft(n,L,"")));else if(n)return!1}else;return!0},Fe=function(e){return"annotation-xml"!==e&&Bt(e,D)},We=function(e){ze(P.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t)return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H,forceKeepAttr:void 0};let o=t.length;for(;o--;){const i=t[o],{name:a,namespaceURI:c,value:s}=i,u=Ee(a);let l="value"===a?s:qt(s);if(r.attrName=u,r.attrValue=l,r.keepAttr=!0,r.forceKeepAttr=void 0,ze(P.uponSanitizeAttribute,e,r),l=r.attrValue,!oe||"id"!==u&&"name"!==u||(Ie(a,e),l="user-content-"+l),X&&Vt(/((--!?|])>)|<\/(style|title)/i,l)){Ie(a,e);continue}if(r.forceKeepAttr)continue;if(Ie(a,e),!r.keepAttr)continue;if(!Y&&Vt(/\/>/i,l)){Ie(a,e);continue}J&&Dt([x,A,N],(e=>{l=Ft(l,e," ")}));const f=Ee(e.nodeName);if(Be(f,u,l)){if(w&&"object"==typeof m&&"function"==typeof m.getAttributeType)if(c);else switch(m.getAttributeType(f,u)){case"TrustedHTML":l=w.createHTML(l);break;case"TrustedScriptURL":l=w.createScriptURL(l)}try{c?e.setAttributeNS(c,a,l):e.setAttribute(a,l),Me(e)?Ce(e):Mt(n.removed)}catch(e){}}}ze(P.afterSanitizeAttributes,e,null)},qe=function e(t){let n=null;const r=De(t);for(ze(P.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)ze(P.uponSanitizeShadowNode,n,null),He(n)||(n.content instanceof a&&e(n.content),We(n));ze(P.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,c=null,u=null;if(ye=!e,ye&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Ue(e)){if("function"!=typeof e.toString)throw $t("toString is not a function");if("string"!=typeof(e=e.toString()))throw $t("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Z||Ae(t),n.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ee(e.nodeName);if(!U[t]||W[t])throw $t("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof s)r=Le("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),i.nodeType===On&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!ee&&!J&&!K&&-1===e.indexOf("<"))return w&&ne?w.createHTML(e):e;if(r=Le(e),!r)return ee?null:ne?S:""}r&&Q&&Ce(r.firstChild);const l=De(ae?e:r);for(;c=l.nextNode();)He(c)||(c.content instanceof a&&qe(c.content),We(c));if(ae)return e;if(ee){if(te)for(u=k.call(r.ownerDocument);r.firstChild;)u.appendChild(r.firstChild);else u=r;return(H.shadowroot||H.shadowrootmode)&&(u=j.call(o,u,!0)),u}let f=K?r.outerHTML:r.innerHTML;return K&&U["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&Vt(_n,r.ownerDocument.doctype.name)&&(f="\n"+f),J&&Dt([x,A,N],(e=>{f=Ft(f,e," ")})),w&&ne?w.createHTML(f):f},n.setConfig=function(){Ae(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Z=!0},n.clearConfig=function(){je=null,Z=!1},n.isValidAttribute=function(e,t,n){je||Ae({});const r=Ee(e),o=Ee(t);return Be(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&Ut(P[e],t)},n.removeHook=function(e){return Mt(P[e])},n.removeHooks=function(e){P[e]=[]},n.removeAllHooks=function(){P={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();function Rn(e){return Rn="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},Rn(e)}function Cn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function In(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ln(e,t){for(var n=0;n\n ','\n
\n \n ',"\n
\n

","

\n \n "])),(0,Qe.$)(t),(0,et.g)(this.notification.dismissable,(function(){return(0,de.dy)(An||(An=Cn(['\n $lang',r='/$version';return"page"===e?"".concat(t).concat(r,"/"):"clean_url_to_html"===e?"".concat(t).concat(r,'/$file/'):"clean_url_without_trailing_slash_to_html"===e?"".concat(t).concat(r,'/$file'):"html_to_clean_url"===e?"".concat(t).concat(r,'/$file.html'):""})),this.redirect_from=o.computed((function(){var e=n.from_url(),t=n.redirect_type();return"prefix"===t?e+"faq.html":"page"===t?e.replace(/^\/+/,""):"exact"===t?e:""})),this.redirect_to_prefix=o.computed((function(){var e=n.redirect_type(),t='/$lang',r='/$version';return"prefix"===e?"".concat(t).concat(r,"/faq.html"):"page"===e?"".concat(t).concat(r,"/"):"clean_url_to_html"===e||"clean_url_without_trailing_slash_to_html"===e?"".concat(t).concat(r,'/$file.html'):"html_to_clean_url"===e?"".concat(t).concat(r,'/$file/'):""})),this.redirect_to=o.computed((function(){var e=n.to_url(),t=n.redirect_type();return"page"===t?e.replace(/^\/+/,""):"exact"===t?e:""})),this.redirect_type.subscribe((function(e){if(["prefix","page","exact"].includes(e)){n.is_example_disabled(!1);var t=!0;"prefix"==e&&(t=!1),n.is_from_url_visible(!0),n.is_to_url_visible(t)}else["clean_url_to_html","clean_url_without_trailing_slash_to_html","html_to_clean_url"].includes(e)?(n.is_example_disabled(!1),n.is_from_url_visible(!1),n.is_to_url_visible(!1)):(n.is_example_disabled(!0),n.is_from_url_visible(!1),n.is_to_url_visible(!1))}))}));fr(mr,"view_name","ProjectRedirectView"),M.add_view(mr);var br=ur((function e(t){var n=this;lr(this,e),this.access_type=o.observable(),this.show_password_field=o.computed((function(){return"password"==n.access_type()})),this.allow_all=o.observable(t.allow_all),this.show_versions_list=o.computed((function(){return!1===n.allow_all()}))}));fr(br,"view_name","ProjectTemporaryAccessView"),M.add_view(br);var hr=ur((function e(){var t=this;lr(this,e),this.config=o.observable(),this.is_loading=o.observable(!0),this.config.subscribe((function(e){t.is_loading(!1)}))}));fr(hr,"view_name","ProjectSearchAnalyticsView"),M.add_view(hr);var vr=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&&ir(e,t)}(n,e);var t=ar(n);function n(){return lr(this,n),t.apply(this,arguments)}return ur(n)}(hr);function yr(e){var t=r.Deferred(),n=e.url,o={csrfmiddlewaretoken:e.token};return r.ajax({method:"POST",url:n,data:o,success:function(e){(function(e){var t=r.Deferred(),n=5;return setTimeout((function o(){r.getJSON(e.url).done((function(e){e.finished?e.success?t.resolve():t.reject({message:e.error}):setTimeout(o,2e3)})).fail((function(e){if(console.error("Error polling task"),(n-=1)>0)setTimeout(o,2e3);else{var r=e.statusText;e.responseJSON&&(r=e.responseJSON.detail),t.reject({message:r})}}))}),2e3),t})(e).then((function(){t.resolve()})).fail((function(e){t.reject(e)}))},error:function(e){var n=e.responseJSON.detail||e.statusText;t.reject({message:n})}}),t}function gr(e){return gr="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},gr(e)}function _r(e,t){return _r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_r(e,t)}function wr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Sr(e);if(t){var o=Sr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===gr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function Sr(e){return Sr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Sr(e)}function Or(e,t){for(var n=0;n0}))})),Nr=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&&_r(e,t)}(n,e);var t=wr(n);function n(){var e;return Er(this,n),(e=t.call(this)).config=o.observable(),e.search_config=o.observable(),e.selected=o.observable(),e.is_loading=o.observable(!1),e.is_syncing=o.observable(!1),e.is_selected=o.computed((function(){return void 0!==e.selected()})),e.allow_private_repos=o.observable(!1),e.error=o.observable(),e.config.subscribe((function(t){void 0!==t&&(e.allow_private_repos(t.allow_private_repos),e.init_search())})),e}return Tr(n,[{key:"sync_remote_repos",value:function(){var e=this,t=this.config(),n={url:t.urls.api_sync_remote_repositories,token:t.csrf_token};return this.is_syncing(!0),this.is_loading(!0),yr(n).fail((function(t){console.error("Error syncing remote repositories:",t.message),e.error(t.message)})).always((function(){e.is_syncing(!1),e.is_loading(!1)}))}},{key:"init_search",value:function(){var e=this,t=this.config().urls.remoterepository_list+"?full_name={query}";this.search_config({type:"knockout",templates:{knockout:function(e){var t=r("
");o.applyBindingsToNode(t[0],{template:{name:"remote-repo-results",data:{remote_repos:e.results.map((function(e){return new Ar(e)}))}}});var n=t.html();return t.remove(),n}},apiSettings:{url:t},selector:{prompt:".ui.text",title:".title .text"},fullTextSearch:!0,onSelect:function(t,n){e.selected(new Ar(t))}})}},{key:"is_repository_supported",value:function(e){return!e.is_private()||this.allow_private_repos()}}]),n}(oe);function Rr(e){return Rr="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},Rr(e)}function Cr(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Ir(e,t){for(var n=0;n\n ',"\n
\n "])),(0,rr.U)(e.results,(function(e){return(0,de.dy)(Pr||(Pr=Cr(['\n \n
\n
\n
\n ','\n \n ','\n
\n
\n ',"\n
\n
\n
\n "])),e.verbose_name,(0,Qe.$)({"fa-code-branch":"branch"===e.type,"fa-tag":"tag"===e.type}),(0,et.g)(e.active,(function(){return(0,de.dy)(xr||(xr=Cr(['\n \n \n Active\n \n '])))})),e.identifier)})));(0,de.sY)(n,t);var r=t.innerHTML;return t.remove(),r}}}}}]),e}();Br(qr,"view_name","ProjectVersionCreateView"),M.add_view(qr);var Gr=function(e){Mr(n,e);var t=zr(n);function n(e){var r;return Dr(this,n),(r=t.call(this,e)).url_pdf=o.observable(),r.url_epub=o.observable(),r.url_html=o.observable(),r.url_docs=o.observable(),r.is_built=o.observable(!0),r.data.subscribe((function(e){r.url_pdf(e.downloads.pdf),r.url_epub(e.downloads.epub),r.url_html(e.downloads.htmlzip),r.url_docs(e.urls.documentation),r.is_built(e.built)})),r}return Lr(n,[{key:"trigger_build",value:function(e,t){return function(n,o){r.ajax({type:"POST",url:e,data:{csrfmiddlewaretoken:t}}).then((function(e){e.build.urls.build?window.location.href=e.build.urls.build:console.debug("Redirect to new build failed")})).catch((function(e){console.error(e)}))}}}]),n}(ie);Br(Gr,"view_name","VersionListItemView"),M.add_view(Gr);var Vr=function(){function e(t){Dr(this,e),this.cache_key=t,this.prefix_key="announcements",this.storage_key="".concat(this.prefix_key,".").concat(this.cache_key),this.closed=o.observable(),localStorage.getItem(this.storage_key)?this.closed(!0):this.closed(!1)}return Lr(e,[{key:"close_announcement",value:function(){this.closed(!0),localStorage.setItem(this.storage_key,!0)}}]),e}();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)}function Yr(e,t){for(var n=0;n select").dropdown({placeholder:""}),r("[data-content]:not([data-semanticui-popup])").popup({position:"top center",delay:{show:500},variation:"small"}),r(".ui.menu > .item[data-tab]").tab(),new i("[data-clipboard-text], [data-clipboard-target]"),r("[data-clipboard-text], [data-clipboard-target]").popup({on:"click",hoverable:!1,content:"Copied!"}),r("[data-analytics], [data-analytics-events]").plausible(this.config.production_domain,this.config.debug)}}])&&Zr(t.prototype,c),s&&Zr(t,s),Object.defineProperty(t,"prototype",{writable:!1}),e}();r(document).ready((function(){(new eo).run()}))}},a={};function c(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return i[e].call(n.exports,n,n.exports,c),n.exports}c.m=i,e=[],c.O=(t,n,r,o)=>{if(!n){var i=1/0;for(l=0;l=o)&&Object.keys(c.O).every((e=>c.O[e](n[s])))?n.splice(s--,1):(a=!1,o0&&e[l-1][2]>o;l--)e[l]=e[l-1];e[l]=[n,r,o]},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);c.r(o);var i={};t=t||[null,n({}),n([]),n(n)];for(var a=2&r&&e;"object"==typeof a&&!~t.indexOf(a);a=n(a))Object.getOwnPropertyNames(a).forEach((t=>i[t]=()=>e[t]));return i.default=()=>e,c.d(o,i),o},c.d=(e,t)=>{for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce(((t,n)=>(c.f[n](e,t),t)),[])),c.u=e=>"js/vendors~"+e+".js?"+{chartjs:"88d308352093cb9caa38",ansi_up:"d27561856946166026c2"}[e],c.miniCssF=e=>{},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},o="readthedocsext-theme:",c.l=(e,t,n,i)=>{if(r[e])r[e].push(t);else{var a,s;if(void 0!==n)for(var u=document.getElementsByTagName("script"),l=0;l{a.onerror=a.onload=null,clearTimeout(p);var o=r[e];if(delete r[e],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach((e=>e(n))),t)return t(n)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.bind(null,a.onload),s&&document.head.appendChild(a)}},c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.p="./",(()=>{var e={site:0};c.f.j=(t,n)=>{var r=c.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var i=c.p+c.u(t),a=new Error;c.l(i,(n=>{if(c.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,r[1](a)}}),"chunk-"+t,t)}},c.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,[i,a,s]=n,u=0;if(i.some((t=>0!==e[t]))){for(r in a)c.o(a,r)&&(c.m[r]=a[r]);if(s)var l=s(c)}for(t&&t(n);uc(286)));var s=c.O(void 0,["vendor"],(()=>c(738)));s=c.O(s)})(); \ No newline at end of file diff --git a/readthedocsext/theme/templates/projects/redirect_form.html b/readthedocsext/theme/templates/projects/redirect_form.html index 6812bb18..5954a5fd 100644 --- a/readthedocsext/theme/templates/projects/redirect_form.html +++ b/readthedocsext/theme/templates/projects/redirect_form.html @@ -1,8 +1,8 @@ {% extends "projects/redirect_list.html" %} -{% load i18n %} -{% load crispy_forms_tags %} -{% load ext_theme_tags %} +{% load trans from i18n %} +{% load crispy from crispy_forms_tags %} +{% load alter_field from ext_theme_tags %} {% block project_edit_content_subheader %} {% if object %} @@ -10,30 +10,34 @@ {% else %} {% trans "Add redirect" %} {% endif %} -{% endblock %} +{% endblock project_edit_content_subheader %} {% block project_edit_content %} -
+ {% csrf_token %} {% alter_field form.redirect_type data_bind="valueInit: redirect_type" %} {% alter_field form.from_url data_bind="valueInit: from_url, textInput: from_url, enable: is_from_url_visible" %} {% alter_field form.to_url data_bind="valueInit: to_url, textInput: to_url, enable: is_to_url_visible" %} {{ form|crispy }} -
-
+
+ @@ -41,4 +45,4 @@ -{% endblock %} +{% endblock project_edit_content %} diff --git a/src/js/project/admin.js b/src/js/project/admin.js index 980411c1..3687cf5d 100644 --- a/src/js/project/admin.js +++ b/src/js/project/admin.js @@ -47,35 +47,63 @@ export class ProjectRedirectView { this.is_from_url_visible = ko.observable(); this.is_to_url_visible = ko.observable(); + // HTML prefix content for from field, don't use user input here + this.redirect_from_prefix = ko.computed(() => { + const redirect_type = this.redirect_type(); + const lang_part = `/$lang`; + const version_part = `/$version`; + + if (redirect_type === "page") { + return `${lang_part}${version_part}/`; + } else if (redirect_type === "clean_url_to_html") { + return `${lang_part}${version_part}/$file/`; + } else if (redirect_type === "clean_url_without_trailing_slash_to_html") { + return `${lang_part}${version_part}/$file`; + } else if (redirect_type === "html_to_clean_url") { + return `${lang_part}${version_part}/$file.html`; + } + return ""; + }); + // User input for from field as text, no HTML allowed this.redirect_from = ko.computed(() => { - var from_url = this.from_url(); - var redirect_type = this.redirect_type(); + const from_url = this.from_url(); + const redirect_type = this.redirect_type(); if (redirect_type === "prefix") { return from_url + "faq.html"; } else if (redirect_type === "page") { - return "/$lang/$version/" + from_url.replace(/^\/+/, ""); + return from_url.replace(/^\/+/, ""); } else if (redirect_type === "exact") { return from_url; + } + return ""; + }); + // HTML prefix content for to field, don't use user input here. + this.redirect_to_prefix = ko.computed(() => { + const redirect_type = this.redirect_type(); + const lang_part = `/$lang`; + const version_part = `/$version`; + + if (redirect_type === "prefix") { + return `${lang_part}${version_part}/faq.html`; + } else if (redirect_type === "page") { + return `${lang_part}${version_part}/`; } else if (redirect_type === "clean_url_to_html") { - return "/$lang/$version/$file/"; + return `${lang_part}${version_part}/$file.html`; } else if (redirect_type === "clean_url_without_trailing_slash_to_html") { - return "/$lang/$version/$file"; + return `${lang_part}${version_part}/$file.html`; + } else if (redirect_type === "html_to_clean_url") { + return `${lang_part}${version_part}/$file/`; } return ""; }); + // User input for to field as text, no HTML allowed this.redirect_to = ko.computed(() => { const to_url = this.to_url(); const redirect_type = this.redirect_type(); - if (redirect_type === "prefix") { - return "/$lang/$version/faq.html"; - } else if (redirect_type === "page") { - return "/$lang/$version/" + to_url.replace(/^\/+/, ""); + if (redirect_type === "page") { + return to_url.replace(/^\/+/, ""); } else if (redirect_type === "exact") { return to_url; - } else if (redirect_type === "clean_url_to_html") { - return "/$lang/$version/$file.html"; - } else if (redirect_type === "clean_url_without_trailing_slash_to_html") { - return "/$lang/$version/$file.html"; } return ""; }); @@ -95,6 +123,7 @@ export class ProjectRedirectView { [ "clean_url_to_html", "clean_url_without_trailing_slash_to_html", + "html_to_clean_url", ].includes(redirect_type) ) { this.is_example_disabled(false);