Файловый менеджер - Редактировать - /home/lmsyaran/public_html/administrator/components/com_sppagebuilder/assets/editor/dist/js/321.min.js
Назад
/*! For license information please see 321.min.js.LICENSE.txt */ "use strict";(self.webpackChunkreact_typescript_webpack_backend_editor=self.webpackChunkreact_typescript_webpack_backend_editor||[]).push([[321],{5403:(t,e,r)=>{r.r(e),r.d(e,{default:()=>me});var n,o=r(3871),i=r(7870),a=r(7264),l=r(1731),c=r(4353),u=r(8122),s=r(5350),d=r(7579),f=r(3039),p=r(7894),h=r(8111),y=r(9148),b=r(1709),v=r(9085),g=r(824),E=r(917),m=r(230),_=r(5944);const O=function(t){var e=t.width,r=void 0===e?"100%":e,n=t.height,o=void 0===n?16:n,i=t.animation,a=void 0!==i&&i;return(0,_.tZ)("span",{css:I.skeleton(r,o,a)})};var S,w,P={wave:(0,E.F4)(n||(S=["\n 0% {\n transform: translateX(-100%);\n }\n 50% {\n transform: translateX(0%);\n }\n 100% {\n transform: translateX(100%);\n }\n "],w||(w=S.slice(0)),n=Object.freeze(Object.defineProperties(S,{raw:{value:Object.freeze(w)}}))))},I={skeleton:function(t,e,r){return(0,E.iv)("display:block;width:",(0,m.hj)(t)?"".concat(t,"px"):t,";height:",(0,m.hj)(e)?"".concat(e,"px"):e,";border-radius:",g.E0[6],";background-color:rgba(0, 0, 0, 0.11);position:relative;-webkit-mask-image:-webkit-radial-gradient(center, white, black);overflow:hidden;",r&&(0,E.iv)(":after{content:'';background:linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.05), transparent);position:absolute;transform:translateX(-100%);inset:0;animation:1.6s linear 0.5s infinite normal none running ",P.wave,";};label:skeleton;"),";;label:skeleton;")}},L=r(4185),D=r(1234),T=r(4101),A=r(3579),C=r(1954),R=r(1921),x=r(7294);function G(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}const B=function(t){var e,r,n=t.value,o=t.options,i=t.onChange,l=void 0===i?m.ZT:i,c=t.label,u=t.disabled,s=(e=(0,x.useState)(!1),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,l=[],c=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,r)||function(t,e){if(t){if("string"==typeof t)return G(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?G(t,e):void 0}}(e,r)||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.")}()),d=s[0],f=s[1],p=(0,C.l)({isOpen:d,isDropdown:!0}),h=p.triggerRef,y=p.triggerWidth,b=p.position,v=p.popoverRef,g=o.find((function(t){return t.value===n})),E={0:"unpublished",1:"published","-2":"trashed"};if(!(0,m.$K)(n)||(0,m.$K)(n)&&!(n in E))return null;var O=Z[E[n]];return(0,_.BX)("div",{css:k.mainWrapper,children:[!!c&&(0,_.tZ)("div",{children:c}),(0,_.BX)("button",{type:"button",css:k.dropDownLabel({statusVariant:O,isOpen:d,isDisabled:u||!o.length}),onClick:function(){return f(!0)},ref:h,disabled:u,children:[(0,_.BX)("div",{children:[O.leftIcon,(0,_.tZ)("span",{children:(null==g?void 0:g.label)||""})]}),(0,_.tZ)(a.Z,{name:"chevronDown",width:12,height:8})]}),(0,_.tZ)(C.h,{isOpen:d,onClickOutside:function(){return f(!1)},children:(0,_.tZ)("div",{css:[k.optionsWrapper,{left:b.left,top:b.top,maxWidth:y},";label:StatusSelect;"],ref:v,children:(0,_.tZ)("ul",{css:k.options,children:o.map((function(t){return(0,_.tZ)("li",{css:k.optionItem({isSelected:n===t.value}),children:(0,_.tZ)(A.Z,{label:t.label,checked:n===t.value,onChange:function(){f(!1),l(t)},labelCss:k.radioLabel,disabled:t.disabled})},t.value)}))})})})]})};var j={name:"1f3qfry-dropDownLabel",styles:"pointer-events:none;label:dropDownLabel;"},M={name:"i3yy6i-dropDownLabel",styles:"transform:rotate(180deg);label:dropDownLabel;"},k={mainWrapper:{name:"e9i770-mainWrapper",styles:"width:100%;label:mainWrapper;"},dropDownLabel:function(t){var e=t.statusVariant,r=t.isOpen,n=void 0!==r&&r,o=t.isDisabled,i=void 0!==o&&o;return(0,E.iv)(R.iZ.resetButton," width:124px;display:flex;justify-content:space-between;align-items:center;border-radius:42px;height:24px;padding:0 ",g.W0[8]," 0 ",g.W0[6],";border:1px solid ",e.borderColor,";background-color:",e.backgroundColor,";position:relative;div{display:flex;gap:",g.W0[4],";align-items:center;span{color:",e.color,";}svg{height:16px;width:16px;color:",e.leftIconColor,";transform:none;}}& svg{width:12px;height:8px;color:",e.rightIconColor,";transition:transform 0.3s ease-in-out;",n&&M," ",i&&j,";}",i&&(0,E.iv)("background-color:",g.qo.background.disabled,";border:1px solid ",g.qo.stroke.disabled,";div{span{color:",g.qo.text.disabled,";}svg{color:",g.qo.icon.disabled,";}};label:dropDownLabel;"),";;label:dropDownLabel;")},optionsWrapper:{name:"1cmtbh-optionsWrapper",styles:"position:absolute;min-width:170px;width:100%;label:optionsWrapper;"},options:(0,E.iv)("z-index:",g.W5.dropdown,";background-color:",g.qo.base.white,";list-style-type:none;box-shadow:",g.AF.popover,";padding:",g.W0[4]," 0;margin:0;max-height:500px;overflow-y:auto;border-radius:",g.E0[6],";::-webkit-scrollbar{background-color:",g.qo.base.white,";width:10px;}::-webkit-scrollbar-thumb{background-color:",g.qo.base.secondary,";border-radius:",g.E0[6],";};label:options;"),optionItem:function(t){var e=t.isSelected;return(0,E.iv)(L.c.body(),";min-height:40px;transition:background-color 0.3s ease-in-out;:hover{background-color:",g.qo.background.hover,";}",e&&(0,E.iv)("background-color:",g.qo.background.active,";;label:optionItem;"),";;label:optionItem;")},radioLabel:(0,E.iv)("line-height:40px;padding-left:",g.W0[12],";;label:radioLabel;")},Z={published:{backgroundColor:g.qo.background.success,borderColor:g.qo.stroke.success,color:g.qo.base.success,leftIconColor:g.qo.base.success,rightIconColor:g.qo.icon.success,leftIcon:(0,_.tZ)(a.Z,{name:"markCircle",width:16,height:16})},unpublished:{backgroundColor:g.qo.background.neutral,borderColor:g.qo.stroke.neutral,color:g.qo.text.neutral,leftIconColor:g.qo.icon.hints,rightIconColor:g.qo.icon.default,leftIcon:(0,_.tZ)(a.Z,{name:"circleCross",width:16,height:16})},trashed:{backgroundColor:g.qo.background.danger,borderColor:g.qo.stroke.danger,color:g.qo.text.error,leftIconColor:g.qo.icon.error,rightIconColor:g.qo.icon.error,leftIcon:(0,_.tZ)(a.Z,{name:"crossCircle",width:16,height:16})}},U=r(935),N=r(802),W=r(6537),q=r(6492),F=r(4469),H=r(5501),Y=function(t){return H.u.put(W.H.ADD_TO_MENU,t.data)},X=r(7536),K=r(9781);function $(t){return $="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$(t)}function V(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Q(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?V(Object(r),!0).forEach((function(e){z(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):V(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function z(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==$(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==$(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===$(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function J(){J=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i=e&&e.prototype instanceof f?e:f,a=Object.create(i.prototype),l=new P(o||[]);return n(a,"_invoke",{value:_(t,r,l)}),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var d={};function f(){}function p(){}function h(){}var y={};c(y,i,(function(){return this}));var b=Object.getPrototypeOf,v=b&&b(b(I([])));v&&v!==e&&r.call(v,i)&&(y=v);var g=h.prototype=f.prototype=Object.create(y);function E(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){function o(n,i,a,l){var c=s(t[n],t,i);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==$(d)&&r.call(d,"__await")?e.resolve(d.__await).then((function(t){o("next",t,a,l)}),(function(t){o("throw",t,a,l)})):e.resolve(d).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,l)}))}l(c.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function _(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=O(a,r);if(l){if(l===d)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=s(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function O(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,O(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=s(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function I(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return p.prototype=h,n(g,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=c(h,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,c(t,l,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},E(m.prototype),c(m.prototype,a,(function(){return this})),t.AsyncIterator=m,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new m(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(g),c(g,l,"Generator"),c(g,i,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),w(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;w(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:I(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function tt(t,e,r,n,o,i,a){try{var l=t[i](a),c=l.value}catch(t){return void r(t)}l.done?e(c):Promise.resolve(c).then(n,o)}const et=function(t){var e,r=t.closeModal,n=t.title,i=t.id,a=(0,D.$)(),c=(0,N.O)({defaultValues:{page_id:i,menu_id:0,parent_id:1,menu_type:"mainmenu",title:"",alias:"",ordering:0}}),d=c.setValue,f=c.reset,p=c.getValues,h=c.watch,y=function(t){var e=(0,l.p)().showToast;return(0,q.a)({queryKey:["MenuByPageId",t],queryFn:function(){return function(t){return H.u.get(W.H.MENU_BY_PAGE_ID,{params:{id:t}})}(t).then((function(t){return t.data}))},onError:function(t){e({type:"danger",message:t.message})}})}(i),b=(e=(0,l.p)().showToast,(0,q.a)({queryKey:["MenuList"],queryFn:function(){return H.u.get(W.H.MENU_LIST).then((function(t){return t.data}))},onError:function(t){e({type:"danger",message:t.message})}})),v=function(t){var e=t.menutype,r=t.id,n=(0,l.p)().showToast;return(0,q.a)({queryKey:["MenuParentItems",e,r],queryFn:function(){return function(t){var e=t.menutype,r=t.id;return H.u.get(W.H.MENU_PARENT_ITEMS,{params:{menutype:e,id:r}})}({menutype:e,id:r}).then((function(t){return t.data}))},onError:function(t){n({type:"danger",message:t.message})}})}({menutype:h("menu_type"),id:p("menu_id")}),g=function(){var t=(0,l.p)().showToast,e=(0,D.$)();return(0,F.D)({mutationFn:Y,onSuccess:function(){t({type:"success",message:e("COM_SPPAGEBUILDER_EDITOR_ADD_TO_MENU_SUCCESS_MESSAGE")})},onError:function(e){t({type:"danger",message:e.message})}})}();return(0,x.useEffect)((function(){y.data&&f({menu_id:y.data.id,parent_id:y.data.parent_id,menu_type:y.data.menutype,title:y.data.title,alias:y.data.alias,ordering:y.data.id})}),[y.data,f]),y.isLoading||b.isLoading?(0,_.tZ)(U.fz,{}):(0,_.tZ)(K.Z,{onClose:function(){return r({action:"CLOSE"})},title:n,wrapperCss:rt.wrapper,children:(0,_.BX)("form",{onSubmit:c.handleSubmit(function(){var t,e=(t=J().mark((function t(e){return J().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,g.mutateAsync({id:i,data:e});case 2:t.sent.data&&r({action:"CONFIRM"});case 4:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){tt(i,n,o,a,l,"next",t)}function l(t){tt(i,n,o,a,l,"throw",t)}a(void 0)}))});return function(t){return e.apply(this,arguments)}}()),children:[(0,_.BX)("div",{css:rt.fieldWrapper,children:[(0,_.tZ)(X.Qr,{name:"title",control:c.control,render:function(t){return(0,_.tZ)(s.Z,Q(Q({},t),{},{label:a("COM_SPPAGEBUILDER_EDITOR_ADD_TO_MENU_MODAL_MENU_TITLE")}))}}),(0,_.tZ)(X.Qr,{name:"alias",control:c.control,render:function(t){return(0,_.tZ)(s.Z,Q(Q({},t),{},{label:a("COM_SPPAGEBUILDER_EDITOR_ADD_TO_MENU_MODAL_MENU_ALIAS")}))}}),(0,_.tZ)(X.Qr,{name:"menu_type",control:c.control,render:function(t){var e;return(0,_.tZ)(u.Z,Q(Q({},t),{},{label:a("COM_SPPAGEBUILDER_EDITOR_ADD_TO_MENU_MODAL_MENU"),options:null!==(e=b.data)&&void 0!==e?e:[],isClearable:!1,onChange:function(){d("parent_id",1)}}))}}),(0,_.tZ)(X.Qr,{name:"parent_id",control:c.control,render:function(t){var e;return(0,_.tZ)(u.Z,Q(Q({},t),{},{label:a("COM_SPPAGEBUILDER_EDITOR_ADD_TO_MENU_MODAL_MENU_PARENT"),options:null!==(e=v.data)&&void 0!==e?e:[],isClearable:!1}))}})]}),(0,_.BX)("div",{css:rt.buttonWrapper,children:[(0,_.tZ)(o.Z,{variant:"secondary",onClick:function(){return r({action:"CLOSE"})},children:a("COM_SPPAGEBUILDER_EDITOR_ADD_TO_MENU_MODAL_CANCEL")}),(0,_.tZ)(o.Z,{type:"submit",loading:g.isLoading,children:a("COM_SPPAGEBUILDER_EDITOR_ADD_TO_MENU_MODAL_SAVE_CHANGES")})]})]})})};var rt={wrapper:{name:"1vd4vqj-wrapper",styles:"max-width:500px;label:wrapper;"},fieldWrapper:(0,E.iv)("background-color:",g.qo.base.white,";padding:",g.W0[20],";display:flex;flex-direction:column;gap:",g.W0[12],";;label:fieldWrapper;"),buttonWrapper:(0,E.iv)("background-color:",g.qo.background.white,";box-shadow:",g.AF.dividerTop,";padding:",g.W0[12]," ",g.W0[16],";display:flex;justify-content:end;gap:",g.W0[8],";;label:buttonWrapper;")},nt=r(1974),ot=r(3106),it=r(8138),at=r(5587),lt=r(4285);function ct(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var ut=r(2811),st=r(908),dt=r(9101),ft=r(1073),pt=r(2328),ht=r(7184),yt=r(7679),bt=r(6680),vt=r(9655);function gt(t){return gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gt(t)}function Et(){Et=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i=e&&e.prototype instanceof f?e:f,a=Object.create(i.prototype),l=new P(o||[]);return n(a,"_invoke",{value:_(t,r,l)}),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var d={};function f(){}function p(){}function h(){}var y={};c(y,i,(function(){return this}));var b=Object.getPrototypeOf,v=b&&b(b(I([])));v&&v!==e&&r.call(v,i)&&(y=v);var g=h.prototype=f.prototype=Object.create(y);function E(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){function o(n,i,a,l){var c=s(t[n],t,i);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==gt(d)&&r.call(d,"__await")?e.resolve(d.__await).then((function(t){o("next",t,a,l)}),(function(t){o("throw",t,a,l)})):e.resolve(d).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,l)}))}l(c.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function _(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=O(a,r);if(l){if(l===d)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=s(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function O(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,O(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=s(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function I(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return p.prototype=h,n(g,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=c(h,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,c(t,l,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},E(m.prototype),c(m.prototype,a,(function(){return this})),t.AsyncIterator=m,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new m(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(g),c(g,l,"Generator"),c(g,i,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),w(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;w(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:I(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function mt(t,e,r,n,o,i,a){try{var l=t[i](a),c=l.value}catch(t){return void r(t)}l.done?e(c):Promise.resolve(c).then(n,o)}function _t(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){mt(i,n,o,a,l,"next",t)}function l(t){mt(i,n,o,a,l,"throw",t)}a(void 0)}))}}function Ot(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function St(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ot(Object(r),!0).forEach((function(e){wt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ot(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function wt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==gt(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==gt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===gt(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Pt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}const It=function(t){var e,r,n,o=t.selectedItems,i=t.index,c=t.page,u=t.data,d=t.lastSelectedIndex,f=t.setLastSelectedIndex,p=t.setSelectedItems,y=t.columns,E=(0,D.$)(),O=function(){var t,e,r=(t=(0,x.useState)(!1),e=2,function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,l=[],c=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ct(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ct(t,e):void 0}}(t,e)||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.")}()),n=r[0],o=r[1],i=function(t){"shift"===t.key.toLowerCase()&&o(!0)},a=function(t){"shift"===t.key.toLowerCase()&&o(!1)};return(0,x.useEffect)((function(){return window.addEventListener("keydown",i),window.addEventListener("keyup",a),function(){window.removeEventListener("keydown",i),window.removeEventListener("keyup",a)}}),[]),n}(),S=(0,b.d)().showModal,w=(0,l.p)().showToast,P=(0,h.g)(),I=(r=(0,x.useState)(!1),n=2,function(t){if(Array.isArray(t))return t}(r)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,l=[],c=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(r,n)||function(t,e){if(t){if("string"==typeof t)return Pt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Pt(t,e):void 0}}(r,n)||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.")}()),T=I[0],A=I[1],C=(0,pt.v)((function(t){return t.appConfig})),G=(0,yt.R4)(),j=(0,yt.es)(),M=(0,ht.X)(),k=(0,ut.T)().closeSettingPanel,Z=(0,ft.j)((function(t){return t.setActiveAction})),U=(0,st.Q)(),W=U.edit||U.edit_own&&c.created_by===C.user_id,q=U.create&&W,F=U.edit_state,H=U.delete,Y=(0,N.O)({defaultValues:{title:c.title}}),K=(0,at.nB)({id:c.id}),$=K.attributes,V=K.listeners,Q=K.setNodeRef,z=K.transform,J=K.transition,tt=K.isDragging,rt={transform:lt.ux.Transform.toString(z),transition:J,zIndex:tt?g.W5.positive:g.W5.level,backgroundColor:tt?g.qo.background.hover:""},gt=[{label:E("COM_SPPAGEBUILDER_EDITOR_FILTER_PUBLISHED"),value:1,disabled:!F},{label:E("COM_SPPAGEBUILDER_EDITOR_FILTER_UNPUBLISHED"),value:0,disabled:!F},{label:E("COM_SPPAGEBUILDER_EDITOR_FILTER_TRASHED"),value:-2,disabled:!F||!H}],mt=[{id:"view",icon:"eye",title:"COM_SPPAGEBUILDER_EDITOR_PAGE_VIEW"},{id:"rename",icon:"pencil",title:"COM_SPPAGEBUILDER_EDITOR_PAGE_RENAME",isDisabled:!W},{id:"duplicate",icon:"cloneLine",title:"COM_SPPAGEBUILDER_EDITOR_PAGE_DUPLICATE",isDisabled:!q},{id:"copyLink",icon:"link",title:"COM_SPPAGEBUILDER_EDITOR_PAGE_COPY_LINK"},{id:"addToMenu",icon:"plus",title:"COM_SPPAGEBUILDER_EDITOR_PAGE_ADD_TO_MENU",isDisabled:!W},{id:"export",icon:"upload",title:"COM_SPPAGEBUILDER_EDITOR_PAGE_EXPORT"},{id:"remove",icon:"trash",title:-2===c.published?"COM_SPPAGEBUILDER_EDITOR_PAGE_DELETE":"COM_SPPAGEBUILDER_EDITOR_PAGE_TRASH",variant:"critical",isDisabled:!U.delete||!F}];return(0,x.useEffect)((function(){var t=function(t){"Escape"===t.key&&(A(!1),Y.reset({title:c.title}))};return window.addEventListener("keydown",t),function(){window.removeEventListener("keydown",t)}}),[]),(0,_.BX)("tr",{css:Dt.bodyTr({isSelected:o.ids.includes(c.id),isShownFrontendButton:C.enable_frontend_editing&&W}),ref:Q,style:rt,children:[(0,_.BX)("td",{css:Dt.checkboxWrapper,children:[(0,_.tZ)("div",St(St(St({css:Dt.dragPoint,"data-drag-point":!0},$),V),{},{children:(0,_.tZ)(a.Z,{name:"dragger",height:32,width:32})})),(0,_.tZ)(v.Z,{onChange:function(t){var e=(0,m.R5)({itemId:c.id,isShiftHolding:O,lastSelectedIndex:d,currentIndex:i,isChecked:t,selectedItemIds:o.ids,selectedItemsIndex:o.indexes,totalItemsList:u}),r=e.updatedItemIds,n=e.updatedItemIndexes;p({ids:r,indexes:n}),f(i)},checked:o.ids.includes(c.id)})]}),(0,_.tZ)("td",{children:(0,_.tZ)("div",{css:Dt.pageName,children:T?(0,_.tZ)("form",{onSubmit:Y.handleSubmit((0,bt.GI)(Y,function(){var t=_t(Et().mark((function t(e){var r;return Et().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.title,t.next=3,G.mutateAsync({ids:c.id.toString(),type:"rename",value:r});case 3:A(!1);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())),children:(0,_.tZ)(X.Qr,{control:Y.control,name:"title",render:function(t){return(0,_.tZ)(s.Z,St(St({},t),{},{hasAutoFocus:!0}))}})}):(0,_.BX)(_.HY,{children:[W?(0,_.tZ)(vt.rU,{css:Dt.titleButton({canEdit:W}),to:it.F.PageEditor.buildLink({id:c.id.toString()}),state:{prevPageName:ot.lr},onClick:function(){Z(void 0),k()},children:c.title}):(0,_.tZ)("span",{css:Dt.titleButton({canEdit:W}),children:c.title}),0!==c.checked_out&&(0,_.tZ)("button",{type:"button",css:Dt.lockButton,onClick:function(){G.mutate({type:"check-out",ids:c.id.toString()})},children:(0,_.tZ)(a.Z,{name:"lock",width:24,height:24})}),C.enable_frontend_editing&&W&&(0,_.BX)("a",{"data-frontend-editor-button":!0,css:Dt.frontendEditorButton,href:c.url,target:"_blank",rel:"noopener noreferrer",children:[(0,_.tZ)(a.Z,{name:"parmaLink",width:16,height:16}),(0,_.tZ)("span",{children:E("COM_SPPAGEBUILDER_EDITOR_FRONTEND_EDITOR")})]})]})})}),y.includes("author")&&(0,_.tZ)("td",{css:Dt.widthStyles({width:200}),children:(0,_.tZ)("p",{children:c.author})}),y.includes("categories")&&(0,_.tZ)("td",{children:(0,_.tZ)("p",{children:c.category})}),y.includes("access")&&(0,_.tZ)("td",{css:Dt.access,children:(0,_.tZ)("p",{children:c.access_title})}),y.includes("id")&&(0,_.tZ)("td",{css:[L.c.body("medium"),R.iZ.textCenter,";label:PageListItem;"],children:(0,_.tZ)("p",{children:c.id})}),y.includes("hits")&&(0,_.tZ)("td",{css:[L.c.body("medium"),R.iZ.textCenter,";label:PageListItem;"],children:c.hits}),y.includes("language")&&(0,_.tZ)("td",{css:R.iZ.textCenter,children:(0,_.tZ)("p",{children:null!==(e=c.language_title)&&void 0!==e?e:E("COM_SPPAGEBUILDER_EDITOR_LANGUAGE_ALL")})}),(0,_.tZ)("td",{css:Dt.status,children:(0,_.tZ)(B,{value:c.published,options:gt,onChange:function(t){G.mutate({type:{1:"published",0:"unpublished","-2":"trash"}[t.value],ids:c.id.toString()})},disabled:!F})}),(0,_.tZ)("td",{css:Dt.actionColumn,children:(0,_.tZ)(dt.Z,{actions:mt,triggerButtonContent:(0,_.tZ)(a.Z,{name:"ellipsisX",width:24,height:24,style:Dt.triggerIcon}),onSelect:function(){var t=_t(Et().mark((function t(e){return Et().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e,t.next="remove"===t.t0?3:"addToMenu"===t.t0?12:"view"===t.t0?14:"copyLink"===t.t0?16:"duplicate"===t.t0?18:"export"===t.t0?20:"rename"===t.t0?22:25;break;case 3:if(-2===c.published){t.next=6;break}return G.mutate({type:"trash",ids:c.id.toString()}),t.abrupt("break",25);case 6:return t.next=8,P({title:E("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_DELETE_MODAL_TITLE"),confirmationMessage:E("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_DELETE_MODAL_MESSAGE_SINGLE_PAGE"),confirmButtonText:E("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_DELETE_MODAL_DELETE_BUTTON_TEXT_SINGLE_ITEM"),mutationFn:yt.hh,payload:{ids:c.id.toString(),type:"delete"},invalidateKeys:[["PageList"]]});case 8:return"CONFIRM"===t.sent.action&&w({type:"success",message:E("COM_SPPAGEBUILDER_EDITOR_BULK_ACTION_PERFORMED_SUCCESSFULLY")}),t.abrupt("break",25);case 12:return S({component:et,props:{title:E("COM_SPPAGEBUILDER_EDITOR_ADD_TO_MENU_MODAL_TITLE"),id:c.id}}),t.abrupt("break",25);case 14:return window.open(c.preview,"_blank","noopener=true,noreferrer=true"),t.abrupt("break",25);case 16:return r="".concat(nt.Z.APPLICATION_ROOT,"index.php?option=com_sppagebuilder&view=page&id=").concat(c.id),n=void 0,(n=document.createElement("textarea")).value=r,n.setAttribute("readonly",""),n.style.position="absolute",n.style.left="-9999px",document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n),w({type:"success",message:E("COM_SPPAGEBUILDER_EDITOR_PAGE_COPY_LINK_MESSAGE")}),t.abrupt("break",25);case 18:return j.mutate({id:c.id}),t.abrupt("break",25);case 20:return M.mutateAsync({template:c.text,css:c.css}),t.abrupt("break",25);case 22:return Y.setValue("title",c.title),A(!0),t.abrupt("break",25);case 25:case"end":return t.stop()}var r,n}),t)})));return function(e){return t.apply(this,arguments)}}()})})]},c.id)};var Lt={name:"1qe2gq2-bodyTr",styles:"[data-frontend-editor-button]{display:flex;};label:bodyTr;"},Dt={bodyTr:function(t){var e=t.isSelected,r=t.isShownFrontendButton;return(0,E.iv)("height:80px;border-bottom:1px solid ",g.qo.stroke.neutral,";position:relative;&:hover{background-color:",g.qo.background.hover,";",r&&Lt," [data-drag-point]{opacity:1;}}",e&&(0,E.iv)("background-color:",g.qo.background.disabled,";;label:bodyTr;"),";;label:bodyTr;")},lockButton:(0,E.iv)(R.iZ.resetButton,";svg{color:",g.qo.icon.default,";};label:lockButton;"),titleButton:function(t){var e=t.canEdit;return(0,E.iv)(L.c.heading6(),";padding-inline:0;",e&&(0,E.iv)(":hover{color:",g.qo.text.primary,";};label:titleButton;")," ",!e&&(0,E.iv)("cursor:not-allowed;color:",g.qo.text.disabled,";;label:titleButton;"),";;label:titleButton;")},widthStyles:function(t){var e=t.width;return(0,E.iv)("width:",e,"px;;label:widthStyles;")},pageName:(0,E.iv)("position:relative;display:flex;gap:",g.W0[12],";align-items:center;max-width:400px;width:100%;;label:pageName;"),frontendEditorButton:(0,E.iv)(L.c.body(),";background-color:",g.qo.base.white,";border-radius:",g.E0[24],";padding:",g.W0[4]," ",g.W0[12]," ",g.W0[4]," ",g.W0[4],";width:fit-content;align-items:center;gap:",g.W0[8],";color:",g.qo.text.neutral,";display:none;position:absolute;left:100%;white-space:nowrap;svg{fill:none;}&:hover{color:",g.qo.text.hover,";}&::before,&::after{content:''!important;all:unset!important;};label:frontendEditorButton;"),checkboxWrapper:{name:"l0wqz3-checkboxWrapper",styles:"position:relative;label:checkboxWrapper;"},dragPoint:(0,E.iv)("position:absolute;top:0;left:0;height:100%;width:32px;display:flex;align-items:center;opacity:0;cursor:grab;svg{color:",g.qo.icon.default,";};label:dragPoint;"),access:{name:"sx074l-access",styles:"text-align:center;label:access;"},status:{name:"1n9i8ph-status",styles:"display:grid;place-content:center;height:inherit;label:status;"},triggerIcon:(0,E.iv)("color:",g.qo.icon.hints,";;label:triggerIcon;"),actionColumn:{name:"1m7ix2e-actionColumn",styles:"text-align:right;label:actionColumn;"}};const Tt=function(t){var e=t.data,r=t.selectedItems,n=t.setSelectedItems,o=t.lastSelectedIndex,i=t.setLastSelectedIndex,a=t.isLoading,l=void 0!==a&&a,c=t.columns,u=(0,D.$)(),s=e.length,d=r.ids.length,f=c.length+3;return(0,_.tZ)("div",{css:Ct.tableContainer,children:(0,_.BX)("table",{css:Ct.table({selectedColumns:c.length}),children:[(0,_.tZ)("thead",{children:(0,_.BX)("tr",{css:Ct.headRow,children:[(0,_.tZ)("th",{css:Ct.widthStyles({width:70}),children:(0,_.tZ)(v.Z,{checked:d>0&&d===s,isIndeterminate:d>0&&d<s,onChange:function(){var t=d===s?[]:(0,m.x9)(e),r=d===s?[]:(0,m.w6)(s);n({ids:t,indexes:r}),i(-1)}})}),(0,_.tZ)("th",{css:Ct.widthStyles({width:250}),children:u("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_PAGE_NAME")}),c.includes("author")&&(0,_.tZ)("th",{css:Ct.widthStyles({width:180}),children:u("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_AUTHOR")}),c.includes("categories")&&(0,_.tZ)("th",{children:u("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_CATEGORIES")}),c.includes("access")&&(0,_.tZ)("th",{css:Ct.textCenter,children:u("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_ACCESS")}),c.includes("id")&&(0,_.tZ)("th",{css:Ct.textCenter,children:u("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_ID")}),c.includes("hits")&&(0,_.tZ)("th",{css:Ct.textCenter,children:u("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_HITS")}),c.includes("language")&&(0,_.tZ)("th",{css:Ct.textCenter,children:u("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_LANGUAGE")}),(0,_.tZ)("th",{css:[Ct.widthStyles({width:160}),Ct.textCenter,";label:PageListTable;"],children:u("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_STATUS")}),(0,_.tZ)("th",{css:Ct.widthStyles({width:100})})]})}),(0,_.tZ)("tbody",{children:l?Array(10).fill(0).map((function(t,e){return(0,_.tZ)("tr",{css:Ct.skeletonWrapper,children:Array(f).fill(0).map((function(t,e){return(0,_.tZ)("td",{css:Ct.widthStyles({width:0===e?70:(0,m.sZ)(100,250)}),children:(0,_.tZ)(O,{animation:!0,height:20,width:"".concat(0===e?100:(0,m.sZ)(90,100),"%")})},e)}))},e)})):e.map((function(t,a){return(0,_.tZ)(It,{index:a,data:e,page:t,lastSelectedIndex:o,setLastSelectedIndex:function(t){return i(t)},selectedItems:r,setSelectedItems:function(t){n(t)},columns:c},t.id)}))})]})})};var At={name:"vq4tj-table",styles:"tr:hover{td{:nth-of-type(3)>*{display:none;}}};label:table;"},Ct={tableContainer:{name:"1c7p8s-tableContainer",styles:"display:block;width:100%;overflow-x:auto;label:tableContainer;"},table:function(t){var e=t.selectedColumns;return(0,E.iv)("width:100%;th{background-color:",(0,T.m4)(g.qo.base.primary,.15),";color:",g.qo.text.default,";height:49px;}th,td{",L.c.body(),";padding:",g.W0[16],";:first-of-type{padding-left:",g.W0[32],";}:last-of-type{padding-right:",g.W0[24],";}}",e>0&&At,";;label:table;")},headRow:(0,E.iv)("th{",L.c.body(),";};label:headRow;"),paginatorWrapper:(0,E.iv)("margin-top:",g.W0[32],";;label:paginatorWrapper;"),widthStyles:function(t){var e=t.width;return(0,E.iv)("width:",e,"px;;label:widthStyles;")},textCenter:{name:"lfnssf-textCenter",styles:"text-align:center;label:textCenter;"},skeletonWrapper:(0,E.iv)("border-bottom:1px solid ",g.qo.stroke.neutral,";height:80px;;label:skeletonWrapper;")},Rt=r(9752),xt=r(36),Gt=r(4420);function Bt(t){return Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bt(t)}function jt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Mt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?jt(Object(r),!0).forEach((function(e){kt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function kt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==Bt(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Bt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===Bt(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Zt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,l=[],c=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Ut(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ut(t,e):void 0}}(t,e)||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 Ut(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Nt=(0,Gt.createEnumParam)(["asc","desc"]),Wt=r(2200),qt=r(8698),Ft=r(3425),Ht=r(6511);function Yt(t){return Yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yt(t)}function Xt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Kt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Xt(Object(r),!0).forEach((function(e){$t(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function $t(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==Yt(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Yt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===Yt(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Vt=function(t){var e=t.values,r=t.onChange,n=t.wrapperCss,a=t.clearButtonStatus,l=t.onClearFilter,c=(0,D.$)(),u=(0,pt.v)((function(t){return t.appConfig})),s=e.status,d=e.access,f=e.category,p=e.language,h=[{label:c("COM_SPPAGEBUILDER_EDITOR_FILTER_PUBLISHED"),value:1},{label:c("COM_SPPAGEBUILDER_EDITOR_FILTER_UNPUBLISHED"),value:0},{label:c("COM_SPPAGEBUILDER_EDITOR_FILTER_TRASHED"),value:-2}];return(0,_.BX)("div",{css:[Qt.wrapper,n,";label:FilterSelectGroup;"],children:[(0,_.tZ)(i.Z,{placeholder:c("COM_SPPAGEBUILDER_EDITOR_FILTER_PLACEHOLDER_STATUS"),wrapperStyle:Qt.itemCss,value:h.find((function(t){return t.value===s})),options:h,clearOption:function(){r(Kt(Kt({},e),{},{status:null}))},onChange:function(t){r(Kt(Kt({},e),{},{status:t.value}))}}),(0,_.tZ)(i.Z,{placeholder:c("COM_SPPAGEBUILDER_EDITOR_FILTER_PLACEHOLDER_ACCESS"),wrapperStyle:Qt.itemCss,value:u.access_levels.find((function(t){return t.value===d})),options:u.access_levels,clearOption:function(){r(Kt(Kt({},e),{},{access:null}))},onChange:function(t){r(Kt(Kt({},e),{},{access:t.value}))}}),(0,_.tZ)(i.Z,{placeholder:c("COM_SPPAGEBUILDER_EDITOR_FILTER_PLACEHOLDER_CATEGORY"),wrapperStyle:Qt.itemCss,value:f?u.categories.find((function(t){return t.value===Number(f)})):void 0,options:u.categories,clearOption:function(){r(Kt(Kt({},e),{},{category:null}))},onChange:function(t){r(Kt(Kt({},e),{},{category:t.value}))}}),(0,_.tZ)(i.Z,{placeholder:c("COM_SPPAGEBUILDER_EDITOR_FILTER_PLACEHOLDER_LANGUAGE"),wrapperStyle:Qt.itemCss,value:u.languages.find((function(t){return t.value===p})),options:u.languages,clearOption:function(){r(Kt(Kt({},e),{},{language:null}))},onChange:function(t){r(Kt(Kt({},e),{},{language:t.value}))}}),(0,_.tZ)(o.Z,{variant:"secondary",disabled:!a,buttonCss:Qt.itemCss,onClick:function(){r({status:null,access:null,category:null,language:null}),l()},children:c("COM_SPPAGEBUILDER_EDITOR_CLEAR")})]})};var Qt={wrapper:(0,E.iv)("display:flex;border:1px solid ",g.qo.stroke.neutral,";border-radius:",g.E0[5],";overflow:hidden;box-shadow:",g.AF.input,";input,button{border:none;border-radius:0;box-shadow:none;}input{border-right:1px solid ",g.qo.stroke.neutral,";:focus{box-shadow:none;}}button:last-of-type{display:flex;justify-content:center;align-items:center;};label:wrapper;"),itemCss:{name:"1qky7zh-itemCss",styles:"min-width:108px;label:itemCss;"}};function zt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}const Jt=function(t){var e,r,n=t.currentPage,o=t.onPageChange,i=t.totalItems,l=t.itemsPerPage,c=(0,D.$)(),u=(e=(0,x.useState)(""),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,l=[],c=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,r)||function(t,e){if(t){if("string"==typeof t)return zt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zt(t,e):void 0}}(e,r)||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.")}()),s=u[0],d=u[1],f=Math.max(Math.ceil(i/l),1);(0,x.useEffect)((function(){d(n.toString())}),[n]);var p=function(t){t<1||t>f||o(t)};return(0,_.BX)("div",{css:te.wrapper,children:[(0,_.BX)("div",{css:te.pageStatus,children:[c("COM_SPPAGEBUILDER_EDITOR_PAGINATION_PAGE"),(0,_.tZ)("span",{children:(0,_.tZ)("input",{type:"text",css:te.paginationInput,value:s,onChange:function(t){var e=t.currentTarget.value.replace(/[^0-9]/g,""),r=Number(e);r>0&&r<=f?(d(e),o(r)):e||d(e)},autoComplete:"off"})}),c("COM_SPPAGEBUILDER_EDITOR_PAGINATION_PAGE_OF")," ",(0,_.tZ)("span",{children:f})]}),(0,_.BX)("div",{css:te.pageController,children:[(0,_.tZ)("button",{type:"button",css:te.paginationButton,onClick:function(){return p(n-1)},disabled:1===n,children:(0,_.tZ)(a.Z,{name:"chevronLeft",width:24,height:24})}),(0,_.tZ)("button",{type:"button",css:te.paginationButton,onClick:function(){return p(n+1)},disabled:n===f,children:(0,_.tZ)(a.Z,{name:"chevronRight",width:24,height:24})})]})]})};var te={wrapper:(0,E.iv)("display:flex;justify-content:end;align-items:center;flex-wrap:wrap;gap:",g.W0[8],";height:36px;;label:wrapper;"),pageStatus:(0,E.iv)(L.c.body()," color:",g.qo.text.neutral,";min-width:100px;;label:pageStatus;"),paginationInput:(0,E.iv)("outline:0;border:1px solid ",g.qo.stroke.neutral,";border-radius:",g.E0[5],";margin:0 ",g.W0[8],";color:",g.qo.text.neutral,";padding:",g.W0[8]," ",g.W0[12],";width:72px;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:",g.W0[0],";};label:paginationInput;"),pageController:(0,E.iv)("gap:",g.W0[8],";display:flex;justify-content:center;align-items:center;height:100%;;label:pageController;"),paginationButton:(0,E.iv)(R.iZ.resetButton,";background-color:",g.qo.background.white,";color:",g.qo.icon.default,";border-radius:",g.E0[6],";height:32px;width:32px;display:grid;place-items:center;transition:background-color 0.2s ease-in-out,color 0.3s ease-in-out;&:hover{background-color:",g.qo.base.primary,";&>svg{color:",g.qo.base.white,";}}&:disabled{background-color:",g.qo.background.disabled,";&>svg{color:",g.qo.icon.disabled,";}};label:paginationButton;")};const ee=r.p+"images/ed8841a7709fb2582a09.svg";var re=r(4693);function ne(t){return ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ne(t)}function oe(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ie(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==ne(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==ne(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===ne(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ae=function(t){var e=t.draggingNodeRect,r=t.transform,n=t.scrollableAncestorRects[0];return e&&n?le(r,e,n):r},le=function(t,e,r){var n=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?oe(Object(r),!0).forEach((function(e){ie(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):oe(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t);return e.top+t.y<=r.top?n.y=r.top-e.top:e.bottom+t.y>=r.top+r.height&&(n.y=r.top+r.height-e.bottom),e.left+t.x<=r.left?n.x=r.left-e.left:e.right+t.x>=r.left+r.width&&(n.x=r.left+r.width-e.right),n},ce=r(7273),ue=r(6216);function se(t){return se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},se(t)}function de(){de=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i=e&&e.prototype instanceof f?e:f,a=Object.create(i.prototype),l=new P(o||[]);return n(a,"_invoke",{value:_(t,r,l)}),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var d={};function f(){}function p(){}function h(){}var y={};c(y,i,(function(){return this}));var b=Object.getPrototypeOf,v=b&&b(b(I([])));v&&v!==e&&r.call(v,i)&&(y=v);var g=h.prototype=f.prototype=Object.create(y);function E(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){function o(n,i,a,l){var c=s(t[n],t,i);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==se(d)&&r.call(d,"__await")?e.resolve(d.__await).then((function(t){o("next",t,a,l)}),(function(t){o("throw",t,a,l)})):e.resolve(d).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,l)}))}l(c.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function _(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=O(a,r);if(l){if(l===d)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=s(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function O(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,O(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=s(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function I(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return p.prototype=h,n(g,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=c(h,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,c(t,l,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},E(m.prototype),c(m.prototype,a,(function(){return this})),t.AsyncIterator=m,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new m(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(g),c(g,l,"Generator"),c(g,i,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),w(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;w(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:I(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function fe(t,e,r,n,o,i,a){try{var l=t[i](a),c=l.value}catch(t){return void r(t)}l.done?e(c):Promise.resolve(c).then(n,o)}function pe(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){fe(i,n,o,a,l,"next",t)}function l(t){fe(i,n,o,a,l,"throw",t)}a(void 0)}))}}function he(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ye(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?he(Object(r),!0).forEach((function(e){be(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):he(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function be(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==se(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==se(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===se(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ve(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,l=[],c=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ge(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ge(t,e):void 0}}(t,e)||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 ge(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Ee=(0,ue.fp)(ot.dR.TABLE_COLUMNS_LOCAL_STORAGE_KEY);const me=function(){var t,e=ve((0,x.useState)([]),2),r=e[0],n=e[1],v=ve((0,x.useState)(),2),g=v[0],E=v[1],O=(0,st.Q)(),S=(0,D.$)(),w=(0,b.d)().showModal,P=(0,h.g)(),I=(0,l.p)().showToast,L=ve((0,x.useState)(-1),2),T=L[0],A=L[1],C=ve((0,x.useState)({ids:[],indexes:[]}),2),R=C[0],G=C[1],B=O.edit_state,j=O.delete,M=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.limit,r=void 0===e?ot.Hy:e,n=t.updateQueryParams,o=void 0!==n&&n,i=Zt((0,Gt.useQueryParams)({page:(0,Gt.withDefault)(Gt.NumberParam,1),sortProperty:(0,Gt.withDefault)(Gt.StringParam,""),sortDirection:(0,Gt.withDefault)(Nt,void 0),filter:(0,Gt.withDefault)(Gt.JsonParam,{})}),2),a=i[0],l=i[1],c=Zt((0,x.useState)({page:1,sortProperty:"",sortDirection:void 0,filter:{}}),2),u=c[0],s=c[1],d=o?u:a,f=(r=a.filter.limit?Number(a.filter.limit):r)*Math.max(0,d.page-1),p=(0,x.useCallback)((function(t){o?s((function(e){return Mt(Mt({},e),t)})):l(Mt({},t))}),[l,s,o]),h=(0,x.useCallback)((function(t){return p({filter:t})}),[p]);return{pageInfo:d,onPageChange:function(t){return p({page:t})},onColumnSort:function(t){var e;e=t!==d.sortProperty?{sortDirection:"asc",sortProperty:t}:{sortDirection:"asc"===d.sortDirection?"desc":"asc",sortProperty:t},p(e)},offset:f,itemsPerPage:r,onFilterItems:h}}(),k=M.pageInfo,Z=M.onPageChange,U=M.onFilterItems,W=M.offset,q=(0,yt.R4)(),F=(0,yt.r7)(),H=Number(k.filter.limit)||ot.Hy,Y=(0,yt.u6)({offset:W,limit:H,filter:k.filter}),K=(0,N.O)({defaultValues:{search:k.filter.search||"",sortBy:k.filter.sortBy||"title",limit:Number(k.filter.limit)||ot.Hy,status:Number(k.filter.status)||null,access:Number(k.filter.access)||null,category:Number(k.filter.category)||null,language:k.filter.language||""}}),$=(0,N.O)({defaultValues:{columns:["author","categories","access","id","hits","language"]}}),V=(0,xt.N)(K.watch("search","")),Q=K.watch("limit"),z=K.watch("sortBy"),J=K.watch("status"),tt=K.watch("access"),et=K.watch("category"),rt=K.watch("language"),nt=!!(V||(0,ce.BB)(J)||tt||et||rt),it=(0,Wt.D)(V);(0,x.useEffect)((function(){if((0,m.$K)(Ee))try{var t=JSON.parse(Ee);$.setValue("columns",t)}catch(t){}}),[]),(0,x.useEffect)((function(){U(ye(ye(ye(ye(ye(ye(ye({},V.length>0&&{search:V}),(0,m.$K)(J)&&{status:J.toString()}),tt&&{status:tt.toString()}),(0,m.$K)(et)&&{category:et.toString()}),rt&&{language:rt}),Q&&{limit:String(Q)}),z&&{sortBy:z})),V!==it&&Z(1)}),[U,V,Q,z,J,tt,et,rt,it,Z]);var lt=!!V||(0,m.$K)(J)||(0,m.$K)(tt)||(0,m.$K)(et)||!!rt,ct=(0,Rt.Dy)((0,Rt.VT)(Rt.we),(0,Rt.VT)(Rt.Lg,{coordinateGetter:at.is})),ut=[{label:S("COM_SPPAGEBUILDER_EDITOR_FILTER_PUBLISH"),value:"published",disabled:!B},{label:S("COM_SPPAGEBUILDER_EDITOR_FILTER_UNPUBLISH"),value:"unpublished",disabled:!B},{label:S("COM_SPPAGEBUILDER_EDITOR_ACTION_CHECKOUT"),value:"check-out",disabled:!B},{label:S(-2===J?"COM_SPPAGEBUILDER_EDITOR_FILTER_DELETE":"COM_SPPAGEBUILDER_EDITOR_FILTER_TRASH"),value:-2===J?"delete":"trash",disabled:!j||!B}],dt=[{label:S("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_SORT_BY_TITLE_ASC"),value:"title"},{label:S("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_SORT_BY_TITLE_DESC"),value:"-title"},{label:S("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_SORT_BY_ORDERING_ASC"),value:"ordering"},{label:S("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_SORT_BY_ORDERING_DESC"),value:"-ordering"},{label:S("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_SORT_BY_DATE_ASC"),value:"created_on"},{label:S("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_SORT_BY_DATE_DESC"),value:"-created_on"},{label:S("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_SORT_BY_STATUS_ASC"),value:"published"},{label:S("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_SORT_BY_STATUS_DESC"),value:"-published"},{label:S("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_SORT_BY_HITS_ASC"),value:"hits"},{label:S("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_SORT_BY_HITS_DESC"),value:"-hits"},{label:S("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_SORT_BY_ID_ASC"),value:"id"},{label:S("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_SORT_BY_ID_DESC"),value:"-id"}],ft=[{label:S("COM_SPPAGEBUILDER_EDITOR_COLUMN_LIST_AUTHOR"),value:"author"},{label:S("COM_SPPAGEBUILDER_EDITOR_COLUMN_LIST_CATEGORIES"),value:"categories"},{label:S("COM_SPPAGEBUILDER_EDITOR_COLUMN_LIST_ACCESS"),value:"access"},{label:S("COM_SPPAGEBUILDER_EDITOR_COLUMN_LIST_ID"),value:"id"},{label:S("COM_SPPAGEBUILDER_EDITOR_COLUMN_LIST_HITS"),value:"hits"},{label:S("COM_SPPAGEBUILDER_EDITOR_COLUMN_LIST_LANGUAGE"),value:"language"}],pt=[{label:"5",value:5},{label:"10",value:10},{label:"15",value:15},{label:"20",value:20},{label:"25",value:25},{label:"30",value:30},{label:"50",value:50},{label:"100",value:100},{label:"200",value:200},{label:"500",value:500}];(0,x.useEffect)((function(){Y.data&&n(Y.data.results)}),[Y.data]);var ht=$.watch("columns",[]);return(0,x.useEffect)((function(){(0,ue.pj)(ot.dR.TABLE_COLUMNS_LOCAL_STORAGE_KEY,JSON.stringify(ht))}),[ht]),(0,_.BX)(f.Z,{children:[(0,_.tZ)(p.Z,{title:S("COM_SPPAGEBUILDER_EDITOR_PAGE_TITLE_PAGES"),subtitle:S("COM_SPPAGEBUILDER_EDITOR_PAGE_SUBTITLE_PAGES"),action:O.create&&(0,_.tZ)(o.Z,{icon:(0,_.tZ)(a.Z,{name:"plus"}),onClick:function(){w({component:y.Z,props:{title:S("COM_SPPAGEBUILDER_EDITOR_CREATE_PAGE_MODAL_TITLE")}})},children:S("COM_SPPAGEBUILDER_EDITOR_ADD_NEW_PAGE_BUTTON")})}),(0,_.tZ)(d.Z,{children:(0,_.BX)(Ht.Z,{query:Y,disableLoader:!0,children:[(0,_.BX)("div",{css:_e.topPanel,children:[(0,_.BX)("div",{css:_e.topPanelLeft,children:[(0,_.tZ)(i.Z,{options:ut,placeholder:S("COM_SPPAGEBUILDER_EDITOR_BULK_ACTION_DROPDOWN_PLACEHOLDER"),wrapperStyle:_e.topPanelLeftSelect,isClearable:!1,disabled:0===R.ids.length||!B,value:ut.find((function(t){return t.value===g})),onChange:function(t){E(t.value)}}),(0,_.tZ)(o.Z,{onClick:pe(de().mark((function t(){var e;return de().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(R.ids.length&&g){t.next=2;break}return t.abrupt("return");case 2:if("delete"===g){t.next=6;break}q.mutate({ids:R.ids.join(","),type:g}),t.next=12;break;case 6:return e=R.ids.length,t.next=9,P({title:S("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_DELETE_MODAL_TITLE"),confirmationMessage:S("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_DELETE_MODAL_MESSAGE_MULTIPLE_PAGES",{totalPages:e.toString().padStart(2,"0")}),confirmButtonText:S("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_DELETE_MODAL_DELETE_BUTTON_TEXT",{totalPages:e.toString().padStart(2,"0")}),mutationFn:yt.hh,payload:{ids:R.ids.join(","),type:g},invalidateKeys:[["PageList"]]});case 9:"CONFIRM"===t.sent.action&&I({type:"success",message:S("COM_SPPAGEBUILDER_EDITOR_BULK_ACTION_PERFORMED_SUCCESSFULLY")});case 12:E(null),G({ids:[],indexes:[]}),A(-1);case 15:case"end":return t.stop()}}),t)}))),disabled:!g,children:S("COM_SPPAGEBUILDER_EDITOR_APPLY")})]}),(0,_.tZ)("div",{css:_e.topPanelRight,children:(0,_.tZ)(Vt,{clearButtonStatus:lt,onClearFilter:function(){return K.reset({search:"",status:null,access:null,category:null,language:""})},values:{status:J,access:tt,category:et,language:rt},onChange:function(t){K.reset(ye(ye({},K.getValues()),{},{status:t.status,access:t.access,category:Number(t.category),language:t.language||""}))}})})]}),(0,_.BX)(qt.Z,{cardCss:_e.cardStyle,children:[(0,_.BX)("div",{css:_e.tableHeaderWrapper,children:[(0,_.tZ)("div",{css:_e.searchFieldWrapper,children:(0,_.tZ)(X.Qr,{control:K.control,name:"search",render:function(t){return(0,_.tZ)(s.Z,ye(ye({},t),{},{variant:"search",placeholder:S("COM_SPPAGEBUILDER_EDITOR_SEARCH_INPUT_PLACEHOLDER"),isClearable:!0}))}})}),(0,_.BX)("div",{css:_e.sortByFieldWrapper,children:[(0,_.tZ)(X.Qr,{control:K.control,name:"limit",render:function(t){return(0,_.tZ)(u.Z,ye(ye({},t),{},{options:pt,isClearable:!1,removeOptionsMinWidth:!0}))}}),(0,_.tZ)(X.Qr,{control:$.control,name:"columns",render:function(t){return(0,_.tZ)(c.Z,ye(ye({},t),{},{options:ft,placeholder:S("COM_SPPAGEBUILDER_EDITOR_PAGE_TABLE_COLUMNS"),disabled:Y.isSuccess&&!Y.data.results.length,showChips:!1,hideSelectNumbers:!0}))}}),(0,_.tZ)(X.Qr,{control:K.control,name:"sortBy",render:function(t){return(0,_.tZ)(u.Z,ye(ye({},t),{},{options:dt,placeholder:S("COM_SPPAGEBUILDER_EDITOR_PAGE_SORT_TABLE_BY_PLACEHOLDER"),showArrowUpDown:!0,disabled:Y.isSuccess&&!Y.data.results.length}))}})]})]}),Y.isSuccess&&!Y.data.results.length?nt?(0,_.tZ)(Ft.Z,{orientation:"vertical",emptyStateImage:re,imageAltText:S("COM_SPPAGEBUILDER_EDITOR_ADDONS_NO_MATCH_FOUND"),title:S("COM_SPPAGEBUILDER_EDITOR_ADDONS_NO_MATCH_FOUND"),removeBorderRadius:!0,wrapperCss:_e.wrapperCss}):(0,_.tZ)(Ft.Z,{orientation:"vertical",emptyStateImage:ee,imageAltText:S("COM_SPPAGEBUILDER_EDITOR_EMPTY_PAGE_LIST_IMAGE_ALT"),title:S("COM_SPPAGEBUILDER_EDITOR_EMPTY_PAGE_LIST_TITLE"),content:S("COM_SPPAGEBUILDER_EDITOR_EMPTY_PAGE_LIST_CONTENT"),removeBorderRadius:!0,action:(0,_.tZ)(o.Z,{icon:(0,_.tZ)(a.Z,{name:"plus"}),onClick:function(){w({component:y.Z,props:{title:S("COM_SPPAGEBUILDER_EDITOR_CREATE_PAGE_MODAL_TITLE")}})},children:S("COM_SPPAGEBUILDER_EDITOR_EMPTY_PAGE_LIST_ADD_NEW_BUTTON")})}):(0,_.tZ)(Rt.LB,{sensors:ct,collisionDetection:Rt.pE,onDragEnd:function(t){var e=t.active,o=t.over;null!=o&&o.id&&e.id!==o.id&&n((function(t){var n=t.findIndex((function(t){return t.id===e.id})),i=t.findIndex((function(t){return t.id===o.id})),a=(0,at.Rp)(r,n,i),l=(0,m.x9)(a),c=Array.from({length:l.length},(function(t,e){return e+1}));return F.mutate({ids:l,orders:c}),K.reset(ye(ye({},K.getValues()),{},{sortBy:"ordering"})),a}))},modifiers:[ae],children:(0,_.tZ)(at.Fo,{items:r,strategy:at.qw,children:(0,_.tZ)(Tt,{data:r,isLoading:Y.isLoading,selectedItems:R,setSelectedItems:G,lastSelectedIndex:T,setLastSelectedIndex:A,columns:ht})})})]}),(0,_.tZ)("div",{css:_e.paginatorWrapper,children:(0,_.tZ)(Jt,{currentPage:k.page,onPageChange:Z,totalItems:(null===(t=Y.data)||void 0===t?void 0:t.totalItems)||0,itemsPerPage:Number(k.filter.limit)||ot.Hy})})]})})]})};var _e={topPanel:(0,E.iv)("display:flex;justify-content:space-between;align-items:center;gap:",g.W0[8],";margin:",g.W0[16]," 0 ",g.W0[32]," 0;;label:topPanel;"),topPanelLeft:(0,E.iv)("display:flex;justify-content:center;align-items:center;gap:",g.W0[16],";;label:topPanelLeft;"),topPanelLeftSelect:{name:"1ex2zjt-topPanelLeftSelect",styles:"max-width:128px;label:topPanelLeftSelect;"},topPanelRight:{name:"qflu8b-topPanelRight",styles:"width:680px;height:32px;label:topPanelRight;"},pageName:(0,E.iv)(L.c.heading6(),";color:",g.qo.text.default,";;label:pageName;"),cardStyle:(0,E.iv)("border-radius:",g.E0[5],";box-shadow:",g.AF.base,";overflow:hidden;;label:cardStyle;"),tableHeaderWrapper:(0,E.iv)("width:100%;display:flex;justify-content:space-between;align-items:center;gap:",g.W0[8],";padding:",g.W0[24],";;label:tableHeaderWrapper;"),searchFieldWrapper:{name:"tjtfnx-searchFieldWrapper",styles:"width:min(280px, 100%);label:searchFieldWrapper;"},sortByFieldWrapper:(0,E.iv)("width:min(500px, 100%);display:flex;gap:",g.W0[16],";>div:first-of-type{max-width:80px;};label:sortByFieldWrapper;"),tableRowStyle:{name:"1l9y7ek-tableRowStyle",styles:":last-of-type{border-bottom:none;};label:tableRowStyle;"},paginatorWrapper:(0,E.iv)("margin-top:",g.W0[32],";;label:paginatorWrapper;"),wrapperCss:{name:"1kd73z9-wrapperCss",styles:">img{max-width:180px;max-height:180px;};label:wrapperCss;"}}}}]);
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0.09 |
proxy
|
phpinfo
|
Настройка