/*! elementor - v3.5.4 - 23-01-2022 */
(self.webpackChunkelementor=self.webpackChunkelementor||[]).push([[372],{10751:()=>{},50146:()=>{},38859:()=>{},99788:()=>{},63927:()=>{},38298:()=>{},37054:()=>{},61706:()=>{},81143:()=>{},54289:()=>{},77604:()=>{},53004:()=>{},44807:()=>{},70082:()=>{},78870:()=>{},31761:()=>{},11427:()=>{},13777:()=>{},13656:()=>{},23711:(e,t,a)=>{"use strict";var r=a(67394),n=a(67971);r(t,"__esModule",{value:!0}),t.default=function App(){return l.default.createElement("div",{className:"e-kit-library"},l.default.createElement(d.QueryClientProvider,{client:p},l.default.createElement(v.SettingsProvider,{value:elementorAppConfig["kit-library"]},l.default.createElement(c.LastFilterProvider,null,l.default.createElement(m.Router,null,l.default.createElement(i.default,{path:"/"}),l.default.createElement(o.default,{path:"/favorites"}),l.default.createElement(s.default,{path:"/preview/:id"}),l.default.createElement(u.default,{path:"/overview/:id"})))),elementorCommon.config.isElementorDebug&&l.default.createElement(f.ReactQueryDevtools,{initialIsOpen:!1})))};var l=n(a(87363)),o=n(a(15684)),i=n(a(26115)),u=n(a(43273)),s=n(a(5133)),c=a(84364),d=a(56552),f=a(29029),m=a(50927),v=a(79917),p=new d.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1,staleTime:18e5}}})},89030:(e,t,a)=>{"use strict";var r=a(38003).__,n=a(23615),l=a(67394),o=a(52369);l(t,"__esModule",{value:!0}),t.default=ApplyKitDialog;var i=o(a(87363));a(84208);var u=a(50927),s=a(36779);function ApplyKitDialog(e){var t=(0,u.useNavigate)(),a=(0,i.useCallback)((function(){var a=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r="/import/process"+"?file_url=".concat(encodeURIComponent(e.downloadLink))+"&nonce=".concat(e.nonce,"&referrer=kit-library");a&&(r+="&action_type=apply-all"),t(r)}),[e.downloadLink,e.nonce]);return i.default.createElement(s.Dialog,{title:r("Apply %s?","elementor").replace("%s",e.title),text:i.default.createElement(i.default.Fragment,null,r("You can use everything in this kit, or Customize to only include some items.","elementor"),i.default.createElement("br",null),i.default.createElement("br",null),r("By applying the entire kit, you'll override any styles, settings or content already on your site.","elementor")),approveButtonText:r("Apply All","elementor"),approveButtonColor:"primary",approveButtonOnClick:function approveButtonOnClick(){return a(!0)},dismissButtonText:r("Customize","elementor"),dismissButtonOnClick:function dismissButtonOnClick(){return a(!1)},onClose:e.onClose})}ApplyKitDialog.propTypes={downloadLink:n.string.isRequired,nonce:n.string.isRequired,onClose:n.func.isRequired,title:n.string},ApplyKitDialog.defaultProps={title:"Kit"}},21873:(e,t,a)=>{"use strict";var r=a(23615),n=a(67394),l=a(67971);n(t,"__esModule",{value:!0}),t.default=Badge;var o=l(a(87363));function Badge(e){return o.default.createElement("span",{className:"eps-badge eps-badge--".concat(e.variant," ").concat(e.className),style:e.style},e.children)}a(10751),Badge.propTypes={children:r.node,className:r.string,style:r.object,variant:r.oneOf(["sm","md"])},Badge.defaultProps={className:"",style:{},variant:"md"}},3964:(e,t,a)=>{"use strict";var r=a(23615),n=a(67394),l=a(67971);n(t,"__esModule",{value:!0}),t.default=Collapse;var o=l(a(87363));function Collapse(e){return o.default.createElement("div",{className:"eps-collapse ".concat(e.className),"data-open":e.isOpen||void 0},o.default.createElement("button",{className:"eps-collapse__title",onClick:function onClick(){return e.onChange((function(e){return!e}))}},o.default.createElement("span",null,e.title),o.default.createElement("i",{className:"eicon-chevron-right eps-collapse__icon"})),o.default.createElement("div",{className:"eps-collapse__content"},e.children))}a(50146),Collapse.propTypes={isOpen:r.bool,onChange:r.func,className:r.string,title:r.node,children:r.oneOfType([r.node,r.arrayOf(r.node)])},Collapse.defaultProps={className:"",isOpen:!1}},82379:(e,t,a)=>{"use strict";var r=a(38003).__,n=a(23615),l=a(67394),o=a(67971);l(t,"__esModule",{value:!0}),t.default=ConnectDialog;var i=o(a(87363));a(84208);var u=a(36779),s=a(79917),c=i.default,d=c.useEffect,f=c.useRef;function ConnectDialog(e){var t=(0,s.useSettingsContext)().settings,a=f();return d((function(){jQuery(a.current).elementorConnect({success:function success(t,a){return e.onSuccess(a)},error:function error(){return e.onError(r("Unable to connect","elementor"))},parseUrl:function parseUrl(t){return t.replace("%%page%%",e.pageId)}})}),[]),i.default.createElement(u.Dialog,{title:r("Connect to Template Library","elementor"),text:r("Access this template and our entire library by creating an account","elementor"),approveButtonText:r("Get Started","elementor"),approveButtonUrl:t.library_connect_url,approveButtonOnClick:function approveButtonOnClick(){return e.onClose()},approveButtonColor:"primary",approveButtonRef:a,dismissButtonText:r("Cancel","elementor-pro"),dismissButtonOnClick:function dismissButtonOnClick(){return e.onClose()},onClose:function onClose(){return e.onClose()}})}ConnectDialog.propTypes={onClose:n.func.isRequired,onError:n.func.isRequired,onSuccess:n.func.isRequired,pageId:n.string}},90125:(e,t,a)=>{"use strict";var r=a(38003).__,n=a(67394),l=a(67971);n(t,"__esModule",{value:!0}),t.default=function ElementorLoading(){return o.default.createElement("div",{className:"elementor-loading"},o.default.createElement("div",{className:"elementor-loader-wrapper"},o.default.createElement("div",{className:"elementor-loader"},o.default.createElement("div",{className:"elementor-loader-boxes"},o.default.createElement("div",{className:"elementor-loader-box"}),o.default.createElement("div",{className:"elementor-loader-box"}),o.default.createElement("div",{className:"elementor-loader-box"}),o.default.createElement("div",{className:"elementor-loader-box"}))),o.default.createElement("div",{className:"elementor-loading-title"},r("Loading","elementor"))))};var o=l(a(87363))},98125:(e,t,a)=>{"use strict";var r=a(38003).__,n=a(67394),l=a(67971);n(t,"__esModule",{value:!0}),t.default=function EnvatoPromotion(){return o.default.createElement(i.Text,{className:"e-kit-library-bottom-promotion",variant:"xl"},r("Looking for more Kits?","elementor")," "," ",o.default.createElement(i.Button,{variant:"underlined",color:"link",url:"https://go.elementor.com/app-envato-kits/",target:"_blank",rel:"noreferrer",text:r("Check out Elementor Template Kits on ThemeForest","elementor")}))};var o=l(a(87363)),i=a(36779);a(38859)},96980:(e,t,a)=>{"use strict";var r=a(23615),n=a(67394),l=a(67971);n(t,"__esModule",{value:!0}),t.default=ErrorScreen;var o=l(a(87363)),i=a(36779);function ErrorScreen(e){return o.default.createElement(i.Grid,{container:!0,alignItems:"center",justify:"center",direction:"column",className:"e-kit-library__error-screen"},o.default.createElement("img",{src:"".concat(elementorAppConfig.assets_url,"images/no-search-results.svg")}),o.default.createElement(i.Heading,{tag:"h3",variant:"display-1",className:"e-kit-library__error-screen-title"},e.title),o.default.createElement(i.Text,{variant:"xl",className:"e-kit-library__error-screen-description"},e.description," "," ",o.default.createElement(i.Button,{text:e.button.text,color:"link",onClick:e.button.action,url:e.button.url,target:e.button.target})))}a(99788),ErrorScreen.propTypes={title:r.string,description:r.string,button:r.shape({text:r.string,action:r.func,url:r.string,target:r.string})}},21289:(e,t,a)=>{"use strict";var r=a(38003).__,n=a(23615),l=a(67394),o=a(67971);l(t,"__esModule",{value:!0}),t.default=FavoritesActions;var i=o(a(87363)),u=a(37548),s=a(36779);function FavoritesActions(e){var t=(0,u.useKitFavoritesMutations)(),a=t.addToFavorites,n=t.removeFromFavorites,l=t.isLoading,o=l?"e-kit-library__kit-favorite-actions--loading":"";return e.isFavorite?i.default.createElement(s.Button,{text:r("Remove From Favorites","elementor"),hideText:!0,icon:"eicon-heart",className:"e-kit-library__kit-favorite-actions e-kit-library__kit-favorite-actions--active ".concat(o),onClick:function onClick(){return!l&&n.mutate(e.id)}}):i.default.createElement(s.Button,{text:r("Add To Favorites","elementor"),hideText:!0,icon:"eicon-heart-o",className:"e-kit-library__kit-favorite-actions ".concat(o),onClick:function onClick(){return!l&&a.mutate(e.id)}})}a(63927),FavoritesActions.propTypes={isFavorite:n.bool,id:n.string}},78915:(e,t,a)=>{"use strict";var r=a(38003).__,n=a(23615),l=a(67394),o=a(67971);l(t,"__esModule",{value:!0}),t.default=FilterIndicationText;var i=o(a(87363));a(42679),a(90286);var u=o(a(15792)),s=o(a(21873)),c=a(38003),d=a(36779);function FilterIndicationText(e){var t=(0,u.default)(e.queryParams.taxonomies);return i.default.createElement(d.Grid,{container:!0,className:"e-kit-library__filter-indication"},i.default.createElement(d.Text,{className:"e-kit-library__filter-indication-text"},(0,c.sprintf)((0,c._n)("Showing %s result for","Showing %s results for",e.resultCount,"elementor"),e.resultCount?e.resultCount:r("no","elementor"))," ",e.queryParams.search&&'"'.concat(e.queryParams.search,'"')," ",t.length>0&&i.default.createElement(i.default.Fragment,null,t.map((function(t){return i.default.createElement(s.default,{key:t,className:"e-kit-library__filter-indication-badge"},t,i.default.createElement(d.Button,{text:r("Remove","elementor"),hideText:!0,icon:"eicon-editor-close",className:"e-kit-library__filter-indication-badge-remove",onClick:function onClick(){return e.onRemoveTag(t)}}))})))),i.default.createElement(d.Button,{className:"e-kit-library__filter-indication-button",text:r("Clear all","elementor"),variant:"underlined",onClick:e.onClear}))}a(38298),FilterIndicationText.propTypes={queryParams:n.shape({search:n.string,taxonomies:n.objectOf(n.arrayOf(n.string)),favorite:n.bool}),resultCount:n.number.isRequired,onClear:n.func.isRequired,onRemoveTag:n.func.isRequired}},47175:(e,t,a)=>{"use strict";var r=a(38003).__,n=a(23615),l=a(67394),o=a(67971),i=a(52369);l(t,"__esModule",{value:!0}),t.default=ItemHeader;var u=i(a(87363));a(84208);var s=o(a(74846)),c=o(a(47834)),d=o(a(89030)),f=o(a(82379)),m=o(a(59883)),v=o(a(95948)),p=o(a(80330)),y=o(a(881)),_=i(a(8836)),g=a(36779),h=a(79917);function ItemHeader(e){var t=(0,h.useSettingsContext)().updateSettings,a=(0,u.useState)(!1),n=(0,c.default)(a,2),l=n[0],o=n[1],i=(0,u.useState)(null),p=(0,c.default)(i,2),b=p[0],E=p[1],k=(0,u.useState)(!1),C=(0,c.default)(k,2),x=C[0],T=C[1],w=(0,y.default)(e.model,{onSuccess:function onSuccess(e){var t=e.data;return E(t)},onError:function onError(e){if(401===e.code)return t({is_library_connected:!1,access_level:0}),void o(!0);T({code:e.code,message:r("Something went wrong.","elementor")})}}),N=w.mutate,F=w.isLoading,M=function useKitCallToActionButton(e,t){var a=t.apply,n=t.isApplyLoading,l=t.onConnect,o=(0,_.default)(e.accessLevel),i=(0,c.default)(o,2),s=i[0],d=i[1].subscriptionPlan;return(0,u.useMemo)((function(){return s===_.TYPE_CONNECT?{id:"connect",text:r("Apply Kit","elementor"),hideText:!1,variant:"contained",color:"primary",size:"sm",onClick:l,includeHeaderBtnClass:!1}:s===_.TYPE_PROMOTION&&d?{id:"promotion",text:r("Go %s","elementor").replace("%s",d.label),hideText:!1,variant:"contained",color:"cta",size:"sm",url:d.promotion_url,target:"_blank",includeHeaderBtnClass:!1}:{id:"apply",text:r("Apply Kit","elementor"),className:"e-kit-library__apply-button",icon:n?"eicon-loading eicon-animation-spin":"",hideText:!1,variant:"contained",color:n?"disabled":"primary",size:"sm",onClick:n?null:a,includeHeaderBtnClass:!1}}),[s,d,n,a])}(e.model,{onConnect:function onConnect(){return o(!0)},apply:N,isApplyLoading:F}),O=(0,u.useMemo)((function(){return[M].concat((0,s.default)(e.buttons))}),[e.buttons,M]);return u.default.createElement(u.default.Fragment,null,x&&u.default.createElement(g.Dialog,{title:x.message,text:r("Nothing to worry about, just try again. If the problem continues, head over to the Help Center.","elementor"),approveButtonText:r("Learn More","elementor"),approveButtonColor:"link",approveButtonUrl:"http://go.elementor.com/app-kit-library-error",approveButtonOnClick:function approveButtonOnClick(){return T(!1)},dismissButtonText:r("Got it","elementor"),dismissButtonOnClick:function dismissButtonOnClick(){return T(!1)},onClose:function onClose(){return T(!1)}}),b&&u.default.createElement(d.default,{downloadLink:b.data.download_link,nonce:b.meta.nonce,onClose:function onClose(){return E(null)}}),l&&u.default.createElement(f.default,{pageId:e.pageId,onClose:function onClose(){return o(!1)},onSuccess:function onSuccess(a){t({is_library_connected:!0,access_level:a.kits_access_level||a.access_level||0}),a.access_level<e.model.accessLevel||N()},onError:function onError(e){return T({message:e})}}),u.default.createElement(m.default,{startColumn:u.default.createElement(v.default,null),centerColumn:e.centerColumn,buttons:O}))}a(37054),ItemHeader.propTypes={model:n.instanceOf(p.default).isRequired,centerColumn:n.node,buttons:n.arrayOf(n.object),pageId:n.string}},35633:(e,t,a)=>{"use strict";var r=a(38003).__,n=a(23615),l=a(67394),o=a(52369),i=a(67971);l(t,"__esModule",{value:!0}),t.default=void 0;var u=i(a(87363)),s=i(a(47834)),c=i(a(21873)),d=i(a(21289)),f=i(a(80330)),m=o(a(8836)),v=a(36779);a(61706);var p=function KitListItem(e){var t=(0,m.default)(e.model.accessLevel),a=(0,s.default)(t,2),n=a[0],l=a[1].subscriptionPlan;return u.default.createElement(v.Card,{className:"e-kit-library__kit-item"},u.default.createElement(v.CardHeader,null,u.default.createElement(v.Heading,{tag:"h3",title:e.model.title,variant:"h5",className:"eps-card__headline"},e.model.title),u.default.createElement(d.default,{id:e.model.id,isFavorite:e.model.isFavorite})),u.default.createElement(v.CardBody,null,u.default.createElement(v.CardImage,{alt:e.model.title,src:e.model.thumbnailUrl||""},(null==l?void 0:l.label)&&u.default.createElement(c.default,{variant:"sm",className:"e-kit-library__kit-item-subscription-plan-badge",style:{backgroundColor:l.color}},l.label),u.default.createElement(v.CardOverlay,null,u.default.createElement(v.Grid,{container:!0,direction:"column",className:"e-kit-library__kit-item-overlay"},u.default.createElement(v.Button,{className:"e-kit-library__kit-item-overlay-overview-button",text:r("View Demo","elementor"),icon:"eicon-preview-medium",url:"/kit-library/preview/".concat(e.model.id)}),n===m.TYPE_PROMOTION&&(null==l?void 0:l.label)&&u.default.createElement(v.Button,{className:"e-kit-library__kit-item-overlay-promotion-button",text:"Go ".concat(l.label),icon:"eicon-external-link-square",url:l.promotion_url,target:"_blank"}))))))};p.propTypes={model:n.instanceOf(f.default).isRequired};var y=u.default.memo(p);t.default=y},72358:(e,t,a)=>{"use strict";var r=a(23615),n=a(67394),l=a(67971);n(t,"__esModule",{value:!0}),t.default=KitList;var o=l(a(87363));a(90286);var i=l(a(80330)),u=l(a(35633)),s=a(36779);function KitList(e){return o.default.createElement(s.CssGrid,{spacing:24,colMinWidth:290},e.data.map((function(e){return o.default.createElement(u.default,{key:e.id,model:e})})))}KitList.propTypes={data:r.arrayOf(r.instanceOf(i.default))}},95948:(e,t,a)=>{"use strict";var r=a(38003).__,n=a(67394),l=a(67971);n(t,"__esModule",{value:!0}),t.default=function HeaderBackButton(){var e=(0,s.useNavigate)(),t=(0,u.useLastFilterContext)().lastFilter;return o.default.createElement("div",{className:"e-kit-library__header-back-container"},o.default.createElement(i.Button,{className:"e-kit-library__header-back",icon:"eicon-chevron-left",text:r("Back to Library","elementor"),onClick:function onClick(){return e(wp.url.addQueryArgs("/kit-library",t))}}))};var o=l(a(87363)),i=a(36779),u=a(84364),s=a(50927);a(81143)},59883:(e,t,a)=>{"use strict";var r=a(38003).__,n=a(23615),l=a(67394),o=a(67971);l(t,"__esModule",{value:!0}),t.default=Header;var i=o(a(87363)),u=a(36779),s=o(a(50888));function Header(e){return i.default.createElement(u.Grid,{container:!0,alignItems:"center",justify:"space-between",className:"eps-app__header"},e.startColumn||i.default.createElement("a",{className:"eps-app__logo-title-wrapper",href:"#/kit-library"},i.default.createElement("i",{className:"eps-app__logo eicon-elementor"}),i.default.createElement("h1",{className:"eps-app__title"},r("Kit Library","elementor"))),e.centerColumn||i.default.createElement("span",null),e.endColumn||i.default.createElement("div",{style:{flex:1}},i.default.createElement(s.default,{buttons:e.buttons})))}Header.propTypes={startColumn:n.node,endColumn:n.node,centerColumn:n.node,buttons:n.arrayOf(n.object)}},95219:(e,t,a)=>{"use strict";var r=a(23615),n=a(67394),l=a(67971);n(t,"__esModule",{value:!0}),t.default=Index;var o=l(a(87363)),i=l(a(8296));function Index(e){return o.default.createElement("div",{className:"eps-app__lightbox"},o.default.createElement("div",{className:"eps-app"},e.header,o.default.createElement("div",{className:"eps-app__main"},e.sidebar&&o.default.createElement(i.default,null,e.sidebar),e.children)))}Index.propTypes={header:r.node,sidebar:r.node,children:r.node}},28426:(e,t,a)=>{"use strict";var r=a(23615),n=a(67394),l=a(67971);n(t,"__esModule",{value:!0}),t.default=PageLoader;var o=l(a(87363)),i=a(36779);function PageLoader(e){return o.default.createElement("div",{className:"e-kit-library__page-loader ".concat(e.className)},o.default.createElement(i.Icon,{className:"eicon-loading eicon-animation-spin"}))}a(54289),PageLoader.propTypes={className:r.string},PageLoader.defaultProps={className:""}},3213:(e,t,a)=>{"use strict";var r=a(38003).__,n=a(23615),l=a(67394),o=a(67971),i=a(52369);l(t,"__esModule",{value:!0}),t.default=SearchInput;var u=i(a(87363)),s=o(a(47834)),c=o(a(87252)),d=a(36779);function SearchInput(e){var t=(0,u.useState)(e.value||""),a=(0,s.default)(t,2),n=a[0],l=a[1],o=(0,c.default)((function(t){return e.onChange(t)}),e.debounceTimeout);return(0,u.useEffect)((function(){e.value!==n&&l(e.value)}),[e.value]),u.default.createElement("div",{className:"eps-search-input__container ".concat(e.className)},u.default.createElement("input",{className:"eps-search-input eps-search-input--".concat(e.size),placeholder:e.placeholder,value:n,onChange:function onChange(e){l(e.target.value),o(e.target.value)}}),u.default.createElement(d.Icon,{className:"eicon-search-bold eps-search-input__icon eps-search-input__icon--".concat(e.size)}),e.value&&u.default.createElement(d.Button,{text:r("Clear","elementor"),hideText:!0,className:"eicon-close-circle eps-search-input__clear-icon eps-search-input__clear-icon--".concat(e.size),onClick:function onClick(){return e.onChange("")}}))}a(77604),SearchInput.propTypes={placeholder:n.string,value:n.string.isRequired,onChange:n.func.isRequired,className:n.string,size:n.oneOf(["md","sm"]),debounceTimeout:n.number},SearchInput.defaultProps={className:"",size:"md",debounceTimeout:300}},86281:(e,t,a)=>{"use strict";var r=a(38003).__,n=a(23615),l=a(67394),o=a(67971);l(t,"__esModule",{value:!0}),t.default=SortSelect;var i=o(a(87363)),u=a(36779);function SortSelect(e){return i.default.createElement("div",{className:"eps-sort-select"},i.default.createElement("div",{className:"eps-sort-select__select-wrapper"},i.default.createElement(u.Select,{options:e.options,value:e.value.by,onChange:function onChange(t){var a=t.target.value;e.onChange({by:a,direction:e.value.direction})},className:"eps-sort-select__select"})),i.default.createElement(u.Button,{text:"asc"===e.value.direction?r("Sort Descending","elementor"):r("Sort Ascending","elementor"),hideText:!0,icon:"asc"===e.value.direction?"eicon-arrow-up":"eicon-arrow-down",className:"eps-sort-select__button",onClick:function onClick(){e.onChange({by:e.value.by,direction:"asc"===e.value.direction?"desc":"asc"})}}))}a(53004),SortSelect.propTypes={options:n.arrayOf(n.shape({label:n.string.isRequired,value:n.oneOfType([n.string,n.number]).isRequired})).isRequired,value:n.shape({direction:n.oneOf(["asc","desc"]).isRequired,by:n.string.isRequired}).isRequired,onChange:n.func.isRequired}},11300:(e,t,a)=>{"use strict";var r=a(38003).__,n=a(23615),l=a(67394),o=a(67971),i=a(52369);l(t,"__esModule",{value:!0}),t.default=void 0;var u=i(a(87363));a(64434),a(3777),a(38081),a(90286);var s=o(a(74846)),c=o(a(47834)),d=o(a(28605)),f=o(a(3964)),m=o(a(3213)),v=a(36779),p=a(38003),y=function TaxonomiesFilterList(e){var t=(0,u.useState)(e.taxonomiesByType.isOpenByDefault),a=(0,c.default)(t,2),n=a[0],l=a[1],o=(0,u.useState)(""),i=(0,c.default)(o,2),d=i[0],y=i[1],_=(0,u.useMemo)((function(){if(!d)return e.taxonomiesByType.data;var t=d.toLowerCase();return e.taxonomiesByType.data.filter((function(e){return e.text.toLowerCase().includes(t)}))}),[e.taxonomiesByType.data,d]);return u.default.createElement(f.default,{className:"e-kit-library__tags-filter-list",title:e.taxonomiesByType.label,isOpen:n,onChange:l},e.taxonomiesByType.data.length>=15&&u.default.createElement(m.default,{size:"sm",className:"e-kit-library__tags-filter-list-search",placeholder:(0,p.sprintf)(r("Search %s...","elementor"),e.taxonomiesByType.label),value:d,onChange:y}),u.default.createElement("div",{className:"e-kit-library__tags-filter-list-container"},0===_.length&&u.default.createElement(v.Text,null,r("No Results Found","elementor")),_.map((function(t){var a;return u.default.createElement("label",{key:t.text,className:"e-kit-library__tags-filter-list-item"},u.default.createElement(v.Checkbox,{checked:(null===(a=e.selected[t.type])||void 0===a?void 0:a.includes(t.text))||!1,onChange:function onChange(a){var r=a.target.checked;e.onSelect(t.type,(function(e){return r?[].concat((0,s.default)(e),[t.text]):e.filter((function(e){return e!==t.text}))}))}}),t.text)}))))};y.propTypes={taxonomiesByType:n.shape({key:n.string,label:n.string,data:n.arrayOf(n.instanceOf(d.default)),isOpenByDefault:n.bool}),selected:n.objectOf(n.arrayOf(n.string)),onSelect:n.func};var _=u.default.memo(y);t.default=_},8328:(e,t,a)=>{"use strict";var r=a(23615),n=a(67394),l=a(52369),o=a(67971);n(t,"__esModule",{value:!0}),t.default=TaxonomiesFilter;var i=o(a(87363)),u=o(a(84899));a(64434),a(90286);var s=o(a(11300)),c=l(a(28605));a(44807);var d=i.default.useMemo;function TaxonomiesFilter(e){var t=d((function(){return e.taxonomies?c.taxonomyType.map((function(t){return(0,u.default)((0,u.default)({},t),{},{data:e.taxonomies.filter((function(e){return e.type===t.key}))})})).filter((function(e){return e.data.length>0})):[]}),[e.taxonomies]);return i.default.createElement("div",{className:"e-kit-library__tags-filter"},t.map((function(t){return i.default.createElement(s.default,{key:t.key,taxonomiesByType:t,selected:e.selected,onSelect:e.onSelect})})))}TaxonomiesFilter.propTypes={selected:r.objectOf(r.arrayOf(r.string)),onSelect:r.func,taxonomies:r.arrayOf(r.instanceOf(c.default))}},84364:(e,t,a)=>{"use strict";var r=a(23615),n=a(67394),l=a(67971),o=a(52369);n(t,"__esModule",{value:!0}),t.LastFilterProvider=LastFilterProvider,t.useLastFilterContext=function useLastFilterContext(){return(0,i.useContext)(s)};var i=o(a(87363)),u=l(a(47834)),s=(0,i.createContext)({});function LastFilterProvider(e){var t=(0,i.useState)({}),a=(0,u.default)(t,2),r=a[0],n=a[1];return i.default.createElement(s.Provider,{value:{lastFilter:r,setLastFilter:n}},e.children)}LastFilterProvider.propTypes={children:r.any}},79917:(e,t,a)=>{"use strict";var r=a(23615),n=a(67394),l=a(67971),o=a(52369);n(t,"__esModule",{value:!0}),t.SettingsProvider=SettingsProvider,t.useSettingsContext=function useSettingsContext(){return(0,i.useContext)(c)};var i=o(a(87363)),u=l(a(84899)),s=l(a(47834)),c=(0,i.createContext)({});function SettingsProvider(e){var t=(0,i.useState)({}),a=(0,s.default)(t,2),r=a[0],n=a[1],l=(0,i.useCallback)((function(e){n((function(t){return(0,u.default)((0,u.default)({},t),e)}))}),[n]);return(0,i.useEffect)((function(){n(e.value)}),[n]),i.default.createElement(c.Provider,{value:{settings:r,setSettings:n,updateSettings:l}},e.children)}SettingsProvider.propTypes={children:r.any,value:r.object.isRequired}},37050:(e,t,a)=>{"use strict";var r=a(38003).__,n=a(67394),l=a(67971);n(t,"__esModule",{value:!0}),t.KEY=void 0,t.default=function useContentTypes(){return(0,u.useQuery)([s],fetchContentTypes)},a(90286);var o=l(a(73220)),i=l(a(8247)),u=a(56552),s="content-types";function fetchContentTypes(){return o.default.resolve([{id:"page",label:r("Pages","elementor"),doc_types:["wp-page"],order:0},{id:"site-parts",label:r("Site Parts","elementor"),doc_types:["archive","error-404","footer","header","search-results","single-page","single-post","product","product-archive","404","single"],order:1},{id:"popup",label:r("Popups","elementor"),doc_types:["popup"],order:2}]).then((function(e){return e.map((function(e){return i.default.createFromResponse(e)}))}))}t.KEY=s},87252:(e,t,a)=>{"use strict";a(67394)(t,"__esModule",{value:!0}),t.default=function useDebouncedCallback(e,t){var a=(0,r.useRef)();return(0,r.useCallback)((function(){for(var r=arguments.length,n=new Array(r),l=0;l<r;l++)n[l]=arguments[l];var o=function later(){clearTimeout(a.current),e.apply(void 0,n)};clearTimeout(a.current),a.current=setTimeout(o,t)}),[e,t])};var r=a(87363)},881:(e,t,a)=>{"use strict";a(67394)(t,"__esModule",{value:!0}),t.default=function useDownloadLinkMutation(e,t){var a=t.onError,l=t.onSuccess,o=(0,r.useCallback)((function(){return $e.data.get("kits/download-link",{id:e.id},{refresh:!0})}),[e]);return(0,n.useMutation)(o,{onSuccess:l,onError:a})};var r=a(87363),n=a(56552)},8836:(e,t,a)=>{"use strict";a(67394)(t,"__esModule",{value:!0}),t.TYPE_PROMOTION=t.TYPE_CONNECT=t.TYPE_APPLY=void 0,t.default=function useKitCallToAction(e){var t=(0,n.useSettingsContext)().settings,a=(0,r.useMemo)((function(){var a;return null===(a=t.subscription_plans)||void 0===a?void 0:a[e]}),[t,e]);return[(0,r.useMemo)((function(){var a=t.access_level>=e;return t.is_library_connected||!t.is_pro&&!a?a?i:o:l}),[t,e]),{subscriptionPlan:a}]};var r=a(87363),n=a(79917),l="connect";t.TYPE_CONNECT=l;var o="promotion";t.TYPE_PROMOTION=o;var i="apply";t.TYPE_APPLY=i},15398:(e,t,a)=>{"use strict";var r=a(67394),n=a(67971);r(t,"__esModule",{value:!0}),t.default=function useKitDocumentByType(e){var t=(0,o.default)(),a=(0,i.useMemo)((function(){return e&&t.data?e.getDocumentsByTypes(t.data).sort((function(e,t){return e.order-t.order})):[]}),[e,t.data]);return(0,l.default)((0,l.default)({},t),{},{data:a})};var l=n(a(84899)),o=n(a(37050)),i=a(87363)},37548:(e,t,a)=>{"use strict";var r=a(67394),n=a(67971);r(t,"__esModule",{value:!0}),t.useKitFavoritesMutations=function useKitFavoritesMutations(){var e=(0,u.useQueryClient)(),t=(0,l.useCallback)((function(t){var a=t.data,r=a.data.id,n=a.data.is_favorite;e.getQueryData([o.KEY])&&e.setQueryData([o.KEY],(function(e){return e?e.map((function(e){return e.id===r?(e.isFavorite=n,e.clone()):e})):e})),e.getQueryData([i.KEY,r])&&e.setQueryData([i.KEY,r],(function(e){return e.isFavorite=n,e.clone()}))}),[e]),a=(0,u.useMutation)((function(e){return $e.data.create("kits/favorites",{},{id:e})}),{onSuccess:t}),r=(0,u.useMutation)((function(e){return $e.data.delete("kits/favorites",{id:e})}),{onSuccess:t});return{addToFavorites:a,removeFromFavorites:r,isLoading:a.isLoading||r.isLoading}},a(90286);n(a(80330));var l=a(87363),o=a(92848),i=a(39261),u=a(56552)},39261:(e,t,a)=>{"use strict";var r=a(67394),n=a(67971);r(t,"__esModule",{value:!0}),t.KEY=void 0,t.default=function useKit(e){var t=function usePlaceholderDataCallback(e){var t=(0,s.useQueryClient)();return(0,u.useCallback)((function(){var a,r=null===(a=t.getQueryData(i.KEY))||void 0===a?void 0:a.find((function(t){return t.id===e}));if(r)return r}),[t,e])}(e);return(0,s.useQuery)(["kit",e],fetchKitItem,{placeholderData:t})};var l=n(a(47834));a(71954);var o=n(a(80330)),i=a(92848),u=a(87363),s=a(56552);function fetchKitItem(e){var t=(0,l.default)(e.queryKey,2),a=(t[0],t[1]);return $e.data.get("kits/index",{id:a},{refresh:!0}).then((function(e){return e.data})).then((function(e){var t=e.data;return o.default.createFromResponse(t)}))}t.KEY="kit"},92848:(e,t,a)=>{"use strict";var r=a(67394),n=a(67971);r(t,"__esModule",{value:!0}),t.KEY=void 0,t.default=function useKits(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,v.useState)(!1),a=(0,o.default)(t,2),r=a[0],n=a[1],u=(0,v.useState)((function(){return(0,s.default)((0,s.default)({ready:!1},y),e)})),c=(0,o.default)(u,2),f=c[0],g=c[1],h=(0,v.useCallback)((function(){return n(!0)}),[n]),b=(0,v.useCallback)((function(){return g((0,s.default)((0,s.default)({ready:!0},y),e))}),[g]),E=(0,m.useQuery)([p],(function(){return fetchKits(r)})),k=(0,v.useMemo)((function(){return E.data?pipe.apply(void 0,(0,i.default)((0,l.default)(_)))((0,i.default)(E.data),f):[]}),[E.data,f]),C=(0,d.default)(f.taxonomies),x=(0,v.useMemo)((function(){return!!f.search||!!C.length}),[f]);return(0,v.useEffect)((function(){r&&E.refetch().then((function(){return n(!1)}))}),[r]),(0,s.default)((0,s.default)({},E),{},{data:k,queryParams:f,setQueryParams:g,clearQueryParams:b,forceRefetch:h,isFilterActive:x})},t.defaultQueryParams=void 0;var l=n(a(35657));a(64434),a(42679),a(3777),a(38081),a(90286);var o=n(a(47834)),i=n(a(74846)),u=n(a(18042)),s=n(a(84899)),c=n(a(80330)),d=n(a(15792)),f=a(28605),m=a(56552),v=a(87363),p="kits";t.KEY=p;var y={favorite:!1,search:"",taxonomies:f.taxonomyType.reduce((function(e,t){var a=t.key;return(0,s.default)((0,s.default)({},e),{},(0,u.default)({},a,[]))}),{}),order:{direction:"desc",by:"featuredIndex"}};t.defaultQueryParams=y;var _={favoriteFilter:function favoriteFilter(e,t){return t.favorite?e.filter((function(e){return e.isFavorite})):e},searchFilter:function searchFilter(e,t){return t.search?e.filter((function(e){var a=[].concat((0,i.default)(e.keywords),(0,i.default)(e.taxonomies),[e.title]),r=t.search.toLowerCase();return a.some((function(e){return e.toLowerCase().includes(r)}))})):e},taxonomiesFilter:function taxonomiesFilter(e,t){return(0,l.default)(t.taxonomies).filter((function(e){return e.length})).reduce((function(e,t){return e.filter((function(e){return t.some((function(t){return e.taxonomies.some((function(e){return t===e}))}))}))}),e)},sort:function sort(e,t){var a=t.order;return e.sort((function(e,t){return"asc"===a.direction?e[a.by]-t[a.by]:t[a.by]-e[a.by]}))}};function pipe(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return function(e){for(var a=arguments.length,r=new Array(a>1?a-1:0),n=1;n<a;n++)r[n-1]=arguments[n];return t.reduce((function(e,t){return t.apply(void 0,[e].concat(r))}),e)}}function fetchKits(e){return $e.data.get("kits/index",{force:e?1:void 0},{refresh:!0}).then((function(e){return e.data})).then((function(e){return e.data.map((function(e){return c.default.createFromResponse(e)}))}))}},15792:(e,t,a)=>{"use strict";var r=a(67394),n=a(67971);r(t,"__esModule",{value:!0}),t.default=function useSelectedTaxonomies(e){return(0,i.useMemo)((function(){return(0,o.default)(e).reduce((function(e,t){return[].concat((0,l.default)(e),(0,l.default)(t))}))}),[e])};var l=n(a(74846)),o=n(a(35657)),i=a(87363)},95236:(e,t,a)=>{"use strict";var r=a(67394),n=a(67971);r(t,"__esModule",{value:!0}),t.KEY=void 0,t.default=function useTaxonomies(){var e=(0,s.useState)(!1),t=(0,o.default)(e,2),a=t[0],r=t[1],n=(0,s.useCallback)((function(){return r(!0)}),[r]),d=(0,u.useQuery)([c],(function(){return function fetchTaxonomies(e){return $e.data.get("kit-taxonomies/index",{force:e?1:void 0},{refresh:!0}).then((function(e){return e.data})).then((function(e){return e.data.map((function(e){return i.default.createFromResponse(e)}))}))}(a)}));return(0,s.useEffect)((function(){a&&d.refetch().then((function(){return r(!1)}))}),[a]),(0,l.default)((0,l.default)({},d),{},{forceRefetch:n})},a(90286);var l=n(a(84899)),o=n(a(47834)),i=n(a(28605)),u=a(56552),s=a(87363),c="tags";t.KEY=c},96084:(e,t,a)=>{"use strict";var r=a(67394),n=a(67971);r(t,"__esModule",{value:!0}),t.default=void 0;var l=n(a(83452)),o=n(a(38923)),i=n(a(47834)),u=n(a(11959)),s=n(a(39041)),c=function(){function BaseModel(){(0,u.default)(this,BaseModel)}return(0,s.default)(BaseModel,[{key:"clone",value:function clone(){var e=this,t=new this.constructor;return(0,l.default)(this).forEach((function(a){t[a]=e[a]})),t}},{key:"init",value:function init(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,o.default)(t).forEach((function(t){var a=(0,i.default)(t,2),r=a[0],n=a[1];e[r]=n})),this}}]),BaseModel}();t.default=c},8247:(e,t,a)=>{"use strict";var r=a(67394),n=a(67971);r(t,"__esModule",{value:!0}),t.default=void 0;var l=n(a(11959)),o=n(a(39041)),i=n(a(38852)),u=n(a(77371)),s=n(a(68537)),c=n(a(18042)),d=function(e){(0,u.default)(ContentType,e);var t=(0,s.default)(ContentType);function ContentType(){var e;(0,l.default)(this,ContentType);for(var a=arguments.length,r=new Array(a),n=0;n<a;n++)r[n]=arguments[n];return e=t.call.apply(t,[this].concat(r)),(0,c.default)((0,i.default)(e),"id",""),(0,c.default)((0,i.default)(e),"label",""),(0,c.default)((0,i.default)(e),"documentTypes",[]),(0,c.default)((0,i.default)(e),"documents",[]),(0,c.default)((0,i.default)(e),"order",0),e}return(0,o.default)(ContentType,null,[{key:"createFromResponse",value:function createFromResponse(e){return(new ContentType).init({id:e.id,label:e.label,documentTypes:e.doc_types,order:e.order,documents:[]})}}]),ContentType}(n(a(96084)).default);t.default=d},70345:(e,t,a)=>{"use strict";var r=a(67394),n=a(67971);r(t,"__esModule",{value:!0}),t.default=void 0;var l=n(a(11959)),o=n(a(39041)),i=n(a(38852)),u=n(a(77371)),s=n(a(68537)),c=n(a(18042)),d=function(e){(0,u.default)(Document,e);var t=(0,s.default)(Document);function Document(){var e;(0,l.default)(this,Document);for(var a=arguments.length,r=new Array(a),n=0;n<a;n++)r[n]=arguments[n];return e=t.call.apply(t,[this].concat(r)),(0,c.default)((0,i.default)(e),"id",""),(0,c.default)((0,i.default)(e),"title",""),(0,c.default)((0,i.default)(e),"documentType",""),(0,c.default)((0,i.default)(e),"thumbnailUrl",""),(0,c.default)((0,i.default)(e),"previewUrl",""),e}return(0,o.default)(Document,null,[{key:"createFromResponse",value:function createFromResponse(e){return(new Document).init({id:e.id,title:e.title,documentType:e.doc_type,thumbnailUrl:e.thumbnail_url,previewUrl:e.preview_url})}}]),Document}(n(a(96084)).default);t.default=d},80330:(e,t,a)=>{"use strict";var r=a(67394),n=a(67971);r(t,"__esModule",{value:!0}),t.default=void 0,a(90286),a(64434),a(3777),a(38081);var l=n(a(11959)),o=n(a(39041)),i=n(a(38852)),u=n(a(77371)),s=n(a(68537)),c=n(a(18042)),d=n(a(96084)),f=n(a(70345)),m=function(e){(0,u.default)(Kit,e);var t=(0,s.default)(Kit);function Kit(){var e;(0,l.default)(this,Kit);for(var a=arguments.length,r=new Array(a),n=0;n<a;n++)r[n]=arguments[n];return e=t.call.apply(t,[this].concat(r)),(0,c.default)((0,i.default)(e),"id",""),(0,c.default)((0,i.default)(e),"title",""),(0,c.default)((0,i.default)(e),"description",""),(0,c.default)((0,i.default)(e),"isFavorite",!1),(0,c.default)((0,i.default)(e),"thumbnailUrl",null),(0,c.default)((0,i.default)(e),"previewUrl",""),(0,c.default)((0,i.default)(e),"accessLevel",0),(0,c.default)((0,i.default)(e),"trendIndex",null),(0,c.default)((0,i.default)(e),"popularityIndex",null),(0,c.default)((0,i.default)(e),"featuredIndex",null),(0,c.default)((0,i.default)(e),"createdAt",null),(0,c.default)((0,i.default)(e),"updatedAt",null),(0,c.default)((0,i.default)(e),"keywords",[]),(0,c.default)((0,i.default)(e),"taxonomies",[]),(0,c.default)((0,i.default)(e),"documents",[]),e}return(0,o.default)(Kit,[{key:"getDocumentsByTypes",value:function getDocumentsByTypes(e){var t=this;return e.map((function(e){return(e=e.clone()).documents=t.documents.filter((function(t){return e.documentTypes.includes(t.documentType)})),e}))}}],[{key:"createFromResponse",value:function createFromResponse(e){return(new Kit).init({id:e.id,title:e.title,description:e.description,isFavorite:e.is_favorite,thumbnailUrl:e.thumbnail_url,previewUrl:e.preview_url,accessLevel:e.access_level,trendIndex:e.trend_index,popularityIndex:e.popularity_index,featuredIndex:e.featured_index,createdAt:e.created_at?new Date(e.created_at):null,updatedAt:e.updated_at?new Date(e.updated_at):null,keywords:e.keywords,taxonomies:e.taxonomies,documents:e.documents?e.documents.map((function(e){return f.default.createFromResponse(e)})):[]})}}]),Kit}(d.default);t.default=m},28605:(e,t,a)=>{"use strict";var r=a(38003).__,n=a(67394),l=a(67971);n(t,"__esModule",{value:!0}),t.taxonomyType=t.default=void 0;var o=l(a(11959)),i=l(a(39041)),u=l(a(38852)),s=l(a(77371)),c=l(a(68537)),d=l(a(18042)),f=l(a(96084)),m=[{key:"categories",label:r("Categories","elementor"),isOpenByDefault:!0},{key:"tags",label:r("Tags","elementor")},{key:"types",label:r("Kit Types","elementor")},{key:"features",label:r("Features","elementor")},{key:"subscription_plans",label:r("Kits by plan","elementor")}];t.taxonomyType=m;var v=function(e){(0,s.default)(Taxonomy,e);var t=(0,c.default)(Taxonomy);function Taxonomy(){var e;(0,o.default)(this,Taxonomy);for(var a=arguments.length,r=new Array(a),n=0;n<a;n++)r[n]=arguments[n];return e=t.call.apply(t,[this].concat(r)),(0,d.default)((0,u.default)(e),"text",""),(0,d.default)((0,u.default)(e),"type","tag"),e}return(0,i.default)(Taxonomy,null,[{key:"createFromResponse",value:function createFromResponse(e){return(new Taxonomy).init({text:e.text,type:e.type})}}]),Taxonomy}(f.default);t.default=v},15684:(e,t,a)=>{"use strict";var r=a(38003).__,n=a(23615),l=a(67394),o=a(67971);l(t,"__esModule",{value:!0}),t.default=Favorites;var i=o(a(87363)),u=o(a(26115)),s=o(a(96980)),c=a(50927);function Favorites(e){var t=(0,c.useNavigate)(),a=i.default.createElement(s.default,{title:r("No favorites here yet...","elementor"),description:r("Use the heart icon to save kits that inspire you. You'll be able to find them here.","elementor"),button:{text:r("Continue browsing.","elementor"),action:function action(){return t("/kit-library")}}});return i.default.createElement(u.default,{path:e.path,initialQueryParams:{favorite:!0},renderNoResultsComponent:function renderNoResultsComponent(e){var t=e.defaultComponent;return e.isFilterActive?t:a}})}Favorites.propTypes={path:n.string}},50312:(e,t,a)=>{"use strict";var r=a(38003).__,n=a(23615),l=a(67394),o=a(67971),i=a(52369);l(t,"__esModule",{value:!0}),t.default=IndexHeader;var u=i(a(87363)),s=o(a(47834)),c=o(a(59883)),d=a(36779),f=a(50927);function IndexHeader(e){var t=(0,f.useNavigate)(),a=(0,u.useState)(!1),n=(0,s.default)(a,2),l=n[0],o=n[1],i=(0,u.useMemo)((function(){return[{id:"info",text:r("Info","elementor-pro"),hideText:!0,icon:"eicon-info-circle-o",onClick:function onClick(){return o(!0)}},{id:"refetch",text:r("Refetch","elementor-pro"),hideText:!0,icon:"eicon-sync ".concat(e.isFetching?"eicon-animation-spin":""),onClick:e.refetch},{id:"import",text:r("Import","elementor-pro"),hideText:!0,icon:"eicon-upload-circle-o",onClick:function onClick(){return t("/import?referrer=kit-library")}}]}),[e.isFetching,e.refetch]);return u.default.createElement(u.default.Fragment,null,u.default.createElement(c.default,{buttons:i}),u.default.createElement(d.ModalProvider,{title:r("Welcome to the Library","elementor"),show:l,setShow:o},u.default.createElement("div",{className:"e-kit-library-header-info-modal-container"},u.default.createElement(d.Heading,{tag:"h3",variant:"h3"},r("What's a kit?","elementor")),u.default.createElement(d.Text,null,r("A Template Kit is full, ready-made design that you can apply to your site. It includes all the pages, parts, settings and content that you'd expect in a fully functional website.","elementor"))),u.default.createElement("div",{className:"e-kit-library-header-info-modal-container"},u.default.createElement(d.Heading,{tag:"h3",variant:"h3"},r("What's going on in the Kit Library?","elementor")),u.default.createElement(d.Text,null,r("Search & filter for kits by category and tags, or browse through individual kits to see what's inside.","elementor"),u.default.createElement("br",null),r("Once you've picked a winner, apply it to your site!","elementor"))),u.default.createElement("div",null,u.default.createElement(d.Heading,{tag:"h3",variant:"h3"},r("Happy browsing!","elementor")),u.default.createElement(d.Text,null,u.default.createElement(d.Button,{url:"https://go.elementor.com/app-kit-library-how-to-use-kits",target:"_blank",rel:"noreferrer",text:r("Learn more","elementor"),color:"link"})," ",r("about using templates","elementor")))))}a(70082),IndexHeader.propTypes={refetch:n.func.isRequired,isFetching:n.bool}},59380:(e,t,a)=>{"use strict";var r=a(23615),n=a(67394),l=a(67971);n(t,"__esModule",{value:!0}),t.default=IndexSidebar;var o=l(a(87363));a(90286);var i=a(36779);function IndexSidebar(e){return o.default.createElement(o.default.Fragment,null,e.menuItems.map((function(e){return o.default.createElement(i.MenuItem,{key:e.label,text:e.label,className:"eps-menu-item__link ".concat(e.isActive?"eps-menu-item--active":""),icon:e.icon,url:e.url})})),e.tagsFilterSlot)}IndexSidebar.propTypes={tagsFilterSlot:r.node,menuItems:r.arrayOf(r.shape({label:r.string,icon:r.string,isActive:r.bool,url:r.string}))}},26115:(e,t,a)=>{"use strict";var r=a(38003).__,n=a(23615),l=a(67394),o=a(67971),i=a(52369);l(t,"__esModule",{value:!0}),t.default=Index;var u=i(a(87363));a(64434),a(84208),a(3777),a(38081),a(99236),a(42679);var s=o(a(38923)),c=o(a(83452)),d=o(a(74846)),f=o(a(18042)),m=o(a(47834)),v=o(a(84899)),p=o(a(32161)),y=o(a(98125)),_=o(a(96980)),g=o(a(78915)),h=o(a(50312)),b=o(a(59380)),E=o(a(72358)),k=o(a(95219)),C=o(a(28426)),x=o(a(3213)),T=o(a(86281)),w=o(a(8328)),N=i(a(92848)),F=o(a(4801)),M=o(a(95236)),O=a(36779),S=a(84364),P=a(50927);function Index(e){(0,F.default)({title:r("Kit Library","elementor")});var t=function useMenuItems(e){return(0,u.useMemo)((function(){var t=e.replace("/","");return[{label:r("All Template Kits","elementor"),icon:"eicon-filter",isActive:!t,url:"/kit-library"},{label:r("Favorites","elementor"),icon:"eicon-heart-o",isActive:"favorites"===t,url:"/kit-library/favorites"}]}),[e])}(e.path),a=(0,N.default)(e.initialQueryParams),n=a.data,l=a.isSuccess,o=a.isLoading,i=a.isFetching,I=a.isError,B=a.queryParams,R=a.setQueryParams,L=a.clearQueryParams,K=a.forceRefetch,A=a.isFilterActive;!function useRouterQueryParams(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=(0,P.useLocation)(),n=(0,S.useLastFilterContext)().setLastFilter;(0,u.useEffect)((function(){var t=Object.fromEntries((0,s.default)(e).filter((function(e){var t=(0,m.default)(e,2),r=t[0],n=t[1];return!a.includes(r)&&n})));n(t),history.replaceState(null,"",decodeURI("#".concat(wp.url.addQueryArgs(r.pathname.split("?")[0]||"/",t))))}),[e]),(0,u.useEffect)((function(){var e=(0,c.default)(N.defaultQueryParams).reduce((function(e,t){var a=wp.url.getQueryArg(r.pathname,t);return a?(0,v.default)((0,v.default)({},e),{},(0,f.default)({},t,a)):e}),{});t((function(t){return(0,v.default)((0,v.default)((0,v.default)({},t),e),{},{taxonomies:(0,v.default)((0,v.default)({},t.taxonomies),e.taxonomies),ready:!0})}))}),[])}(B,R,["ready"].concat((0,d.default)((0,c.default)(e.initialQueryParams))));var D=(0,M.default)(),q=D.data,H=D.forceRefetch,Q=D.isFetching,U=function useTaxonomiesSelection(e){return[(0,u.useCallback)((function(t,a){return e((function(e){var r=(0,v.default)({},e.taxonomies);return r[t]=a(e.taxonomies[t]),(0,v.default)((0,v.default)({},e),{},{taxonomies:r})}))}),[e]),(0,u.useCallback)((function(t){return e((function(e){var a=(0,s.default)(e.taxonomies).reduce((function(e,a){var r=(0,m.default)(a,2),n=r[0],l=r[1];return(0,v.default)((0,v.default)({},e),{},(0,f.default)({},n,l.filter((function(e){return e!==t}))))}),{});return(0,v.default)((0,v.default)({},e),{},{taxonomies:a})}))}),[e])]}(R),Y=(0,m.default)(U,2),G=Y[0],j=Y[1];return u.default.createElement(k.default,{sidebar:u.default.createElement(b.default,{tagsFilterSlot:u.default.createElement(w.default,{selected:B.taxonomies,onSelect:G,taxonomies:q}),menuItems:t}),header:u.default.createElement(h.default,{refetch:function refetch(){K(),H()},isFetching:i||Q})},u.default.createElement("div",{className:"e-kit-library__index-layout-container"},u.default.createElement(O.Grid,{container:!0,className:"e-kit-library__index-layout-top-area"},u.default.createElement(O.Grid,{item:!0,className:"e-kit-library__index-layout-top-area-search"},u.default.createElement(x.default,{placeholder:r("Search all Template Kits...","elementor"),value:B.search,onChange:function onChange(e){return R((function(t){return(0,v.default)((0,v.default)({},t),{},{search:e})}))}}),A&&u.default.createElement(g.default,{queryParams:B,resultCount:n.length||0,onClear:L,onRemoveTag:j})),u.default.createElement(O.Grid,{item:!0,className:"e-kit-library__index-layout-top-area-sort"},u.default.createElement(T.default,{options:[{label:r("Featured","elementor"),value:"featuredIndex"},{label:r("New","elementor"),value:"createdAt"},{label:r("Popular","elementor"),value:"popularityIndex"},{label:r("Trending","elementor"),value:"trendIndex"}],value:B.order,onChange:function onChange(e){return R((function(t){return(0,v.default)((0,v.default)({},t),{},{order:e})}))}}))),u.default.createElement(p.default,{className:"e-kit-library__index-layout-main"},u.default.createElement(u.default.Fragment,null,o&&u.default.createElement(C.default,null),I&&u.default.createElement(_.default,{title:r("Something went wrong.","elementor"),description:r("Nothing to worry about, use 🔄 on the top right to try again. If the problem continues, head over to the Help Center.","elementor"),button:{text:r("Learn More","elementor"),url:"http://go.elementor.com/app-kit-library-error",target:"_blank"}}),l&&0<n.length&&B.ready&&u.default.createElement(E.default,{data:n}),l&&0===n.length&&B.ready&&e.renderNoResultsComponent({defaultComponent:u.default.createElement(_.default,{title:r("No results matched your search.","elementor"),description:r("Try different keywords or ","elementor"),button:{text:r("Continue browsing.","elementor"),action:L}}),isFilterActive:A}),u.default.createElement(y.default,null)))))}a(78870),Index.propTypes={path:n.string,initialQueryParams:n.object,renderNoResultsComponent:n.func},Index.defaultProps={initialQueryParams:{},renderNoResultsComponent:function renderNoResultsComponent(e){return e.defaultComponent}}},86769:(e,t,a)=>{"use strict";var r=a(38003).__,n=a(23615),l=a(67394),o=a(67971);l(t,"__esModule",{value:!0}),t.default=OverviewContentGroupItem;var i=o(a(87363)),u=o(a(70345)),s=a(36779);function OverviewContentGroupItem(e){return i.default.createElement(s.Card,null,i.default.createElement(s.CardHeader,null,i.default.createElement(s.Heading,{tag:"h3",title:e.document.title,variant:"h5",className:"eps-card__headline"},e.document.title)),i.default.createElement(s.CardBody,null,i.default.createElement(s.CardImage,{alt:e.document.title,src:e.document.thumbnailUrl||""},e.document.previewUrl&&i.default.createElement(s.CardOverlay,null,i.default.createElement(s.Button,{className:"e-kit-library__kit-item-overlay-overview-button",text:r("View Demo","elementor"),icon:"eicon-preview-medium",url:"/kit-library/preview/".concat(e.kitId,"?document_id=").concat(e.document.id)})))))}OverviewContentGroupItem.propTypes={document:n.instanceOf(u.default).isRequired,kitId:n.string.isRequired}},70215:(e,t,a)=>{"use strict";var r=a(23615),n=a(67394),l=a(67971);n(t,"__esModule",{value:!0}),t.default=OverviewContentGroup;var o=l(a(87363));a(90286);var i=l(a(8247)),u=l(a(86769)),s=a(36779);function OverviewContentGroup(e){var t,a;return(null===(t=e.contentType)||void 0===t||null===(a=t.documents)||void 0===a?void 0:a.length)<=0?"":o.default.createElement("div",{className:"e-kit-library__content-overview-group-item"},o.default.createElement(s.Heading,{tag:"h3",variant:"h3",className:"e-kit-library__content-overview-group-title"},e.contentType.label),o.default.createElement(s.CssGrid,{spacing:24,colMinWidth:250},e.contentType.documents.map((function(t){return o.default.createElement(u.default,{key:t.id,document:t,kitId:e.kitId})}))))}OverviewContentGroup.propTypes={contentType:r.instanceOf(i.default),kitId:r.string.isRequired}},54908:(e,t,a)=>{"use strict";var r=a(38003).__,n=a(23615),l=a(67394),o=a(67971),i=a(52369);l(t,"__esModule",{value:!0}),t.default=OverviewSidebar;var u=i(a(87363));a(90286);var s=o(a(47834)),c=o(a(3964)),d=o(a(8247)),f=o(a(21289)),m=o(a(80330)),v=o(a(96370)),p=a(36779);function OverviewSidebar(e){var t,a=(0,u.useState)(!0),n=(0,s.default)(a,2),l=n[0],o=n[1],i=(0,u.useState)(!1),d=(0,s.default)(i,2),m=d[0],y=d[1];return u.default.createElement("div",{className:"e-kit-library__item-sidebar"},u.default.createElement("div",{className:"e-kit-library__item-sidebar-header"},u.default.createElement(p.Heading,{tag:"h1",variant:"h5",className:"e-kit-library__item-sidebar-header-title"},e.model.title),u.default.createElement(f.default,{isFavorite:e.model.isFavorite,id:e.model.id})),u.default.createElement(p.CardImage,{className:"e-kit-library__item-sidebar-thumbnail",alt:e.model.title,src:e.model.thumbnailUrl||""}),u.default.createElement(p.Text,{className:"e-kit-library__item-sidebar-description"},e.model.description||""),e.model.taxonomies.length>0&&u.default.createElement(c.default,{isOpen:l,onChange:o,title:r("TAGS","elementor"),className:"e-kit-library__item-sidebar-collapse-tags"},u.default.createElement(p.Grid,{container:!0,className:"e-kit-library__item-sidebar-tags-container"},e.model.taxonomies.map((function(e){return u.default.createElement(v.default,{key:e},e)})))),(null===(t=e.groupedKitContent)||void 0===t?void 0:t.length)>0&&e.model.documents.length>0&&u.default.createElement(c.default,{isOpen:m,onChange:y,title:r("WHAT'S INSIDE","elementor"),className:"e-kit-library__item-sidebar-collapse-info"},e.groupedKitContent.map((function(e){return e.documents<=0?"":u.default.createElement(p.Text,{className:"e-kit-library__item-information-text",key:e.id},e.documents.length," ",e.label)}))))}a(31761),OverviewSidebar.propTypes={model:n.instanceOf(m.default).isRequired,groupedKitContent:n.arrayOf(n.instanceOf(d.default))}},96370:(e,t,a)=>{"use strict";var r=a(23615),n=a(67394),l=a(67971),o=a(52369);n(t,"__esModule",{value:!0}),t.default=OverviewTaxonomyBadge;var i=o(a(87363));a(71954);var u=l(a(21873)),s=l(a(95236)),c=a(50927);function OverviewTaxonomyBadge(e){var t=(0,s.default)().data,a=e.children,r=(0,i.useMemo)((function(){var e;return t?null===(e=t.find((function(e){return e.text===a})))||void 0===e?void 0:e.type:null}),[t,a]);return r?i.default.createElement(c.Link,{to:"/kit-library?taxonomies[".concat(r,"][]=").concat(a)},i.default.createElement(u.default,null,e.children)):""}OverviewTaxonomyBadge.propTypes={children:r.string}},43273:(e,t,a)=>{"use strict";var r=a(38003).__,n=a(23615),l=a(67394),o=a(67971),i=a(52369);l(t,"__esModule",{value:!0}),t.default=Overview;var u=i(a(87363));a(90286);var s=o(a(32161)),c=o(a(90125)),d=o(a(47175)),f=o(a(95219)),m=o(a(70215)),v=o(a(54908)),p=o(a(39261)),y=o(a(15398)),_=o(a(4801)),g=a(50927);function Overview(e){var t=(0,p.default)(e.id),a=t.data,n=t.isError,l=t.isLoading,o=(0,y.default)(a).data,i=function useHeaderButtons(e){var t=(0,g.useNavigate)();return(0,u.useMemo)((function(){return[{id:"view-demo",text:r("View Demo","elementor"),hideText:!1,variant:"outlined",color:"secondary",size:"sm",onClick:function onClick(){return t("/kit-library/preview/".concat(e))},includeHeaderBtnClass:!1}]}),[e])}(e.id);if((0,_.default)({title:a?"".concat(r("Kit Library","elementor")," | ").concat(a.title):r("Loading...","elementor")}),n)throw new Error;return l?u.default.createElement(c.default,null):u.default.createElement(f.default,{header:u.default.createElement(d.default,{model:a,buttons:i,pageId:"overview"}),sidebar:u.default.createElement(v.default,{model:a,groupedKitContent:o})},o.length>0&&u.default.createElement(s.default,null,o.map((function(t){return u.default.createElement(m.default,{key:t.id,contentType:t,kitId:e.id})}))))}a(11427),Overview.propTypes={id:n.string}},16692:(e,t,a)=>{"use strict";var r=a(23615),n=a(67394),l=a(52369);n(t,"__esModule",{value:!0}),t.PreviewIframe=PreviewIframe;var o=l(a(87363)),i=a(36779);function PreviewIframe(e){var t=(0,o.useRef)();return(0,o.useEffect)((function(){if(t.current){var a=function listener(){return e.onLoaded()};return t.current.addEventListener("load",a),function(){return t.current&&t.current.removeEventListener("load",a)}}}),[t.current,e.previewUrl]),o.default.createElement(i.Grid,{container:!0,justify:"center",className:"e-kit-library__preview-iframe-container"},o.default.createElement("iframe",{className:"e-kit-library__preview-iframe",src:e.previewUrl,style:e.style,ref:t}))}PreviewIframe.propTypes={previewUrl:r.string.isRequired,style:r.object,onLoaded:r.func},PreviewIframe.defaultProps={style:{width:"100%",height:"100%"},onLoaded:function onLoaded(){}}},40562:(e,t,a)=>{"use strict";var r=a(23615),n=a(67394),l=a(67971);n(t,"__esModule",{value:!0}),t.default=PreviewResponsiveControls;var o=l(a(87363));a(90286);var i=a(5133),u=a(36779);function PreviewResponsiveControls(e){return o.default.createElement(u.Grid,{container:!0,alignItems:"center",justify:"center",className:"e-kit-library__preview-responsive-controls"},i.breakpoints.map((function(t){var a=t.label,r=t.value,n="e-kit-library__preview-responsive-controls-item";return e.active===r&&(n+=" e-kit-library__preview-responsive-controls-item--active"),o.default.createElement(u.Button,{key:r,text:a,hideText:!0,className:n,icon:"eicon-device-".concat(r),onClick:function onClick(){return e.onChange(r)}})})))}a(13777),PreviewResponsiveControls.propTypes={active:r.string,onChange:r.func.isRequired},PreviewResponsiveControls.defaultProps={active:"desktop"}},5133:(e,t,a)=>{"use strict";var r=a(38003).__,n=a(23615),l=a(67394),o=a(67971),i=a(52369);l(t,"__esModule",{value:!0}),t.breakpoints=void 0,t.default=Preview;var u=i(a(87363)),s=o(a(47834)),c=o(a(14176));a(99236),a(71954);var d=o(a(90125)),f=o(a(47175)),m=o(a(95219)),v=o(a(28426)),p=o(a(40562)),y=o(a(39261)),_=o(a(4801)),g=a(16692),h=a(50927);a(13656);var b=[{value:"desktop",label:r("Desktop","elementor"),style:{width:"100%",height:"100%"}},{value:"tablet",label:r("Tablet","elementor"),style:{marginTop:"30px",marginBottom:"30px",width:"768px",height:"1024px"}},{value:"mobile",label:r("Mobile","elementor"),style:{marginTop:"30px",marginBottom:"30px",width:"375px",height:"667px"}}];function Preview(e){var t=(0,y.default)(e.id),a=t.data,n=t.isError,l=t.isLoading,o=(0,u.useState)(!0),i=(0,s.default)(o,2),E=i[0],k=i[1],C=function useHeaderButtons(e){var t=(0,h.useNavigate)();return(0,u.useMemo)((function(){return[{id:"overview",text:r("Overview","elementor"),hideText:!1,variant:"outlined",color:"secondary",size:"sm",onClick:function onClick(){return t("/kit-library/overview/".concat(e))},includeHeaderBtnClass:!1}]}),[e])}(e.id),x=function usePreviewUrl(e){var t=(0,h.useLocation)();return(0,u.useMemo)((function(){var a,r;if(!e)return null;var n=new URLSearchParams(null===(a=t.pathname.split("?"))||void 0===a?void 0:a[1]).get("document_id");return n&&(null===(r=e.documents.find((function(e){return e.id===(0,c.default)(n)})))||void 0===r?void 0:r.previewUrl)||e.previewUrl}),[t,e])}(a),T=(0,u.useState)("desktop"),w=(0,s.default)(T,2),N=w[0],F=w[1],M=(0,u.useMemo)((function(){return b.find((function(e){return e.value===N})).style}),[N]);if((0,_.default)({title:a?"".concat(r("Kit Library","elementor")," | ").concat(a.title):r("Loading...","elementor")}),n)throw new Error;return l?u.default.createElement(d.default,null):u.default.createElement(m.default,{header:u.default.createElement(f.default,{model:a,buttons:C,centerColumn:u.default.createElement(p.default,{active:N,onChange:F}),pageId:"demo"})},E&&u.default.createElement(v.default,{className:"e-kit-library__preview-loader"}),x&&u.default.createElement(g.PreviewIframe,{previewUrl:x,style:M,onLoaded:function onLoaded(){return k(!1)}}))}t.breakpoints=b,Preview.propTypes={id:n.string}}}]);