1(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[4347,22067,43602],{72573(b,p,o){b.exports=o(59367)},65303(b,p,o){"use strict";o.r(p),o.d(p,{alert:()=>E,confirm:()=>c,dialog:()=>D,prompt:()=>s,promptPassword:()=>g});var r=o(33530),w=o.n(r),m=o(17459),O=o.n(m);r.setDefaults({locale:config.userLang}),m.translateKeys(["modules:bootbox.ok","modules:bootbox.cancel","modules:bootbox.confirm"]).then(e=>{r.addLocale(config.userLang,{OK:e[0],CANCEL:e[1],CONFIRM:e[2]}),r.setLocale(config.userLang)});async function D(e){const[n,l,a]=await Promise.all([m.translate(e.title||""),d(e)||"",y(e.buttons)]);return r.dialog({...e,title:n,message:l,buttons:a})}async function E(e,n){const[l,a]=await Promise.all([e&&e.title?m.translate(e.title):null,d(e)]);return n=typeof n=="function"?n:e.callback,r.alert({...e,title:l,message:a,callback:n})}async function c(e,n){const[l,a]=await Promise.all([e&&e.title?m.translate(e.title):null,d(e)]);return n=typeof n=="function"?n:e.callback,r.confirm({...e,title:l,message:a,callback:n})}async function s(e,n){const[l,a]=await Promise.all([m.translate(typeof e=="string"?e:e.title),e&&e.message?d(e):null]);return n=typeof n=="function"?n:e.callback,r.prompt({...e,title:l,message:a,callback:n})}async function g(e){return typeof e=="string"&&(e={title:e}),e=e||{title:"[[user:current-password]]",message:"[[user:emailUpdate.password-challenge]]"},await new Promise(n=>{s({...e,inputType:"password",required:!0,value:"",callback:n})})}function d(e){const n=e&&e.message?e.message:e;return n instanceof jQuery?n:m.translate(n||"")}async function y(e){if(!Object.keys(e||{}).length)return;const n=Object.values(e);return await Promise.all(n.map(async l=>({...l,label:await m.translateKey(l.label)})))}},59367(b,p,o){"use strict";var r,w;r=[o(81335),o(65303),o(29930),o(17459)],w=(function(m,O,D,E){const c={},s={timestamp:0,open:!1,edit:!1,posts:{}};let g=[],d,y,e,n;const l={el:null},a={el:null,icon:null,defaultText:"",activeText:""};let f,h;$(window).on("action:composer.activate",C),c.init=function(t,i){s.timestamp=0,s.posts=i,g=t[0].querySelectorAll(".display-scheduler"),d=t[0].querySelectorAll(".display-scheduler i"),l.el=t[0].querySelector(".dropdown-item.display-scheduler"),y=t[0].querySelector(".dropdown-item.cancel-scheduling"),e=t.find('[component="composer/submit/container"]'),n=t.find('[component="composer/submit/options/container"]'),a.el=t[0].querySelector(".composer-submit:not(.btn-sm)"),a.icon=a.el.querySelector("i"),a.defaultText=a.el.lastChild.textContent,a.activeText=a.el.getAttribute("data-text-variant"),y.addEventListener("click",A),g.forEach(u=>u.addEventListener("click",L))},c.getTimestamp=function(){return!c.isActive()||isNaN(s.timestamp)?0:s.timestamp},c.isActive=function(){return s.timestamp>0},c.isOpen=function(){return s.open},c.reset=function(){s.timestamp=0},c.onChangeCategory=function(t){S(t.privileges["topics:schedule"]),v(!1);const i=t.privileges["topics:schedule"]||n.attr("data-submit-options")>0;e.find(".composer-submit").toggleClass("rounded-1",!i),n.toggleClass("hidden",!i),c.reset()};async function L(){const t=await m.render("modals/topic-scheduler");O.dialog({message:t,title:"[[modules:composer.schedule-for]]",className:"topic-scheduler",onShown:T,onHidden:x,onEscape:!0,buttons:{cancel:{label:s.timestamp?"[[modules:composer.cancel-scheduling]]":"[[modules:bootbox.cancel]]",className:(s.timestamp?"btn-warning":"btn-outline-secondary")+(s.edit?" hidden":""),callback:A},set:{label:"[[modules:composer.set-schedule-date]]",className:"btn-primary",callback:M}}})}function T(t){s.open=!0;const i=t.target.querySelector(".datetime-picker");f=i.querySelector('input[type="date"]'),h=i.querySelector('input[type="time"]'),P()}function x(){s.open=!1}function C(t,{post_uuid:i}){s.edit=!1;const u=s.posts[i];u&&u.isMain&&u.timestamp>Date.now()&&(s.timestamp=u.timestamp,s.edit=!0,v())}function P(){const t=new Date,i=new Date(t.getTime()-t.getTimezoneOffset()*6e4).toJSON();if(f.setAttribute("min",i.slice(0,10)),h.setAttribute("min",i.slice(11,-8)),c.isActive()){const u=new Date(s.timestamp-t.getTimezoneOffset()*6e4).toJSON();f.value=u.slice(0,10),h.value=u.slice(11,-8)}}function M(){const t=f.value&&h.value,i=new Date(`${f.value} ${h.value}`).getTime();if(!t||isNaN(i)||i<Date.now()){s.timestamp=0;const u=i<Date.now()?"[[error:scheduling-to-past]]":"[[error:invalid-schedule-date]]";return D.alert({type:"danger",timeout:3e3,title:"",alert_id:"post_error",message:u}),!1}s.timestamp||v(!0),s.timestamp=i}function A(){s.timestamp&&(v(!1),s.timestamp=0)}async function v(t=!0){d.forEach(i=>
1i.classList.toggle("active",t)),a.icon&&(a.icon.classList.toggle("fa-check",!t),a.icon.classList.toggle("fa-clock-o",t)),l.el&&(l.el.textContent=t?await E.translateKey("[[modules:composer.change-schedule-date]]"):await E.translateKey("[[topic:composer.post-later]]"),y.classList.toggle("hidden",!t)),a.el.lastChild.textContent=t?a.activeText:a.defaultText}function S(t){g.forEach(i=>i.classList.toggle("hidden",!t))}return c}).apply(p,r),w!==void 0&&(b.exports=w)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.