diff --git a/build/assets/App-CmzsIsBk.css b/build/assets/App-fm8bB5KR.css similarity index 71% rename from build/assets/App-CmzsIsBk.css rename to build/assets/App-fm8bB5KR.css index 74c5f2e..1454058 100644 --- a/build/assets/App-CmzsIsBk.css +++ b/build/assets/App-fm8bB5KR.css @@ -1 +1 @@ -.helix-dashboard,.helix-page{padding:2rem;max-width:1400px;margin:0 auto;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif}.helix-page h1{font-size:2rem;margin-bottom:1rem;color:var(--helix-color-10);font-weight:700}.helix-page p{color:var(--helix-color-6);margin-bottom:2rem}.helix-dashboard__header{margin-bottom:3rem;background:linear-gradient(135deg,var(--helix-color-8) 0%,var(--helix-color-10) 100%);color:#fff;padding:3rem 2rem;margin:-2rem 0 3rem -2rem;border-radius:0 0 24px 24px;position:relative;overflow:hidden}.helix-dashboard__header:before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:url('data:image/svg+xml,');opacity:.3}.helix-dashboard__header h1{font-size:3rem;margin:0 0 .5rem;color:#fff;font-weight:800;position:relative;z-index:1;text-shadow:0 2px 4px rgba(0,0,0,.3)}.helix-dashboard__header p{font-size:1.25rem;color:#ffffffe6;margin:0;position:relative;z-index:1;font-weight:400;line-height:3}.helix-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4rem}.helix-loading__spinner{width:40px;height:40px;border:4px solid var(--helix-color-2);border-top:4px solid var(--helix-color-7);border-radius:50%;animation:spin 1s linear infinite;margin-bottom:1rem}.helix-dashboard__stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:1.5rem;margin-bottom:2rem}.helix-stats-card{background:var(--helix-color-1);border-radius:12px;padding:1.5rem;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;display:flex;align-items:flex-start;gap:1rem;transition:transform .2s ease,box-shadow .2s ease;border:1px solid var(--helix-color-3)}.helix-stats-card:hover{transform:translateY(-2px);box-shadow:0 10px 25px -3px #0000001a,0 4px 6px -2px #0000000d}.helix-stats-card__icon{display:flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:10px;background:#fffc;box-shadow:0 2px 4px #0000001a}.helix-stats-card__icon svg{width:24px;height:24px}.helix-stats-card__content{flex:1}.helix-stats-card__header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:.25rem}.helix-stats-card__count{font-size:2rem;font-weight:700;margin:0;color:var(--helix-color-10);line-height:1}.helix-stats-card__title{font-size:.875rem;color:var(--helix-color-6);margin:0;font-weight:500}.helix-stats-card__trend{display:flex;align-items:center;gap:.25rem;font-size:.75rem;font-weight:600;color:var(--helix-success);background:var(--helix-success-light);padding:.25rem .5rem;border-radius:6px}.helix-trend-icon{width:12px!important;height:12px!important}.helix-dashboard__content{display:grid;grid-template-columns:repeat(auto-fit,minmax(400px,1fr));gap:1.5rem}.helix-widget{background:var(--helix-color-1);border-radius:12px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;overflow:hidden;border:1px solid var(--helix-color-3);transition:box-shadow .2s ease}.helix-widget:hover{box-shadow:0 10px 25px -3px #0000001a,0 4px 6px -2px #0000000d}.helix-widget__header{padding:1.25rem 1.5rem;border-bottom:1px solid var(--helix-color-2);display:flex;justify-content:space-between;align-items:center;background:linear-gradient(135deg,var(--helix-color-1) 0%,var(--helix-color-2) 100%)}.helix-widget__header h2{margin:0;font-size:1.25rem;color:var(--helix-color-9);flex-grow:1}.helix-widget__link{color:var(--helix-color-8);text-decoration:none;font-size:.9rem}.helix-widget__link:hover{text-decoration:underline}.helix-widget__content{padding:1.5rem}.helix-widget__empty{color:var(--helix-color-6);font-style:italic}.helix-posts-list,.helix-comments-list{list-style:none;padding:0;margin:0}.helix-posts-list__item,.helix-comments-list__item{display:flex;justify-content:space-between;align-items:flex-start;padding:1rem 0;border-bottom:1px solid var(--helix-color-2)}.helix-posts-list__item:last-child,.helix-comments-list__item:last-child{border-bottom:none}.helix-posts-list__title a,.helix-comments-list__author{color:var(--helix-color-9);text-decoration:none;font-weight:500}.helix-posts-list__title a:hover{color:var(--helix-color-8)}.helix-posts-list__date,.helix-comments-list__date{color:var(--helix-color-6);font-size:.9rem;margin:.25rem 0 0}.helix-comments-list__excerpt{color:var(--helix-color-6);margin:.25rem 0;font-size:.9rem}.helix-status{padding:.25rem .5rem;border-radius:.25rem;font-size:.8rem;font-weight:500}.helix-status--publish{background:var(--helix-success-light);color:var(--helix-success)}.helix-status--draft{background:var(--helix-warning-light);color:var(--helix-warning)}.helix-status--approved{background:var(--helix-success-light);color:var(--helix-success)}.helix-status--pending{background:var(--helix-warning-light);color:var(--helix-warning)}.helix-quick-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:1rem}.helix-quick-action{display:flex;flex-direction:column;align-items:center;padding:1.25rem 1rem;background:linear-gradient(135deg,var(--helix-color-1) 0%,var(--helix-color-2) 100%);border-radius:10px;text-decoration:none;color:var(--helix-color-9);transition:all .2s ease;border:1px solid var(--helix-color-3);position:relative;overflow:hidden}.helix-quick-action:hover{background:linear-gradient(135deg,var(--helix-color-3) 0%,var(--helix-color-4) 100%);transform:translateY(-2px);box-shadow:0 4px 12px #00000026;color:var(--helix-color-10)}.helix-quick-action__icon{display:flex;align-items:center;justify-content:center;width:48px;height:48px;background:var(--helix-color-1);border-radius:10px;margin-bottom:.75rem;box-shadow:0 2px 4px #0000001a;transition:all .2s ease}.helix-quick-action:hover .helix-quick-action__icon{background:var(--helix-color-8);transform:scale(1.1)}.helix-quick-action:hover .helix-quick-action__icon svg{color:#fff}.helix-quick-action__icon svg{width:20px;height:20px;color:var(--helix-color-6);transition:color .2s ease}.helix-quick-action__text{font-size:.875rem;font-weight:600;text-align:center;line-height:1.2}.helix-news-placeholder{color:var(--helix-color-6)}.helix-news-item h4{margin:0 0 .5rem;color:var(--helix-color-9)}.helix-news-item p{margin:0 0 .5rem;font-size:.9rem}.helix-news-item a{color:var(--helix-color-8);text-decoration:none;font-size:.9rem}.helix-news-item a:hover{text-decoration:underline}:root{--helix-color-1: #fafaf9;--helix-color-2: #f5f5f4;--helix-color-3: #e7e5e4;--helix-color-4: #d6d3d1;--helix-color-5: #a8a29e;--helix-color-6: #78716c;--helix-color-7: #57534e;--helix-color-8: #44403c;--helix-color-9: #292524;--helix-color-10: #1c1917;--helix-success: #059669;--helix-success-light: #d1fae5;--helix-error: #dc2626;--helix-error-light: #fee2e2;--helix-warning: #d97706;--helix-warning-light: #fed7aa;--helix-primary: #2563eb;--helix-primary-light: #dbeafe}.helix-settings-page{max-width:1400px;margin:0 auto;padding:2rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif}.helix-settings-header{margin-bottom:3rem;background:linear-gradient(135deg,var(--helix-color-8) 0%,var(--helix-color-10) 100%);color:#fff;padding:3rem 2rem;margin:-2rem 0 3rem -2rem;border-radius:0 0 24px 24px;position:relative;overflow:hidden}.helix-settings-header:before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:url('data:image/svg+xml,');opacity:.3}.helix-settings-header h1{font-size:3rem;font-weight:800;color:#fff;margin:0 0 .5rem;position:relative;z-index:1;text-shadow:0 2px 4px rgba(0,0,0,.3)}.helix-settings-header p{font-size:1.25rem;color:#ffffffe6;margin:0;position:relative;z-index:1;font-weight:400;line-height:3}.helix-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;text-align:center}.helix-loading p{margin:20px 0 0;font-size:1.1rem;color:var(--helix-color-6)}.helix-spinner{width:24px;height:24px;border:3px solid var(--helix-color-3);border-top:3px solid var(--helix-primary);border-radius:50%;animation:spin 1s linear infinite;display:inline-block}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.helix-settings-controls,.helix-settings-footer{display:flex;justify-content:center;margin:30px 0;padding:20px 0;border-top:1px solid var(--helix-color-3)}.helix-settings-footer{border-bottom:1px solid var(--helix-color-3);margin-top:50px}.helix-save-buttons{display:flex;align-items:center;gap:15px}.helix-btn{padding:12px 24px;font-size:14px;font-weight:500;border-radius:8px;border:1px solid transparent;cursor:pointer;transition:all .2s ease;display:inline-flex;align-items:center;gap:8px}.helix-btn:disabled{opacity:.6;cursor:not-allowed}.helix-btn-primary{background:linear-gradient(135deg,var(--helix-color-8) 0%,var(--helix-color-10) 100%);color:#fff;border-color:var(--helix-color-8);box-shadow:0 4px 6px -1px #2563eb33}.helix-btn-primary:hover:not(:disabled){background:linear-gradient(135deg,var(--helix-color-7) 0%,var(--helix-color-9) 100%);border-color:var(--helix-color-7);transform:translateY(-1px);box-shadow:0 8px 15px -3px #2563eb4d}.helix-btn-secondary{background-color:#fff;color:var(--helix-color-9);border-color:var(--helix-color-4)}.helix-btn-secondary:hover:not(:disabled){background-color:var(--helix-color-2);border-color:var(--helix-color-5)}.helix-save-status{color:var(--helix-success);font-weight:500;display:flex;align-items:center;gap:5px}.helix-settings-tabs{margin:30px 0}.helix-tabs-nav{display:flex;border-bottom:2px solid var(--helix-color-3);overflow-x:auto;gap:2px}.helix-tab{display:flex;align-items:center;gap:8px;padding:12px 20px;font-size:14px;font-weight:500;color:var(--helix-color-6);background:none;border:none;border-bottom:3px solid transparent;cursor:pointer;transition:all .2s ease;white-space:nowrap;position:relative}.helix-tab:hover{color:var(--helix-color-8);background-color:var(--helix-color-1)}.helix-tab.active{color:var(--helix-color-8);border-bottom-color:var(--helix-color-8)}.helix-tab-icon{font-size:16px;display:flex;align-items:center;justify-content:center}.helix-tab-icon svg{width:20px;height:20px;transition:color .2s ease}.helix-tab-indicator{color:#f59e0b;font-size:12px;position:absolute;top:5px;right:5px}.helix-settings-content{margin:40px 0}.helix-tab-panel{min-height:400px}.helix-settings-section{background:var(--helix-color-1);border-radius:12px;border:1px solid rgba(226,232,240,.5);overflow:hidden;margin-bottom:30px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;transition:transform .2s ease,box-shadow .2s ease}.helix-settings-section:hover{transform:translateY(-2px);box-shadow:0 10px 25px -3px #0000001a,0 4px 6px -2px #0000000d}.helix-settings-section-header{background:linear-gradient(135deg,var(--helix-color-1) 0%,var(--helix-color-2) 100%);padding:24px;border-bottom:1px solid rgba(37,99,235,.1)}.helix-settings-section-title{font-size:1.5rem;font-weight:600;color:var(--helix-color-10);margin:0 0 8px}.helix-settings-section-description{color:var(--helix-color-6);margin:0;font-size:14px}.helix-settings-section-content{padding:24px}.helix-settings-grid{display:grid;gap:24px}.helix-settings-subsection{border-top:1px solid var(--helix-color-3);padding-top:24px;margin-top:24px}.helix-settings-subsection h4{font-size:1.1rem;font-weight:600;color:var(--helix-color-9);margin:0 0 20px}.helix-form-field{display:flex;flex-direction:column;gap:8px}.helix-form-label{font-weight:500;color:var(--helix-color-9);font-size:14px}.helix-required{color:var(--helix-error);margin-left:4px}.helix-form-control{display:flex;flex-direction:column}.helix-form-description{font-size:13px;color:var(--helix-color-6);margin:0;line-height:1.4}.helix-form-error{font-size:13px;color:var(--helix-error);margin:0}.helix-text-input,.helix-number-input,.helix-select-input{padding:10px 12px;border:1px solid var(--helix-color-3);border-radius:6px;font-size:14px;transition:border-color .2s ease;background:var(--helix-color-1)}.helix-text-input:focus,.helix-number-input:focus,.helix-select-input:focus{outline:none;border-color:var(--helix-color-8);box-shadow:0 0 0 3px #2563eb1a}.helix-select-input{cursor:pointer}.helix-toggle-field{margin:16px 0}.helix-toggle-wrapper{display:flex;align-items:center;gap:12px}.helix-toggle-label{font-weight:500;color:var(--helix-color-9);font-size:14px;cursor:pointer;-webkit-user-select:none;user-select:none}.helix-toggle-label-disabled{opacity:.5;cursor:not-allowed}.helix-toggle-switch{position:relative;width:48px;height:24px;border-radius:24px;border:none;cursor:pointer;transition:all .2s ease-in-out;flex-shrink:0;outline:none;padding:0;margin:0;display:inline-flex;align-items:center}.helix-toggle-switch:focus{box-shadow:0 0 0 3px var(--helix-color-3);outline:none}.helix-toggle-switch-off{background-color:var(--helix-color-3)}.helix-toggle-switch-off:hover:not(:disabled){background-color:var(--helix-color-4)}.helix-toggle-switch-on{background-color:var(--helix-color-8)}.helix-toggle-switch-on:hover:not(:disabled){background-color:var(--helix-color-9)}.helix-toggle-switch-disabled{opacity:.5;cursor:not-allowed}.helix-toggle-knob{display:inline-block;width:20px;height:20px;background-color:#fff;border-radius:50%;box-shadow:0 2px 4px #0003;transition:transform .2s ease-in-out;transform:translate(2px)}.helix-toggle-knob-on{transform:translate(26px)}.helix-toggle-knob-off{transform:translate(2px)}.helix-notification{background:var(--helix-color-1);border:1px solid var(--helix-color-3);border-radius:8px;padding:16px;margin:20px 0;box-shadow:0 4px 6px -1px #0000001a;opacity:0;transform:translateY(-10px);transition:all .3s ease}.helix-notification.visible{opacity:1;transform:translateY(0)}.helix-notification-success{background-color:var(--helix-success-light)}.helix-notification-error{background-color:var(--helix-error-light)}.helix-notification-warning{background-color:var(--helix-warning-light)}.helix-notification-info{background-color:var(--helix-primary-light)}.helix-notification-content{display:flex;align-items:center;gap:12px}.helix-notification-icon{font-size:18px;flex-shrink:0}.helix-notification-message{flex:1;font-size:14px;color:var(--helix-color-9)}.helix-notification-close{background:none;border:none;font-size:20px;color:var(--helix-color-6);cursor:pointer;padding:0;line-height:1;flex-shrink:0}.helix-notification-close:hover{color:var(--helix-color-9)}@media (max-width: 768px){.helix-settings-page{padding:15px}.helix-settings-header h1{font-size:2rem}.helix-tabs-nav{flex-direction:column;gap:0}.helix-tab{justify-content:flex-start;border-bottom:1px solid var(--helix-color-3);border-right:none}.helix-tab.active{border-bottom-color:var(--helix-color-3);border-left:3px solid var(--helix-primary);background-color:var(--helix-color-1)}.helix-settings-section-content,.helix-settings-section-header{padding:20px}.helix-save-buttons{flex-direction:column;width:100%}.helix-btn{width:100%;justify-content:center}} +.helix-dashboard,.helix-page{padding:2rem;max-width:1400px;margin:0 auto;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif}.helix-page h1{font-size:2rem;margin-bottom:1rem;color:var(--helix-color-10);font-weight:700}.helix-page p{color:var(--helix-color-6);margin-bottom:2rem}.helix-dashboard__header{margin-bottom:3rem;background:linear-gradient(135deg,var(--helix-color-8) 0%,var(--helix-color-10) 100%);color:#fff;padding:3rem 2rem;margin:-2rem 0 3rem -2rem;border-radius:0 0 24px 24px;position:relative;overflow:hidden}.helix-dashboard__header:before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:url('data:image/svg+xml,');opacity:.3}.helix-dashboard__header h1{font-size:3rem;margin:0 0 .5rem;color:#fff;font-weight:800;position:relative;z-index:1;text-shadow:0 2px 4px rgba(0,0,0,.3)}.helix-dashboard__header p{font-size:1.25rem;color:#ffffffe6;margin:0;position:relative;z-index:1;font-weight:400;line-height:3}.helix-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4rem}.helix-loading__spinner{width:40px;height:40px;border:4px solid var(--helix-color-2);border-top:4px solid var(--helix-color-7);border-radius:50%;animation:spin 1s linear infinite;margin-bottom:1rem}.helix-dashboard__stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:1.5rem;margin-bottom:2rem}.helix-stats-card{background:var(--helix-color-1);border-radius:12px;padding:1.5rem;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;display:flex;align-items:flex-start;gap:1rem;transition:transform .2s ease,box-shadow .2s ease;border:1px solid var(--helix-color-3)}.helix-stats-card:hover{transform:translateY(-2px);box-shadow:0 10px 25px -3px #0000001a,0 4px 6px -2px #0000000d}.helix-stats-card__icon{display:flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:10px;background:#fffc;box-shadow:0 2px 4px #0000001a}.helix-stats-card__icon svg{width:24px;height:24px}.helix-stats-card__content{flex:1}.helix-stats-card__header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:.25rem}.helix-stats-card__count{font-size:2rem;font-weight:700;margin:0;color:var(--helix-color-10);line-height:1}.helix-stats-card__title{font-size:.875rem;color:var(--helix-color-6);margin:0;font-weight:500}.helix-stats-card__trend{display:flex;align-items:center;gap:.25rem;font-size:.75rem;font-weight:600;color:var(--helix-success);background:var(--helix-success-light);padding:.25rem .5rem;border-radius:6px}.helix-trend-icon{width:12px!important;height:12px!important}.helix-dashboard__content{display:grid;grid-template-columns:repeat(auto-fit,minmax(400px,1fr));gap:1.5rem}.helix-widget{background:var(--helix-color-1);border-radius:12px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;overflow:hidden;border:1px solid var(--helix-color-3);transition:box-shadow .2s ease}.helix-widget:hover{box-shadow:0 10px 25px -3px #0000001a,0 4px 6px -2px #0000000d}.helix-widget__header{padding:1.25rem 1.5rem;border-bottom:1px solid var(--helix-color-2);display:flex;justify-content:space-between;align-items:center;background:linear-gradient(135deg,var(--helix-color-1) 0%,var(--helix-color-2) 100%)}.helix-widget__header h2{margin:0;font-size:1.25rem;color:var(--helix-color-9);flex-grow:1}.helix-widget__link{color:var(--helix-color-8);text-decoration:none;font-size:.9rem}.helix-widget__link:hover{text-decoration:underline}.helix-widget__content{padding:1.5rem}.helix-widget__empty{color:var(--helix-color-6);font-style:italic}.helix-posts-list,.helix-comments-list{list-style:none;padding:0;margin:0}.helix-posts-list__item,.helix-comments-list__item{display:flex;justify-content:space-between;align-items:flex-start;padding:1rem 0;border-bottom:1px solid var(--helix-color-2)}.helix-posts-list__item:last-child,.helix-comments-list__item:last-child{border-bottom:none}.helix-posts-list__title a,.helix-comments-list__author{color:var(--helix-color-9);text-decoration:none;font-weight:500}.helix-posts-list__title a:hover{color:var(--helix-color-8)}.helix-posts-list__date,.helix-comments-list__date{color:var(--helix-color-6);font-size:.9rem;margin:.25rem 0 0}.helix-comments-list__excerpt{color:var(--helix-color-6);margin:.25rem 0;font-size:.9rem}.helix-status{padding:.25rem .5rem;border-radius:.25rem;font-size:.8rem;font-weight:500}.helix-status--publish{background:var(--helix-success-light);color:var(--helix-success)}.helix-status--draft{background:var(--helix-warning-light);color:var(--helix-warning)}.helix-status--approved{background:var(--helix-success-light);color:var(--helix-success)}.helix-status--pending{background:var(--helix-warning-light);color:var(--helix-warning)}.helix-quick-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:1rem}.helix-quick-action{display:flex;flex-direction:column;align-items:center;padding:1.25rem 1rem;background:linear-gradient(135deg,var(--helix-color-1) 0%,var(--helix-color-2) 100%);border-radius:10px;text-decoration:none;color:var(--helix-color-9);transition:all .2s ease;border:1px solid var(--helix-color-3);position:relative;overflow:hidden}.helix-quick-action:hover{background:linear-gradient(135deg,var(--helix-color-3) 0%,var(--helix-color-4) 100%);transform:translateY(-2px);box-shadow:0 4px 12px #00000026;color:var(--helix-color-10)}.helix-quick-action__icon{display:flex;align-items:center;justify-content:center;width:48px;height:48px;background:var(--helix-color-1);border-radius:10px;margin-bottom:.75rem;box-shadow:0 2px 4px #0000001a;transition:all .2s ease}.helix-quick-action:hover .helix-quick-action__icon{background:var(--helix-color-8);transform:scale(1.1)}.helix-quick-action:hover .helix-quick-action__icon svg{color:#fff}.helix-quick-action__icon svg{width:20px;height:20px;color:var(--helix-color-6);transition:color .2s ease}.helix-quick-action__text{font-size:.875rem;font-weight:600;text-align:center;line-height:1.2}.helix-news-placeholder{color:var(--helix-color-6)}.helix-news-item h4{margin:0 0 .5rem;color:var(--helix-color-9)}.helix-news-item p{margin:0 0 .5rem;font-size:.9rem}.helix-news-item a{color:var(--helix-color-8);text-decoration:none;font-size:.9rem}.helix-news-item a:hover{text-decoration:underline}:root{--helix-color-1: #fafaf9;--helix-color-2: #f5f5f4;--helix-color-3: #e7e5e4;--helix-color-4: #d6d3d1;--helix-color-5: #a8a29e;--helix-color-6: #78716c;--helix-color-7: #57534e;--helix-color-8: #44403c;--helix-color-9: #292524;--helix-color-10: #1c1917;--helix-success: #059669;--helix-success-light: #d1fae5;--helix-error: #dc2626;--helix-error-light: #fee2e2;--helix-warning: #d97706;--helix-warning-light: #fed7aa;--helix-primary: #2563eb;--helix-primary-light: #dbeafe}.helix-settings-page{max-width:1400px;margin:0 auto;padding:2rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif}.helix-settings-header{margin-bottom:3rem;background:linear-gradient(135deg,var(--helix-color-8) 0%,var(--helix-color-10) 100%);color:#fff;padding:3rem 2rem;margin:-2rem 0 3rem -2rem;border-radius:0 0 24px 24px;position:relative;overflow:hidden}.helix-settings-header:before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:url('data:image/svg+xml,');opacity:.3}.helix-settings-header h1{font-size:3rem;font-weight:800;color:#fff;margin:0 0 .5rem;position:relative;z-index:1;text-shadow:0 2px 4px rgba(0,0,0,.3)}.helix-settings-header p{font-size:1.25rem;color:#ffffffe6;margin:0;position:relative;z-index:1;font-weight:400;line-height:3}.helix-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;text-align:center}.helix-loading p{margin:20px 0 0;font-size:1.1rem;color:var(--helix-color-6)}.helix-spinner{width:24px;height:24px;border:3px solid var(--helix-color-3);border-top:3px solid var(--helix-primary);border-radius:50%;animation:spin 1s linear infinite;display:inline-block}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.helix-settings-controls,.helix-settings-footer{display:flex;justify-content:center;margin:30px 0;padding:20px 0;border-top:1px solid var(--helix-color-3)}.helix-settings-footer{border-bottom:1px solid var(--helix-color-3);margin-top:50px}.helix-save-buttons{display:flex;align-items:center;gap:15px}.helix-btn{padding:12px 24px;font-size:14px;font-weight:500;border-radius:8px;border:1px solid transparent;cursor:pointer;transition:all .2s ease;display:inline-flex;align-items:center;gap:8px}.helix-btn:disabled{opacity:.6;cursor:not-allowed}.helix-btn-primary{background:linear-gradient(135deg,var(--helix-color-8) 0%,var(--helix-color-10) 100%);color:#fff;border-color:var(--helix-color-8);box-shadow:0 4px 6px -1px #2563eb33}.helix-btn-primary:hover:not(:disabled){background:linear-gradient(135deg,var(--helix-color-7) 0%,var(--helix-color-9) 100%);border-color:var(--helix-color-7);transform:translateY(-1px);box-shadow:0 8px 15px -3px #2563eb4d}.helix-btn-secondary{background-color:#fff;color:var(--helix-color-9);border-color:var(--helix-color-4)}.helix-btn-secondary:hover:not(:disabled){background-color:var(--helix-color-2);border-color:var(--helix-color-5)}.helix-save-status{color:var(--helix-success);font-weight:500;display:flex;align-items:center;gap:5px}.helix-settings-tabs{margin:30px 0}.helix-tabs-nav{display:flex;border-bottom:2px solid var(--helix-color-3);overflow-x:auto;gap:2px}.helix-tab{display:flex;align-items:center;gap:8px;padding:12px 20px;font-size:14px;font-weight:500;color:var(--helix-color-6);background:none;border:none;border-bottom:3px solid transparent;cursor:pointer;transition:all .2s ease;white-space:nowrap;position:relative}.helix-tab:hover{color:var(--helix-color-8);background-color:var(--helix-color-1)}.helix-tab.active{color:var(--helix-color-8);border-bottom-color:var(--helix-color-8)}.helix-tab-icon{font-size:16px;display:flex;align-items:center;justify-content:center}.helix-tab-icon svg{width:20px;height:20px;transition:color .2s ease}.helix-tab-indicator{color:#f59e0b;font-size:12px;position:absolute;top:5px;right:5px}.helix-settings-content{margin:40px 0}.helix-tab-panel{min-height:400px}.helix-settings-section{background:var(--helix-color-1);border-radius:12px;border:1px solid rgba(226,232,240,.5);overflow:hidden;margin-bottom:30px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;transition:transform .2s ease,box-shadow .2s ease}.helix-settings-section:hover{transform:translateY(-2px);box-shadow:0 10px 25px -3px #0000001a,0 4px 6px -2px #0000000d}.helix-settings-section-header{background:linear-gradient(135deg,var(--helix-color-1) 0%,var(--helix-color-2) 100%);padding:24px;border-bottom:1px solid rgba(37,99,235,.1)}.helix-settings-section-title{font-size:1.5rem;font-weight:600;color:var(--helix-color-10);margin:0 0 8px}.helix-settings-section-description{color:var(--helix-color-6);margin:0;font-size:14px}.helix-settings-section-content{padding:24px}.helix-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px;align-items:start}.helix-settings-grid .helix-form-field{width:100%}.helix-settings-grid .helix-form-field:last-child:nth-child(odd){grid-column:1 / -1}.helix-settings-subsection .helix-form-field{margin-bottom:16px}.helix-settings-grid .helix-form-field+.helix-form-field{margin-top:0}.helix-settings-subsection{border-top:1px solid var(--helix-color-3);padding-top:24px;margin-top:24px;grid-column:1 / -1}.helix-settings-subsection-header{grid-column:1 / -1;border-top:1px solid var(--helix-color-3);padding-top:24px;margin-top:24px}.helix-settings-subsection h4{font-size:1.1rem;font-weight:600;color:var(--helix-color-9);margin:0 0 20px}.helix-form-field{display:flex;flex-direction:column;gap:8px}.helix-form-label{font-weight:500;color:var(--helix-color-9);font-size:14px}.helix-required{color:var(--helix-error);margin-left:4px}.helix-form-control{display:flex;flex-direction:column}.helix-form-description{font-size:13px;color:var(--helix-color-6);margin:0;line-height:1.4}.helix-form-error{font-size:13px;color:var(--helix-error);margin:0}.helix-text-input,.helix-number-input,.helix-select-input{padding:10px 12px;border:1px solid var(--helix-color-3);border-radius:6px;font-size:14px;transition:border-color .2s ease;background:var(--helix-color-1)}.helix-text-input:focus,.helix-number-input:focus,.helix-select-input:focus{outline:none;border-color:var(--helix-color-8);box-shadow:0 0 0 3px #2563eb1a}.helix-select-input{cursor:pointer}.helix-toggle-field{margin:16px 0}.helix-toggle-wrapper{display:flex;align-items:center;gap:12px}.helix-toggle-label{font-weight:500;color:var(--helix-color-9);font-size:14px;cursor:pointer;-webkit-user-select:none;user-select:none}.helix-toggle-label-disabled{opacity:.5;cursor:not-allowed}.helix-toggle-switch{position:relative;width:48px;height:24px;border-radius:24px;border:none;cursor:pointer;transition:all .2s ease-in-out;flex-shrink:0;outline:none;padding:0;margin:0;display:inline-flex;align-items:center}.helix-toggle-switch:focus{box-shadow:0 0 0 3px var(--helix-color-3);outline:none}.helix-toggle-switch-off{background-color:var(--helix-color-3)}.helix-toggle-switch-off:hover:not(:disabled){background-color:var(--helix-color-4)}.helix-toggle-switch-on{background-color:var(--helix-color-8)}.helix-toggle-switch-on:hover:not(:disabled){background-color:var(--helix-color-9)}.helix-toggle-switch-disabled{opacity:.5;cursor:not-allowed}.helix-toggle-knob{display:inline-block;width:20px;height:20px;background-color:#fff;border-radius:50%;box-shadow:0 2px 4px #0003;transition:transform .2s ease-in-out;transform:translate(2px)}.helix-toggle-knob-on{transform:translate(26px)}.helix-toggle-knob-off{transform:translate(2px)}.helix-notification{background:var(--helix-color-1);border:1px solid var(--helix-color-3);border-radius:8px;padding:16px;margin:20px 0;box-shadow:0 4px 6px -1px #0000001a;opacity:0;transform:translateY(-10px);transition:all .3s ease}.helix-notification.visible{opacity:1;transform:translateY(0)}.helix-notification-success{background-color:var(--helix-success-light)}.helix-notification-error{background-color:var(--helix-error-light)}.helix-notification-warning{background-color:var(--helix-warning-light)}.helix-notification-info{background-color:var(--helix-primary-light)}.helix-notification-content{display:flex;align-items:center;gap:12px}.helix-notification-icon{font-size:18px;flex-shrink:0}.helix-notification-message{flex:1;font-size:14px;color:var(--helix-color-9)}.helix-notification-close{background:none;border:none;font-size:20px;color:var(--helix-color-6);cursor:pointer;padding:0;line-height:1;flex-shrink:0}.helix-notification-close:hover{color:var(--helix-color-9)}@media (max-width: 1024px){.helix-settings-grid{grid-template-columns:1fr;gap:20px}.helix-settings-subsection-header{margin-top:20px;padding-top:20px}}@media (max-width: 768px){.helix-settings-page{padding:15px}.helix-settings-header h1{font-size:2rem}.helix-tabs-nav{flex-direction:column;gap:0}.helix-tab{justify-content:flex-start;border-bottom:1px solid var(--helix-color-3);border-right:none}.helix-tab.active{border-bottom-color:var(--helix-color-3);border-left:3px solid var(--helix-primary);background-color:var(--helix-color-1)}.helix-settings-section-content,.helix-settings-section-header{padding:20px}.helix-settings-grid{grid-template-columns:1fr;gap:20px}.helix-settings-subsection-header{margin-top:20px;padding-top:20px}.helix-save-buttons{flex-direction:column;width:100%}.helix-btn{width:100%;justify-content:center}} diff --git a/build/index.js b/build/index.js index d24a257..c2917ce 100644 --- a/build/index.js +++ b/build/index.js @@ -52,4 +52,4 @@ const theme = ${JSON.stringify(t,null,2)}; theme.breakpoints = createBreakpoints(theme.breakpoints || {}); theme.transitions = createTransitions(theme.transitions || {}); -export default theme;`}function kc(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const My=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let r=0;rBe(v,S),w),w.unstable_sxConfig={...qi,...g==null?void 0:g.unstable_sxConfig},w.unstable_sx=function(S){return tr({sx:S,theme:this})},w.toRuntimeSource=pp,Fy(w),w}function Dy(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const By=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=Dy(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function hp(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function mp(e){return e==="dark"?By:[]}function Uy(e){const{palette:t={mode:"light"},opacity:n,overlays:r,colorSpace:l,...i}=e,o=ba({...t,colorSpace:l});return{palette:o,opacity:{...hp(o.mode),...n},overlays:r||mp(o.mode),...i}}function Wy(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const Vy=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],by=e=>(t,n)=>{const r=e.rootSelector||":root",l=e.colorSchemeSelector;let i=l;if(l==="class"&&(i=".%s"),l==="data"&&(i="[data-%s]"),l!=null&&l.startsWith("data-")&&!l.includes("%s")&&(i=`[${l}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const o={};return Vy(e.cssVarPrefix).forEach(s=>{o[s]=n[s],delete n[s]}),i==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:o}}:i?{[i.replace("%s",t)]:o,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...o}}}if(i&&i!=="media")return`${r}, ${i.replace("%s",String(t))}`}else if(t){if(i==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}return r};function Hy(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function C(e,t,n){!e[t]&&n&&(e[t]=n)}function _r(e){return typeof e!="string"||!e.startsWith("hsl")?e:ap(e)}function vt(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Cr(_r(e[t])))}function Qy(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const ct=e=>{try{return e()}catch{}},Ky=(e="mui")=>cy(e);function Fo(e,t,n,r,l){if(!n)return;n=n===!0?{}:n;const i=l==="dark"?"dark":"light";if(!r){t[l]=Uy({...n,palette:{mode:i,...n==null?void 0:n.palette},colorSpace:e});return}const{palette:o,...s}=Fs({...r,palette:{mode:i,...n==null?void 0:n.palette},colorSpace:e});return t[l]={...n,palette:o,opacity:{...hp(i),...n==null?void 0:n.opacity},overlays:(n==null?void 0:n.overlays)||mp(i)},s}function Yy(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:l=!1,cssVarPrefix:i="mui",nativeColor:o=!1,shouldSkipGeneratingVar:s=Wy,colorSchemeSelector:a=n.light&&n.dark?"media":void 0,rootSelector:u=":root",...g}=e,m=Object.keys(n)[0],h=r||(n.light&&m!=="light"?"light":m),w=Ky(i),{[h]:v,light:S,dark:T,...d}=n,c={...d};let y=v;if((h==="dark"&&!("dark"in n)||h==="light"&&!("light"in n))&&(y=!0),!y)throw new Error(vn(21,h));let x;o&&(x="oklch");const E=Fo(x,c,y,g,h);S&&!c.light&&Fo(x,c,S,void 0,"light"),T&&!c.dark&&Fo(x,c,T,void 0,"dark");let k={defaultColorScheme:h,...E,cssVarPrefix:i,colorSchemeSelector:a,rootSelector:u,getCssVar:w,colorSchemes:c,font:{...Cy(E.typography),...E.font},spacing:Qy(g.spacing)};Object.keys(k.colorSchemes).forEach(D=>{const f=k.colorSchemes[D].palette,z=L=>{const W=L.split("-"),we=W[1],j=W[2];return w(L,f[we][j])};f.mode==="light"&&(C(f.common,"background","#fff"),C(f.common,"onBackground","#000")),f.mode==="dark"&&(C(f.common,"background","#000"),C(f.common,"onBackground","#fff"));function N(L,W,we){if(x){let j;return L===tn&&(j=`transparent ${((1-we)*100).toFixed(0)}%`),L===H&&(j=`#000 ${(we*100).toFixed(0)}%`),L===Q&&(j=`#fff ${(we*100).toFixed(0)}%`),`color-mix(in ${x}, ${W}, ${j})`}return L(W,we)}if(Hy(f,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),f.mode==="light"){C(f.Alert,"errorColor",N(H,f.error.light,.6)),C(f.Alert,"infoColor",N(H,f.info.light,.6)),C(f.Alert,"successColor",N(H,f.success.light,.6)),C(f.Alert,"warningColor",N(H,f.warning.light,.6)),C(f.Alert,"errorFilledBg",z("palette-error-main")),C(f.Alert,"infoFilledBg",z("palette-info-main")),C(f.Alert,"successFilledBg",z("palette-success-main")),C(f.Alert,"warningFilledBg",z("palette-warning-main")),C(f.Alert,"errorFilledColor",ct(()=>f.getContrastText(f.error.main))),C(f.Alert,"infoFilledColor",ct(()=>f.getContrastText(f.info.main))),C(f.Alert,"successFilledColor",ct(()=>f.getContrastText(f.success.main))),C(f.Alert,"warningFilledColor",ct(()=>f.getContrastText(f.warning.main))),C(f.Alert,"errorStandardBg",N(Q,f.error.light,.9)),C(f.Alert,"infoStandardBg",N(Q,f.info.light,.9)),C(f.Alert,"successStandardBg",N(Q,f.success.light,.9)),C(f.Alert,"warningStandardBg",N(Q,f.warning.light,.9)),C(f.Alert,"errorIconColor",z("palette-error-main")),C(f.Alert,"infoIconColor",z("palette-info-main")),C(f.Alert,"successIconColor",z("palette-success-main")),C(f.Alert,"warningIconColor",z("palette-warning-main")),C(f.AppBar,"defaultBg",z("palette-grey-100")),C(f.Avatar,"defaultBg",z("palette-grey-400")),C(f.Button,"inheritContainedBg",z("palette-grey-300")),C(f.Button,"inheritContainedHoverBg",z("palette-grey-A100")),C(f.Chip,"defaultBorder",z("palette-grey-400")),C(f.Chip,"defaultAvatarColor",z("palette-grey-700")),C(f.Chip,"defaultIconColor",z("palette-grey-700")),C(f.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),C(f.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),C(f.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),C(f.LinearProgress,"primaryBg",N(Q,f.primary.main,.62)),C(f.LinearProgress,"secondaryBg",N(Q,f.secondary.main,.62)),C(f.LinearProgress,"errorBg",N(Q,f.error.main,.62)),C(f.LinearProgress,"infoBg",N(Q,f.info.main,.62)),C(f.LinearProgress,"successBg",N(Q,f.success.main,.62)),C(f.LinearProgress,"warningBg",N(Q,f.warning.main,.62)),C(f.Skeleton,"bg",x?N(tn,f.text.primary,.11):`rgba(${z("palette-text-primaryChannel")} / 0.11)`),C(f.Slider,"primaryTrack",N(Q,f.primary.main,.62)),C(f.Slider,"secondaryTrack",N(Q,f.secondary.main,.62)),C(f.Slider,"errorTrack",N(Q,f.error.main,.62)),C(f.Slider,"infoTrack",N(Q,f.info.main,.62)),C(f.Slider,"successTrack",N(Q,f.success.main,.62)),C(f.Slider,"warningTrack",N(Q,f.warning.main,.62));const L=x?N(H,f.background.default,.6825):zl(f.background.default,.8);C(f.SnackbarContent,"bg",L),C(f.SnackbarContent,"color",ct(()=>x?Ms.text.primary:f.getContrastText(L))),C(f.SpeedDialAction,"fabHoverBg",zl(f.background.paper,.15)),C(f.StepConnector,"border",z("palette-grey-400")),C(f.StepContent,"border",z("palette-grey-400")),C(f.Switch,"defaultColor",z("palette-common-white")),C(f.Switch,"defaultDisabledColor",z("palette-grey-100")),C(f.Switch,"primaryDisabledColor",N(Q,f.primary.main,.62)),C(f.Switch,"secondaryDisabledColor",N(Q,f.secondary.main,.62)),C(f.Switch,"errorDisabledColor",N(Q,f.error.main,.62)),C(f.Switch,"infoDisabledColor",N(Q,f.info.main,.62)),C(f.Switch,"successDisabledColor",N(Q,f.success.main,.62)),C(f.Switch,"warningDisabledColor",N(Q,f.warning.main,.62)),C(f.TableCell,"border",N(Q,N(tn,f.divider,1),.88)),C(f.Tooltip,"bg",N(tn,f.grey[700],.92))}if(f.mode==="dark"){C(f.Alert,"errorColor",N(Q,f.error.light,.6)),C(f.Alert,"infoColor",N(Q,f.info.light,.6)),C(f.Alert,"successColor",N(Q,f.success.light,.6)),C(f.Alert,"warningColor",N(Q,f.warning.light,.6)),C(f.Alert,"errorFilledBg",z("palette-error-dark")),C(f.Alert,"infoFilledBg",z("palette-info-dark")),C(f.Alert,"successFilledBg",z("palette-success-dark")),C(f.Alert,"warningFilledBg",z("palette-warning-dark")),C(f.Alert,"errorFilledColor",ct(()=>f.getContrastText(f.error.dark))),C(f.Alert,"infoFilledColor",ct(()=>f.getContrastText(f.info.dark))),C(f.Alert,"successFilledColor",ct(()=>f.getContrastText(f.success.dark))),C(f.Alert,"warningFilledColor",ct(()=>f.getContrastText(f.warning.dark))),C(f.Alert,"errorStandardBg",N(H,f.error.light,.9)),C(f.Alert,"infoStandardBg",N(H,f.info.light,.9)),C(f.Alert,"successStandardBg",N(H,f.success.light,.9)),C(f.Alert,"warningStandardBg",N(H,f.warning.light,.9)),C(f.Alert,"errorIconColor",z("palette-error-main")),C(f.Alert,"infoIconColor",z("palette-info-main")),C(f.Alert,"successIconColor",z("palette-success-main")),C(f.Alert,"warningIconColor",z("palette-warning-main")),C(f.AppBar,"defaultBg",z("palette-grey-900")),C(f.AppBar,"darkBg",z("palette-background-paper")),C(f.AppBar,"darkColor",z("palette-text-primary")),C(f.Avatar,"defaultBg",z("palette-grey-600")),C(f.Button,"inheritContainedBg",z("palette-grey-800")),C(f.Button,"inheritContainedHoverBg",z("palette-grey-700")),C(f.Chip,"defaultBorder",z("palette-grey-700")),C(f.Chip,"defaultAvatarColor",z("palette-grey-300")),C(f.Chip,"defaultIconColor",z("palette-grey-300")),C(f.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),C(f.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),C(f.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),C(f.LinearProgress,"primaryBg",N(H,f.primary.main,.5)),C(f.LinearProgress,"secondaryBg",N(H,f.secondary.main,.5)),C(f.LinearProgress,"errorBg",N(H,f.error.main,.5)),C(f.LinearProgress,"infoBg",N(H,f.info.main,.5)),C(f.LinearProgress,"successBg",N(H,f.success.main,.5)),C(f.LinearProgress,"warningBg",N(H,f.warning.main,.5)),C(f.Skeleton,"bg",x?N(tn,f.text.primary,.13):`rgba(${z("palette-text-primaryChannel")} / 0.13)`),C(f.Slider,"primaryTrack",N(H,f.primary.main,.5)),C(f.Slider,"secondaryTrack",N(H,f.secondary.main,.5)),C(f.Slider,"errorTrack",N(H,f.error.main,.5)),C(f.Slider,"infoTrack",N(H,f.info.main,.5)),C(f.Slider,"successTrack",N(H,f.success.main,.5)),C(f.Slider,"warningTrack",N(H,f.warning.main,.5));const L=x?N(Q,f.background.default,.985):zl(f.background.default,.98);C(f.SnackbarContent,"bg",L),C(f.SnackbarContent,"color",ct(()=>x?fp.text.primary:f.getContrastText(L))),C(f.SpeedDialAction,"fabHoverBg",zl(f.background.paper,.15)),C(f.StepConnector,"border",z("palette-grey-600")),C(f.StepContent,"border",z("palette-grey-600")),C(f.Switch,"defaultColor",z("palette-grey-300")),C(f.Switch,"defaultDisabledColor",z("palette-grey-600")),C(f.Switch,"primaryDisabledColor",N(H,f.primary.main,.55)),C(f.Switch,"secondaryDisabledColor",N(H,f.secondary.main,.55)),C(f.Switch,"errorDisabledColor",N(H,f.error.main,.55)),C(f.Switch,"infoDisabledColor",N(H,f.info.main,.55)),C(f.Switch,"successDisabledColor",N(H,f.success.main,.55)),C(f.Switch,"warningDisabledColor",N(H,f.warning.main,.55)),C(f.TableCell,"border",N(H,N(tn,f.divider,1),.68)),C(f.Tooltip,"bg",N(tn,f.grey[700],.92))}vt(f.background,"default"),vt(f.background,"paper"),vt(f.common,"background"),vt(f.common,"onBackground"),vt(f,"divider"),Object.keys(f).forEach(L=>{const W=f[L];L!=="tonalOffset"&&W&&typeof W=="object"&&(W.main&&C(f[L],"mainChannel",Cr(_r(W.main))),W.light&&C(f[L],"lightChannel",Cr(_r(W.light))),W.dark&&C(f[L],"darkChannel",Cr(_r(W.dark))),W.contrastText&&C(f[L],"contrastTextChannel",Cr(_r(W.contrastText))),L==="text"&&(vt(f[L],"primary"),vt(f[L],"secondary")),L==="action"&&(W.active&&vt(f[L],"active"),W.selected&&vt(f[L],"selected")))})}),k=t.reduce((D,f)=>Be(D,f),k);const _={prefix:i,disableCssColorScheme:l,shouldSkipGeneratingVar:s,getSelector:by(k),enableContrastVars:o},{vars:$,generateThemeVars:M,generateStyleSheets:A}=py(k,_);return k.vars=$,Object.entries(k.colorSchemes[k.defaultColorScheme]).forEach(([D,f])=>{k[D]=f}),k.generateThemeVars=M,k.generateStyleSheets=A,k.generateSpacing=function(){return rp(g.spacing,Fa(this))},k.getColorSchemeSelector=hy(a),k.spacing=k.generateSpacing(),k.shouldSkipGeneratingVar=s,k.unstable_sxConfig={...qi,...g==null?void 0:g.unstable_sxConfig},k.unstable_sx=function(f){return tr({sx:f,theme:this})},k.toRuntimeSource=pp,k}function Cc(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:ba({...n===!0?{}:n.palette,mode:t})})}function Gy(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:l=n?void 0:{light:!0},defaultColorScheme:i=n==null?void 0:n.mode,...o}=e,s=i||"light",a=l==null?void 0:l[s],u={...l,...n?{[s]:{...typeof a!="boolean"&&a,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return Fs(e,...t);let g=n;"palette"in e||u[s]&&(u[s]!==!0?g=u[s].palette:s==="dark"&&(g={mode:"dark"}));const m=Fs({...e,palette:g},...t);return m.defaultColorScheme=s,m.colorSchemes=u,m.palette.mode==="light"&&(m.colorSchemes.light={...u.light!==!0&&u.light,palette:m.palette},Cc(m,"dark",u.dark)),m.palette.mode==="dark"&&(m.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:m.palette},Cc(m,"light",u.light)),m}return!n&&!("light"in u)&&s==="light"&&(u.light=!0),Yy({...o,colorSchemes:u,defaultColorScheme:s,...typeof r!="boolean"&&r},...t)}const Xy=Gy(),Zy="$$material";function Jy(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const qy=e=>Jy(e)&&e!=="classes",ev=X0({themeId:Zy,defaultTheme:Xy,rootShouldForwardProp:qy}),tv=uy;function nv(e){return ay(e)}function rv(e){return ip("MuiSvgIcon",e)}Q0("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const lv=e=>{const{color:t,fontSize:n,classes:r}=e,l={root:["root",t!=="inherit"&&`color${er(t)}`,`fontSize${er(n)}`]};return Zm(l,rv,r)},iv=ev("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${er(n.color)}`],t[`fontSize${er(n.fontSize)}`]]}})(tv(({theme:e})=>{var t,n,r,l,i,o,s,a,u,g,m,h,w,v;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(l=(t=e.transitions)==null?void 0:t.create)==null?void 0:l.call(t,"fill",{duration:(r=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:S=>!S.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((o=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:o.call(i,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((a=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:a.call(s,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((g=(u=e.typography)==null?void 0:u.pxToRem)==null?void 0:g.call(u,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,S])=>S&&S.main).map(([S])=>{var T,d;return{props:{color:S},style:{color:(d=(T=(e.vars??e).palette)==null?void 0:T[S])==null?void 0:d.main}}}),{props:{color:"action"},style:{color:(h=(m=(e.vars??e).palette)==null?void 0:m.action)==null?void 0:h.active}},{props:{color:"disabled"},style:{color:(v=(w=(e.vars??e).palette)==null?void 0:w.action)==null?void 0:v.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Ds=I.forwardRef(function(t,n){const r=nv({props:t,name:"MuiSvgIcon"}),{children:l,className:i,color:o="inherit",component:s="svg",fontSize:a="medium",htmlColor:u,inheritViewBox:g=!1,titleAccess:m,viewBox:h="0 0 24 24",...w}=r,v=I.isValidElement(l)&&l.type==="svg",S={...r,color:o,component:s,fontSize:a,instanceFontSize:t.fontSize,inheritViewBox:g,viewBox:h,hasSvgAsChild:v},T={};g||(T.viewBox=h);const d=lv(S);return p.jsxs(iv,{as:s,className:Bd(d.root,i),focusable:"false",color:u,"aria-hidden":m?void 0:!0,role:m?"img":void 0,ref:n,...T,...w,...v&&l.props,ownerState:S,children:[v?l.props.children:l,m?p.jsx("title",{children:m}):null]})});Ds.muiName="SvgIcon";function tt(e,t){function n(r,l){return p.jsx(Ds,{"data-testid":void 0,ref:l,...r,children:e})}return n.muiName=Ds.muiName,I.memo(I.forwardRef(n))}const gp=tt(p.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-5 14H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"})),ov=tt(p.jsx("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"})),sv=tt(p.jsx("path",{d:"M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4zM18 14H6v-2h12zm0-3H6V9h12zm0-3H6V6h12z"})),yp=tt(p.jsx("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5s-3 1.34-3 3 1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"})),vp=tt(p.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"})),av=tt(p.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"})),uv=tt(p.jsx("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M14 13v4h-4v-4H7l5-5 5 5z"})),cv=tt(p.jsx("path",{d:"M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-1 11-2.5-1.5L14 13V5h5z"})),fv=tt(p.jsx("path",{d:"m16 6 2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z"}));function dv(){const[e,t]=I.useState({postsCount:0,pagesCount:0,commentsCount:0,usersCount:0,recentPosts:[],recentComments:[],loading:!0});I.useEffect(()=>{(async()=>{var i,o,s,a;try{const[u,g,m,h]=await Promise.all([fetch(`${((i=window.helixData)==null?void 0:i.restUrl)||"/wp-json/wp/v2/"}posts?per_page=5`),fetch(`${((o=window.helixData)==null?void 0:o.restUrl)||"/wp-json/wp/v2/"}pages?per_page=5`),fetch(`${((s=window.helixData)==null?void 0:s.restUrl)||"/wp-json/wp/v2/"}comments?per_page=5`),fetch(`${((a=window.helixData)==null?void 0:a.restUrl)||"/wp-json/wp/v2/"}users?per_page=5`)]),[w,v,S,T]=await Promise.all([u.json(),g.json(),m.json(),h.json()]);t({postsCount:u.headers.get("X-WP-Total")||w.length,pagesCount:g.headers.get("X-WP-Total")||v.length,commentsCount:m.headers.get("X-WP-Total")||S.length,usersCount:h.headers.get("X-WP-Total")||T.length,recentPosts:w.slice(0,5),recentComments:S.slice(0,5),loading:!1})}catch{t(g=>({...g,loading:!1}))}})()},[]);const n=({title:l,count:i,icon:o,color:s,trend:a})=>p.jsxs("div",{className:`helix-stats-card helix-stats-card--${s}`,children:[p.jsx("div",{className:"helix-stats-card__icon",children:p.jsx(o,{})}),p.jsxs("div",{className:"helix-stats-card__content",children:[p.jsxs("div",{className:"helix-stats-card__header",children:[p.jsx("h3",{className:"helix-stats-card__count",children:i}),a&&p.jsxs("div",{className:"helix-stats-card__trend",children:[p.jsx(fv,{className:"helix-trend-icon"}),p.jsx("span",{children:a})]})]}),p.jsx("p",{className:"helix-stats-card__title",children:l})]})]}),r=l=>new Date(l).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});return e.loading?p.jsx("div",{className:"helix-settings-page",children:p.jsxs("div",{className:"helix-loading",children:[p.jsx("div",{className:"helix-spinner"}),p.jsx("p",{children:"Loading dashboard..."})]})}):p.jsxs("div",{className:"helix-dashboard",children:[p.jsxs("div",{className:"helix-dashboard__header",children:[p.jsx("h1",{children:"Welcome to Helix"}),p.jsx("p",{children:"Your modern WordPress admin experience"})]}),p.jsxs("div",{className:"helix-dashboard__stats",children:[p.jsx(n,{title:"Posts",count:e.postsCount,icon:gp,color:"blue",trend:"+12%"}),p.jsx(n,{title:"Pages",count:e.pagesCount,icon:ov,color:"green",trend:"+5%"}),p.jsx(n,{title:"Comments",count:e.commentsCount,icon:sv,color:"orange",trend:"+28%"}),p.jsx(n,{title:"Users",count:e.usersCount,icon:yp,color:"purple",trend:"+3%"})]}),p.jsxs("div",{className:"helix-dashboard__content",children:[p.jsxs("div",{className:"helix-widget",children:[p.jsxs("div",{className:"helix-widget__header",children:[p.jsx("h2",{children:"Recent Posts"}),p.jsx("a",{href:"/wp-admin/edit.php",className:"helix-widget__link",children:"View All"})]}),p.jsx("div",{className:"helix-widget__content",children:e.recentPosts.length>0?p.jsx("ul",{className:"helix-posts-list",children:e.recentPosts.map(l=>p.jsxs("li",{className:"helix-posts-list__item",children:[p.jsxs("div",{className:"helix-posts-list__content",children:[p.jsx("h3",{className:"helix-posts-list__title",children:p.jsx("a",{href:`/wp-admin/post.php?post=${l.id}&action=edit`,children:l.title.rendered||"Untitled"})}),p.jsx("p",{className:"helix-posts-list__date",children:r(l.date)})]}),p.jsx("div",{className:"helix-posts-list__status",children:p.jsx("span",{className:`helix-status helix-status--${l.status}`,children:l.status})})]},l.id))}):p.jsxs("p",{className:"helix-widget__empty",children:["No posts yet."," ",p.jsx("a",{href:"/wp-admin/post-new.php",children:"Create your first post!"})]})})]}),p.jsxs("div",{className:"helix-widget",children:[p.jsxs("div",{className:"helix-widget__header",children:[p.jsx("h2",{children:"Recent Comments"}),p.jsx("a",{href:"/wp-admin/edit-comments.php",className:"helix-widget__link",children:"View All"})]}),p.jsx("div",{className:"helix-widget__content",children:e.recentComments.length>0?p.jsx("ul",{className:"helix-comments-list",children:e.recentComments.map(l=>p.jsxs("li",{className:"helix-comments-list__item",children:[p.jsxs("div",{className:"helix-comments-list__content",children:[p.jsx("h4",{className:"helix-comments-list__author",children:l.author_name}),p.jsxs("p",{className:"helix-comments-list__excerpt",children:[l.content.rendered.replace(/<[^>]*>/g,"").substring(0,100),"..."]}),p.jsx("p",{className:"helix-comments-list__date",children:r(l.date)})]}),p.jsx("div",{className:"helix-comments-list__status",children:p.jsx("span",{className:`helix-status helix-status--${l.status}`,children:l.status})})]},l.id))}):p.jsx("p",{className:"helix-widget__empty",children:"No comments yet."})})]}),p.jsxs("div",{className:"helix-widget",children:[p.jsx("div",{className:"helix-widget__header",children:p.jsx("h2",{children:"Quick Actions"})}),p.jsx("div",{className:"helix-widget__content",children:p.jsxs("div",{className:"helix-quick-actions",children:[p.jsxs("a",{href:"/wp-admin/post-new.php",className:"helix-quick-action",children:[p.jsx("span",{className:"helix-quick-action__icon",children:p.jsx(vp,{})}),p.jsx("span",{className:"helix-quick-action__text",children:"Write a Post"})]}),p.jsxs("a",{href:"/wp-admin/post-new.php?post_type=page",className:"helix-quick-action",children:[p.jsx("span",{className:"helix-quick-action__icon",children:p.jsx(av,{})}),p.jsx("span",{className:"helix-quick-action__text",children:"Create a Page"})]}),p.jsxs("a",{href:"/wp-admin/upload.php",className:"helix-quick-action",children:[p.jsx("span",{className:"helix-quick-action__icon",children:p.jsx(uv,{})}),p.jsx("span",{className:"helix-quick-action__text",children:"Upload Media"})]}),p.jsxs("a",{href:"/wp-admin/edit-comments.php",className:"helix-quick-action",children:[p.jsx("span",{className:"helix-quick-action__icon",children:p.jsx(cv,{})}),p.jsx("span",{className:"helix-quick-action__text",children:"Moderate Comments"})]})]})})]}),p.jsxs("div",{className:"helix-widget",children:[p.jsx("div",{className:"helix-widget__header",children:p.jsx("h2",{children:"WordPress News"})}),p.jsxs("div",{className:"helix-widget__content",children:[p.jsx("p",{children:"Stay updated with the latest WordPress news and updates."}),p.jsx("div",{className:"helix-news-placeholder",children:p.jsxs("div",{className:"helix-news-item",children:[p.jsx("h4",{children:"WordPress 6.4 “Shirley” Released"}),p.jsx("p",{children:"The latest version includes new features and improvements..."}),p.jsx("a",{href:"https://wordpress.org/news/",target:"_blank",rel:"noopener noreferrer",children:"Read more"})]})})]})]})]})]})}const pv=()=>{var e;return((e=window.helixData)==null?void 0:e.restUrl)||"/wp-json/helix/v1/"},hv=()=>{var e;return((e=window.helixData)==null?void 0:e.nonce)||""},xp=async(e,t={})=>{const n=`${pv()}${e}`,r={headers:{"Content-Type":"application/json","X-WP-Nonce":hv()},credentials:"include"},l={...r,...t,headers:{...r.headers,...t.headers}};try{const i=await fetch(n,l);if(!i.ok){const o=await i.json().catch(()=>({}));throw new Error(o.message||`HTTP ${i.status}: ${i.statusText}`)}return await i.json()}catch(i){throw i}},mv=async()=>xp("settings"),gv=async e=>xp("settings",{method:"POST",body:JSON.stringify(e)}),yv=()=>{const[e,t]=I.useState({}),[n,r]=I.useState({}),[l,i]=I.useState(!0),[o,s]=I.useState(!1),[a,u]=I.useState(null),[g,m]=I.useState(!1),h=c=>c&&typeof c=="object"&&"value"in c?c.value:c,w=I.useCallback(async()=>{try{i(!0),u(null);const c=await mv(),y={};Object.keys(c).forEach(x=>{Object.keys(c[x]).forEach(E=>{const k=c[x][E];k.options&&Array.isArray(k.options)?y[E]=k:y[E]=k.value})}),t(y),r(y),m(!1)}catch(c){u(c.message)}finally{i(!1)}},[]),v=I.useCallback((c,y)=>{t(x=>{let E;x[c]&&typeof x[c]=="object"&&"options"in x[c]?E={...x,[c]:{...x[c],value:y}}:E={...x,[c]:y};const k=Object.keys(E).some(_=>h(E[_])!==h(n[_]));return m(k),E})},[n]),S=I.useCallback(async()=>{try{s(!0),u(null);const c={};if(Object.keys(e).forEach(x=>{const E=h(e[x]),k=h(n[x]);E!==k&&(c[x]=E)}),Object.keys(c).length===0)return{success:!0,message:"No changes to save"};const y=await gv(c);return r(e),m(!1),{success:!0,message:"Settings saved successfully",updated:y.updated,errors:y.errors}}catch(c){return u(c.message),{success:!1,message:c.message}}finally{s(!1)}},[e,n]),T=I.useCallback(()=>{t(n),m(!1),u(null)},[n]),d=I.useCallback(c=>{const y=h(n[c]);v(c,y)},[n,v]);return I.useEffect(()=>{w()},[w]),I.useEffect(()=>{const c=y=>{if(g)return y.preventDefault(),y.returnValue="You have unsaved changes. Are you sure you want to leave?",y.returnValue};return window.addEventListener("beforeunload",c),()=>window.removeEventListener("beforeunload",c)},[g]),{settings:e,loading:l,saving:o,error:a,hasUnsavedChanges:g,updateSetting:v,saveSettings:S,resetSettings:T,resetSetting:d,loadSettings:w}},vv=tt(p.jsx("path",{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"})),xv=tt(p.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"})),wv=tt(p.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"})),Sv=({activeTab:e,onTabChange:t,hasUnsavedChanges:n})=>{const r=[{id:"site",label:"Site Information",icon:vv},{id:"content",label:"Content & Reading",icon:gp},{id:"writing",label:"Writing & Publishing",icon:vp},{id:"media",label:"Media & Assets",icon:xv},{id:"users",label:"Users & Membership",icon:yp},{id:"helix",label:"Helix Settings",icon:wv}];return p.jsx("div",{className:"helix-settings-tabs",children:p.jsx("nav",{className:"helix-tabs-nav",role:"tablist",children:r.map(l=>p.jsxs("button",{type:"button",role:"tab","aria-selected":e===l.id,"aria-controls":`${l.id}-panel`,className:`helix-tab ${e===l.id?"active":""}`,onClick:()=>t(l.id),children:[p.jsx("span",{className:"helix-tab-icon",children:p.jsx(l.icon,{})}),p.jsx("span",{className:"helix-tab-label",children:l.label}),n&&p.jsx("span",{className:"helix-tab-indicator",title:"Unsaved changes",children:"●"})]},l.id))})})},kv=({onSave:e,onReset:t,saving:n=!1,hasUnsavedChanges:r=!1,disabled:l=!1})=>p.jsxs("div",{className:"helix-save-buttons",children:[p.jsx("button",{type:"button",onClick:e,disabled:l||n||!r,className:`helix-btn helix-btn-primary ${n?"saving":""}`,children:n?p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"helix-spinner"}),"Saving..."]}):"Save Changes"}),r&&!n&&p.jsx("button",{type:"button",onClick:t,className:"helix-btn helix-btn-secondary",children:"Reset Changes"}),!r&&!n&&p.jsx("span",{className:"helix-save-status",children:"✓ All changes saved"})]}),_c=({type:e="info",message:t,onClose:n,autoClose:r=!0,duration:l=5e3})=>{const[i,o]=I.useState(!0);if(I.useEffect(()=>{if(r&&l>0){const a=setTimeout(()=>{o(!1),setTimeout(()=>n==null?void 0:n(),300)},l);return()=>clearTimeout(a)}},[r,l,n]),!i)return null;const s=()=>{switch(e){case"success":return"✅";case"error":return"❌";case"warning":return"⚠️";default:return"ℹ️"}};return p.jsx("div",{className:`helix-notification helix-notification-${e} ${i?"visible":""}`,children:p.jsxs("div",{className:"helix-notification-content",children:[p.jsx("span",{className:"helix-notification-icon",children:s()}),p.jsx("span",{className:"helix-notification-message",children:t}),n&&p.jsx("button",{type:"button",onClick:()=>{o(!1),setTimeout(()=>n(),300)},className:"helix-notification-close","aria-label":"Close notification",children:"×"})]})})},sr=({title:e,description:t,children:n,className:r=""})=>p.jsxs("div",{className:`helix-settings-section ${r}`,children:[e&&p.jsxs("div",{className:"helix-settings-section-header",children:[p.jsx("h3",{className:"helix-settings-section-title",children:e}),t&&p.jsx("p",{className:"helix-settings-section-description",children:t})]}),p.jsx("div",{className:"helix-settings-section-content",children:n})]}),oo=({label:e,description:t,error:n,required:r=!1,children:l,className:i=""})=>p.jsxs("div",{className:`helix-form-field ${i}`,children:[e&&p.jsxs("label",{className:"helix-form-label",children:[e,r&&p.jsx("span",{className:"helix-required",children:"*"})]}),p.jsx("div",{className:"helix-form-control",children:l}),t&&p.jsx("p",{className:"helix-form-description",children:t}),n&&p.jsx("p",{className:"helix-form-error",children:n})]}),ln=({label:e,description:t,value:n,onChange:r,placeholder:l="",type:i="text",required:o=!1,disabled:s=!1,error:a=null,className:u="",...g})=>{const m=h=>{r(h.target.value)};return p.jsx(oo,{label:e,description:t,error:a,required:o,className:u,children:p.jsx("input",{type:i,value:n||"",onChange:m,placeholder:l,required:o,disabled:s,className:"helix-text-input",...g})})},Qt=({label:e,description:t,value:n,onChange:r,options:l=[],required:i=!1,disabled:o=!1,error:s=null,className:a="",placeholder:u="Select an option...",...g})=>{const m=h=>{r(h.target.value)};return p.jsx(oo,{label:e,description:t,error:s,required:i,className:a,children:p.jsxs("select",{value:n||"",onChange:m,required:i,disabled:o,className:"helix-select-input",...g,children:[u&&p.jsx("option",{value:"",disabled:!0,children:u}),l.map(h=>p.jsx("option",{value:h.value,children:h.label},h.value))]})})},Ec=({settings:e,updateSetting:t})=>{var n,r,l,i;return p.jsx(sr,{title:"Site Information",description:"Basic information about your WordPress site",children:p.jsxs("div",{className:"helix-settings-grid",children:[p.jsx(ln,{label:"Site Title",description:"In a few words, explain what this site is about.",value:e.siteTitle,onChange:o=>t("siteTitle",o),placeholder:"My Awesome Site",required:!0}),p.jsx(ln,{label:"Tagline",description:"A brief description of your site, usually displayed under the title.",value:e.tagline,onChange:o=>t("tagline",o),placeholder:"Just another WordPress site"}),p.jsx(ln,{label:"WordPress Address (URL)",description:"The address of your WordPress core files.",value:e.siteUrl,onChange:o=>t("siteUrl",o),type:"url",placeholder:"https://example.com"}),p.jsx(ln,{label:"Site Address (URL)",description:"The address you want people to type in their browser to reach your website.",value:e.homeUrl,onChange:o=>t("homeUrl",o),type:"url",placeholder:"https://example.com"}),p.jsx(ln,{label:"Administration Email Address",description:"This address is used for admin purposes, like new user notification.",value:e.adminEmail,onChange:o=>t("adminEmail",o),type:"email",placeholder:"admin@example.com",required:!0}),p.jsx(Qt,{label:"Site Language",description:"The language for your site interface.",value:((n=e.language)==null?void 0:n.value)||e.language||"",onChange:o=>t("language",o),options:((r=e.language)==null?void 0:r.options)||[],placeholder:"Select a language..."}),p.jsx(Qt,{label:"Timezone",description:"Choose either a city in the same timezone as you or a UTC timezone offset.",value:((l=e.timezone)==null?void 0:l.value)||e.timezone||"",onChange:o=>t("timezone",o),options:((i=e.timezone)==null?void 0:i.options)||[],placeholder:"Select a timezone..."})]})})},He=({label:e,description:t,value:n,onChange:r,min:l=null,max:i=null,step:o=1,required:s=!1,disabled:a=!1,error:u=null,className:g="",...m})=>{const h=w=>{const v=w.target.value;r(v===""?"":Number(v))};return p.jsx(oo,{label:e,description:t,error:u,required:s,className:g,children:p.jsx("input",{type:"number",value:n||"",onChange:h,min:l,max:i,step:o,required:s,disabled:a,className:"helix-number-input",...m})})},cl=({label:e,description:t,value:n,onChange:r,required:l=!1,disabled:i=!1,error:o=null,className:s="",id:a=`toggle-${Math.random().toString(36).substr(2,9)}`,...u})=>{const g=()=>{i||r(!n)};return p.jsx(oo,{description:t,error:o,required:l,className:`helix-toggle-field ${s}`,children:p.jsxs("div",{className:"helix-toggle-wrapper",children:[e&&p.jsx("label",{htmlFor:a,className:`helix-toggle-label ${i?"helix-toggle-label-disabled":""}`,children:e}),p.jsx("button",{id:a,type:"button",role:"switch","aria-checked":!!n,onClick:g,disabled:i,className:`helix-toggle-switch ${n?"helix-toggle-switch-on":"helix-toggle-switch-off"} ${i?"helix-toggle-switch-disabled":""}`,...u,children:p.jsx("span",{className:`helix-toggle-knob ${n?"helix-toggle-knob-on":"helix-toggle-knob-off"}`})})]})})},Cv=({settings:e,updateSetting:t})=>{const n=[{value:"posts",label:"Your latest posts"},{value:"page",label:"A static page"}],r=[{value:0,label:"Sunday"},{value:1,label:"Monday"},{value:2,label:"Tuesday"},{value:3,label:"Wednesday"},{value:4,label:"Thursday"},{value:5,label:"Friday"},{value:6,label:"Saturday"}];return p.jsx(sr,{title:"Content & Reading",description:"Settings that affect how your content is displayed",children:p.jsxs("div",{className:"helix-settings-grid",children:[p.jsx(Qt,{label:"Your homepage displays",description:"What to show on the front page of your site.",value:e.showOnFront,onChange:l=>t("showOnFront",l),options:n}),e.showOnFront==="page"&&p.jsxs(p.Fragment,{children:[p.jsx(He,{label:"Homepage",description:"The page to show on the front page (Page ID).",value:e.pageOnFront,onChange:l=>t("pageOnFront",l),min:0}),p.jsx(He,{label:"Posts page",description:"The page to show posts (Page ID).",value:e.pageForPosts,onChange:l=>t("pageForPosts",l),min:0})]}),p.jsx(He,{label:"Blog pages show at most",description:"Number of posts to show per page.",value:e.postsPerPage,onChange:l=>t("postsPerPage",l),min:1,max:100}),p.jsx(cl,{label:"Discourage search engines from indexing this site",description:"This will discourage, but not prevent, search engines from indexing this site.",value:!e.blogPublic,onChange:l=>t("blogPublic",!l)}),p.jsx(ln,{label:"Date Format",description:"Format for displaying dates throughout your site.",value:e.dateFormat,onChange:l=>t("dateFormat",l),placeholder:"F j, Y"}),p.jsx(ln,{label:"Time Format",description:"Format for displaying times throughout your site.",value:e.timeFormat,onChange:l=>t("timeFormat",l),placeholder:"g:i a"}),p.jsx(Qt,{label:"Week Starts On",description:"The day of the week the calendar should start on.",value:e.startOfWeek,onChange:l=>t("startOfWeek",parseInt(l)),options:r})]})})},_v=({settings:e,updateSetting:t})=>{const n=[{value:"standard",label:"Standard"},{value:"aside",label:"Aside"},{value:"gallery",label:"Gallery"},{value:"image",label:"Image"},{value:"link",label:"Link"},{value:"quote",label:"Quote"},{value:"status",label:"Status"},{value:"video",label:"Video"},{value:"audio",label:"Audio"},{value:"chat",label:"Chat"}],r=[{value:"open",label:"Open"},{value:"closed",label:"Closed"}];return p.jsx(sr,{title:"Writing & Publishing",description:"Settings for content creation and publishing",children:p.jsxs("div",{className:"helix-settings-grid",children:[p.jsx(He,{label:"Default Post Category",description:"The default category for new posts (Category ID).",value:e.defaultCategory,onChange:l=>t("defaultCategory",l),min:1}),p.jsx(Qt,{label:"Default Post Format",description:"The default format for new posts.",value:e.defaultPostFormat,onChange:l=>t("defaultPostFormat",l),options:n}),p.jsx(cl,{label:"Convert emoticons like :-) and :-P to graphics on display",description:"Transform text emoticons into graphical representations.",value:e.useSmilies,onChange:l=>t("useSmilies",l)}),p.jsx(Qt,{label:"Default comment status",description:"Allow people to submit comments on new posts.",value:e.defaultCommentStatus,onChange:l=>t("defaultCommentStatus",l),options:r}),p.jsx(Qt,{label:"Default ping status",description:"Allow link notifications from other blogs (pingbacks and trackbacks) on new posts.",value:e.defaultPingStatus,onChange:l=>t("defaultPingStatus",l),options:r})]})})},Ev=({settings:e,updateSetting:t})=>p.jsx(sr,{title:"Media & Assets",description:"Settings for media files, images, and site branding",children:p.jsxs("div",{className:"helix-settings-grid",children:[p.jsx(He,{label:"Site Logo",description:"The site logo (Media ID). Upload a logo in Media Library and enter its ID here.",value:e.siteLogo,onChange:n=>t("siteLogo",n),min:0}),p.jsx(He,{label:"Site Icon (Favicon)",description:"The site icon/favicon (Media ID). Upload an icon in Media Library and enter its ID here.",value:e.siteIcon,onChange:n=>t("siteIcon",n),min:0}),p.jsxs("div",{className:"helix-settings-subsection",children:[p.jsx("h4",{children:"Image Sizes"}),p.jsx(He,{label:"Thumbnail Width",description:"Maximum width of thumbnail images in pixels.",value:e.thumbnailSizeW,onChange:n=>t("thumbnailSizeW",n),min:0,max:2e3}),p.jsx(He,{label:"Thumbnail Height",description:"Maximum height of thumbnail images in pixels.",value:e.thumbnailSizeH,onChange:n=>t("thumbnailSizeH",n),min:0,max:2e3}),p.jsx(He,{label:"Medium Width",description:"Maximum width of medium-sized images in pixels.",value:e.mediumSizeW,onChange:n=>t("mediumSizeW",n),min:0,max:2e3}),p.jsx(He,{label:"Medium Height",description:"Maximum height of medium-sized images in pixels.",value:e.mediumSizeH,onChange:n=>t("mediumSizeH",n),min:0,max:2e3}),p.jsx(He,{label:"Large Width",description:"Maximum width of large-sized images in pixels.",value:e.largeSizeW,onChange:n=>t("largeSizeW",n),min:0,max:4e3}),p.jsx(He,{label:"Large Height",description:"Maximum height of large-sized images in pixels.",value:e.largeSizeH,onChange:n=>t("largeSizeH",n),min:0,max:4e3})]}),p.jsx(cl,{label:"Organize my uploads into month- and year-based folders",description:"Organize uploaded files into date-based folder structure.",value:e.uploadsUseYearmonthFolders,onChange:n=>t("uploadsUseYearmonthFolders",n)})]})}),Tv=({settings:e,updateSetting:t})=>{const n=[{value:"subscriber",label:"Subscriber"},{value:"contributor",label:"Contributor"},{value:"author",label:"Author"},{value:"editor",label:"Editor"},{value:"administrator",label:"Administrator"}];return p.jsx(sr,{title:"Users & Membership",description:"Settings for user registration and default permissions",children:p.jsxs("div",{className:"helix-settings-grid",children:[p.jsx(cl,{label:"Anyone can register",description:"Allow anyone to register as a user on your site.",value:e.usersCanRegister,onChange:r=>t("usersCanRegister",r)}),p.jsx(Qt,{label:"New User Default Role",description:"The default role assigned to new users when they register.",value:e.defaultRole,onChange:r=>t("defaultRole",r),options:n})]})})},Pv=({settings:e,updateSetting:t})=>p.jsx(sr,{title:"Helix Settings",description:"Settings specific to the Helix plugin",children:p.jsx("div",{className:"helix-settings-grid",children:p.jsx(cl,{label:"Use Default WordPress Admin",description:"Switch back to the default WordPress admin interface instead of using Helix.",value:e.helixUseDefaultAdmin,onChange:n=>t("helixUseDefaultAdmin",n)})})});function Nv(){const{settings:e,loading:t,saving:n,error:r,hasUnsavedChanges:l,updateSetting:i,saveSettings:o,resetSettings:s}=yv(),[a,u]=I.useState("site"),[g,m]=I.useState(null),h=()=>{window.scrollTo({top:0,behavior:"smooth"})},w=async()=>{const d=await o();d.success?m({type:"success",message:d.message||"Settings saved successfully!"}):m({type:"error",message:d.message||"Failed to save settings. Please try again."}),h()},v=()=>{s(),m({type:"info",message:"Changes have been reset to their original values."}),h()},S=d=>{l&&!window.confirm("You have unsaved changes. Are you sure you want to switch tabs? Your changes will be lost.")||u(d)},T=()=>{const d={settings:e,updateSetting:i};switch(a){case"site":return p.jsx(Ec,{...d});case"content":return p.jsx(Cv,{...d});case"writing":return p.jsx(_v,{...d});case"media":return p.jsx(Ev,{...d});case"users":return p.jsx(Tv,{...d});case"helix":return p.jsx(Pv,{...d});default:return p.jsx(Ec,{...d})}};return t?p.jsx("div",{className:"helix-settings-page",children:p.jsxs("div",{className:"helix-loading",children:[p.jsx("div",{className:"helix-spinner"}),p.jsx("p",{children:"Loading settings..."})]})}):p.jsxs("div",{className:"helix-settings-page",children:[p.jsxs("div",{className:"helix-settings-header",children:[p.jsx("h1",{children:"Settings"}),p.jsx("p",{children:"Manage your WordPress site configuration"})]}),r&&p.jsx(_c,{type:"error",message:r,onClose:()=>{},autoClose:!1}),g&&p.jsx(_c,{type:g.type,message:g.message,onClose:()=>m(null)}),p.jsx(Sv,{activeTab:a,onTabChange:S,hasUnsavedChanges:l}),p.jsx("div",{className:"helix-settings-content",children:p.jsx("div",{id:`${a}-panel`,role:"tabpanel","aria-labelledby":`${a}-tab`,className:"helix-tab-panel",children:T()})}),p.jsx("div",{className:"helix-settings-footer",children:p.jsx(kv,{onSave:w,onReset:v,saving:n,hasUnsavedChanges:l})})]})}function jv(){return p.jsx(dv,{})}function $v(){return p.jsxs("div",{className:"helix-page",children:[p.jsx("h1",{children:"Posts Management"}),p.jsx("p",{children:"Posts management interface will be implemented here."})]})}function zv(){return p.jsxs("div",{className:"helix-page",children:[p.jsx("h1",{children:"Users Management"}),p.jsx("p",{children:"Users management interface will be implemented here."})]})}document.addEventListener("DOMContentLoaded",function(){const e=document.getElementById("helix-root");e&&kr(e).render(p.jsx(jv,{}));const t=document.getElementById("helix-settings-root");t&&kr(t).render(p.jsx(Nv,{}));const n=document.getElementById("helix-posts-root");n&&kr(n).render(p.jsx($v,{}));const r=document.getElementById("helix-users-root");r&&kr(r).render(p.jsx(zv,{}))}); +export default theme;`}function kc(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const My=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let r=0;rBe(v,S),w),w.unstable_sxConfig={...qi,...g==null?void 0:g.unstable_sxConfig},w.unstable_sx=function(S){return tr({sx:S,theme:this})},w.toRuntimeSource=pp,Fy(w),w}function Dy(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const By=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=Dy(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function hp(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function mp(e){return e==="dark"?By:[]}function Uy(e){const{palette:t={mode:"light"},opacity:n,overlays:r,colorSpace:l,...i}=e,o=ba({...t,colorSpace:l});return{palette:o,opacity:{...hp(o.mode),...n},overlays:r||mp(o.mode),...i}}function Wy(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const Vy=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],by=e=>(t,n)=>{const r=e.rootSelector||":root",l=e.colorSchemeSelector;let i=l;if(l==="class"&&(i=".%s"),l==="data"&&(i="[data-%s]"),l!=null&&l.startsWith("data-")&&!l.includes("%s")&&(i=`[${l}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const o={};return Vy(e.cssVarPrefix).forEach(s=>{o[s]=n[s],delete n[s]}),i==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:o}}:i?{[i.replace("%s",t)]:o,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...o}}}if(i&&i!=="media")return`${r}, ${i.replace("%s",String(t))}`}else if(t){if(i==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}return r};function Hy(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function C(e,t,n){!e[t]&&n&&(e[t]=n)}function _r(e){return typeof e!="string"||!e.startsWith("hsl")?e:ap(e)}function vt(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Cr(_r(e[t])))}function Qy(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const ct=e=>{try{return e()}catch{}},Ky=(e="mui")=>cy(e);function Fo(e,t,n,r,l){if(!n)return;n=n===!0?{}:n;const i=l==="dark"?"dark":"light";if(!r){t[l]=Uy({...n,palette:{mode:i,...n==null?void 0:n.palette},colorSpace:e});return}const{palette:o,...s}=Fs({...r,palette:{mode:i,...n==null?void 0:n.palette},colorSpace:e});return t[l]={...n,palette:o,opacity:{...hp(i),...n==null?void 0:n.opacity},overlays:(n==null?void 0:n.overlays)||mp(i)},s}function Yy(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:l=!1,cssVarPrefix:i="mui",nativeColor:o=!1,shouldSkipGeneratingVar:s=Wy,colorSchemeSelector:a=n.light&&n.dark?"media":void 0,rootSelector:u=":root",...g}=e,m=Object.keys(n)[0],h=r||(n.light&&m!=="light"?"light":m),w=Ky(i),{[h]:v,light:S,dark:T,...d}=n,c={...d};let y=v;if((h==="dark"&&!("dark"in n)||h==="light"&&!("light"in n))&&(y=!0),!y)throw new Error(vn(21,h));let x;o&&(x="oklch");const E=Fo(x,c,y,g,h);S&&!c.light&&Fo(x,c,S,void 0,"light"),T&&!c.dark&&Fo(x,c,T,void 0,"dark");let k={defaultColorScheme:h,...E,cssVarPrefix:i,colorSchemeSelector:a,rootSelector:u,getCssVar:w,colorSchemes:c,font:{...Cy(E.typography),...E.font},spacing:Qy(g.spacing)};Object.keys(k.colorSchemes).forEach(D=>{const f=k.colorSchemes[D].palette,z=L=>{const W=L.split("-"),we=W[1],j=W[2];return w(L,f[we][j])};f.mode==="light"&&(C(f.common,"background","#fff"),C(f.common,"onBackground","#000")),f.mode==="dark"&&(C(f.common,"background","#000"),C(f.common,"onBackground","#fff"));function N(L,W,we){if(x){let j;return L===tn&&(j=`transparent ${((1-we)*100).toFixed(0)}%`),L===H&&(j=`#000 ${(we*100).toFixed(0)}%`),L===Q&&(j=`#fff ${(we*100).toFixed(0)}%`),`color-mix(in ${x}, ${W}, ${j})`}return L(W,we)}if(Hy(f,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),f.mode==="light"){C(f.Alert,"errorColor",N(H,f.error.light,.6)),C(f.Alert,"infoColor",N(H,f.info.light,.6)),C(f.Alert,"successColor",N(H,f.success.light,.6)),C(f.Alert,"warningColor",N(H,f.warning.light,.6)),C(f.Alert,"errorFilledBg",z("palette-error-main")),C(f.Alert,"infoFilledBg",z("palette-info-main")),C(f.Alert,"successFilledBg",z("palette-success-main")),C(f.Alert,"warningFilledBg",z("palette-warning-main")),C(f.Alert,"errorFilledColor",ct(()=>f.getContrastText(f.error.main))),C(f.Alert,"infoFilledColor",ct(()=>f.getContrastText(f.info.main))),C(f.Alert,"successFilledColor",ct(()=>f.getContrastText(f.success.main))),C(f.Alert,"warningFilledColor",ct(()=>f.getContrastText(f.warning.main))),C(f.Alert,"errorStandardBg",N(Q,f.error.light,.9)),C(f.Alert,"infoStandardBg",N(Q,f.info.light,.9)),C(f.Alert,"successStandardBg",N(Q,f.success.light,.9)),C(f.Alert,"warningStandardBg",N(Q,f.warning.light,.9)),C(f.Alert,"errorIconColor",z("palette-error-main")),C(f.Alert,"infoIconColor",z("palette-info-main")),C(f.Alert,"successIconColor",z("palette-success-main")),C(f.Alert,"warningIconColor",z("palette-warning-main")),C(f.AppBar,"defaultBg",z("palette-grey-100")),C(f.Avatar,"defaultBg",z("palette-grey-400")),C(f.Button,"inheritContainedBg",z("palette-grey-300")),C(f.Button,"inheritContainedHoverBg",z("palette-grey-A100")),C(f.Chip,"defaultBorder",z("palette-grey-400")),C(f.Chip,"defaultAvatarColor",z("palette-grey-700")),C(f.Chip,"defaultIconColor",z("palette-grey-700")),C(f.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),C(f.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),C(f.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),C(f.LinearProgress,"primaryBg",N(Q,f.primary.main,.62)),C(f.LinearProgress,"secondaryBg",N(Q,f.secondary.main,.62)),C(f.LinearProgress,"errorBg",N(Q,f.error.main,.62)),C(f.LinearProgress,"infoBg",N(Q,f.info.main,.62)),C(f.LinearProgress,"successBg",N(Q,f.success.main,.62)),C(f.LinearProgress,"warningBg",N(Q,f.warning.main,.62)),C(f.Skeleton,"bg",x?N(tn,f.text.primary,.11):`rgba(${z("palette-text-primaryChannel")} / 0.11)`),C(f.Slider,"primaryTrack",N(Q,f.primary.main,.62)),C(f.Slider,"secondaryTrack",N(Q,f.secondary.main,.62)),C(f.Slider,"errorTrack",N(Q,f.error.main,.62)),C(f.Slider,"infoTrack",N(Q,f.info.main,.62)),C(f.Slider,"successTrack",N(Q,f.success.main,.62)),C(f.Slider,"warningTrack",N(Q,f.warning.main,.62));const L=x?N(H,f.background.default,.6825):zl(f.background.default,.8);C(f.SnackbarContent,"bg",L),C(f.SnackbarContent,"color",ct(()=>x?Ms.text.primary:f.getContrastText(L))),C(f.SpeedDialAction,"fabHoverBg",zl(f.background.paper,.15)),C(f.StepConnector,"border",z("palette-grey-400")),C(f.StepContent,"border",z("palette-grey-400")),C(f.Switch,"defaultColor",z("palette-common-white")),C(f.Switch,"defaultDisabledColor",z("palette-grey-100")),C(f.Switch,"primaryDisabledColor",N(Q,f.primary.main,.62)),C(f.Switch,"secondaryDisabledColor",N(Q,f.secondary.main,.62)),C(f.Switch,"errorDisabledColor",N(Q,f.error.main,.62)),C(f.Switch,"infoDisabledColor",N(Q,f.info.main,.62)),C(f.Switch,"successDisabledColor",N(Q,f.success.main,.62)),C(f.Switch,"warningDisabledColor",N(Q,f.warning.main,.62)),C(f.TableCell,"border",N(Q,N(tn,f.divider,1),.88)),C(f.Tooltip,"bg",N(tn,f.grey[700],.92))}if(f.mode==="dark"){C(f.Alert,"errorColor",N(Q,f.error.light,.6)),C(f.Alert,"infoColor",N(Q,f.info.light,.6)),C(f.Alert,"successColor",N(Q,f.success.light,.6)),C(f.Alert,"warningColor",N(Q,f.warning.light,.6)),C(f.Alert,"errorFilledBg",z("palette-error-dark")),C(f.Alert,"infoFilledBg",z("palette-info-dark")),C(f.Alert,"successFilledBg",z("palette-success-dark")),C(f.Alert,"warningFilledBg",z("palette-warning-dark")),C(f.Alert,"errorFilledColor",ct(()=>f.getContrastText(f.error.dark))),C(f.Alert,"infoFilledColor",ct(()=>f.getContrastText(f.info.dark))),C(f.Alert,"successFilledColor",ct(()=>f.getContrastText(f.success.dark))),C(f.Alert,"warningFilledColor",ct(()=>f.getContrastText(f.warning.dark))),C(f.Alert,"errorStandardBg",N(H,f.error.light,.9)),C(f.Alert,"infoStandardBg",N(H,f.info.light,.9)),C(f.Alert,"successStandardBg",N(H,f.success.light,.9)),C(f.Alert,"warningStandardBg",N(H,f.warning.light,.9)),C(f.Alert,"errorIconColor",z("palette-error-main")),C(f.Alert,"infoIconColor",z("palette-info-main")),C(f.Alert,"successIconColor",z("palette-success-main")),C(f.Alert,"warningIconColor",z("palette-warning-main")),C(f.AppBar,"defaultBg",z("palette-grey-900")),C(f.AppBar,"darkBg",z("palette-background-paper")),C(f.AppBar,"darkColor",z("palette-text-primary")),C(f.Avatar,"defaultBg",z("palette-grey-600")),C(f.Button,"inheritContainedBg",z("palette-grey-800")),C(f.Button,"inheritContainedHoverBg",z("palette-grey-700")),C(f.Chip,"defaultBorder",z("palette-grey-700")),C(f.Chip,"defaultAvatarColor",z("palette-grey-300")),C(f.Chip,"defaultIconColor",z("palette-grey-300")),C(f.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),C(f.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),C(f.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),C(f.LinearProgress,"primaryBg",N(H,f.primary.main,.5)),C(f.LinearProgress,"secondaryBg",N(H,f.secondary.main,.5)),C(f.LinearProgress,"errorBg",N(H,f.error.main,.5)),C(f.LinearProgress,"infoBg",N(H,f.info.main,.5)),C(f.LinearProgress,"successBg",N(H,f.success.main,.5)),C(f.LinearProgress,"warningBg",N(H,f.warning.main,.5)),C(f.Skeleton,"bg",x?N(tn,f.text.primary,.13):`rgba(${z("palette-text-primaryChannel")} / 0.13)`),C(f.Slider,"primaryTrack",N(H,f.primary.main,.5)),C(f.Slider,"secondaryTrack",N(H,f.secondary.main,.5)),C(f.Slider,"errorTrack",N(H,f.error.main,.5)),C(f.Slider,"infoTrack",N(H,f.info.main,.5)),C(f.Slider,"successTrack",N(H,f.success.main,.5)),C(f.Slider,"warningTrack",N(H,f.warning.main,.5));const L=x?N(Q,f.background.default,.985):zl(f.background.default,.98);C(f.SnackbarContent,"bg",L),C(f.SnackbarContent,"color",ct(()=>x?fp.text.primary:f.getContrastText(L))),C(f.SpeedDialAction,"fabHoverBg",zl(f.background.paper,.15)),C(f.StepConnector,"border",z("palette-grey-600")),C(f.StepContent,"border",z("palette-grey-600")),C(f.Switch,"defaultColor",z("palette-grey-300")),C(f.Switch,"defaultDisabledColor",z("palette-grey-600")),C(f.Switch,"primaryDisabledColor",N(H,f.primary.main,.55)),C(f.Switch,"secondaryDisabledColor",N(H,f.secondary.main,.55)),C(f.Switch,"errorDisabledColor",N(H,f.error.main,.55)),C(f.Switch,"infoDisabledColor",N(H,f.info.main,.55)),C(f.Switch,"successDisabledColor",N(H,f.success.main,.55)),C(f.Switch,"warningDisabledColor",N(H,f.warning.main,.55)),C(f.TableCell,"border",N(H,N(tn,f.divider,1),.68)),C(f.Tooltip,"bg",N(tn,f.grey[700],.92))}vt(f.background,"default"),vt(f.background,"paper"),vt(f.common,"background"),vt(f.common,"onBackground"),vt(f,"divider"),Object.keys(f).forEach(L=>{const W=f[L];L!=="tonalOffset"&&W&&typeof W=="object"&&(W.main&&C(f[L],"mainChannel",Cr(_r(W.main))),W.light&&C(f[L],"lightChannel",Cr(_r(W.light))),W.dark&&C(f[L],"darkChannel",Cr(_r(W.dark))),W.contrastText&&C(f[L],"contrastTextChannel",Cr(_r(W.contrastText))),L==="text"&&(vt(f[L],"primary"),vt(f[L],"secondary")),L==="action"&&(W.active&&vt(f[L],"active"),W.selected&&vt(f[L],"selected")))})}),k=t.reduce((D,f)=>Be(D,f),k);const _={prefix:i,disableCssColorScheme:l,shouldSkipGeneratingVar:s,getSelector:by(k),enableContrastVars:o},{vars:$,generateThemeVars:M,generateStyleSheets:A}=py(k,_);return k.vars=$,Object.entries(k.colorSchemes[k.defaultColorScheme]).forEach(([D,f])=>{k[D]=f}),k.generateThemeVars=M,k.generateStyleSheets=A,k.generateSpacing=function(){return rp(g.spacing,Fa(this))},k.getColorSchemeSelector=hy(a),k.spacing=k.generateSpacing(),k.shouldSkipGeneratingVar=s,k.unstable_sxConfig={...qi,...g==null?void 0:g.unstable_sxConfig},k.unstable_sx=function(f){return tr({sx:f,theme:this})},k.toRuntimeSource=pp,k}function Cc(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:ba({...n===!0?{}:n.palette,mode:t})})}function Gy(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:l=n?void 0:{light:!0},defaultColorScheme:i=n==null?void 0:n.mode,...o}=e,s=i||"light",a=l==null?void 0:l[s],u={...l,...n?{[s]:{...typeof a!="boolean"&&a,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return Fs(e,...t);let g=n;"palette"in e||u[s]&&(u[s]!==!0?g=u[s].palette:s==="dark"&&(g={mode:"dark"}));const m=Fs({...e,palette:g},...t);return m.defaultColorScheme=s,m.colorSchemes=u,m.palette.mode==="light"&&(m.colorSchemes.light={...u.light!==!0&&u.light,palette:m.palette},Cc(m,"dark",u.dark)),m.palette.mode==="dark"&&(m.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:m.palette},Cc(m,"light",u.light)),m}return!n&&!("light"in u)&&s==="light"&&(u.light=!0),Yy({...o,colorSchemes:u,defaultColorScheme:s,...typeof r!="boolean"&&r},...t)}const Xy=Gy(),Zy="$$material";function Jy(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const qy=e=>Jy(e)&&e!=="classes",ev=X0({themeId:Zy,defaultTheme:Xy,rootShouldForwardProp:qy}),tv=uy;function nv(e){return ay(e)}function rv(e){return ip("MuiSvgIcon",e)}Q0("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const lv=e=>{const{color:t,fontSize:n,classes:r}=e,l={root:["root",t!=="inherit"&&`color${er(t)}`,`fontSize${er(n)}`]};return Zm(l,rv,r)},iv=ev("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${er(n.color)}`],t[`fontSize${er(n.fontSize)}`]]}})(tv(({theme:e})=>{var t,n,r,l,i,o,s,a,u,g,m,h,w,v;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(l=(t=e.transitions)==null?void 0:t.create)==null?void 0:l.call(t,"fill",{duration:(r=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:S=>!S.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((o=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:o.call(i,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((a=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:a.call(s,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((g=(u=e.typography)==null?void 0:u.pxToRem)==null?void 0:g.call(u,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,S])=>S&&S.main).map(([S])=>{var T,d;return{props:{color:S},style:{color:(d=(T=(e.vars??e).palette)==null?void 0:T[S])==null?void 0:d.main}}}),{props:{color:"action"},style:{color:(h=(m=(e.vars??e).palette)==null?void 0:m.action)==null?void 0:h.active}},{props:{color:"disabled"},style:{color:(v=(w=(e.vars??e).palette)==null?void 0:w.action)==null?void 0:v.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Ds=I.forwardRef(function(t,n){const r=nv({props:t,name:"MuiSvgIcon"}),{children:l,className:i,color:o="inherit",component:s="svg",fontSize:a="medium",htmlColor:u,inheritViewBox:g=!1,titleAccess:m,viewBox:h="0 0 24 24",...w}=r,v=I.isValidElement(l)&&l.type==="svg",S={...r,color:o,component:s,fontSize:a,instanceFontSize:t.fontSize,inheritViewBox:g,viewBox:h,hasSvgAsChild:v},T={};g||(T.viewBox=h);const d=lv(S);return p.jsxs(iv,{as:s,className:Bd(d.root,i),focusable:"false",color:u,"aria-hidden":m?void 0:!0,role:m?"img":void 0,ref:n,...T,...w,...v&&l.props,ownerState:S,children:[v?l.props.children:l,m?p.jsx("title",{children:m}):null]})});Ds.muiName="SvgIcon";function tt(e,t){function n(r,l){return p.jsx(Ds,{"data-testid":void 0,ref:l,...r,children:e})}return n.muiName=Ds.muiName,I.memo(I.forwardRef(n))}const gp=tt(p.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-5 14H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"})),ov=tt(p.jsx("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"})),sv=tt(p.jsx("path",{d:"M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4zM18 14H6v-2h12zm0-3H6V9h12zm0-3H6V6h12z"})),yp=tt(p.jsx("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5s-3 1.34-3 3 1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"})),vp=tt(p.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"})),av=tt(p.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"})),uv=tt(p.jsx("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M14 13v4h-4v-4H7l5-5 5 5z"})),cv=tt(p.jsx("path",{d:"M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-1 11-2.5-1.5L14 13V5h5z"})),fv=tt(p.jsx("path",{d:"m16 6 2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z"}));function dv(){const[e,t]=I.useState({postsCount:0,pagesCount:0,commentsCount:0,usersCount:0,recentPosts:[],recentComments:[],loading:!0});I.useEffect(()=>{(async()=>{var i,o,s,a;try{const[u,g,m,h]=await Promise.all([fetch(`${((i=window.helixData)==null?void 0:i.restUrl)||"/wp-json/wp/v2/"}posts?per_page=5`),fetch(`${((o=window.helixData)==null?void 0:o.restUrl)||"/wp-json/wp/v2/"}pages?per_page=5`),fetch(`${((s=window.helixData)==null?void 0:s.restUrl)||"/wp-json/wp/v2/"}comments?per_page=5`),fetch(`${((a=window.helixData)==null?void 0:a.restUrl)||"/wp-json/wp/v2/"}users?per_page=5`)]),[w,v,S,T]=await Promise.all([u.json(),g.json(),m.json(),h.json()]);t({postsCount:u.headers.get("X-WP-Total")||w.length,pagesCount:g.headers.get("X-WP-Total")||v.length,commentsCount:m.headers.get("X-WP-Total")||S.length,usersCount:h.headers.get("X-WP-Total")||T.length,recentPosts:w.slice(0,5),recentComments:S.slice(0,5),loading:!1})}catch{t(g=>({...g,loading:!1}))}})()},[]);const n=({title:l,count:i,icon:o,color:s,trend:a})=>p.jsxs("div",{className:`helix-stats-card helix-stats-card--${s}`,children:[p.jsx("div",{className:"helix-stats-card__icon",children:p.jsx(o,{})}),p.jsxs("div",{className:"helix-stats-card__content",children:[p.jsxs("div",{className:"helix-stats-card__header",children:[p.jsx("h3",{className:"helix-stats-card__count",children:i}),a&&p.jsxs("div",{className:"helix-stats-card__trend",children:[p.jsx(fv,{className:"helix-trend-icon"}),p.jsx("span",{children:a})]})]}),p.jsx("p",{className:"helix-stats-card__title",children:l})]})]}),r=l=>new Date(l).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});return e.loading?p.jsx("div",{className:"helix-settings-page",children:p.jsxs("div",{className:"helix-loading",children:[p.jsx("div",{className:"helix-spinner"}),p.jsx("p",{children:"Loading dashboard..."})]})}):p.jsxs("div",{className:"helix-dashboard",children:[p.jsxs("div",{className:"helix-dashboard__header",children:[p.jsx("h1",{children:"Welcome to Helix"}),p.jsx("p",{children:"Your modern WordPress admin experience"})]}),p.jsxs("div",{className:"helix-dashboard__stats",children:[p.jsx(n,{title:"Posts",count:e.postsCount,icon:gp,color:"blue",trend:"+12%"}),p.jsx(n,{title:"Pages",count:e.pagesCount,icon:ov,color:"green",trend:"+5%"}),p.jsx(n,{title:"Comments",count:e.commentsCount,icon:sv,color:"orange",trend:"+28%"}),p.jsx(n,{title:"Users",count:e.usersCount,icon:yp,color:"purple",trend:"+3%"})]}),p.jsxs("div",{className:"helix-dashboard__content",children:[p.jsxs("div",{className:"helix-widget",children:[p.jsxs("div",{className:"helix-widget__header",children:[p.jsx("h2",{children:"Recent Posts"}),p.jsx("a",{href:"/wp-admin/edit.php",className:"helix-widget__link",children:"View All"})]}),p.jsx("div",{className:"helix-widget__content",children:e.recentPosts.length>0?p.jsx("ul",{className:"helix-posts-list",children:e.recentPosts.map(l=>p.jsxs("li",{className:"helix-posts-list__item",children:[p.jsxs("div",{className:"helix-posts-list__content",children:[p.jsx("h3",{className:"helix-posts-list__title",children:p.jsx("a",{href:`/wp-admin/post.php?post=${l.id}&action=edit`,children:l.title.rendered||"Untitled"})}),p.jsx("p",{className:"helix-posts-list__date",children:r(l.date)})]}),p.jsx("div",{className:"helix-posts-list__status",children:p.jsx("span",{className:`helix-status helix-status--${l.status}`,children:l.status})})]},l.id))}):p.jsxs("p",{className:"helix-widget__empty",children:["No posts yet."," ",p.jsx("a",{href:"/wp-admin/post-new.php",children:"Create your first post!"})]})})]}),p.jsxs("div",{className:"helix-widget",children:[p.jsxs("div",{className:"helix-widget__header",children:[p.jsx("h2",{children:"Recent Comments"}),p.jsx("a",{href:"/wp-admin/edit-comments.php",className:"helix-widget__link",children:"View All"})]}),p.jsx("div",{className:"helix-widget__content",children:e.recentComments.length>0?p.jsx("ul",{className:"helix-comments-list",children:e.recentComments.map(l=>p.jsxs("li",{className:"helix-comments-list__item",children:[p.jsxs("div",{className:"helix-comments-list__content",children:[p.jsx("h4",{className:"helix-comments-list__author",children:l.author_name}),p.jsxs("p",{className:"helix-comments-list__excerpt",children:[l.content.rendered.replace(/<[^>]*>/g,"").substring(0,100),"..."]}),p.jsx("p",{className:"helix-comments-list__date",children:r(l.date)})]}),p.jsx("div",{className:"helix-comments-list__status",children:p.jsx("span",{className:`helix-status helix-status--${l.status}`,children:l.status})})]},l.id))}):p.jsx("p",{className:"helix-widget__empty",children:"No comments yet."})})]}),p.jsxs("div",{className:"helix-widget",children:[p.jsx("div",{className:"helix-widget__header",children:p.jsx("h2",{children:"Quick Actions"})}),p.jsx("div",{className:"helix-widget__content",children:p.jsxs("div",{className:"helix-quick-actions",children:[p.jsxs("a",{href:"/wp-admin/post-new.php",className:"helix-quick-action",children:[p.jsx("span",{className:"helix-quick-action__icon",children:p.jsx(vp,{})}),p.jsx("span",{className:"helix-quick-action__text",children:"Write a Post"})]}),p.jsxs("a",{href:"/wp-admin/post-new.php?post_type=page",className:"helix-quick-action",children:[p.jsx("span",{className:"helix-quick-action__icon",children:p.jsx(av,{})}),p.jsx("span",{className:"helix-quick-action__text",children:"Create a Page"})]}),p.jsxs("a",{href:"/wp-admin/upload.php",className:"helix-quick-action",children:[p.jsx("span",{className:"helix-quick-action__icon",children:p.jsx(uv,{})}),p.jsx("span",{className:"helix-quick-action__text",children:"Upload Media"})]}),p.jsxs("a",{href:"/wp-admin/edit-comments.php",className:"helix-quick-action",children:[p.jsx("span",{className:"helix-quick-action__icon",children:p.jsx(cv,{})}),p.jsx("span",{className:"helix-quick-action__text",children:"Moderate Comments"})]})]})})]}),p.jsxs("div",{className:"helix-widget",children:[p.jsx("div",{className:"helix-widget__header",children:p.jsx("h2",{children:"WordPress News"})}),p.jsxs("div",{className:"helix-widget__content",children:[p.jsx("p",{children:"Stay updated with the latest WordPress news and updates."}),p.jsx("div",{className:"helix-news-placeholder",children:p.jsxs("div",{className:"helix-news-item",children:[p.jsx("h4",{children:"WordPress 6.4 “Shirley” Released"}),p.jsx("p",{children:"The latest version includes new features and improvements..."}),p.jsx("a",{href:"https://wordpress.org/news/",target:"_blank",rel:"noopener noreferrer",children:"Read more"})]})})]})]})]})]})}const pv=()=>{var e;return((e=window.helixData)==null?void 0:e.restUrl)||"/wp-json/helix/v1/"},hv=()=>{var e;return((e=window.helixData)==null?void 0:e.nonce)||""},xp=async(e,t={})=>{const n=`${pv()}${e}`,r={headers:{"Content-Type":"application/json","X-WP-Nonce":hv()},credentials:"include"},l={...r,...t,headers:{...r.headers,...t.headers}};try{const i=await fetch(n,l);if(!i.ok){const o=await i.json().catch(()=>({}));throw new Error(o.message||`HTTP ${i.status}: ${i.statusText}`)}return await i.json()}catch(i){throw i}},mv=async()=>xp("settings"),gv=async e=>xp("settings",{method:"POST",body:JSON.stringify(e)}),yv=()=>{const[e,t]=I.useState({}),[n,r]=I.useState({}),[l,i]=I.useState(!0),[o,s]=I.useState(!1),[a,u]=I.useState(null),[g,m]=I.useState(!1),h=c=>c&&typeof c=="object"&&"value"in c?c.value:c,w=I.useCallback(async()=>{try{i(!0),u(null);const c=await mv(),y={};Object.keys(c).forEach(x=>{Object.keys(c[x]).forEach(E=>{const k=c[x][E];k.options&&Array.isArray(k.options)?y[E]=k:y[E]=k.value})}),t(y),r(y),m(!1)}catch(c){u(c.message)}finally{i(!1)}},[]),v=I.useCallback((c,y)=>{t(x=>{let E;x[c]&&typeof x[c]=="object"&&"options"in x[c]?E={...x,[c]:{...x[c],value:y}}:E={...x,[c]:y};const k=Object.keys(E).some(_=>h(E[_])!==h(n[_]));return m(k),E})},[n]),S=I.useCallback(async()=>{try{s(!0),u(null);const c={};if(Object.keys(e).forEach(x=>{const E=h(e[x]),k=h(n[x]);E!==k&&(c[x]=E)}),Object.keys(c).length===0)return{success:!0,message:"No changes to save"};const y=await gv(c);return r(e),m(!1),{success:!0,message:"Settings saved successfully",updated:y.updated,errors:y.errors}}catch(c){return u(c.message),{success:!1,message:c.message}}finally{s(!1)}},[e,n]),T=I.useCallback(()=>{t(n),m(!1),u(null)},[n]),d=I.useCallback(c=>{const y=h(n[c]);v(c,y)},[n,v]);return I.useEffect(()=>{w()},[w]),I.useEffect(()=>{const c=y=>{if(g)return y.preventDefault(),y.returnValue="You have unsaved changes. Are you sure you want to leave?",y.returnValue};return window.addEventListener("beforeunload",c),()=>window.removeEventListener("beforeunload",c)},[g]),{settings:e,loading:l,saving:o,error:a,hasUnsavedChanges:g,updateSetting:v,saveSettings:S,resetSettings:T,resetSetting:d,loadSettings:w}},vv=tt(p.jsx("path",{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"})),xv=tt(p.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"})),wv=tt(p.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"})),Sv=({activeTab:e,onTabChange:t,hasUnsavedChanges:n})=>{const r=[{id:"site",label:"Site Information",icon:vv},{id:"content",label:"Content & Reading",icon:gp},{id:"writing",label:"Writing & Publishing",icon:vp},{id:"media",label:"Media & Assets",icon:xv},{id:"users",label:"Users & Membership",icon:yp},{id:"helix",label:"Helix Settings",icon:wv}];return p.jsx("div",{className:"helix-settings-tabs",children:p.jsx("nav",{className:"helix-tabs-nav",role:"tablist",children:r.map(l=>p.jsxs("button",{type:"button",role:"tab","aria-selected":e===l.id,"aria-controls":`${l.id}-panel`,className:`helix-tab ${e===l.id?"active":""}`,onClick:()=>t(l.id),children:[p.jsx("span",{className:"helix-tab-icon",children:p.jsx(l.icon,{})}),p.jsx("span",{className:"helix-tab-label",children:l.label}),n&&p.jsx("span",{className:"helix-tab-indicator",title:"Unsaved changes",children:"●"})]},l.id))})})},kv=({onSave:e,onReset:t,saving:n=!1,hasUnsavedChanges:r=!1,disabled:l=!1})=>p.jsxs("div",{className:"helix-save-buttons",children:[p.jsx("button",{type:"button",onClick:e,disabled:l||n||!r,className:`helix-btn helix-btn-primary ${n?"saving":""}`,children:n?p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"helix-spinner"}),"Saving..."]}):"Save Changes"}),r&&!n&&p.jsx("button",{type:"button",onClick:t,className:"helix-btn helix-btn-secondary",children:"Reset Changes"}),!r&&!n&&p.jsx("span",{className:"helix-save-status",children:"✓ All changes saved"})]}),_c=({type:e="info",message:t,onClose:n,autoClose:r=!0,duration:l=5e3})=>{const[i,o]=I.useState(!0);if(I.useEffect(()=>{if(r&&l>0){const a=setTimeout(()=>{o(!1),setTimeout(()=>n==null?void 0:n(),300)},l);return()=>clearTimeout(a)}},[r,l,n]),!i)return null;const s=()=>{switch(e){case"success":return"✅";case"error":return"❌";case"warning":return"⚠️";default:return"ℹ️"}};return p.jsx("div",{className:`helix-notification helix-notification-${e} ${i?"visible":""}`,children:p.jsxs("div",{className:"helix-notification-content",children:[p.jsx("span",{className:"helix-notification-icon",children:s()}),p.jsx("span",{className:"helix-notification-message",children:t}),n&&p.jsx("button",{type:"button",onClick:()=>{o(!1),setTimeout(()=>n(),300)},className:"helix-notification-close","aria-label":"Close notification",children:"×"})]})})},sr=({title:e,description:t,children:n,className:r=""})=>p.jsxs("div",{className:`helix-settings-section ${r}`,children:[e&&p.jsxs("div",{className:"helix-settings-section-header",children:[p.jsx("h3",{className:"helix-settings-section-title",children:e}),t&&p.jsx("p",{className:"helix-settings-section-description",children:t})]}),p.jsx("div",{className:"helix-settings-section-content",children:n})]}),oo=({label:e,description:t,error:n,required:r=!1,children:l,className:i=""})=>p.jsxs("div",{className:`helix-form-field ${i}`,children:[e&&p.jsxs("label",{className:"helix-form-label",children:[e,r&&p.jsx("span",{className:"helix-required",children:"*"})]}),p.jsx("div",{className:"helix-form-control",children:l}),t&&p.jsx("p",{className:"helix-form-description",children:t}),n&&p.jsx("p",{className:"helix-form-error",children:n})]}),ln=({label:e,description:t,value:n,onChange:r,placeholder:l="",type:i="text",required:o=!1,disabled:s=!1,error:a=null,className:u="",...g})=>{const m=h=>{r(h.target.value)};return p.jsx(oo,{label:e,description:t,error:a,required:o,className:u,children:p.jsx("input",{type:i,value:n||"",onChange:m,placeholder:l,required:o,disabled:s,className:"helix-text-input",...g})})},Qt=({label:e,description:t,value:n,onChange:r,options:l=[],required:i=!1,disabled:o=!1,error:s=null,className:a="",placeholder:u="Select an option...",...g})=>{const m=h=>{r(h.target.value)};return p.jsx(oo,{label:e,description:t,error:s,required:i,className:a,children:p.jsxs("select",{value:n||"",onChange:m,required:i,disabled:o,className:"helix-select-input",...g,children:[u&&p.jsx("option",{value:"",disabled:!0,children:u}),l.map(h=>p.jsx("option",{value:h.value,children:h.label},h.value))]})})},Ec=({settings:e,updateSetting:t})=>{var n,r,l,i;return p.jsx(sr,{title:"Site Information",description:"Basic information about your WordPress site",children:p.jsxs("div",{className:"helix-settings-grid",children:[p.jsx(ln,{label:"Site Title",description:"In a few words, explain what this site is about.",value:e.siteTitle,onChange:o=>t("siteTitle",o),placeholder:"My Awesome Site",required:!0}),p.jsx(ln,{label:"Tagline",description:"A brief description of your site, usually displayed under the title.",value:e.tagline,onChange:o=>t("tagline",o),placeholder:"Just another WordPress site"}),p.jsx(ln,{label:"WordPress Address (URL)",description:"The address of your WordPress core files.",value:e.siteUrl,onChange:o=>t("siteUrl",o),type:"url",placeholder:"https://example.com"}),p.jsx(ln,{label:"Site Address (URL)",description:"The address you want people to type in their browser to reach your website.",value:e.homeUrl,onChange:o=>t("homeUrl",o),type:"url",placeholder:"https://example.com"}),p.jsx(ln,{label:"Administration Email Address",description:"This address is used for admin purposes, like new user notification.",value:e.adminEmail,onChange:o=>t("adminEmail",o),type:"email",placeholder:"admin@example.com",required:!0}),p.jsx(Qt,{label:"Site Language",description:"The language for your site interface.",value:((n=e.language)==null?void 0:n.value)||e.language||"",onChange:o=>t("language",o),options:((r=e.language)==null?void 0:r.options)||[],placeholder:"Select a language..."}),p.jsx(Qt,{label:"Timezone",description:"Choose either a city in the same timezone as you or a UTC timezone offset.",value:((l=e.timezone)==null?void 0:l.value)||e.timezone||"",onChange:o=>t("timezone",o),options:((i=e.timezone)==null?void 0:i.options)||[],placeholder:"Select a timezone..."})]})})},He=({label:e,description:t,value:n,onChange:r,min:l=null,max:i=null,step:o=1,required:s=!1,disabled:a=!1,error:u=null,className:g="",...m})=>{const h=w=>{const v=w.target.value;r(v===""?"":Number(v))};return p.jsx(oo,{label:e,description:t,error:u,required:s,className:g,children:p.jsx("input",{type:"number",value:n||"",onChange:h,min:l,max:i,step:o,required:s,disabled:a,className:"helix-number-input",...m})})},cl=({label:e,description:t,value:n,onChange:r,required:l=!1,disabled:i=!1,error:o=null,className:s="",id:a=`toggle-${Math.random().toString(36).substr(2,9)}`,...u})=>{const g=()=>{i||r(!n)};return p.jsx(oo,{description:t,error:o,required:l,className:`helix-toggle-field ${s}`,children:p.jsxs("div",{className:"helix-toggle-wrapper",children:[e&&p.jsx("label",{htmlFor:a,className:`helix-toggle-label ${i?"helix-toggle-label-disabled":""}`,children:e}),p.jsx("button",{id:a,type:"button",role:"switch","aria-checked":!!n,onClick:g,disabled:i,className:`helix-toggle-switch ${n?"helix-toggle-switch-on":"helix-toggle-switch-off"} ${i?"helix-toggle-switch-disabled":""}`,...u,children:p.jsx("span",{className:`helix-toggle-knob ${n?"helix-toggle-knob-on":"helix-toggle-knob-off"}`})})]})})},Cv=({settings:e,updateSetting:t})=>{const n=[{value:"posts",label:"Your latest posts"},{value:"page",label:"A static page"}],r=[{value:0,label:"Sunday"},{value:1,label:"Monday"},{value:2,label:"Tuesday"},{value:3,label:"Wednesday"},{value:4,label:"Thursday"},{value:5,label:"Friday"},{value:6,label:"Saturday"}];return p.jsx(sr,{title:"Content & Reading",description:"Settings that affect how your content is displayed",children:p.jsxs("div",{className:"helix-settings-grid",children:[p.jsx(Qt,{label:"Your homepage displays",description:"What to show on the front page of your site.",value:e.showOnFront,onChange:l=>t("showOnFront",l),options:n}),e.showOnFront==="page"&&p.jsxs(p.Fragment,{children:[p.jsx(He,{label:"Homepage",description:"The page to show on the front page (Page ID).",value:e.pageOnFront,onChange:l=>t("pageOnFront",l),min:0}),p.jsx(He,{label:"Posts page",description:"The page to show posts (Page ID).",value:e.pageForPosts,onChange:l=>t("pageForPosts",l),min:0})]}),p.jsx(He,{label:"Blog pages show at most",description:"Number of posts to show per page.",value:e.postsPerPage,onChange:l=>t("postsPerPage",l),min:1,max:100}),p.jsx(cl,{label:"Discourage search engines from indexing this site",description:"This will discourage, but not prevent, search engines from indexing this site.",value:!e.blogPublic,onChange:l=>t("blogPublic",!l)}),p.jsx(ln,{label:"Date Format",description:"Format for displaying dates throughout your site.",value:e.dateFormat,onChange:l=>t("dateFormat",l),placeholder:"F j, Y"}),p.jsx(ln,{label:"Time Format",description:"Format for displaying times throughout your site.",value:e.timeFormat,onChange:l=>t("timeFormat",l),placeholder:"g:i a"}),p.jsx(Qt,{label:"Week Starts On",description:"The day of the week the calendar should start on.",value:e.startOfWeek,onChange:l=>t("startOfWeek",parseInt(l)),options:r})]})})},_v=({settings:e,updateSetting:t})=>{const n=[{value:"standard",label:"Standard"},{value:"aside",label:"Aside"},{value:"gallery",label:"Gallery"},{value:"image",label:"Image"},{value:"link",label:"Link"},{value:"quote",label:"Quote"},{value:"status",label:"Status"},{value:"video",label:"Video"},{value:"audio",label:"Audio"},{value:"chat",label:"Chat"}],r=[{value:"open",label:"Open"},{value:"closed",label:"Closed"}];return p.jsx(sr,{title:"Writing & Publishing",description:"Settings for content creation and publishing",children:p.jsxs("div",{className:"helix-settings-grid",children:[p.jsx(He,{label:"Default Post Category",description:"The default category for new posts (Category ID).",value:e.defaultCategory,onChange:l=>t("defaultCategory",l),min:1}),p.jsx(Qt,{label:"Default Post Format",description:"The default format for new posts.",value:e.defaultPostFormat,onChange:l=>t("defaultPostFormat",l),options:n}),p.jsx(cl,{label:"Convert emoticons like :-) and :-P to graphics on display",description:"Transform text emoticons into graphical representations.",value:e.useSmilies,onChange:l=>t("useSmilies",l)}),p.jsx(Qt,{label:"Default comment status",description:"Allow people to submit comments on new posts.",value:e.defaultCommentStatus,onChange:l=>t("defaultCommentStatus",l),options:r}),p.jsx(Qt,{label:"Default ping status",description:"Allow link notifications from other blogs (pingbacks and trackbacks) on new posts.",value:e.defaultPingStatus,onChange:l=>t("defaultPingStatus",l),options:r})]})})},Ev=({settings:e,updateSetting:t})=>p.jsx(sr,{title:"Media & Assets",description:"Settings for media files, images, and site branding",children:p.jsxs("div",{className:"helix-settings-grid",children:[p.jsx(He,{label:"Site Logo",description:"The site logo (Media ID). Upload a logo in Media Library and enter its ID here.",value:e.siteLogo,onChange:n=>t("siteLogo",n),min:0}),p.jsx(He,{label:"Site Icon (Favicon)",description:"The site icon/favicon (Media ID). Upload an icon in Media Library and enter its ID here.",value:e.siteIcon,onChange:n=>t("siteIcon",n),min:0}),p.jsx("div",{className:"helix-settings-subsection-header",children:p.jsx("h4",{children:"Image Sizes"})}),p.jsx(He,{label:"Thumbnail Width",description:"Maximum width of thumbnail images in pixels.",value:e.thumbnailSizeW,onChange:n=>t("thumbnailSizeW",n),min:0,max:2e3}),p.jsx(He,{label:"Thumbnail Height",description:"Maximum height of thumbnail images in pixels.",value:e.thumbnailSizeH,onChange:n=>t("thumbnailSizeH",n),min:0,max:2e3}),p.jsx(He,{label:"Medium Width",description:"Maximum width of medium-sized images in pixels.",value:e.mediumSizeW,onChange:n=>t("mediumSizeW",n),min:0,max:2e3}),p.jsx(He,{label:"Medium Height",description:"Maximum height of medium-sized images in pixels.",value:e.mediumSizeH,onChange:n=>t("mediumSizeH",n),min:0,max:2e3}),p.jsx(He,{label:"Large Width",description:"Maximum width of large-sized images in pixels.",value:e.largeSizeW,onChange:n=>t("largeSizeW",n),min:0,max:4e3}),p.jsx(He,{label:"Large Height",description:"Maximum height of large-sized images in pixels.",value:e.largeSizeH,onChange:n=>t("largeSizeH",n),min:0,max:4e3}),p.jsx(cl,{label:"Organize my uploads into month- and year-based folders",description:"Organize uploaded files into date-based folder structure.",value:e.uploadsUseYearmonthFolders,onChange:n=>t("uploadsUseYearmonthFolders",n)})]})}),Tv=({settings:e,updateSetting:t})=>{const n=[{value:"subscriber",label:"Subscriber"},{value:"contributor",label:"Contributor"},{value:"author",label:"Author"},{value:"editor",label:"Editor"},{value:"administrator",label:"Administrator"}];return p.jsx(sr,{title:"Users & Membership",description:"Settings for user registration and default permissions",children:p.jsxs("div",{className:"helix-settings-grid",children:[p.jsx(cl,{label:"Anyone can register",description:"Allow anyone to register as a user on your site.",value:e.usersCanRegister,onChange:r=>t("usersCanRegister",r)}),p.jsx(Qt,{label:"New User Default Role",description:"The default role assigned to new users when they register.",value:e.defaultRole,onChange:r=>t("defaultRole",r),options:n})]})})},Pv=({settings:e,updateSetting:t})=>p.jsx(sr,{title:"Helix Settings",description:"Settings specific to the Helix plugin",children:p.jsx("div",{className:"helix-settings-grid",children:p.jsx(cl,{label:"Use Default WordPress Admin",description:"Switch back to the default WordPress admin interface instead of using Helix.",value:e.helixUseDefaultAdmin,onChange:n=>t("helixUseDefaultAdmin",n)})})});function Nv(){const{settings:e,loading:t,saving:n,error:r,hasUnsavedChanges:l,updateSetting:i,saveSettings:o,resetSettings:s}=yv(),[a,u]=I.useState("site"),[g,m]=I.useState(null),h=()=>{window.scrollTo({top:0,behavior:"smooth"})},w=async()=>{const d=await o();d.success?m({type:"success",message:d.message||"Settings saved successfully!"}):m({type:"error",message:d.message||"Failed to save settings. Please try again."}),h()},v=()=>{s(),m({type:"info",message:"Changes have been reset to their original values."}),h()},S=d=>{l&&!window.confirm("You have unsaved changes. Are you sure you want to switch tabs? Your changes will be lost.")||u(d)},T=()=>{const d={settings:e,updateSetting:i};switch(a){case"site":return p.jsx(Ec,{...d});case"content":return p.jsx(Cv,{...d});case"writing":return p.jsx(_v,{...d});case"media":return p.jsx(Ev,{...d});case"users":return p.jsx(Tv,{...d});case"helix":return p.jsx(Pv,{...d});default:return p.jsx(Ec,{...d})}};return t?p.jsx("div",{className:"helix-settings-page",children:p.jsxs("div",{className:"helix-loading",children:[p.jsx("div",{className:"helix-spinner"}),p.jsx("p",{children:"Loading settings..."})]})}):p.jsxs("div",{className:"helix-settings-page",children:[p.jsxs("div",{className:"helix-settings-header",children:[p.jsx("h1",{children:"Settings"}),p.jsx("p",{children:"Manage your WordPress site configuration"})]}),r&&p.jsx(_c,{type:"error",message:r,onClose:()=>{},autoClose:!1}),g&&p.jsx(_c,{type:g.type,message:g.message,onClose:()=>m(null)}),p.jsx(Sv,{activeTab:a,onTabChange:S,hasUnsavedChanges:l}),p.jsx("div",{className:"helix-settings-content",children:p.jsx("div",{id:`${a}-panel`,role:"tabpanel","aria-labelledby":`${a}-tab`,className:"helix-tab-panel",children:T()})}),p.jsx("div",{className:"helix-settings-footer",children:p.jsx(kv,{onSave:w,onReset:v,saving:n,hasUnsavedChanges:l})})]})}function jv(){return p.jsx(dv,{})}function $v(){return p.jsxs("div",{className:"helix-page",children:[p.jsx("h1",{children:"Posts Management"}),p.jsx("p",{children:"Posts management interface will be implemented here."})]})}function zv(){return p.jsxs("div",{className:"helix-page",children:[p.jsx("h1",{children:"Users Management"}),p.jsx("p",{children:"Users management interface will be implemented here."})]})}document.addEventListener("DOMContentLoaded",function(){const e=document.getElementById("helix-root");e&&kr(e).render(p.jsx(jv,{}));const t=document.getElementById("helix-settings-root");t&&kr(t).render(p.jsx(Nv,{}));const n=document.getElementById("helix-posts-root");n&&kr(n).render(p.jsx($v,{}));const r=document.getElementById("helix-users-root");r&&kr(r).render(p.jsx(zv,{}))}); diff --git a/src/pages/Settings/components/MediaAssetsSettings.jsx b/src/pages/Settings/components/MediaAssetsSettings.jsx index 1a093d4..7c3e907 100644 --- a/src/pages/Settings/components/MediaAssetsSettings.jsx +++ b/src/pages/Settings/components/MediaAssetsSettings.jsx @@ -32,76 +32,80 @@ const MediaAssetsSettings = ( { settings, updateSetting } ) => { min={ 0 } /> -
+ { /* Image Sizes Section - Header spans full width */ } +

Image Sizes

- - - updateSetting( 'thumbnailSizeW', value ) - } - min={ 0 } - max={ 2000 } - /> - - - updateSetting( 'thumbnailSizeH', value ) - } - min={ 0 } - max={ 2000 } - /> - - - updateSetting( 'mediumSizeW', value ) - } - min={ 0 } - max={ 2000 } - /> - - - updateSetting( 'mediumSizeH', value ) - } - min={ 0 } - max={ 2000 } - /> - - - updateSetting( 'largeSizeW', value ) - } - min={ 0 } - max={ 4000 } - /> - - - updateSetting( 'largeSizeH', value ) - } - min={ 0 } - max={ 4000 } - />
+ { /* Thumbnail dimensions - side by side */ } + + updateSetting( 'thumbnailSizeW', value ) + } + min={ 0 } + max={ 2000 } + /> + + + updateSetting( 'thumbnailSizeH', value ) + } + min={ 0 } + max={ 2000 } + /> + + { /* Medium dimensions - side by side */ } + + updateSetting( 'mediumSizeW', value ) + } + min={ 0 } + max={ 2000 } + /> + + + updateSetting( 'mediumSizeH', value ) + } + min={ 0 } + max={ 2000 } + /> + + { /* Large dimensions - side by side */ } + + updateSetting( 'largeSizeW', value ) + } + min={ 0 } + max={ 4000 } + /> + + + updateSetting( 'largeSizeH', value ) + } + min={ 0 } + max={ 4000 } + /> +