diff --git a/readthedocsext/theme/static/readthedocsext/theme/js/site.js b/readthedocsext/theme/static/readthedocsext/theme/js/site.js index 16545407..c8d680bd 100644 --- a/readthedocsext/theme/static/readthedocsext/theme/js/site.js +++ b/readthedocsext/theme/static/readthedocsext/theme/js/site.js @@ -1 +1 @@ -(()=>{"use strict";var e,t,r,n,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},854:(e,t,r)=>{var n=r(9755),o=r(8527),i=r(2152);function a(e){return a="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},a(e)}function u(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:"body";console.debug("Attaching application to selector:",e),o.applyBindings(this,n(e)[0])}},{key:"show_modal",value:function(e){return function(t,r){var o="[data-modal-id="+e+"]";console.debug("Showing modal:",o),0===n(o).modal("show").length&&console.debug("Modal not found:",o)}}},{key:"post_child_form",value:function(e,t){var r=t.currentTarget.querySelector(":scope > form");return r&&r.submit(),!1}}],r&&u(t.prototype,r),i&&u(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();globalThis.jQuery=n;var l=r(2876),f=(r(4238),r(7239),r(8105),r(7030),r(83),r(4567),r(1714),r(5082),r(8225),r(4696),r(5812),r(2208),r(3441),r(4671),r(9610),r(4115),r(2445),r(6426),r(3150),r(8329),r(1307),r(8182),r(9755));function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||b(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){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1?o-1:0),a=1;a1&&void 0!==arguments[1]&&arguments[1])&&(t.trackLocalhost=!0);var r=(0,l.Z)(t).trackEvent;return(0,(0,l.Z)(t).trackPageview)(),this.each((function(e,t){function n(e){var n=t.getAttribute("data-analytics").split(/,(.+)/),o=null!=t.tagName&&"a"==t.tagName.toLowerCase(),i="auxclick"==e.type&&2==e.which,a="click"==e.type,u=o&&a&&!t.target&&!(e.ctrlKey||e.metaKey||e.shiftKey);if(i||a){var c,s=function(){u&&t.href&&"#"!=t.href&&(console.debug("Plausible: resuming redirect to",t.href),location.href=t.href)},l=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=b(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},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(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(n);try{var f=function(){var e=c.value;r(e,{callback:function(){console.debug("Plausible: tracked event",e),s()}}),setTimeout((function(){console.debug("Plausible: didn't receive response, continuing anyways"),s()}),150)};for(l.s();!(c=l.n()).done;)f()}catch(e){l.e(e)}finally{l.f()}}u&&e.preventDefault()}t.addEventListener("click",n),t.addEventListener("auxclick",n)}))}function k(e){return this.each((function(t,r){f(r).find(".item").tab(e)}))}function T(e){return T="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},T(e)}function x(e,t,r){return x=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,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&E(o,r.prototype),o},x.apply(null,arguments)}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.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 C(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return C(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 C(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&r.is_expanded(!0)})),this.output=o.observable(),this.output_lines=o.computed((function(){return r.output().split(/\n/).map((function(e,t){return new Z({command:r,output:e,line_number:t+1})}))}),null,{deferEvaluation:!0}),this.output(t.output)}return K(e,[{key:"color_output",value:function(e){return Promise.all([r.e("ansi_up").then(r.t.bind(r,4431,19)).then((function(e){return e.default})),r.e("sanitize-html").then(r.t.bind(r,1036,19)).then((function(e){return e.default}))]).then((function(t){var r,n,o=J(t,2);r=o[0],n=o[1];var i=new r;return i.use_classes=!0,e=n(e=i.ansi_to_html(e),{allowedTags:["span"],allowedAttributes:{span:["class"]}})}))}},{key:"toggle_expanded",value:function(){return this.is_expanded(!this.is_expanded()),!1}}]),e}(),Y=function(){function e(){var t=this,r=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;W(this,e),this.id=r.id,this.url_api_build=i,this.url_api_notifications=a,this.success=o.observable(r.success),this.error=o.observable(r.error),this.notifications=o.observableArray(),this.has_notifications=o.computed((function(){return t.notifications().length>0})),this.state=o.observable(r.state),this.state_display=o.observable(r.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.state.subscribe((function(e){t.update_state(e)})),this.progress_config=o.computed((function(){var e=t.state(),r=["triggered","queued","cloning","installing","building","uploading","finished"];if(o.computedContext.isInitial())return{autoSuccess:!1,value:r.indexOf(e),total:r.length-1,label:t.state_display()};if(t.is_finished()){var n="cancelled"===e,i=t.error()||!1===t.success();return n?function(e){e("set warning","Build cancelled")}:i?function(e){e("set error","Build failed")}:function(e){e("set success","Build succeeded")}}return function(n){n("set progress",r.indexOf(e)),n("set label",t.state_display())}})).extend({deferred:!0}),this.date=o.observable(r.date),this.length=o.observable(r.length),this.date_display=o.observable(),this.date_display_since=o.observable(),this.length_display=o.observable(),q.extend(U),q.extend(D),q.extend(z),this.date.subscribe((function(e){var r=q(e);t.date_display(r.format("llll")),t.date_display_since(r.fromNow())})),this.length.subscribe((function(e){t.length_display(q.duration(e,"seconds").humanize())})),this.config=o.observable(),this.builder=o.observable(r.builder),this.commands=o.observableArray(r.commands),this.commit=o.observable(r.commit),this.commit_short=o.computed((function(){var e=t.commit();if(e)return e.substring(0,8)})),this.docs_url=o.observable(r.docs_url),this.commit_url=o.observable(r.commit_url),this.legacy_output=o.observable(!1),this.selected_hash=o.observable(n(location).attr("hash")),this.selected_hash.subscribe((function(e){n(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_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 K(e,[{key:"poll_api_build",value:function(){var e=this;n.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.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 r,n=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=$(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},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(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(t.commands);try{for(n.s();!(r=n.n()).done;){var o=r.value;e.add_command(o)}}catch(e){n.e(e)}finally{n.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;n.getJSON(this.url_api_notifications,{state__in:"read,unread"}).then((function(t){t.results&&e.notifications(t.results)}))}},{key:"add_command",value:function(e){o.utils.arrayFirst(this.commands(),(function(t){return t.id()===e.id}))||this.commands.push(new Q(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"}):n(t).focus()),!1}},{key:"set_selected_line_from_hash",value:function(e){if(e){var t=e.match(/^#(\d+)--(\d+)$/);if(!t)return;var r=o.utils.arrayFirst(this.commands(),(function(e){return e.id()==t[1]}));if(r){var n=o.utils.arrayFirst(r.output_lines(),(function(e){return e.line_number()==t[2]}));n&&this.set_selected_line(n)}}}},{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 G(e){return G="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},G(e)}function ee(e,t){for(var r=0;r=oe[o];t.device[o](i)}}));var r=n(window),i=function(){t.viewport_width(r.width())};r.on("resize",i),i()})),ae=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 te(e,[{key:"fetch",value:function(){var e=this;if(this.promise)return this.promise;this.promise=new Promise((function(t,r){if(e.loaded())return t(e.data());e.loading(!0),n.getJSON(e.url).then((function(r){return e.data(r),e.loaded(!0),e.loading(!1),t(r)}))}))}}]),e}(),ue=te((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 r=new URL(e.api_projects_list_url,window.location.origin);r.search="?name={query}",t.search_project_config({type:"category",apiSettings:{url:r.href,onResponse:function(e){return{results:{"category-projects":{name:"Projects",results:e.results.map((function(e,t){var r=e.slug;e.subproject_of?r="Subproject of "+e.subproject_of.name:e.translation_of&&(r=e.language.name+" translation of "+e.translation_of.name);var n=new URL(e.urls.home),o=new URL(window.location.href);return n.hostname!=o.hostname&&(n.hostname=o.hostname),{title:e.name,description:r,url:n.toString()}}))}}}}},minCharacters:2})}}))}));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){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return le(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return le(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},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(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function le(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&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(r),this.dropdown_class=o.computed((function(){return t.is_collapsed()?"fa-caret-down":"fa-caret-up"}))}var t,r,n;return t=e,r=[{key:"toggle_collapsed",value:function(){var e=this.is_collapsed();this.is_collapsed(!e)}}],r&&je(t.prototype,r),n&&je(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ke(e){return ke="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},ke(e)}function Te(e,t){for(var r=0;r\n ','\n
\n \n ',"\n
\n

","

\n \n "])),(0,rt.$)(t),(0,tt.g)(this.notification.dismissable,(function(){return(0,Ce.dy)(Ge||(Ge=it(['\n 0)setTimeout(o,2e3);else{var n=e.statusText;e.responseJSON&&(n=e.responseJSON.detail),t.reject({message:n})}}))}),2e3),t})(e).then((function(){t.resolve()})).fail((function(e){t.reject(e)}))},error:function(e){var r=e.responseJSON.detail||e.statusText;t.reject({message:r})}}),t}function Ht(e){return Ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ht(e)}function Jt(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&&$t(e,t)}function $t(e,t){return $t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$t(e,t)}function Mt(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 r,n=Ft(e);if(t){var o=Ft(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===Ht(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,r)}}function Ft(e){return Ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ft(e)}function Kt(e,t,r){return(t=Zt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xt(e,t){for(var r=0;r0}))})),Gt=function(e){Jt(r,e);var t=Mt(r);function r(){var e;return Qt(this,r),(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 Wt(r,[{key:"sync_remote_repos",value:function(){var e=this,t=this.config(),r={url:t.urls.api_sync_remote_repositories,token:t.csrf_token};return this.is_syncing(!0),this.is_loading(!0),zt(r).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+"?expand=projects&full_name={query}";this.search_config({type:"knockout",templates:{knockout:function(e){var t=n("
");o.applyBindingsToNode(t[0],{template:{name:"remote-repo-results",data:{remote_repos:e.results.map((function(e){return new Yt(e)}))}}});var r=t.html();return t.remove(),r}},apiSettings:{url:t},selector:{prompt:".ui.text",title:".title .text"},fullTextSearch:!0,onSelect:function(t,r){e.selected(new Yt(t))}})}},{key:"is_repository_supported",value:function(e){return!e.is_private()||this.allow_private_repos()}}]),r}(ie);Kt(Gt,"view_name","ProjectCreateView"),V.add_view(Gt);var er,tr,rr,nr=function(e){Jt(r,e);var t=Mt(r);function r(){var e;Qt(this,r),e=t.call(this);var o=JSON.parse(document.querySelector("#organizations-teams").text.replace(/\\u0027/g,'"'));return n(".ui.search").search({type:"category",minCharacters:1,source:o,searchFields:["title","description"],fullTextSearch:!1}),e}return Wt(r)}(ie);function or(e){return or="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},or(e)}function ir(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ar(e,t){for(var r=0;r\n ',"\n
\n "])),(0,kt.U)(e.results,(function(e){return(0,Ce.dy)(tr||(tr=ir(['\n \n
\n
\n
\n ','\n \n ','\n
\n
\n ',"\n
\n
\n
\n "])),e.verbose_name,(0,rt.$)({"fa-code-branch":"branch"===e.type,"fa-tag":"tag"===e.type}),(0,tt.g)(e.active,(function(){return(0,Ce.dy)(rr||(rr=ir(['\n \n \n Active\n \n '])))})),e.identifier)})));(0,Ce.sY)(r,t);var n=t.innerHTML;return t.remove(),n}}}}}]),e}();br(yr,"view_name","ProjectVersionCreateView"),V.add_view(yr);var hr=function(e){sr(r,e);var t=fr(r);function r(e){var n;return cr(this,r),(n=t.call(this,e)).url_pdf=o.observable(),n.url_epub=o.observable(),n.url_html=o.observable(),n.url_docs=o.observable(),n.is_built=o.observable(!0),n.data.subscribe((function(e){n.url_pdf(e.downloads.pdf),n.url_epub(e.downloads.epub),n.url_html(e.downloads.html),n.url_docs(e.urls.documentation),n.is_built(e.built)})),n}return ur(r,[{key:"trigger_build",value:function(e,t){return function(r,o){n.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)}))}}}]),r}(ae);br(hr,"view_name","VersionListItemView"),V.add_view(hr);var mr=function(){function e(t){cr(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 ur(e,[{key:"close_announcement",value:function(){this.closed(!0),localStorage.setItem(this.storage_key,!0)}}]),e}();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){for(var r=0;r select").dropdown({placeholder:""}),n("[data-content]:not([data-semanticui-popup])").popup({position:"top center",delay:{show:500},variation:"small"}),n(".ui.menu > .item[data-tab]").tab(),new i("[data-clipboard-text], [data-clipboard-target]"),n("[data-clipboard-text], [data-clipboard-target]").popup({on:"click",hoverable:!1,content:"Copied!"}),n("[data-analytics]").plausible(this.config.production_domain,this.config.debug)}}])&&_r(t.prototype,a),u&&_r(t,u),Object.defineProperty(t,"prototype",{writable:!1}),e}();n(document).ready((function(){(new Sr).run()}))}},a={};function u(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}};return i[e].call(r.exports,r,r.exports,u),r.exports}u.m=i,e=[],u.O=(t,r,n,o)=>{if(!r){var i=1/0;for(l=0;l=o)&&Object.keys(u.O).every((e=>u.O[e](r[c])))?r.splice(c--,1):(a=!1,o0&&e[l-1][2]>o;l--)e[l]=e[l-1];e[l]=[r,n,o]},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,u.t=function(e,n){if(1&n&&(e=this(e)),8&n)return e;if("object"==typeof e&&e){if(4&n&&e.__esModule)return e;if(16&n&&"function"==typeof e.then)return e}var o=Object.create(null);u.r(o);var i={};t=t||[null,r({}),r([]),r(r)];for(var a=2&n&&e;"object"==typeof a&&!~t.indexOf(a);a=r(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 r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.f={},u.e=e=>Promise.all(Object.keys(u.f).reduce(((t,r)=>(u.f[r](e,t),t)),[])),u.u=e=>"js/vendors~"+e+".js?"+{chartjs:"88d308352093cb9caa38",ansi_up:"d27561856946166026c2","sanitize-html":"fe70b4790c12dedf5bc9"}[e],u.miniCssF=e=>{},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},o="readthedocsext-theme:",u.l=(e,t,r,i)=>{if(n[e])n[e].push(t);else{var a,c;if(void 0!==r)for(var s=document.getElementsByTagName("script"),l=0;l{a.onerror=a.onload=null,clearTimeout(b);var o=n[e];if(delete n[e],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach((e=>e(r))),t)return t(r)},b=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,r)=>{var n=u.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var o=new Promise(((r,o)=>n=e[t]=[r,o]));r.push(n[2]=o);var i=u.p+u.u(t),a=new Error;u.l(i,(r=>{if(u.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,n[1](a)}}),"chunk-"+t,t)}},u.O.j=t=>0===e[t];var t=(t,r)=>{var n,o,[i,a,c]=r,s=0;if(i.some((t=>0!==e[t]))){for(n in a)u.o(a,n)&&(u.m[n]=a[n]);if(c)var l=c(u)}for(t&&t(r);su(286)));var c=u.O(void 0,["vendor"],(()=>u(854)));c=u.O(c)})(); \ No newline at end of file +(()=>{"use strict";var e,t,r,n,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},854:(e,t,r)=>{var n=r(9755),o=r(8527),i=r(2152);function a(e){return a="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},a(e)}function u(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:"body";console.debug("Attaching application to selector:",e),o.applyBindings(this,n(e)[0])}},{key:"show_modal",value:function(e){return function(t,r){var o="[data-modal-id="+e+"]";console.debug("Showing modal:",o),0===n(o).modal("show").length&&console.debug("Modal not found:",o)}}},{key:"post_child_form",value:function(e,t){var r=t.currentTarget.querySelector(":scope > form");return r&&r.submit(),!1}}],r&&u(t.prototype,r),i&&u(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();globalThis.jQuery=n;var l=r(2876),f=(r(4238),r(7239),r(8105),r(7030),r(83),r(4567),r(1714),r(5082),r(8225),r(4696),r(5812),r(2208),r(3441),r(4671),r(9610),r(4115),r(2445),r(6426),r(3150),r(8329),r(1307),r(8182),r(9755));function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||b(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){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1?o-1:0),a=1;a1&&void 0!==arguments[1]&&arguments[1])&&(t.trackLocalhost=!0);var r=(0,l.Z)(t).trackEvent;return(0,(0,l.Z)(t).trackPageview)(),this.each((function(e,t){function n(e){var n=t.getAttribute("data-analytics").split(/,(.+)/),o=null!=t.tagName&&"a"==t.tagName.toLowerCase(),i="auxclick"==e.type&&2==e.which,a="click"==e.type,u=o&&a&&!t.target&&!(e.ctrlKey||e.metaKey||e.shiftKey);if(i||a){var c,s=function(){u&&t.href&&"#"!=t.href&&(console.debug("Plausible: resuming redirect to",t.href),location.href=t.href)},l=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=b(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},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(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(n);try{var f=function(){var e=c.value;r(e,{callback:function(){console.debug("Plausible: tracked event",e),s()}}),setTimeout((function(){console.debug("Plausible: didn't receive response, continuing anyways"),s()}),150)};for(l.s();!(c=l.n()).done;)f()}catch(e){l.e(e)}finally{l.f()}}u&&e.preventDefault()}t.addEventListener("click",n),t.addEventListener("auxclick",n)}))}function k(e){return this.each((function(t,r){f(r).find(".item").tab(e)}))}function T(e){return T="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},T(e)}function x(e,t,r){return x=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,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&E(o,r.prototype),o},x.apply(null,arguments)}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.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 C(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return C(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 C(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&r.is_expanded(!0)})),this.output=o.observable(),this.output_lines=o.computed((function(){return r.output().split(/\n/).map((function(e,t){return new Z({command:r,output:e,line_number:t+1})}))}),null,{deferEvaluation:!0}),this.output(t.output)}return K(e,[{key:"color_output",value:function(e){return Promise.all([r.e("ansi_up").then(r.t.bind(r,4431,19)).then((function(e){return e.default})),r.e("sanitize-html").then(r.t.bind(r,1036,19)).then((function(e){return e.default}))]).then((function(t){var r,n,o=J(t,2);r=o[0],n=o[1];var i=new r;return i.use_classes=!0,e=n(e=i.ansi_to_html(e),{allowedTags:["span"],allowedAttributes:{span:["class"]}})}))}},{key:"toggle_expanded",value:function(){return this.is_expanded(!this.is_expanded()),!1}}]),e}(),Y=function(){function e(){var t=this,r=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;W(this,e),this.id=r.id,this.url_api_build=i,this.url_api_notifications=a,this.success=o.observable(r.success),this.error=o.observable(r.error),this.notifications=o.observableArray(),this.has_notifications=o.computed((function(){return t.notifications().length>0})),this.state=o.observable(r.state),this.state_display=o.observable(r.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.state.subscribe((function(e){t.update_state(e)})),this.progress_config=o.computed((function(){var e=t.state(),r=["triggered","queued","cloning","installing","building","uploading","finished"];if(o.computedContext.isInitial())return{autoSuccess:!1,value:r.indexOf(e),total:r.length-1,label:t.state_display()};if(t.is_finished()){var n="cancelled"===e,i=t.error()||!1===t.success();return n?function(e){e("set warning","Build cancelled")}:i?function(e){e("set error","Build failed")}:function(e){e("set success","Build succeeded")}}return function(n){n("set progress",r.indexOf(e)),n("set label",t.state_display())}})).extend({deferred:!0}),this.date=o.observable(r.date),this.length=o.observable(r.length),this.date_display=o.observable(),this.date_display_since=o.observable(),this.length_display=o.observable(),q.extend(U),q.extend(D),q.extend(z),this.date.subscribe((function(e){var r=q(e);t.date_display(r.format("llll")),t.date_display_since(r.fromNow())})),this.length.subscribe((function(e){t.length_display(q.duration(e,"seconds").humanize())})),this.config=o.observable(),this.builder=o.observable(r.builder),this.commands=o.observableArray(r.commands),this.commit=o.observable(r.commit),this.commit_short=o.computed((function(){var e=t.commit();if(e)return e.substring(0,8)})),this.docs_url=o.observable(r.docs_url),this.commit_url=o.observable(r.commit_url),this.legacy_output=o.observable(!1),this.selected_hash=o.observable(n(location).attr("hash")),this.selected_hash.subscribe((function(e){n(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_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 K(e,[{key:"poll_api_build",value:function(){var e=this;n.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.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 r,n=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=$(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},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(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(t.commands);try{for(n.s();!(r=n.n()).done;){var o=r.value;e.add_command(o)}}catch(e){n.e(e)}finally{n.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;n.getJSON(this.url_api_notifications,{state__in:"read,unread"}).then((function(t){t.results&&e.notifications(t.results)}))}},{key:"add_command",value:function(e){o.utils.arrayFirst(this.commands(),(function(t){return t.id()===e.id}))||this.commands.push(new Q(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"}):n(t).focus()),!1}},{key:"set_selected_line_from_hash",value:function(e){if(e){var t=e.match(/^#(\d+)--(\d+)$/);if(!t)return;var r=o.utils.arrayFirst(this.commands(),(function(e){return e.id()==t[1]}));if(r){var n=o.utils.arrayFirst(r.output_lines(),(function(e){return e.line_number()==t[2]}));n&&this.set_selected_line(n)}}}},{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 G(e){return G="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},G(e)}function ee(e,t){for(var r=0;r=oe[o];t.device[o](i)}}));var r=n(window),i=function(){t.viewport_width(r.width())};r.on("resize",i),i()})),ae=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 te(e,[{key:"fetch",value:function(){var e=this;if(this.promise)return this.promise;this.promise=new Promise((function(t,r){if(e.loaded())return t(e.data());e.loading(!0),n.getJSON(e.url).then((function(r){return e.data(r),e.loaded(!0),e.loading(!1),t(r)}))}))}}]),e}(),ue=te((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 r=new URL(e.api_projects_list_url,window.location.origin);r.search="?name={query}",t.search_project_config({type:"category",apiSettings:{url:r.href,onResponse:function(e){return{results:{"category-projects":{name:"Projects",results:e.results.map((function(e,t){var r=e.slug;e.subproject_of?r="Subproject of "+e.subproject_of.name:e.translation_of&&(r=e.language.name+" translation of "+e.translation_of.name);var n=new URL(e.urls.home),o=new URL(window.location.href);return n.hostname!=o.hostname&&(n.hostname=o.hostname),{title:e.name,description:r,url:n.toString()}}))}}}}},minCharacters:2})}}))}));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){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return le(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return le(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},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(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function le(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&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(r),this.dropdown_class=o.computed((function(){return t.is_collapsed()?"fa-caret-down":"fa-caret-up"}))}var t,r,n;return t=e,r=[{key:"toggle_collapsed",value:function(){var e=this.is_collapsed();this.is_collapsed(!e)}}],r&&je(t.prototype,r),n&&je(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ke(e){return ke="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},ke(e)}function Te(e,t){for(var r=0;r\n ','\n
\n \n ',"\n
\n

","

\n \n "])),(0,rt.$)(t),(0,tt.g)(this.notification.dismissable,(function(){return(0,Ce.dy)(Ge||(Ge=it(['\n 0)setTimeout(o,2e3);else{var n=e.statusText;e.responseJSON&&(n=e.responseJSON.detail),t.reject({message:n})}}))}),2e3),t})(e).then((function(){t.resolve()})).fail((function(e){t.reject(e)}))},error:function(e){var r=e.responseJSON.detail||e.statusText;t.reject({message:r})}}),t}function Ht(e){return Ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ht(e)}function Jt(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&&$t(e,t)}function $t(e,t){return $t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$t(e,t)}function Mt(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 r,n=Ft(e);if(t){var o=Ft(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===Ht(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,r)}}function Ft(e){return Ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ft(e)}function Kt(e,t,r){return(t=Zt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xt(e,t){for(var r=0;r0}))})),Gt=function(e){Jt(r,e);var t=Mt(r);function r(){var e;return Qt(this,r),(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 Wt(r,[{key:"sync_remote_repos",value:function(){var e=this,t=this.config(),r={url:t.urls.api_sync_remote_repositories,token:t.csrf_token};return this.is_syncing(!0),this.is_loading(!0),zt(r).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+"?expand=projects&full_name={query}";this.search_config({type:"knockout",templates:{knockout:function(e){var t=n("
");o.applyBindingsToNode(t[0],{template:{name:"remote-repo-results",data:{remote_repos:e.results.map((function(e){return new Yt(e)}))}}});var r=t.html();return t.remove(),r}},apiSettings:{url:t},selector:{prompt:".ui.text",title:".title .text"},fullTextSearch:!0,onSelect:function(t,r){e.selected(new Yt(t))}})}},{key:"is_repository_supported",value:function(e){return!e.is_private()||this.allow_private_repos()}}]),r}(ie);Kt(Gt,"view_name","ProjectCreateView"),V.add_view(Gt);var er,tr,rr,nr=function(e){Jt(r,e);var t=Mt(r);function r(){var e;Qt(this,r),e=t.call(this);var o=JSON.parse(document.querySelector("#organizations-teams").text.replace(/\\u0027/g,'"'));return n(".ui.search").search({type:"category",minCharacters:1,source:o,searchFields:["title","category"],fullTextSearch:!1}),e}return Wt(r)}(ie);function or(e){return or="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},or(e)}function ir(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ar(e,t){for(var r=0;r\n ',"\n
\n "])),(0,kt.U)(e.results,(function(e){return(0,Ce.dy)(tr||(tr=ir(['\n \n
\n
\n
\n ','\n \n ','\n
\n
\n ',"\n
\n
\n
\n "])),e.verbose_name,(0,rt.$)({"fa-code-branch":"branch"===e.type,"fa-tag":"tag"===e.type}),(0,tt.g)(e.active,(function(){return(0,Ce.dy)(rr||(rr=ir(['\n \n \n Active\n \n '])))})),e.identifier)})));(0,Ce.sY)(r,t);var n=t.innerHTML;return t.remove(),n}}}}}]),e}();br(yr,"view_name","ProjectVersionCreateView"),V.add_view(yr);var hr=function(e){sr(r,e);var t=fr(r);function r(e){var n;return cr(this,r),(n=t.call(this,e)).url_pdf=o.observable(),n.url_epub=o.observable(),n.url_html=o.observable(),n.url_docs=o.observable(),n.is_built=o.observable(!0),n.data.subscribe((function(e){n.url_pdf(e.downloads.pdf),n.url_epub(e.downloads.epub),n.url_html(e.downloads.html),n.url_docs(e.urls.documentation),n.is_built(e.built)})),n}return ur(r,[{key:"trigger_build",value:function(e,t){return function(r,o){n.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)}))}}}]),r}(ae);br(hr,"view_name","VersionListItemView"),V.add_view(hr);var mr=function(){function e(t){cr(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 ur(e,[{key:"close_announcement",value:function(){this.closed(!0),localStorage.setItem(this.storage_key,!0)}}]),e}();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){for(var r=0;r select").dropdown({placeholder:""}),n("[data-content]:not([data-semanticui-popup])").popup({position:"top center",delay:{show:500},variation:"small"}),n(".ui.menu > .item[data-tab]").tab(),new i("[data-clipboard-text], [data-clipboard-target]"),n("[data-clipboard-text], [data-clipboard-target]").popup({on:"click",hoverable:!1,content:"Copied!"}),n("[data-analytics]").plausible(this.config.production_domain,this.config.debug)}}])&&_r(t.prototype,a),u&&_r(t,u),Object.defineProperty(t,"prototype",{writable:!1}),e}();n(document).ready((function(){(new Sr).run()}))}},a={};function u(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}};return i[e].call(r.exports,r,r.exports,u),r.exports}u.m=i,e=[],u.O=(t,r,n,o)=>{if(!r){var i=1/0;for(l=0;l=o)&&Object.keys(u.O).every((e=>u.O[e](r[c])))?r.splice(c--,1):(a=!1,o0&&e[l-1][2]>o;l--)e[l]=e[l-1];e[l]=[r,n,o]},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,u.t=function(e,n){if(1&n&&(e=this(e)),8&n)return e;if("object"==typeof e&&e){if(4&n&&e.__esModule)return e;if(16&n&&"function"==typeof e.then)return e}var o=Object.create(null);u.r(o);var i={};t=t||[null,r({}),r([]),r(r)];for(var a=2&n&&e;"object"==typeof a&&!~t.indexOf(a);a=r(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 r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.f={},u.e=e=>Promise.all(Object.keys(u.f).reduce(((t,r)=>(u.f[r](e,t),t)),[])),u.u=e=>"js/vendors~"+e+".js?"+{chartjs:"88d308352093cb9caa38",ansi_up:"d27561856946166026c2","sanitize-html":"fe70b4790c12dedf5bc9"}[e],u.miniCssF=e=>{},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},o="readthedocsext-theme:",u.l=(e,t,r,i)=>{if(n[e])n[e].push(t);else{var a,c;if(void 0!==r)for(var s=document.getElementsByTagName("script"),l=0;l{a.onerror=a.onload=null,clearTimeout(b);var o=n[e];if(delete n[e],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach((e=>e(r))),t)return t(r)},b=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,r)=>{var n=u.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var o=new Promise(((r,o)=>n=e[t]=[r,o]));r.push(n[2]=o);var i=u.p+u.u(t),a=new Error;u.l(i,(r=>{if(u.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,n[1](a)}}),"chunk-"+t,t)}},u.O.j=t=>0===e[t];var t=(t,r)=>{var n,o,[i,a,c]=r,s=0;if(i.some((t=>0!==e[t]))){for(n in a)u.o(a,n)&&(u.m[n]=a[n]);if(c)var l=c(u)}for(t&&t(r);su(286)));var c=u.O(void 0,["vendor"],(()=>u(854)));c=u.O(c)})(); \ No newline at end of file diff --git a/src/js/project/create.js b/src/js/project/create.js index bab1fd06..77d73585 100644 --- a/src/js/project/create.js +++ b/src/js/project/create.js @@ -221,7 +221,7 @@ export class ProjectOrganizationView extends ResponsiveView { type: "category", minCharacters: 1, source: content, - searchFields: ["title", "description"], + searchFields: ["title", "category"], fullTextSearch: false, }); }