1(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[18470,59650],{11880(k,D,d){k.exports=d(18174)},70012(k,D,d){"use strict";var x,v;x=[d(91749),d(29930)],v=(function(P,y){let C=[],R=0;function q(t,n){typeof t!="string"&&(t=$(t),t=t.data("type")||t.attr("type")||t.prop("tagName"));const o=f.plugins[t.toLowerCase()];if(o==null)return;const e=o[n];return typeof e=="function"?e:null}const r={deepClone:function(t){return typeof t=="object"?JSON.parse(JSON.stringify(t)):t},createElement:function(t,n,o){const e=document.createElement(t);for(const[c,a]of Object.entries(n))e.setAttribute(c,a);return o&&e.appendChild(document.createTextNode(o)),e},initElement:function(t){const n=q(t,"init");n?.call(f,$(t))},destructElement:function(t){const n=q(t,"destruct");n?.call(f,$(t))},createElementOfType:function(t,n,o){let e;const c=q(t,"create");return c!=null?e=$(c.call(f,t,n,o)):(o==null&&(o={}),t!=null&&(o.type=t),e=$(r.createElement(n||"input",o))),e.data("type",t),r.initElement(e),e},cleanArray:function(t,n,o){const e=[];if(!n&&o)return t;for(let c=0;c<t.length;c+=1){let a=t[c];n&&(a===!!a?a=+a:a&&typeof a.trim=="function"&&(a=a.trim())),(o||a!=null&&a.length)&&e.push(a)}return e},isTrue:function(t){return t==="true"||+t==1},isFalse:function(t){return t==="false"||+t==0},readValue:function(t){let n=!r.isFalse(t.data("empty"));const o=!r.isFalse(t.data("trim")),e=t.data("split"),c=q(t,"get");let a;if(c!=null)return c.call(f,t,o,n);if(e!=null){n=r.isTrue(t.data("empty")),a=t.val();const m=a!=null&&a.split(e||",")||[];return r.cleanArray(m,o,n)}if(a=t.val(),o&&a!=null&&typeof a.trim=="function"&&(a=a.trim()),n||a!==void 0&&(a==null||a.length!==0))return a},fillField:function(t,n){const o=q(t,"set");let e=t.data("trim");if(e=e!=="false"&&+e!=0,o!=null)return o.call(f,t,n,e);n instanceof Array&&(n=n.join(t.data("split")||(e?", ":","))),e&&n&&typeof n.trim=="function"?(n=n.trim(),typeof n.toString=="function"&&(n=n.toString())):n!=null?(typeof n.toString=="function"&&(n=n.toString()),e&&(n=n.trim())):n="",n!==void 0&&t.val(n)},initFields:function(t){$("[data-key]",t).each(function(n,o){o=$(o);const e=q(o,"init"),c=o.data("key").split(".");let a=f.get();e?.call(f,o);for(let m=0;m<c.length;m+=1){const g=c[m];g&&a!=null&&(a=a[g])}r.fillField(o,a)})},registerReadyJobs:function(t){return R+=t,R},beforeReadyJobsDecreased:function(t){if(t==null&&(t=1),R>0&&(R-=t,R<=0)){for(let n=0;n<C.length;n+=1)C[n]();C=[]}},whenReady:function(t){R<=0?t():C.push(t)},serializeForm:function(t){const n=t.serializeObject();return t.find('input[type="checkbox"]').each(function(o,e){e=$(e),e.is(":checked")||(n[e.attr("name")]="off")}),t.find("select[multiple]").each(function(o,e){e=$(e),n[e.attr("name")]=JSON.stringify(e.val())}),n},persistSettings:function(t,n,o,e){n!=null&&n._!=null&&typeof n._!="string"&&(n=r.deepClone(n),n._=JSON.stringify(n._)),socket.emit("admin.settings.set",{hash:t,values:n},function(c){o&&(c?y.alert({title:"[[admin/admin:changes-not-saved]]",type:"danger",message:`[[admin/admin/changes-not-saved-message, ${c.message}]]`,timeout:5e3}):y.alert({title:"[[admin/admin:changes-saved]]",type:"success",message:"[[admin/admin:changes-saved-message]]",timeout:2500})),typeof e=="function"&&e(c)})},use:function(t){try{t._=JSON.parse(t._)}catch(n){console.error(n)}f.cfg=t}},f={helper:r,plugins:{},cfg:{},get:function(){return f.cfg!=null&&f.cfg._!==void 0?f.cfg._:f.cfg},registerPlugin:function(t,n){n==null?n=t.types:t.types=n,typeof t.use=="function"&&t.use.call(f);for(let o=0;o<n.length;o+=1){const e=n[o].toLowerCase();f.plugins[e]==null&&(f.plugins[e]=t)}},set:function(t,n,o,e,c){c==null&&(c=!0),r.whenReady(function(){r.use(n),r.initFields(o||"form"),r.persistSettings(t,n,c,e)})},sync:function(t,n,o){socket.emit("admin.settings.get",{hash:t},function(e,c){e?typeof o=="function"&&o(e):r.whenReady(function(){r.use(c),r.initFields(n||"form"),typeof o=="function"&&o()})})},persist:function(t,n,o,e){const c=[],a=$("[data-key]",n||"form").toArray();e==null&&(e=!0);for(let m=0;m<a.length;m+=1){const g=$(a[m]),h=r.readValue(g);let p=f.get();const i=g.data("key").split("."),s=i[i.length-1];if(i.length>1)for(let l=0;l<i.length-1;l+=1){const u=i[l];u&&p!=null&&(p=p[u])}p!=null?h!=null?p[s]=h:delete p[s]:c.push(g.data("key"))}c.length&&y.alert({title:"Attributes Not Saved",message:"'"+c.join(", ")+"' could not be saved. Please contact the plugin-author!",type:"danger",timeout:5e3}),r.persistSettings(t,f.cfg,e,o)},load:function(t,n,o){o=o||function(){};const e=n.attr("data-socket-get");socket.emit(e||"admin.settings.get",{hash:t},function(c,a){if(c)return o(c);$(n).find("select[multiple]").each(function(g,h){const p=$(h).attr("name");if(p&&a.hasOwnProperty(p))try{a[p]=JSON.parse(a[p])}catch(i){console.error(i)}}),ajaxify.data[e?t:"settings"]=a,r.whenReady(function(){$(n).find("[data-sorted-list]").each(function(g,h){q(h,"get").call(f,$(h),t)})}),$(n).deserialize(a),P.fire("action:admin.settingsLoaded"),$(n).on("change","input, select, textarea",function(){app.flags=app.flags||{},app.flags._unsaved=!0});
1const m=document.getElementById("save");m&&d.e(6411).then(function(){var g=[d(6411)];(function(h){h.bind("ctrl+s",function(p){m.click(),p.preventDefault()})}).apply(null,g)}).catch(d.oe),o(null,a)})},save:function(t,n,o){n=$(n);const e=n.get(0).elements;if(f.check(e)&&n.length){const a=r.serializeForm(n);r.whenReady(function(){const g=n.find("[data-sorted-list]");g.length&&g.each((h,p)=>{q(p,"set").call(f,$(p),a)})});const m=n.attr("data-socket-set");socket.emit(m||"admin.settings.set",{hash:t,values:a},function(g){if(app.flags._unsaved=!1,ajaxify.data[m?t:"settings"]=a,typeof o=="function")o(g);else if(g)y.alert({title:"[[admin/admin:changes-not-saved]]",message:`[[admin/admin:changes-not-saved-message, ${g.message}]]`,type:"error",timeout:5e3});else{const h=document.getElementById("save");h.classList.toggle("saved",!0),setTimeout(()=>{h.classList.toggle("saved",!1)},1500)}})}},check:function(t){const n=o=>{const e=o.target.closest(".form-group");e&&e.classList.add("has-error"),o.target.removeEventListener("invalid",n)};return Array.prototype.map.call(t,o=>{const e=o.closest(".form-group");return e&&e.classList.remove("has-error"),o.addEventListener("invalid",n),o.reportValidity()}).every(Boolean)}};return r.registerReadyJobs(1),Promise.all([d.e(23662),d.e(65285),d.e(19308)]).then(function(){var t=[d(75210),d(474),d(50397),d(71575),d(40054),d(17708),d(46700),d(59175)];(function(){for(let n=0;n<arguments.length;n+=1)f.registerPlugin(arguments[n]);r.beforeReadyJobsDecreased()}).apply(null,t)}).catch(d.oe),f}).apply(D,x),v!==void 0&&(k.exports=v)},18174(k,D,d){"use strict";var x,v;x=[d(70012),d(29930),d(17459)],v=(function(P,y,C){const R={};R.init=function(){const i=$(".acp-page-container");Promise.resolve(C.translate(i.html())).then(function(s){i.html(s),q()}).catch(function(){q()})};function q(){P.load("faq",$(".faq-settings")),$(".faq-settings").on("submit",function(i){i.preventDefault()}),$("#save").on("click",function(){P.save("faq",$(".faq-settings"),function(){y.success("[[faq:acp.settings-saved]]")})}),$("#faq-add").on("click",m),$("#faq-collapse-all").on("click",function(){$("#faq-list .faq-entry").addClass("faq-collapsed")}),$("#faq-expand-all").on("click",function(){$("#faq-list .faq-entry").removeClass("faq-collapsed")}),$("#faq-list").on("click",".faq-toggle",function(){$(this).closest(".faq-entry").toggleClass("faq-collapsed")}).on("click",".faq-save",h).on("click",".faq-delete",p).on("mousedown",".faq-editor-toolbar button",function(i){i.preventDefault()}).on("click",".faq-editor-toolbar [data-cmd]",function(){const i=$(this).data("val")!=null?String($(this).data("val")):null;document.execCommand($(this).data("cmd"),!1,i)}).on("click",".faq-editor-toolbar .faq-cmd-link",function(){const i=window.getSelection(),s=i&&i.rangeCount?i.getRangeAt(0).cloneRange():null,l=window.prompt("URL du lien :");l&&(s&&(i.removeAllRanges(),i.addRange(s)),document.execCommand("createLink",!1,l),$(this).closest(".faq-editor").find(".faq-input-answer a").attr("target","_blank").attr("rel","noopener noreferrer"))}).on("paste",".faq-input-answer",c),a()}const r="(?:https?:\\/\\/|www\\.)[^\\s<]+";function f(i){return new RegExp("^"+r+"$","i").test(i)}function t(i){return/^https?:\/\//i.test(i)?i:"https://"+i}function n(i){const s=i.match(/^(.*?)([.,:;!?)\]}'"]*)$/);return s?{url:s[1],trail:s[2]}:{url:i,trail:""}}function o(i){const s=document.createDocumentFragment(),l=new RegExp(r,"gi");let u=0,A=l.exec(i);for(;A!==null;){A.index>u&&s.appendChild(document.createTextNode(i.slice(u,A.index)));const{url:S,trail:N}=n(A[0]),E=document.createElement("a");E.href=t(S),E.textContent=S,E.target="_blank",E.rel="noopener noreferrer",s.appendChild(E),N&&s.appendChild(document.createTextNode(N)),u=A.index+A[0].length,A=l.exec(i)}return u<i.length&&s.appendChild(document.createTextNode(i.slice(u))),s}function e(i){const s=window.getSelection();if(!s||!s.rangeCount)return;const l=s.getRangeAt(0);l.deleteContents();const u=i.lastChild;l.insertNode(i),u&&(l.setStartAfter(u),l.setEndAfter(u),s.removeAllRanges(),s.addRange(l))}function c(i){const s=i.originalEvent&&i.originalEvent.clipboardData;if(!s)return;const l=s.getData("text/plain");if(!l)return;i.preventDefault();const u=window.getSelection(),A=u&&u.rangeCount&&!u.getRangeAt(0).collapsed,S=l.trim();if(A&&f(S)){document.execCommand("createLink",!1,t(S)),$(i.currentTarget).find("a").attr("target","_blank").attr("rel","noopener noreferrer");return}e(o(l))}function a(){const i=document.getElementById("faq-list");!i||typeof $.fn.sortable!="function"||$(i).sortable({handle:".faq-drag-handle",update:function(){const s=$(i).find(".faq-entry").map(function(){return $(this).attr("data-id")}
1).get().filter(Boolean);socket.emit("plugins.faq.reorder",{ids:s},function(l){l&&y.error(l.message)})}})}function m(){const s=document.getElementById("faq-entry-template").content.cloneNode(!0);document.getElementById("faq-list").appendChild(s),document.querySelector(".faq-no-entries")?.remove()}function g(i){return{id:i.attr("data-id")||void 0,question:i.find(".faq-input-question").val(),answer:i.find(".faq-input-answer").html(),category:i.find(".faq-input-category").val(),images:i.find(".faq-input-images").val(),enabled:i.find(".faq-input-enabled").is(":checked")}}function h(){const i=$(this).closest(".faq-entry"),s=g(i);if(!s.question||!s.question.trim()){y.error("[[faq:acp.error-question-required]]");return}const l=s.id?"plugins.faq.update":"plugins.faq.create";socket.emit(l,s,function(u,A){if(u){y.error(u.message);return}i.attr("data-id",A.id),y.success("[[faq:acp.entry-saved]]")})}function p(){const i=$(this).closest(".faq-entry"),s=i.attr("data-id");if(!s){i.remove();return}bootbox.confirm("[[faq:acp.confirm-delete]]",function(l){l&&socket.emit("plugins.faq.delete",{id:s},function(u){if(u){y.error(u.message);return}i.remove(),y.success("[[faq:acp.entry-deleted]]")})})}return R}).apply(D,x),v!==void 0&&(k.exports=v)}}]);
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.