Changeset 3776366
- Timestamp:
- 10/31/2026 05:53:57 AM (3 days ago)
- Location:
- wpide
- Files:
-
- 16 edited
- 1 copied
-
tags/3.6.2 (copied) (copied from wpide/trunk )
-
tags/3.6.2/App/App.php (modified) (2 diffs)
-
tags/3.6.2/App/Services/Auth/Adapters/WPAuth.php (modified) (1 diff)
-
tags/3.6.2/_constants.php (modified) (1 diff)
-
tags/3.6.2/dist/css/Snippets-Library.css (modified) (1 diff)
-
tags/3.6.2/dist/js/app.js (modified) (1 diff)
-
tags/3.6.2/dist/js/chunks/Snippets/Snippets-Library.js (modified) (1 diff)
-
tags/3.6.2/readme.txt (modified) (2 diffs)
-
tags/3.6.2/wpide.php (modified) (1 diff)
-
trunk/App/App.php (modified) (2 diffs)
-
trunk/App/Services/Auth/Adapters/WPAuth.php (modified) (1 diff)
-
trunk/_constants.php (modified) (1 diff)
-
trunk/dist/css/Snippets-Library.css (modified) (1 diff)
-
trunk/dist/js/app.js (modified) (1 diff)
-
trunk/dist/js/chunks/Snippets/Snippets-Library.js (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/wpide.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wpide/tags/3.6.2/App/App.php
r3771999 r3776366 277 277 public function canManage(): bool 278 278 { 279 if (is_multisite() && !is_super_admin()) { 280 return false; 281 } 282 279 283 return current_user_can('manage_options'); 280 284 } … … 293 297 public function adminMenu() 294 298 { 299 if (!$this->canManage()) { 300 return; 301 } 295 302 296 303 $menuTopItems = apply_filters('wpide_admin_menu_top_items', [ -
wpide/tags/3.6.2/App/Services/Auth/Adapters/WPAuth.php
r2763916 r3776366 55 55 } 56 56 57 // ...but not for wp admins 58 if (in_array('administrator', (array)$wpuser->roles)) { 57 // ...but not for wp admins (on multisite, only super admins manage WPIDE) 58 if ( 59 in_array('administrator', (array)$wpuser->roles) 60 && (!is_multisite() || is_super_admin($wpuser->ID)) 61 ) { 59 62 $user->setHomedir('/'); 60 63 $user->setRole('admin'); -
wpide/tags/3.6.2/_constants.php
r3776309 r3776366 10 10 define(__NAMESPACE__ . '\NAME', 'WPIDE'); 11 11 12 define(__NAMESPACE__ . '\VERSION', '3.6. 1');12 define(__NAMESPACE__ . '\VERSION', '3.6.2'); 13 13 define(__NAMESPACE__ . '\FM_VERSION', '7.8.1'); 14 14 -
wpide/tags/3.6.2/dist/css/Snippets-Library.css
r3771999 r3776366 1 1 .library-author{display:inline-flex;align-items:center;gap:.3125rem;min-width:0}.library-author .icon{flex:none;width:auto;margin:0;font-size:14px}.library-author .icon.is-team{color:var(--wpide-accent-color)}.library-avatar{position:relative;display:inline-grid;flex:none;place-items:center;width:18px;height:18px;overflow:hidden;border-radius:50%;background:var(--wpide-accent-dim);color:var(--wpide-accent-color);font-size:8px;font-weight:600;line-height:1}.library-avatar img{position:absolute;inset:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.library-author-name{overflow:hidden;color:inherit;text-overflow:ellipsis;white-space:nowrap}.library-author-name:hover,.library-author-name:focus-visible{color:var(--wpide-accent-color);text-decoration:underline} 2 .snippets-library-view{display:flex;flex-grow:1;min-height:0 }.snippets-library-view .library-categories{flex:none;width:15rem;padding:1.25rem .75rem;border-right:1px solid var(--wpide-border-light)}.snippets-library-view .library-category-list{position:sticky;top:1.25rem;margin:0;padding:0;list-style:none}.snippets-library-view .library-category-list a{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.4375rem .75rem;border-radius:var(--wpide-border-radius);color:var(--wpide-base-color);font-size:13px;transition:background-color .15s ease,color .15s ease}.snippets-library-view .library-category-list a:hover{background:var(--wpide-lighter)}.snippets-library-view .library-category-list a.active{background:var(--wpide-accent-dim);color:var(--wpide-accent-color);font-weight:600}.snippets-library-view .library-category-favorites .icon{margin-right:.375rem;color:var(--wpide-warning)}.snippets-library-view .library-category-divider{height:1px;margin:.5rem .75rem;background:var(--wpide-border-light)}.snippets-library-view .library-fav{flex:none;display:inline-grid;place-items:center;width:1.75rem;height:1.75rem;margin:-0.125rem -0.375rem 0 0;border:0;border-radius:50%;background:none;color:var(--wpide-base-light);font-size:1rem;transition:color .15s ease,background-color .15s ease,transform .15s ease}.snippets-library-view .library-fav:hover{background:var(--wpide-lighter);color:var(--wpide-warning)}.snippets-library-view .library-fav.active{color:var(--wpide-warning)}.snippets-library-view .library-fav.active .icon{animation:library-fav-pop .25s ease}.snippets-library-view .library-fav:focus-visible{outline:2px solid var(--wpide-accent-color);outline-offset:1px}.snippets-library-view .library-fav:disabled{opacity:.6}@keyframes library-fav-pop{50%{transform:scale(1.3)}}@media(prefers-reduced-motion: reduce){.snippets-library-view .library-fav.active .icon{animation:none}}.snippets-library-view .library-category-count{color:var(--wpide-base-light);font-size:12px;font-weight:400;font-variant-numeric:tabular-nums}.snippets-library-view .library-main{flex:1 1 auto;min-width:0}.snippets-library-view .library-views{display:inline-flex;margin-bottom:1.25rem;padding:.1875rem;border-radius:var(--wpide-border-radius);background:var(--wpide-lighter)}.snippets-library-view .library-view{display:inline-flex;align-items:center;gap:.375rem;padding:.375rem .875rem;border:0;border-radius:calc(var(--wpide-border-radius) - 1px);background:none;color:var(--wpide-base-light);font-weight:500;transition:background-color .15s ease,color .15s ease}.snippets-library-view .library-view.active{background:var(--wpide-card-bg);color:var(--wpide-accent-color);box-shadow:0 1px 3px rgba(0,0,0,.08)}.snippets-library-view .library-view:focus-visible{outline:2px solid var(--wpide-accent-color);outline-offset:1px}.snippets-library-view .library-toolbar{display:flex;align-items:center;gap:.5rem 1rem;margin-bottom:.75rem}.snippets-library-view .library-search{flex:0 1 26rem}.snippets-library-view .library-author-filter{flex:0 0 auto;width:auto}.snippets-library-view .library-result-count{margin-left:auto;color:var(--wpide-base-light);white-space:nowrap;font-variant-numeric:tabular-nums}.snippets-library-view .library-grid{grid-template-columns:repeat(auto-fill, minmax(17rem, 1fr))}.snippets-library-view .library-card{transition:border-color .15s ease,box-shadow .15s ease}.snippets-library-view .library-card:hover{border-color:var(--wpide-accent-300, var(--wpide-accent-color));box-shadow:0 4px 16px -8px rgba(0,0,0,.18)}.snippets-library-view .library-card .card-inner{padding:1.125rem 1.25rem}.snippets-library-view .library-card-head{display:flex;align-items:flex-start;gap:.5rem;margin-bottom:.375rem}.snippets-library-view .library-card-head .badge{flex:none;margin-top:.125rem}.snippets-library-view .library-card-title{flex:1 1 auto;margin:0;font-size:15px;line-height:1.35}.snippets-library-view .library-card-title a{color:var(--wpide-base-color)}.snippets-library-view .library-card-title a:hover{color:var(--wpide-accent-color)}.snippets-library-view .library-card-text{flex:1 1 auto;margin-bottom:.75rem;color:var(--wpide-base-light);font-size:13px;line-height:1.5}.snippets-library-view .library-card-requires{display:flex;flex-wrap:wrap;gap:.25rem;margin-bottom:.75rem}.snippets-library-view .library-card-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:.375rem}.snippets-library-view .library-installed{display:inline-flex;align-items:center;gap:.25rem;margin-right:auto;color:var(--wpide-success);font-size:12px;font-weight:500}.snippets-library-view .library-card-skeleton{pointer-events:none}.snippets-library-view .library-card-skeleton .library-card-head{gap:1rem;margin-bottom:1rem}.snippets-library-view .library-card-skeleton .library-card-head .is-title{flex:1}.snippets-library-view .library-card-skeleton .w-35{margin-bottom:1rem}.snippets-library-view .library-card-skeleton-foot{display:flex;justify-content:flex-end;gap:.5rem;margin-top:auto;padding:.75rem 1.25rem 1.25rem}.snippets-library-view .library-card-skeleton-foot .skeleton-line+.skeleton-line{margin-top:0}.snippets-library-view .library-category-skeleton{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.5rem .75rem}.snippets-library-view .library-category-skeleton .skeleton-line+.skeleton-line{margin-top:0}.snippets-library-view .library-empty{padding:3rem 1rem;color:var(--wpide-base-light);text-align:center}.snippets-library-view .library-empty .icon{font-size:2rem}.snippets-library-view .library-empty .btn{margin-top:.25rem}@media(max-width: 767.98px){.snippets-library-view .library-toolbar{flex-wrap:wrap}.snippets-library-view .library-search{flex:1 1 100%}.snippets-library-view .library-toolbar .custom-select{flex:1 1 auto;width:auto}.snippets-library-view .library-grid{grid-template-columns:1fr}}.library-card-author{display:flex;align-items:center;gap:.3125rem;margin-bottom:.5rem;color:var(--wpide-base-light);font-size:12px}.library-card-author .icon{flex:none;width:auto;margin:0;font-size:14px}.library-card-author .icon.is-team{color:var(--wpide-accent-color)}.library-card-author .icon+span{margin-left:0}.library-card-author .library-card-installs::before{content:"·";margin-right:.375rem}2 .snippets-library-view{display:flex;flex-grow:1;min-height:0;flex-shrink:0;align-items:flex-start}.snippets-library-view .library-categories{position:sticky;top:0;flex:none;width:15rem;max-height:calc(var(--wpide-viewport-height) - var(--wpide-header-height) - var(--wpide-adminbar-height) - 59px);overflow-y:auto;overscroll-behavior:contain;padding:1.25rem .75rem;border-right:1px solid var(--wpide-border-light);scrollbar-width:thin;scrollbar-color:rgba(0,0,0,0) rgba(0,0,0,0)}.snippets-library-view .library-categories:hover{scrollbar-color:var(--wpide-light-400) rgba(0,0,0,0)}.snippets-library-view .library-categories::-webkit-scrollbar{width:8px}.snippets-library-view .library-categories::-webkit-scrollbar-track,.snippets-library-view .library-categories::-webkit-scrollbar-corner{background:rgba(0,0,0,0)}.snippets-library-view .library-categories::-webkit-scrollbar-thumb{border:2px solid rgba(0,0,0,0);border-radius:999px;background:rgba(0,0,0,0)}.snippets-library-view .library-categories:hover::-webkit-scrollbar-thumb{background:var(--wpide-light-400)}.snippets-library-view .library-categories::-webkit-scrollbar-thumb:hover{background:var(--wpide-light-600)}.nk-app-root.dark-mode .snippets-library-view .library-categories:hover{scrollbar-color:var(--wpide-light-600) rgba(0,0,0,0)}.nk-app-root.dark-mode .snippets-library-view .library-categories:hover::-webkit-scrollbar-thumb{background:var(--wpide-light-600)}.nk-app-root.dark-mode .snippets-library-view .library-categories::-webkit-scrollbar-thumb:hover{background:var(--wpide-light-500)}.snippets-library-view .library-category-list{margin:0;padding:0;list-style:none}.snippets-library-view .library-category-list a{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.4375rem .75rem;border-radius:var(--wpide-border-radius);color:var(--wpide-base-color);font-size:13px;transition:background-color .15s ease,color .15s ease}.snippets-library-view .library-category-list a:hover{background:var(--wpide-lighter)}.snippets-library-view .library-category-list a.active{background:var(--wpide-accent-dim);color:var(--wpide-accent-color);font-weight:600}.snippets-library-view .library-category-favorites .icon{margin-right:.375rem;color:var(--wpide-warning)}.snippets-library-view .library-category-divider{height:1px;margin:.5rem .75rem;background:var(--wpide-border-light)}.snippets-library-view .library-fav{flex:none;display:inline-grid;place-items:center;width:1.75rem;height:1.75rem;margin:-0.125rem -0.375rem 0 0;border:0;border-radius:50%;background:none;color:var(--wpide-base-light);font-size:1rem;transition:color .15s ease,background-color .15s ease,transform .15s ease}.snippets-library-view .library-fav:hover{background:var(--wpide-lighter);color:var(--wpide-warning)}.snippets-library-view .library-fav.active{color:var(--wpide-warning)}.snippets-library-view .library-fav.active .icon{animation:library-fav-pop .25s ease}.snippets-library-view .library-fav:focus-visible{outline:2px solid var(--wpide-accent-color);outline-offset:1px}.snippets-library-view .library-fav:disabled{opacity:.6}@keyframes library-fav-pop{50%{transform:scale(1.3)}}@media(prefers-reduced-motion: reduce){.snippets-library-view .library-fav.active .icon{animation:none}}.snippets-library-view .library-category-count{color:var(--wpide-base-light);font-size:12px;font-weight:400;font-variant-numeric:tabular-nums}.snippets-library-view .library-main{flex:1 1 auto;min-width:0}.snippets-library-view .library-views{display:inline-flex;margin-bottom:1.25rem;padding:.1875rem;border-radius:var(--wpide-border-radius);background:var(--wpide-lighter)}.snippets-library-view .library-view{display:inline-flex;align-items:center;gap:.375rem;padding:.375rem .875rem;border:0;border-radius:calc(var(--wpide-border-radius) - 1px);background:none;color:var(--wpide-base-light);font-weight:500;transition:background-color .15s ease,color .15s ease}.snippets-library-view .library-view.active{background:var(--wpide-card-bg);color:var(--wpide-accent-color);box-shadow:0 1px 3px rgba(0,0,0,.08)}.snippets-library-view .library-view:focus-visible{outline:2px solid var(--wpide-accent-color);outline-offset:1px}.snippets-library-view .library-toolbar{display:flex;align-items:center;gap:.5rem 1rem;margin-bottom:.75rem}.snippets-library-view .library-search{flex:0 1 26rem}.snippets-library-view .library-author-filter{flex:0 0 auto;width:auto}.snippets-library-view .library-result-count{margin-left:auto;color:var(--wpide-base-light);white-space:nowrap;font-variant-numeric:tabular-nums}.snippets-library-view .library-grid{grid-template-columns:repeat(auto-fill, minmax(17rem, 1fr))}.snippets-library-view .library-card{transition:border-color .15s ease,box-shadow .15s ease}.snippets-library-view .library-card:hover{border-color:var(--wpide-accent-300, var(--wpide-accent-color));box-shadow:0 4px 16px -8px rgba(0,0,0,.18)}.snippets-library-view .library-card .card-inner{padding:1.125rem 1.25rem}.snippets-library-view .library-card-head{display:flex;align-items:flex-start;gap:.5rem;margin-bottom:.375rem}.snippets-library-view .library-card-head .badge{flex:none;margin-top:.125rem}.snippets-library-view .library-card-title{flex:1 1 auto;margin:0;font-size:15px;line-height:1.35}.snippets-library-view .library-card-title a{color:var(--wpide-base-color)}.snippets-library-view .library-card-title a:hover{color:var(--wpide-accent-color)}.snippets-library-view .library-card-text{flex:1 1 auto;margin-bottom:.75rem;color:var(--wpide-base-light);font-size:13px;line-height:1.5}.snippets-library-view .library-card-requires{display:flex;flex-wrap:wrap;gap:.25rem;margin-bottom:.75rem}.snippets-library-view .library-card-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:.375rem}.snippets-library-view .library-installed{display:inline-flex;align-items:center;gap:.25rem;margin-right:auto;color:var(--wpide-success);font-size:12px;font-weight:500}.snippets-library-view .library-card-skeleton{pointer-events:none}.snippets-library-view .library-card-skeleton .library-card-head{gap:1rem;margin-bottom:1rem}.snippets-library-view .library-card-skeleton .library-card-head .is-title{flex:1}.snippets-library-view .library-card-skeleton .w-35{margin-bottom:1rem}.snippets-library-view .library-card-skeleton-foot{display:flex;justify-content:flex-end;gap:.5rem;margin-top:auto;padding:.75rem 1.25rem 1.25rem}.snippets-library-view .library-card-skeleton-foot .skeleton-line+.skeleton-line{margin-top:0}.snippets-library-view .library-category-skeleton{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.5rem .75rem}.snippets-library-view .library-category-skeleton .skeleton-line+.skeleton-line{margin-top:0}.snippets-library-view .library-empty{padding:3rem 1rem;color:var(--wpide-base-light);text-align:center}.snippets-library-view .library-empty .icon{font-size:2rem}.snippets-library-view .library-empty .btn{margin-top:.25rem}@media(max-width: 767.98px){.snippets-library-view .library-toolbar{flex-wrap:wrap}.snippets-library-view .library-search{flex:1 1 100%}.snippets-library-view .library-toolbar .custom-select{flex:1 1 auto;width:auto}.snippets-library-view .library-grid{grid-template-columns:1fr}}.library-card-author{display:flex;align-items:center;gap:.3125rem;margin-bottom:.5rem;color:var(--wpide-base-light);font-size:12px}.library-card-author .icon{flex:none;width:auto;margin:0;font-size:14px}.library-card-author .icon.is-team{color:var(--wpide-accent-color)}.library-card-author .icon+span{margin-left:0}.library-card-author .library-card-installs::before{content:"·";margin-right:.375rem} -
wpide/tags/3.6.2/dist/js/app.js
r3776309 r3776366 11 11 component:window.WPIDE.premium?function(){return n.e(4154).then(n.bind(n,13680))}:null, 12 12 /* /fs_premium_only */ 13 redirect:window.WPIDE.premium?null:{name:"premium",query:{name:"config-manager"}},module:!0,config:null,premium:!0},{path:"/snippets",meta:{title:(0,h.__)("Snippets","wpide")},name:"snippets",icon:"ni-code",component:function(){return n.e(8165).then(n.bind(n,24235))},children:[{path:"",name:"snippets-list",meta:{title:(0,h.__)("Snippets","wpide")},component:function(){return n.e(1468).then(n.bind(n,50139))}},{path:"edit/:id?",name:"snippets-edit",meta:{title:(0,h.__)("Edit Snippet","wpide")},component:function(){return n.e(8062).then(n.bind(n,73257))}},{path:"library",name:"snippets-library",meta:{title:(0,h.__)("Snippet Library","wpide")},component:function(){return n.e(5779).then(n.bind(n, 29683))}},{path:"generators",name:"snippets-generators",meta:{title:(0,h.__)("Generators","wpide")},component:function(){return n.e(2160).then(n.bind(n,68303))}},{path:"header-footer",name:"snippets-global",meta:{title:(0,h.__)("Header & Footer","wpide")},component:function(){return n.e(3181).then(n.bind(n,48341))}},{path:"files",name:"snippets-files",meta:{title:(0,h.__)("Special Files","wpide")},props:{feature:"files",page:!0},component:window.WPIDE.premium?function(){return n.e(3960).then(n.bind(n,30097))}:f},{path:"import-export",name:"snippets-import",meta:{title:(0,h.__)("Import & Export","wpide")},component:function(){return n.e(3307).then(n.bind(n,25559))}},{path:"cloud",name:"snippets-cloud",meta:{title:(0,h.__)("WPIDE Cloud","wpide")},props:{feature:"cloud",page:!0},component:window.WPIDE.premium?function(){return n.e(2001).then(n.bind(n,54003))}:f},{path:"tracking",name:"snippets-tracking",meta:{title:(0,h.__)("Conversion Tracking","wpide")},props:{feature:"tracking",page:!0},component:window.WPIDE.premium?function(){return n.e(7433).then(n.bind(n,9829))}:f},{path:"log",name:"snippets-log",meta:{title:(0,h.__)("Snippet Log","wpide")},component:function(){return n.e(1568).then(n.bind(n,95986))}},{path:"settings",name:"snippets-settings",redirect:{path:"/settings",query:{tab:"snippets"}}}],redirect:{name:"snippets-list"},module:!0,config:null,settings:function(){return n.e(8974).then(n.bind(n,65637))}},{path:"/settings",name:"settings",meta:{title:(0,h.__)("Settings","wpide")},icon:"ni-setting",component:function(){return n.e(8248).then(n.bind(n,59999))}},{path:"/changelog",name:"changelog",meta:{title:(0,h.__)("Changelog","wpide")},icon:"ni-notes-alt",component:function(){return n.e(1451).then(n.bind(n,95860))}},{path:"/account",name:"account",meta:{title:(0,h.__)("Account","wpide")},icon:"user-alt"},{path:"/premium",name:"premium",meta:{title:(0,h.__)("Premium Version Required","wpide")},icon:"ni-lock bg-danger-dim",component:function(){return n.e(8106).then(n.bind(n,99707))}},{path:"*",name:"404",meta:{title:(0,h.__)("Not found","wpide")},icon:"ni-sad bg-danger-dim",component:function(){return n.e(9810).then(n.bind(n,83921))}}]);const g=new d.Ay({mode:"hash",routes:m});var v=n(45929),b=(n(50113),n(64346),n(44114),n(20116),n(95353)),w=n(2543),k=n(7180),_=(n(25276),n(48598),n(72712),n(94490),n(34782),n(60739),n(18237),n(69112),n(33110),n(9868),n(79432),n(78459),n(13611),n(13531)),C=n(40001),S=n(93956),y={computed:{premium:function(){return!!window.WPIDE.premium},isPremiumVersion:function(){return!!window.WPIDE.is_premium_version},showFreemiusMenus:function(){return window.WPIDE.show_freemius_menus},showLicenseMenu:function(){return this.showFreemiusMenus&&this.isPremiumVersion},isLicenseActive:function(){return!!window.WPIDE.is_license_active},plan:function(){return window.WPIDE.plan||{pro:this.premium,tier:0,plan:"",features:{}}},appDom:function(){return this.$root.$children[0].$refs.app},pageTitle:function(){return this.$route.meta.title||this.$route.name},pageIcon:function(){var e;e=this.getConfig("general.dark_mode")?"icon ni bg-primary text-white":"icon ni bg-primary-dim";var t=this.$route.matched.length?this.$route.matched[0].name:null,n=this.findRoute(this.$route.name)||this.findRoute(t);return n?n.icon+" "+e:null},assetsUrl:function(){return window.WPIDE.assets_url},imagesUrl:function(){return window.WPIDE.images_url},isLoading:function(){return this.$store.state.loading},isModalActive:function(){return this.$store.state.modal.enabled},upgradeUrl:function(){var e=window.WPIDE.account_links.find(function(e){return"_pricing"===e.id});return e?e.url:null}},methods:{__:function(e,t){return(0,h.__)(e,t)},sprintf:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return h.nv.apply(void 0,[e].concat(n))},loading:function(){this.$store.commit("setLoading",!0)},idle:function(){this.$store.commit("setLoading",!1)},findRoute:function(e){var t=m.find(function(t){return t.name===e});return t||null},getPremiumMessageData:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(this.premium&&this.plan.tier>0){var n=t?this.planFor(t):"";return{title:(0,h.__)("Upgrade your plan","wpide"),message:n?(0,h.nv)((0,h.__)("This is part of WPIDE %1$s and up. This site is on WPIDE %2$s.","wpide"),n,this.plan.plan):(0,h.nv)((0,h.__)("This is part of a higher WPIDE plan. This site is on WPIDE %s.","wpide"),this.plan.plan),button:this.upgradeUrl?n?(0,h.nv)((0,h.__)("Upgrade to %s","wpide"),n):(0,h.__)("See plans","wpide"):null,buttonCallback:this.upgradeUrl?function(){location.href=e.upgradeUrl}:null,secondaryButton:(0,h.__)("Activate license","wpide"),secondaryButtonCallback:function(){e.openLicenseActivation()}}}var i={title:(0,h.__)("Premium Version Required","wpide"),message:(0,h.__)("It looks like you’re trying to access a feature that requires the Premium Version.","wpide"),button:this.upgradeUrl?this.isPremiumVersion?(0,h.__)("Buy License","wpide"):(0,h.__)("Unlock Access","wpide"):null,buttonCallback:this.upgradeUrl?function(){location.href=e.upgradeUrl}:null,secondaryButton:(0,h.__)("More info","wpide"),secondaryButtonCallback:function(){location.href="https://wpide.com"}};return this.isPremiumVersion&&document.querySelector(".activate-license.wpide a")&&(i.message+=" "+(0,h.__)("If you already have a license key, please activate it.","wpide"),i.secondaryButton=(0,h.__)("Activate License","wpide"),i.secondaryButtonCallback=function(){document.querySelector(".activate-license.wpide a").click()}),i},showModalPrompt:function(e,t,n,i){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=this.$createElement,o=s("input",{class:{"form-control":!0},domProps:(0,k.A)({maxlength:100,required:!1},t),on:{input:function(e){self.value=e.target.value}}}),r=s("div",{class:["form-group"]},[s("label",{class:["form-label"]},[e]),s("div",{class:["form-control-wrap"]},[o])]);this.showModal("","Modal/ModalBody",{node:r},(0,k.A)({hideHeader:!0,okTitle:n,okOnly:!1,ok:function(){i(o.elm.value)}},a))},showModalConfirm:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.showModal((0,h.__)("Confirmation","wpide"),"Modal/ModalBody",{body:(0,h.__)("Are you sure you want to do this?","wpide")},(0,k.A)({okVariant:"danger",okTitle:e,okOnly:!1,ok:t},n))},showModalDialog:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{};this.showModal(e,"Modal/ModalBody",{body:t},(0,k.A)({okTitle:n,ok:i,okOnly:!a,cancelTitle:a,cancel:s},o))},openLicenseActivation:function(e){var t=document.querySelector(".activate-license.wpide a"),n=(window.WPIDE.account_links||[]).find(function(e){return"account"===e.id});(t||n)&&(e&&e.preventDefault(),t?t.click():location.href=n.url)},showPremiumFeatureModal:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t="string"==typeof e?e:"";e="string"==typeof e?{}:e;var n=this.getPremiumMessageData(t);this.showModalDialog(n.title,n.message,n.button,n.buttonCallback,n.secondaryButton,n.secondaryButtonCallback,e)},showModal:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this.$store.commit("setModal",{enabled:!0,title:e,component:t,props:n,args:(0,k.A)({size:"sm",buttonSize:"md",footerClass:"modal-footer-sm bg-light",cancelTitle:(0,h.__)("Cancel","wpide"),okOnly:!0},i)})},showExistingModal:function(){this.$store.commit("showModal")},componentModalExists:function(e){return this.$store.state.modal.component===e},hideModal:function(){this.$store.commit("hideModal")},updateModal:function(e,t){this.$store.commit("updateModal",{title:e,args:t})},is:function(e){return this.$store.state.user.role==e},can:function(e){return this.$store.getters.hasPermissions(e)},formatBytes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(0===e)return"0 Bytes";var n=t<0?0:t,i=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,i)).toFixed(n))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]},formatDate:function(e){return(0,_.A)((0,C.A)(e),new Date)},isString:function(e){return"string"==typeof e||e instanceof String},isNumeric:function(e){var t=[" ","\n","\r","\t","\f","\v"," "," "," "," "," "," "," "," "," "," "," "," ","","\u2028","\u2029"," "].join("");return("number"==typeof e||"string"==typeof e&&-1===t.indexOf(e.slice(-1)))&&""!==e&&!isNaN(e)},checkUser:function(){var e=this;return S.A.getUser().then(function(t){t&&t.username!==P.state.user.username&&e.$store.commit("destroyUser",t)})},planAllows:function(e){var t=this.plan.features&&this.plan.features[e];return t?!!t.allowed:this.premium},planBadge:function(e){return this.planAllows(e)?"":this.premium&&this.planFor(e)?this.planFor(e).toUpperCase():"PRO"},planFor:function(e){var t=this.plan.features&&this.plan.features[e];return t?t.plan:""},handleError:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=(0,h.__)("Something went wrong!","wpide");if(e&&"string"==typeof e)i=e;else if(e&&e.response&&e.response.data&&e.response.data.data){var a=e.response.data.data;i="object"===(0,v.A)(a)&&a.message?a.message:a}this.$bvToast.toast(i,{title:null,variant:"is-danger",toaster:"b-toaster-bottom-right",duration:5e3,appendToast:n,noAutoHide:!t})},handleSuccess:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.$bvToast.hide(),this.$bvToast.toast(e,{title:null,variant:"is-success",toaster:"b-toaster-bottom-right",bodyClass:"",duration:5e3,appendToast:n,noAutoHide:!t})},capitalize:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},goTo:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.$router.push(this.routePath(e,t,n)).catch(function(){})},routePath:function(e){return{name:e,query:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},params:arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}}},pluginInfo:function(e){return P.state.plugin.hasOwnProperty(e)?P.state.plugin[e]:null},cloneObj:function(e){return JSON.parse(JSON.stringify(e))},isFullscreen:function(){return this.$fullscreen.isFullscreen},toggleFullscreen:function(){this.$fullscreen.toggle()},getRootFolderName:function(){return"/"===this.getConfig("file.root","/")?window.WPIDE.fm_wp_dir:this.getConfig("file.root").split("/").reverse()[0]},getConfigField:function(e){e=Array.isArray(e)?e:e.split(".");for(var t=window.WPIDE.config_fields,n=e.shift();void 0!==n;){if("object"!==(0,v.A)(t))return t;if(!t.hasOwnProperty(n))return null;t=t[n],n=e.shift()}return t},getDefaultConfig:function(e){e=Array.isArray(e)?e:e.split(".");for(var t=P.state.defaultConfig,n=e.shift();void 0!==n;){if("object"!==(0,v.A)(t))return t;if(!t.hasOwnProperty(n))return null;t=t[n],n=e.shift()}return t},getConfig:function(e,t){t=void 0!==t?t:this.getDefaultConfig(e);var n=this.getConfigField(e);if(n&&n.hasOwnProperty("premium")&&!this.premium)return t;e=Array.isArray(e)?e:e.split(".");for(var i=P.state.config,a=e.shift();void 0!==a;){if("object"!==(0,v.A)(i))return i;if(!i.hasOwnProperty(a))return t;i=i[a],a=e.shift()}return i},configIs:function(e,t){return this.getConfig(e)===t},updateConfig:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=P.state.config,a=e.split("."),s=a.pop();if(a.reduce(function(e,t){return e[t]=e[t]||{}},i)[s]=t,this.$store.commit("setConfig",i),n)return S.A.updateConfig(e,t)}}};const M=y;a.default.use(b.Ay);const P=new b.Ay.Store({state:{loading:!1,initialized:!1,config:{},defaultConfig:{},plugin:{},user:{role:"guest",permissions:[],name:"",username:""},cwd:{location:"/",content:[]},tree:{},downloads:[],modal:{enabled:!1,title:"",component:null,props:{},args:{}},imageEditorEnabled:!1},getters:{hasPermissions:function(e){return function(t){return Array.isArray(t)?(0,w.intersection)(e.user.permissions,t).length==t.length:!!e.user.permissions.find(function(e){return e==t})}}},mutations:{initialize:function(e){this.commit("resetCwd"),this.commit("resetTree"),this.commit("destroyUser"),e.initialized=!0},resetCwd:function(e){e.cwd={location:"/",content:[]}},resetTree:function(e){e.tree={path:"/",name:M.methods.getRootFolderName(),children:[],type:"dir"}},setLoading:function(e,t){e.loading=t},setPluginInfo:function(e,t){e.plugin=t},setConfig:function(e,t){e.config=t},setDefaultConfig:function(e,t){e.defaultConfig=t},setUser:function(e,t){e.user=t},destroyUser:function(e){e.user={role:"guest",permissions:[],name:"",username:""}},setCwd:function(e,t){e.cwd.location=t.location,e.cwd.content=[],(0,w.sortBy)(t.content,[function(e){return e.type.toLowerCase()}]).forEach(function(t){e.cwd.content.push(t)})},updateTreeNode:function(e,t){var n=function(e){for(var i in e)if(e.hasOwnProperty(i)){if("path"===i&&e[i]===t.path)return void Object.assign(e,{path:t.path,children:t.children});"object"===(0,v.A)(e[i])&&n(e[i])}};n(e.tree)},setModal:function(e,t){e.modal=t},showModal:function(e){e.modal.title&&e.modal.component&&(e.modal.enabled=!0)},hideModal:function(e){e.modal.enabled=!1},updateModal:function(e,t){t.title&&(e.modal.title=t.title),t.args&&(e.modal.args=Object.assign({},e.modal.args,t.args))},setImageEditorEnabled:function(e,t){e.imageEditorEnabled=t}}});var j=n(38292),F=n(55448),A=n.n(F),E=n(18418),D=n.n(E),I=n(17318),L=n(12206),T=n.n(L);n(59313);a.default.config.productionTip=!1,a.default.config.baseURL=window.WPIDE.ajax_url;var $=function(e){return document.querySelector('#toplevel_page_wpide li a[href*="page='.concat(window.WPIDE.plugin.slug,"#").concat(e,'"]'))};a.default.use(j.vGs),a.default.use(I.Ay,{preLoad:1.3}),a.default.use(D(),{sessionKey:window.WPIDE.plugin.slug+"SessionKey"}),a.default.use(A(),{instances:[{name:window.WPIDE.plugin.slug,storeName:"folder_sizes"}]}),a.default.use(T()),a.default.mixin(M),g.afterEach(function(e,t){a.default.nextTick(function(){document.title=window.WPIDE.plugin.name+(e.meta.title?" | "+e.meta.title:"");var n=$(e.path),i=t&&t.path?$(t.path):null;n&&t&&t.name&&document.body.classList.contains(t.name)&&(document.body.classList.remove(t.name),i&&i.closest("li").classList.remove("current")),n&&e.name&&!document.body.classList.contains(e.name)&&(document.body.classList.add(e.name),n.closest("li").classList.add("current"))})}),new a.default({router:g,store:P,data:function(){return{adminMenuScrolling:!1}},watch:{"$route.name":function(e,t){var n=this;"settings"===t&&"settings"!==e&&S.A.getConfig().then(function(e){n.updateConfig("file.root",e.data.data.config.file.root,!1)}).catch(function(){})}},created:function(){this.init()},mounted:function(){document.body.addEventListener("wpide_error",this.onError,!1)},beforeDestroy:function(){document.body.removeEventListener("wpide_error",this.onError,!1)},methods:{init:function(){this.loading(),this.$store.commit("setPluginInfo",window.WPIDE.plugin),this.loadConfig(),this.fixWpMenu()},loadConfig:function(){var e=this;return S.A.getConfig().then(function(t){e.$store.commit("setConfig",t.data.data.config),e.$store.commit("setDefaultConfig",t.data.data.defaults),S.A.getUser().then(function(t){e.$store.commit("initialize"),e.$store.commit("setUser",t)}).catch(function(t){console.log(t),e.$bvToast.toast((0,h.__)("Something went wrong!","wpide"),{title:(0,h.__)("Error","wpide"),variant:"danger",toaster:"b-toaster-bottom-right",appendToast:!1})})}).catch(function(t){console.log(t),e.$bvToast.toast((0,h.__)("Something went wrong!","wpide"),{title:(0,h.__)("Error","wpide"),variant:"danger",toaster:"b-toaster-bottom-right",appendToast:!0})}).finally(function(){e.idle()})},fixWpMenu:function(){var e=document.getElementById("adminmenuwrap"),t=document.getElementById("adminmenu"),n=document.getElementById("wpcontent"),a=document.querySelector('#toplevel_page_wpide li a[href="#divider"]');a&&!a.closest("li").nextSibling&&a.remove(),document.querySelectorAll('#toplevel_page_wpide li a[href*="page="]').forEach(function(e){try{var t=new URL(e.href,window.location.origin),n=t.searchParams.get("page");if(!n)return;var a=n.split("#"),s=(0,i.A)(a,2),o=s[0],r=s[1];if(o!==window.WPIDE.plugin.slug||!r)return;t.searchParams.set("page",o),t.hash=r.startsWith("/")?r:"/".concat(r),e.href=t.toString()}catch(e){console.log(e)}}),t.addEventListener("mouseover",function(){e.classList.add("hover")}),t.addEventListener("mouseleave",function(){e.classList.remove("hover")}),n.addEventListener("mouseover",function(){e.classList.remove("hover")}),this.premium||m.filter(function(e){return e.hasOwnProperty("premium")&&e.premium}).forEach(function(e){var t=$(e.path);t&&t.closest("li").classList.add("premium")})},onError:function(e){this.handleError(e.detail),this.idle()}},render:function(e){return e(u)}}).$mount("#wpide-app")},87608(e,t,n){n.p=window.WPIDE.assets_url},46971(e,t,n){var i={"./ConfigManager/ConstantForm":[3908,[3729]],"./ConfigManager/ConstantForm.vue":[3908,[3729]],"./ConfigManager/ListItem":[24809,[5890]],"./ConfigManager/ListItem.vue":[24809,[5890]],"./DbManager/SearchReplace":[19650,[93]],"./DbManager/SearchReplace.vue":[19650,[93]],"./DbManager/Table":[41361,[3653]],"./DbManager/Table.vue":[41361,[3653]],"./DbManager/TableRowForm":[51117,[869]],"./DbManager/TableRowForm.vue":[51117,[869]],"./DbManager/TablesTree":[334,[9444]],"./DbManager/TablesTree.vue":[334,[9444]],"./DbManager/easy-table-dark.less":[38113,[8119]],"./DbManager/easy-table-default.less":[83528,[2888]],"./FileManager/AceEditor":[60967,[139]],"./FileManager/AceEditor.vue":[60967,[139]],"./FileManager/CodeDiff":[12829,[8641]],"./FileManager/CodeDiff.vue":[12829,[8641]],"./FileManager/Download":[11794,[8979]],"./FileManager/Download.vue":[11794,[8979]],"./FileManager/Editor":[75688,[1632]],"./FileManager/Editor.vue":[75688,[1632]],"./FileManager/FilesItemActions":[84267,[4574]],"./FileManager/FilesItemActions.vue":[84267,[4574]],"./FileManager/FilesList":[204,[5776]],"./FileManager/FilesList.vue":[204,[5776]],"./FileManager/FilesListItem":[95421,[1869]],"./FileManager/FilesListItem.vue":[95421,[1869]],"./FileManager/FilesPreview":[7238,[4228]],"./FileManager/FilesPreview.vue":[7238,[4228]],"./FileManager/Gallery":[68713,[559]],"./FileManager/Gallery.vue":[68713,[559]],"./FileManager/GridView":[47799,[5388]],"./FileManager/GridView.vue":[47799,[5388]],"./FileManager/GroupView":[94372,[9111]],"./FileManager/GroupView.vue":[94372,[9111]],"./FileManager/ImageEditor":[48337,[2857]],"./FileManager/ImageEditor.vue":[48337,[2857]],"./FileManager/ListView":[80573,[1100]],"./FileManager/ListView.vue":[80573,[1100]],"./FileManager/MediaPlayer":[39114,[3582]],"./FileManager/MediaPlayer.vue":[39114,[3582]],"./FileManager/SortDropdown":[36565,[4404]],"./FileManager/SortDropdown.vue":[36565,[4404]],"./FileManager/Tree":[2591,[3287]],"./FileManager/Tree.vue":[2591,[3287]],"./FileManager/TreeNode":[41322,[2351]],"./FileManager/TreeNode.vue":[41322,[2351]],"./FileManager/Upload":[79002,[940]],"./FileManager/Upload.vue":[79002,[940]],"./Header":[79987,[]],"./Header.vue":[79987,[]],"./ImageOptimizer/MediaOptimizer":[87313,[2667]],"./ImageOptimizer/MediaOptimizer.vue":[87313,[2667]],"./Loading":[67427,[]],"./Loading.vue":[67427,[]],"./Modal/Modal":[91445,[]],"./Modal/Modal.vue":[91445,[]],"./Modal/ModalBody":[46307,[3914]],"./Modal/ModalBody.vue":[46307,[3914]],"./Settings/SettingControl":[64132,[1962]],"./Settings/SettingControl.vue":[64132,[1962]],"./Settings/SettingControlRepeater":[53027,[2766]],"./Settings/SettingControlRepeater.vue":[53027,[2766]],"./Settings/SettingFields":[80793,[6148]],"./Settings/SettingFields.vue":[80793,[6148]],"./Settings/SettingFoldersControl":[74024,[6109]],"./Settings/SettingFoldersControl.vue":[74024,[6109]],"./Snippets/AiAssistant":[67743,[4868]],"./Snippets/AiAssistant.vue":[67743,[4868]],"./Snippets/AiCredits":[70389,[8986]],"./Snippets/AiCredits.vue":[70389,[8986]],"./Snippets/Cloud":[54003,[2001]],"./Snippets/Cloud.vue":[54003,[2001]],"./Snippets/CodeEditor":[96198,[5618]],"./Snippets/CodeEditor.vue":[96198,[5618]],"./Snippets/ConditionValue":[3600,[4712]],"./Snippets/ConditionValue.vue":[3600,[4712]],"./Snippets/ConditionsBuilder":[81020,[7821]],"./Snippets/ConditionsBuilder.vue":[81020,[7821]],"./Snippets/EventLog":[95986,[1568]],"./Snippets/EventLog.vue":[95986,[1568]],"./Snippets/GeneratorField":[88665,[1143]],"./Snippets/GeneratorField.vue":[88665,[1143]],"./Snippets/Generators":[68303,[2160]],"./Snippets/Generators.vue":[68303,[2160]],"./Snippets/GlobalScripts":[48341,[3181]],"./Snippets/GlobalScripts.vue":[48341,[3181]],"./Snippets/ImportExport":[25559,[3307]],"./Snippets/ImportExport.vue":[25559,[3307]],"./Snippets/Library":[29683,[5779]],"./Snippets/Library.vue":[29683,[5779]],"./Snippets/LibraryAuthor":[58998,[7118]],"./Snippets/LibraryAuthor.vue":[58998,[7118]],"./Snippets/LibraryMine":[40400,[7630]],"./Snippets/LibraryMine.vue":[40400,[7630]],"./Snippets/LibraryPacks":[86084,[3015]],"./Snippets/LibraryPacks.vue":[86084,[3015]],"./Snippets/ProUpsell":[8103,[6724]],"./Snippets/ProUpsell.vue":[8103,[6724]],"./Snippets/PublishToLibrary":[38264,[5077]],"./Snippets/PublishToLibrary.vue":[38264,[5077]],"./Snippets/SitePreview":[91341,[5085]],"./Snippets/SitePreview.vue":[91341,[5085]],"./Snippets/SnippetEditor":[73257,[8062]],"./Snippets/SnippetEditor.vue":[73257,[8062]],"./Snippets/SnippetSettings":[65637,[8974]],"./Snippets/SnippetSettings.vue":[65637,[8974]],"./Snippets/SnippetsList":[50139,[1468]],"./Snippets/SnippetsList.vue":[50139,[1468]],"./Snippets/SnippetsModal":[60359,[2759]],"./Snippets/SnippetsModal.vue":[60359,[2759]],"./Snippets/SpecialFiles":[30097,[3960]],"./Snippets/SpecialFiles.vue":[30097,[3960]],"./Snippets/Tracking":[9829,[7433]],"./Snippets/Tracking.vue":[9829,[7433]],"./Snippets/state":[43983,[4233]],"./Snippets/state.js":[43983,[4233]]};function a(e){try{if(!n.o(i,e))return Promise.resolve().then(()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t})}catch(e){return Promise.reject(e)}var t=i[e],a=t[0];return Promise.all(t[1].map(n.e)).then(()=>n(a))}a.keys=()=>Object.keys(i),a.id=46971,e.exports=a}},a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={id:e,loaded:!1,exports:{}};return i[e].call(n.exports,n,n.exports,s),n.loaded=!0,n.exports}s.m=i,s.amdD=function(){throw new Error("define cannot be used indirect")},e=[],s.O=(t,n,i,a)=>{if(!n){var o=1/0;for(u=0;u<e.length;u++){for(var[n,i,a]=e[u],r=!0,c=0;c<n.length;c++)(!1&a||o>=a)&&Object.keys(s.O).every(e=>s.O[e](n[c]))?n.splice(c--,1):(r=!1,a<o&&(o=a));if(r){e.splice(u--,1);var l=i();void 0!==l&&(t=l)}}return t}a=a||0;for(var u=e.length;u>0&&e[u-1][2]>a;u--)e[u]=e[u-1];e[u]=[n,i,a]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce((t,n)=>(s.f[n](e,t),t),[])),s.u=e=>3729===e?"js/chunks/ConfigManager/ConfigManager-ConstantForm.js?_hash=a4f65519":5890===e?"js/chunks/ConfigManager/ConfigManager-ListItem.js?_hash=5a8cf4d0":93===e?"js/chunks/DbManager/DbManager-SearchReplace.js?_hash=04840746":3653===e?"js/chunks/DbManager/DbManager-Table.js?_hash=8b35df83":869===e?"js/chunks/DbManager/DbManager-TableRowForm.js?_hash=b2785fbd":9444===e?"js/chunks/DbManager/DbManager-TablesTree.js?_hash=901bdc80":8119===e?"js/chunks/DbManager/DbManager-easy-table-dark-less.js?_hash=a0e86b7d":2888===e?"js/chunks/DbManager/DbManager-easy-table-default-less.js?_hash=93c67a88":139===e?"js/chunks/FileManager/FileManager-AceEditor.js?_hash=9487dff7":8641===e?"js/chunks/FileManager/FileManager-CodeDiff.js?_hash=800b8dfa":8979===e?"js/chunks/FileManager/FileManager-Download.js?_hash=3c6e1958":1632===e?"js/chunks/FileManager/FileManager-Editor.js?_hash=1422a8f5":4574===e?"js/chunks/FileManager/FileManager-FilesItemActions.js?_hash=bb0408e1":5776===e?"js/chunks/FileManager/FileManager-FilesList.js?_hash=c7f6672e":1869===e?"js/chunks/FileManager/FileManager-FilesListItem.js?_hash=a4d41b2e":4228===e?"js/chunks/FileManager/FileManager-FilesPreview.js?_hash=36bd2bd6":559===e?"js/chunks/FileManager/FileManager-Gallery.js?_hash=bf4dd1c6":5388===e?"js/chunks/FileManager/FileManager-GridView.js?_hash=e1d4358b":9111===e?"js/chunks/FileManager/FileManager-GroupView.js?_hash=dc6fe02e":2857===e?"js/chunks/FileManager/FileManager-ImageEditor.js?_hash=22808d70":1100===e?"js/chunks/FileManager/FileManager-ListView.js?_hash=7890d082":3582===e?"js/chunks/FileManager/FileManager-MediaPlayer.js?_hash=c91dc8f4":4404===e?"js/chunks/FileManager/FileManager-SortDropdown.js?_hash=57ab5fa6":3287===e?"js/chunks/FileManager/FileManager-Tree.js?_hash=f0352578":2351===e?"js/chunks/FileManager/FileManager-TreeNode.js?_hash=2b5f9942":940===e?"js/chunks/FileManager/FileManager-Upload.js?_hash=de2bb2dc":2667===e?"js/chunks/ImageEditor/ImageEditor-MediaOptimizer.js?_hash=eec2f86a":3914===e?"js/chunks/Modal/Modal-ModalBody.js?_hash=ccb937cd":1962===e?"js/chunks/Settings/Settings-SettingControl.js?_hash=42083002":2766===e?"js/chunks/Settings/Settings-SettingControlRepeater.js?_hash=ad93aec1":6148===e?"js/chunks/Settings/Settings-SettingFields.js?_hash=64c68acf":6109===e?"js/chunks/Settings/Settings-SettingFoldersControl.js?_hash=a10a9a4b":4868===e?"js/chunks/Snippets/Snippets-AiAssistant.js?_hash=6e4c37c3":8986===e?"js/chunks/Snippets/Snippets-AiCredits.js?_hash=52577121":2001===e?"js/chunks/Snippets/Snippets-Cloud.js?_hash=8b80b911":5618===e?"js/chunks/Snippets/Snippets-CodeEditor.js?_hash=0dedb086":4712===e?"js/chunks/Snippets/Snippets-ConditionValue.js?_hash=c46920ef":7821===e?"js/chunks/Snippets/Snippets-ConditionsBuilder.js?_hash=0451a772":1568===e?"js/chunks/Snippets/Snippets-EventLog.js?_hash=fff0ec10":1143===e?"js/chunks/Snippets/Snippets-GeneratorField.js?_hash=713cb365":2160===e?"js/chunks/Snippets/Snippets-Generators.js?_hash=f84764a6":3181===e?"js/chunks/Snippets/Snippets-GlobalScripts.js?_hash=8327c255":3307===e?"js/chunks/Snippets/Snippets-ImportExport.js?_hash=7c230823":5779===e?"js/chunks/Snippets/Snippets-Library.js?_hash=a4bf77b9":7118===e?"js/chunks/Snippets/Snippets-LibraryAuthor.js?_hash=2d04347a":7630===e?"js/chunks/Snippets/Snippets-LibraryMine.js?_hash=9f859f53":3015===e?"js/chunks/Snippets/Snippets-LibraryPacks.js?_hash=2a3b8de1":6724===e?"js/chunks/Snippets/Snippets-ProUpsell.js?_hash=24c83125":5077===e?"js/chunks/Snippets/Snippets-PublishToLibrary.js?_hash=2162fcb1":5085===e?"js/chunks/Snippets/Snippets-SitePreview.js?_hash=b7643a5f":8062===e?"js/chunks/Snippets/Snippets-SnippetEditor.js?_hash=d348549d":8974===e?"js/chunks/Snippets/Snippets-SnippetSettings.js?_hash=c81dc9da":1468===e?"js/chunks/Snippets/Snippets-SnippetsList.js?_hash=ef1ebab5":2759===e?"js/chunks/Snippets/Snippets-SnippetsModal.js?_hash=44479fdc":3960===e?"js/chunks/Snippets/Snippets-SpecialFiles.js?_hash=cd3c301c":7433===e?"js/chunks/Snippets/Snippets-Tracking.js?_hash=3aeea0a7":4233===e?"js/chunks/Snippets/Snippets-state.js?_hash=b063f01e":3910===e?"js/chunks/FileManager/FileManager.js?_hash=9a22fcaf":5857===e?"js/chunks/ImageEditor/ImageEditor.js?_hash=4e00092e":7606===e?"js/chunks/DbManager/DbManager.js?_hash=d5abd051":4154===e?"js/chunks/ConfigManager/ConfigManager.js?_hash=ea23fc81":8165===e?"js/chunks/Snippets/Snippets.js?_hash=c52a4ed1":8248===e?"js/chunks/Settings/Settings.js?_hash=796a71bb":1451===e?"js/chunks/Changelog/Changelog.js?_hash=6619157a":8106===e?"js/chunks/Premium/Premium.js?_hash=2f025a2e":9810===e?"js/chunks/NotFound/NotFound.js?_hash=d7621959":void 0,s.miniCssF=e=>"css/"+{93:"DbManager-SearchReplace",559:"FileManager-Gallery",869:"DbManager-TableRowForm",940:"FileManager-Upload",1100:"FileManager-ListView",1451:"Changelog",1468:"Snippets-SnippetsList",1568:"Snippets-EventLog",1632:"FileManager-Editor",1869:"FileManager-FilesListItem",2001:"Snippets-Cloud",2160:"Snippets-Generators",2351:"FileManager-TreeNode",2667:"ImageEditor-MediaOptimizer",2766:"Settings-SettingControlRepeater",2857:"FileManager-ImageEditor",2888:"DbManager-easy-table-default-less",3015:"Snippets-LibraryPacks",3181:"Snippets-GlobalScripts",3287:"FileManager-Tree",3307:"Snippets-ImportExport",3582:"FileManager-MediaPlayer",3653:"DbManager-Table",3910:"FileManager",3960:"Snippets-SpecialFiles",4154:"ConfigManager",4712:"Snippets-ConditionValue",4868:"Snippets-AiAssistant",5077:"Snippets-PublishToLibrary",5085:"Snippets-SitePreview",5388:"FileManager-GridView",5776:"FileManager-FilesList",5779:"Snippets-Library",5857:"ImageEditor",5890:"ConfigManager-ListItem",6148:"Settings-SettingFields",6724:"Snippets-ProUpsell",7118:"Snippets-LibraryAuthor",7433:"Snippets-Tracking",7606:"DbManager",7630:"Snippets-LibraryMine",7821:"Snippets-ConditionsBuilder",8062:"Snippets-SnippetEditor",8119:"DbManager-easy-table-dark-less",8165:"Snippets",8248:"Settings",8641:"FileManager-CodeDiff",8974:"Snippets-SnippetSettings",8986:"Snippets-AiCredits",9111:"FileManager-GroupView",9444:"DbManager-TablesTree"}[e]+".css?_hash="+{93:"dc9669cd",559:"df8dc3d1",869:"575a2b2b",940:"0fca59a8",1100:"6fd13d4a",1451:"aa0b8006",1468:"ddcd54f9",1568:"252372b6",1632:"38cd2052",1869:"213dc083",2001:"c521f1ad",2160:"52893497",2351:"72f4e5dd",2667:"1743355e",2766:"b441f6ed",2857:"3ec2db87",2888:"add0baeb",3015:"5ebbb4cc",3181:"11925062",3287:"a07fed27",3307:"2d714886",3582:"e168dcd2",3653:"2b5ffcb5",3910:"957955d9",3960:"c6e41eb8",4154:"47f12098",4712:"ac2e53cd",4868:"c28c69ad",5077:"4ab1d7ee",5085:"678ac6cd",5388:"213dc083",5776:"213dc083",5779:"ae6b65d4",5857:"b22f60eb",5890:"47f12098",6148:"eee5afa1",6724:"7cd4e7bc",7118:"96ac6417",7433:"a7008003",7606:"cd3cb312",7630:"36450039",7821:"b402d8af",8062:"573ee484",8119:"e73dfc75",8165:"f5630ceb",8248:"8f3e7e14",8641:"4c56bde8",8974:"411dacbe",8986:"08a77d11",9111:"213dc083",9444:"dbd48afc"}[e],s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},n="wpide:",s.l=(e,i,a,o)=>{if(t[e])t[e].push(i);else{var r,c;if(void 0!==a)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var d=l[u];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==n+a){r=d;break}}r||(c=!0,(r=document.createElement("script")).charset="utf-8",s.nc&&r.setAttribute("nonce",s.nc),r.setAttribute("data-webpack",n+a),r.src=e),t[e]=[i];var p=(n,i)=>{r.onerror=r.onload=null,clearTimeout(h);var a=t[e];if(delete t[e],r.parentNode&&r.parentNode.removeChild(r),a&&a.forEach(e=>e(i)),n)return n(i)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=p.bind(null,r.onerror),r.onload=p.bind(null,r.onload),c&&document.head.appendChild(r)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),s.p="",(()=>{if("undefined"!=typeof document){var e=e=>new Promise((t,n)=>{var i=s.miniCssF(e),a=s.p+i;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),i=0;i<n.length;i++){var a=(o=n[i]).getAttribute("data-href")||o.getAttribute("href");if("stylesheet"===o.rel&&(a===e||a===t))return o}var s=document.getElementsByTagName("style");for(i=0;i<s.length;i++){var o;if((a=(o=s[i]).getAttribute("data-href"))===e||a===t)return o}})(i,a))return t();((e,t,n,i,a)=>{var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",s.nc&&(o.nonce=s.nc),o.onerror=o.onload=n=>{if(o.onerror=o.onload=null,"load"===n.type)i();else{var s=n&&n.type,r=n&&n.target&&n.target.href||t,c=new Error("Loading CSS chunk "+e+" failed.\n("+s+": "+r+")");c.name="ChunkLoadError",c.code="CSS_CHUNK_LOAD_FAILED",c.type=s,c.request=r,o.parentNode&&o.parentNode.removeChild(o),a(c)}},o.href=t,n?n.parentNode.insertBefore(o,n.nextSibling):document.head.appendChild(o)})(e,a,null,t,n)}),t={3524:0};s.f.miniCss=(n,i)=>{t[n]?i.push(t[n]):0!==t[n]&&{93:1,559:1,869:1,940:1,1100:1,1451:1,1468:1,1568:1,1632:1,1869:1,2001:1,2160:1,2351:1,2667:1,2766:1,2857:1,2888:1,3015:1,3181:1,3287:1,3307:1,3582:1,3653:1,3910:1,3960:1,4154:1,4712:1,4868:1,5077:1,5085:1,5388:1,5776:1,5779:1,5857:1,5890:1,6148:1,6724:1,7118:1,7433:1,7606:1,7630:1,7821:1,8062:1,8119:1,8165:1,8248:1,8641:1,8974:1,8986:1,9111:1,9444:1}[n]&&i.push(t[n]=e(n).then(()=>{t[n]=0},e=>{throw delete t[n],e}))}}})(),(()=>{var e={3524:0};s.f.j=(t,n)=>{var i=s.o(e,t)?e[t]:void 0;if(0!==i)if(i)n.push(i[2]);else{var a=new Promise((n,a)=>i=e[t]=[n,a]);n.push(i[2]=a);var o=s.p+s.u(t),r=new Error;s.l(o,n=>{if(s.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var a=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;r.message="Loading chunk "+t+" failed.\n("+a+": "+o+")",r.name="ChunkLoadError",r.type=a,r.request=o,i[1](r)}},"chunk-"+t,t)}},s.O.j=t=>0===e[t];var t=(t,n)=>{var i,a,[o,r,c]=n,l=0;if(o.some(t=>0!==e[t])){for(i in r)s.o(r,i)&&(s.m[i]=r[i]);if(c)var u=c(s)}for(t&&t(n);l<o.length;l++)a=o[l],s.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return s.O(u)},n=self.webpackChunkwpide=self.webpackChunkwpide||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var o=s.O(void 0,[504],()=>s(4409));o=s.O(o)})();13 redirect:window.WPIDE.premium?null:{name:"premium",query:{name:"config-manager"}},module:!0,config:null,premium:!0},{path:"/snippets",meta:{title:(0,h.__)("Snippets","wpide")},name:"snippets",icon:"ni-code",component:function(){return n.e(8165).then(n.bind(n,24235))},children:[{path:"",name:"snippets-list",meta:{title:(0,h.__)("Snippets","wpide")},component:function(){return n.e(1468).then(n.bind(n,50139))}},{path:"edit/:id?",name:"snippets-edit",meta:{title:(0,h.__)("Edit Snippet","wpide")},component:function(){return n.e(8062).then(n.bind(n,73257))}},{path:"library",name:"snippets-library",meta:{title:(0,h.__)("Snippet Library","wpide")},component:function(){return n.e(5779).then(n.bind(n,8999))}},{path:"generators",name:"snippets-generators",meta:{title:(0,h.__)("Generators","wpide")},component:function(){return n.e(2160).then(n.bind(n,68303))}},{path:"header-footer",name:"snippets-global",meta:{title:(0,h.__)("Header & Footer","wpide")},component:function(){return n.e(3181).then(n.bind(n,48341))}},{path:"files",name:"snippets-files",meta:{title:(0,h.__)("Special Files","wpide")},props:{feature:"files",page:!0},component:window.WPIDE.premium?function(){return n.e(3960).then(n.bind(n,30097))}:f},{path:"import-export",name:"snippets-import",meta:{title:(0,h.__)("Import & Export","wpide")},component:function(){return n.e(3307).then(n.bind(n,25559))}},{path:"cloud",name:"snippets-cloud",meta:{title:(0,h.__)("WPIDE Cloud","wpide")},props:{feature:"cloud",page:!0},component:window.WPIDE.premium?function(){return n.e(2001).then(n.bind(n,54003))}:f},{path:"tracking",name:"snippets-tracking",meta:{title:(0,h.__)("Conversion Tracking","wpide")},props:{feature:"tracking",page:!0},component:window.WPIDE.premium?function(){return n.e(7433).then(n.bind(n,9829))}:f},{path:"log",name:"snippets-log",meta:{title:(0,h.__)("Snippet Log","wpide")},component:function(){return n.e(1568).then(n.bind(n,95986))}},{path:"settings",name:"snippets-settings",redirect:{path:"/settings",query:{tab:"snippets"}}}],redirect:{name:"snippets-list"},module:!0,config:null,settings:function(){return n.e(8974).then(n.bind(n,65637))}},{path:"/settings",name:"settings",meta:{title:(0,h.__)("Settings","wpide")},icon:"ni-setting",component:function(){return n.e(8248).then(n.bind(n,59999))}},{path:"/changelog",name:"changelog",meta:{title:(0,h.__)("Changelog","wpide")},icon:"ni-notes-alt",component:function(){return n.e(1451).then(n.bind(n,95860))}},{path:"/account",name:"account",meta:{title:(0,h.__)("Account","wpide")},icon:"user-alt"},{path:"/premium",name:"premium",meta:{title:(0,h.__)("Premium Version Required","wpide")},icon:"ni-lock bg-danger-dim",component:function(){return n.e(8106).then(n.bind(n,99707))}},{path:"*",name:"404",meta:{title:(0,h.__)("Not found","wpide")},icon:"ni-sad bg-danger-dim",component:function(){return n.e(9810).then(n.bind(n,83921))}}]);const g=new d.Ay({mode:"hash",routes:m});var v=n(45929),b=(n(50113),n(64346),n(44114),n(20116),n(95353)),w=n(2543),k=n(7180),_=(n(25276),n(48598),n(72712),n(94490),n(34782),n(60739),n(18237),n(69112),n(33110),n(9868),n(79432),n(78459),n(13611),n(13531)),C=n(40001),S=n(93956),y={computed:{premium:function(){return!!window.WPIDE.premium},isPremiumVersion:function(){return!!window.WPIDE.is_premium_version},showFreemiusMenus:function(){return window.WPIDE.show_freemius_menus},showLicenseMenu:function(){return this.showFreemiusMenus&&this.isPremiumVersion},isLicenseActive:function(){return!!window.WPIDE.is_license_active},plan:function(){return window.WPIDE.plan||{pro:this.premium,tier:0,plan:"",features:{}}},appDom:function(){return this.$root.$children[0].$refs.app},pageTitle:function(){return this.$route.meta.title||this.$route.name},pageIcon:function(){var e;e=this.getConfig("general.dark_mode")?"icon ni bg-primary text-white":"icon ni bg-primary-dim";var t=this.$route.matched.length?this.$route.matched[0].name:null,n=this.findRoute(this.$route.name)||this.findRoute(t);return n?n.icon+" "+e:null},assetsUrl:function(){return window.WPIDE.assets_url},imagesUrl:function(){return window.WPIDE.images_url},isLoading:function(){return this.$store.state.loading},isModalActive:function(){return this.$store.state.modal.enabled},upgradeUrl:function(){var e=window.WPIDE.account_links.find(function(e){return"_pricing"===e.id});return e?e.url:null}},methods:{__:function(e,t){return(0,h.__)(e,t)},sprintf:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return h.nv.apply(void 0,[e].concat(n))},loading:function(){this.$store.commit("setLoading",!0)},idle:function(){this.$store.commit("setLoading",!1)},findRoute:function(e){var t=m.find(function(t){return t.name===e});return t||null},getPremiumMessageData:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(this.premium&&this.plan.tier>0){var n=t?this.planFor(t):"";return{title:(0,h.__)("Upgrade your plan","wpide"),message:n?(0,h.nv)((0,h.__)("This is part of WPIDE %1$s and up. This site is on WPIDE %2$s.","wpide"),n,this.plan.plan):(0,h.nv)((0,h.__)("This is part of a higher WPIDE plan. This site is on WPIDE %s.","wpide"),this.plan.plan),button:this.upgradeUrl?n?(0,h.nv)((0,h.__)("Upgrade to %s","wpide"),n):(0,h.__)("See plans","wpide"):null,buttonCallback:this.upgradeUrl?function(){location.href=e.upgradeUrl}:null,secondaryButton:(0,h.__)("Activate license","wpide"),secondaryButtonCallback:function(){e.openLicenseActivation()}}}var i={title:(0,h.__)("Premium Version Required","wpide"),message:(0,h.__)("It looks like you’re trying to access a feature that requires the Premium Version.","wpide"),button:this.upgradeUrl?this.isPremiumVersion?(0,h.__)("Buy License","wpide"):(0,h.__)("Unlock Access","wpide"):null,buttonCallback:this.upgradeUrl?function(){location.href=e.upgradeUrl}:null,secondaryButton:(0,h.__)("More info","wpide"),secondaryButtonCallback:function(){location.href="https://wpide.com"}};return this.isPremiumVersion&&document.querySelector(".activate-license.wpide a")&&(i.message+=" "+(0,h.__)("If you already have a license key, please activate it.","wpide"),i.secondaryButton=(0,h.__)("Activate License","wpide"),i.secondaryButtonCallback=function(){document.querySelector(".activate-license.wpide a").click()}),i},showModalPrompt:function(e,t,n,i){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=this.$createElement,o=s("input",{class:{"form-control":!0},domProps:(0,k.A)({maxlength:100,required:!1},t),on:{input:function(e){self.value=e.target.value}}}),r=s("div",{class:["form-group"]},[s("label",{class:["form-label"]},[e]),s("div",{class:["form-control-wrap"]},[o])]);this.showModal("","Modal/ModalBody",{node:r},(0,k.A)({hideHeader:!0,okTitle:n,okOnly:!1,ok:function(){i(o.elm.value)}},a))},showModalConfirm:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.showModal((0,h.__)("Confirmation","wpide"),"Modal/ModalBody",{body:(0,h.__)("Are you sure you want to do this?","wpide")},(0,k.A)({okVariant:"danger",okTitle:e,okOnly:!1,ok:t},n))},showModalDialog:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{};this.showModal(e,"Modal/ModalBody",{body:t},(0,k.A)({okTitle:n,ok:i,okOnly:!a,cancelTitle:a,cancel:s},o))},openLicenseActivation:function(e){var t=document.querySelector(".activate-license.wpide a"),n=(window.WPIDE.account_links||[]).find(function(e){return"account"===e.id});(t||n)&&(e&&e.preventDefault(),t?t.click():location.href=n.url)},showPremiumFeatureModal:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t="string"==typeof e?e:"";e="string"==typeof e?{}:e;var n=this.getPremiumMessageData(t);this.showModalDialog(n.title,n.message,n.button,n.buttonCallback,n.secondaryButton,n.secondaryButtonCallback,e)},showModal:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this.$store.commit("setModal",{enabled:!0,title:e,component:t,props:n,args:(0,k.A)({size:"sm",buttonSize:"md",footerClass:"modal-footer-sm bg-light",cancelTitle:(0,h.__)("Cancel","wpide"),okOnly:!0},i)})},showExistingModal:function(){this.$store.commit("showModal")},componentModalExists:function(e){return this.$store.state.modal.component===e},hideModal:function(){this.$store.commit("hideModal")},updateModal:function(e,t){this.$store.commit("updateModal",{title:e,args:t})},is:function(e){return this.$store.state.user.role==e},can:function(e){return this.$store.getters.hasPermissions(e)},formatBytes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(0===e)return"0 Bytes";var n=t<0?0:t,i=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,i)).toFixed(n))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]},formatDate:function(e){return(0,_.A)((0,C.A)(e),new Date)},isString:function(e){return"string"==typeof e||e instanceof String},isNumeric:function(e){var t=[" ","\n","\r","\t","\f","\v"," "," "," "," "," "," "," "," "," "," "," "," ","","\u2028","\u2029"," "].join("");return("number"==typeof e||"string"==typeof e&&-1===t.indexOf(e.slice(-1)))&&""!==e&&!isNaN(e)},checkUser:function(){var e=this;return S.A.getUser().then(function(t){t&&t.username!==P.state.user.username&&e.$store.commit("destroyUser",t)})},planAllows:function(e){var t=this.plan.features&&this.plan.features[e];return t?!!t.allowed:this.premium},planBadge:function(e){return this.planAllows(e)?"":this.premium&&this.planFor(e)?this.planFor(e).toUpperCase():"PRO"},planFor:function(e){var t=this.plan.features&&this.plan.features[e];return t?t.plan:""},handleError:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=(0,h.__)("Something went wrong!","wpide");if(e&&"string"==typeof e)i=e;else if(e&&e.response&&e.response.data&&e.response.data.data){var a=e.response.data.data;i="object"===(0,v.A)(a)&&a.message?a.message:a}this.$bvToast.toast(i,{title:null,variant:"is-danger",toaster:"b-toaster-bottom-right",duration:5e3,appendToast:n,noAutoHide:!t})},handleSuccess:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.$bvToast.hide(),this.$bvToast.toast(e,{title:null,variant:"is-success",toaster:"b-toaster-bottom-right",bodyClass:"",duration:5e3,appendToast:n,noAutoHide:!t})},capitalize:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},goTo:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.$router.push(this.routePath(e,t,n)).catch(function(){})},routePath:function(e){return{name:e,query:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},params:arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}}},pluginInfo:function(e){return P.state.plugin.hasOwnProperty(e)?P.state.plugin[e]:null},cloneObj:function(e){return JSON.parse(JSON.stringify(e))},isFullscreen:function(){return this.$fullscreen.isFullscreen},toggleFullscreen:function(){this.$fullscreen.toggle()},getRootFolderName:function(){return"/"===this.getConfig("file.root","/")?window.WPIDE.fm_wp_dir:this.getConfig("file.root").split("/").reverse()[0]},getConfigField:function(e){e=Array.isArray(e)?e:e.split(".");for(var t=window.WPIDE.config_fields,n=e.shift();void 0!==n;){if("object"!==(0,v.A)(t))return t;if(!t.hasOwnProperty(n))return null;t=t[n],n=e.shift()}return t},getDefaultConfig:function(e){e=Array.isArray(e)?e:e.split(".");for(var t=P.state.defaultConfig,n=e.shift();void 0!==n;){if("object"!==(0,v.A)(t))return t;if(!t.hasOwnProperty(n))return null;t=t[n],n=e.shift()}return t},getConfig:function(e,t){t=void 0!==t?t:this.getDefaultConfig(e);var n=this.getConfigField(e);if(n&&n.hasOwnProperty("premium")&&!this.premium)return t;e=Array.isArray(e)?e:e.split(".");for(var i=P.state.config,a=e.shift();void 0!==a;){if("object"!==(0,v.A)(i))return i;if(!i.hasOwnProperty(a))return t;i=i[a],a=e.shift()}return i},configIs:function(e,t){return this.getConfig(e)===t},updateConfig:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=P.state.config,a=e.split("."),s=a.pop();if(a.reduce(function(e,t){return e[t]=e[t]||{}},i)[s]=t,this.$store.commit("setConfig",i),n)return S.A.updateConfig(e,t)}}};const M=y;a.default.use(b.Ay);const P=new b.Ay.Store({state:{loading:!1,initialized:!1,config:{},defaultConfig:{},plugin:{},user:{role:"guest",permissions:[],name:"",username:""},cwd:{location:"/",content:[]},tree:{},downloads:[],modal:{enabled:!1,title:"",component:null,props:{},args:{}},imageEditorEnabled:!1},getters:{hasPermissions:function(e){return function(t){return Array.isArray(t)?(0,w.intersection)(e.user.permissions,t).length==t.length:!!e.user.permissions.find(function(e){return e==t})}}},mutations:{initialize:function(e){this.commit("resetCwd"),this.commit("resetTree"),this.commit("destroyUser"),e.initialized=!0},resetCwd:function(e){e.cwd={location:"/",content:[]}},resetTree:function(e){e.tree={path:"/",name:M.methods.getRootFolderName(),children:[],type:"dir"}},setLoading:function(e,t){e.loading=t},setPluginInfo:function(e,t){e.plugin=t},setConfig:function(e,t){e.config=t},setDefaultConfig:function(e,t){e.defaultConfig=t},setUser:function(e,t){e.user=t},destroyUser:function(e){e.user={role:"guest",permissions:[],name:"",username:""}},setCwd:function(e,t){e.cwd.location=t.location,e.cwd.content=[],(0,w.sortBy)(t.content,[function(e){return e.type.toLowerCase()}]).forEach(function(t){e.cwd.content.push(t)})},updateTreeNode:function(e,t){var n=function(e){for(var i in e)if(e.hasOwnProperty(i)){if("path"===i&&e[i]===t.path)return void Object.assign(e,{path:t.path,children:t.children});"object"===(0,v.A)(e[i])&&n(e[i])}};n(e.tree)},setModal:function(e,t){e.modal=t},showModal:function(e){e.modal.title&&e.modal.component&&(e.modal.enabled=!0)},hideModal:function(e){e.modal.enabled=!1},updateModal:function(e,t){t.title&&(e.modal.title=t.title),t.args&&(e.modal.args=Object.assign({},e.modal.args,t.args))},setImageEditorEnabled:function(e,t){e.imageEditorEnabled=t}}});var j=n(38292),F=n(55448),A=n.n(F),E=n(18418),D=n.n(E),I=n(17318),L=n(12206),T=n.n(L);n(59313);a.default.config.productionTip=!1,a.default.config.baseURL=window.WPIDE.ajax_url;var $=function(e){return document.querySelector('#toplevel_page_wpide li a[href*="page='.concat(window.WPIDE.plugin.slug,"#").concat(e,'"]'))};a.default.use(j.vGs),a.default.use(I.Ay,{preLoad:1.3}),a.default.use(D(),{sessionKey:window.WPIDE.plugin.slug+"SessionKey"}),a.default.use(A(),{instances:[{name:window.WPIDE.plugin.slug,storeName:"folder_sizes"}]}),a.default.use(T()),a.default.mixin(M),g.afterEach(function(e,t){a.default.nextTick(function(){document.title=window.WPIDE.plugin.name+(e.meta.title?" | "+e.meta.title:"");var n=$(e.path),i=t&&t.path?$(t.path):null;n&&t&&t.name&&document.body.classList.contains(t.name)&&(document.body.classList.remove(t.name),i&&i.closest("li").classList.remove("current")),n&&e.name&&!document.body.classList.contains(e.name)&&(document.body.classList.add(e.name),n.closest("li").classList.add("current"))})}),new a.default({router:g,store:P,data:function(){return{adminMenuScrolling:!1}},watch:{"$route.name":function(e,t){var n=this;"settings"===t&&"settings"!==e&&S.A.getConfig().then(function(e){n.updateConfig("file.root",e.data.data.config.file.root,!1)}).catch(function(){})}},created:function(){this.init()},mounted:function(){document.body.addEventListener("wpide_error",this.onError,!1)},beforeDestroy:function(){document.body.removeEventListener("wpide_error",this.onError,!1)},methods:{init:function(){this.loading(),this.$store.commit("setPluginInfo",window.WPIDE.plugin),this.loadConfig(),this.fixWpMenu()},loadConfig:function(){var e=this;return S.A.getConfig().then(function(t){e.$store.commit("setConfig",t.data.data.config),e.$store.commit("setDefaultConfig",t.data.data.defaults),S.A.getUser().then(function(t){e.$store.commit("initialize"),e.$store.commit("setUser",t)}).catch(function(t){console.log(t),e.$bvToast.toast((0,h.__)("Something went wrong!","wpide"),{title:(0,h.__)("Error","wpide"),variant:"danger",toaster:"b-toaster-bottom-right",appendToast:!1})})}).catch(function(t){console.log(t),e.$bvToast.toast((0,h.__)("Something went wrong!","wpide"),{title:(0,h.__)("Error","wpide"),variant:"danger",toaster:"b-toaster-bottom-right",appendToast:!0})}).finally(function(){e.idle()})},fixWpMenu:function(){var e=document.getElementById("adminmenuwrap"),t=document.getElementById("adminmenu"),n=document.getElementById("wpcontent"),a=document.querySelector('#toplevel_page_wpide li a[href="#divider"]');a&&!a.closest("li").nextSibling&&a.remove(),document.querySelectorAll('#toplevel_page_wpide li a[href*="page="]').forEach(function(e){try{var t=new URL(e.href,window.location.origin),n=t.searchParams.get("page");if(!n)return;var a=n.split("#"),s=(0,i.A)(a,2),o=s[0],r=s[1];if(o!==window.WPIDE.plugin.slug||!r)return;t.searchParams.set("page",o),t.hash=r.startsWith("/")?r:"/".concat(r),e.href=t.toString()}catch(e){console.log(e)}}),t.addEventListener("mouseover",function(){e.classList.add("hover")}),t.addEventListener("mouseleave",function(){e.classList.remove("hover")}),n.addEventListener("mouseover",function(){e.classList.remove("hover")}),this.premium||m.filter(function(e){return e.hasOwnProperty("premium")&&e.premium}).forEach(function(e){var t=$(e.path);t&&t.closest("li").classList.add("premium")})},onError:function(e){this.handleError(e.detail),this.idle()}},render:function(e){return e(u)}}).$mount("#wpide-app")},87608(e,t,n){n.p=window.WPIDE.assets_url},46971(e,t,n){var i={"./ConfigManager/ConstantForm":[3908,[3729]],"./ConfigManager/ConstantForm.vue":[3908,[3729]],"./ConfigManager/ListItem":[24809,[5890]],"./ConfigManager/ListItem.vue":[24809,[5890]],"./DbManager/SearchReplace":[19650,[93]],"./DbManager/SearchReplace.vue":[19650,[93]],"./DbManager/Table":[41361,[3653]],"./DbManager/Table.vue":[41361,[3653]],"./DbManager/TableRowForm":[51117,[869]],"./DbManager/TableRowForm.vue":[51117,[869]],"./DbManager/TablesTree":[334,[9444]],"./DbManager/TablesTree.vue":[334,[9444]],"./DbManager/easy-table-dark.less":[38113,[8119]],"./DbManager/easy-table-default.less":[83528,[2888]],"./FileManager/AceEditor":[60967,[139]],"./FileManager/AceEditor.vue":[60967,[139]],"./FileManager/CodeDiff":[12829,[8641]],"./FileManager/CodeDiff.vue":[12829,[8641]],"./FileManager/Download":[11794,[8979]],"./FileManager/Download.vue":[11794,[8979]],"./FileManager/Editor":[75688,[1632]],"./FileManager/Editor.vue":[75688,[1632]],"./FileManager/FilesItemActions":[84267,[4574]],"./FileManager/FilesItemActions.vue":[84267,[4574]],"./FileManager/FilesList":[204,[5776]],"./FileManager/FilesList.vue":[204,[5776]],"./FileManager/FilesListItem":[95421,[1869]],"./FileManager/FilesListItem.vue":[95421,[1869]],"./FileManager/FilesPreview":[7238,[4228]],"./FileManager/FilesPreview.vue":[7238,[4228]],"./FileManager/Gallery":[68713,[559]],"./FileManager/Gallery.vue":[68713,[559]],"./FileManager/GridView":[47799,[5388]],"./FileManager/GridView.vue":[47799,[5388]],"./FileManager/GroupView":[94372,[9111]],"./FileManager/GroupView.vue":[94372,[9111]],"./FileManager/ImageEditor":[48337,[2857]],"./FileManager/ImageEditor.vue":[48337,[2857]],"./FileManager/ListView":[80573,[1100]],"./FileManager/ListView.vue":[80573,[1100]],"./FileManager/MediaPlayer":[39114,[3582]],"./FileManager/MediaPlayer.vue":[39114,[3582]],"./FileManager/SortDropdown":[36565,[4404]],"./FileManager/SortDropdown.vue":[36565,[4404]],"./FileManager/Tree":[2591,[3287]],"./FileManager/Tree.vue":[2591,[3287]],"./FileManager/TreeNode":[41322,[2351]],"./FileManager/TreeNode.vue":[41322,[2351]],"./FileManager/Upload":[79002,[940]],"./FileManager/Upload.vue":[79002,[940]],"./Header":[79987,[]],"./Header.vue":[79987,[]],"./ImageOptimizer/MediaOptimizer":[87313,[2667]],"./ImageOptimizer/MediaOptimizer.vue":[87313,[2667]],"./Loading":[67427,[]],"./Loading.vue":[67427,[]],"./Modal/Modal":[91445,[]],"./Modal/Modal.vue":[91445,[]],"./Modal/ModalBody":[46307,[3914]],"./Modal/ModalBody.vue":[46307,[3914]],"./Settings/SettingControl":[64132,[1962]],"./Settings/SettingControl.vue":[64132,[1962]],"./Settings/SettingControlRepeater":[53027,[2766]],"./Settings/SettingControlRepeater.vue":[53027,[2766]],"./Settings/SettingFields":[80793,[6148]],"./Settings/SettingFields.vue":[80793,[6148]],"./Settings/SettingFoldersControl":[74024,[6109]],"./Settings/SettingFoldersControl.vue":[74024,[6109]],"./Snippets/AiAssistant":[67743,[4868]],"./Snippets/AiAssistant.vue":[67743,[4868]],"./Snippets/AiCredits":[70389,[8986]],"./Snippets/AiCredits.vue":[70389,[8986]],"./Snippets/Cloud":[54003,[2001]],"./Snippets/Cloud.vue":[54003,[2001]],"./Snippets/CodeEditor":[96198,[5618]],"./Snippets/CodeEditor.vue":[96198,[5618]],"./Snippets/ConditionValue":[3600,[4712]],"./Snippets/ConditionValue.vue":[3600,[4712]],"./Snippets/ConditionsBuilder":[81020,[7821]],"./Snippets/ConditionsBuilder.vue":[81020,[7821]],"./Snippets/EventLog":[95986,[1568]],"./Snippets/EventLog.vue":[95986,[1568]],"./Snippets/GeneratorField":[88665,[1143]],"./Snippets/GeneratorField.vue":[88665,[1143]],"./Snippets/Generators":[68303,[2160]],"./Snippets/Generators.vue":[68303,[2160]],"./Snippets/GlobalScripts":[48341,[3181]],"./Snippets/GlobalScripts.vue":[48341,[3181]],"./Snippets/ImportExport":[25559,[3307]],"./Snippets/ImportExport.vue":[25559,[3307]],"./Snippets/Library":[8999,[5779]],"./Snippets/Library.vue":[8999,[5779]],"./Snippets/LibraryAuthor":[58998,[7118]],"./Snippets/LibraryAuthor.vue":[58998,[7118]],"./Snippets/LibraryMine":[40400,[7630]],"./Snippets/LibraryMine.vue":[40400,[7630]],"./Snippets/LibraryPacks":[86084,[3015]],"./Snippets/LibraryPacks.vue":[86084,[3015]],"./Snippets/ProUpsell":[8103,[6724]],"./Snippets/ProUpsell.vue":[8103,[6724]],"./Snippets/PublishToLibrary":[38264,[5077]],"./Snippets/PublishToLibrary.vue":[38264,[5077]],"./Snippets/SitePreview":[91341,[5085]],"./Snippets/SitePreview.vue":[91341,[5085]],"./Snippets/SnippetEditor":[73257,[8062]],"./Snippets/SnippetEditor.vue":[73257,[8062]],"./Snippets/SnippetSettings":[65637,[8974]],"./Snippets/SnippetSettings.vue":[65637,[8974]],"./Snippets/SnippetsList":[50139,[1468]],"./Snippets/SnippetsList.vue":[50139,[1468]],"./Snippets/SnippetsModal":[60359,[2759]],"./Snippets/SnippetsModal.vue":[60359,[2759]],"./Snippets/SpecialFiles":[30097,[3960]],"./Snippets/SpecialFiles.vue":[30097,[3960]],"./Snippets/Tracking":[9829,[7433]],"./Snippets/Tracking.vue":[9829,[7433]],"./Snippets/state":[43983,[4233]],"./Snippets/state.js":[43983,[4233]]};function a(e){try{if(!n.o(i,e))return Promise.resolve().then(()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t})}catch(e){return Promise.reject(e)}var t=i[e],a=t[0];return Promise.all(t[1].map(n.e)).then(()=>n(a))}a.keys=()=>Object.keys(i),a.id=46971,e.exports=a}},a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={id:e,loaded:!1,exports:{}};return i[e].call(n.exports,n,n.exports,s),n.loaded=!0,n.exports}s.m=i,s.amdD=function(){throw new Error("define cannot be used indirect")},e=[],s.O=(t,n,i,a)=>{if(!n){var o=1/0;for(u=0;u<e.length;u++){for(var[n,i,a]=e[u],r=!0,c=0;c<n.length;c++)(!1&a||o>=a)&&Object.keys(s.O).every(e=>s.O[e](n[c]))?n.splice(c--,1):(r=!1,a<o&&(o=a));if(r){e.splice(u--,1);var l=i();void 0!==l&&(t=l)}}return t}a=a||0;for(var u=e.length;u>0&&e[u-1][2]>a;u--)e[u]=e[u-1];e[u]=[n,i,a]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce((t,n)=>(s.f[n](e,t),t),[])),s.u=e=>3729===e?"js/chunks/ConfigManager/ConfigManager-ConstantForm.js?_hash=a4f65519":5890===e?"js/chunks/ConfigManager/ConfigManager-ListItem.js?_hash=5a8cf4d0":93===e?"js/chunks/DbManager/DbManager-SearchReplace.js?_hash=04840746":3653===e?"js/chunks/DbManager/DbManager-Table.js?_hash=8b35df83":869===e?"js/chunks/DbManager/DbManager-TableRowForm.js?_hash=b2785fbd":9444===e?"js/chunks/DbManager/DbManager-TablesTree.js?_hash=901bdc80":8119===e?"js/chunks/DbManager/DbManager-easy-table-dark-less.js?_hash=a0e86b7d":2888===e?"js/chunks/DbManager/DbManager-easy-table-default-less.js?_hash=93c67a88":139===e?"js/chunks/FileManager/FileManager-AceEditor.js?_hash=9487dff7":8641===e?"js/chunks/FileManager/FileManager-CodeDiff.js?_hash=800b8dfa":8979===e?"js/chunks/FileManager/FileManager-Download.js?_hash=3c6e1958":1632===e?"js/chunks/FileManager/FileManager-Editor.js?_hash=1422a8f5":4574===e?"js/chunks/FileManager/FileManager-FilesItemActions.js?_hash=bb0408e1":5776===e?"js/chunks/FileManager/FileManager-FilesList.js?_hash=c7f6672e":1869===e?"js/chunks/FileManager/FileManager-FilesListItem.js?_hash=a4d41b2e":4228===e?"js/chunks/FileManager/FileManager-FilesPreview.js?_hash=36bd2bd6":559===e?"js/chunks/FileManager/FileManager-Gallery.js?_hash=bf4dd1c6":5388===e?"js/chunks/FileManager/FileManager-GridView.js?_hash=e1d4358b":9111===e?"js/chunks/FileManager/FileManager-GroupView.js?_hash=dc6fe02e":2857===e?"js/chunks/FileManager/FileManager-ImageEditor.js?_hash=22808d70":1100===e?"js/chunks/FileManager/FileManager-ListView.js?_hash=7890d082":3582===e?"js/chunks/FileManager/FileManager-MediaPlayer.js?_hash=c91dc8f4":4404===e?"js/chunks/FileManager/FileManager-SortDropdown.js?_hash=57ab5fa6":3287===e?"js/chunks/FileManager/FileManager-Tree.js?_hash=f0352578":2351===e?"js/chunks/FileManager/FileManager-TreeNode.js?_hash=2b5f9942":940===e?"js/chunks/FileManager/FileManager-Upload.js?_hash=de2bb2dc":2667===e?"js/chunks/ImageEditor/ImageEditor-MediaOptimizer.js?_hash=eec2f86a":3914===e?"js/chunks/Modal/Modal-ModalBody.js?_hash=ccb937cd":1962===e?"js/chunks/Settings/Settings-SettingControl.js?_hash=42083002":2766===e?"js/chunks/Settings/Settings-SettingControlRepeater.js?_hash=ad93aec1":6148===e?"js/chunks/Settings/Settings-SettingFields.js?_hash=64c68acf":6109===e?"js/chunks/Settings/Settings-SettingFoldersControl.js?_hash=a10a9a4b":4868===e?"js/chunks/Snippets/Snippets-AiAssistant.js?_hash=6e4c37c3":8986===e?"js/chunks/Snippets/Snippets-AiCredits.js?_hash=52577121":2001===e?"js/chunks/Snippets/Snippets-Cloud.js?_hash=8b80b911":5618===e?"js/chunks/Snippets/Snippets-CodeEditor.js?_hash=0dedb086":4712===e?"js/chunks/Snippets/Snippets-ConditionValue.js?_hash=c46920ef":7821===e?"js/chunks/Snippets/Snippets-ConditionsBuilder.js?_hash=0451a772":1568===e?"js/chunks/Snippets/Snippets-EventLog.js?_hash=fff0ec10":1143===e?"js/chunks/Snippets/Snippets-GeneratorField.js?_hash=713cb365":2160===e?"js/chunks/Snippets/Snippets-Generators.js?_hash=f84764a6":3181===e?"js/chunks/Snippets/Snippets-GlobalScripts.js?_hash=8327c255":3307===e?"js/chunks/Snippets/Snippets-ImportExport.js?_hash=7c230823":5779===e?"js/chunks/Snippets/Snippets-Library.js?_hash=9117f3b1":7118===e?"js/chunks/Snippets/Snippets-LibraryAuthor.js?_hash=2d04347a":7630===e?"js/chunks/Snippets/Snippets-LibraryMine.js?_hash=9f859f53":3015===e?"js/chunks/Snippets/Snippets-LibraryPacks.js?_hash=2a3b8de1":6724===e?"js/chunks/Snippets/Snippets-ProUpsell.js?_hash=24c83125":5077===e?"js/chunks/Snippets/Snippets-PublishToLibrary.js?_hash=2162fcb1":5085===e?"js/chunks/Snippets/Snippets-SitePreview.js?_hash=b7643a5f":8062===e?"js/chunks/Snippets/Snippets-SnippetEditor.js?_hash=d348549d":8974===e?"js/chunks/Snippets/Snippets-SnippetSettings.js?_hash=c81dc9da":1468===e?"js/chunks/Snippets/Snippets-SnippetsList.js?_hash=ef1ebab5":2759===e?"js/chunks/Snippets/Snippets-SnippetsModal.js?_hash=44479fdc":3960===e?"js/chunks/Snippets/Snippets-SpecialFiles.js?_hash=cd3c301c":7433===e?"js/chunks/Snippets/Snippets-Tracking.js?_hash=3aeea0a7":4233===e?"js/chunks/Snippets/Snippets-state.js?_hash=b063f01e":3910===e?"js/chunks/FileManager/FileManager.js?_hash=9a22fcaf":5857===e?"js/chunks/ImageEditor/ImageEditor.js?_hash=4e00092e":7606===e?"js/chunks/DbManager/DbManager.js?_hash=d5abd051":4154===e?"js/chunks/ConfigManager/ConfigManager.js?_hash=ea23fc81":8165===e?"js/chunks/Snippets/Snippets.js?_hash=c52a4ed1":8248===e?"js/chunks/Settings/Settings.js?_hash=796a71bb":1451===e?"js/chunks/Changelog/Changelog.js?_hash=6619157a":8106===e?"js/chunks/Premium/Premium.js?_hash=2f025a2e":9810===e?"js/chunks/NotFound/NotFound.js?_hash=d7621959":void 0,s.miniCssF=e=>"css/"+{93:"DbManager-SearchReplace",559:"FileManager-Gallery",869:"DbManager-TableRowForm",940:"FileManager-Upload",1100:"FileManager-ListView",1451:"Changelog",1468:"Snippets-SnippetsList",1568:"Snippets-EventLog",1632:"FileManager-Editor",1869:"FileManager-FilesListItem",2001:"Snippets-Cloud",2160:"Snippets-Generators",2351:"FileManager-TreeNode",2667:"ImageEditor-MediaOptimizer",2766:"Settings-SettingControlRepeater",2857:"FileManager-ImageEditor",2888:"DbManager-easy-table-default-less",3015:"Snippets-LibraryPacks",3181:"Snippets-GlobalScripts",3287:"FileManager-Tree",3307:"Snippets-ImportExport",3582:"FileManager-MediaPlayer",3653:"DbManager-Table",3910:"FileManager",3960:"Snippets-SpecialFiles",4154:"ConfigManager",4712:"Snippets-ConditionValue",4868:"Snippets-AiAssistant",5077:"Snippets-PublishToLibrary",5085:"Snippets-SitePreview",5388:"FileManager-GridView",5776:"FileManager-FilesList",5779:"Snippets-Library",5857:"ImageEditor",5890:"ConfigManager-ListItem",6148:"Settings-SettingFields",6724:"Snippets-ProUpsell",7118:"Snippets-LibraryAuthor",7433:"Snippets-Tracking",7606:"DbManager",7630:"Snippets-LibraryMine",7821:"Snippets-ConditionsBuilder",8062:"Snippets-SnippetEditor",8119:"DbManager-easy-table-dark-less",8165:"Snippets",8248:"Settings",8641:"FileManager-CodeDiff",8974:"Snippets-SnippetSettings",8986:"Snippets-AiCredits",9111:"FileManager-GroupView",9444:"DbManager-TablesTree"}[e]+".css?_hash="+{93:"dc9669cd",559:"df8dc3d1",869:"575a2b2b",940:"0fca59a8",1100:"6fd13d4a",1451:"aa0b8006",1468:"ddcd54f9",1568:"252372b6",1632:"38cd2052",1869:"213dc083",2001:"c521f1ad",2160:"52893497",2351:"72f4e5dd",2667:"1743355e",2766:"b441f6ed",2857:"3ec2db87",2888:"add0baeb",3015:"5ebbb4cc",3181:"11925062",3287:"a07fed27",3307:"2d714886",3582:"e168dcd2",3653:"2b5ffcb5",3910:"957955d9",3960:"c6e41eb8",4154:"47f12098",4712:"ac2e53cd",4868:"c28c69ad",5077:"4ab1d7ee",5085:"678ac6cd",5388:"213dc083",5776:"213dc083",5779:"f03c31a4",5857:"b22f60eb",5890:"47f12098",6148:"eee5afa1",6724:"7cd4e7bc",7118:"96ac6417",7433:"a7008003",7606:"cd3cb312",7630:"36450039",7821:"b402d8af",8062:"573ee484",8119:"e73dfc75",8165:"f5630ceb",8248:"8f3e7e14",8641:"4c56bde8",8974:"411dacbe",8986:"08a77d11",9111:"213dc083",9444:"dbd48afc"}[e],s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},n="wpide:",s.l=(e,i,a,o)=>{if(t[e])t[e].push(i);else{var r,c;if(void 0!==a)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var d=l[u];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==n+a){r=d;break}}r||(c=!0,(r=document.createElement("script")).charset="utf-8",s.nc&&r.setAttribute("nonce",s.nc),r.setAttribute("data-webpack",n+a),r.src=e),t[e]=[i];var p=(n,i)=>{r.onerror=r.onload=null,clearTimeout(h);var a=t[e];if(delete t[e],r.parentNode&&r.parentNode.removeChild(r),a&&a.forEach(e=>e(i)),n)return n(i)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=p.bind(null,r.onerror),r.onload=p.bind(null,r.onload),c&&document.head.appendChild(r)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),s.p="",(()=>{if("undefined"!=typeof document){var e=e=>new Promise((t,n)=>{var i=s.miniCssF(e),a=s.p+i;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),i=0;i<n.length;i++){var a=(o=n[i]).getAttribute("data-href")||o.getAttribute("href");if("stylesheet"===o.rel&&(a===e||a===t))return o}var s=document.getElementsByTagName("style");for(i=0;i<s.length;i++){var o;if((a=(o=s[i]).getAttribute("data-href"))===e||a===t)return o}})(i,a))return t();((e,t,n,i,a)=>{var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",s.nc&&(o.nonce=s.nc),o.onerror=o.onload=n=>{if(o.onerror=o.onload=null,"load"===n.type)i();else{var s=n&&n.type,r=n&&n.target&&n.target.href||t,c=new Error("Loading CSS chunk "+e+" failed.\n("+s+": "+r+")");c.name="ChunkLoadError",c.code="CSS_CHUNK_LOAD_FAILED",c.type=s,c.request=r,o.parentNode&&o.parentNode.removeChild(o),a(c)}},o.href=t,n?n.parentNode.insertBefore(o,n.nextSibling):document.head.appendChild(o)})(e,a,null,t,n)}),t={3524:0};s.f.miniCss=(n,i)=>{t[n]?i.push(t[n]):0!==t[n]&&{93:1,559:1,869:1,940:1,1100:1,1451:1,1468:1,1568:1,1632:1,1869:1,2001:1,2160:1,2351:1,2667:1,2766:1,2857:1,2888:1,3015:1,3181:1,3287:1,3307:1,3582:1,3653:1,3910:1,3960:1,4154:1,4712:1,4868:1,5077:1,5085:1,5388:1,5776:1,5779:1,5857:1,5890:1,6148:1,6724:1,7118:1,7433:1,7606:1,7630:1,7821:1,8062:1,8119:1,8165:1,8248:1,8641:1,8974:1,8986:1,9111:1,9444:1}[n]&&i.push(t[n]=e(n).then(()=>{t[n]=0},e=>{throw delete t[n],e}))}}})(),(()=>{var e={3524:0};s.f.j=(t,n)=>{var i=s.o(e,t)?e[t]:void 0;if(0!==i)if(i)n.push(i[2]);else{var a=new Promise((n,a)=>i=e[t]=[n,a]);n.push(i[2]=a);var o=s.p+s.u(t),r=new Error;s.l(o,n=>{if(s.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var a=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;r.message="Loading chunk "+t+" failed.\n("+a+": "+o+")",r.name="ChunkLoadError",r.type=a,r.request=o,i[1](r)}},"chunk-"+t,t)}},s.O.j=t=>0===e[t];var t=(t,n)=>{var i,a,[o,r,c]=n,l=0;if(o.some(t=>0!==e[t])){for(i in r)s.o(r,i)&&(s.m[i]=r[i]);if(c)var u=c(s)}for(t&&t(n);l<o.length;l++)a=o[l],s.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return s.O(u)},n=self.webpackChunkwpide=self.webpackChunkwpide||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var o=s.O(void 0,[504],()=>s(4409));o=s.O(o)})(); -
wpide/tags/3.6.2/dist/js/chunks/Snippets/Snippets-Library.js
r3771999 r3776366 1 "use strict";(self.webpackChunkwpide=self.webpackChunkwpide||[]).push([[2759,5779,7118],{ 29683(t,e,i){i.r(e),i.d(e,{default:()=>p});i(52675),i(89463),i(27495),i(5746);var n=i(7180),s=(i(28706),i(2008),i(74423),i(48598),i(62062),i(44114),i(72712),i(62010),i(18111),i(22489),i(61701),i(18237),i(26099),i(21699),i(47764),i(25440),i(42762),i(62953),i(68660)),r=i(72050),a=i(60359),o=i(58998),l={search:"",category:"",author:"",authorName:""};const c={name:"SnippetsLibrary",components:{SnippetsModal:a.default,LibraryAuthor:o.default,CodeEditor:function(){return i.e(5618).then(i.bind(i,96198))},LibraryPacks:function(){return i.e(3015).then(i.bind(i,86084))},LibraryMine:function(){return i.e(7630).then(i.bind(i,40400))}},data:function(){return(0,n.A)((0,n.A)({categories:[],all:[]},l),{},{favorites:0,favoritesSynced:!1,favoritesKey:"__favorites",loading:!1,busy:"",starring:"",modal:{show:!1,item:null}})},computed:{items:function(){var t=this,e=this.search.trim().toLowerCase(),i=this.author;return this.all.filter(function(n){if(t.showingFavorites?!n.favorite:t.category&&n.category!==t.category)return!1;var s=n.author||{team:!0,slug:"wpide-team"};return!("team"===i?!s.team:"community"===i?s.team:i&&s.slug!==i)&&(!e||(n.title+" "+n.description+" "+(n.tags||[]).join(" ")).toLowerCase().includes(e))})},view:function(){return["packs","mine"].includes(this.$route.query.view)?this.$route.query.view:"snippets"},authorOptions:function(){var t=[{value:"",text:(0,r.__)("Everyone","wpide")},{value:"team",text:(0,r.__)("WPIDE Team","wpide")},{value:"community",text:(0,r.__)("Community","wpide")}];return this.authorName?t.concat([{value:this.author,text:this.authorName}]):t},total:function(){return this.categories.reduce(function(t,e){return t+e.count},0)},showingFavorites:function(){return this.category===this.favoritesKey},categoryOptions:function(){return[{value:"",text:(0,r.__)("All categories","wpide")},{value:this.favoritesKey,text:this.premium?(0,r.nv)((0,r.__)("★ Favorites (%d)","wpide"),this.favorites):(0,r.__)("★ Favorites (PRO)","wpide")}].concat(this.categories.map(function(t){return{value:t.id,text:t.label+" ("+t.count+")"}}))}},mounted:function(){this.load(),this.$route.query.open&&this.preview({id:String(this.$route.query.open)})},methods:{_n:r._n,load:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Object.assign(l,{search:this.search,category:this.category,author:this.author,authorName:this.authorName}),e||!s.i.data||s.i.stale?(this.loading=!0,s.A.library().then(function(e){s.i.data=e,s.i.stale=!1,t.apply(e)}).catch(function(e){return t.handleError(e)}).finally(function(){t.loading=!1})):this.apply(s.i.data)},apply:function(t){this.categories=t.categories,this.all=t.snippets,this.favorites=t.favorites,this.favoritesSynced=t.favorites_synced},pickAuthor:function(t){["","team","community"].includes(t)&&(this.authorName=""),this.load()},filterByAuthor:function(t){this.modal.show=!1,this.search="",this.category="",this.author=t.team?"team":t.slug,this.authorName=t.team?"":t.name,this.load()},setView:function(t){t!==this.view&&this.$router.replace({name:"snippets-library",query:"snippets"===t?{}:{view:t}})},setCategory:function(t){if(t===this.favoritesKey&&!this.premium)return this.showPremiumFeatureModal(),void(this.category="");this.category=t,this.load()},toggleFavorite:function(t){var e=this;this.premium?(this.starring=t.id,s.A.libraryFavorite(t.id,!t.favorite).then(function(i){i.success?(t.favorite=i.favorites.includes(t.id),e.favorites=i.favorites.length,s.i.data&&(s.i.data.favorites=e.favorites)):e.handleError(i.message)}).catch(function(t){return e.handleError(t)}).finally(function(){e.starring=""})):this.showPremiumFeatureModal()},preview:function(t){var e=this;s.A.libraryItem(t.id).then(function(i){e.modal={show:!0,item:(0,n.A)((0,n.A)({},t),i)}}).catch(function(){return e.handleError((0,r.__)("This snippet is not in the WPIDE library (it may have been removed, or it is private).","wpide"))})},install:function(t){var e=this;!t.pro||this.premium?(this.busy=t.id,s.A.libraryInstall(t.id).then(function(i){i.success?(e.handleSuccess((0,r.nv)((0,r.__)('"%s" was added (inactive).',"wpide"),t.title)),e.$root.$emit("snippets:refresh"),e.$router.push({name:"snippets-edit",params:{id:i.snippet.id}})):e.handleError((i.errors||[])[0])}).catch(function(t){return e.handleError(t)}).finally(function(){e.busy=""})):this.showPremiumFeatureModal()},update:function(t){var e=this;this.showModalConfirm((0,r.__)("Update","wpide"),function(){s.A.libraryUpdate(t.installed_id).then(function(t){t.success?e.handleSuccess((0,r.__)("Updated to the latest library version (a new revision).","wpide")):e.handleError((t.errors||[])[0]),e.load(!0)}).catch(function(t){return e.handleError(t)})})}}},u=c;const p=(0,i(81656).A)(u,function(){var t=this,e=t._self._c;return e("div",{staticClass:"snippets-library-view"},["snippets"===t.view?e("aside",{staticClass:"library-categories d-none d-lg-block",attrs:{"aria-label":t.__("Categories","wpide")}},[e("ul",{staticClass:"library-category-list"},[e("li",[e("a",{staticClass:"library-category-favorites",class:{active:t.category===t.favoritesKey},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.setCategory(t.favoritesKey)}}},[e("span",[e("em",{staticClass:"icon ni ni-star-fill"}),t._v(t._s(t.__("Favorites","wpide")))]),t.premium?t.categories.length?e("span",{staticClass:"library-category-count",domProps:{textContent:t._s(t.favorites)}}):e("span",{staticClass:"skeleton-line is-pill",attrs:{"aria-hidden":"true"}}):e("span",{staticClass:"snippets-pro-badge",domProps:{textContent:t._s("PRO")}})])]),e("li",{staticClass:"library-category-divider",attrs:{role:"separator"}}),e("li",[e("a",{class:{active:!t.category},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.setCategory("")}}},[e("span",{domProps:{textContent:t._s(t.__("All categories","wpide"))}}),t.categories.length?e("span",{staticClass:"library-category-count",domProps:{textContent:t._s(t.total)}}):e("span",{staticClass:"skeleton-line is-pill",attrs:{"aria-hidden":"true"}})])]),t._l(t.categories.length?0:14,function(t){return e("li",{key:"s"+t,staticClass:"library-category-skeleton",attrs:{"aria-hidden":"true"}},[e("span",{staticClass:"skeleton-line",class:["w-60","w-50","w-70","w-35"][t%4]}),e("span",{staticClass:"skeleton-line is-pill"})])}),t._l(t.categories,function(i){return e("li",{key:i.id},[e("a",{class:{active:t.category===i.id},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.setCategory(i.id)}}},[e("span",{domProps:{textContent:t._s(i.label)}}),e("span",{staticClass:"library-category-count",domProps:{textContent:t._s(i.count)}})])])})],2)]):t._e(),e("div",{staticClass:"snippets-page library-main"},[e("div",{staticClass:"library-views",attrs:{role:"tablist"}},[e("button",{staticClass:"library-view",class:{active:"snippets"===t.view},attrs:{type:"button",role:"tab","aria-selected":"snippets"===t.view?"true":"false"},on:{click:function(e){return t.setView("snippets")}}},[e("em",{staticClass:"icon ni ni-list"}),e("span",{domProps:{textContent:t._s(t.__("Snippets","wpide"))}})]),e("button",{staticClass:"library-view",class:{active:"packs"===t.view},attrs:{type:"button",role:"tab","aria-selected":"packs"===t.view?"true":"false"},on:{click:function(e){return t.setView("packs")}}},[e("em",{staticClass:"icon ni ni-package"}),e("span",{domProps:{textContent:t._s(t.__("Packs","wpide"))}})]),e("button",{staticClass:"library-view",class:{active:"mine"===t.view},attrs:{type:"button",role:"tab","aria-selected":"mine"===t.view?"true":"false"},on:{click:function(e){return t.setView("mine")}}},[e("em",{staticClass:"icon ni ni-share"}),e("span",{domProps:{textContent:t._s(t.__("Published by me","wpide"))}})])]),"packs"===t.view?e("library-packs"):"mine"===t.view?e("library-mine"):[e("div",{staticClass:"library-toolbar"},[e("div",{staticClass:"form-control-wrap library-search"},[e("div",{staticClass:"form-icon form-icon-left"},[e("em",{staticClass:"icon ni ni-search"})]),e("b-input",{attrs:{type:"search",debounce:"300",placeholder:t.__("Search the library","wpide"),"aria-label":t.__("Search the library","wpide")},on:{update:function(e){return t.load()}},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),e("b-form-select",{staticClass:"d-lg-none",attrs:{options:t.categoryOptions,"aria-label":t.__("Category","wpide")},on:{change:function(e){return t.load()}},model:{value:t.category,callback:function(e){t.category=e},expression:"category"}}),e("b-form-select",{staticClass:"library-author-filter",attrs:{options:t.authorOptions,"aria-label":t.__("Written by","wpide")},on:{change:t.pickAuthor},model:{value:t.author,callback:function(e){t.author=e},expression:"author"}}),e("span",{staticClass:"library-result-count",domProps:{textContent:t._s(t.sprintf(t._n("%d snippet","%d snippets",t.items.length,"wpide"),t.items.length))}})],1),e("p",{staticClass:"snippets-intro",domProps:{textContent:t._s(t.authorName?t.sprintf(t.__("Snippets by %s. Choose Everyone to see the whole library again.","wpide"),t.authorName):t.showingFavorites?t.favoritesSynced?t.__("Your favorites, shared by every site connected to your WPIDE Cloud account.","wpide"):t.__("Your favorites on this site. Connect WPIDE Cloud to see them on all your sites.","wpide"):t.__("Snippets from the WPIDE team and the community. Installing adds an inactive copy you can review, edit and activate.","wpide"))}}),e("div",{staticClass:"library-grid snippets-card-grid",attrs:{"aria-busy":t.loading&&!t.items.length?"true":"false"}},[t._l(t.loading&&!t.items.length?9:0,function(t){return e("article",{key:"s"+t,staticClass:"card card-bordered library-card library-card-skeleton",attrs:{"aria-hidden":"true"}},[e("div",{staticClass:"card-inner"},[e("div",{staticClass:"library-card-head"},[e("span",{staticClass:"skeleton-line is-title",class:t%2?"w-70":"w-60"}),e("span",{staticClass:"skeleton-line is-pill"})]),e("span",{staticClass:"skeleton-line w-35"}),e("span",{staticClass:"skeleton-line w-100"}),e("span",{staticClass:"skeleton-line w-90"}),e("span",{staticClass:"skeleton-line",class:t%3?"w-60":"w-50"})]),e("div",{staticClass:"library-card-skeleton-foot"},[e("span",{staticClass:"skeleton-line is-button"}),e("span",{staticClass:"skeleton-line is-button"})])])}),t._l(t.items,function(i){return e("article",{key:i.id,staticClass:"card card-bordered library-card",class:{"is-installed":i.installed_id}},[e("div",{staticClass:"card-inner"},[e("div",{staticClass:"library-card-head"},[e("h6",{staticClass:"library-card-title"},[e("a",{attrs:{href:"#"},domProps:{textContent:t._s(i.title)},on:{click:function(e){return e.preventDefault(),t.preview(i)}}})]),e("span",{staticClass:"badge snippet-type-badge",domProps:{textContent:t._s(i.code_type)}}),i.pro&&!t.premium?e("span",{staticClass:"snippets-pro-badge",domProps:{textContent:t._s("PRO")}}):t._e(),e("button",{staticClass:"library-fav",class:{active:i.favorite},attrs:{type:"button",disabled:t.starring===i.id,"aria-pressed":i.favorite?"true":"false","aria-label":i.favorite?t.sprintf(t.__("Remove %s from favorites","wpide"),i.title):t.sprintf(t.__("Add %s to favorites","wpide"),i.title),title:i.favorite?t.__("Remove from favorites","wpide"):t.__("Add to favorites","wpide")},on:{click:function(e){return t.toggleFavorite(i)}}},[e("em",{staticClass:"icon ni",class:i.favorite?"ni-star-fill":"ni-star"})])]),e("p",{staticClass:"library-card-author"},[i.author?e("library-author",{attrs:{author:i.author},on:{select:t.filterByAuthor}}):t._e(),i.installs?e("span",{staticClass:"library-card-installs",domProps:{textContent:t._s(t.sprintf(t._n("%d install","%d installs",i.installs,"wpide"),i.installs))}}):t._e()],1),e("p",{staticClass:"library-card-text",domProps:{textContent:t._s(i.description)}}),i.requires&&i.requires.length?e("div",{staticClass:"library-card-requires"},t._l(i.requires,function(n){return e("span",{key:n,staticClass:"badge",class:i.available?"badge-light":"badge-warning",domProps:{textContent:t._s(n)}})}),0):t._e(),e("div",{staticClass:"library-card-actions snippets-card-actions"},[i.installed_id?e("span",{staticClass:"library-installed"},[e("em",{staticClass:"icon ni ni-check-circle"}),t._v(t._s(t.__("Installed","wpide")))]):t._e(),e("b-button",{attrs:{size:"sm",variant:"outline-light"},domProps:{textContent:t._s(t.__("Preview","wpide"))},on:{click:function(e){return t.preview(i)}}}),i.installed_id?e("b-button",{attrs:{size:"sm",variant:"outline-primary",to:{name:"snippets-edit",params:{id:i.installed_id}}},domProps:{textContent:t._s(t.__("Open","wpide"))}}):t._e(),i.update_available?e("b-button",{attrs:{size:"sm",variant:"warning"},domProps:{textContent:t._s(t.__("Update","wpide"))},on:{click:function(e){return t.update(i)}}}):t._e(),i.installed_id?t._e():e("b-button",{attrs:{size:"sm",variant:"primary",disabled:t.busy===i.id},on:{click:function(e){return t.install(i)}}},[t.busy===i.id?e("b-spinner",{staticClass:"mr-1",attrs:{small:""}}):t._e(),t._v(t._s(t.__("Install","wpide"))+" ")],1)],1)])])})],2),t.items.length||t.loading||!t.showingFavorites||t.search?t.items.length||t.loading?t._e():e("div",{staticClass:"library-empty"},[e("em",{staticClass:"icon ni ni-search"}),e("p",{domProps:{textContent:t._s(t.__("No library snippets match. Try another word or category.","wpide"))}})]):e("div",{staticClass:"library-empty"},[e("em",{staticClass:"icon ni ni-star"}),e("p",{domProps:{textContent:t._s(t.__("No favorites yet. Star a snippet to keep it here.","wpide"))}}),e("b-button",{attrs:{size:"sm",variant:"outline-primary"},domProps:{textContent:t._s(t.__("Browse the library","wpide"))},on:{click:function(e){return t.setCategory("")}}})],1)]],2),e("snippets-modal",{attrs:{size:"lg",scrollable:"",title:t.modal.item?t.modal.item.title:"","ok-title":t.modal.item&&!t.modal.item.installed_id?t.__("Install","wpide"):t.__("Close","wpide"),"cancel-title":t.__("Close","wpide"),"ok-only":!(!t.modal.item||!t.modal.item.installed_id)},on:{ok:function(e){t.modal.item&&!t.modal.item.installed_id&&t.install(t.modal.item)}},model:{value:t.modal.show,callback:function(e){t.$set(t.modal,"show",e)},expression:"modal.show"}},[t.modal.item?[e("p",{staticClass:"library-card-author"},[t.modal.item.author?e("library-author",{attrs:{author:t.modal.item.author},on:{select:t.filterByAuthor}}):t._e()],1),e("p",{domProps:{textContent:t._s(t.modal.item.description)}}),t.modal.item.notes?e("p",{staticClass:"small text-soft",domProps:{textContent:t._s(t.modal.item.notes)}}):t._e(),e("code-editor",{attrs:{value:t.modal.item.code,type:t.modal.item.code_type,readonly:"","min-lines":6,"max-lines":28}})]:t._e()],2)],1)},[],!1,null,null,null).exports},58998(t,e,i){i.r(e),i.d(e,{default:()=>s});i(62010),i(48598),i(62062),i(34782),i(18111),i(61701),i(26099),i(27495),i(90744),i(42762);const n={name:"LibraryAuthor",props:{author:{type:Object,default:function(){return{name:"WPIDE Team",team:!0,slug:"wpide-team"}}}},data:function(){return{broken:!1}},computed:{team:function(){return!!this.author.team},name:function(){return this.team?"WPIDE Team":this.author.name||""},initials:function(){return this.name.trim().split(/\s+/).slice(0,2).map(function(t){return t.charAt(0).toUpperCase()}).join("")||"?"}},watch:{"author.avatar":function(){this.broken=!1}}};const s=(0,i(81656).A)(n,function(){var t=this,e=t._self._c;return e("span",{staticClass:"library-author"},[t.team?e("em",{staticClass:"icon ni ni-shield-check-fill is-team"}):e("span",{staticClass:"library-avatar",attrs:{"aria-hidden":"true"}},[e("span",{domProps:{textContent:t._s(t.initials)}}),t.author.avatar&&!t.broken?e("img",{attrs:{src:t.author.avatar,alt:"",width:"18",height:"18",loading:"lazy"},on:{error:function(e){t.broken=!0}}}):t._e()]),t.author.slug?e("a",{staticClass:"library-author-name",attrs:{href:"#",title:t.sprintf(t.__("Show all snippets by %s","wpide"),t.name)},domProps:{textContent:t._s(t.name)},on:{click:function(e){return e.preventDefault(),t.$emit("select",t.author)}}}):e("span",{domProps:{textContent:t._s(t.name)}})])},[],!1,null,null,null).exports},60359(t,e,i){i.r(e),i.d(e,{default:()=>s});const n={name:"SnippetsModal",inheritAttrs:!1,model:{prop:"visible",event:"change"}};const s=(0,i(81656).A)(n,function(){var t=this;return(0,t._self._c)("b-modal",t._g(t._b({staticClass:"modal-outer snippets-modal",attrs:{static:"",lazy:""},scopedSlots:t._u([t._l(t.$scopedSlots,function(e,i){return{key:i,fn:function(e){return[t._t(i,null,null,e||{})]}}})],null,!0)},"b-modal",t.$attrs,!1),t.$listeners))},[],!1,null,null,null).exports},68660(t,e,i){i.d(e,{A:()=>u,i:()=>a});var n=i(7180),s=(i(74423),i(28781)),r=function(t){return t.data.data},a={data:null,stale:!0},o=["snippets/save","snippets/bulk","snippets/import/commit","snippets/packs/install","snippets/packs/remove","snippets/cloud/import","snippets/library/install","snippets/library/update"],l=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s.A.post(t,e).then(function(e){return o.includes(t)&&(a.stale=!0),r(e)})},c=function(t){return s.A.get(t).then(r)};const u={bootstrap:function(){return c("snippets/bootstrap")},list:function(t){return l("snippets/list",t)},pin:function(t,e){return l("snippets/pin",{id:t,pinned:e})},get:function(t){return l("snippets/get",{id:t})},save:function(t){return l("snippets/save",{id:t.id||0,snippet:t})},validate:function(t){return l("snippets/validate",{snippet:t})},setStatus:function(t,e){return l("snippets/status",{id:t,active:e})},bulk:function(t,e){return l("snippets/bulk",{ids:t,action:e})},execute:function(t){return l("snippets/execute",{id:t})},revision:function(t){return l("snippets/revision",{revision_id:t,compare_to:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0})},restoreRevision:function(t){return l("snippets/revision/restore",{revision_id:t})},events:function(){return l("snippets/events",arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},clearEvents:function(){return l("snippets/events/clear",{id:arguments.length>0&&void 0!==arguments[0]?arguments[0]:0})},testing:function(t){return l("snippets/testing",{action:t,id:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0})},saveSettings:function(t){return l("snippets/settings",{settings:t})},search:function(t,e){return l("snippets/search",{kind:t,term:e,ids:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]})},export:function(){return l("snippets/export",{ids:arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],include_global:arguments.length>1&&void 0!==arguments[1]&&arguments[1]})},analyzeImport:function(t){return l("snippets/import/analyze",{importer:t,file:arguments.length>1&&void 0!==arguments[1]?arguments[1]:""})},commitImport:function(t,e){return l("snippets/import/commit",{importer:t,keys:e,extras:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],file:arguments.length>3&&void 0!==arguments[3]?arguments[3]:""})},library:function(){return l("snippets/library",{search:arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",category:arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",favorites:arguments.length>2&&void 0!==arguments[2]&&arguments[2],author:arguments.length>3&&void 0!==arguments[3]?arguments[3]:""})},libraryAccount:function(){return c("snippets/library/account")},libraryPublish:function(t,e){return l("snippets/library/publish",(0,n.A)({id:t},e))},libraryUnpublish:function(t){return l("snippets/library/unpublish",{id:t})},libraryFavorite:function(t,e){return l("snippets/library/favorite",{id:t,favorite:e})},libraryItem:function(t){return l("snippets/library/get",{id:t})},libraryInstall:function(t){return l("snippets/library/install",{id:t})},libraryUpdate:function(t){return l("snippets/library/update",{snippet_id:t})},generator:function(t){return l("snippets/generators/get",{id:t})},generate:function(t,e){return l("snippets/generators/generate",{id:t,values:e})},globalScripts:function(){return c("snippets/global")},saveGlobalScripts:function(t){return l("snippets/global/save",{scripts:t})},globalRevision:function(t){return l("snippets/global/revision",{revision_id:t})},files:function(){return c("snippets/files")},saveFile:function(t,e,i){return l("snippets/files/save",{name:t,content:e,enabled:i})},scss:function(t){return l("snippets/scss",{code:t})},packs:function(){return c("snippets/packs")},installPack:function(t){return l("snippets/packs/install",{id:t})},removePack:function(t){return l("snippets/packs/remove",{id:t})},cloud:function(){return c("snippets/cloud")},cloudConnect:function(t,e){return l("snippets/cloud/connect",{url:t,token:e})},cloudDisconnect:function(){return l("snippets/cloud/disconnect",{})},cloudRotate:function(){return l("snippets/cloud/rotate",{})},cloudDashboard:function(){return l("snippets/cloud/dashboard",{})},cloudSync:function(){return l("snippets/cloud/sync",{})},cloudLibrary:function(){return l("snippets/cloud/library",{search:arguments.length>0&&void 0!==arguments[0]?arguments[0]:""})},cloudUpload:function(t){return l("snippets/cloud/upload",{id:t,note:arguments.length>1&&void 0!==arguments[1]?arguments[1]:""})},cloudImport:function(t){return l("snippets/cloud/import",{cloud_id:t,version:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0})},cloudAi:function(t){return l("snippets/cloud/ai",t)},tracking:function(){return c("snippets/tracking")},saveTracking:function(t){return l("snippets/tracking/save",{settings:t})},testTracking:function(t){return l("snippets/tracking/test",{provider:t})},trackingLog:function(){return l("snippets/tracking/log",{clear:arguments.length>0&&void 0!==arguments[0]&&arguments[0]})}}},3470(t){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},60706(t,e,i){var n=i(10350).PROPER,s=i(79039),r=i(47452);t.exports=function(t){return s(function(){return!!r[t]()||"1 "use strict";(self.webpackChunkwpide=self.webpackChunkwpide||[]).push([[2759,5779,7118],{8999(t,e,i){i.r(e),i.d(e,{default:()=>p});i(52675),i(89463),i(27495),i(5746);var n=i(7180),s=(i(28706),i(2008),i(74423),i(48598),i(62062),i(44114),i(72712),i(62010),i(18111),i(22489),i(61701),i(18237),i(26099),i(21699),i(47764),i(25440),i(42762),i(62953),i(68660)),r=i(72050),a=i(60359),o=i(58998),l={search:"",category:"",author:"",authorName:""};const c={name:"SnippetsLibrary",components:{SnippetsModal:a.default,LibraryAuthor:o.default,CodeEditor:function(){return i.e(5618).then(i.bind(i,96198))},LibraryPacks:function(){return i.e(3015).then(i.bind(i,86084))},LibraryMine:function(){return i.e(7630).then(i.bind(i,40400))}},data:function(){return(0,n.A)((0,n.A)({categories:[],all:[]},l),{},{favorites:0,favoritesSynced:!1,favoritesKey:"__favorites",loading:!1,busy:"",starring:"",modal:{show:!1,item:null}})},computed:{items:function(){var t=this,e=this.search.trim().toLowerCase(),i=this.author;return this.all.filter(function(n){if(t.showingFavorites?!n.favorite:t.category&&n.category!==t.category)return!1;var s=n.author||{team:!0,slug:"wpide-team"};return!("team"===i?!s.team:"community"===i?s.team:i&&s.slug!==i)&&(!e||(n.title+" "+n.description+" "+(n.tags||[]).join(" ")).toLowerCase().includes(e))})},view:function(){return["packs","mine"].includes(this.$route.query.view)?this.$route.query.view:"snippets"},authorOptions:function(){var t=[{value:"",text:(0,r.__)("Everyone","wpide")},{value:"team",text:(0,r.__)("WPIDE Team","wpide")},{value:"community",text:(0,r.__)("Community","wpide")}];return this.authorName?t.concat([{value:this.author,text:this.authorName}]):t},total:function(){return this.categories.reduce(function(t,e){return t+e.count},0)},showingFavorites:function(){return this.category===this.favoritesKey},categoryOptions:function(){return[{value:"",text:(0,r.__)("All categories","wpide")},{value:this.favoritesKey,text:this.premium?(0,r.nv)((0,r.__)("★ Favorites (%d)","wpide"),this.favorites):(0,r.__)("★ Favorites (PRO)","wpide")}].concat(this.categories.map(function(t){return{value:t.id,text:t.label+" ("+t.count+")"}}))}},mounted:function(){this.load(),this.$route.query.open&&this.preview({id:String(this.$route.query.open)})},methods:{_n:r._n,load:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Object.assign(l,{search:this.search,category:this.category,author:this.author,authorName:this.authorName}),e||!s.i.data||s.i.stale?(this.loading=!0,s.A.library().then(function(e){s.i.data=e,s.i.stale=!1,t.apply(e)}).catch(function(e){return t.handleError(e)}).finally(function(){t.loading=!1})):this.apply(s.i.data)},apply:function(t){this.categories=t.categories,this.all=t.snippets,this.favorites=t.favorites,this.favoritesSynced=t.favorites_synced},pickAuthor:function(t){["","team","community"].includes(t)&&(this.authorName=""),this.load()},filterByAuthor:function(t){this.modal.show=!1,this.search="",this.category="",this.author=t.team?"team":t.slug,this.authorName=t.team?"":t.name,this.load()},setView:function(t){t!==this.view&&this.$router.replace({name:"snippets-library",query:"snippets"===t?{}:{view:t}})},setCategory:function(t){if(t===this.favoritesKey&&!this.premium)return this.showPremiumFeatureModal(),void(this.category="");this.category=t,this.load()},toggleFavorite:function(t){var e=this;this.premium?(this.starring=t.id,s.A.libraryFavorite(t.id,!t.favorite).then(function(i){i.success?(t.favorite=i.favorites.includes(t.id),e.favorites=i.favorites.length,s.i.data&&(s.i.data.favorites=e.favorites)):e.handleError(i.message)}).catch(function(t){return e.handleError(t)}).finally(function(){e.starring=""})):this.showPremiumFeatureModal()},preview:function(t){var e=this;s.A.libraryItem(t.id).then(function(i){e.modal={show:!0,item:(0,n.A)((0,n.A)({},t),i)}}).catch(function(){return e.handleError((0,r.__)("This snippet is not in the WPIDE library (it may have been removed, or it is private).","wpide"))})},install:function(t){var e=this;!t.pro||this.premium?(this.busy=t.id,s.A.libraryInstall(t.id).then(function(i){i.success?(e.handleSuccess((0,r.nv)((0,r.__)('"%s" was added (inactive).',"wpide"),t.title)),e.$root.$emit("snippets:refresh"),e.$router.push({name:"snippets-edit",params:{id:i.snippet.id}})):e.handleError((i.errors||[])[0])}).catch(function(t){return e.handleError(t)}).finally(function(){e.busy=""})):this.showPremiumFeatureModal()},update:function(t){var e=this;this.showModalConfirm((0,r.__)("Update","wpide"),function(){s.A.libraryUpdate(t.installed_id).then(function(t){t.success?e.handleSuccess((0,r.__)("Updated to the latest library version (a new revision).","wpide")):e.handleError((t.errors||[])[0]),e.load(!0)}).catch(function(t){return e.handleError(t)})})}}},u=c;const p=(0,i(81656).A)(u,function(){var t=this,e=t._self._c;return e("div",{staticClass:"snippets-library-view"},["snippets"===t.view?e("aside",{staticClass:"library-categories d-none d-lg-block",attrs:{"aria-label":t.__("Categories","wpide")}},[e("ul",{staticClass:"library-category-list"},[e("li",[e("a",{staticClass:"library-category-favorites",class:{active:t.category===t.favoritesKey},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.setCategory(t.favoritesKey)}}},[e("span",[e("em",{staticClass:"icon ni ni-star-fill"}),t._v(t._s(t.__("Favorites","wpide")))]),t.premium?t.categories.length?e("span",{staticClass:"library-category-count",domProps:{textContent:t._s(t.favorites)}}):e("span",{staticClass:"skeleton-line is-pill",attrs:{"aria-hidden":"true"}}):e("span",{staticClass:"snippets-pro-badge",domProps:{textContent:t._s("PRO")}})])]),e("li",{staticClass:"library-category-divider",attrs:{role:"separator"}}),e("li",[e("a",{class:{active:!t.category},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.setCategory("")}}},[e("span",{domProps:{textContent:t._s(t.__("All categories","wpide"))}}),t.categories.length?e("span",{staticClass:"library-category-count",domProps:{textContent:t._s(t.total)}}):e("span",{staticClass:"skeleton-line is-pill",attrs:{"aria-hidden":"true"}})])]),t._l(t.categories.length?0:14,function(t){return e("li",{key:"s"+t,staticClass:"library-category-skeleton",attrs:{"aria-hidden":"true"}},[e("span",{staticClass:"skeleton-line",class:["w-60","w-50","w-70","w-35"][t%4]}),e("span",{staticClass:"skeleton-line is-pill"})])}),t._l(t.categories,function(i){return e("li",{key:i.id},[e("a",{class:{active:t.category===i.id},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.setCategory(i.id)}}},[e("span",{domProps:{textContent:t._s(i.label)}}),e("span",{staticClass:"library-category-count",domProps:{textContent:t._s(i.count)}})])])})],2)]):t._e(),e("div",{staticClass:"snippets-page library-main"},[e("div",{staticClass:"library-views",attrs:{role:"tablist"}},[e("button",{staticClass:"library-view",class:{active:"snippets"===t.view},attrs:{type:"button",role:"tab","aria-selected":"snippets"===t.view?"true":"false"},on:{click:function(e){return t.setView("snippets")}}},[e("em",{staticClass:"icon ni ni-list"}),e("span",{domProps:{textContent:t._s(t.__("Snippets","wpide"))}})]),e("button",{staticClass:"library-view",class:{active:"packs"===t.view},attrs:{type:"button",role:"tab","aria-selected":"packs"===t.view?"true":"false"},on:{click:function(e){return t.setView("packs")}}},[e("em",{staticClass:"icon ni ni-package"}),e("span",{domProps:{textContent:t._s(t.__("Packs","wpide"))}})]),e("button",{staticClass:"library-view",class:{active:"mine"===t.view},attrs:{type:"button",role:"tab","aria-selected":"mine"===t.view?"true":"false"},on:{click:function(e){return t.setView("mine")}}},[e("em",{staticClass:"icon ni ni-share"}),e("span",{domProps:{textContent:t._s(t.__("Published by me","wpide"))}})])]),"packs"===t.view?e("library-packs"):"mine"===t.view?e("library-mine"):[e("div",{staticClass:"library-toolbar"},[e("div",{staticClass:"form-control-wrap library-search"},[e("div",{staticClass:"form-icon form-icon-left"},[e("em",{staticClass:"icon ni ni-search"})]),e("b-input",{attrs:{type:"search",debounce:"300",placeholder:t.__("Search the library","wpide"),"aria-label":t.__("Search the library","wpide")},on:{update:function(e){return t.load()}},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),e("b-form-select",{staticClass:"d-lg-none",attrs:{options:t.categoryOptions,"aria-label":t.__("Category","wpide")},on:{change:function(e){return t.load()}},model:{value:t.category,callback:function(e){t.category=e},expression:"category"}}),e("b-form-select",{staticClass:"library-author-filter",attrs:{options:t.authorOptions,"aria-label":t.__("Written by","wpide")},on:{change:t.pickAuthor},model:{value:t.author,callback:function(e){t.author=e},expression:"author"}}),e("span",{staticClass:"library-result-count",domProps:{textContent:t._s(t.sprintf(t._n("%d snippet","%d snippets",t.items.length,"wpide"),t.items.length))}})],1),e("p",{staticClass:"snippets-intro",domProps:{textContent:t._s(t.authorName?t.sprintf(t.__("Snippets by %s. Choose Everyone to see the whole library again.","wpide"),t.authorName):t.showingFavorites?t.favoritesSynced?t.__("Your favorites, shared by every site connected to your WPIDE Cloud account.","wpide"):t.__("Your favorites on this site. Connect WPIDE Cloud to see them on all your sites.","wpide"):t.__("Snippets from the WPIDE team and the community. Installing adds an inactive copy you can review, edit and activate.","wpide"))}}),e("div",{staticClass:"library-grid snippets-card-grid",attrs:{"aria-busy":t.loading&&!t.items.length?"true":"false"}},[t._l(t.loading&&!t.items.length?9:0,function(t){return e("article",{key:"s"+t,staticClass:"card card-bordered library-card library-card-skeleton",attrs:{"aria-hidden":"true"}},[e("div",{staticClass:"card-inner"},[e("div",{staticClass:"library-card-head"},[e("span",{staticClass:"skeleton-line is-title",class:t%2?"w-70":"w-60"}),e("span",{staticClass:"skeleton-line is-pill"})]),e("span",{staticClass:"skeleton-line w-35"}),e("span",{staticClass:"skeleton-line w-100"}),e("span",{staticClass:"skeleton-line w-90"}),e("span",{staticClass:"skeleton-line",class:t%3?"w-60":"w-50"})]),e("div",{staticClass:"library-card-skeleton-foot"},[e("span",{staticClass:"skeleton-line is-button"}),e("span",{staticClass:"skeleton-line is-button"})])])}),t._l(t.items,function(i){return e("article",{key:i.id,staticClass:"card card-bordered library-card",class:{"is-installed":i.installed_id}},[e("div",{staticClass:"card-inner"},[e("div",{staticClass:"library-card-head"},[e("h6",{staticClass:"library-card-title"},[e("a",{attrs:{href:"#"},domProps:{textContent:t._s(i.title)},on:{click:function(e){return e.preventDefault(),t.preview(i)}}})]),e("span",{staticClass:"badge snippet-type-badge",domProps:{textContent:t._s(i.code_type)}}),i.pro&&!t.premium?e("span",{staticClass:"snippets-pro-badge",domProps:{textContent:t._s("PRO")}}):t._e(),e("button",{staticClass:"library-fav",class:{active:i.favorite},attrs:{type:"button",disabled:t.starring===i.id,"aria-pressed":i.favorite?"true":"false","aria-label":i.favorite?t.sprintf(t.__("Remove %s from favorites","wpide"),i.title):t.sprintf(t.__("Add %s to favorites","wpide"),i.title),title:i.favorite?t.__("Remove from favorites","wpide"):t.__("Add to favorites","wpide")},on:{click:function(e){return t.toggleFavorite(i)}}},[e("em",{staticClass:"icon ni",class:i.favorite?"ni-star-fill":"ni-star"})])]),e("p",{staticClass:"library-card-author"},[i.author?e("library-author",{attrs:{author:i.author},on:{select:t.filterByAuthor}}):t._e(),i.installs?e("span",{staticClass:"library-card-installs",domProps:{textContent:t._s(t.sprintf(t._n("%d install","%d installs",i.installs,"wpide"),i.installs))}}):t._e()],1),e("p",{staticClass:"library-card-text",domProps:{textContent:t._s(i.description)}}),i.requires&&i.requires.length?e("div",{staticClass:"library-card-requires"},t._l(i.requires,function(n){return e("span",{key:n,staticClass:"badge",class:i.available?"badge-light":"badge-warning",domProps:{textContent:t._s(n)}})}),0):t._e(),e("div",{staticClass:"library-card-actions snippets-card-actions"},[i.installed_id?e("span",{staticClass:"library-installed"},[e("em",{staticClass:"icon ni ni-check-circle"}),t._v(t._s(t.__("Installed","wpide")))]):t._e(),e("b-button",{attrs:{size:"sm",variant:"outline-light"},domProps:{textContent:t._s(t.__("Preview","wpide"))},on:{click:function(e){return t.preview(i)}}}),i.installed_id?e("b-button",{attrs:{size:"sm",variant:"outline-primary",to:{name:"snippets-edit",params:{id:i.installed_id}}},domProps:{textContent:t._s(t.__("Open","wpide"))}}):t._e(),i.update_available?e("b-button",{attrs:{size:"sm",variant:"warning"},domProps:{textContent:t._s(t.__("Update","wpide"))},on:{click:function(e){return t.update(i)}}}):t._e(),i.installed_id?t._e():e("b-button",{attrs:{size:"sm",variant:"primary",disabled:t.busy===i.id},on:{click:function(e){return t.install(i)}}},[t.busy===i.id?e("b-spinner",{staticClass:"mr-1",attrs:{small:""}}):t._e(),t._v(t._s(t.__("Install","wpide"))+" ")],1)],1)])])})],2),t.items.length||t.loading||!t.showingFavorites||t.search?t.items.length||t.loading?t._e():e("div",{staticClass:"library-empty"},[e("em",{staticClass:"icon ni ni-search"}),e("p",{domProps:{textContent:t._s(t.__("No library snippets match. Try another word or category.","wpide"))}})]):e("div",{staticClass:"library-empty"},[e("em",{staticClass:"icon ni ni-star"}),e("p",{domProps:{textContent:t._s(t.__("No favorites yet. Star a snippet to keep it here.","wpide"))}}),e("b-button",{attrs:{size:"sm",variant:"outline-primary"},domProps:{textContent:t._s(t.__("Browse the library","wpide"))},on:{click:function(e){return t.setCategory("")}}})],1)]],2),e("snippets-modal",{attrs:{size:"lg",scrollable:"",title:t.modal.item?t.modal.item.title:"","ok-title":t.modal.item&&!t.modal.item.installed_id?t.__("Install","wpide"):t.__("Close","wpide"),"cancel-title":t.__("Close","wpide"),"ok-only":!(!t.modal.item||!t.modal.item.installed_id)},on:{ok:function(e){t.modal.item&&!t.modal.item.installed_id&&t.install(t.modal.item)}},model:{value:t.modal.show,callback:function(e){t.$set(t.modal,"show",e)},expression:"modal.show"}},[t.modal.item?[e("p",{staticClass:"library-card-author"},[t.modal.item.author?e("library-author",{attrs:{author:t.modal.item.author},on:{select:t.filterByAuthor}}):t._e()],1),e("p",{domProps:{textContent:t._s(t.modal.item.description)}}),t.modal.item.notes?e("p",{staticClass:"small text-soft",domProps:{textContent:t._s(t.modal.item.notes)}}):t._e(),e("code-editor",{attrs:{value:t.modal.item.code,type:t.modal.item.code_type,readonly:"","min-lines":6,"max-lines":28}})]:t._e()],2)],1)},[],!1,null,null,null).exports},58998(t,e,i){i.r(e),i.d(e,{default:()=>s});i(62010),i(48598),i(62062),i(34782),i(18111),i(61701),i(26099),i(27495),i(90744),i(42762);const n={name:"LibraryAuthor",props:{author:{type:Object,default:function(){return{name:"WPIDE Team",team:!0,slug:"wpide-team"}}}},data:function(){return{broken:!1}},computed:{team:function(){return!!this.author.team},name:function(){return this.team?"WPIDE Team":this.author.name||""},initials:function(){return this.name.trim().split(/\s+/).slice(0,2).map(function(t){return t.charAt(0).toUpperCase()}).join("")||"?"}},watch:{"author.avatar":function(){this.broken=!1}}};const s=(0,i(81656).A)(n,function(){var t=this,e=t._self._c;return e("span",{staticClass:"library-author"},[t.team?e("em",{staticClass:"icon ni ni-shield-check-fill is-team"}):e("span",{staticClass:"library-avatar",attrs:{"aria-hidden":"true"}},[e("span",{domProps:{textContent:t._s(t.initials)}}),t.author.avatar&&!t.broken?e("img",{attrs:{src:t.author.avatar,alt:"",width:"18",height:"18",loading:"lazy"},on:{error:function(e){t.broken=!0}}}):t._e()]),t.author.slug?e("a",{staticClass:"library-author-name",attrs:{href:"#",title:t.sprintf(t.__("Show all snippets by %s","wpide"),t.name)},domProps:{textContent:t._s(t.name)},on:{click:function(e){return e.preventDefault(),t.$emit("select",t.author)}}}):e("span",{domProps:{textContent:t._s(t.name)}})])},[],!1,null,null,null).exports},60359(t,e,i){i.r(e),i.d(e,{default:()=>s});const n={name:"SnippetsModal",inheritAttrs:!1,model:{prop:"visible",event:"change"}};const s=(0,i(81656).A)(n,function(){var t=this;return(0,t._self._c)("b-modal",t._g(t._b({staticClass:"modal-outer snippets-modal",attrs:{static:"",lazy:""},scopedSlots:t._u([t._l(t.$scopedSlots,function(e,i){return{key:i,fn:function(e){return[t._t(i,null,null,e||{})]}}})],null,!0)},"b-modal",t.$attrs,!1),t.$listeners))},[],!1,null,null,null).exports},68660(t,e,i){i.d(e,{A:()=>u,i:()=>a});var n=i(7180),s=(i(74423),i(28781)),r=function(t){return t.data.data},a={data:null,stale:!0},o=["snippets/save","snippets/bulk","snippets/import/commit","snippets/packs/install","snippets/packs/remove","snippets/cloud/import","snippets/library/install","snippets/library/update"],l=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s.A.post(t,e).then(function(e){return o.includes(t)&&(a.stale=!0),r(e)})},c=function(t){return s.A.get(t).then(r)};const u={bootstrap:function(){return c("snippets/bootstrap")},list:function(t){return l("snippets/list",t)},pin:function(t,e){return l("snippets/pin",{id:t,pinned:e})},get:function(t){return l("snippets/get",{id:t})},save:function(t){return l("snippets/save",{id:t.id||0,snippet:t})},validate:function(t){return l("snippets/validate",{snippet:t})},setStatus:function(t,e){return l("snippets/status",{id:t,active:e})},bulk:function(t,e){return l("snippets/bulk",{ids:t,action:e})},execute:function(t){return l("snippets/execute",{id:t})},revision:function(t){return l("snippets/revision",{revision_id:t,compare_to:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0})},restoreRevision:function(t){return l("snippets/revision/restore",{revision_id:t})},events:function(){return l("snippets/events",arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},clearEvents:function(){return l("snippets/events/clear",{id:arguments.length>0&&void 0!==arguments[0]?arguments[0]:0})},testing:function(t){return l("snippets/testing",{action:t,id:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0})},saveSettings:function(t){return l("snippets/settings",{settings:t})},search:function(t,e){return l("snippets/search",{kind:t,term:e,ids:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]})},export:function(){return l("snippets/export",{ids:arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],include_global:arguments.length>1&&void 0!==arguments[1]&&arguments[1]})},analyzeImport:function(t){return l("snippets/import/analyze",{importer:t,file:arguments.length>1&&void 0!==arguments[1]?arguments[1]:""})},commitImport:function(t,e){return l("snippets/import/commit",{importer:t,keys:e,extras:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],file:arguments.length>3&&void 0!==arguments[3]?arguments[3]:""})},library:function(){return l("snippets/library",{search:arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",category:arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",favorites:arguments.length>2&&void 0!==arguments[2]&&arguments[2],author:arguments.length>3&&void 0!==arguments[3]?arguments[3]:""})},libraryAccount:function(){return c("snippets/library/account")},libraryPublish:function(t,e){return l("snippets/library/publish",(0,n.A)({id:t},e))},libraryUnpublish:function(t){return l("snippets/library/unpublish",{id:t})},libraryFavorite:function(t,e){return l("snippets/library/favorite",{id:t,favorite:e})},libraryItem:function(t){return l("snippets/library/get",{id:t})},libraryInstall:function(t){return l("snippets/library/install",{id:t})},libraryUpdate:function(t){return l("snippets/library/update",{snippet_id:t})},generator:function(t){return l("snippets/generators/get",{id:t})},generate:function(t,e){return l("snippets/generators/generate",{id:t,values:e})},globalScripts:function(){return c("snippets/global")},saveGlobalScripts:function(t){return l("snippets/global/save",{scripts:t})},globalRevision:function(t){return l("snippets/global/revision",{revision_id:t})},files:function(){return c("snippets/files")},saveFile:function(t,e,i){return l("snippets/files/save",{name:t,content:e,enabled:i})},scss:function(t){return l("snippets/scss",{code:t})},packs:function(){return c("snippets/packs")},installPack:function(t){return l("snippets/packs/install",{id:t})},removePack:function(t){return l("snippets/packs/remove",{id:t})},cloud:function(){return c("snippets/cloud")},cloudConnect:function(t,e){return l("snippets/cloud/connect",{url:t,token:e})},cloudDisconnect:function(){return l("snippets/cloud/disconnect",{})},cloudRotate:function(){return l("snippets/cloud/rotate",{})},cloudDashboard:function(){return l("snippets/cloud/dashboard",{})},cloudSync:function(){return l("snippets/cloud/sync",{})},cloudLibrary:function(){return l("snippets/cloud/library",{search:arguments.length>0&&void 0!==arguments[0]?arguments[0]:""})},cloudUpload:function(t){return l("snippets/cloud/upload",{id:t,note:arguments.length>1&&void 0!==arguments[1]?arguments[1]:""})},cloudImport:function(t){return l("snippets/cloud/import",{cloud_id:t,version:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0})},cloudAi:function(t){return l("snippets/cloud/ai",t)},tracking:function(){return c("snippets/tracking")},saveTracking:function(t){return l("snippets/tracking/save",{settings:t})},testTracking:function(t){return l("snippets/tracking/test",{provider:t})},trackingLog:function(){return l("snippets/tracking/log",{clear:arguments.length>0&&void 0!==arguments[0]&&arguments[0]})}}},3470(t){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},60706(t,e,i){var n=i(10350).PROPER,s=i(79039),r=i(47452);t.exports=function(t){return s(function(){return!!r[t]()||" 2 2 "!==" 3 3 "[t]()||n&&r[t].name!==t})}},74423(t,e,i){var n=i(46518),s=i(19617).includes,r=i(79039),a=i(6469),o=r(function(){return!Array(1).includes()}),l=r(function(){return[,1].includes(void 0,1)});n({target:"Array",proto:!0,forced:o||l},{includes:function(t){return s(this,t,arguments.length>1?arguments[1]:void 0)}}),a("includes")},62062(t,e,i){var n=i(46518),s=i(59213).map;n({target:"Array",proto:!0,forced:!i(70597)("map")},{map:function(t){return s(this,t,arguments.length>1?arguments[1]:void 0)}})},61701(t,e,i){var n=i(46518),s=i(69565),r=i(79306),a=i(28551),o=i(1767),l=i(19462),c=i(96319),u=i(9539),p=i(30684),d=i(84549),h=i(96395),f=!h&&!p("map",function(){}),m=!h&&!f&&d("map",TypeError),v=h||f||m,y=l(function(){var t=this.iterator,e=a(s(this.next,t));if(!(this.done=!!e.done))return c(t,this.mapper,[e.value,this.counter++],!0)});n({target:"Iterator",proto:!0,real:!0,forced:v},{map:function(t){a(this);try{r(t)}catch(t){u(this,"throw",t)}return m?s(m,this,t):new y(o(this),{mapper:t})}})},21699(t,e,i){var n=i(46518),s=i(79504),r=i(60511),a=i(67750),o=i(655),l=i(41436),c=s("".indexOf);n({target:"String",proto:!0,forced:!l("includes")},{includes:function(t){return!!~c(o(a(this)),o(r(t)),arguments.length>1?arguments[1]:void 0)}})},5746(t,e,i){var n=i(69565),s=i(89228),r=i(28551),a=i(20034),o=i(67750),l=i(3470),c=i(655),u=i(55966),p=i(56682);s("search",function(t,e,i){return[function(e){var i=o(this),s=a(e)?u(e,t):void 0;return s?n(s,e,i):new RegExp(e)[t](c(i))},function(t){var n=r(this),s=c(t),a=i(e,n,s);if(a.done)return a.value;var o=n.lastIndex;l(o,0)||(n.lastIndex=0);var u=p(n,s);return l(n.lastIndex,o)||(n.lastIndex=o),null===u?-1:u.index}]})},90744(t,e,i){var n=i(69565),s=i(79504),r=i(89228),a=i(28551),o=i(20034),l=i(67750),c=i(2293),u=i(57829),p=i(18014),d=i(655),h=i(55966),f=i(61034),m=i(56682),v=i(58429),y=i(79039),b=v.UNSUPPORTED_Y,g=Math.min,_=s([].push),C=s("".slice),w=s("".indexOf),k=!y(function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var i="ab".split(t);return 2!==i.length||"a"!==i[0]||"b"!==i[1]}),x="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;r("split",function(t,e,i){var s="0".split(void 0,0).length?function(t,i){return void 0===t&&0===i?[]:n(e,this,t,i)}:e;return[function(e,i){var r=l(this),a=o(e)?h(e,t):void 0;return a?n(a,e,r,i):n(s,d(r),e,i)},function(t,n){var r=a(this),o=d(t);if(!x){var l=i(s,r,o,n,s!==e);if(l.done)return l.value}var h=c(r,RegExp),v=d(f(r)),y=!!~w(v,"u")||!!~w(v,"v");b?~w(v,"g")||(v+="g"):~w(v,"y")||(v+="y");var k=new h(b?"^(?:"+r.source+")":r,v),P=void 0===n?4294967295:n>>>0;if(0===P)return[];if(0===o.length)return null===m(k,o)?[o]:[];for(var A=0,S=0,I=[];S<o.length;){k.lastIndex=b?0:S;var E,D=m(k,b?C(o,S):o);if(null===D||(E=g(p(k.lastIndex+(b?S:0)),o.length))===A)S=u(o,S,y);else{if(_(I,C(o,A,S)),I.length===P)return I;for(var F=1;F<=D.length-1;F++)if(_(I,D[F]),I.length===P)return I;S=A=E}}return _(I,C(o,A)),I}]},x||!k,b)},42762(t,e,i){var n=i(46518),s=i(43802).trim;n({target:"String",proto:!0,forced:i(60706)("trim")},{trim:function(){return s(this)}})}}]); -
wpide/tags/3.6.2/readme.txt
r3776309 r3776366 4 4 Requires at least: 5.0 5 5 Tested up to: 7.1 6 Stable tag: 3.6. 16 Stable tag: 3.6.2 7 7 Requires PHP: 7.4.0 8 8 License: GPLv2 or later … … 121 121 == Changelog == 122 122 123 #### V.3.6.2 - 2026-10-31 124 - **security**: On multisite, WPIDE and its actions are now limited to super administrators. A subsite administrator could previously get file permissions through the authenticated API and edit network-shared plugin files. Reported by Veer Gosai. 125 - **fix**: The Snippet Library's category sidebar now stays on screen while the results scroll, with a slim overlay-style scrollbar for long category lists. 126 123 127 #### V.3.6.1 - 2026-10-30 124 128 - **fix**: Open the file tree and database tables from the mobile editor, with clearer empty states and smoother sidebar transitions. -
wpide/tags/3.6.2/wpide.php
r3776309 r3776366 12 12 * Plugin URI: https://wpide.com 13 13 * Description: WordPress file manager and code editor with code snippets, featuring auto-completion of both WordPress and PHP functions with reference, syntax highlighting, line numbers, tabbed editing, automatic backup, image editor & much more! 14 * Version: 3.6. 114 * Version: 3.6.2 15 15 * Requires PHP: 7.4.0 16 16 * Requires at least: 5.0 -
wpide/trunk/App/App.php
r3771999 r3776366 277 277 public function canManage(): bool 278 278 { 279 if (is_multisite() && !is_super_admin()) { 280 return false; 281 } 282 279 283 return current_user_can('manage_options'); 280 284 } … … 293 297 public function adminMenu() 294 298 { 299 if (!$this->canManage()) { 300 return; 301 } 295 302 296 303 $menuTopItems = apply_filters('wpide_admin_menu_top_items', [ -
wpide/trunk/App/Services/Auth/Adapters/WPAuth.php
r2763916 r3776366 55 55 } 56 56 57 // ...but not for wp admins 58 if (in_array('administrator', (array)$wpuser->roles)) { 57 // ...but not for wp admins (on multisite, only super admins manage WPIDE) 58 if ( 59 in_array('administrator', (array)$wpuser->roles) 60 && (!is_multisite() || is_super_admin($wpuser->ID)) 61 ) { 59 62 $user->setHomedir('/'); 60 63 $user->setRole('admin'); -
wpide/trunk/_constants.php
r3776309 r3776366 10 10 define(__NAMESPACE__ . '\NAME', 'WPIDE'); 11 11 12 define(__NAMESPACE__ . '\VERSION', '3.6. 1');12 define(__NAMESPACE__ . '\VERSION', '3.6.2'); 13 13 define(__NAMESPACE__ . '\FM_VERSION', '7.8.1'); 14 14 -
wpide/trunk/dist/css/Snippets-Library.css
r3771999 r3776366 1 1 .library-author{display:inline-flex;align-items:center;gap:.3125rem;min-width:0}.library-author .icon{flex:none;width:auto;margin:0;font-size:14px}.library-author .icon.is-team{color:var(--wpide-accent-color)}.library-avatar{position:relative;display:inline-grid;flex:none;place-items:center;width:18px;height:18px;overflow:hidden;border-radius:50%;background:var(--wpide-accent-dim);color:var(--wpide-accent-color);font-size:8px;font-weight:600;line-height:1}.library-avatar img{position:absolute;inset:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.library-author-name{overflow:hidden;color:inherit;text-overflow:ellipsis;white-space:nowrap}.library-author-name:hover,.library-author-name:focus-visible{color:var(--wpide-accent-color);text-decoration:underline} 2 .snippets-library-view{display:flex;flex-grow:1;min-height:0 }.snippets-library-view .library-categories{flex:none;width:15rem;padding:1.25rem .75rem;border-right:1px solid var(--wpide-border-light)}.snippets-library-view .library-category-list{position:sticky;top:1.25rem;margin:0;padding:0;list-style:none}.snippets-library-view .library-category-list a{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.4375rem .75rem;border-radius:var(--wpide-border-radius);color:var(--wpide-base-color);font-size:13px;transition:background-color .15s ease,color .15s ease}.snippets-library-view .library-category-list a:hover{background:var(--wpide-lighter)}.snippets-library-view .library-category-list a.active{background:var(--wpide-accent-dim);color:var(--wpide-accent-color);font-weight:600}.snippets-library-view .library-category-favorites .icon{margin-right:.375rem;color:var(--wpide-warning)}.snippets-library-view .library-category-divider{height:1px;margin:.5rem .75rem;background:var(--wpide-border-light)}.snippets-library-view .library-fav{flex:none;display:inline-grid;place-items:center;width:1.75rem;height:1.75rem;margin:-0.125rem -0.375rem 0 0;border:0;border-radius:50%;background:none;color:var(--wpide-base-light);font-size:1rem;transition:color .15s ease,background-color .15s ease,transform .15s ease}.snippets-library-view .library-fav:hover{background:var(--wpide-lighter);color:var(--wpide-warning)}.snippets-library-view .library-fav.active{color:var(--wpide-warning)}.snippets-library-view .library-fav.active .icon{animation:library-fav-pop .25s ease}.snippets-library-view .library-fav:focus-visible{outline:2px solid var(--wpide-accent-color);outline-offset:1px}.snippets-library-view .library-fav:disabled{opacity:.6}@keyframes library-fav-pop{50%{transform:scale(1.3)}}@media(prefers-reduced-motion: reduce){.snippets-library-view .library-fav.active .icon{animation:none}}.snippets-library-view .library-category-count{color:var(--wpide-base-light);font-size:12px;font-weight:400;font-variant-numeric:tabular-nums}.snippets-library-view .library-main{flex:1 1 auto;min-width:0}.snippets-library-view .library-views{display:inline-flex;margin-bottom:1.25rem;padding:.1875rem;border-radius:var(--wpide-border-radius);background:var(--wpide-lighter)}.snippets-library-view .library-view{display:inline-flex;align-items:center;gap:.375rem;padding:.375rem .875rem;border:0;border-radius:calc(var(--wpide-border-radius) - 1px);background:none;color:var(--wpide-base-light);font-weight:500;transition:background-color .15s ease,color .15s ease}.snippets-library-view .library-view.active{background:var(--wpide-card-bg);color:var(--wpide-accent-color);box-shadow:0 1px 3px rgba(0,0,0,.08)}.snippets-library-view .library-view:focus-visible{outline:2px solid var(--wpide-accent-color);outline-offset:1px}.snippets-library-view .library-toolbar{display:flex;align-items:center;gap:.5rem 1rem;margin-bottom:.75rem}.snippets-library-view .library-search{flex:0 1 26rem}.snippets-library-view .library-author-filter{flex:0 0 auto;width:auto}.snippets-library-view .library-result-count{margin-left:auto;color:var(--wpide-base-light);white-space:nowrap;font-variant-numeric:tabular-nums}.snippets-library-view .library-grid{grid-template-columns:repeat(auto-fill, minmax(17rem, 1fr))}.snippets-library-view .library-card{transition:border-color .15s ease,box-shadow .15s ease}.snippets-library-view .library-card:hover{border-color:var(--wpide-accent-300, var(--wpide-accent-color));box-shadow:0 4px 16px -8px rgba(0,0,0,.18)}.snippets-library-view .library-card .card-inner{padding:1.125rem 1.25rem}.snippets-library-view .library-card-head{display:flex;align-items:flex-start;gap:.5rem;margin-bottom:.375rem}.snippets-library-view .library-card-head .badge{flex:none;margin-top:.125rem}.snippets-library-view .library-card-title{flex:1 1 auto;margin:0;font-size:15px;line-height:1.35}.snippets-library-view .library-card-title a{color:var(--wpide-base-color)}.snippets-library-view .library-card-title a:hover{color:var(--wpide-accent-color)}.snippets-library-view .library-card-text{flex:1 1 auto;margin-bottom:.75rem;color:var(--wpide-base-light);font-size:13px;line-height:1.5}.snippets-library-view .library-card-requires{display:flex;flex-wrap:wrap;gap:.25rem;margin-bottom:.75rem}.snippets-library-view .library-card-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:.375rem}.snippets-library-view .library-installed{display:inline-flex;align-items:center;gap:.25rem;margin-right:auto;color:var(--wpide-success);font-size:12px;font-weight:500}.snippets-library-view .library-card-skeleton{pointer-events:none}.snippets-library-view .library-card-skeleton .library-card-head{gap:1rem;margin-bottom:1rem}.snippets-library-view .library-card-skeleton .library-card-head .is-title{flex:1}.snippets-library-view .library-card-skeleton .w-35{margin-bottom:1rem}.snippets-library-view .library-card-skeleton-foot{display:flex;justify-content:flex-end;gap:.5rem;margin-top:auto;padding:.75rem 1.25rem 1.25rem}.snippets-library-view .library-card-skeleton-foot .skeleton-line+.skeleton-line{margin-top:0}.snippets-library-view .library-category-skeleton{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.5rem .75rem}.snippets-library-view .library-category-skeleton .skeleton-line+.skeleton-line{margin-top:0}.snippets-library-view .library-empty{padding:3rem 1rem;color:var(--wpide-base-light);text-align:center}.snippets-library-view .library-empty .icon{font-size:2rem}.snippets-library-view .library-empty .btn{margin-top:.25rem}@media(max-width: 767.98px){.snippets-library-view .library-toolbar{flex-wrap:wrap}.snippets-library-view .library-search{flex:1 1 100%}.snippets-library-view .library-toolbar .custom-select{flex:1 1 auto;width:auto}.snippets-library-view .library-grid{grid-template-columns:1fr}}.library-card-author{display:flex;align-items:center;gap:.3125rem;margin-bottom:.5rem;color:var(--wpide-base-light);font-size:12px}.library-card-author .icon{flex:none;width:auto;margin:0;font-size:14px}.library-card-author .icon.is-team{color:var(--wpide-accent-color)}.library-card-author .icon+span{margin-left:0}.library-card-author .library-card-installs::before{content:"·";margin-right:.375rem}2 .snippets-library-view{display:flex;flex-grow:1;min-height:0;flex-shrink:0;align-items:flex-start}.snippets-library-view .library-categories{position:sticky;top:0;flex:none;width:15rem;max-height:calc(var(--wpide-viewport-height) - var(--wpide-header-height) - var(--wpide-adminbar-height) - 59px);overflow-y:auto;overscroll-behavior:contain;padding:1.25rem .75rem;border-right:1px solid var(--wpide-border-light);scrollbar-width:thin;scrollbar-color:rgba(0,0,0,0) rgba(0,0,0,0)}.snippets-library-view .library-categories:hover{scrollbar-color:var(--wpide-light-400) rgba(0,0,0,0)}.snippets-library-view .library-categories::-webkit-scrollbar{width:8px}.snippets-library-view .library-categories::-webkit-scrollbar-track,.snippets-library-view .library-categories::-webkit-scrollbar-corner{background:rgba(0,0,0,0)}.snippets-library-view .library-categories::-webkit-scrollbar-thumb{border:2px solid rgba(0,0,0,0);border-radius:999px;background:rgba(0,0,0,0)}.snippets-library-view .library-categories:hover::-webkit-scrollbar-thumb{background:var(--wpide-light-400)}.snippets-library-view .library-categories::-webkit-scrollbar-thumb:hover{background:var(--wpide-light-600)}.nk-app-root.dark-mode .snippets-library-view .library-categories:hover{scrollbar-color:var(--wpide-light-600) rgba(0,0,0,0)}.nk-app-root.dark-mode .snippets-library-view .library-categories:hover::-webkit-scrollbar-thumb{background:var(--wpide-light-600)}.nk-app-root.dark-mode .snippets-library-view .library-categories::-webkit-scrollbar-thumb:hover{background:var(--wpide-light-500)}.snippets-library-view .library-category-list{margin:0;padding:0;list-style:none}.snippets-library-view .library-category-list a{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.4375rem .75rem;border-radius:var(--wpide-border-radius);color:var(--wpide-base-color);font-size:13px;transition:background-color .15s ease,color .15s ease}.snippets-library-view .library-category-list a:hover{background:var(--wpide-lighter)}.snippets-library-view .library-category-list a.active{background:var(--wpide-accent-dim);color:var(--wpide-accent-color);font-weight:600}.snippets-library-view .library-category-favorites .icon{margin-right:.375rem;color:var(--wpide-warning)}.snippets-library-view .library-category-divider{height:1px;margin:.5rem .75rem;background:var(--wpide-border-light)}.snippets-library-view .library-fav{flex:none;display:inline-grid;place-items:center;width:1.75rem;height:1.75rem;margin:-0.125rem -0.375rem 0 0;border:0;border-radius:50%;background:none;color:var(--wpide-base-light);font-size:1rem;transition:color .15s ease,background-color .15s ease,transform .15s ease}.snippets-library-view .library-fav:hover{background:var(--wpide-lighter);color:var(--wpide-warning)}.snippets-library-view .library-fav.active{color:var(--wpide-warning)}.snippets-library-view .library-fav.active .icon{animation:library-fav-pop .25s ease}.snippets-library-view .library-fav:focus-visible{outline:2px solid var(--wpide-accent-color);outline-offset:1px}.snippets-library-view .library-fav:disabled{opacity:.6}@keyframes library-fav-pop{50%{transform:scale(1.3)}}@media(prefers-reduced-motion: reduce){.snippets-library-view .library-fav.active .icon{animation:none}}.snippets-library-view .library-category-count{color:var(--wpide-base-light);font-size:12px;font-weight:400;font-variant-numeric:tabular-nums}.snippets-library-view .library-main{flex:1 1 auto;min-width:0}.snippets-library-view .library-views{display:inline-flex;margin-bottom:1.25rem;padding:.1875rem;border-radius:var(--wpide-border-radius);background:var(--wpide-lighter)}.snippets-library-view .library-view{display:inline-flex;align-items:center;gap:.375rem;padding:.375rem .875rem;border:0;border-radius:calc(var(--wpide-border-radius) - 1px);background:none;color:var(--wpide-base-light);font-weight:500;transition:background-color .15s ease,color .15s ease}.snippets-library-view .library-view.active{background:var(--wpide-card-bg);color:var(--wpide-accent-color);box-shadow:0 1px 3px rgba(0,0,0,.08)}.snippets-library-view .library-view:focus-visible{outline:2px solid var(--wpide-accent-color);outline-offset:1px}.snippets-library-view .library-toolbar{display:flex;align-items:center;gap:.5rem 1rem;margin-bottom:.75rem}.snippets-library-view .library-search{flex:0 1 26rem}.snippets-library-view .library-author-filter{flex:0 0 auto;width:auto}.snippets-library-view .library-result-count{margin-left:auto;color:var(--wpide-base-light);white-space:nowrap;font-variant-numeric:tabular-nums}.snippets-library-view .library-grid{grid-template-columns:repeat(auto-fill, minmax(17rem, 1fr))}.snippets-library-view .library-card{transition:border-color .15s ease,box-shadow .15s ease}.snippets-library-view .library-card:hover{border-color:var(--wpide-accent-300, var(--wpide-accent-color));box-shadow:0 4px 16px -8px rgba(0,0,0,.18)}.snippets-library-view .library-card .card-inner{padding:1.125rem 1.25rem}.snippets-library-view .library-card-head{display:flex;align-items:flex-start;gap:.5rem;margin-bottom:.375rem}.snippets-library-view .library-card-head .badge{flex:none;margin-top:.125rem}.snippets-library-view .library-card-title{flex:1 1 auto;margin:0;font-size:15px;line-height:1.35}.snippets-library-view .library-card-title a{color:var(--wpide-base-color)}.snippets-library-view .library-card-title a:hover{color:var(--wpide-accent-color)}.snippets-library-view .library-card-text{flex:1 1 auto;margin-bottom:.75rem;color:var(--wpide-base-light);font-size:13px;line-height:1.5}.snippets-library-view .library-card-requires{display:flex;flex-wrap:wrap;gap:.25rem;margin-bottom:.75rem}.snippets-library-view .library-card-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:.375rem}.snippets-library-view .library-installed{display:inline-flex;align-items:center;gap:.25rem;margin-right:auto;color:var(--wpide-success);font-size:12px;font-weight:500}.snippets-library-view .library-card-skeleton{pointer-events:none}.snippets-library-view .library-card-skeleton .library-card-head{gap:1rem;margin-bottom:1rem}.snippets-library-view .library-card-skeleton .library-card-head .is-title{flex:1}.snippets-library-view .library-card-skeleton .w-35{margin-bottom:1rem}.snippets-library-view .library-card-skeleton-foot{display:flex;justify-content:flex-end;gap:.5rem;margin-top:auto;padding:.75rem 1.25rem 1.25rem}.snippets-library-view .library-card-skeleton-foot .skeleton-line+.skeleton-line{margin-top:0}.snippets-library-view .library-category-skeleton{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.5rem .75rem}.snippets-library-view .library-category-skeleton .skeleton-line+.skeleton-line{margin-top:0}.snippets-library-view .library-empty{padding:3rem 1rem;color:var(--wpide-base-light);text-align:center}.snippets-library-view .library-empty .icon{font-size:2rem}.snippets-library-view .library-empty .btn{margin-top:.25rem}@media(max-width: 767.98px){.snippets-library-view .library-toolbar{flex-wrap:wrap}.snippets-library-view .library-search{flex:1 1 100%}.snippets-library-view .library-toolbar .custom-select{flex:1 1 auto;width:auto}.snippets-library-view .library-grid{grid-template-columns:1fr}}.library-card-author{display:flex;align-items:center;gap:.3125rem;margin-bottom:.5rem;color:var(--wpide-base-light);font-size:12px}.library-card-author .icon{flex:none;width:auto;margin:0;font-size:14px}.library-card-author .icon.is-team{color:var(--wpide-accent-color)}.library-card-author .icon+span{margin-left:0}.library-card-author .library-card-installs::before{content:"·";margin-right:.375rem} -
wpide/trunk/dist/js/app.js
r3776309 r3776366 11 11 component:window.WPIDE.premium?function(){return n.e(4154).then(n.bind(n,13680))}:null, 12 12 /* /fs_premium_only */ 13 redirect:window.WPIDE.premium?null:{name:"premium",query:{name:"config-manager"}},module:!0,config:null,premium:!0},{path:"/snippets",meta:{title:(0,h.__)("Snippets","wpide")},name:"snippets",icon:"ni-code",component:function(){return n.e(8165).then(n.bind(n,24235))},children:[{path:"",name:"snippets-list",meta:{title:(0,h.__)("Snippets","wpide")},component:function(){return n.e(1468).then(n.bind(n,50139))}},{path:"edit/:id?",name:"snippets-edit",meta:{title:(0,h.__)("Edit Snippet","wpide")},component:function(){return n.e(8062).then(n.bind(n,73257))}},{path:"library",name:"snippets-library",meta:{title:(0,h.__)("Snippet Library","wpide")},component:function(){return n.e(5779).then(n.bind(n, 29683))}},{path:"generators",name:"snippets-generators",meta:{title:(0,h.__)("Generators","wpide")},component:function(){return n.e(2160).then(n.bind(n,68303))}},{path:"header-footer",name:"snippets-global",meta:{title:(0,h.__)("Header & Footer","wpide")},component:function(){return n.e(3181).then(n.bind(n,48341))}},{path:"files",name:"snippets-files",meta:{title:(0,h.__)("Special Files","wpide")},props:{feature:"files",page:!0},component:window.WPIDE.premium?function(){return n.e(3960).then(n.bind(n,30097))}:f},{path:"import-export",name:"snippets-import",meta:{title:(0,h.__)("Import & Export","wpide")},component:function(){return n.e(3307).then(n.bind(n,25559))}},{path:"cloud",name:"snippets-cloud",meta:{title:(0,h.__)("WPIDE Cloud","wpide")},props:{feature:"cloud",page:!0},component:window.WPIDE.premium?function(){return n.e(2001).then(n.bind(n,54003))}:f},{path:"tracking",name:"snippets-tracking",meta:{title:(0,h.__)("Conversion Tracking","wpide")},props:{feature:"tracking",page:!0},component:window.WPIDE.premium?function(){return n.e(7433).then(n.bind(n,9829))}:f},{path:"log",name:"snippets-log",meta:{title:(0,h.__)("Snippet Log","wpide")},component:function(){return n.e(1568).then(n.bind(n,95986))}},{path:"settings",name:"snippets-settings",redirect:{path:"/settings",query:{tab:"snippets"}}}],redirect:{name:"snippets-list"},module:!0,config:null,settings:function(){return n.e(8974).then(n.bind(n,65637))}},{path:"/settings",name:"settings",meta:{title:(0,h.__)("Settings","wpide")},icon:"ni-setting",component:function(){return n.e(8248).then(n.bind(n,59999))}},{path:"/changelog",name:"changelog",meta:{title:(0,h.__)("Changelog","wpide")},icon:"ni-notes-alt",component:function(){return n.e(1451).then(n.bind(n,95860))}},{path:"/account",name:"account",meta:{title:(0,h.__)("Account","wpide")},icon:"user-alt"},{path:"/premium",name:"premium",meta:{title:(0,h.__)("Premium Version Required","wpide")},icon:"ni-lock bg-danger-dim",component:function(){return n.e(8106).then(n.bind(n,99707))}},{path:"*",name:"404",meta:{title:(0,h.__)("Not found","wpide")},icon:"ni-sad bg-danger-dim",component:function(){return n.e(9810).then(n.bind(n,83921))}}]);const g=new d.Ay({mode:"hash",routes:m});var v=n(45929),b=(n(50113),n(64346),n(44114),n(20116),n(95353)),w=n(2543),k=n(7180),_=(n(25276),n(48598),n(72712),n(94490),n(34782),n(60739),n(18237),n(69112),n(33110),n(9868),n(79432),n(78459),n(13611),n(13531)),C=n(40001),S=n(93956),y={computed:{premium:function(){return!!window.WPIDE.premium},isPremiumVersion:function(){return!!window.WPIDE.is_premium_version},showFreemiusMenus:function(){return window.WPIDE.show_freemius_menus},showLicenseMenu:function(){return this.showFreemiusMenus&&this.isPremiumVersion},isLicenseActive:function(){return!!window.WPIDE.is_license_active},plan:function(){return window.WPIDE.plan||{pro:this.premium,tier:0,plan:"",features:{}}},appDom:function(){return this.$root.$children[0].$refs.app},pageTitle:function(){return this.$route.meta.title||this.$route.name},pageIcon:function(){var e;e=this.getConfig("general.dark_mode")?"icon ni bg-primary text-white":"icon ni bg-primary-dim";var t=this.$route.matched.length?this.$route.matched[0].name:null,n=this.findRoute(this.$route.name)||this.findRoute(t);return n?n.icon+" "+e:null},assetsUrl:function(){return window.WPIDE.assets_url},imagesUrl:function(){return window.WPIDE.images_url},isLoading:function(){return this.$store.state.loading},isModalActive:function(){return this.$store.state.modal.enabled},upgradeUrl:function(){var e=window.WPIDE.account_links.find(function(e){return"_pricing"===e.id});return e?e.url:null}},methods:{__:function(e,t){return(0,h.__)(e,t)},sprintf:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return h.nv.apply(void 0,[e].concat(n))},loading:function(){this.$store.commit("setLoading",!0)},idle:function(){this.$store.commit("setLoading",!1)},findRoute:function(e){var t=m.find(function(t){return t.name===e});return t||null},getPremiumMessageData:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(this.premium&&this.plan.tier>0){var n=t?this.planFor(t):"";return{title:(0,h.__)("Upgrade your plan","wpide"),message:n?(0,h.nv)((0,h.__)("This is part of WPIDE %1$s and up. This site is on WPIDE %2$s.","wpide"),n,this.plan.plan):(0,h.nv)((0,h.__)("This is part of a higher WPIDE plan. This site is on WPIDE %s.","wpide"),this.plan.plan),button:this.upgradeUrl?n?(0,h.nv)((0,h.__)("Upgrade to %s","wpide"),n):(0,h.__)("See plans","wpide"):null,buttonCallback:this.upgradeUrl?function(){location.href=e.upgradeUrl}:null,secondaryButton:(0,h.__)("Activate license","wpide"),secondaryButtonCallback:function(){e.openLicenseActivation()}}}var i={title:(0,h.__)("Premium Version Required","wpide"),message:(0,h.__)("It looks like you’re trying to access a feature that requires the Premium Version.","wpide"),button:this.upgradeUrl?this.isPremiumVersion?(0,h.__)("Buy License","wpide"):(0,h.__)("Unlock Access","wpide"):null,buttonCallback:this.upgradeUrl?function(){location.href=e.upgradeUrl}:null,secondaryButton:(0,h.__)("More info","wpide"),secondaryButtonCallback:function(){location.href="https://wpide.com"}};return this.isPremiumVersion&&document.querySelector(".activate-license.wpide a")&&(i.message+=" "+(0,h.__)("If you already have a license key, please activate it.","wpide"),i.secondaryButton=(0,h.__)("Activate License","wpide"),i.secondaryButtonCallback=function(){document.querySelector(".activate-license.wpide a").click()}),i},showModalPrompt:function(e,t,n,i){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=this.$createElement,o=s("input",{class:{"form-control":!0},domProps:(0,k.A)({maxlength:100,required:!1},t),on:{input:function(e){self.value=e.target.value}}}),r=s("div",{class:["form-group"]},[s("label",{class:["form-label"]},[e]),s("div",{class:["form-control-wrap"]},[o])]);this.showModal("","Modal/ModalBody",{node:r},(0,k.A)({hideHeader:!0,okTitle:n,okOnly:!1,ok:function(){i(o.elm.value)}},a))},showModalConfirm:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.showModal((0,h.__)("Confirmation","wpide"),"Modal/ModalBody",{body:(0,h.__)("Are you sure you want to do this?","wpide")},(0,k.A)({okVariant:"danger",okTitle:e,okOnly:!1,ok:t},n))},showModalDialog:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{};this.showModal(e,"Modal/ModalBody",{body:t},(0,k.A)({okTitle:n,ok:i,okOnly:!a,cancelTitle:a,cancel:s},o))},openLicenseActivation:function(e){var t=document.querySelector(".activate-license.wpide a"),n=(window.WPIDE.account_links||[]).find(function(e){return"account"===e.id});(t||n)&&(e&&e.preventDefault(),t?t.click():location.href=n.url)},showPremiumFeatureModal:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t="string"==typeof e?e:"";e="string"==typeof e?{}:e;var n=this.getPremiumMessageData(t);this.showModalDialog(n.title,n.message,n.button,n.buttonCallback,n.secondaryButton,n.secondaryButtonCallback,e)},showModal:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this.$store.commit("setModal",{enabled:!0,title:e,component:t,props:n,args:(0,k.A)({size:"sm",buttonSize:"md",footerClass:"modal-footer-sm bg-light",cancelTitle:(0,h.__)("Cancel","wpide"),okOnly:!0},i)})},showExistingModal:function(){this.$store.commit("showModal")},componentModalExists:function(e){return this.$store.state.modal.component===e},hideModal:function(){this.$store.commit("hideModal")},updateModal:function(e,t){this.$store.commit("updateModal",{title:e,args:t})},is:function(e){return this.$store.state.user.role==e},can:function(e){return this.$store.getters.hasPermissions(e)},formatBytes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(0===e)return"0 Bytes";var n=t<0?0:t,i=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,i)).toFixed(n))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]},formatDate:function(e){return(0,_.A)((0,C.A)(e),new Date)},isString:function(e){return"string"==typeof e||e instanceof String},isNumeric:function(e){var t=[" ","\n","\r","\t","\f","\v"," "," "," "," "," "," "," "," "," "," "," "," ","","\u2028","\u2029"," "].join("");return("number"==typeof e||"string"==typeof e&&-1===t.indexOf(e.slice(-1)))&&""!==e&&!isNaN(e)},checkUser:function(){var e=this;return S.A.getUser().then(function(t){t&&t.username!==P.state.user.username&&e.$store.commit("destroyUser",t)})},planAllows:function(e){var t=this.plan.features&&this.plan.features[e];return t?!!t.allowed:this.premium},planBadge:function(e){return this.planAllows(e)?"":this.premium&&this.planFor(e)?this.planFor(e).toUpperCase():"PRO"},planFor:function(e){var t=this.plan.features&&this.plan.features[e];return t?t.plan:""},handleError:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=(0,h.__)("Something went wrong!","wpide");if(e&&"string"==typeof e)i=e;else if(e&&e.response&&e.response.data&&e.response.data.data){var a=e.response.data.data;i="object"===(0,v.A)(a)&&a.message?a.message:a}this.$bvToast.toast(i,{title:null,variant:"is-danger",toaster:"b-toaster-bottom-right",duration:5e3,appendToast:n,noAutoHide:!t})},handleSuccess:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.$bvToast.hide(),this.$bvToast.toast(e,{title:null,variant:"is-success",toaster:"b-toaster-bottom-right",bodyClass:"",duration:5e3,appendToast:n,noAutoHide:!t})},capitalize:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},goTo:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.$router.push(this.routePath(e,t,n)).catch(function(){})},routePath:function(e){return{name:e,query:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},params:arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}}},pluginInfo:function(e){return P.state.plugin.hasOwnProperty(e)?P.state.plugin[e]:null},cloneObj:function(e){return JSON.parse(JSON.stringify(e))},isFullscreen:function(){return this.$fullscreen.isFullscreen},toggleFullscreen:function(){this.$fullscreen.toggle()},getRootFolderName:function(){return"/"===this.getConfig("file.root","/")?window.WPIDE.fm_wp_dir:this.getConfig("file.root").split("/").reverse()[0]},getConfigField:function(e){e=Array.isArray(e)?e:e.split(".");for(var t=window.WPIDE.config_fields,n=e.shift();void 0!==n;){if("object"!==(0,v.A)(t))return t;if(!t.hasOwnProperty(n))return null;t=t[n],n=e.shift()}return t},getDefaultConfig:function(e){e=Array.isArray(e)?e:e.split(".");for(var t=P.state.defaultConfig,n=e.shift();void 0!==n;){if("object"!==(0,v.A)(t))return t;if(!t.hasOwnProperty(n))return null;t=t[n],n=e.shift()}return t},getConfig:function(e,t){t=void 0!==t?t:this.getDefaultConfig(e);var n=this.getConfigField(e);if(n&&n.hasOwnProperty("premium")&&!this.premium)return t;e=Array.isArray(e)?e:e.split(".");for(var i=P.state.config,a=e.shift();void 0!==a;){if("object"!==(0,v.A)(i))return i;if(!i.hasOwnProperty(a))return t;i=i[a],a=e.shift()}return i},configIs:function(e,t){return this.getConfig(e)===t},updateConfig:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=P.state.config,a=e.split("."),s=a.pop();if(a.reduce(function(e,t){return e[t]=e[t]||{}},i)[s]=t,this.$store.commit("setConfig",i),n)return S.A.updateConfig(e,t)}}};const M=y;a.default.use(b.Ay);const P=new b.Ay.Store({state:{loading:!1,initialized:!1,config:{},defaultConfig:{},plugin:{},user:{role:"guest",permissions:[],name:"",username:""},cwd:{location:"/",content:[]},tree:{},downloads:[],modal:{enabled:!1,title:"",component:null,props:{},args:{}},imageEditorEnabled:!1},getters:{hasPermissions:function(e){return function(t){return Array.isArray(t)?(0,w.intersection)(e.user.permissions,t).length==t.length:!!e.user.permissions.find(function(e){return e==t})}}},mutations:{initialize:function(e){this.commit("resetCwd"),this.commit("resetTree"),this.commit("destroyUser"),e.initialized=!0},resetCwd:function(e){e.cwd={location:"/",content:[]}},resetTree:function(e){e.tree={path:"/",name:M.methods.getRootFolderName(),children:[],type:"dir"}},setLoading:function(e,t){e.loading=t},setPluginInfo:function(e,t){e.plugin=t},setConfig:function(e,t){e.config=t},setDefaultConfig:function(e,t){e.defaultConfig=t},setUser:function(e,t){e.user=t},destroyUser:function(e){e.user={role:"guest",permissions:[],name:"",username:""}},setCwd:function(e,t){e.cwd.location=t.location,e.cwd.content=[],(0,w.sortBy)(t.content,[function(e){return e.type.toLowerCase()}]).forEach(function(t){e.cwd.content.push(t)})},updateTreeNode:function(e,t){var n=function(e){for(var i in e)if(e.hasOwnProperty(i)){if("path"===i&&e[i]===t.path)return void Object.assign(e,{path:t.path,children:t.children});"object"===(0,v.A)(e[i])&&n(e[i])}};n(e.tree)},setModal:function(e,t){e.modal=t},showModal:function(e){e.modal.title&&e.modal.component&&(e.modal.enabled=!0)},hideModal:function(e){e.modal.enabled=!1},updateModal:function(e,t){t.title&&(e.modal.title=t.title),t.args&&(e.modal.args=Object.assign({},e.modal.args,t.args))},setImageEditorEnabled:function(e,t){e.imageEditorEnabled=t}}});var j=n(38292),F=n(55448),A=n.n(F),E=n(18418),D=n.n(E),I=n(17318),L=n(12206),T=n.n(L);n(59313);a.default.config.productionTip=!1,a.default.config.baseURL=window.WPIDE.ajax_url;var $=function(e){return document.querySelector('#toplevel_page_wpide li a[href*="page='.concat(window.WPIDE.plugin.slug,"#").concat(e,'"]'))};a.default.use(j.vGs),a.default.use(I.Ay,{preLoad:1.3}),a.default.use(D(),{sessionKey:window.WPIDE.plugin.slug+"SessionKey"}),a.default.use(A(),{instances:[{name:window.WPIDE.plugin.slug,storeName:"folder_sizes"}]}),a.default.use(T()),a.default.mixin(M),g.afterEach(function(e,t){a.default.nextTick(function(){document.title=window.WPIDE.plugin.name+(e.meta.title?" | "+e.meta.title:"");var n=$(e.path),i=t&&t.path?$(t.path):null;n&&t&&t.name&&document.body.classList.contains(t.name)&&(document.body.classList.remove(t.name),i&&i.closest("li").classList.remove("current")),n&&e.name&&!document.body.classList.contains(e.name)&&(document.body.classList.add(e.name),n.closest("li").classList.add("current"))})}),new a.default({router:g,store:P,data:function(){return{adminMenuScrolling:!1}},watch:{"$route.name":function(e,t){var n=this;"settings"===t&&"settings"!==e&&S.A.getConfig().then(function(e){n.updateConfig("file.root",e.data.data.config.file.root,!1)}).catch(function(){})}},created:function(){this.init()},mounted:function(){document.body.addEventListener("wpide_error",this.onError,!1)},beforeDestroy:function(){document.body.removeEventListener("wpide_error",this.onError,!1)},methods:{init:function(){this.loading(),this.$store.commit("setPluginInfo",window.WPIDE.plugin),this.loadConfig(),this.fixWpMenu()},loadConfig:function(){var e=this;return S.A.getConfig().then(function(t){e.$store.commit("setConfig",t.data.data.config),e.$store.commit("setDefaultConfig",t.data.data.defaults),S.A.getUser().then(function(t){e.$store.commit("initialize"),e.$store.commit("setUser",t)}).catch(function(t){console.log(t),e.$bvToast.toast((0,h.__)("Something went wrong!","wpide"),{title:(0,h.__)("Error","wpide"),variant:"danger",toaster:"b-toaster-bottom-right",appendToast:!1})})}).catch(function(t){console.log(t),e.$bvToast.toast((0,h.__)("Something went wrong!","wpide"),{title:(0,h.__)("Error","wpide"),variant:"danger",toaster:"b-toaster-bottom-right",appendToast:!0})}).finally(function(){e.idle()})},fixWpMenu:function(){var e=document.getElementById("adminmenuwrap"),t=document.getElementById("adminmenu"),n=document.getElementById("wpcontent"),a=document.querySelector('#toplevel_page_wpide li a[href="#divider"]');a&&!a.closest("li").nextSibling&&a.remove(),document.querySelectorAll('#toplevel_page_wpide li a[href*="page="]').forEach(function(e){try{var t=new URL(e.href,window.location.origin),n=t.searchParams.get("page");if(!n)return;var a=n.split("#"),s=(0,i.A)(a,2),o=s[0],r=s[1];if(o!==window.WPIDE.plugin.slug||!r)return;t.searchParams.set("page",o),t.hash=r.startsWith("/")?r:"/".concat(r),e.href=t.toString()}catch(e){console.log(e)}}),t.addEventListener("mouseover",function(){e.classList.add("hover")}),t.addEventListener("mouseleave",function(){e.classList.remove("hover")}),n.addEventListener("mouseover",function(){e.classList.remove("hover")}),this.premium||m.filter(function(e){return e.hasOwnProperty("premium")&&e.premium}).forEach(function(e){var t=$(e.path);t&&t.closest("li").classList.add("premium")})},onError:function(e){this.handleError(e.detail),this.idle()}},render:function(e){return e(u)}}).$mount("#wpide-app")},87608(e,t,n){n.p=window.WPIDE.assets_url},46971(e,t,n){var i={"./ConfigManager/ConstantForm":[3908,[3729]],"./ConfigManager/ConstantForm.vue":[3908,[3729]],"./ConfigManager/ListItem":[24809,[5890]],"./ConfigManager/ListItem.vue":[24809,[5890]],"./DbManager/SearchReplace":[19650,[93]],"./DbManager/SearchReplace.vue":[19650,[93]],"./DbManager/Table":[41361,[3653]],"./DbManager/Table.vue":[41361,[3653]],"./DbManager/TableRowForm":[51117,[869]],"./DbManager/TableRowForm.vue":[51117,[869]],"./DbManager/TablesTree":[334,[9444]],"./DbManager/TablesTree.vue":[334,[9444]],"./DbManager/easy-table-dark.less":[38113,[8119]],"./DbManager/easy-table-default.less":[83528,[2888]],"./FileManager/AceEditor":[60967,[139]],"./FileManager/AceEditor.vue":[60967,[139]],"./FileManager/CodeDiff":[12829,[8641]],"./FileManager/CodeDiff.vue":[12829,[8641]],"./FileManager/Download":[11794,[8979]],"./FileManager/Download.vue":[11794,[8979]],"./FileManager/Editor":[75688,[1632]],"./FileManager/Editor.vue":[75688,[1632]],"./FileManager/FilesItemActions":[84267,[4574]],"./FileManager/FilesItemActions.vue":[84267,[4574]],"./FileManager/FilesList":[204,[5776]],"./FileManager/FilesList.vue":[204,[5776]],"./FileManager/FilesListItem":[95421,[1869]],"./FileManager/FilesListItem.vue":[95421,[1869]],"./FileManager/FilesPreview":[7238,[4228]],"./FileManager/FilesPreview.vue":[7238,[4228]],"./FileManager/Gallery":[68713,[559]],"./FileManager/Gallery.vue":[68713,[559]],"./FileManager/GridView":[47799,[5388]],"./FileManager/GridView.vue":[47799,[5388]],"./FileManager/GroupView":[94372,[9111]],"./FileManager/GroupView.vue":[94372,[9111]],"./FileManager/ImageEditor":[48337,[2857]],"./FileManager/ImageEditor.vue":[48337,[2857]],"./FileManager/ListView":[80573,[1100]],"./FileManager/ListView.vue":[80573,[1100]],"./FileManager/MediaPlayer":[39114,[3582]],"./FileManager/MediaPlayer.vue":[39114,[3582]],"./FileManager/SortDropdown":[36565,[4404]],"./FileManager/SortDropdown.vue":[36565,[4404]],"./FileManager/Tree":[2591,[3287]],"./FileManager/Tree.vue":[2591,[3287]],"./FileManager/TreeNode":[41322,[2351]],"./FileManager/TreeNode.vue":[41322,[2351]],"./FileManager/Upload":[79002,[940]],"./FileManager/Upload.vue":[79002,[940]],"./Header":[79987,[]],"./Header.vue":[79987,[]],"./ImageOptimizer/MediaOptimizer":[87313,[2667]],"./ImageOptimizer/MediaOptimizer.vue":[87313,[2667]],"./Loading":[67427,[]],"./Loading.vue":[67427,[]],"./Modal/Modal":[91445,[]],"./Modal/Modal.vue":[91445,[]],"./Modal/ModalBody":[46307,[3914]],"./Modal/ModalBody.vue":[46307,[3914]],"./Settings/SettingControl":[64132,[1962]],"./Settings/SettingControl.vue":[64132,[1962]],"./Settings/SettingControlRepeater":[53027,[2766]],"./Settings/SettingControlRepeater.vue":[53027,[2766]],"./Settings/SettingFields":[80793,[6148]],"./Settings/SettingFields.vue":[80793,[6148]],"./Settings/SettingFoldersControl":[74024,[6109]],"./Settings/SettingFoldersControl.vue":[74024,[6109]],"./Snippets/AiAssistant":[67743,[4868]],"./Snippets/AiAssistant.vue":[67743,[4868]],"./Snippets/AiCredits":[70389,[8986]],"./Snippets/AiCredits.vue":[70389,[8986]],"./Snippets/Cloud":[54003,[2001]],"./Snippets/Cloud.vue":[54003,[2001]],"./Snippets/CodeEditor":[96198,[5618]],"./Snippets/CodeEditor.vue":[96198,[5618]],"./Snippets/ConditionValue":[3600,[4712]],"./Snippets/ConditionValue.vue":[3600,[4712]],"./Snippets/ConditionsBuilder":[81020,[7821]],"./Snippets/ConditionsBuilder.vue":[81020,[7821]],"./Snippets/EventLog":[95986,[1568]],"./Snippets/EventLog.vue":[95986,[1568]],"./Snippets/GeneratorField":[88665,[1143]],"./Snippets/GeneratorField.vue":[88665,[1143]],"./Snippets/Generators":[68303,[2160]],"./Snippets/Generators.vue":[68303,[2160]],"./Snippets/GlobalScripts":[48341,[3181]],"./Snippets/GlobalScripts.vue":[48341,[3181]],"./Snippets/ImportExport":[25559,[3307]],"./Snippets/ImportExport.vue":[25559,[3307]],"./Snippets/Library":[29683,[5779]],"./Snippets/Library.vue":[29683,[5779]],"./Snippets/LibraryAuthor":[58998,[7118]],"./Snippets/LibraryAuthor.vue":[58998,[7118]],"./Snippets/LibraryMine":[40400,[7630]],"./Snippets/LibraryMine.vue":[40400,[7630]],"./Snippets/LibraryPacks":[86084,[3015]],"./Snippets/LibraryPacks.vue":[86084,[3015]],"./Snippets/ProUpsell":[8103,[6724]],"./Snippets/ProUpsell.vue":[8103,[6724]],"./Snippets/PublishToLibrary":[38264,[5077]],"./Snippets/PublishToLibrary.vue":[38264,[5077]],"./Snippets/SitePreview":[91341,[5085]],"./Snippets/SitePreview.vue":[91341,[5085]],"./Snippets/SnippetEditor":[73257,[8062]],"./Snippets/SnippetEditor.vue":[73257,[8062]],"./Snippets/SnippetSettings":[65637,[8974]],"./Snippets/SnippetSettings.vue":[65637,[8974]],"./Snippets/SnippetsList":[50139,[1468]],"./Snippets/SnippetsList.vue":[50139,[1468]],"./Snippets/SnippetsModal":[60359,[2759]],"./Snippets/SnippetsModal.vue":[60359,[2759]],"./Snippets/SpecialFiles":[30097,[3960]],"./Snippets/SpecialFiles.vue":[30097,[3960]],"./Snippets/Tracking":[9829,[7433]],"./Snippets/Tracking.vue":[9829,[7433]],"./Snippets/state":[43983,[4233]],"./Snippets/state.js":[43983,[4233]]};function a(e){try{if(!n.o(i,e))return Promise.resolve().then(()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t})}catch(e){return Promise.reject(e)}var t=i[e],a=t[0];return Promise.all(t[1].map(n.e)).then(()=>n(a))}a.keys=()=>Object.keys(i),a.id=46971,e.exports=a}},a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={id:e,loaded:!1,exports:{}};return i[e].call(n.exports,n,n.exports,s),n.loaded=!0,n.exports}s.m=i,s.amdD=function(){throw new Error("define cannot be used indirect")},e=[],s.O=(t,n,i,a)=>{if(!n){var o=1/0;for(u=0;u<e.length;u++){for(var[n,i,a]=e[u],r=!0,c=0;c<n.length;c++)(!1&a||o>=a)&&Object.keys(s.O).every(e=>s.O[e](n[c]))?n.splice(c--,1):(r=!1,a<o&&(o=a));if(r){e.splice(u--,1);var l=i();void 0!==l&&(t=l)}}return t}a=a||0;for(var u=e.length;u>0&&e[u-1][2]>a;u--)e[u]=e[u-1];e[u]=[n,i,a]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce((t,n)=>(s.f[n](e,t),t),[])),s.u=e=>3729===e?"js/chunks/ConfigManager/ConfigManager-ConstantForm.js?_hash=a4f65519":5890===e?"js/chunks/ConfigManager/ConfigManager-ListItem.js?_hash=5a8cf4d0":93===e?"js/chunks/DbManager/DbManager-SearchReplace.js?_hash=04840746":3653===e?"js/chunks/DbManager/DbManager-Table.js?_hash=8b35df83":869===e?"js/chunks/DbManager/DbManager-TableRowForm.js?_hash=b2785fbd":9444===e?"js/chunks/DbManager/DbManager-TablesTree.js?_hash=901bdc80":8119===e?"js/chunks/DbManager/DbManager-easy-table-dark-less.js?_hash=a0e86b7d":2888===e?"js/chunks/DbManager/DbManager-easy-table-default-less.js?_hash=93c67a88":139===e?"js/chunks/FileManager/FileManager-AceEditor.js?_hash=9487dff7":8641===e?"js/chunks/FileManager/FileManager-CodeDiff.js?_hash=800b8dfa":8979===e?"js/chunks/FileManager/FileManager-Download.js?_hash=3c6e1958":1632===e?"js/chunks/FileManager/FileManager-Editor.js?_hash=1422a8f5":4574===e?"js/chunks/FileManager/FileManager-FilesItemActions.js?_hash=bb0408e1":5776===e?"js/chunks/FileManager/FileManager-FilesList.js?_hash=c7f6672e":1869===e?"js/chunks/FileManager/FileManager-FilesListItem.js?_hash=a4d41b2e":4228===e?"js/chunks/FileManager/FileManager-FilesPreview.js?_hash=36bd2bd6":559===e?"js/chunks/FileManager/FileManager-Gallery.js?_hash=bf4dd1c6":5388===e?"js/chunks/FileManager/FileManager-GridView.js?_hash=e1d4358b":9111===e?"js/chunks/FileManager/FileManager-GroupView.js?_hash=dc6fe02e":2857===e?"js/chunks/FileManager/FileManager-ImageEditor.js?_hash=22808d70":1100===e?"js/chunks/FileManager/FileManager-ListView.js?_hash=7890d082":3582===e?"js/chunks/FileManager/FileManager-MediaPlayer.js?_hash=c91dc8f4":4404===e?"js/chunks/FileManager/FileManager-SortDropdown.js?_hash=57ab5fa6":3287===e?"js/chunks/FileManager/FileManager-Tree.js?_hash=f0352578":2351===e?"js/chunks/FileManager/FileManager-TreeNode.js?_hash=2b5f9942":940===e?"js/chunks/FileManager/FileManager-Upload.js?_hash=de2bb2dc":2667===e?"js/chunks/ImageEditor/ImageEditor-MediaOptimizer.js?_hash=eec2f86a":3914===e?"js/chunks/Modal/Modal-ModalBody.js?_hash=ccb937cd":1962===e?"js/chunks/Settings/Settings-SettingControl.js?_hash=42083002":2766===e?"js/chunks/Settings/Settings-SettingControlRepeater.js?_hash=ad93aec1":6148===e?"js/chunks/Settings/Settings-SettingFields.js?_hash=64c68acf":6109===e?"js/chunks/Settings/Settings-SettingFoldersControl.js?_hash=a10a9a4b":4868===e?"js/chunks/Snippets/Snippets-AiAssistant.js?_hash=6e4c37c3":8986===e?"js/chunks/Snippets/Snippets-AiCredits.js?_hash=52577121":2001===e?"js/chunks/Snippets/Snippets-Cloud.js?_hash=8b80b911":5618===e?"js/chunks/Snippets/Snippets-CodeEditor.js?_hash=0dedb086":4712===e?"js/chunks/Snippets/Snippets-ConditionValue.js?_hash=c46920ef":7821===e?"js/chunks/Snippets/Snippets-ConditionsBuilder.js?_hash=0451a772":1568===e?"js/chunks/Snippets/Snippets-EventLog.js?_hash=fff0ec10":1143===e?"js/chunks/Snippets/Snippets-GeneratorField.js?_hash=713cb365":2160===e?"js/chunks/Snippets/Snippets-Generators.js?_hash=f84764a6":3181===e?"js/chunks/Snippets/Snippets-GlobalScripts.js?_hash=8327c255":3307===e?"js/chunks/Snippets/Snippets-ImportExport.js?_hash=7c230823":5779===e?"js/chunks/Snippets/Snippets-Library.js?_hash=a4bf77b9":7118===e?"js/chunks/Snippets/Snippets-LibraryAuthor.js?_hash=2d04347a":7630===e?"js/chunks/Snippets/Snippets-LibraryMine.js?_hash=9f859f53":3015===e?"js/chunks/Snippets/Snippets-LibraryPacks.js?_hash=2a3b8de1":6724===e?"js/chunks/Snippets/Snippets-ProUpsell.js?_hash=24c83125":5077===e?"js/chunks/Snippets/Snippets-PublishToLibrary.js?_hash=2162fcb1":5085===e?"js/chunks/Snippets/Snippets-SitePreview.js?_hash=b7643a5f":8062===e?"js/chunks/Snippets/Snippets-SnippetEditor.js?_hash=d348549d":8974===e?"js/chunks/Snippets/Snippets-SnippetSettings.js?_hash=c81dc9da":1468===e?"js/chunks/Snippets/Snippets-SnippetsList.js?_hash=ef1ebab5":2759===e?"js/chunks/Snippets/Snippets-SnippetsModal.js?_hash=44479fdc":3960===e?"js/chunks/Snippets/Snippets-SpecialFiles.js?_hash=cd3c301c":7433===e?"js/chunks/Snippets/Snippets-Tracking.js?_hash=3aeea0a7":4233===e?"js/chunks/Snippets/Snippets-state.js?_hash=b063f01e":3910===e?"js/chunks/FileManager/FileManager.js?_hash=9a22fcaf":5857===e?"js/chunks/ImageEditor/ImageEditor.js?_hash=4e00092e":7606===e?"js/chunks/DbManager/DbManager.js?_hash=d5abd051":4154===e?"js/chunks/ConfigManager/ConfigManager.js?_hash=ea23fc81":8165===e?"js/chunks/Snippets/Snippets.js?_hash=c52a4ed1":8248===e?"js/chunks/Settings/Settings.js?_hash=796a71bb":1451===e?"js/chunks/Changelog/Changelog.js?_hash=6619157a":8106===e?"js/chunks/Premium/Premium.js?_hash=2f025a2e":9810===e?"js/chunks/NotFound/NotFound.js?_hash=d7621959":void 0,s.miniCssF=e=>"css/"+{93:"DbManager-SearchReplace",559:"FileManager-Gallery",869:"DbManager-TableRowForm",940:"FileManager-Upload",1100:"FileManager-ListView",1451:"Changelog",1468:"Snippets-SnippetsList",1568:"Snippets-EventLog",1632:"FileManager-Editor",1869:"FileManager-FilesListItem",2001:"Snippets-Cloud",2160:"Snippets-Generators",2351:"FileManager-TreeNode",2667:"ImageEditor-MediaOptimizer",2766:"Settings-SettingControlRepeater",2857:"FileManager-ImageEditor",2888:"DbManager-easy-table-default-less",3015:"Snippets-LibraryPacks",3181:"Snippets-GlobalScripts",3287:"FileManager-Tree",3307:"Snippets-ImportExport",3582:"FileManager-MediaPlayer",3653:"DbManager-Table",3910:"FileManager",3960:"Snippets-SpecialFiles",4154:"ConfigManager",4712:"Snippets-ConditionValue",4868:"Snippets-AiAssistant",5077:"Snippets-PublishToLibrary",5085:"Snippets-SitePreview",5388:"FileManager-GridView",5776:"FileManager-FilesList",5779:"Snippets-Library",5857:"ImageEditor",5890:"ConfigManager-ListItem",6148:"Settings-SettingFields",6724:"Snippets-ProUpsell",7118:"Snippets-LibraryAuthor",7433:"Snippets-Tracking",7606:"DbManager",7630:"Snippets-LibraryMine",7821:"Snippets-ConditionsBuilder",8062:"Snippets-SnippetEditor",8119:"DbManager-easy-table-dark-less",8165:"Snippets",8248:"Settings",8641:"FileManager-CodeDiff",8974:"Snippets-SnippetSettings",8986:"Snippets-AiCredits",9111:"FileManager-GroupView",9444:"DbManager-TablesTree"}[e]+".css?_hash="+{93:"dc9669cd",559:"df8dc3d1",869:"575a2b2b",940:"0fca59a8",1100:"6fd13d4a",1451:"aa0b8006",1468:"ddcd54f9",1568:"252372b6",1632:"38cd2052",1869:"213dc083",2001:"c521f1ad",2160:"52893497",2351:"72f4e5dd",2667:"1743355e",2766:"b441f6ed",2857:"3ec2db87",2888:"add0baeb",3015:"5ebbb4cc",3181:"11925062",3287:"a07fed27",3307:"2d714886",3582:"e168dcd2",3653:"2b5ffcb5",3910:"957955d9",3960:"c6e41eb8",4154:"47f12098",4712:"ac2e53cd",4868:"c28c69ad",5077:"4ab1d7ee",5085:"678ac6cd",5388:"213dc083",5776:"213dc083",5779:"ae6b65d4",5857:"b22f60eb",5890:"47f12098",6148:"eee5afa1",6724:"7cd4e7bc",7118:"96ac6417",7433:"a7008003",7606:"cd3cb312",7630:"36450039",7821:"b402d8af",8062:"573ee484",8119:"e73dfc75",8165:"f5630ceb",8248:"8f3e7e14",8641:"4c56bde8",8974:"411dacbe",8986:"08a77d11",9111:"213dc083",9444:"dbd48afc"}[e],s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},n="wpide:",s.l=(e,i,a,o)=>{if(t[e])t[e].push(i);else{var r,c;if(void 0!==a)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var d=l[u];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==n+a){r=d;break}}r||(c=!0,(r=document.createElement("script")).charset="utf-8",s.nc&&r.setAttribute("nonce",s.nc),r.setAttribute("data-webpack",n+a),r.src=e),t[e]=[i];var p=(n,i)=>{r.onerror=r.onload=null,clearTimeout(h);var a=t[e];if(delete t[e],r.parentNode&&r.parentNode.removeChild(r),a&&a.forEach(e=>e(i)),n)return n(i)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=p.bind(null,r.onerror),r.onload=p.bind(null,r.onload),c&&document.head.appendChild(r)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),s.p="",(()=>{if("undefined"!=typeof document){var e=e=>new Promise((t,n)=>{var i=s.miniCssF(e),a=s.p+i;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),i=0;i<n.length;i++){var a=(o=n[i]).getAttribute("data-href")||o.getAttribute("href");if("stylesheet"===o.rel&&(a===e||a===t))return o}var s=document.getElementsByTagName("style");for(i=0;i<s.length;i++){var o;if((a=(o=s[i]).getAttribute("data-href"))===e||a===t)return o}})(i,a))return t();((e,t,n,i,a)=>{var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",s.nc&&(o.nonce=s.nc),o.onerror=o.onload=n=>{if(o.onerror=o.onload=null,"load"===n.type)i();else{var s=n&&n.type,r=n&&n.target&&n.target.href||t,c=new Error("Loading CSS chunk "+e+" failed.\n("+s+": "+r+")");c.name="ChunkLoadError",c.code="CSS_CHUNK_LOAD_FAILED",c.type=s,c.request=r,o.parentNode&&o.parentNode.removeChild(o),a(c)}},o.href=t,n?n.parentNode.insertBefore(o,n.nextSibling):document.head.appendChild(o)})(e,a,null,t,n)}),t={3524:0};s.f.miniCss=(n,i)=>{t[n]?i.push(t[n]):0!==t[n]&&{93:1,559:1,869:1,940:1,1100:1,1451:1,1468:1,1568:1,1632:1,1869:1,2001:1,2160:1,2351:1,2667:1,2766:1,2857:1,2888:1,3015:1,3181:1,3287:1,3307:1,3582:1,3653:1,3910:1,3960:1,4154:1,4712:1,4868:1,5077:1,5085:1,5388:1,5776:1,5779:1,5857:1,5890:1,6148:1,6724:1,7118:1,7433:1,7606:1,7630:1,7821:1,8062:1,8119:1,8165:1,8248:1,8641:1,8974:1,8986:1,9111:1,9444:1}[n]&&i.push(t[n]=e(n).then(()=>{t[n]=0},e=>{throw delete t[n],e}))}}})(),(()=>{var e={3524:0};s.f.j=(t,n)=>{var i=s.o(e,t)?e[t]:void 0;if(0!==i)if(i)n.push(i[2]);else{var a=new Promise((n,a)=>i=e[t]=[n,a]);n.push(i[2]=a);var o=s.p+s.u(t),r=new Error;s.l(o,n=>{if(s.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var a=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;r.message="Loading chunk "+t+" failed.\n("+a+": "+o+")",r.name="ChunkLoadError",r.type=a,r.request=o,i[1](r)}},"chunk-"+t,t)}},s.O.j=t=>0===e[t];var t=(t,n)=>{var i,a,[o,r,c]=n,l=0;if(o.some(t=>0!==e[t])){for(i in r)s.o(r,i)&&(s.m[i]=r[i]);if(c)var u=c(s)}for(t&&t(n);l<o.length;l++)a=o[l],s.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return s.O(u)},n=self.webpackChunkwpide=self.webpackChunkwpide||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var o=s.O(void 0,[504],()=>s(4409));o=s.O(o)})();13 redirect:window.WPIDE.premium?null:{name:"premium",query:{name:"config-manager"}},module:!0,config:null,premium:!0},{path:"/snippets",meta:{title:(0,h.__)("Snippets","wpide")},name:"snippets",icon:"ni-code",component:function(){return n.e(8165).then(n.bind(n,24235))},children:[{path:"",name:"snippets-list",meta:{title:(0,h.__)("Snippets","wpide")},component:function(){return n.e(1468).then(n.bind(n,50139))}},{path:"edit/:id?",name:"snippets-edit",meta:{title:(0,h.__)("Edit Snippet","wpide")},component:function(){return n.e(8062).then(n.bind(n,73257))}},{path:"library",name:"snippets-library",meta:{title:(0,h.__)("Snippet Library","wpide")},component:function(){return n.e(5779).then(n.bind(n,8999))}},{path:"generators",name:"snippets-generators",meta:{title:(0,h.__)("Generators","wpide")},component:function(){return n.e(2160).then(n.bind(n,68303))}},{path:"header-footer",name:"snippets-global",meta:{title:(0,h.__)("Header & Footer","wpide")},component:function(){return n.e(3181).then(n.bind(n,48341))}},{path:"files",name:"snippets-files",meta:{title:(0,h.__)("Special Files","wpide")},props:{feature:"files",page:!0},component:window.WPIDE.premium?function(){return n.e(3960).then(n.bind(n,30097))}:f},{path:"import-export",name:"snippets-import",meta:{title:(0,h.__)("Import & Export","wpide")},component:function(){return n.e(3307).then(n.bind(n,25559))}},{path:"cloud",name:"snippets-cloud",meta:{title:(0,h.__)("WPIDE Cloud","wpide")},props:{feature:"cloud",page:!0},component:window.WPIDE.premium?function(){return n.e(2001).then(n.bind(n,54003))}:f},{path:"tracking",name:"snippets-tracking",meta:{title:(0,h.__)("Conversion Tracking","wpide")},props:{feature:"tracking",page:!0},component:window.WPIDE.premium?function(){return n.e(7433).then(n.bind(n,9829))}:f},{path:"log",name:"snippets-log",meta:{title:(0,h.__)("Snippet Log","wpide")},component:function(){return n.e(1568).then(n.bind(n,95986))}},{path:"settings",name:"snippets-settings",redirect:{path:"/settings",query:{tab:"snippets"}}}],redirect:{name:"snippets-list"},module:!0,config:null,settings:function(){return n.e(8974).then(n.bind(n,65637))}},{path:"/settings",name:"settings",meta:{title:(0,h.__)("Settings","wpide")},icon:"ni-setting",component:function(){return n.e(8248).then(n.bind(n,59999))}},{path:"/changelog",name:"changelog",meta:{title:(0,h.__)("Changelog","wpide")},icon:"ni-notes-alt",component:function(){return n.e(1451).then(n.bind(n,95860))}},{path:"/account",name:"account",meta:{title:(0,h.__)("Account","wpide")},icon:"user-alt"},{path:"/premium",name:"premium",meta:{title:(0,h.__)("Premium Version Required","wpide")},icon:"ni-lock bg-danger-dim",component:function(){return n.e(8106).then(n.bind(n,99707))}},{path:"*",name:"404",meta:{title:(0,h.__)("Not found","wpide")},icon:"ni-sad bg-danger-dim",component:function(){return n.e(9810).then(n.bind(n,83921))}}]);const g=new d.Ay({mode:"hash",routes:m});var v=n(45929),b=(n(50113),n(64346),n(44114),n(20116),n(95353)),w=n(2543),k=n(7180),_=(n(25276),n(48598),n(72712),n(94490),n(34782),n(60739),n(18237),n(69112),n(33110),n(9868),n(79432),n(78459),n(13611),n(13531)),C=n(40001),S=n(93956),y={computed:{premium:function(){return!!window.WPIDE.premium},isPremiumVersion:function(){return!!window.WPIDE.is_premium_version},showFreemiusMenus:function(){return window.WPIDE.show_freemius_menus},showLicenseMenu:function(){return this.showFreemiusMenus&&this.isPremiumVersion},isLicenseActive:function(){return!!window.WPIDE.is_license_active},plan:function(){return window.WPIDE.plan||{pro:this.premium,tier:0,plan:"",features:{}}},appDom:function(){return this.$root.$children[0].$refs.app},pageTitle:function(){return this.$route.meta.title||this.$route.name},pageIcon:function(){var e;e=this.getConfig("general.dark_mode")?"icon ni bg-primary text-white":"icon ni bg-primary-dim";var t=this.$route.matched.length?this.$route.matched[0].name:null,n=this.findRoute(this.$route.name)||this.findRoute(t);return n?n.icon+" "+e:null},assetsUrl:function(){return window.WPIDE.assets_url},imagesUrl:function(){return window.WPIDE.images_url},isLoading:function(){return this.$store.state.loading},isModalActive:function(){return this.$store.state.modal.enabled},upgradeUrl:function(){var e=window.WPIDE.account_links.find(function(e){return"_pricing"===e.id});return e?e.url:null}},methods:{__:function(e,t){return(0,h.__)(e,t)},sprintf:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return h.nv.apply(void 0,[e].concat(n))},loading:function(){this.$store.commit("setLoading",!0)},idle:function(){this.$store.commit("setLoading",!1)},findRoute:function(e){var t=m.find(function(t){return t.name===e});return t||null},getPremiumMessageData:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(this.premium&&this.plan.tier>0){var n=t?this.planFor(t):"";return{title:(0,h.__)("Upgrade your plan","wpide"),message:n?(0,h.nv)((0,h.__)("This is part of WPIDE %1$s and up. This site is on WPIDE %2$s.","wpide"),n,this.plan.plan):(0,h.nv)((0,h.__)("This is part of a higher WPIDE plan. This site is on WPIDE %s.","wpide"),this.plan.plan),button:this.upgradeUrl?n?(0,h.nv)((0,h.__)("Upgrade to %s","wpide"),n):(0,h.__)("See plans","wpide"):null,buttonCallback:this.upgradeUrl?function(){location.href=e.upgradeUrl}:null,secondaryButton:(0,h.__)("Activate license","wpide"),secondaryButtonCallback:function(){e.openLicenseActivation()}}}var i={title:(0,h.__)("Premium Version Required","wpide"),message:(0,h.__)("It looks like you’re trying to access a feature that requires the Premium Version.","wpide"),button:this.upgradeUrl?this.isPremiumVersion?(0,h.__)("Buy License","wpide"):(0,h.__)("Unlock Access","wpide"):null,buttonCallback:this.upgradeUrl?function(){location.href=e.upgradeUrl}:null,secondaryButton:(0,h.__)("More info","wpide"),secondaryButtonCallback:function(){location.href="https://wpide.com"}};return this.isPremiumVersion&&document.querySelector(".activate-license.wpide a")&&(i.message+=" "+(0,h.__)("If you already have a license key, please activate it.","wpide"),i.secondaryButton=(0,h.__)("Activate License","wpide"),i.secondaryButtonCallback=function(){document.querySelector(".activate-license.wpide a").click()}),i},showModalPrompt:function(e,t,n,i){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=this.$createElement,o=s("input",{class:{"form-control":!0},domProps:(0,k.A)({maxlength:100,required:!1},t),on:{input:function(e){self.value=e.target.value}}}),r=s("div",{class:["form-group"]},[s("label",{class:["form-label"]},[e]),s("div",{class:["form-control-wrap"]},[o])]);this.showModal("","Modal/ModalBody",{node:r},(0,k.A)({hideHeader:!0,okTitle:n,okOnly:!1,ok:function(){i(o.elm.value)}},a))},showModalConfirm:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.showModal((0,h.__)("Confirmation","wpide"),"Modal/ModalBody",{body:(0,h.__)("Are you sure you want to do this?","wpide")},(0,k.A)({okVariant:"danger",okTitle:e,okOnly:!1,ok:t},n))},showModalDialog:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{};this.showModal(e,"Modal/ModalBody",{body:t},(0,k.A)({okTitle:n,ok:i,okOnly:!a,cancelTitle:a,cancel:s},o))},openLicenseActivation:function(e){var t=document.querySelector(".activate-license.wpide a"),n=(window.WPIDE.account_links||[]).find(function(e){return"account"===e.id});(t||n)&&(e&&e.preventDefault(),t?t.click():location.href=n.url)},showPremiumFeatureModal:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t="string"==typeof e?e:"";e="string"==typeof e?{}:e;var n=this.getPremiumMessageData(t);this.showModalDialog(n.title,n.message,n.button,n.buttonCallback,n.secondaryButton,n.secondaryButtonCallback,e)},showModal:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this.$store.commit("setModal",{enabled:!0,title:e,component:t,props:n,args:(0,k.A)({size:"sm",buttonSize:"md",footerClass:"modal-footer-sm bg-light",cancelTitle:(0,h.__)("Cancel","wpide"),okOnly:!0},i)})},showExistingModal:function(){this.$store.commit("showModal")},componentModalExists:function(e){return this.$store.state.modal.component===e},hideModal:function(){this.$store.commit("hideModal")},updateModal:function(e,t){this.$store.commit("updateModal",{title:e,args:t})},is:function(e){return this.$store.state.user.role==e},can:function(e){return this.$store.getters.hasPermissions(e)},formatBytes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(0===e)return"0 Bytes";var n=t<0?0:t,i=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,i)).toFixed(n))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]},formatDate:function(e){return(0,_.A)((0,C.A)(e),new Date)},isString:function(e){return"string"==typeof e||e instanceof String},isNumeric:function(e){var t=[" ","\n","\r","\t","\f","\v"," "," "," "," "," "," "," "," "," "," "," "," ","","\u2028","\u2029"," "].join("");return("number"==typeof e||"string"==typeof e&&-1===t.indexOf(e.slice(-1)))&&""!==e&&!isNaN(e)},checkUser:function(){var e=this;return S.A.getUser().then(function(t){t&&t.username!==P.state.user.username&&e.$store.commit("destroyUser",t)})},planAllows:function(e){var t=this.plan.features&&this.plan.features[e];return t?!!t.allowed:this.premium},planBadge:function(e){return this.planAllows(e)?"":this.premium&&this.planFor(e)?this.planFor(e).toUpperCase():"PRO"},planFor:function(e){var t=this.plan.features&&this.plan.features[e];return t?t.plan:""},handleError:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=(0,h.__)("Something went wrong!","wpide");if(e&&"string"==typeof e)i=e;else if(e&&e.response&&e.response.data&&e.response.data.data){var a=e.response.data.data;i="object"===(0,v.A)(a)&&a.message?a.message:a}this.$bvToast.toast(i,{title:null,variant:"is-danger",toaster:"b-toaster-bottom-right",duration:5e3,appendToast:n,noAutoHide:!t})},handleSuccess:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.$bvToast.hide(),this.$bvToast.toast(e,{title:null,variant:"is-success",toaster:"b-toaster-bottom-right",bodyClass:"",duration:5e3,appendToast:n,noAutoHide:!t})},capitalize:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},goTo:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.$router.push(this.routePath(e,t,n)).catch(function(){})},routePath:function(e){return{name:e,query:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},params:arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}}},pluginInfo:function(e){return P.state.plugin.hasOwnProperty(e)?P.state.plugin[e]:null},cloneObj:function(e){return JSON.parse(JSON.stringify(e))},isFullscreen:function(){return this.$fullscreen.isFullscreen},toggleFullscreen:function(){this.$fullscreen.toggle()},getRootFolderName:function(){return"/"===this.getConfig("file.root","/")?window.WPIDE.fm_wp_dir:this.getConfig("file.root").split("/").reverse()[0]},getConfigField:function(e){e=Array.isArray(e)?e:e.split(".");for(var t=window.WPIDE.config_fields,n=e.shift();void 0!==n;){if("object"!==(0,v.A)(t))return t;if(!t.hasOwnProperty(n))return null;t=t[n],n=e.shift()}return t},getDefaultConfig:function(e){e=Array.isArray(e)?e:e.split(".");for(var t=P.state.defaultConfig,n=e.shift();void 0!==n;){if("object"!==(0,v.A)(t))return t;if(!t.hasOwnProperty(n))return null;t=t[n],n=e.shift()}return t},getConfig:function(e,t){t=void 0!==t?t:this.getDefaultConfig(e);var n=this.getConfigField(e);if(n&&n.hasOwnProperty("premium")&&!this.premium)return t;e=Array.isArray(e)?e:e.split(".");for(var i=P.state.config,a=e.shift();void 0!==a;){if("object"!==(0,v.A)(i))return i;if(!i.hasOwnProperty(a))return t;i=i[a],a=e.shift()}return i},configIs:function(e,t){return this.getConfig(e)===t},updateConfig:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=P.state.config,a=e.split("."),s=a.pop();if(a.reduce(function(e,t){return e[t]=e[t]||{}},i)[s]=t,this.$store.commit("setConfig",i),n)return S.A.updateConfig(e,t)}}};const M=y;a.default.use(b.Ay);const P=new b.Ay.Store({state:{loading:!1,initialized:!1,config:{},defaultConfig:{},plugin:{},user:{role:"guest",permissions:[],name:"",username:""},cwd:{location:"/",content:[]},tree:{},downloads:[],modal:{enabled:!1,title:"",component:null,props:{},args:{}},imageEditorEnabled:!1},getters:{hasPermissions:function(e){return function(t){return Array.isArray(t)?(0,w.intersection)(e.user.permissions,t).length==t.length:!!e.user.permissions.find(function(e){return e==t})}}},mutations:{initialize:function(e){this.commit("resetCwd"),this.commit("resetTree"),this.commit("destroyUser"),e.initialized=!0},resetCwd:function(e){e.cwd={location:"/",content:[]}},resetTree:function(e){e.tree={path:"/",name:M.methods.getRootFolderName(),children:[],type:"dir"}},setLoading:function(e,t){e.loading=t},setPluginInfo:function(e,t){e.plugin=t},setConfig:function(e,t){e.config=t},setDefaultConfig:function(e,t){e.defaultConfig=t},setUser:function(e,t){e.user=t},destroyUser:function(e){e.user={role:"guest",permissions:[],name:"",username:""}},setCwd:function(e,t){e.cwd.location=t.location,e.cwd.content=[],(0,w.sortBy)(t.content,[function(e){return e.type.toLowerCase()}]).forEach(function(t){e.cwd.content.push(t)})},updateTreeNode:function(e,t){var n=function(e){for(var i in e)if(e.hasOwnProperty(i)){if("path"===i&&e[i]===t.path)return void Object.assign(e,{path:t.path,children:t.children});"object"===(0,v.A)(e[i])&&n(e[i])}};n(e.tree)},setModal:function(e,t){e.modal=t},showModal:function(e){e.modal.title&&e.modal.component&&(e.modal.enabled=!0)},hideModal:function(e){e.modal.enabled=!1},updateModal:function(e,t){t.title&&(e.modal.title=t.title),t.args&&(e.modal.args=Object.assign({},e.modal.args,t.args))},setImageEditorEnabled:function(e,t){e.imageEditorEnabled=t}}});var j=n(38292),F=n(55448),A=n.n(F),E=n(18418),D=n.n(E),I=n(17318),L=n(12206),T=n.n(L);n(59313);a.default.config.productionTip=!1,a.default.config.baseURL=window.WPIDE.ajax_url;var $=function(e){return document.querySelector('#toplevel_page_wpide li a[href*="page='.concat(window.WPIDE.plugin.slug,"#").concat(e,'"]'))};a.default.use(j.vGs),a.default.use(I.Ay,{preLoad:1.3}),a.default.use(D(),{sessionKey:window.WPIDE.plugin.slug+"SessionKey"}),a.default.use(A(),{instances:[{name:window.WPIDE.plugin.slug,storeName:"folder_sizes"}]}),a.default.use(T()),a.default.mixin(M),g.afterEach(function(e,t){a.default.nextTick(function(){document.title=window.WPIDE.plugin.name+(e.meta.title?" | "+e.meta.title:"");var n=$(e.path),i=t&&t.path?$(t.path):null;n&&t&&t.name&&document.body.classList.contains(t.name)&&(document.body.classList.remove(t.name),i&&i.closest("li").classList.remove("current")),n&&e.name&&!document.body.classList.contains(e.name)&&(document.body.classList.add(e.name),n.closest("li").classList.add("current"))})}),new a.default({router:g,store:P,data:function(){return{adminMenuScrolling:!1}},watch:{"$route.name":function(e,t){var n=this;"settings"===t&&"settings"!==e&&S.A.getConfig().then(function(e){n.updateConfig("file.root",e.data.data.config.file.root,!1)}).catch(function(){})}},created:function(){this.init()},mounted:function(){document.body.addEventListener("wpide_error",this.onError,!1)},beforeDestroy:function(){document.body.removeEventListener("wpide_error",this.onError,!1)},methods:{init:function(){this.loading(),this.$store.commit("setPluginInfo",window.WPIDE.plugin),this.loadConfig(),this.fixWpMenu()},loadConfig:function(){var e=this;return S.A.getConfig().then(function(t){e.$store.commit("setConfig",t.data.data.config),e.$store.commit("setDefaultConfig",t.data.data.defaults),S.A.getUser().then(function(t){e.$store.commit("initialize"),e.$store.commit("setUser",t)}).catch(function(t){console.log(t),e.$bvToast.toast((0,h.__)("Something went wrong!","wpide"),{title:(0,h.__)("Error","wpide"),variant:"danger",toaster:"b-toaster-bottom-right",appendToast:!1})})}).catch(function(t){console.log(t),e.$bvToast.toast((0,h.__)("Something went wrong!","wpide"),{title:(0,h.__)("Error","wpide"),variant:"danger",toaster:"b-toaster-bottom-right",appendToast:!0})}).finally(function(){e.idle()})},fixWpMenu:function(){var e=document.getElementById("adminmenuwrap"),t=document.getElementById("adminmenu"),n=document.getElementById("wpcontent"),a=document.querySelector('#toplevel_page_wpide li a[href="#divider"]');a&&!a.closest("li").nextSibling&&a.remove(),document.querySelectorAll('#toplevel_page_wpide li a[href*="page="]').forEach(function(e){try{var t=new URL(e.href,window.location.origin),n=t.searchParams.get("page");if(!n)return;var a=n.split("#"),s=(0,i.A)(a,2),o=s[0],r=s[1];if(o!==window.WPIDE.plugin.slug||!r)return;t.searchParams.set("page",o),t.hash=r.startsWith("/")?r:"/".concat(r),e.href=t.toString()}catch(e){console.log(e)}}),t.addEventListener("mouseover",function(){e.classList.add("hover")}),t.addEventListener("mouseleave",function(){e.classList.remove("hover")}),n.addEventListener("mouseover",function(){e.classList.remove("hover")}),this.premium||m.filter(function(e){return e.hasOwnProperty("premium")&&e.premium}).forEach(function(e){var t=$(e.path);t&&t.closest("li").classList.add("premium")})},onError:function(e){this.handleError(e.detail),this.idle()}},render:function(e){return e(u)}}).$mount("#wpide-app")},87608(e,t,n){n.p=window.WPIDE.assets_url},46971(e,t,n){var i={"./ConfigManager/ConstantForm":[3908,[3729]],"./ConfigManager/ConstantForm.vue":[3908,[3729]],"./ConfigManager/ListItem":[24809,[5890]],"./ConfigManager/ListItem.vue":[24809,[5890]],"./DbManager/SearchReplace":[19650,[93]],"./DbManager/SearchReplace.vue":[19650,[93]],"./DbManager/Table":[41361,[3653]],"./DbManager/Table.vue":[41361,[3653]],"./DbManager/TableRowForm":[51117,[869]],"./DbManager/TableRowForm.vue":[51117,[869]],"./DbManager/TablesTree":[334,[9444]],"./DbManager/TablesTree.vue":[334,[9444]],"./DbManager/easy-table-dark.less":[38113,[8119]],"./DbManager/easy-table-default.less":[83528,[2888]],"./FileManager/AceEditor":[60967,[139]],"./FileManager/AceEditor.vue":[60967,[139]],"./FileManager/CodeDiff":[12829,[8641]],"./FileManager/CodeDiff.vue":[12829,[8641]],"./FileManager/Download":[11794,[8979]],"./FileManager/Download.vue":[11794,[8979]],"./FileManager/Editor":[75688,[1632]],"./FileManager/Editor.vue":[75688,[1632]],"./FileManager/FilesItemActions":[84267,[4574]],"./FileManager/FilesItemActions.vue":[84267,[4574]],"./FileManager/FilesList":[204,[5776]],"./FileManager/FilesList.vue":[204,[5776]],"./FileManager/FilesListItem":[95421,[1869]],"./FileManager/FilesListItem.vue":[95421,[1869]],"./FileManager/FilesPreview":[7238,[4228]],"./FileManager/FilesPreview.vue":[7238,[4228]],"./FileManager/Gallery":[68713,[559]],"./FileManager/Gallery.vue":[68713,[559]],"./FileManager/GridView":[47799,[5388]],"./FileManager/GridView.vue":[47799,[5388]],"./FileManager/GroupView":[94372,[9111]],"./FileManager/GroupView.vue":[94372,[9111]],"./FileManager/ImageEditor":[48337,[2857]],"./FileManager/ImageEditor.vue":[48337,[2857]],"./FileManager/ListView":[80573,[1100]],"./FileManager/ListView.vue":[80573,[1100]],"./FileManager/MediaPlayer":[39114,[3582]],"./FileManager/MediaPlayer.vue":[39114,[3582]],"./FileManager/SortDropdown":[36565,[4404]],"./FileManager/SortDropdown.vue":[36565,[4404]],"./FileManager/Tree":[2591,[3287]],"./FileManager/Tree.vue":[2591,[3287]],"./FileManager/TreeNode":[41322,[2351]],"./FileManager/TreeNode.vue":[41322,[2351]],"./FileManager/Upload":[79002,[940]],"./FileManager/Upload.vue":[79002,[940]],"./Header":[79987,[]],"./Header.vue":[79987,[]],"./ImageOptimizer/MediaOptimizer":[87313,[2667]],"./ImageOptimizer/MediaOptimizer.vue":[87313,[2667]],"./Loading":[67427,[]],"./Loading.vue":[67427,[]],"./Modal/Modal":[91445,[]],"./Modal/Modal.vue":[91445,[]],"./Modal/ModalBody":[46307,[3914]],"./Modal/ModalBody.vue":[46307,[3914]],"./Settings/SettingControl":[64132,[1962]],"./Settings/SettingControl.vue":[64132,[1962]],"./Settings/SettingControlRepeater":[53027,[2766]],"./Settings/SettingControlRepeater.vue":[53027,[2766]],"./Settings/SettingFields":[80793,[6148]],"./Settings/SettingFields.vue":[80793,[6148]],"./Settings/SettingFoldersControl":[74024,[6109]],"./Settings/SettingFoldersControl.vue":[74024,[6109]],"./Snippets/AiAssistant":[67743,[4868]],"./Snippets/AiAssistant.vue":[67743,[4868]],"./Snippets/AiCredits":[70389,[8986]],"./Snippets/AiCredits.vue":[70389,[8986]],"./Snippets/Cloud":[54003,[2001]],"./Snippets/Cloud.vue":[54003,[2001]],"./Snippets/CodeEditor":[96198,[5618]],"./Snippets/CodeEditor.vue":[96198,[5618]],"./Snippets/ConditionValue":[3600,[4712]],"./Snippets/ConditionValue.vue":[3600,[4712]],"./Snippets/ConditionsBuilder":[81020,[7821]],"./Snippets/ConditionsBuilder.vue":[81020,[7821]],"./Snippets/EventLog":[95986,[1568]],"./Snippets/EventLog.vue":[95986,[1568]],"./Snippets/GeneratorField":[88665,[1143]],"./Snippets/GeneratorField.vue":[88665,[1143]],"./Snippets/Generators":[68303,[2160]],"./Snippets/Generators.vue":[68303,[2160]],"./Snippets/GlobalScripts":[48341,[3181]],"./Snippets/GlobalScripts.vue":[48341,[3181]],"./Snippets/ImportExport":[25559,[3307]],"./Snippets/ImportExport.vue":[25559,[3307]],"./Snippets/Library":[8999,[5779]],"./Snippets/Library.vue":[8999,[5779]],"./Snippets/LibraryAuthor":[58998,[7118]],"./Snippets/LibraryAuthor.vue":[58998,[7118]],"./Snippets/LibraryMine":[40400,[7630]],"./Snippets/LibraryMine.vue":[40400,[7630]],"./Snippets/LibraryPacks":[86084,[3015]],"./Snippets/LibraryPacks.vue":[86084,[3015]],"./Snippets/ProUpsell":[8103,[6724]],"./Snippets/ProUpsell.vue":[8103,[6724]],"./Snippets/PublishToLibrary":[38264,[5077]],"./Snippets/PublishToLibrary.vue":[38264,[5077]],"./Snippets/SitePreview":[91341,[5085]],"./Snippets/SitePreview.vue":[91341,[5085]],"./Snippets/SnippetEditor":[73257,[8062]],"./Snippets/SnippetEditor.vue":[73257,[8062]],"./Snippets/SnippetSettings":[65637,[8974]],"./Snippets/SnippetSettings.vue":[65637,[8974]],"./Snippets/SnippetsList":[50139,[1468]],"./Snippets/SnippetsList.vue":[50139,[1468]],"./Snippets/SnippetsModal":[60359,[2759]],"./Snippets/SnippetsModal.vue":[60359,[2759]],"./Snippets/SpecialFiles":[30097,[3960]],"./Snippets/SpecialFiles.vue":[30097,[3960]],"./Snippets/Tracking":[9829,[7433]],"./Snippets/Tracking.vue":[9829,[7433]],"./Snippets/state":[43983,[4233]],"./Snippets/state.js":[43983,[4233]]};function a(e){try{if(!n.o(i,e))return Promise.resolve().then(()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t})}catch(e){return Promise.reject(e)}var t=i[e],a=t[0];return Promise.all(t[1].map(n.e)).then(()=>n(a))}a.keys=()=>Object.keys(i),a.id=46971,e.exports=a}},a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={id:e,loaded:!1,exports:{}};return i[e].call(n.exports,n,n.exports,s),n.loaded=!0,n.exports}s.m=i,s.amdD=function(){throw new Error("define cannot be used indirect")},e=[],s.O=(t,n,i,a)=>{if(!n){var o=1/0;for(u=0;u<e.length;u++){for(var[n,i,a]=e[u],r=!0,c=0;c<n.length;c++)(!1&a||o>=a)&&Object.keys(s.O).every(e=>s.O[e](n[c]))?n.splice(c--,1):(r=!1,a<o&&(o=a));if(r){e.splice(u--,1);var l=i();void 0!==l&&(t=l)}}return t}a=a||0;for(var u=e.length;u>0&&e[u-1][2]>a;u--)e[u]=e[u-1];e[u]=[n,i,a]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce((t,n)=>(s.f[n](e,t),t),[])),s.u=e=>3729===e?"js/chunks/ConfigManager/ConfigManager-ConstantForm.js?_hash=a4f65519":5890===e?"js/chunks/ConfigManager/ConfigManager-ListItem.js?_hash=5a8cf4d0":93===e?"js/chunks/DbManager/DbManager-SearchReplace.js?_hash=04840746":3653===e?"js/chunks/DbManager/DbManager-Table.js?_hash=8b35df83":869===e?"js/chunks/DbManager/DbManager-TableRowForm.js?_hash=b2785fbd":9444===e?"js/chunks/DbManager/DbManager-TablesTree.js?_hash=901bdc80":8119===e?"js/chunks/DbManager/DbManager-easy-table-dark-less.js?_hash=a0e86b7d":2888===e?"js/chunks/DbManager/DbManager-easy-table-default-less.js?_hash=93c67a88":139===e?"js/chunks/FileManager/FileManager-AceEditor.js?_hash=9487dff7":8641===e?"js/chunks/FileManager/FileManager-CodeDiff.js?_hash=800b8dfa":8979===e?"js/chunks/FileManager/FileManager-Download.js?_hash=3c6e1958":1632===e?"js/chunks/FileManager/FileManager-Editor.js?_hash=1422a8f5":4574===e?"js/chunks/FileManager/FileManager-FilesItemActions.js?_hash=bb0408e1":5776===e?"js/chunks/FileManager/FileManager-FilesList.js?_hash=c7f6672e":1869===e?"js/chunks/FileManager/FileManager-FilesListItem.js?_hash=a4d41b2e":4228===e?"js/chunks/FileManager/FileManager-FilesPreview.js?_hash=36bd2bd6":559===e?"js/chunks/FileManager/FileManager-Gallery.js?_hash=bf4dd1c6":5388===e?"js/chunks/FileManager/FileManager-GridView.js?_hash=e1d4358b":9111===e?"js/chunks/FileManager/FileManager-GroupView.js?_hash=dc6fe02e":2857===e?"js/chunks/FileManager/FileManager-ImageEditor.js?_hash=22808d70":1100===e?"js/chunks/FileManager/FileManager-ListView.js?_hash=7890d082":3582===e?"js/chunks/FileManager/FileManager-MediaPlayer.js?_hash=c91dc8f4":4404===e?"js/chunks/FileManager/FileManager-SortDropdown.js?_hash=57ab5fa6":3287===e?"js/chunks/FileManager/FileManager-Tree.js?_hash=f0352578":2351===e?"js/chunks/FileManager/FileManager-TreeNode.js?_hash=2b5f9942":940===e?"js/chunks/FileManager/FileManager-Upload.js?_hash=de2bb2dc":2667===e?"js/chunks/ImageEditor/ImageEditor-MediaOptimizer.js?_hash=eec2f86a":3914===e?"js/chunks/Modal/Modal-ModalBody.js?_hash=ccb937cd":1962===e?"js/chunks/Settings/Settings-SettingControl.js?_hash=42083002":2766===e?"js/chunks/Settings/Settings-SettingControlRepeater.js?_hash=ad93aec1":6148===e?"js/chunks/Settings/Settings-SettingFields.js?_hash=64c68acf":6109===e?"js/chunks/Settings/Settings-SettingFoldersControl.js?_hash=a10a9a4b":4868===e?"js/chunks/Snippets/Snippets-AiAssistant.js?_hash=6e4c37c3":8986===e?"js/chunks/Snippets/Snippets-AiCredits.js?_hash=52577121":2001===e?"js/chunks/Snippets/Snippets-Cloud.js?_hash=8b80b911":5618===e?"js/chunks/Snippets/Snippets-CodeEditor.js?_hash=0dedb086":4712===e?"js/chunks/Snippets/Snippets-ConditionValue.js?_hash=c46920ef":7821===e?"js/chunks/Snippets/Snippets-ConditionsBuilder.js?_hash=0451a772":1568===e?"js/chunks/Snippets/Snippets-EventLog.js?_hash=fff0ec10":1143===e?"js/chunks/Snippets/Snippets-GeneratorField.js?_hash=713cb365":2160===e?"js/chunks/Snippets/Snippets-Generators.js?_hash=f84764a6":3181===e?"js/chunks/Snippets/Snippets-GlobalScripts.js?_hash=8327c255":3307===e?"js/chunks/Snippets/Snippets-ImportExport.js?_hash=7c230823":5779===e?"js/chunks/Snippets/Snippets-Library.js?_hash=9117f3b1":7118===e?"js/chunks/Snippets/Snippets-LibraryAuthor.js?_hash=2d04347a":7630===e?"js/chunks/Snippets/Snippets-LibraryMine.js?_hash=9f859f53":3015===e?"js/chunks/Snippets/Snippets-LibraryPacks.js?_hash=2a3b8de1":6724===e?"js/chunks/Snippets/Snippets-ProUpsell.js?_hash=24c83125":5077===e?"js/chunks/Snippets/Snippets-PublishToLibrary.js?_hash=2162fcb1":5085===e?"js/chunks/Snippets/Snippets-SitePreview.js?_hash=b7643a5f":8062===e?"js/chunks/Snippets/Snippets-SnippetEditor.js?_hash=d348549d":8974===e?"js/chunks/Snippets/Snippets-SnippetSettings.js?_hash=c81dc9da":1468===e?"js/chunks/Snippets/Snippets-SnippetsList.js?_hash=ef1ebab5":2759===e?"js/chunks/Snippets/Snippets-SnippetsModal.js?_hash=44479fdc":3960===e?"js/chunks/Snippets/Snippets-SpecialFiles.js?_hash=cd3c301c":7433===e?"js/chunks/Snippets/Snippets-Tracking.js?_hash=3aeea0a7":4233===e?"js/chunks/Snippets/Snippets-state.js?_hash=b063f01e":3910===e?"js/chunks/FileManager/FileManager.js?_hash=9a22fcaf":5857===e?"js/chunks/ImageEditor/ImageEditor.js?_hash=4e00092e":7606===e?"js/chunks/DbManager/DbManager.js?_hash=d5abd051":4154===e?"js/chunks/ConfigManager/ConfigManager.js?_hash=ea23fc81":8165===e?"js/chunks/Snippets/Snippets.js?_hash=c52a4ed1":8248===e?"js/chunks/Settings/Settings.js?_hash=796a71bb":1451===e?"js/chunks/Changelog/Changelog.js?_hash=6619157a":8106===e?"js/chunks/Premium/Premium.js?_hash=2f025a2e":9810===e?"js/chunks/NotFound/NotFound.js?_hash=d7621959":void 0,s.miniCssF=e=>"css/"+{93:"DbManager-SearchReplace",559:"FileManager-Gallery",869:"DbManager-TableRowForm",940:"FileManager-Upload",1100:"FileManager-ListView",1451:"Changelog",1468:"Snippets-SnippetsList",1568:"Snippets-EventLog",1632:"FileManager-Editor",1869:"FileManager-FilesListItem",2001:"Snippets-Cloud",2160:"Snippets-Generators",2351:"FileManager-TreeNode",2667:"ImageEditor-MediaOptimizer",2766:"Settings-SettingControlRepeater",2857:"FileManager-ImageEditor",2888:"DbManager-easy-table-default-less",3015:"Snippets-LibraryPacks",3181:"Snippets-GlobalScripts",3287:"FileManager-Tree",3307:"Snippets-ImportExport",3582:"FileManager-MediaPlayer",3653:"DbManager-Table",3910:"FileManager",3960:"Snippets-SpecialFiles",4154:"ConfigManager",4712:"Snippets-ConditionValue",4868:"Snippets-AiAssistant",5077:"Snippets-PublishToLibrary",5085:"Snippets-SitePreview",5388:"FileManager-GridView",5776:"FileManager-FilesList",5779:"Snippets-Library",5857:"ImageEditor",5890:"ConfigManager-ListItem",6148:"Settings-SettingFields",6724:"Snippets-ProUpsell",7118:"Snippets-LibraryAuthor",7433:"Snippets-Tracking",7606:"DbManager",7630:"Snippets-LibraryMine",7821:"Snippets-ConditionsBuilder",8062:"Snippets-SnippetEditor",8119:"DbManager-easy-table-dark-less",8165:"Snippets",8248:"Settings",8641:"FileManager-CodeDiff",8974:"Snippets-SnippetSettings",8986:"Snippets-AiCredits",9111:"FileManager-GroupView",9444:"DbManager-TablesTree"}[e]+".css?_hash="+{93:"dc9669cd",559:"df8dc3d1",869:"575a2b2b",940:"0fca59a8",1100:"6fd13d4a",1451:"aa0b8006",1468:"ddcd54f9",1568:"252372b6",1632:"38cd2052",1869:"213dc083",2001:"c521f1ad",2160:"52893497",2351:"72f4e5dd",2667:"1743355e",2766:"b441f6ed",2857:"3ec2db87",2888:"add0baeb",3015:"5ebbb4cc",3181:"11925062",3287:"a07fed27",3307:"2d714886",3582:"e168dcd2",3653:"2b5ffcb5",3910:"957955d9",3960:"c6e41eb8",4154:"47f12098",4712:"ac2e53cd",4868:"c28c69ad",5077:"4ab1d7ee",5085:"678ac6cd",5388:"213dc083",5776:"213dc083",5779:"f03c31a4",5857:"b22f60eb",5890:"47f12098",6148:"eee5afa1",6724:"7cd4e7bc",7118:"96ac6417",7433:"a7008003",7606:"cd3cb312",7630:"36450039",7821:"b402d8af",8062:"573ee484",8119:"e73dfc75",8165:"f5630ceb",8248:"8f3e7e14",8641:"4c56bde8",8974:"411dacbe",8986:"08a77d11",9111:"213dc083",9444:"dbd48afc"}[e],s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},n="wpide:",s.l=(e,i,a,o)=>{if(t[e])t[e].push(i);else{var r,c;if(void 0!==a)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var d=l[u];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==n+a){r=d;break}}r||(c=!0,(r=document.createElement("script")).charset="utf-8",s.nc&&r.setAttribute("nonce",s.nc),r.setAttribute("data-webpack",n+a),r.src=e),t[e]=[i];var p=(n,i)=>{r.onerror=r.onload=null,clearTimeout(h);var a=t[e];if(delete t[e],r.parentNode&&r.parentNode.removeChild(r),a&&a.forEach(e=>e(i)),n)return n(i)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=p.bind(null,r.onerror),r.onload=p.bind(null,r.onload),c&&document.head.appendChild(r)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),s.p="",(()=>{if("undefined"!=typeof document){var e=e=>new Promise((t,n)=>{var i=s.miniCssF(e),a=s.p+i;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),i=0;i<n.length;i++){var a=(o=n[i]).getAttribute("data-href")||o.getAttribute("href");if("stylesheet"===o.rel&&(a===e||a===t))return o}var s=document.getElementsByTagName("style");for(i=0;i<s.length;i++){var o;if((a=(o=s[i]).getAttribute("data-href"))===e||a===t)return o}})(i,a))return t();((e,t,n,i,a)=>{var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",s.nc&&(o.nonce=s.nc),o.onerror=o.onload=n=>{if(o.onerror=o.onload=null,"load"===n.type)i();else{var s=n&&n.type,r=n&&n.target&&n.target.href||t,c=new Error("Loading CSS chunk "+e+" failed.\n("+s+": "+r+")");c.name="ChunkLoadError",c.code="CSS_CHUNK_LOAD_FAILED",c.type=s,c.request=r,o.parentNode&&o.parentNode.removeChild(o),a(c)}},o.href=t,n?n.parentNode.insertBefore(o,n.nextSibling):document.head.appendChild(o)})(e,a,null,t,n)}),t={3524:0};s.f.miniCss=(n,i)=>{t[n]?i.push(t[n]):0!==t[n]&&{93:1,559:1,869:1,940:1,1100:1,1451:1,1468:1,1568:1,1632:1,1869:1,2001:1,2160:1,2351:1,2667:1,2766:1,2857:1,2888:1,3015:1,3181:1,3287:1,3307:1,3582:1,3653:1,3910:1,3960:1,4154:1,4712:1,4868:1,5077:1,5085:1,5388:1,5776:1,5779:1,5857:1,5890:1,6148:1,6724:1,7118:1,7433:1,7606:1,7630:1,7821:1,8062:1,8119:1,8165:1,8248:1,8641:1,8974:1,8986:1,9111:1,9444:1}[n]&&i.push(t[n]=e(n).then(()=>{t[n]=0},e=>{throw delete t[n],e}))}}})(),(()=>{var e={3524:0};s.f.j=(t,n)=>{var i=s.o(e,t)?e[t]:void 0;if(0!==i)if(i)n.push(i[2]);else{var a=new Promise((n,a)=>i=e[t]=[n,a]);n.push(i[2]=a);var o=s.p+s.u(t),r=new Error;s.l(o,n=>{if(s.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var a=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;r.message="Loading chunk "+t+" failed.\n("+a+": "+o+")",r.name="ChunkLoadError",r.type=a,r.request=o,i[1](r)}},"chunk-"+t,t)}},s.O.j=t=>0===e[t];var t=(t,n)=>{var i,a,[o,r,c]=n,l=0;if(o.some(t=>0!==e[t])){for(i in r)s.o(r,i)&&(s.m[i]=r[i]);if(c)var u=c(s)}for(t&&t(n);l<o.length;l++)a=o[l],s.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return s.O(u)},n=self.webpackChunkwpide=self.webpackChunkwpide||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var o=s.O(void 0,[504],()=>s(4409));o=s.O(o)})(); -
wpide/trunk/dist/js/chunks/Snippets/Snippets-Library.js
r3771999 r3776366 1 "use strict";(self.webpackChunkwpide=self.webpackChunkwpide||[]).push([[2759,5779,7118],{ 29683(t,e,i){i.r(e),i.d(e,{default:()=>p});i(52675),i(89463),i(27495),i(5746);var n=i(7180),s=(i(28706),i(2008),i(74423),i(48598),i(62062),i(44114),i(72712),i(62010),i(18111),i(22489),i(61701),i(18237),i(26099),i(21699),i(47764),i(25440),i(42762),i(62953),i(68660)),r=i(72050),a=i(60359),o=i(58998),l={search:"",category:"",author:"",authorName:""};const c={name:"SnippetsLibrary",components:{SnippetsModal:a.default,LibraryAuthor:o.default,CodeEditor:function(){return i.e(5618).then(i.bind(i,96198))},LibraryPacks:function(){return i.e(3015).then(i.bind(i,86084))},LibraryMine:function(){return i.e(7630).then(i.bind(i,40400))}},data:function(){return(0,n.A)((0,n.A)({categories:[],all:[]},l),{},{favorites:0,favoritesSynced:!1,favoritesKey:"__favorites",loading:!1,busy:"",starring:"",modal:{show:!1,item:null}})},computed:{items:function(){var t=this,e=this.search.trim().toLowerCase(),i=this.author;return this.all.filter(function(n){if(t.showingFavorites?!n.favorite:t.category&&n.category!==t.category)return!1;var s=n.author||{team:!0,slug:"wpide-team"};return!("team"===i?!s.team:"community"===i?s.team:i&&s.slug!==i)&&(!e||(n.title+" "+n.description+" "+(n.tags||[]).join(" ")).toLowerCase().includes(e))})},view:function(){return["packs","mine"].includes(this.$route.query.view)?this.$route.query.view:"snippets"},authorOptions:function(){var t=[{value:"",text:(0,r.__)("Everyone","wpide")},{value:"team",text:(0,r.__)("WPIDE Team","wpide")},{value:"community",text:(0,r.__)("Community","wpide")}];return this.authorName?t.concat([{value:this.author,text:this.authorName}]):t},total:function(){return this.categories.reduce(function(t,e){return t+e.count},0)},showingFavorites:function(){return this.category===this.favoritesKey},categoryOptions:function(){return[{value:"",text:(0,r.__)("All categories","wpide")},{value:this.favoritesKey,text:this.premium?(0,r.nv)((0,r.__)("★ Favorites (%d)","wpide"),this.favorites):(0,r.__)("★ Favorites (PRO)","wpide")}].concat(this.categories.map(function(t){return{value:t.id,text:t.label+" ("+t.count+")"}}))}},mounted:function(){this.load(),this.$route.query.open&&this.preview({id:String(this.$route.query.open)})},methods:{_n:r._n,load:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Object.assign(l,{search:this.search,category:this.category,author:this.author,authorName:this.authorName}),e||!s.i.data||s.i.stale?(this.loading=!0,s.A.library().then(function(e){s.i.data=e,s.i.stale=!1,t.apply(e)}).catch(function(e){return t.handleError(e)}).finally(function(){t.loading=!1})):this.apply(s.i.data)},apply:function(t){this.categories=t.categories,this.all=t.snippets,this.favorites=t.favorites,this.favoritesSynced=t.favorites_synced},pickAuthor:function(t){["","team","community"].includes(t)&&(this.authorName=""),this.load()},filterByAuthor:function(t){this.modal.show=!1,this.search="",this.category="",this.author=t.team?"team":t.slug,this.authorName=t.team?"":t.name,this.load()},setView:function(t){t!==this.view&&this.$router.replace({name:"snippets-library",query:"snippets"===t?{}:{view:t}})},setCategory:function(t){if(t===this.favoritesKey&&!this.premium)return this.showPremiumFeatureModal(),void(this.category="");this.category=t,this.load()},toggleFavorite:function(t){var e=this;this.premium?(this.starring=t.id,s.A.libraryFavorite(t.id,!t.favorite).then(function(i){i.success?(t.favorite=i.favorites.includes(t.id),e.favorites=i.favorites.length,s.i.data&&(s.i.data.favorites=e.favorites)):e.handleError(i.message)}).catch(function(t){return e.handleError(t)}).finally(function(){e.starring=""})):this.showPremiumFeatureModal()},preview:function(t){var e=this;s.A.libraryItem(t.id).then(function(i){e.modal={show:!0,item:(0,n.A)((0,n.A)({},t),i)}}).catch(function(){return e.handleError((0,r.__)("This snippet is not in the WPIDE library (it may have been removed, or it is private).","wpide"))})},install:function(t){var e=this;!t.pro||this.premium?(this.busy=t.id,s.A.libraryInstall(t.id).then(function(i){i.success?(e.handleSuccess((0,r.nv)((0,r.__)('"%s" was added (inactive).',"wpide"),t.title)),e.$root.$emit("snippets:refresh"),e.$router.push({name:"snippets-edit",params:{id:i.snippet.id}})):e.handleError((i.errors||[])[0])}).catch(function(t){return e.handleError(t)}).finally(function(){e.busy=""})):this.showPremiumFeatureModal()},update:function(t){var e=this;this.showModalConfirm((0,r.__)("Update","wpide"),function(){s.A.libraryUpdate(t.installed_id).then(function(t){t.success?e.handleSuccess((0,r.__)("Updated to the latest library version (a new revision).","wpide")):e.handleError((t.errors||[])[0]),e.load(!0)}).catch(function(t){return e.handleError(t)})})}}},u=c;const p=(0,i(81656).A)(u,function(){var t=this,e=t._self._c;return e("div",{staticClass:"snippets-library-view"},["snippets"===t.view?e("aside",{staticClass:"library-categories d-none d-lg-block",attrs:{"aria-label":t.__("Categories","wpide")}},[e("ul",{staticClass:"library-category-list"},[e("li",[e("a",{staticClass:"library-category-favorites",class:{active:t.category===t.favoritesKey},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.setCategory(t.favoritesKey)}}},[e("span",[e("em",{staticClass:"icon ni ni-star-fill"}),t._v(t._s(t.__("Favorites","wpide")))]),t.premium?t.categories.length?e("span",{staticClass:"library-category-count",domProps:{textContent:t._s(t.favorites)}}):e("span",{staticClass:"skeleton-line is-pill",attrs:{"aria-hidden":"true"}}):e("span",{staticClass:"snippets-pro-badge",domProps:{textContent:t._s("PRO")}})])]),e("li",{staticClass:"library-category-divider",attrs:{role:"separator"}}),e("li",[e("a",{class:{active:!t.category},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.setCategory("")}}},[e("span",{domProps:{textContent:t._s(t.__("All categories","wpide"))}}),t.categories.length?e("span",{staticClass:"library-category-count",domProps:{textContent:t._s(t.total)}}):e("span",{staticClass:"skeleton-line is-pill",attrs:{"aria-hidden":"true"}})])]),t._l(t.categories.length?0:14,function(t){return e("li",{key:"s"+t,staticClass:"library-category-skeleton",attrs:{"aria-hidden":"true"}},[e("span",{staticClass:"skeleton-line",class:["w-60","w-50","w-70","w-35"][t%4]}),e("span",{staticClass:"skeleton-line is-pill"})])}),t._l(t.categories,function(i){return e("li",{key:i.id},[e("a",{class:{active:t.category===i.id},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.setCategory(i.id)}}},[e("span",{domProps:{textContent:t._s(i.label)}}),e("span",{staticClass:"library-category-count",domProps:{textContent:t._s(i.count)}})])])})],2)]):t._e(),e("div",{staticClass:"snippets-page library-main"},[e("div",{staticClass:"library-views",attrs:{role:"tablist"}},[e("button",{staticClass:"library-view",class:{active:"snippets"===t.view},attrs:{type:"button",role:"tab","aria-selected":"snippets"===t.view?"true":"false"},on:{click:function(e){return t.setView("snippets")}}},[e("em",{staticClass:"icon ni ni-list"}),e("span",{domProps:{textContent:t._s(t.__("Snippets","wpide"))}})]),e("button",{staticClass:"library-view",class:{active:"packs"===t.view},attrs:{type:"button",role:"tab","aria-selected":"packs"===t.view?"true":"false"},on:{click:function(e){return t.setView("packs")}}},[e("em",{staticClass:"icon ni ni-package"}),e("span",{domProps:{textContent:t._s(t.__("Packs","wpide"))}})]),e("button",{staticClass:"library-view",class:{active:"mine"===t.view},attrs:{type:"button",role:"tab","aria-selected":"mine"===t.view?"true":"false"},on:{click:function(e){return t.setView("mine")}}},[e("em",{staticClass:"icon ni ni-share"}),e("span",{domProps:{textContent:t._s(t.__("Published by me","wpide"))}})])]),"packs"===t.view?e("library-packs"):"mine"===t.view?e("library-mine"):[e("div",{staticClass:"library-toolbar"},[e("div",{staticClass:"form-control-wrap library-search"},[e("div",{staticClass:"form-icon form-icon-left"},[e("em",{staticClass:"icon ni ni-search"})]),e("b-input",{attrs:{type:"search",debounce:"300",placeholder:t.__("Search the library","wpide"),"aria-label":t.__("Search the library","wpide")},on:{update:function(e){return t.load()}},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),e("b-form-select",{staticClass:"d-lg-none",attrs:{options:t.categoryOptions,"aria-label":t.__("Category","wpide")},on:{change:function(e){return t.load()}},model:{value:t.category,callback:function(e){t.category=e},expression:"category"}}),e("b-form-select",{staticClass:"library-author-filter",attrs:{options:t.authorOptions,"aria-label":t.__("Written by","wpide")},on:{change:t.pickAuthor},model:{value:t.author,callback:function(e){t.author=e},expression:"author"}}),e("span",{staticClass:"library-result-count",domProps:{textContent:t._s(t.sprintf(t._n("%d snippet","%d snippets",t.items.length,"wpide"),t.items.length))}})],1),e("p",{staticClass:"snippets-intro",domProps:{textContent:t._s(t.authorName?t.sprintf(t.__("Snippets by %s. Choose Everyone to see the whole library again.","wpide"),t.authorName):t.showingFavorites?t.favoritesSynced?t.__("Your favorites, shared by every site connected to your WPIDE Cloud account.","wpide"):t.__("Your favorites on this site. Connect WPIDE Cloud to see them on all your sites.","wpide"):t.__("Snippets from the WPIDE team and the community. Installing adds an inactive copy you can review, edit and activate.","wpide"))}}),e("div",{staticClass:"library-grid snippets-card-grid",attrs:{"aria-busy":t.loading&&!t.items.length?"true":"false"}},[t._l(t.loading&&!t.items.length?9:0,function(t){return e("article",{key:"s"+t,staticClass:"card card-bordered library-card library-card-skeleton",attrs:{"aria-hidden":"true"}},[e("div",{staticClass:"card-inner"},[e("div",{staticClass:"library-card-head"},[e("span",{staticClass:"skeleton-line is-title",class:t%2?"w-70":"w-60"}),e("span",{staticClass:"skeleton-line is-pill"})]),e("span",{staticClass:"skeleton-line w-35"}),e("span",{staticClass:"skeleton-line w-100"}),e("span",{staticClass:"skeleton-line w-90"}),e("span",{staticClass:"skeleton-line",class:t%3?"w-60":"w-50"})]),e("div",{staticClass:"library-card-skeleton-foot"},[e("span",{staticClass:"skeleton-line is-button"}),e("span",{staticClass:"skeleton-line is-button"})])])}),t._l(t.items,function(i){return e("article",{key:i.id,staticClass:"card card-bordered library-card",class:{"is-installed":i.installed_id}},[e("div",{staticClass:"card-inner"},[e("div",{staticClass:"library-card-head"},[e("h6",{staticClass:"library-card-title"},[e("a",{attrs:{href:"#"},domProps:{textContent:t._s(i.title)},on:{click:function(e){return e.preventDefault(),t.preview(i)}}})]),e("span",{staticClass:"badge snippet-type-badge",domProps:{textContent:t._s(i.code_type)}}),i.pro&&!t.premium?e("span",{staticClass:"snippets-pro-badge",domProps:{textContent:t._s("PRO")}}):t._e(),e("button",{staticClass:"library-fav",class:{active:i.favorite},attrs:{type:"button",disabled:t.starring===i.id,"aria-pressed":i.favorite?"true":"false","aria-label":i.favorite?t.sprintf(t.__("Remove %s from favorites","wpide"),i.title):t.sprintf(t.__("Add %s to favorites","wpide"),i.title),title:i.favorite?t.__("Remove from favorites","wpide"):t.__("Add to favorites","wpide")},on:{click:function(e){return t.toggleFavorite(i)}}},[e("em",{staticClass:"icon ni",class:i.favorite?"ni-star-fill":"ni-star"})])]),e("p",{staticClass:"library-card-author"},[i.author?e("library-author",{attrs:{author:i.author},on:{select:t.filterByAuthor}}):t._e(),i.installs?e("span",{staticClass:"library-card-installs",domProps:{textContent:t._s(t.sprintf(t._n("%d install","%d installs",i.installs,"wpide"),i.installs))}}):t._e()],1),e("p",{staticClass:"library-card-text",domProps:{textContent:t._s(i.description)}}),i.requires&&i.requires.length?e("div",{staticClass:"library-card-requires"},t._l(i.requires,function(n){return e("span",{key:n,staticClass:"badge",class:i.available?"badge-light":"badge-warning",domProps:{textContent:t._s(n)}})}),0):t._e(),e("div",{staticClass:"library-card-actions snippets-card-actions"},[i.installed_id?e("span",{staticClass:"library-installed"},[e("em",{staticClass:"icon ni ni-check-circle"}),t._v(t._s(t.__("Installed","wpide")))]):t._e(),e("b-button",{attrs:{size:"sm",variant:"outline-light"},domProps:{textContent:t._s(t.__("Preview","wpide"))},on:{click:function(e){return t.preview(i)}}}),i.installed_id?e("b-button",{attrs:{size:"sm",variant:"outline-primary",to:{name:"snippets-edit",params:{id:i.installed_id}}},domProps:{textContent:t._s(t.__("Open","wpide"))}}):t._e(),i.update_available?e("b-button",{attrs:{size:"sm",variant:"warning"},domProps:{textContent:t._s(t.__("Update","wpide"))},on:{click:function(e){return t.update(i)}}}):t._e(),i.installed_id?t._e():e("b-button",{attrs:{size:"sm",variant:"primary",disabled:t.busy===i.id},on:{click:function(e){return t.install(i)}}},[t.busy===i.id?e("b-spinner",{staticClass:"mr-1",attrs:{small:""}}):t._e(),t._v(t._s(t.__("Install","wpide"))+" ")],1)],1)])])})],2),t.items.length||t.loading||!t.showingFavorites||t.search?t.items.length||t.loading?t._e():e("div",{staticClass:"library-empty"},[e("em",{staticClass:"icon ni ni-search"}),e("p",{domProps:{textContent:t._s(t.__("No library snippets match. Try another word or category.","wpide"))}})]):e("div",{staticClass:"library-empty"},[e("em",{staticClass:"icon ni ni-star"}),e("p",{domProps:{textContent:t._s(t.__("No favorites yet. Star a snippet to keep it here.","wpide"))}}),e("b-button",{attrs:{size:"sm",variant:"outline-primary"},domProps:{textContent:t._s(t.__("Browse the library","wpide"))},on:{click:function(e){return t.setCategory("")}}})],1)]],2),e("snippets-modal",{attrs:{size:"lg",scrollable:"",title:t.modal.item?t.modal.item.title:"","ok-title":t.modal.item&&!t.modal.item.installed_id?t.__("Install","wpide"):t.__("Close","wpide"),"cancel-title":t.__("Close","wpide"),"ok-only":!(!t.modal.item||!t.modal.item.installed_id)},on:{ok:function(e){t.modal.item&&!t.modal.item.installed_id&&t.install(t.modal.item)}},model:{value:t.modal.show,callback:function(e){t.$set(t.modal,"show",e)},expression:"modal.show"}},[t.modal.item?[e("p",{staticClass:"library-card-author"},[t.modal.item.author?e("library-author",{attrs:{author:t.modal.item.author},on:{select:t.filterByAuthor}}):t._e()],1),e("p",{domProps:{textContent:t._s(t.modal.item.description)}}),t.modal.item.notes?e("p",{staticClass:"small text-soft",domProps:{textContent:t._s(t.modal.item.notes)}}):t._e(),e("code-editor",{attrs:{value:t.modal.item.code,type:t.modal.item.code_type,readonly:"","min-lines":6,"max-lines":28}})]:t._e()],2)],1)},[],!1,null,null,null).exports},58998(t,e,i){i.r(e),i.d(e,{default:()=>s});i(62010),i(48598),i(62062),i(34782),i(18111),i(61701),i(26099),i(27495),i(90744),i(42762);const n={name:"LibraryAuthor",props:{author:{type:Object,default:function(){return{name:"WPIDE Team",team:!0,slug:"wpide-team"}}}},data:function(){return{broken:!1}},computed:{team:function(){return!!this.author.team},name:function(){return this.team?"WPIDE Team":this.author.name||""},initials:function(){return this.name.trim().split(/\s+/).slice(0,2).map(function(t){return t.charAt(0).toUpperCase()}).join("")||"?"}},watch:{"author.avatar":function(){this.broken=!1}}};const s=(0,i(81656).A)(n,function(){var t=this,e=t._self._c;return e("span",{staticClass:"library-author"},[t.team?e("em",{staticClass:"icon ni ni-shield-check-fill is-team"}):e("span",{staticClass:"library-avatar",attrs:{"aria-hidden":"true"}},[e("span",{domProps:{textContent:t._s(t.initials)}}),t.author.avatar&&!t.broken?e("img",{attrs:{src:t.author.avatar,alt:"",width:"18",height:"18",loading:"lazy"},on:{error:function(e){t.broken=!0}}}):t._e()]),t.author.slug?e("a",{staticClass:"library-author-name",attrs:{href:"#",title:t.sprintf(t.__("Show all snippets by %s","wpide"),t.name)},domProps:{textContent:t._s(t.name)},on:{click:function(e){return e.preventDefault(),t.$emit("select",t.author)}}}):e("span",{domProps:{textContent:t._s(t.name)}})])},[],!1,null,null,null).exports},60359(t,e,i){i.r(e),i.d(e,{default:()=>s});const n={name:"SnippetsModal",inheritAttrs:!1,model:{prop:"visible",event:"change"}};const s=(0,i(81656).A)(n,function(){var t=this;return(0,t._self._c)("b-modal",t._g(t._b({staticClass:"modal-outer snippets-modal",attrs:{static:"",lazy:""},scopedSlots:t._u([t._l(t.$scopedSlots,function(e,i){return{key:i,fn:function(e){return[t._t(i,null,null,e||{})]}}})],null,!0)},"b-modal",t.$attrs,!1),t.$listeners))},[],!1,null,null,null).exports},68660(t,e,i){i.d(e,{A:()=>u,i:()=>a});var n=i(7180),s=(i(74423),i(28781)),r=function(t){return t.data.data},a={data:null,stale:!0},o=["snippets/save","snippets/bulk","snippets/import/commit","snippets/packs/install","snippets/packs/remove","snippets/cloud/import","snippets/library/install","snippets/library/update"],l=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s.A.post(t,e).then(function(e){return o.includes(t)&&(a.stale=!0),r(e)})},c=function(t){return s.A.get(t).then(r)};const u={bootstrap:function(){return c("snippets/bootstrap")},list:function(t){return l("snippets/list",t)},pin:function(t,e){return l("snippets/pin",{id:t,pinned:e})},get:function(t){return l("snippets/get",{id:t})},save:function(t){return l("snippets/save",{id:t.id||0,snippet:t})},validate:function(t){return l("snippets/validate",{snippet:t})},setStatus:function(t,e){return l("snippets/status",{id:t,active:e})},bulk:function(t,e){return l("snippets/bulk",{ids:t,action:e})},execute:function(t){return l("snippets/execute",{id:t})},revision:function(t){return l("snippets/revision",{revision_id:t,compare_to:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0})},restoreRevision:function(t){return l("snippets/revision/restore",{revision_id:t})},events:function(){return l("snippets/events",arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},clearEvents:function(){return l("snippets/events/clear",{id:arguments.length>0&&void 0!==arguments[0]?arguments[0]:0})},testing:function(t){return l("snippets/testing",{action:t,id:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0})},saveSettings:function(t){return l("snippets/settings",{settings:t})},search:function(t,e){return l("snippets/search",{kind:t,term:e,ids:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]})},export:function(){return l("snippets/export",{ids:arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],include_global:arguments.length>1&&void 0!==arguments[1]&&arguments[1]})},analyzeImport:function(t){return l("snippets/import/analyze",{importer:t,file:arguments.length>1&&void 0!==arguments[1]?arguments[1]:""})},commitImport:function(t,e){return l("snippets/import/commit",{importer:t,keys:e,extras:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],file:arguments.length>3&&void 0!==arguments[3]?arguments[3]:""})},library:function(){return l("snippets/library",{search:arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",category:arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",favorites:arguments.length>2&&void 0!==arguments[2]&&arguments[2],author:arguments.length>3&&void 0!==arguments[3]?arguments[3]:""})},libraryAccount:function(){return c("snippets/library/account")},libraryPublish:function(t,e){return l("snippets/library/publish",(0,n.A)({id:t},e))},libraryUnpublish:function(t){return l("snippets/library/unpublish",{id:t})},libraryFavorite:function(t,e){return l("snippets/library/favorite",{id:t,favorite:e})},libraryItem:function(t){return l("snippets/library/get",{id:t})},libraryInstall:function(t){return l("snippets/library/install",{id:t})},libraryUpdate:function(t){return l("snippets/library/update",{snippet_id:t})},generator:function(t){return l("snippets/generators/get",{id:t})},generate:function(t,e){return l("snippets/generators/generate",{id:t,values:e})},globalScripts:function(){return c("snippets/global")},saveGlobalScripts:function(t){return l("snippets/global/save",{scripts:t})},globalRevision:function(t){return l("snippets/global/revision",{revision_id:t})},files:function(){return c("snippets/files")},saveFile:function(t,e,i){return l("snippets/files/save",{name:t,content:e,enabled:i})},scss:function(t){return l("snippets/scss",{code:t})},packs:function(){return c("snippets/packs")},installPack:function(t){return l("snippets/packs/install",{id:t})},removePack:function(t){return l("snippets/packs/remove",{id:t})},cloud:function(){return c("snippets/cloud")},cloudConnect:function(t,e){return l("snippets/cloud/connect",{url:t,token:e})},cloudDisconnect:function(){return l("snippets/cloud/disconnect",{})},cloudRotate:function(){return l("snippets/cloud/rotate",{})},cloudDashboard:function(){return l("snippets/cloud/dashboard",{})},cloudSync:function(){return l("snippets/cloud/sync",{})},cloudLibrary:function(){return l("snippets/cloud/library",{search:arguments.length>0&&void 0!==arguments[0]?arguments[0]:""})},cloudUpload:function(t){return l("snippets/cloud/upload",{id:t,note:arguments.length>1&&void 0!==arguments[1]?arguments[1]:""})},cloudImport:function(t){return l("snippets/cloud/import",{cloud_id:t,version:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0})},cloudAi:function(t){return l("snippets/cloud/ai",t)},tracking:function(){return c("snippets/tracking")},saveTracking:function(t){return l("snippets/tracking/save",{settings:t})},testTracking:function(t){return l("snippets/tracking/test",{provider:t})},trackingLog:function(){return l("snippets/tracking/log",{clear:arguments.length>0&&void 0!==arguments[0]&&arguments[0]})}}},3470(t){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},60706(t,e,i){var n=i(10350).PROPER,s=i(79039),r=i(47452);t.exports=function(t){return s(function(){return!!r[t]()||"1 "use strict";(self.webpackChunkwpide=self.webpackChunkwpide||[]).push([[2759,5779,7118],{8999(t,e,i){i.r(e),i.d(e,{default:()=>p});i(52675),i(89463),i(27495),i(5746);var n=i(7180),s=(i(28706),i(2008),i(74423),i(48598),i(62062),i(44114),i(72712),i(62010),i(18111),i(22489),i(61701),i(18237),i(26099),i(21699),i(47764),i(25440),i(42762),i(62953),i(68660)),r=i(72050),a=i(60359),o=i(58998),l={search:"",category:"",author:"",authorName:""};const c={name:"SnippetsLibrary",components:{SnippetsModal:a.default,LibraryAuthor:o.default,CodeEditor:function(){return i.e(5618).then(i.bind(i,96198))},LibraryPacks:function(){return i.e(3015).then(i.bind(i,86084))},LibraryMine:function(){return i.e(7630).then(i.bind(i,40400))}},data:function(){return(0,n.A)((0,n.A)({categories:[],all:[]},l),{},{favorites:0,favoritesSynced:!1,favoritesKey:"__favorites",loading:!1,busy:"",starring:"",modal:{show:!1,item:null}})},computed:{items:function(){var t=this,e=this.search.trim().toLowerCase(),i=this.author;return this.all.filter(function(n){if(t.showingFavorites?!n.favorite:t.category&&n.category!==t.category)return!1;var s=n.author||{team:!0,slug:"wpide-team"};return!("team"===i?!s.team:"community"===i?s.team:i&&s.slug!==i)&&(!e||(n.title+" "+n.description+" "+(n.tags||[]).join(" ")).toLowerCase().includes(e))})},view:function(){return["packs","mine"].includes(this.$route.query.view)?this.$route.query.view:"snippets"},authorOptions:function(){var t=[{value:"",text:(0,r.__)("Everyone","wpide")},{value:"team",text:(0,r.__)("WPIDE Team","wpide")},{value:"community",text:(0,r.__)("Community","wpide")}];return this.authorName?t.concat([{value:this.author,text:this.authorName}]):t},total:function(){return this.categories.reduce(function(t,e){return t+e.count},0)},showingFavorites:function(){return this.category===this.favoritesKey},categoryOptions:function(){return[{value:"",text:(0,r.__)("All categories","wpide")},{value:this.favoritesKey,text:this.premium?(0,r.nv)((0,r.__)("★ Favorites (%d)","wpide"),this.favorites):(0,r.__)("★ Favorites (PRO)","wpide")}].concat(this.categories.map(function(t){return{value:t.id,text:t.label+" ("+t.count+")"}}))}},mounted:function(){this.load(),this.$route.query.open&&this.preview({id:String(this.$route.query.open)})},methods:{_n:r._n,load:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Object.assign(l,{search:this.search,category:this.category,author:this.author,authorName:this.authorName}),e||!s.i.data||s.i.stale?(this.loading=!0,s.A.library().then(function(e){s.i.data=e,s.i.stale=!1,t.apply(e)}).catch(function(e){return t.handleError(e)}).finally(function(){t.loading=!1})):this.apply(s.i.data)},apply:function(t){this.categories=t.categories,this.all=t.snippets,this.favorites=t.favorites,this.favoritesSynced=t.favorites_synced},pickAuthor:function(t){["","team","community"].includes(t)&&(this.authorName=""),this.load()},filterByAuthor:function(t){this.modal.show=!1,this.search="",this.category="",this.author=t.team?"team":t.slug,this.authorName=t.team?"":t.name,this.load()},setView:function(t){t!==this.view&&this.$router.replace({name:"snippets-library",query:"snippets"===t?{}:{view:t}})},setCategory:function(t){if(t===this.favoritesKey&&!this.premium)return this.showPremiumFeatureModal(),void(this.category="");this.category=t,this.load()},toggleFavorite:function(t){var e=this;this.premium?(this.starring=t.id,s.A.libraryFavorite(t.id,!t.favorite).then(function(i){i.success?(t.favorite=i.favorites.includes(t.id),e.favorites=i.favorites.length,s.i.data&&(s.i.data.favorites=e.favorites)):e.handleError(i.message)}).catch(function(t){return e.handleError(t)}).finally(function(){e.starring=""})):this.showPremiumFeatureModal()},preview:function(t){var e=this;s.A.libraryItem(t.id).then(function(i){e.modal={show:!0,item:(0,n.A)((0,n.A)({},t),i)}}).catch(function(){return e.handleError((0,r.__)("This snippet is not in the WPIDE library (it may have been removed, or it is private).","wpide"))})},install:function(t){var e=this;!t.pro||this.premium?(this.busy=t.id,s.A.libraryInstall(t.id).then(function(i){i.success?(e.handleSuccess((0,r.nv)((0,r.__)('"%s" was added (inactive).',"wpide"),t.title)),e.$root.$emit("snippets:refresh"),e.$router.push({name:"snippets-edit",params:{id:i.snippet.id}})):e.handleError((i.errors||[])[0])}).catch(function(t){return e.handleError(t)}).finally(function(){e.busy=""})):this.showPremiumFeatureModal()},update:function(t){var e=this;this.showModalConfirm((0,r.__)("Update","wpide"),function(){s.A.libraryUpdate(t.installed_id).then(function(t){t.success?e.handleSuccess((0,r.__)("Updated to the latest library version (a new revision).","wpide")):e.handleError((t.errors||[])[0]),e.load(!0)}).catch(function(t){return e.handleError(t)})})}}},u=c;const p=(0,i(81656).A)(u,function(){var t=this,e=t._self._c;return e("div",{staticClass:"snippets-library-view"},["snippets"===t.view?e("aside",{staticClass:"library-categories d-none d-lg-block",attrs:{"aria-label":t.__("Categories","wpide")}},[e("ul",{staticClass:"library-category-list"},[e("li",[e("a",{staticClass:"library-category-favorites",class:{active:t.category===t.favoritesKey},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.setCategory(t.favoritesKey)}}},[e("span",[e("em",{staticClass:"icon ni ni-star-fill"}),t._v(t._s(t.__("Favorites","wpide")))]),t.premium?t.categories.length?e("span",{staticClass:"library-category-count",domProps:{textContent:t._s(t.favorites)}}):e("span",{staticClass:"skeleton-line is-pill",attrs:{"aria-hidden":"true"}}):e("span",{staticClass:"snippets-pro-badge",domProps:{textContent:t._s("PRO")}})])]),e("li",{staticClass:"library-category-divider",attrs:{role:"separator"}}),e("li",[e("a",{class:{active:!t.category},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.setCategory("")}}},[e("span",{domProps:{textContent:t._s(t.__("All categories","wpide"))}}),t.categories.length?e("span",{staticClass:"library-category-count",domProps:{textContent:t._s(t.total)}}):e("span",{staticClass:"skeleton-line is-pill",attrs:{"aria-hidden":"true"}})])]),t._l(t.categories.length?0:14,function(t){return e("li",{key:"s"+t,staticClass:"library-category-skeleton",attrs:{"aria-hidden":"true"}},[e("span",{staticClass:"skeleton-line",class:["w-60","w-50","w-70","w-35"][t%4]}),e("span",{staticClass:"skeleton-line is-pill"})])}),t._l(t.categories,function(i){return e("li",{key:i.id},[e("a",{class:{active:t.category===i.id},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.setCategory(i.id)}}},[e("span",{domProps:{textContent:t._s(i.label)}}),e("span",{staticClass:"library-category-count",domProps:{textContent:t._s(i.count)}})])])})],2)]):t._e(),e("div",{staticClass:"snippets-page library-main"},[e("div",{staticClass:"library-views",attrs:{role:"tablist"}},[e("button",{staticClass:"library-view",class:{active:"snippets"===t.view},attrs:{type:"button",role:"tab","aria-selected":"snippets"===t.view?"true":"false"},on:{click:function(e){return t.setView("snippets")}}},[e("em",{staticClass:"icon ni ni-list"}),e("span",{domProps:{textContent:t._s(t.__("Snippets","wpide"))}})]),e("button",{staticClass:"library-view",class:{active:"packs"===t.view},attrs:{type:"button",role:"tab","aria-selected":"packs"===t.view?"true":"false"},on:{click:function(e){return t.setView("packs")}}},[e("em",{staticClass:"icon ni ni-package"}),e("span",{domProps:{textContent:t._s(t.__("Packs","wpide"))}})]),e("button",{staticClass:"library-view",class:{active:"mine"===t.view},attrs:{type:"button",role:"tab","aria-selected":"mine"===t.view?"true":"false"},on:{click:function(e){return t.setView("mine")}}},[e("em",{staticClass:"icon ni ni-share"}),e("span",{domProps:{textContent:t._s(t.__("Published by me","wpide"))}})])]),"packs"===t.view?e("library-packs"):"mine"===t.view?e("library-mine"):[e("div",{staticClass:"library-toolbar"},[e("div",{staticClass:"form-control-wrap library-search"},[e("div",{staticClass:"form-icon form-icon-left"},[e("em",{staticClass:"icon ni ni-search"})]),e("b-input",{attrs:{type:"search",debounce:"300",placeholder:t.__("Search the library","wpide"),"aria-label":t.__("Search the library","wpide")},on:{update:function(e){return t.load()}},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),e("b-form-select",{staticClass:"d-lg-none",attrs:{options:t.categoryOptions,"aria-label":t.__("Category","wpide")},on:{change:function(e){return t.load()}},model:{value:t.category,callback:function(e){t.category=e},expression:"category"}}),e("b-form-select",{staticClass:"library-author-filter",attrs:{options:t.authorOptions,"aria-label":t.__("Written by","wpide")},on:{change:t.pickAuthor},model:{value:t.author,callback:function(e){t.author=e},expression:"author"}}),e("span",{staticClass:"library-result-count",domProps:{textContent:t._s(t.sprintf(t._n("%d snippet","%d snippets",t.items.length,"wpide"),t.items.length))}})],1),e("p",{staticClass:"snippets-intro",domProps:{textContent:t._s(t.authorName?t.sprintf(t.__("Snippets by %s. Choose Everyone to see the whole library again.","wpide"),t.authorName):t.showingFavorites?t.favoritesSynced?t.__("Your favorites, shared by every site connected to your WPIDE Cloud account.","wpide"):t.__("Your favorites on this site. Connect WPIDE Cloud to see them on all your sites.","wpide"):t.__("Snippets from the WPIDE team and the community. Installing adds an inactive copy you can review, edit and activate.","wpide"))}}),e("div",{staticClass:"library-grid snippets-card-grid",attrs:{"aria-busy":t.loading&&!t.items.length?"true":"false"}},[t._l(t.loading&&!t.items.length?9:0,function(t){return e("article",{key:"s"+t,staticClass:"card card-bordered library-card library-card-skeleton",attrs:{"aria-hidden":"true"}},[e("div",{staticClass:"card-inner"},[e("div",{staticClass:"library-card-head"},[e("span",{staticClass:"skeleton-line is-title",class:t%2?"w-70":"w-60"}),e("span",{staticClass:"skeleton-line is-pill"})]),e("span",{staticClass:"skeleton-line w-35"}),e("span",{staticClass:"skeleton-line w-100"}),e("span",{staticClass:"skeleton-line w-90"}),e("span",{staticClass:"skeleton-line",class:t%3?"w-60":"w-50"})]),e("div",{staticClass:"library-card-skeleton-foot"},[e("span",{staticClass:"skeleton-line is-button"}),e("span",{staticClass:"skeleton-line is-button"})])])}),t._l(t.items,function(i){return e("article",{key:i.id,staticClass:"card card-bordered library-card",class:{"is-installed":i.installed_id}},[e("div",{staticClass:"card-inner"},[e("div",{staticClass:"library-card-head"},[e("h6",{staticClass:"library-card-title"},[e("a",{attrs:{href:"#"},domProps:{textContent:t._s(i.title)},on:{click:function(e){return e.preventDefault(),t.preview(i)}}})]),e("span",{staticClass:"badge snippet-type-badge",domProps:{textContent:t._s(i.code_type)}}),i.pro&&!t.premium?e("span",{staticClass:"snippets-pro-badge",domProps:{textContent:t._s("PRO")}}):t._e(),e("button",{staticClass:"library-fav",class:{active:i.favorite},attrs:{type:"button",disabled:t.starring===i.id,"aria-pressed":i.favorite?"true":"false","aria-label":i.favorite?t.sprintf(t.__("Remove %s from favorites","wpide"),i.title):t.sprintf(t.__("Add %s to favorites","wpide"),i.title),title:i.favorite?t.__("Remove from favorites","wpide"):t.__("Add to favorites","wpide")},on:{click:function(e){return t.toggleFavorite(i)}}},[e("em",{staticClass:"icon ni",class:i.favorite?"ni-star-fill":"ni-star"})])]),e("p",{staticClass:"library-card-author"},[i.author?e("library-author",{attrs:{author:i.author},on:{select:t.filterByAuthor}}):t._e(),i.installs?e("span",{staticClass:"library-card-installs",domProps:{textContent:t._s(t.sprintf(t._n("%d install","%d installs",i.installs,"wpide"),i.installs))}}):t._e()],1),e("p",{staticClass:"library-card-text",domProps:{textContent:t._s(i.description)}}),i.requires&&i.requires.length?e("div",{staticClass:"library-card-requires"},t._l(i.requires,function(n){return e("span",{key:n,staticClass:"badge",class:i.available?"badge-light":"badge-warning",domProps:{textContent:t._s(n)}})}),0):t._e(),e("div",{staticClass:"library-card-actions snippets-card-actions"},[i.installed_id?e("span",{staticClass:"library-installed"},[e("em",{staticClass:"icon ni ni-check-circle"}),t._v(t._s(t.__("Installed","wpide")))]):t._e(),e("b-button",{attrs:{size:"sm",variant:"outline-light"},domProps:{textContent:t._s(t.__("Preview","wpide"))},on:{click:function(e){return t.preview(i)}}}),i.installed_id?e("b-button",{attrs:{size:"sm",variant:"outline-primary",to:{name:"snippets-edit",params:{id:i.installed_id}}},domProps:{textContent:t._s(t.__("Open","wpide"))}}):t._e(),i.update_available?e("b-button",{attrs:{size:"sm",variant:"warning"},domProps:{textContent:t._s(t.__("Update","wpide"))},on:{click:function(e){return t.update(i)}}}):t._e(),i.installed_id?t._e():e("b-button",{attrs:{size:"sm",variant:"primary",disabled:t.busy===i.id},on:{click:function(e){return t.install(i)}}},[t.busy===i.id?e("b-spinner",{staticClass:"mr-1",attrs:{small:""}}):t._e(),t._v(t._s(t.__("Install","wpide"))+" ")],1)],1)])])})],2),t.items.length||t.loading||!t.showingFavorites||t.search?t.items.length||t.loading?t._e():e("div",{staticClass:"library-empty"},[e("em",{staticClass:"icon ni ni-search"}),e("p",{domProps:{textContent:t._s(t.__("No library snippets match. Try another word or category.","wpide"))}})]):e("div",{staticClass:"library-empty"},[e("em",{staticClass:"icon ni ni-star"}),e("p",{domProps:{textContent:t._s(t.__("No favorites yet. Star a snippet to keep it here.","wpide"))}}),e("b-button",{attrs:{size:"sm",variant:"outline-primary"},domProps:{textContent:t._s(t.__("Browse the library","wpide"))},on:{click:function(e){return t.setCategory("")}}})],1)]],2),e("snippets-modal",{attrs:{size:"lg",scrollable:"",title:t.modal.item?t.modal.item.title:"","ok-title":t.modal.item&&!t.modal.item.installed_id?t.__("Install","wpide"):t.__("Close","wpide"),"cancel-title":t.__("Close","wpide"),"ok-only":!(!t.modal.item||!t.modal.item.installed_id)},on:{ok:function(e){t.modal.item&&!t.modal.item.installed_id&&t.install(t.modal.item)}},model:{value:t.modal.show,callback:function(e){t.$set(t.modal,"show",e)},expression:"modal.show"}},[t.modal.item?[e("p",{staticClass:"library-card-author"},[t.modal.item.author?e("library-author",{attrs:{author:t.modal.item.author},on:{select:t.filterByAuthor}}):t._e()],1),e("p",{domProps:{textContent:t._s(t.modal.item.description)}}),t.modal.item.notes?e("p",{staticClass:"small text-soft",domProps:{textContent:t._s(t.modal.item.notes)}}):t._e(),e("code-editor",{attrs:{value:t.modal.item.code,type:t.modal.item.code_type,readonly:"","min-lines":6,"max-lines":28}})]:t._e()],2)],1)},[],!1,null,null,null).exports},58998(t,e,i){i.r(e),i.d(e,{default:()=>s});i(62010),i(48598),i(62062),i(34782),i(18111),i(61701),i(26099),i(27495),i(90744),i(42762);const n={name:"LibraryAuthor",props:{author:{type:Object,default:function(){return{name:"WPIDE Team",team:!0,slug:"wpide-team"}}}},data:function(){return{broken:!1}},computed:{team:function(){return!!this.author.team},name:function(){return this.team?"WPIDE Team":this.author.name||""},initials:function(){return this.name.trim().split(/\s+/).slice(0,2).map(function(t){return t.charAt(0).toUpperCase()}).join("")||"?"}},watch:{"author.avatar":function(){this.broken=!1}}};const s=(0,i(81656).A)(n,function(){var t=this,e=t._self._c;return e("span",{staticClass:"library-author"},[t.team?e("em",{staticClass:"icon ni ni-shield-check-fill is-team"}):e("span",{staticClass:"library-avatar",attrs:{"aria-hidden":"true"}},[e("span",{domProps:{textContent:t._s(t.initials)}}),t.author.avatar&&!t.broken?e("img",{attrs:{src:t.author.avatar,alt:"",width:"18",height:"18",loading:"lazy"},on:{error:function(e){t.broken=!0}}}):t._e()]),t.author.slug?e("a",{staticClass:"library-author-name",attrs:{href:"#",title:t.sprintf(t.__("Show all snippets by %s","wpide"),t.name)},domProps:{textContent:t._s(t.name)},on:{click:function(e){return e.preventDefault(),t.$emit("select",t.author)}}}):e("span",{domProps:{textContent:t._s(t.name)}})])},[],!1,null,null,null).exports},60359(t,e,i){i.r(e),i.d(e,{default:()=>s});const n={name:"SnippetsModal",inheritAttrs:!1,model:{prop:"visible",event:"change"}};const s=(0,i(81656).A)(n,function(){var t=this;return(0,t._self._c)("b-modal",t._g(t._b({staticClass:"modal-outer snippets-modal",attrs:{static:"",lazy:""},scopedSlots:t._u([t._l(t.$scopedSlots,function(e,i){return{key:i,fn:function(e){return[t._t(i,null,null,e||{})]}}})],null,!0)},"b-modal",t.$attrs,!1),t.$listeners))},[],!1,null,null,null).exports},68660(t,e,i){i.d(e,{A:()=>u,i:()=>a});var n=i(7180),s=(i(74423),i(28781)),r=function(t){return t.data.data},a={data:null,stale:!0},o=["snippets/save","snippets/bulk","snippets/import/commit","snippets/packs/install","snippets/packs/remove","snippets/cloud/import","snippets/library/install","snippets/library/update"],l=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s.A.post(t,e).then(function(e){return o.includes(t)&&(a.stale=!0),r(e)})},c=function(t){return s.A.get(t).then(r)};const u={bootstrap:function(){return c("snippets/bootstrap")},list:function(t){return l("snippets/list",t)},pin:function(t,e){return l("snippets/pin",{id:t,pinned:e})},get:function(t){return l("snippets/get",{id:t})},save:function(t){return l("snippets/save",{id:t.id||0,snippet:t})},validate:function(t){return l("snippets/validate",{snippet:t})},setStatus:function(t,e){return l("snippets/status",{id:t,active:e})},bulk:function(t,e){return l("snippets/bulk",{ids:t,action:e})},execute:function(t){return l("snippets/execute",{id:t})},revision:function(t){return l("snippets/revision",{revision_id:t,compare_to:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0})},restoreRevision:function(t){return l("snippets/revision/restore",{revision_id:t})},events:function(){return l("snippets/events",arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},clearEvents:function(){return l("snippets/events/clear",{id:arguments.length>0&&void 0!==arguments[0]?arguments[0]:0})},testing:function(t){return l("snippets/testing",{action:t,id:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0})},saveSettings:function(t){return l("snippets/settings",{settings:t})},search:function(t,e){return l("snippets/search",{kind:t,term:e,ids:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]})},export:function(){return l("snippets/export",{ids:arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],include_global:arguments.length>1&&void 0!==arguments[1]&&arguments[1]})},analyzeImport:function(t){return l("snippets/import/analyze",{importer:t,file:arguments.length>1&&void 0!==arguments[1]?arguments[1]:""})},commitImport:function(t,e){return l("snippets/import/commit",{importer:t,keys:e,extras:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],file:arguments.length>3&&void 0!==arguments[3]?arguments[3]:""})},library:function(){return l("snippets/library",{search:arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",category:arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",favorites:arguments.length>2&&void 0!==arguments[2]&&arguments[2],author:arguments.length>3&&void 0!==arguments[3]?arguments[3]:""})},libraryAccount:function(){return c("snippets/library/account")},libraryPublish:function(t,e){return l("snippets/library/publish",(0,n.A)({id:t},e))},libraryUnpublish:function(t){return l("snippets/library/unpublish",{id:t})},libraryFavorite:function(t,e){return l("snippets/library/favorite",{id:t,favorite:e})},libraryItem:function(t){return l("snippets/library/get",{id:t})},libraryInstall:function(t){return l("snippets/library/install",{id:t})},libraryUpdate:function(t){return l("snippets/library/update",{snippet_id:t})},generator:function(t){return l("snippets/generators/get",{id:t})},generate:function(t,e){return l("snippets/generators/generate",{id:t,values:e})},globalScripts:function(){return c("snippets/global")},saveGlobalScripts:function(t){return l("snippets/global/save",{scripts:t})},globalRevision:function(t){return l("snippets/global/revision",{revision_id:t})},files:function(){return c("snippets/files")},saveFile:function(t,e,i){return l("snippets/files/save",{name:t,content:e,enabled:i})},scss:function(t){return l("snippets/scss",{code:t})},packs:function(){return c("snippets/packs")},installPack:function(t){return l("snippets/packs/install",{id:t})},removePack:function(t){return l("snippets/packs/remove",{id:t})},cloud:function(){return c("snippets/cloud")},cloudConnect:function(t,e){return l("snippets/cloud/connect",{url:t,token:e})},cloudDisconnect:function(){return l("snippets/cloud/disconnect",{})},cloudRotate:function(){return l("snippets/cloud/rotate",{})},cloudDashboard:function(){return l("snippets/cloud/dashboard",{})},cloudSync:function(){return l("snippets/cloud/sync",{})},cloudLibrary:function(){return l("snippets/cloud/library",{search:arguments.length>0&&void 0!==arguments[0]?arguments[0]:""})},cloudUpload:function(t){return l("snippets/cloud/upload",{id:t,note:arguments.length>1&&void 0!==arguments[1]?arguments[1]:""})},cloudImport:function(t){return l("snippets/cloud/import",{cloud_id:t,version:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0})},cloudAi:function(t){return l("snippets/cloud/ai",t)},tracking:function(){return c("snippets/tracking")},saveTracking:function(t){return l("snippets/tracking/save",{settings:t})},testTracking:function(t){return l("snippets/tracking/test",{provider:t})},trackingLog:function(){return l("snippets/tracking/log",{clear:arguments.length>0&&void 0!==arguments[0]&&arguments[0]})}}},3470(t){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},60706(t,e,i){var n=i(10350).PROPER,s=i(79039),r=i(47452);t.exports=function(t){return s(function(){return!!r[t]()||" 2 2 "!==" 3 3 "[t]()||n&&r[t].name!==t})}},74423(t,e,i){var n=i(46518),s=i(19617).includes,r=i(79039),a=i(6469),o=r(function(){return!Array(1).includes()}),l=r(function(){return[,1].includes(void 0,1)});n({target:"Array",proto:!0,forced:o||l},{includes:function(t){return s(this,t,arguments.length>1?arguments[1]:void 0)}}),a("includes")},62062(t,e,i){var n=i(46518),s=i(59213).map;n({target:"Array",proto:!0,forced:!i(70597)("map")},{map:function(t){return s(this,t,arguments.length>1?arguments[1]:void 0)}})},61701(t,e,i){var n=i(46518),s=i(69565),r=i(79306),a=i(28551),o=i(1767),l=i(19462),c=i(96319),u=i(9539),p=i(30684),d=i(84549),h=i(96395),f=!h&&!p("map",function(){}),m=!h&&!f&&d("map",TypeError),v=h||f||m,y=l(function(){var t=this.iterator,e=a(s(this.next,t));if(!(this.done=!!e.done))return c(t,this.mapper,[e.value,this.counter++],!0)});n({target:"Iterator",proto:!0,real:!0,forced:v},{map:function(t){a(this);try{r(t)}catch(t){u(this,"throw",t)}return m?s(m,this,t):new y(o(this),{mapper:t})}})},21699(t,e,i){var n=i(46518),s=i(79504),r=i(60511),a=i(67750),o=i(655),l=i(41436),c=s("".indexOf);n({target:"String",proto:!0,forced:!l("includes")},{includes:function(t){return!!~c(o(a(this)),o(r(t)),arguments.length>1?arguments[1]:void 0)}})},5746(t,e,i){var n=i(69565),s=i(89228),r=i(28551),a=i(20034),o=i(67750),l=i(3470),c=i(655),u=i(55966),p=i(56682);s("search",function(t,e,i){return[function(e){var i=o(this),s=a(e)?u(e,t):void 0;return s?n(s,e,i):new RegExp(e)[t](c(i))},function(t){var n=r(this),s=c(t),a=i(e,n,s);if(a.done)return a.value;var o=n.lastIndex;l(o,0)||(n.lastIndex=0);var u=p(n,s);return l(n.lastIndex,o)||(n.lastIndex=o),null===u?-1:u.index}]})},90744(t,e,i){var n=i(69565),s=i(79504),r=i(89228),a=i(28551),o=i(20034),l=i(67750),c=i(2293),u=i(57829),p=i(18014),d=i(655),h=i(55966),f=i(61034),m=i(56682),v=i(58429),y=i(79039),b=v.UNSUPPORTED_Y,g=Math.min,_=s([].push),C=s("".slice),w=s("".indexOf),k=!y(function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var i="ab".split(t);return 2!==i.length||"a"!==i[0]||"b"!==i[1]}),x="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;r("split",function(t,e,i){var s="0".split(void 0,0).length?function(t,i){return void 0===t&&0===i?[]:n(e,this,t,i)}:e;return[function(e,i){var r=l(this),a=o(e)?h(e,t):void 0;return a?n(a,e,r,i):n(s,d(r),e,i)},function(t,n){var r=a(this),o=d(t);if(!x){var l=i(s,r,o,n,s!==e);if(l.done)return l.value}var h=c(r,RegExp),v=d(f(r)),y=!!~w(v,"u")||!!~w(v,"v");b?~w(v,"g")||(v+="g"):~w(v,"y")||(v+="y");var k=new h(b?"^(?:"+r.source+")":r,v),P=void 0===n?4294967295:n>>>0;if(0===P)return[];if(0===o.length)return null===m(k,o)?[o]:[];for(var A=0,S=0,I=[];S<o.length;){k.lastIndex=b?0:S;var E,D=m(k,b?C(o,S):o);if(null===D||(E=g(p(k.lastIndex+(b?S:0)),o.length))===A)S=u(o,S,y);else{if(_(I,C(o,A,S)),I.length===P)return I;for(var F=1;F<=D.length-1;F++)if(_(I,D[F]),I.length===P)return I;S=A=E}}return _(I,C(o,A)),I}]},x||!k,b)},42762(t,e,i){var n=i(46518),s=i(43802).trim;n({target:"String",proto:!0,forced:i(60706)("trim")},{trim:function(){return s(this)}})}}]); -
wpide/trunk/readme.txt
r3776309 r3776366 4 4 Requires at least: 5.0 5 5 Tested up to: 7.1 6 Stable tag: 3.6. 16 Stable tag: 3.6.2 7 7 Requires PHP: 7.4.0 8 8 License: GPLv2 or later … … 121 121 == Changelog == 122 122 123 #### V.3.6.2 - 2026-10-31 124 - **security**: On multisite, WPIDE and its actions are now limited to super administrators. A subsite administrator could previously get file permissions through the authenticated API and edit network-shared plugin files. Reported by Veer Gosai. 125 - **fix**: The Snippet Library's category sidebar now stays on screen while the results scroll, with a slim overlay-style scrollbar for long category lists. 126 123 127 #### V.3.6.1 - 2026-10-30 124 128 - **fix**: Open the file tree and database tables from the mobile editor, with clearer empty states and smoother sidebar transitions. -
wpide/trunk/wpide.php
r3776309 r3776366 12 12 * Plugin URI: https://wpide.com 13 13 * Description: WordPress file manager and code editor with code snippets, featuring auto-completion of both WordPress and PHP functions with reference, syntax highlighting, line numbers, tabbed editing, automatic backup, image editor & much more! 14 * Version: 3.6. 114 * Version: 3.6.2 15 15 * Requires PHP: 7.4.0 16 16 * Requires at least: 5.0
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)