myio-js-library 0.1.575 → 0.1.576

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -233,6 +233,7 @@ __export(src_exports, {
233
233
  MENU_SHOPPING_CSS_PREFIX: () => MENU_SHOPPING_CSS_PREFIX,
234
234
  METRO_TILE_COLORS: () => METRO_TILE_COLORS,
235
235
  MONEY_DASH: () => DASH,
236
+ MONEY_HOURLY_MAX_DAYS: () => MONEY_HOURLY_MAX_DAYS,
236
237
  MONEY_REQUIRES_DEVICE_GRANULARITY: () => MONEY_REQUIRES_DEVICE_GRANULARITY,
237
238
  MONEY_VARIANCE_HEADER: () => MONEY_VARIANCE_HEADER,
238
239
  MOTOR_SORT_OPTIONS: () => MOTOR_SORT_OPTIONS,
@@ -314,6 +315,7 @@ __export(src_exports, {
314
315
  SolenoidControlView: () => SolenoidControlView,
315
316
  SwitchControlController: () => SwitchControlController,
316
317
  SwitchControlView: () => SwitchControlView,
318
+ TARIFF_DEFAULT_TIMEZONE: () => TARIFF_DEFAULT_TIMEZONE,
317
319
  TELEMETRY_CONTEXT_CONFIG: () => CONTEXT_CONFIG,
318
320
  TELEMETRY_DEFAULT_FILTER_TABS: () => DEFAULT_FILTER_TABS,
319
321
  TELEMETRY_DOMAIN_CONFIG: () => DOMAIN_CONFIG6,
@@ -518,6 +520,7 @@ __export(src_exports, {
518
520
  createSwitchControl: () => createSwitchControl,
519
521
  createTariffApiAdapter: () => createTariffApiAdapter,
520
522
  createTariffApiClient: () => createTariffApiClient,
523
+ createTariffValuator: () => createTariffValuator,
521
524
  createTbEnvelopeStore: () => createTbEnvelopeStore,
522
525
  createTelemetryGridComponent: () => createTelemetryGridComponent,
523
526
  createTelemetryGridShoppingComponent: () => createTelemetryGridShoppingComponent,
@@ -558,7 +561,7 @@ __export(src_exports, {
558
561
  doSchedulesOverlap: () => doSchedulesOverlap,
559
562
  downloadAnnotationsTextFile: () => downloadTextFile,
560
563
  encodeDeviceProductCode: () => encodeDeviceProductCode,
561
- escapeAnnotationHtml: () => escapeHtml21,
564
+ escapeAnnotationHtml: () => escapeHtml22,
562
565
  evaluateDeviceStatus: () => evaluateDeviceStatus,
563
566
  expandBandHours: () => expandBandHours,
564
567
  expandBandToHourBucketsByYear: () => expandBandToHourBucketsByYear,
@@ -809,6 +812,7 @@ __export(src_exports, {
809
812
  openGatewayModal: () => openGatewayModal,
810
813
  openGenericModal: () => openGenericModal,
811
814
  openGoalsPanel: () => openGoalsPanel,
815
+ openGoalsTariffsHub: () => openGoalsTariffsHub,
812
816
  openHelpModal: () => openHelpModal,
813
817
  openIntegrationsModal: () => openIntegrationsModal,
814
818
  openManualDeviceModal: () => openManualDeviceModal,
@@ -907,7 +911,7 @@ __export(src_exports, {
907
911
  schedCreateNumberInput: () => createNumberInput,
908
912
  schedCreateSelect: () => createSelect,
909
913
  schedCreateTimeInput: () => createTimeInput,
910
- schedEscapeHtml: () => escapeHtml20,
914
+ schedEscapeHtml: () => escapeHtml21,
911
915
  schedShowConfirmModal: () => showConfirmModal,
912
916
  schedShowNotificationModal: () => showNotificationModal,
913
917
  selectBreakdownItems: () => selectBreakdownItems,
@@ -958,7 +962,7 @@ module.exports = __toCommonJS(src_exports);
958
962
  // package.json
959
963
  var package_default = {
960
964
  name: "myio-js-library",
961
- version: "0.1.575",
965
+ version: "0.1.576",
962
966
  description: "A clean, standalone JS SDK for MYIO projects",
963
967
  license: "MIT",
964
968
  repository: "github:gh-myio/myio-js-library",
@@ -41425,10 +41429,10 @@ var WaterTankModalView = class {
41425
41429
  */
41426
41430
  render() {
41427
41431
  const { params } = this.config;
41428
- const STYLE_ID23 = "myio-water-tank-modal-styles";
41429
- if (!document.getElementById(STYLE_ID23)) {
41432
+ const STYLE_ID24 = "myio-water-tank-modal-styles";
41433
+ if (!document.getElementById(STYLE_ID24)) {
41430
41434
  const style = document.createElement("style");
41431
- style.id = STYLE_ID23;
41435
+ style.id = STYLE_ID24;
41432
41436
  style.textContent = `
41433
41437
  @media (max-width: 640px) {
41434
41438
  .myio-water-tank-modal { width: 100vw !important; max-width: 100vw !important; max-height: 100vh !important; border-radius: 0 !important; }
@@ -64512,10 +64516,10 @@ ${this._formatFileSize(f.size)} \xB7 ${f.type || "arquivo"}`;
64512
64516
  // Styles
64513
64517
  // ==========================================================================
64514
64518
  injectStyles() {
64515
- const STYLE_ID23 = "myio-tickets-tab-styles";
64516
- if (document.getElementById(STYLE_ID23)) return;
64519
+ const STYLE_ID24 = "myio-tickets-tab-styles";
64520
+ if (document.getElementById(STYLE_ID24)) return;
64517
64521
  const style = document.createElement("style");
64518
- style.id = STYLE_ID23;
64522
+ style.id = STYLE_ID24;
64519
64523
  style.textContent = `
64520
64524
  /* ===== TicketsTab layout ===== */
64521
64525
  .ct-tab {
@@ -85197,6 +85201,15 @@ function buildYearOptions() {
85197
85201
  function esc5(s) {
85198
85202
  return String(s == null ? "" : s).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
85199
85203
  }
85204
+ function resolveThemeVars(theme) {
85205
+ if (!theme || typeof theme !== "object") return null;
85206
+ try {
85207
+ const vars = typeof theme.cssVars === "function" ? theme.cssVars() : theme;
85208
+ return vars && typeof vars === "object" ? vars : null;
85209
+ } catch (_) {
85210
+ return null;
85211
+ }
85212
+ }
85200
85213
  function openGoalsPanel(params) {
85201
85214
  if (typeof window === "undefined" || typeof document === "undefined") {
85202
85215
  throw new Error("GoalsPanel requires a browser environment");
@@ -85210,6 +85223,8 @@ function openGoalsPanel(params) {
85210
85223
  const container = p.container || document.body;
85211
85224
  const locale = p.locale === "en-US" ? "en-US" : "pt-BR";
85212
85225
  const styles = p.styles || {};
85226
+ const tenantId = p.tenantId ? String(p.tenantId) : null;
85227
+ const themeVars = resolveThemeVars(p.theme);
85213
85228
  if (!customerId) throw new Error("customerId is required");
85214
85229
  if (!apiKey) throw new Error("apiKey (X-API-Key gcdr_cust_*) is required");
85215
85230
  if (!rawBaseUrl) throw new Error("baseUrl (GCDR host) is required");
@@ -85217,7 +85232,8 @@ function openGoalsPanel(params) {
85217
85232
  const theme = {
85218
85233
  accent: styles.accent || styles.primaryColor || "#059669",
85219
85234
  accentSoft: styles.accentSoft || "rgba(5,150,105,0.10)",
85220
- primary: styles.primaryColor || styles.accent || "#059669",
85235
+ // Header: styles explícito > paleta do dashboard (--myio-brand-700) > esmeralda.
85236
+ primary: styles.primaryColor || styles.accent || (themeVars && typeof themeVars["--myio-brand-700"] === "string" ? themeVars["--myio-brand-700"] : null) || "#059669",
85221
85237
  violet: styles.violet || "#6c5ce7",
85222
85238
  danger: styles.errorColor || "#dc2626",
85223
85239
  amber: styles.warningColor || "#d97706",
@@ -85225,7 +85241,7 @@ function openGoalsPanel(params) {
85225
85241
  fontFamily: styles.fontFamily || "'Nunito', system-ui, sans-serif",
85226
85242
  zIndex: styles.zIndex || 1e6
85227
85243
  };
85228
- const MODAL_ID7 = "goals-gcdr-modal";
85244
+ const MODAL_ID8 = "goals-gcdr-modal";
85229
85245
  const ROOT_ID2 = "myio-goals-gcdr-root";
85230
85246
  const state6 = {
85231
85247
  domain: DOMAINS2.includes(p.domain) ? p.domain : "ENERGY",
@@ -85287,11 +85303,14 @@ function openGoalsPanel(params) {
85287
85303
  try {
85288
85304
  res = await fetch(url, {
85289
85305
  method,
85290
- headers: {
85291
- "X-API-Key": apiKey,
85292
- "Content-Type": "application/json",
85293
- Accept: "application/json"
85294
- },
85306
+ headers: Object.assign(
85307
+ {
85308
+ "X-API-Key": apiKey,
85309
+ "Content-Type": "application/json",
85310
+ Accept: "application/json"
85311
+ },
85312
+ tenantId ? { "X-Tenant-ID": tenantId } : {}
85313
+ ),
85295
85314
  body: o.body !== void 0 ? JSON.stringify(o.body) : void 0
85296
85315
  });
85297
85316
  } catch (e) {
@@ -85744,6 +85763,11 @@ function openGoalsPanel(params) {
85744
85763
  rootEl.className = "myio-goals-overlay";
85745
85764
  rootEl.setAttribute("role", "dialog");
85746
85765
  rootEl.setAttribute("aria-modal", "true");
85766
+ if (themeVars) {
85767
+ Object.entries(themeVars).forEach(([k, v]) => {
85768
+ if (k.startsWith("--") && typeof v === "string") rootEl.style.setProperty(k, v);
85769
+ });
85770
+ }
85747
85771
  container.appendChild(rootEl);
85748
85772
  injectStyles26();
85749
85773
  rootEl.addEventListener("click", onClick);
@@ -85891,7 +85915,7 @@ function openGoalsPanel(params) {
85891
85915
  const headerHTML = ModalHeader.generateInlineHTML({
85892
85916
  icon: "\u{1F3AF}",
85893
85917
  title: i18n2.modalTitle,
85894
- modalId: MODAL_ID7,
85918
+ modalId: MODAL_ID8,
85895
85919
  theme: "dark",
85896
85920
  isMaximized: false,
85897
85921
  showThemeToggle: false,
@@ -85915,7 +85939,7 @@ function openGoalsPanel(params) {
85915
85939
  </div>
85916
85940
  ${state6.importOpen ? renderImportModal() : ""}
85917
85941
  `;
85918
- ModalHeader.setupHandlers({ modalId: MODAL_ID7, onClose: () => closeModal2() });
85942
+ ModalHeader.setupHandlers({ modalId: MODAL_ID8, onClose: () => closeModal2() });
85919
85943
  attachCoverageTooltip();
85920
85944
  }
85921
85945
  function renderToolbar() {
@@ -93353,13 +93377,13 @@ var COLUMN_SUMMARY_CSS = `
93353
93377
  var _cssInjected2 = false;
93354
93378
  function injectCSS10() {
93355
93379
  if (_cssInjected2 || typeof document === "undefined") return;
93356
- const STYLE_ID23 = "myio-column-summary-tooltip-css";
93357
- if (document.getElementById(STYLE_ID23)) {
93380
+ const STYLE_ID24 = "myio-column-summary-tooltip-css";
93381
+ if (document.getElementById(STYLE_ID24)) {
93358
93382
  _cssInjected2 = true;
93359
93383
  return;
93360
93384
  }
93361
93385
  const style = document.createElement("style");
93362
- style.id = STYLE_ID23;
93386
+ style.id = STYLE_ID24;
93363
93387
  style.textContent = COLUMN_SUMMARY_CSS;
93364
93388
  document.head.appendChild(style);
93365
93389
  _cssInjected2 = true;
@@ -105162,6 +105186,15 @@ var HUB_OPTIONS = [
105162
105186
  desc: "Unidades e casas decimais",
105163
105187
  superAdminOnly: false
105164
105188
  },
105189
+ {
105190
+ // RFC-0241 — MyIO (@myio.com.br) ou admin do usuário; gate via `permissions`.
105191
+ action: "goals-tariffs",
105192
+ icon: "\u{1F3AF}",
105193
+ title: "Metas e Tarifas",
105194
+ desc: "Metas de consumo e tarifas (R$/kWh, R$/m\xB3)",
105195
+ superAdminOnly: false,
105196
+ requiresPermission: true
105197
+ },
105165
105198
  {
105166
105199
  action: "integration",
105167
105200
  icon: "\u{1F517}",
@@ -105348,7 +105381,7 @@ function resolveHubThemeVars(explicit) {
105348
105381
  return vars && typeof vars === "object" ? vars : null;
105349
105382
  }
105350
105383
  function openSettingsHubModal(options) {
105351
- const { customerName = "", isSuperAdmin: isSuperAdmin2 = false, handlers } = options;
105384
+ const { customerName = "", isSuperAdmin: isSuperAdmin2 = false, handlers, permissions = {} } = options;
105352
105385
  const doc = options.targetDocument || resolveTopDocument();
105353
105386
  if (!doc.getElementById(STYLE_ID12)) {
105354
105387
  const style = doc.createElement("style");
@@ -105358,7 +105391,7 @@ function openSettingsHubModal(options) {
105358
105391
  }
105359
105392
  doc.getElementById(MODAL_ID2)?.remove();
105360
105393
  const visibleOptions = HUB_OPTIONS.filter(
105361
- (opt) => typeof handlers[opt.action] === "function" && (!opt.superAdminOnly || isSuperAdmin2)
105394
+ (opt) => typeof handlers[opt.action] === "function" && (!opt.superAdminOnly || isSuperAdmin2) && (!opt.requiresPermission || permissions[opt.action] === true)
105362
105395
  );
105363
105396
  const cardsHtml = visibleOptions.map(
105364
105397
  (opt) => `
@@ -105413,6 +105446,201 @@ function openSettingsHubModal(options) {
105413
105446
  return { close: closeModal2 };
105414
105447
  }
105415
105448
 
105449
+ // src/components/goals-tariffs-hub/openGoalsTariffsHub.ts
105450
+ var ROUTE_DELAY_MS2 = 200;
105451
+ var MODAL_ID3 = "myio-goals-tariffs-hub";
105452
+ var STYLE_ID13 = "myio-goals-tariffs-hub-styles";
105453
+ var AREAS = [
105454
+ {
105455
+ area: "manage",
105456
+ icon: "\u{1F6E0}\uFE0F",
105457
+ title: "Gest\xE3o de Metas",
105458
+ desc: (entity) => `Criar, atualizar e importar metas por ${entity} (planilha, hist\xF3rico de vers\xF5es, margem).`
105459
+ },
105460
+ {
105461
+ area: "compare",
105462
+ icon: "\u{1F4CA}",
105463
+ title: "Metas \xD7 Consumo",
105464
+ desc: () => "Comparar o consumo real com as metas, num \xFAnico painel."
105465
+ },
105466
+ {
105467
+ area: "tariffs",
105468
+ icon: "\u{1F4B2}",
105469
+ title: "Tarifas",
105470
+ desc: () => "Tarifas de energia e \xE1gua (R$/kWh, R$/m\xB3) por categoria e per\xEDodo."
105471
+ }
105472
+ ];
105473
+ var HUB_CSS2 = `
105474
+ .myio-gt-hub {
105475
+ position: fixed; inset: 0; z-index: 999999;
105476
+ display: flex; align-items: center; justify-content: center;
105477
+ opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
105478
+ font-family: 'Nunito', system-ui, sans-serif;
105479
+ }
105480
+ .myio-gt-hub.show { opacity: 1; pointer-events: auto; }
105481
+ .myio-gt-hub__overlay {
105482
+ position: absolute; inset: 0;
105483
+ background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(4px);
105484
+ }
105485
+ .myio-gt-hub__content {
105486
+ position: relative; z-index: 2; background: #FFFFFF; border-radius: 12px;
105487
+ box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
105488
+ width: min(720px, calc(100% - 32px)); max-height: 90vh; overflow: hidden;
105489
+ display: flex; flex-direction: column;
105490
+ transform: translateY(10px) scale(0.98); transition: transform 0.2s ease;
105491
+ }
105492
+ .myio-gt-hub.show .myio-gt-hub__content { transform: translateY(0) scale(1); }
105493
+ .myio-gt-hub__header {
105494
+ display: flex; align-items: center; justify-content: space-between;
105495
+ padding: 12px 16px; background: var(--myio-brand-700, #3e1a7d);
105496
+ color: var(--myio-accent-text, #FFFFFF);
105497
+ }
105498
+ .myio-gt-hub__header h3 { margin: 0; font-size: 15px; font-weight: 700; }
105499
+ .myio-gt-hub__close {
105500
+ background: transparent; border: none; color: inherit; font-size: 22px; line-height: 1;
105501
+ cursor: pointer; padding: 2px 6px; border-radius: 4px;
105502
+ }
105503
+ .myio-gt-hub__close:hover { background: rgba(255, 255, 255, 0.15); }
105504
+ .myio-gt-hub__body {
105505
+ display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
105506
+ gap: 12px; padding: 18px; overflow-y: auto;
105507
+ }
105508
+ .myio-gt-hub__card {
105509
+ display: flex; flex-direction: column; gap: 8px; padding: 20px 18px;
105510
+ border: 1px solid #E2E8F0; border-radius: 12px; background: #FFFFFF;
105511
+ cursor: pointer; text-align: left; font-family: inherit;
105512
+ transition: border-color 0.15s ease, box-shadow 0.15s ease;
105513
+ }
105514
+ .myio-gt-hub__card:hover, .myio-gt-hub__card:focus-visible {
105515
+ border-color: var(--myio-brand-700, #3e1a7d);
105516
+ box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08); outline: none;
105517
+ }
105518
+ .myio-gt-hub__icon { font-size: 26px; }
105519
+ .myio-gt-hub__title { font-size: 14px; font-weight: 700; color: #1E293B; }
105520
+ .myio-gt-hub__desc { font-size: 12px; font-weight: 600; color: #64748B; line-height: 1.35; }
105521
+ `;
105522
+ function escapeHtml13(value) {
105523
+ return String(value).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
105524
+ }
105525
+ function resolveTopDocument2() {
105526
+ try {
105527
+ return (window.top || window).document;
105528
+ } catch {
105529
+ return document;
105530
+ }
105531
+ }
105532
+ function resolveThemeVars2(explicit) {
105533
+ const theme = explicit || (typeof window !== "undefined" ? window.MyIOUtils?.theme : void 0);
105534
+ if (!theme) return null;
105535
+ try {
105536
+ const vars = typeof theme.cssVars === "function" ? theme.cssVars() : theme;
105537
+ return vars && typeof vars === "object" ? vars : null;
105538
+ } catch {
105539
+ return null;
105540
+ }
105541
+ }
105542
+ function openGoalsTariffsHub(options) {
105543
+ const handlers = options.handlers || {};
105544
+ const doc = options.targetDocument || resolveTopDocument2();
105545
+ const title = options.title || "\u{1F3AF} Metas e Tarifas";
105546
+ const entity = options.entityLabel || "shopping";
105547
+ const reportError = options.onError || ((err, area) => {
105548
+ console.error(`[GoalsTariffsHub] handler '${area}' falhou:`, err);
105549
+ });
105550
+ if (!doc.getElementById(STYLE_ID13)) {
105551
+ const style = doc.createElement("style");
105552
+ style.id = STYLE_ID13;
105553
+ style.textContent = HUB_CSS2;
105554
+ doc.head.appendChild(style);
105555
+ }
105556
+ doc.getElementById(MODAL_ID3)?.remove();
105557
+ const visible = AREAS.filter((a) => typeof handlers[a.area] === "function");
105558
+ const cardsHtml = visible.map((a) => {
105559
+ const desc = options.descriptions?.[a.area] ?? a.desc(entity);
105560
+ return `
105561
+ <button type="button" class="myio-gt-hub__card" data-area="${a.area}">
105562
+ <span class="myio-gt-hub__icon">${a.icon}</span>
105563
+ <span class="myio-gt-hub__title">${a.title}</span>
105564
+ <span class="myio-gt-hub__desc">${escapeHtml13(desc)}</span>
105565
+ </button>`;
105566
+ }).join("");
105567
+ const modal = doc.createElement("div");
105568
+ modal.id = MODAL_ID3;
105569
+ modal.className = "myio-gt-hub";
105570
+ modal.innerHTML = `
105571
+ <div class="myio-gt-hub__overlay"></div>
105572
+ <div class="myio-gt-hub__content" role="dialog" aria-modal="true" aria-label="${escapeHtml13(title)}">
105573
+ <div class="myio-gt-hub__header">
105574
+ <h3>${escapeHtml13(title)}</h3>
105575
+ <button type="button" class="myio-gt-hub__close" aria-label="Fechar">&times;</button>
105576
+ </div>
105577
+ <div class="myio-gt-hub__body">${cardsHtml}
105578
+ </div>
105579
+ </div>
105580
+ `;
105581
+ doc.body.appendChild(modal);
105582
+ const themeVars = resolveThemeVars2(options.theme);
105583
+ if (themeVars) {
105584
+ Object.entries(themeVars).forEach(([k, v]) => {
105585
+ if (k.startsWith("--") && typeof v === "string") modal.style.setProperty(k, v);
105586
+ });
105587
+ }
105588
+ let footer = null;
105589
+ if (options.footer) {
105590
+ try {
105591
+ footer = createModalFooter({
105592
+ customerName: options.footer.customerName || "",
105593
+ libVersion: options.footer.libVersion ? { current: options.footer.libVersion } : false,
105594
+ libVersionMode: "static",
105595
+ themeMode: "light"
105596
+ });
105597
+ modal.querySelector(".myio-gt-hub__content")?.appendChild(footer.element);
105598
+ } catch {
105599
+ footer = null;
105600
+ }
105601
+ }
105602
+ const raf = typeof requestAnimationFrame === "function" ? requestAnimationFrame : (cb) => setTimeout(cb, 0);
105603
+ raf(() => modal.classList.add("show"));
105604
+ let closed = false;
105605
+ const escHandler = (e) => {
105606
+ if (e.key === "Escape") close();
105607
+ };
105608
+ function close() {
105609
+ if (closed) return;
105610
+ closed = true;
105611
+ doc.removeEventListener("keydown", escHandler);
105612
+ modal.classList.remove("show");
105613
+ setTimeout(() => {
105614
+ footer?.destroy?.();
105615
+ modal.remove();
105616
+ }, 200);
105617
+ try {
105618
+ options.onClose?.();
105619
+ } catch {
105620
+ }
105621
+ }
105622
+ modal.querySelector(".myio-gt-hub__overlay")?.addEventListener("click", close);
105623
+ modal.querySelector(".myio-gt-hub__close")?.addEventListener("click", close);
105624
+ doc.addEventListener("keydown", escHandler);
105625
+ modal.querySelectorAll(".myio-gt-hub__card").forEach((btn) => {
105626
+ btn.addEventListener("click", () => {
105627
+ const area = btn.dataset.area;
105628
+ close();
105629
+ setTimeout(() => {
105630
+ try {
105631
+ const out = handlers[area]?.();
105632
+ if (out && typeof out.then === "function") {
105633
+ out.catch((err) => reportError(err, area));
105634
+ }
105635
+ } catch (err) {
105636
+ reportError(err, area);
105637
+ }
105638
+ }, ROUTE_DELAY_MS2);
105639
+ });
105640
+ });
105641
+ return { close };
105642
+ }
105643
+
105416
105644
  // src/components/pricing-panel/helpers.ts
105417
105645
  var DOMAIN_LABEL = {
105418
105646
  energy: "Energia",
@@ -106571,18 +106799,18 @@ function createTariffApiAdapter(client, opts) {
106571
106799
  }
106572
106800
 
106573
106801
  // src/components/pricing-panel/openPricingPanel.ts
106574
- var MODAL_ID3 = "myio-pricing-panel";
106575
- function escapeHtml13(value) {
106802
+ var MODAL_ID4 = "myio-pricing-panel";
106803
+ function escapeHtml14(value) {
106576
106804
  return String(value).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
106577
106805
  }
106578
- function resolveTopDocument2() {
106806
+ function resolveTopDocument3() {
106579
106807
  try {
106580
106808
  return (window.top || window).document;
106581
106809
  } catch {
106582
106810
  return document;
106583
106811
  }
106584
106812
  }
106585
- function resolveThemeVars(explicit) {
106813
+ function resolveThemeVars3(explicit) {
106586
106814
  const theme = explicit || (typeof window !== "undefined" ? window.MyIOUtils?.theme : void 0);
106587
106815
  if (!theme) return null;
106588
106816
  const vars = typeof theme.cssVars === "function" ? theme.cssVars() : theme;
@@ -106627,7 +106855,7 @@ function fmtTimestamp(iso) {
106627
106855
  return d.toLocaleString("pt-BR");
106628
106856
  }
106629
106857
  function openPricingPanel(params) {
106630
- const doc = params.targetDocument || resolveTopDocument2();
106858
+ const doc = params.targetDocument || resolveTopDocument3();
106631
106859
  const author = params.currentUserEmail || "";
106632
106860
  const storePrefix = params.storageKeyPrefix || "myio";
106633
106861
  const keyEntries = entriesKey(storePrefix);
@@ -106647,9 +106875,10 @@ function openPricingPanel(params) {
106647
106875
  }
106648
106876
  };
106649
106877
  injectPricingPanelStyles(doc);
106650
- doc.getElementById(MODAL_ID3)?.remove();
106651
- const allowed = isPricingAllowed(params.currentUserEmail, isSuperAdmin());
106878
+ doc.getElementById(MODAL_ID4)?.remove();
106879
+ const allowed = typeof params.allowed === "boolean" ? params.allowed : isPricingAllowed(params.currentUserEmail, isSuperAdmin());
106652
106880
  const customers = params.customers || [];
106881
+ const lockCustomer = params.lockCustomer === true && customers.length > 0;
106653
106882
  const tariffApi = params.tariffApi;
106654
106883
  let adapter = null;
106655
106884
  if (allowed && tariffApi) {
@@ -106665,10 +106894,10 @@ function openPricingPanel(params) {
106665
106894
  let entries = allowed ? adapter ? (params.initialEntries || []).map((e) => ({ ...e })) : mergeEntries(loadJson(doc, keyEntries, []), params.initialEntries || [], author) : [];
106666
106895
  let auditLog = allowed && !adapter ? loadJson(doc, keyAudit, []) : [];
106667
106896
  const modal = doc.createElement("div");
106668
- modal.id = MODAL_ID3;
106897
+ modal.id = MODAL_ID4;
106669
106898
  modal.className = "myio-pricing";
106670
106899
  function applyTheme() {
106671
- const themeVars = resolveThemeVars(params.theme);
106900
+ const themeVars = resolveThemeVars3(params.theme);
106672
106901
  if (!themeVars) return;
106673
106902
  Object.entries(themeVars).forEach(([k, v]) => {
106674
106903
  if (k.startsWith("--") && typeof v === "string") modal.style.setProperty(k, v);
@@ -106727,7 +106956,7 @@ function openPricingPanel(params) {
106727
106956
  }
106728
106957
  const initDomain = params.domain || "energy";
106729
106958
  const initCategory = params.category || "lojas";
106730
- const customerOptions = customers.map((c) => `<option value="${escapeHtml13(resolveCustomerId(c))}">${escapeHtml13(c.title)}</option>`).join("");
106959
+ const customerOptions = customers.map((c) => `<option value="${escapeHtml14(resolveCustomerId(c))}">${escapeHtml14(c.title)}</option>`).join("");
106731
106960
  modal.innerHTML = `
106732
106961
  <div class="myio-pricing__overlay"></div>
106733
106962
  <div class="myio-pricing__content">
@@ -106744,7 +106973,7 @@ function openPricingPanel(params) {
106744
106973
  <!-- TAB: Definir pre\xE7os -->
106745
106974
  <div class="myio-pricing__panel" data-panel="define">
106746
106975
  <div class="myio-pricing__form">
106747
- <div class="myio-pricing__field myio-pricing__field--full">
106976
+ <div class="myio-pricing__field myio-pricing__field--full" data-testid="pricing-customer-field"${lockCustomer ? ' style="display:none;"' : ""}>
106748
106977
  <label class="myio-pricing__label" for="myio-pricing-customer">Customer (shopping)</label>
106749
106978
  <select class="myio-pricing__select" id="myio-pricing-customer" data-testid="pricing-customer">
106750
106979
  ${customerOptions}
@@ -106942,9 +107171,9 @@ function openPricingPanel(params) {
106942
107171
  const pushAudit = (rec) => {
106943
107172
  if (rec) auditLog = [rec, ...auditLog];
106944
107173
  };
106945
- const badge = (domain, category) => `<span class="myio-pricing__badge${domain === "water" ? " myio-pricing__badge--water" : ""}">${escapeHtml13(
107174
+ const badge = (domain, category) => `<span class="myio-pricing__badge${domain === "water" ? " myio-pricing__badge--water" : ""}">${escapeHtml14(
106946
107175
  DOMAIN_LABEL[domain]
106947
- )} \xB7 ${escapeHtml13(CATEGORY_LABEL[category])}</span>`;
107176
+ )} \xB7 ${escapeHtml14(CATEGORY_LABEL[category])}</span>`;
106948
107177
  const renderList2 = () => {
106949
107178
  const customerId = customerSel.value;
106950
107179
  const rows = entries.filter((e) => e.customerId === customerId).sort((a, b) => {
@@ -106957,15 +107186,15 @@ function openPricingPanel(params) {
106957
107186
  const boundsKey = b ? `${b.start}__${b.end}` : "";
106958
107187
  return `
106959
107188
  <li class="myio-pricing__item">
106960
- <span class="myio-pricing__item-period">${badge(e.domain, e.category)} ${escapeHtml13(
107189
+ <span class="myio-pricing__item-period">${badge(e.domain, e.category)} ${escapeHtml14(
106961
107190
  formatPeriodLabel(e)
106962
107191
  )}</span>
106963
- <span class="myio-pricing__item-price">${escapeHtml13(formatBRL2(e.pricePerKwh))} ${escapeHtml13(
107192
+ <span class="myio-pricing__item-price">${escapeHtml14(formatBRL2(e.pricePerKwh))} ${escapeHtml14(
106964
107193
  unitLabel(e.domain)
106965
107194
  )}</span>
106966
- <button class="myio-pricing__remove" data-remove="${escapeHtml13(e.domain)}|${escapeHtml13(
107195
+ <button class="myio-pricing__remove" data-remove="${escapeHtml14(e.domain)}|${escapeHtml14(
106967
107196
  e.category
106968
- )}|${escapeHtml13(boundsKey)}" aria-label="Remover" type="button">\u2715</button>
107197
+ )}|${escapeHtml14(boundsKey)}" aria-label="Remover" type="button">\u2715</button>
106969
107198
  </li>`;
106970
107199
  }).join("");
106971
107200
  emptyEl.style.display = rows.length ? "none" : "";
@@ -107064,8 +107293,8 @@ function openPricingPanel(params) {
107064
107293
  kpiEl.innerHTML = cards.map(
107065
107294
  (c) => `
107066
107295
  <div class="myio-pricing__kpi">
107067
- <div class="myio-pricing__kpi-value">${escapeHtml13(c.value)}</div>
107068
- <div class="myio-pricing__kpi-label">${escapeHtml13(c.label)}</div>
107296
+ <div class="myio-pricing__kpi-value">${escapeHtml14(c.value)}</div>
107297
+ <div class="myio-pricing__kpi-label">${escapeHtml14(c.label)}</div>
107069
107298
  </div>`
107070
107299
  ).join("");
107071
107300
  renderReport();
@@ -107084,11 +107313,11 @@ function openPricingPanel(params) {
107084
107313
  reportBody.innerHTML = rows.length ? rows.map(
107085
107314
  (e) => `
107086
107315
  <tr>
107087
- <td>${escapeHtml13(customerTitle(e.customerId))}</td>
107088
- <td>${escapeHtml13(DOMAIN_LABEL[e.domain])}</td>
107089
- <td>${escapeHtml13(CATEGORY_LABEL[e.category])}</td>
107090
- <td>${escapeHtml13(formatPeriodLabel(e))}</td>
107091
- <td>${escapeHtml13(formatBRL2(e.pricePerKwh))} ${escapeHtml13(unitLabel(e.domain))}</td>
107316
+ <td>${escapeHtml14(customerTitle(e.customerId))}</td>
107317
+ <td>${escapeHtml14(DOMAIN_LABEL[e.domain])}</td>
107318
+ <td>${escapeHtml14(CATEGORY_LABEL[e.category])}</td>
107319
+ <td>${escapeHtml14(formatPeriodLabel(e))}</td>
107320
+ <td>${escapeHtml14(formatBRL2(e.pricePerKwh))} ${escapeHtml14(unitLabel(e.domain))}</td>
107092
107321
  </tr>`
107093
107322
  ).join("") : `<tr><td colspan="5" style="text-align:center;color:var(--myio-text-muted,#6b7280);padding:24px;">Nenhum pre\xE7o para o filtro selecionado.</td></tr>`;
107094
107323
  }
@@ -107098,15 +107327,15 @@ function openPricingPanel(params) {
107098
107327
  return `
107099
107328
  <li class="myio-pricing__history-item">
107100
107329
  <div class="myio-pricing__history-head">
107101
- <span class="myio-pricing__action myio-pricing__action--${escapeHtml13(rec.action)}">${escapeHtml13(
107330
+ <span class="myio-pricing__action myio-pricing__action--${escapeHtml14(rec.action)}">${escapeHtml14(
107102
107331
  rec.action
107103
107332
  )}</span>
107104
107333
  ${badge(rec.domain, rec.category)}
107105
- <span>${escapeHtml13(rec.periodLabel)}${escapeHtml13(priceInfo)}</span>
107334
+ <span>${escapeHtml14(rec.periodLabel)}${escapeHtml14(priceInfo)}</span>
107106
107335
  </div>
107107
- <div class="myio-pricing__history-meta">${escapeHtml13(customerTitle(rec.customerId))} \xB7 ${escapeHtml13(
107336
+ <div class="myio-pricing__history-meta">${escapeHtml14(customerTitle(rec.customerId))} \xB7 ${escapeHtml14(
107108
107337
  rec.by || "\u2014"
107109
- )} \xB7 ${escapeHtml13(fmtTimestamp(rec.at))}</div>
107338
+ )} \xB7 ${escapeHtml14(fmtTimestamp(rec.at))}</div>
107110
107339
  </li>`;
107111
107340
  }).join("");
107112
107341
  historyEmpty.style.display = auditLog.length ? "none" : "";
@@ -108168,6 +108397,207 @@ function renderGatedMoney(params, renderers) {
108168
108397
  return renderers.renderCoverage(routing.coverageOverlay);
108169
108398
  }
108170
108399
 
108400
+ // src/components/financial-goals/tariffValuation.ts
108401
+ var MONEY_HOURLY_MAX_DAYS = 31;
108402
+ var TARIFF_DEFAULT_TIMEZONE = "America/Sao_Paulo";
108403
+ var HOUR_MS2 = 36e5;
108404
+ var QTY_SCALE = 6;
108405
+ var PRICE_SCALE = 6;
108406
+ var AMOUNT_SCALE = QTY_SCALE + PRICE_SCALE;
108407
+ var DECIMAL_RE = /^([+-]?)(\d+)(?:\.(\d+))?$/;
108408
+ function parseScaled(s, scale) {
108409
+ const m = DECIMAL_RE.exec(String(s).trim());
108410
+ if (!m) return null;
108411
+ const frac = (m[3] || "").slice(0, scale).padEnd(scale, "0");
108412
+ const v = BigInt(m[2] + frac);
108413
+ return m[1] === "-" ? -v : v;
108414
+ }
108415
+ function formatScaled(v, scale) {
108416
+ const neg = v < 0n;
108417
+ const abs = neg ? -v : v;
108418
+ const digits = abs.toString().padStart(scale + 1, "0");
108419
+ const int = digits.slice(0, digits.length - scale);
108420
+ let frac = digits.slice(digits.length - scale).replace(/0+$/, "");
108421
+ if (frac.length < 2) frac = frac.padEnd(2, "0");
108422
+ const isZero = abs === 0n;
108423
+ return `${neg && !isZero ? "-" : ""}${int}.${frac}`;
108424
+ }
108425
+ function qtyToScaled(qty) {
108426
+ if (typeof qty !== "number" || !Number.isFinite(qty) || Math.abs(qty) >= 1e15) return null;
108427
+ return parseScaled(qty.toFixed(QTY_SCALE), QTY_SCALE);
108428
+ }
108429
+ function isPriceString(p) {
108430
+ return typeof p === "string" && DECIMAL_RE.test(p.trim());
108431
+ }
108432
+ function makeLocalPartsFn(timezone) {
108433
+ let fmt2 = null;
108434
+ try {
108435
+ fmt2 = new Intl.DateTimeFormat("en-US", {
108436
+ timeZone: timezone,
108437
+ year: "numeric",
108438
+ month: "2-digit",
108439
+ day: "2-digit",
108440
+ hour: "2-digit",
108441
+ hourCycle: "h23"
108442
+ });
108443
+ } catch {
108444
+ fmt2 = null;
108445
+ }
108446
+ return (ts) => {
108447
+ if (fmt2) {
108448
+ const out = {};
108449
+ for (const p of fmt2.formatToParts(new Date(ts))) {
108450
+ if (p.type === "year" || p.type === "month" || p.type === "day" || p.type === "hour") {
108451
+ out[p.type] = Number(p.value);
108452
+ }
108453
+ }
108454
+ return { year: out.year, month: out.month, day: out.day, hour: out.hour % 24 };
108455
+ }
108456
+ const d = new Date(ts - 3 * HOUR_MS2);
108457
+ return { year: d.getUTCFullYear(), month: d.getUTCMonth() + 1, day: d.getUTCDate(), hour: d.getUTCHours() };
108458
+ };
108459
+ }
108460
+ var pad24 = (n) => String(n).padStart(2, "0");
108461
+ function nodePrice(node) {
108462
+ return node && isPriceString(node.price) ? node.price.trim() : null;
108463
+ }
108464
+ function hourPrice(dayNode, hour) {
108465
+ const hourly = dayNode?.hourly;
108466
+ if (!hourly) return null;
108467
+ return nodePrice(hourly[String(hour)]) ?? nodePrice(hourly[pad24(hour)]);
108468
+ }
108469
+ function resolveTreePrice(tree, p) {
108470
+ const mm = pad24(p.month);
108471
+ const dd = pad24(p.day);
108472
+ const mmdd = `${mm}-${dd}`;
108473
+ const monthNode = tree.monthly?.[mm];
108474
+ const dayNodes = [tree.daily?.[mmdd], monthNode?.daily?.[dd], monthNode?.daily?.[mmdd]];
108475
+ for (const dn of dayNodes) {
108476
+ const hp = hourPrice(dn, p.hour);
108477
+ if (hp) return hp;
108478
+ }
108479
+ for (const dn of dayNodes) {
108480
+ const dp = nodePrice(dn);
108481
+ if (dp) return dp;
108482
+ }
108483
+ return nodePrice(monthNode) ?? nodePrice(tree.annual);
108484
+ }
108485
+ function createTariffValuator(options) {
108486
+ const trees = options?.trees || {};
108487
+ const localParts = makeLocalPartsFn(options?.timezone || TARIFF_DEFAULT_TIMEZONE);
108488
+ const byYear = {};
108489
+ Object.keys(trees).forEach((cat) => {
108490
+ const map = /* @__PURE__ */ new Map();
108491
+ for (const res of trees[cat] || []) {
108492
+ if (res && typeof res.year === "number" && res.tree) map.set(res.year, res.tree);
108493
+ }
108494
+ byYear[cat] = map;
108495
+ });
108496
+ function hasAnyTariff(category) {
108497
+ const map = byYear[category];
108498
+ return !!map && map.size > 0;
108499
+ }
108500
+ function priceAt(category, ts) {
108501
+ const map = byYear[category];
108502
+ if (!map || !Number.isFinite(ts)) return null;
108503
+ const p = localParts(ts);
108504
+ const tree = map.get(p.year);
108505
+ return tree ? resolveTreePrice(tree, p) : null;
108506
+ }
108507
+ function pricesInside(category, startTs, endTs) {
108508
+ const out = [];
108509
+ const end = Math.max(endTs, startTs + 1);
108510
+ for (let t = startTs; t < end; t += HOUR_MS2) out.push(priceAt(category, t));
108511
+ return out;
108512
+ }
108513
+ function valuate(series, opts) {
108514
+ const needsHourlyReason = opts?.intradayLimited ? "intraday-tariff-long-period" : "needs-hourly";
108515
+ const category = series?.category ?? null;
108516
+ if (!category) return { state: "uncategorized", reason: "no-category" };
108517
+ if (!hasAnyTariff(category)) return { state: "none", reason: "no-tariff", coveredRatio: 0 };
108518
+ const buckets = Array.isArray(series.buckets) ? series.buckets : [];
108519
+ if (buckets.length === 0) return { state: "none", reason: "no-data", coveredRatio: 0 };
108520
+ let acc = 0n;
108521
+ let covered = 0;
108522
+ let firstReason;
108523
+ const distinct = /* @__PURE__ */ new Set();
108524
+ for (const b of buckets) {
108525
+ const qty = qtyToScaled(b?.qty);
108526
+ if (qty == null || !Number.isFinite(b.startTs) || !Number.isFinite(b.endTs)) {
108527
+ firstReason = firstReason || "invalid-qty";
108528
+ continue;
108529
+ }
108530
+ const prices = pricesInside(category, b.startTs, b.endTs);
108531
+ if (prices.some((p) => p == null)) {
108532
+ firstReason = firstReason || "no-tariff";
108533
+ continue;
108534
+ }
108535
+ const unique = new Set(prices);
108536
+ if (unique.size > 1) {
108537
+ firstReason = firstReason || needsHourlyReason;
108538
+ continue;
108539
+ }
108540
+ const price = prices[0];
108541
+ const scaledPrice = parseScaled(price, PRICE_SCALE);
108542
+ if (scaledPrice == null) {
108543
+ firstReason = firstReason || "no-tariff";
108544
+ continue;
108545
+ }
108546
+ distinct.add(formatScaled(scaledPrice, PRICE_SCALE));
108547
+ acc += qty * scaledPrice;
108548
+ covered += 1;
108549
+ }
108550
+ const ratio = covered / buckets.length;
108551
+ const priceVaries = distinct.size > 1;
108552
+ if (covered === buckets.length) {
108553
+ return { state: "complete", amount: formatScaled(acc, AMOUNT_SCALE), coveredRatio: 1, priceVaries };
108554
+ }
108555
+ if (covered === 0) return { state: "none", reason: firstReason || "no-tariff", coveredRatio: 0 };
108556
+ return { state: "partial", reason: firstReason, coveredRatio: ratio, priceVaries };
108557
+ }
108558
+ function sum2(list) {
108559
+ const items = Array.isArray(list) ? list : [];
108560
+ const total = items.length;
108561
+ if (total === 0) return { state: "none", covered: 0, total: 0 };
108562
+ let acc = 0n;
108563
+ let covered = 0;
108564
+ for (const m of items) {
108565
+ if (m?.state !== "complete" || m.amount == null) continue;
108566
+ const v = parseScaled(m.amount, AMOUNT_SCALE);
108567
+ if (v == null) continue;
108568
+ acc += v;
108569
+ covered += 1;
108570
+ }
108571
+ if (covered === total) return { state: "complete", amount: formatScaled(acc, AMOUNT_SCALE), covered, total };
108572
+ return { state: covered > 0 ? "partial" : "none", covered, total };
108573
+ }
108574
+ function chooseGranularity(categories, startTs, endTs) {
108575
+ const cats = Array.from(new Set((categories || []).filter(Boolean)));
108576
+ let intraday = false;
108577
+ outer: for (const cat of cats) {
108578
+ let dayKey = "";
108579
+ let dayPrice;
108580
+ for (let t = startTs; t < endTs; t += HOUR_MS2) {
108581
+ const p = localParts(t);
108582
+ const key = `${p.year}-${p.month}-${p.day}`;
108583
+ const price = priceAt(cat, t);
108584
+ if (key !== dayKey) {
108585
+ dayKey = key;
108586
+ dayPrice = price;
108587
+ } else if (price !== dayPrice) {
108588
+ intraday = true;
108589
+ break outer;
108590
+ }
108591
+ }
108592
+ }
108593
+ if (!intraday) return { granularity: "1d", intradayLimited: false };
108594
+ const days = (endTs - startTs) / (24 * HOUR_MS2);
108595
+ if (days <= MONEY_HOURLY_MAX_DAYS) return { granularity: "1h", intradayLimited: false };
108596
+ return { granularity: "1d", intradayLimited: true };
108597
+ }
108598
+ return { priceAt, valuate, sum: sum2, chooseGranularity };
108599
+ }
108600
+
108171
108601
  // src/components/premium-modals/measurement-setup/types.ts
108172
108602
  var WATER_UNITS = [
108173
108603
  { value: "m3", label: "Metros C\xFAbicos (m\xB3)" },
@@ -115442,11 +115872,11 @@ function refreshIncidentBadges(opts) {
115442
115872
  }
115443
115873
 
115444
115874
  // src/components/premium-modals/standard-modal/openStandardModal.ts
115445
- var STYLE_ID13 = "myio-stdmodal-styles";
115875
+ var STYLE_ID14 = "myio-stdmodal-styles";
115446
115876
  var FONT_LINK_ID3 = "myio-dialog-font-nunito";
115447
115877
  var BASE_Z_INDEX3 = 10700;
115448
115878
  var openCount3 = 0;
115449
- function escapeHtml14(v) {
115879
+ function escapeHtml15(v) {
115450
115880
  return String(v).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
115451
115881
  }
115452
115882
  function injectStyles13() {
@@ -115457,9 +115887,9 @@ function injectStyles13() {
115457
115887
  link.href = "https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap";
115458
115888
  document.head.appendChild(link);
115459
115889
  }
115460
- if (document.getElementById(STYLE_ID13)) return;
115890
+ if (document.getElementById(STYLE_ID14)) return;
115461
115891
  const style = document.createElement("style");
115462
- style.id = STYLE_ID13;
115892
+ style.id = STYLE_ID14;
115463
115893
  style.textContent = `
115464
115894
  .myio-stdmodal-overlay {
115465
115895
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
@@ -115500,10 +115930,10 @@ function openStandardModal(params) {
115500
115930
  overlay.className = "myio-stdmodal-overlay";
115501
115931
  overlay.style.zIndex = String(BASE_Z_INDEX3 + openCount3);
115502
115932
  overlay.innerHTML = `
115503
- <div class="myio-stdmodal" role="dialog" aria-modal="true" aria-label="${escapeHtml14(params.title)}" style="width:${width}">
115933
+ <div class="myio-stdmodal" role="dialog" aria-modal="true" aria-label="${escapeHtml15(params.title)}" style="width:${width}">
115504
115934
  ${ModalHeader.generateHTML({
115505
115935
  icon: params.icon,
115506
- title: escapeHtml14(params.title),
115936
+ title: escapeHtml15(params.title),
115507
115937
  modalId,
115508
115938
  showThemeToggle: false,
115509
115939
  showMaximize: false,
@@ -115512,7 +115942,7 @@ function openStandardModal(params) {
115512
115942
  })}
115513
115943
  <div class="myio-stdmodal__body"></div>
115514
115944
  ${buttons.length ? `<div class="myio-stdmodal__footer">${buttons.map(
115515
- (b, i) => `<button type="button" class="myio-stdmodal__btn myio-stdmodal__btn--${b.variant ?? "secondary"}" data-index="${i}" data-value="${escapeHtml14(b.value)}">${escapeHtml14(b.label)}</button>`
115945
+ (b, i) => `<button type="button" class="myio-stdmodal__btn myio-stdmodal__btn--${b.variant ?? "secondary"}" data-index="${i}" data-value="${escapeHtml15(b.value)}">${escapeHtml15(b.label)}</button>`
115516
115946
  ).join("")}</div>` : ""}
115517
115947
  </div>`;
115518
115948
  const root = overlay.querySelector(".myio-stdmodal");
@@ -115593,7 +116023,7 @@ var VALUE_COLUMN = {
115593
116023
  };
115594
116024
  var MAX_IMPORT_ROWS = 5e3;
115595
116025
  var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
115596
- var pad24 = (n) => String(n).padStart(2, "0");
116026
+ var pad25 = (n) => String(n).padStart(2, "0");
115597
116027
  function isImportableKey(d) {
115598
116028
  const slave = Number(d?.slaveId);
115599
116029
  return !!d?.centralId && UUID_RE.test(String(d.centralId)) && Number.isInteger(slave) && slave >= 1;
@@ -115611,14 +116041,14 @@ function daysBetween(start, end) {
115611
116041
  const cur = new Date(Date.UTC(y1, m1 - 1, d1));
115612
116042
  const last = Date.UTC(y2, m2 - 1, d2);
115613
116043
  while (cur.getTime() <= last && out.length < 400) {
115614
- out.push(`${cur.getUTCFullYear()}-${pad24(cur.getUTCMonth() + 1)}-${pad24(cur.getUTCDate())}`);
116044
+ out.push(`${cur.getUTCFullYear()}-${pad25(cur.getUTCMonth() + 1)}-${pad25(cur.getUTCDate())}`);
115615
116045
  cur.setUTCDate(cur.getUTCDate() + 1);
115616
116046
  }
115617
116047
  return out;
115618
116048
  }
115619
116049
  function nowSaoPaulo(now) {
115620
116050
  const d = new Date(now - 3 * 3600 * 1e3);
115621
- return { date: `${d.getUTCFullYear()}-${pad24(d.getUTCMonth() + 1)}-${pad24(d.getUTCDate())}`, hour: d.getUTCHours() };
116051
+ return { date: `${d.getUTCFullYear()}-${pad25(d.getUTCMonth() + 1)}-${pad25(d.getUTCDate())}`, hour: d.getUTCHours() };
115622
116052
  }
115623
116053
  function buildTemplateCsv(domain, devices, start, end, now = Date.now()) {
115624
116054
  const valueCol = VALUE_COLUMN[domain];
@@ -115633,7 +116063,7 @@ function buildTemplateCsv(domain, devices, start, end, now = Date.now()) {
115633
116063
  if (date > today.date) break;
115634
116064
  for (let h3 = 0; h3 < 24; h3++) {
115635
116065
  if (date === today.date && h3 >= today.hour) break;
115636
- const cols = [String(dev.centralId), String(Number(dev.slaveId)), esc10(dev.label || ""), date, `${pad24(h3)}:00`, ""];
116066
+ const cols = [String(dev.centralId), String(Number(dev.slaveId)), esc10(dev.label || ""), date, `${pad25(h3)}:00`, ""];
115637
116067
  if (domain === "energy") cols.push("");
115638
116068
  lines.push(cols.join(";"));
115639
116069
  }
@@ -115678,26 +116108,26 @@ function parseCsv(text2) {
115678
116108
  function normalizeDate(v) {
115679
116109
  if (typeof v === "number" && Number.isFinite(v) && v > 2e4 && v < 8e4) {
115680
116110
  const d = new Date(Date.UTC(1899, 11, 30) + Math.floor(v) * 864e5);
115681
- return `${d.getUTCFullYear()}-${pad24(d.getUTCMonth() + 1)}-${pad24(d.getUTCDate())}`;
116111
+ return `${d.getUTCFullYear()}-${pad25(d.getUTCMonth() + 1)}-${pad25(d.getUTCDate())}`;
115682
116112
  }
115683
116113
  const s = String(v ?? "").trim();
115684
116114
  let m = /^(\d{4})-(\d{1,2})-(\d{1,2})$/.exec(s);
115685
- if (m) return `${m[1]}-${pad24(+m[2])}-${pad24(+m[3])}`;
116115
+ if (m) return `${m[1]}-${pad25(+m[2])}-${pad25(+m[3])}`;
115686
116116
  m = /^(\d{1,2})\/(\d{1,2})\/(\d{4})$/.exec(s);
115687
- if (m) return `${m[3]}-${pad24(+m[2])}-${pad24(+m[1])}`;
116117
+ if (m) return `${m[3]}-${pad25(+m[2])}-${pad25(+m[1])}`;
115688
116118
  return null;
115689
116119
  }
115690
116120
  function normalizeHour(v) {
115691
116121
  if (typeof v === "number" && Number.isFinite(v) && v >= 0 && v < 1) {
115692
116122
  const mins = Math.round(v * 24 * 60);
115693
- return mins % 60 === 0 ? `${pad24(mins / 60)}:00` : null;
116123
+ return mins % 60 === 0 ? `${pad25(mins / 60)}:00` : null;
115694
116124
  }
115695
116125
  const s = String(v ?? "").trim();
115696
116126
  const m = /^(\d{1,2})(?::(\d{2})(?::(\d{2}))?)?$/.exec(s);
115697
116127
  if (!m) return null;
115698
116128
  const h3 = Number(m[1]);
115699
116129
  if (h3 > 23 || Number(m[2] || 0) !== 0 || Number(m[3] || 0) !== 0) return null;
115700
- return `${pad24(h3)}:00`;
116130
+ return `${pad25(h3)}:00`;
115701
116131
  }
115702
116132
  function parseDecimal(v) {
115703
116133
  if (typeof v === "number") return Number.isFinite(v) ? v : NaN;
@@ -115806,7 +116236,7 @@ var TOTAL_COLUMN = {
115806
116236
  var ACCUMULATED_SOURCE_PREFIX = "acumulado";
115807
116237
  var MAX_PERIOD_DAYS = 366;
115808
116238
  var MILLI = 1e3;
115809
- var pad25 = (n) => String(n).padStart(2, "0");
116239
+ var pad26 = (n) => String(n).padStart(2, "0");
115810
116240
  function closedHoursInPeriod(start, end, now = Date.now()) {
115811
116241
  const today = nowSaoPaulo(now);
115812
116242
  const out = [];
@@ -115879,7 +116309,7 @@ function accumulatedRows(domain, entries, profile = DEFAULT_DISTRIBUTION_PROFILE
115879
116309
  gateway_id: e.gateway_id,
115880
116310
  slave_id: e.slave_id,
115881
116311
  date: slots[i].date,
115882
- hour: `${pad25(slots[i].hour)}:00`,
116312
+ hour: `${pad26(slots[i].hour)}:00`,
115883
116313
  [valueCol]: value
115884
116314
  });
115885
116315
  });
@@ -116086,15 +116516,15 @@ function fmtSaoPaulo(iso) {
116086
116516
  const p = (n) => String(n).padStart(2, "0");
116087
116517
  return `${p(d.getUTCDate())}/${p(d.getUTCMonth() + 1)}/${d.getUTCFullYear()} ${p(d.getUTCHours())}:00`;
116088
116518
  }
116089
- var STYLE_ID14 = "myio-tlmimport-styles";
116519
+ var STYLE_ID15 = "myio-tlmimport-styles";
116090
116520
  function esc9(v) {
116091
116521
  return String(v ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
116092
116522
  }
116093
116523
  var fmtNum = (n, d = 0) => Number.isFinite(Number(n)) ? Number(n).toLocaleString("pt-BR", { minimumFractionDigits: d, maximumFractionDigits: d }) : "\u2014";
116094
116524
  function injectStyles14() {
116095
- if (document.getElementById(STYLE_ID14)) return;
116525
+ if (document.getElementById(STYLE_ID15)) return;
116096
116526
  const style = document.createElement("style");
116097
- style.id = STYLE_ID14;
116527
+ style.id = STYLE_ID15;
116098
116528
  style.textContent = `
116099
116529
  .tlmi { --tlmi-ac: #3e1a7d; --tlmi-ac-soft: #f1ecfa; --tlmi-ok: #16a34a; --tlmi-warn: #d97706; --tlmi-err: #dc2626;
116100
116530
  display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: #1e293b; }
@@ -116845,14 +117275,14 @@ var DOMAIN_TEXT2 = {
116845
117275
  energy: { title: "Novo medidor de energia manual", icon: "\u26A1", noun: "Medidor de energia" },
116846
117276
  water: { title: "Novo hidr\xF4metro manual", icon: "\u{1F4A7}", noun: "Hidr\xF4metro" }
116847
117277
  };
116848
- var STYLE_ID15 = "myio-manualdev-styles";
116849
- function escapeHtml15(v) {
117278
+ var STYLE_ID16 = "myio-manualdev-styles";
117279
+ function escapeHtml16(v) {
116850
117280
  return String(v ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
116851
117281
  }
116852
117282
  function injectStyles15() {
116853
- if (document.getElementById(STYLE_ID15)) return;
117283
+ if (document.getElementById(STYLE_ID16)) return;
116854
117284
  const style = document.createElement("style");
116855
- style.id = STYLE_ID15;
117285
+ style.id = STYLE_ID16;
116856
117286
  style.textContent = `
116857
117287
  .myio-manualdev { display: flex; flex-direction: column; gap: 16px; }
116858
117288
  .myio-manualdev__hint { margin: 0; font-size: 13px; color: #6b7280; line-height: 1.5; }
@@ -116907,18 +117337,18 @@ function formHtml(domain, values, error, detail) {
116907
117337
  return `
116908
117338
  <form class="myio-manualdev" novalidate>
116909
117339
  <p class="myio-manualdev__hint">Cadastre um ponto de leitura manual. Ele aparece nesta lista e n\xE3o entra nos totais nem nos relat\xF3rios.</p>
116910
- <span class="myio-manualdev__type">${t.icon} ${escapeHtml15(t.noun)} manual</span>
117340
+ <span class="myio-manualdev__type">${t.icon} ${escapeHtml16(t.noun)} manual</span>
116911
117341
  <label class="myio-manualdev__field">
116912
117342
  <span class="myio-manualdev__label">Etiqueta</span>
116913
117343
  <input class="myio-manualdev__input" name="label" maxlength="80" autocomplete="off"
116914
- placeholder="Ex.: Burger King" value="${escapeHtml15(values.label)}" />
117344
+ placeholder="Ex.: Burger King" value="${escapeHtml16(values.label)}" />
116915
117345
  </label>
116916
117346
  <label class="myio-manualdev__field">
116917
117347
  <span class="myio-manualdev__label">Identificador</span>
116918
117348
  <input class="myio-manualdev__input" name="identifier" maxlength="40" autocomplete="off"
116919
- placeholder="Ex.: STB01010" value="${escapeHtml15(values.identifier)}" />
117349
+ placeholder="Ex.: STB01010" value="${escapeHtml16(values.identifier)}" />
116920
117350
  </label>
116921
- ${error ? `<p class="myio-manualdev__error" role="alert">${escapeHtml15(error)}${detail ? `<small class="myio-manualdev__detail">${escapeHtml15(detail)}</small>` : ""}</p>` : ""}
117351
+ ${error ? `<p class="myio-manualdev__error" role="alert">${escapeHtml16(error)}${detail ? `<small class="myio-manualdev__detail">${escapeHtml16(detail)}</small>` : ""}</p>` : ""}
116922
117352
  <button type="submit" hidden></button>
116923
117353
  </form>`;
116924
117354
  }
@@ -116926,13 +117356,13 @@ function successHtml(domain, r, tech) {
116926
117356
  return `
116927
117357
  <div class="myio-manualdev__ok">
116928
117358
  <div class="myio-manualdev__ok-icon">\u2705</div>
116929
- <p class="myio-manualdev__ok-title">${escapeHtml15(DOMAIN_TEXT2[domain].noun)} criado</p>
116930
- <p class="myio-manualdev__ok-text"><strong>${escapeHtml15(r.label)}</strong> \xB7 ${escapeHtml15(r.identifier)}</p>
117359
+ <p class="myio-manualdev__ok-title">${escapeHtml16(DOMAIN_TEXT2[domain].noun)} criado</p>
117360
+ <p class="myio-manualdev__ok-text"><strong>${escapeHtml16(r.label)}</strong> \xB7 ${escapeHtml16(r.identifier)}</p>
116931
117361
  ${tech ? `<div class="myio-manualdev__tech">
116932
- device <code>${escapeHtml15(r.name)}</code><br/>
116933
- profile <code>${escapeHtml15(r.deviceProfile)}</code><br/>
116934
- asset <code>${escapeHtml15(r.assetName)}</code><br/>
116935
- id <code>${escapeHtml15(r.deviceId)}</code>
117362
+ device <code>${escapeHtml16(r.name)}</code><br/>
117363
+ profile <code>${escapeHtml16(r.deviceProfile)}</code><br/>
117364
+ asset <code>${escapeHtml16(r.assetName)}</code><br/>
117365
+ id <code>${escapeHtml16(r.deviceId)}</code>
116936
117366
  </div>` : ""}
116937
117367
  </div>`;
116938
117368
  }
@@ -116947,20 +117377,20 @@ var STEP_ICON = {
116947
117377
  };
116948
117378
  function stepsHtml(steps) {
116949
117379
  return `<ol class="myio-manualdev__steps">${steps.map(
116950
- (s) => `<li class="myio-manualdev__step" data-status="${escapeHtml15(s.status)}">
117380
+ (s) => `<li class="myio-manualdev__step" data-status="${escapeHtml16(s.status)}">
116951
117381
  <span aria-hidden="true">${STEP_ICON[s.status] || "\u25CB"}</span>
116952
- <span class="myio-manualdev__step-sys">${escapeHtml15(s.system)}</span>
116953
- <span>${escapeHtml15(s.title)}${s.message ? `<small class="myio-manualdev__step-msg">${escapeHtml15(s.message)}</small>` : ""}</span>
117382
+ <span class="myio-manualdev__step-sys">${escapeHtml16(s.system)}</span>
117383
+ <span>${escapeHtml16(s.title)}${s.message ? `<small class="myio-manualdev__step-msg">${escapeHtml16(s.message)}</small>` : ""}</span>
116954
117384
  </li>`
116955
117385
  ).join("")}</ol>`;
116956
117386
  }
116957
117387
  function notesHtml(plan) {
116958
- const block = (plan.blockers || []).map((b) => `<p class="myio-manualdev__note myio-manualdev__note--block" role="alert">\u26D4 ${escapeHtml15(b)}</p>`);
116959
- const warn = (plan.warnings || []).map((w) => `<p class="myio-manualdev__note myio-manualdev__note--warn">\u26A0\uFE0F ${escapeHtml15(w)}</p>`);
117388
+ const block = (plan.blockers || []).map((b) => `<p class="myio-manualdev__note myio-manualdev__note--block" role="alert">\u26D4 ${escapeHtml16(b)}</p>`);
117389
+ const warn = (plan.warnings || []).map((w) => `<p class="myio-manualdev__note myio-manualdev__note--warn">\u26A0\uFE0F ${escapeHtml16(w)}</p>`);
116960
117390
  return [...block, ...warn].join("");
116961
117391
  }
116962
117392
  function rowsHtml(rows) {
116963
- return `<table class="myio-manualdev__summary"><tbody>${rows.map((r) => `<tr><th>${escapeHtml15(r.label)}</th><td>${escapeHtml15(r.value)}</td></tr>`).join("")}</tbody></table>`;
117393
+ return `<table class="myio-manualdev__summary"><tbody>${rows.map((r) => `<tr><th>${escapeHtml16(r.label)}</th><td>${escapeHtml16(r.value)}</td></tr>`).join("")}</tbody></table>`;
116964
117394
  }
116965
117395
  function moreHtml(inner, open = false) {
116966
117396
  return `<details class="myio-manualdev__more"${open ? " open" : ""}>
@@ -116980,7 +117410,7 @@ function planHtml(plan) {
116980
117410
  function progressHtml(steps, message, ok, open = false) {
116981
117411
  return `
116982
117412
  <div class="myio-manualdev">
116983
- ${ok === void 0 ? '<p class="myio-manualdev__hint">Criando o dispositivo\u2026 n\xE3o feche esta janela.</p>' : `<p class="myio-manualdev__note ${ok ? "myio-manualdev__note--warn" : "myio-manualdev__note--block"}" role="status">${escapeHtml15(
117413
+ ${ok === void 0 ? '<p class="myio-manualdev__hint">Criando o dispositivo\u2026 n\xE3o feche esta janela.</p>' : `<p class="myio-manualdev__note ${ok ? "myio-manualdev__note--warn" : "myio-manualdev__note--block"}" role="status">${escapeHtml16(
116984
117414
  message || (ok ? "Conclu\xEDdo com avisos." : "N\xE3o foi poss\xEDvel concluir.")
116985
117415
  )}</p>`}
116986
117416
  ${moreHtml(stepsHtml(steps), open)}
@@ -119254,9 +119684,9 @@ function openMyioGcdrLoginModal(options) {
119254
119684
  }
119255
119685
 
119256
119686
  // src/components/img-gallery/ScrollableTabs.ts
119257
- var STYLE_ID16 = "myio-tabs-styles";
119687
+ var STYLE_ID17 = "myio-tabs-styles";
119258
119688
  var FONT_LINK_ID4 = "myio-dialog-font-nunito";
119259
- function escapeHtml16(value) {
119689
+ function escapeHtml17(value) {
119260
119690
  return String(value).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
119261
119691
  }
119262
119692
  function injectStyles16() {
@@ -119267,9 +119697,9 @@ function injectStyles16() {
119267
119697
  link.href = "https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap";
119268
119698
  document.head.appendChild(link);
119269
119699
  }
119270
- if (document.getElementById(STYLE_ID16)) return;
119700
+ if (document.getElementById(STYLE_ID17)) return;
119271
119701
  const style = document.createElement("style");
119272
- style.id = STYLE_ID16;
119702
+ style.id = STYLE_ID17;
119273
119703
  style.textContent = `
119274
119704
  .myio-tabs {
119275
119705
  display: flex;
@@ -119392,7 +119822,7 @@ function createScrollableTabs(options) {
119392
119822
  btn.setAttribute("role", "tab");
119393
119823
  btn.dataset.key = t.key;
119394
119824
  if (t.disabled) btn.disabled = true;
119395
- btn.innerHTML = `${t.icon ? `<span aria-hidden="true">${t.icon}</span>` : ""}<span>${escapeHtml16(t.label)}</span>`;
119825
+ btn.innerHTML = `${t.icon ? `<span aria-hidden="true">${t.icon}</span>` : ""}<span>${escapeHtml17(t.label)}</span>`;
119396
119826
  styleTab(btn, t.key === active);
119397
119827
  btn.addEventListener("click", () => {
119398
119828
  if (t.disabled || t.key === active) return;
@@ -119477,9 +119907,9 @@ function createScrollableTabs(options) {
119477
119907
  }
119478
119908
 
119479
119909
  // src/components/img-gallery/ImgGallery.ts
119480
- var STYLE_ID17 = "myio-gallery-styles";
119910
+ var STYLE_ID18 = "myio-gallery-styles";
119481
119911
  var FONT_LINK_ID5 = "myio-dialog-font-nunito";
119482
- function escapeHtml17(value) {
119912
+ function escapeHtml18(value) {
119483
119913
  return String(value == null ? "" : value).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
119484
119914
  }
119485
119915
  var PRM = () => typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
@@ -119491,9 +119921,9 @@ function injectStyles17() {
119491
119921
  link.href = "https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap";
119492
119922
  document.head.appendChild(link);
119493
119923
  }
119494
- if (document.getElementById(STYLE_ID17)) return;
119924
+ if (document.getElementById(STYLE_ID18)) return;
119495
119925
  const style = document.createElement("style");
119496
- style.id = STYLE_ID17;
119926
+ style.id = STYLE_ID18;
119497
119927
  style.textContent = `
119498
119928
  .myio-gallery {
119499
119929
  font-family: 'Nunito', system-ui, sans-serif;
@@ -119703,10 +120133,10 @@ function createImgGallery(options) {
119703
120133
  root.appendChild(grid);
119704
120134
  function detailsHtml(img) {
119705
120135
  const lines = [];
119706
- if (img.filename) lines.push(`<span title="${escapeHtml17(img.filename)}">${escapeHtml17(img.filename)}</span>`);
119707
- if (typeof img.sizeBytes === "number") lines.push(`<span>${escapeHtml17(formatSize(img.sizeBytes))}</span>`);
120136
+ if (img.filename) lines.push(`<span title="${escapeHtml18(img.filename)}">${escapeHtml18(img.filename)}</span>`);
120137
+ if (typeof img.sizeBytes === "number") lines.push(`<span>${escapeHtml18(formatSize(img.sizeBytes))}</span>`);
119708
120138
  const dims = typeof img.width === "number" && typeof img.height === "number" ? `${img.width} \xD7 ${img.height}px` : "";
119709
- lines.push(`<span data-dims>${escapeHtml17(dims)}</span>`);
120139
+ lines.push(`<span data-dims>${escapeHtml18(dims)}</span>`);
119710
120140
  return lines.join("");
119711
120141
  }
119712
120142
  function renderDescription(body, img, index) {
@@ -134212,7 +134642,7 @@ function createCustomerCardV1(params) {
134212
134642
  }
134213
134643
 
134214
134644
  // src/components/cards/customer-goals/v1.0.0/styles.ts
134215
- var STYLE_ID18 = "myio-customer-goals-card-css";
134645
+ var STYLE_ID19 = "myio-customer-goals-card-css";
134216
134646
  var CSS4 = `
134217
134647
  .myio-cgc{
134218
134648
  --cgc-surface:#ffffff;
@@ -134313,9 +134743,9 @@ var CSS4 = `
134313
134743
  `;
134314
134744
  function injectCustomerGoalsCardStyles() {
134315
134745
  if (typeof document === "undefined") return;
134316
- if (document.getElementById(STYLE_ID18)) return;
134746
+ if (document.getElementById(STYLE_ID19)) return;
134317
134747
  const tag = document.createElement("style");
134318
- tag.id = STYLE_ID18;
134748
+ tag.id = STYLE_ID19;
134319
134749
  tag.textContent = CSS4;
134320
134750
  document.head.appendChild(tag);
134321
134751
  }
@@ -137165,7 +137595,7 @@ var WATER_FIXTURES = {
137165
137595
  var DEFAULT_FIXTURES = ENERGY_FIXTURES;
137166
137596
 
137167
137597
  // src/components/metas-guide/openMetasGuide.ts
137168
- var STYLE_ID19 = "myio-metas-guide-styles";
137598
+ var STYLE_ID20 = "myio-metas-guide-styles";
137169
137599
  var ROOT_ID = "myio-metas-guide-root";
137170
137600
  var FALLBACK_THEME = {
137171
137601
  accent: "#6c5ce7",
@@ -137173,7 +137603,7 @@ var FALLBACK_THEME = {
137173
137603
  accentText: "#ffffff",
137174
137604
  mode: "light"
137175
137605
  };
137176
- function escapeHtml18(value) {
137606
+ function escapeHtml19(value) {
137177
137607
  return String(value ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
137178
137608
  }
137179
137609
  var nfInt = new Intl.NumberFormat("pt-BR", { maximumFractionDigits: 0 });
@@ -137201,7 +137631,7 @@ function legendHtml() {
137201
137631
  [SERIES_COLORS.orcado, "Or\xE7ado"]
137202
137632
  ];
137203
137633
  return `<div class="myio-mg-legend">${items.map(
137204
- ([c, l]) => `<span class="myio-mg-legend__item"><span class="myio-mg-legend__dot" style="background:${c}" aria-hidden="true"></span>${escapeHtml18(
137634
+ ([c, l]) => `<span class="myio-mg-legend__item"><span class="myio-mg-legend__dot" style="background:${c}" aria-hidden="true"></span>${escapeHtml19(
137205
137635
  l
137206
137636
  )}</span>`
137207
137637
  ).join("")}</div>`;
@@ -137241,7 +137671,7 @@ function miniChartSvg(s) {
137241
137671
  const pts = data.map((v, i) => `${(i * bandW + bandW / 2).toFixed(1)},${y(v).toFixed(1)}`).join(" ");
137242
137672
  return `<polyline points="${pts}" fill="none" stroke="${color}" stroke-width="2" stroke-linejoin="round" stroke-linecap="round"></polyline>`;
137243
137673
  };
137244
- return `<svg class="myio-mg-chart" viewBox="0 0 ${W} ${H}" role="img" aria-label="Gr\xE1fico ilustrativo de ${escapeHtml18(
137674
+ return `<svg class="myio-mg-chart" viewBox="0 0 ${W} ${H}" role="img" aria-label="Gr\xE1fico ilustrativo de ${escapeHtml19(
137245
137675
  s.name
137246
137676
  )}" preserveAspectRatio="none">
137247
137677
  ${bars}
@@ -137258,8 +137688,8 @@ function kpiRowHtml(s, unit) {
137258
137688
  ];
137259
137689
  return `<div class="myio-mg-kpis">${kpis.map(
137260
137690
  ([label, val, color]) => `<div class="myio-mg-kpi">
137261
- <span class="myio-mg-kpi__label" style="color:${color}">${escapeHtml18(label)}</span>
137262
- <span class="myio-mg-kpi__value">${fmtInt(val)} <small>${escapeHtml18(unit)}</small></span>
137691
+ <span class="myio-mg-kpi__label" style="color:${color}">${escapeHtml19(label)}</span>
137692
+ <span class="myio-mg-kpi__value">${fmtInt(val)} <small>${escapeHtml19(unit)}</small></span>
137263
137693
  </div>`
137264
137694
  ).join("")}</div>`;
137265
137695
  }
@@ -137267,7 +137697,7 @@ function chipsHtml(s) {
137267
137697
  const c = computeChips(s);
137268
137698
  const chip = (label, ratio) => {
137269
137699
  const cls = ratio > 0 ? "is-up" : ratio < 0 ? "is-down" : "is-flat";
137270
- return `<span class="myio-mg-chip ${cls}">${escapeHtml18(label)} <strong>${escapeHtml18(
137700
+ return `<span class="myio-mg-chip ${cls}">${escapeHtml19(label)} <strong>${escapeHtml19(
137271
137701
  fmtPct4(ratio)
137272
137702
  )}</strong></span>`;
137273
137703
  };
@@ -137282,7 +137712,7 @@ function miniCardHtml(s, unit, opts) {
137282
137712
  const showKpis = opts?.kpis !== false;
137283
137713
  const showChips = opts?.chips !== false;
137284
137714
  return `<div class="myio-mg-card">
137285
- <h5 class="myio-mg-card__title">${escapeHtml18(s.name)}</h5>
137715
+ <h5 class="myio-mg-card__title">${escapeHtml19(s.name)}</h5>
137286
137716
  ${showChart ? legendHtml() + miniChartSvg(s) : ""}
137287
137717
  ${showKpis ? kpiRowHtml(s, unit) : ""}
137288
137718
  ${showChips ? chipsHtml(s) : ""}
@@ -137292,7 +137722,7 @@ function miniSidebarHtml(shoppings, unit, prevY, curY) {
137292
137722
  const total = deriveTotal({ shoppings });
137293
137723
  const row = (name, a, r, o, m, isTotal) => `
137294
137724
  <div class="myio-mg-side__row${isTotal ? " is-total" : ""}">
137295
- <span class="myio-mg-side__name">${escapeHtml18(name)}</span>
137725
+ <span class="myio-mg-side__name">${escapeHtml19(name)}</span>
137296
137726
  <span class="myio-mg-side__vals">
137297
137727
  <b style="color:${SERIES_COLORS.aMinus1}">${fmtInt(a)}</b>
137298
137728
  <b style="color:${SERIES_COLORS.realizado}">${fmtInt(r)}</b>
@@ -137303,7 +137733,7 @@ function miniSidebarHtml(shoppings, unit, prevY, curY) {
137303
137733
  return `<div class="myio-mg-side">
137304
137734
  <div class="myio-mg-side__head">
137305
137735
  <span>Resumo por shopping</span>
137306
- <span class="myio-mg-side__unit">${escapeHtml18(unit)}</span>
137736
+ <span class="myio-mg-side__unit">${escapeHtml19(unit)}</span>
137307
137737
  </div>
137308
137738
  <div class="myio-mg-side__cols">
137309
137739
  <span>Shopping</span>
@@ -137330,10 +137760,10 @@ function miniToolbarHtml(prevY, curY, highlight) {
137330
137760
  </div>`;
137331
137761
  }
137332
137762
  function bannerHtml(text2) {
137333
- return `<p class="myio-mg-banner">${escapeHtml18(text2)}</p>`;
137763
+ return `<p class="myio-mg-banner">${escapeHtml19(text2)}</p>`;
137334
137764
  }
137335
137765
  function paras(sentences) {
137336
- return `<div class="myio-mg-copy">${sentences.map((s) => `<p>${escapeHtml18(s)}</p>`).join("")}</div>`;
137766
+ return `<div class="myio-mg-copy">${sentences.map((s) => `<p>${escapeHtml19(s)}</p>`).join("")}</div>`;
137337
137767
  }
137338
137768
  function buildSections(ctx) {
137339
137769
  const { energy, water, curY, prevY } = ctx;
@@ -137358,8 +137788,8 @@ function buildSections(ctx) {
137358
137788
  "A r\xE9gua da meta muda por dom\xEDnio: em Energia a refer\xEAncia \xE9 a ENTRADA; em \xC1gua, os hidr\xF4metros.",
137359
137789
  "Os n\xFAmeros e a unidade de cada card acompanham o dom\xEDnio selecionado."
137360
137790
  ]) + miniToolbarHtml(prevY, curY, "domain") + `<div class="myio-mg-two">
137361
- <div><div class="myio-mg-two__tag">\u26A1 Energia \xB7 ${escapeHtml18(energy.unit)}</div>${miniCardHtml(e0, energy.unit, { chips: false })}</div>
137362
- <div><div class="myio-mg-two__tag">\u{1F4A7} \xC1gua \xB7 ${escapeHtml18(water.unit)}</div>${miniCardHtml(w0, water.unit, { chips: false })}</div>
137791
+ <div><div class="myio-mg-two__tag">\u26A1 Energia \xB7 ${escapeHtml19(energy.unit)}</div>${miniCardHtml(e0, energy.unit, { chips: false })}</div>
137792
+ <div><div class="myio-mg-two__tag">\u{1F4A7} \xC1gua \xB7 ${escapeHtml19(water.unit)}</div>${miniCardHtml(w0, water.unit, { chips: false })}</div>
137363
137793
  </div>`
137364
137794
  },
137365
137795
  {
@@ -137430,7 +137860,7 @@ function buildSections(ctx) {
137430
137860
  ]) + `<div class="myio-mg-order">
137431
137861
  <span class="myio-mg-order__btn">Data de Inaugura\xE7\xE3o \u2191 \xB7 \u2699\uFE0F</span>
137432
137862
  <span class="myio-mg-order__btn">\u25BD Filtros</span>
137433
- </div><ul class="myio-mg-order__list">${energy.shoppings.slice().sort((a, b) => a.inaugurationDate.localeCompare(b.inaugurationDate)).map((s) => `<li><b>${escapeHtml18(s.name)}</b> <span>inaugurado em ${escapeHtml18(s.inaugurationDate)}</span></li>`).join("")}</ul>`
137863
+ </div><ul class="myio-mg-order__list">${energy.shoppings.slice().sort((a, b) => a.inaugurationDate.localeCompare(b.inaugurationDate)).map((s) => `<li><b>${escapeHtml19(s.name)}</b> <span>inaugurado em ${escapeHtml19(s.inaugurationDate)}</span></li>`).join("")}</ul>`
137434
137864
  },
137435
137865
  {
137436
137866
  id: "engine",
@@ -137459,9 +137889,9 @@ function buildSections(ctx) {
137459
137889
  ];
137460
137890
  }
137461
137891
  function injectStyles19() {
137462
- if (document.getElementById(STYLE_ID19)) return;
137892
+ if (document.getElementById(STYLE_ID20)) return;
137463
137893
  const style = document.createElement("style");
137464
- style.id = STYLE_ID19;
137894
+ style.id = STYLE_ID20;
137465
137895
  style.textContent = `
137466
137896
  #${ROOT_ID}{position:fixed;inset:0;z-index:100001;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(15,23,42,.6);backdrop-filter:blur(4px);font-family:'Nunito',system-ui,sans-serif;}
137467
137897
  #${ROOT_ID} *{box-sizing:border-box;}
@@ -137569,9 +137999,9 @@ function openMetasGuide(options = {}) {
137569
137999
  root.innerHTML = `
137570
138000
  <div class="myio-mg-modal${theme.mode === "dark" ? " is-dark" : ""}" role="dialog" aria-modal="true"
137571
138001
  aria-labelledby="myio-mg-title"
137572
- style="--mg-accent:${escapeHtml18(theme.accent)};--mg-accent-dark:${escapeHtml18(
138002
+ style="--mg-accent:${escapeHtml19(theme.accent)};--mg-accent-dark:${escapeHtml19(
137573
138003
  theme.accentDark
137574
- )};--mg-accent-text:${escapeHtml18(theme.accentText)};">
138004
+ )};--mg-accent-text:${escapeHtml19(theme.accentText)};">
137575
138005
  <div class="myio-mg-header">
137576
138006
  <div class="myio-mg-header__l">
137577
138007
  <span class="myio-mg-header__logo" aria-hidden="true">\u{1F393}</span>
@@ -155667,8 +156097,8 @@ function renderDowntimeList(downtimeList) {
155667
156097
  <div class="downtime-item">
155668
156098
  <span class="rank">${index + 1}</span>
155669
156099
  <div class="item-info">
155670
- <span class="item-name">${escapeHtml19(item.name)}</span>
155671
- <span class="item-location">${escapeHtml19(item.location)}</span>
156100
+ <span class="item-name">${escapeHtml20(item.name)}</span>
156101
+ <span class="item-location">${escapeHtml20(item.location)}</span>
155672
156102
  </div>
155673
156103
  <div class="item-metrics">
155674
156104
  <span class="downtime-hours">${item.downtime}h</span>
@@ -155681,7 +156111,7 @@ function renderDowntimeList(downtimeList) {
155681
156111
  `
155682
156112
  ).join("");
155683
156113
  }
155684
- function escapeHtml19(text2) {
156114
+ function escapeHtml20(text2) {
155685
156115
  const div = document.createElement("div");
155686
156116
  div.textContent = text2;
155687
156117
  return div.innerHTML;
@@ -160264,7 +160694,7 @@ function removeSchedulingSharedStyles() {
160264
160694
  }
160265
160695
 
160266
160696
  // src/components/scheduling-shared/view-helpers.ts
160267
- function escapeHtml20(str) {
160697
+ function escapeHtml21(str) {
160268
160698
  const div = document.createElement("div");
160269
160699
  div.textContent = str;
160270
160700
  return div.innerHTML;
@@ -160425,7 +160855,7 @@ function showConfirmModal(container, title, message) {
160425
160855
  overlay.innerHTML = `
160426
160856
  <div class="${SCHED_CSS_PREFIX}__modal-backdrop"></div>
160427
160857
  <div class="${SCHED_CSS_PREFIX}__modal-content">
160428
- <h3>${escapeHtml20(title)}</h3>
160858
+ <h3>${escapeHtml21(title)}</h3>
160429
160859
  <p>${message}</p>
160430
160860
  <div class="${SCHED_CSS_PREFIX}__modal-actions">
160431
160861
  <button class="${SCHED_CSS_PREFIX}__modal-btn-cancel">Cancelar</button>
@@ -160459,8 +160889,8 @@ function showNotificationModal(container, type, message, autoCloseMs = 6e3) {
160459
160889
  overlay.innerHTML = `
160460
160890
  <div class="${SCHED_CSS_PREFIX}__modal-backdrop"></div>
160461
160891
  <div class="${SCHED_CSS_PREFIX}__modal-content">
160462
- <h3>${escapeHtml20(title)}</h3>
160463
- <p>${escapeHtml20(message)}</p>
160892
+ <h3>${escapeHtml21(title)}</h3>
160893
+ <p>${escapeHtml21(message)}</p>
160464
160894
  <div class="${SCHED_CSS_PREFIX}__modal-actions">
160465
160895
  <button class="${SCHED_CSS_PREFIX}__modal-btn-close">Fechar</button>
160466
160896
  </div>
@@ -166667,7 +167097,7 @@ function injectAmbienteModalStyles() {
166667
167097
  }
166668
167098
 
166669
167099
  // src/components/ambiente-detail-modal/AmbienteDetailModal.ts
166670
- var MODAL_ID4 = "ambiente-detail";
167100
+ var MODAL_ID5 = "ambiente-detail";
166671
167101
  function formatTemperature3(value) {
166672
167102
  if (value === null || value === void 0 || isNaN(value)) return "-";
166673
167103
  return value.toLocaleString("pt-BR", {
@@ -166908,7 +167338,7 @@ function renderModalHTML(data, source, config2) {
166908
167338
  const headerHTML = ModalHeader.generateHTML({
166909
167339
  icon: "\u{1F3E2}",
166910
167340
  title: data.label,
166911
- modalId: MODAL_ID4,
167341
+ modalId: MODAL_ID5,
166912
167342
  theme: config2.themeMode || "dark",
166913
167343
  isMaximized: false,
166914
167344
  showThemeToggle: false,
@@ -166957,7 +167387,7 @@ function createAmbienteDetailModal(data, source, config2 = {}) {
166957
167387
  }
166958
167388
  });
166959
167389
  ModalHeader.setupHandlers({
166960
- modalId: MODAL_ID4,
167390
+ modalId: MODAL_ID5,
166961
167391
  onClose: close
166962
167392
  });
166963
167393
  footerCloseBtn?.addEventListener("click", close);
@@ -170259,9 +170689,9 @@ var GCDRSyncController = class {
170259
170689
  var TEAL = "#0a6d5e";
170260
170690
  var TEAL_DARK = "#084f44";
170261
170691
  var TEAL_LIGHT = "#0d8570";
170262
- var MODAL_ID5 = "myio-gcdr-sync-modal";
170692
+ var MODAL_ID6 = "myio-gcdr-sync-modal";
170263
170693
  var STYLES2 = `
170264
- #${MODAL_ID5} {
170694
+ #${MODAL_ID6} {
170265
170695
  position: fixed;
170266
170696
  inset: 0;
170267
170697
  background: rgba(0, 0, 0, 0.60);
@@ -170273,7 +170703,7 @@ var STYLES2 = `
170273
170703
  justify-content: center;
170274
170704
  font-family: 'Nunito', system-ui, sans-serif;
170275
170705
  }
170276
- #${MODAL_ID5} .gcdr-card {
170706
+ #${MODAL_ID6} .gcdr-card {
170277
170707
  background: #fff;
170278
170708
  color: #1a1a1a;
170279
170709
  border-radius: 16px;
@@ -170284,7 +170714,7 @@ var STYLES2 = `
170284
170714
  flex-direction: column;
170285
170715
  overflow: hidden;
170286
170716
  }
170287
- #${MODAL_ID5} .gcdr-header {
170717
+ #${MODAL_ID6} .gcdr-header {
170288
170718
  background: ${TEAL};
170289
170719
  color: #fff;
170290
170720
  padding: 20px 24px 16px;
@@ -170293,25 +170723,25 @@ var STYLES2 = `
170293
170723
  gap: 12px;
170294
170724
  flex-shrink: 0;
170295
170725
  }
170296
- #${MODAL_ID5} .gcdr-header-icon {
170726
+ #${MODAL_ID6} .gcdr-header-icon {
170297
170727
  font-size: 24px;
170298
170728
  flex-shrink: 0;
170299
170729
  }
170300
- #${MODAL_ID5} .gcdr-header-text {
170730
+ #${MODAL_ID6} .gcdr-header-text {
170301
170731
  flex: 1;
170302
170732
  }
170303
- #${MODAL_ID5} .gcdr-header-title {
170733
+ #${MODAL_ID6} .gcdr-header-title {
170304
170734
  font-size: 18px;
170305
170735
  font-weight: 700;
170306
170736
  line-height: 1.2;
170307
170737
  margin: 0;
170308
170738
  }
170309
- #${MODAL_ID5} .gcdr-header-sub {
170739
+ #${MODAL_ID6} .gcdr-header-sub {
170310
170740
  font-size: 13px;
170311
170741
  opacity: 0.80;
170312
170742
  margin: 4px 0 0;
170313
170743
  }
170314
- #${MODAL_ID5} .gcdr-close-btn {
170744
+ #${MODAL_ID6} .gcdr-close-btn {
170315
170745
  background: none;
170316
170746
  border: none;
170317
170747
  color: #fff;
@@ -170324,13 +170754,13 @@ var STYLES2 = `
170324
170754
  transition: opacity 0.15s;
170325
170755
  flex-shrink: 0;
170326
170756
  }
170327
- #${MODAL_ID5} .gcdr-close-btn:hover { opacity: 1; }
170328
- #${MODAL_ID5} .gcdr-body {
170757
+ #${MODAL_ID6} .gcdr-close-btn:hover { opacity: 1; }
170758
+ #${MODAL_ID6} .gcdr-body {
170329
170759
  padding: 24px;
170330
170760
  overflow-y: auto;
170331
170761
  flex: 1;
170332
170762
  }
170333
- #${MODAL_ID5} .gcdr-footer {
170763
+ #${MODAL_ID6} .gcdr-footer {
170334
170764
  padding: 16px 24px;
170335
170765
  border-top: 1px solid #e8ecef;
170336
170766
  display: flex;
@@ -170338,7 +170768,7 @@ var STYLES2 = `
170338
170768
  justify-content: flex-end;
170339
170769
  flex-shrink: 0;
170340
170770
  }
170341
- #${MODAL_ID5} .gcdr-btn {
170771
+ #${MODAL_ID6} .gcdr-btn {
170342
170772
  padding: 10px 20px;
170343
170773
  border-radius: 8px;
170344
170774
  font-size: 14px;
@@ -170350,53 +170780,53 @@ var STYLES2 = `
170350
170780
  align-items: center;
170351
170781
  gap: 6px;
170352
170782
  }
170353
- #${MODAL_ID5} .gcdr-btn:active { transform: scale(0.97); }
170354
- #${MODAL_ID5} .gcdr-btn-primary {
170783
+ #${MODAL_ID6} .gcdr-btn:active { transform: scale(0.97); }
170784
+ #${MODAL_ID6} .gcdr-btn-primary {
170355
170785
  background: ${TEAL};
170356
170786
  color: #fff;
170357
170787
  }
170358
- #${MODAL_ID5} .gcdr-btn-primary:hover { background: ${TEAL_LIGHT}; }
170359
- #${MODAL_ID5} .gcdr-btn-secondary {
170788
+ #${MODAL_ID6} .gcdr-btn-primary:hover { background: ${TEAL_LIGHT}; }
170789
+ #${MODAL_ID6} .gcdr-btn-secondary {
170360
170790
  background: #f0f4f3;
170361
170791
  color: ${TEAL_DARK};
170362
170792
  border: 1px solid #d0dbd9;
170363
170793
  }
170364
- #${MODAL_ID5} .gcdr-btn-secondary:hover { background: #e0ecea; }
170365
- #${MODAL_ID5} .gcdr-btn-danger {
170794
+ #${MODAL_ID6} .gcdr-btn-secondary:hover { background: #e0ecea; }
170795
+ #${MODAL_ID6} .gcdr-btn-danger {
170366
170796
  background: #d32f2f;
170367
170797
  color: #fff;
170368
170798
  }
170369
- #${MODAL_ID5} .gcdr-btn-danger:hover { background: #b71c1c; }
170370
- #${MODAL_ID5} .gcdr-counts {
170799
+ #${MODAL_ID6} .gcdr-btn-danger:hover { background: #b71c1c; }
170800
+ #${MODAL_ID6} .gcdr-counts {
170371
170801
  display: grid;
170372
170802
  grid-template-columns: repeat(3, 1fr);
170373
170803
  gap: 12px;
170374
170804
  margin-bottom: 20px;
170375
170805
  }
170376
- #${MODAL_ID5} .gcdr-count-card {
170806
+ #${MODAL_ID6} .gcdr-count-card {
170377
170807
  background: #f8faf9;
170378
170808
  border: 1px solid #e0eceb;
170379
170809
  border-radius: 10px;
170380
170810
  padding: 14px 12px;
170381
170811
  text-align: center;
170382
170812
  }
170383
- #${MODAL_ID5} .gcdr-count-num {
170813
+ #${MODAL_ID6} .gcdr-count-num {
170384
170814
  font-size: 28px;
170385
170815
  font-weight: 700;
170386
170816
  line-height: 1;
170387
170817
  margin-bottom: 4px;
170388
170818
  }
170389
- #${MODAL_ID5} .gcdr-count-label {
170819
+ #${MODAL_ID6} .gcdr-count-label {
170390
170820
  font-size: 12px;
170391
170821
  color: #666;
170392
170822
  text-transform: uppercase;
170393
170823
  letter-spacing: 0.04em;
170394
170824
  }
170395
- #${MODAL_ID5} .gcdr-count-create { color: ${TEAL}; }
170396
- #${MODAL_ID5} .gcdr-count-update { color: #e67e00; }
170397
- #${MODAL_ID5} .gcdr-count-skip { color: #888; }
170398
- #${MODAL_ID5} .gcdr-count-recreate { color: #9c27b0; }
170399
- #${MODAL_ID5} .gcdr-info-box {
170825
+ #${MODAL_ID6} .gcdr-count-create { color: ${TEAL}; }
170826
+ #${MODAL_ID6} .gcdr-count-update { color: #e67e00; }
170827
+ #${MODAL_ID6} .gcdr-count-skip { color: #888; }
170828
+ #${MODAL_ID6} .gcdr-count-recreate { color: #9c27b0; }
170829
+ #${MODAL_ID6} .gcdr-info-box {
170400
170830
  background: #f0f9f7;
170401
170831
  border: 1px solid #c3e6e2;
170402
170832
  border-radius: 8px;
@@ -170405,7 +170835,7 @@ var STYLES2 = `
170405
170835
  color: #1a4a45;
170406
170836
  line-height: 1.5;
170407
170837
  }
170408
- #${MODAL_ID5} .gcdr-error-box {
170838
+ #${MODAL_ID6} .gcdr-error-box {
170409
170839
  background: #fff0f0;
170410
170840
  border: 1px solid #ffb3b3;
170411
170841
  border-radius: 8px;
@@ -170417,7 +170847,7 @@ var STYLES2 = `
170417
170847
  gap: 10px;
170418
170848
  align-items: flex-start;
170419
170849
  }
170420
- #${MODAL_ID5} .gcdr-section-title {
170850
+ #${MODAL_ID6} .gcdr-section-title {
170421
170851
  font-size: 14px;
170422
170852
  font-weight: 600;
170423
170853
  color: #333;
@@ -170426,7 +170856,7 @@ var STYLES2 = `
170426
170856
  align-items: center;
170427
170857
  gap: 6px;
170428
170858
  }
170429
- #${MODAL_ID5} .gcdr-action-list {
170859
+ #${MODAL_ID6} .gcdr-action-list {
170430
170860
  list-style: none;
170431
170861
  margin: 0 0 12px;
170432
170862
  padding: 0;
@@ -170435,7 +170865,7 @@ var STYLES2 = `
170435
170865
  border: 1px solid #e8ecef;
170436
170866
  border-radius: 8px;
170437
170867
  }
170438
- #${MODAL_ID5} .gcdr-action-item {
170868
+ #${MODAL_ID6} .gcdr-action-item {
170439
170869
  padding: 8px 12px;
170440
170870
  display: flex;
170441
170871
  align-items: center;
@@ -170443,8 +170873,8 @@ var STYLES2 = `
170443
170873
  font-size: 13px;
170444
170874
  border-bottom: 1px solid #f0f4f3;
170445
170875
  }
170446
- #${MODAL_ID5} .gcdr-action-item:last-child { border-bottom: none; }
170447
- #${MODAL_ID5} .gcdr-badge {
170876
+ #${MODAL_ID6} .gcdr-action-item:last-child { border-bottom: none; }
170877
+ #${MODAL_ID6} .gcdr-badge {
170448
170878
  padding: 2px 7px;
170449
170879
  border-radius: 4px;
170450
170880
  font-size: 10px;
@@ -170453,10 +170883,10 @@ var STYLES2 = `
170453
170883
  letter-spacing: 0.05em;
170454
170884
  flex-shrink: 0;
170455
170885
  }
170456
- #${MODAL_ID5} .gcdr-badge-create { background: #e6f4f1; color: ${TEAL_DARK}; }
170457
- #${MODAL_ID5} .gcdr-badge-update { background: #fff3e0; color: #e67e00; }
170458
- #${MODAL_ID5} .gcdr-badge-recreate { background: #f3e5f5; color: #7b1fa2; }
170459
- #${MODAL_ID5} .gcdr-progress-overlay {
170886
+ #${MODAL_ID6} .gcdr-badge-create { background: #e6f4f1; color: ${TEAL_DARK}; }
170887
+ #${MODAL_ID6} .gcdr-badge-update { background: #fff3e0; color: #e67e00; }
170888
+ #${MODAL_ID6} .gcdr-badge-recreate { background: #f3e5f5; color: #7b1fa2; }
170889
+ #${MODAL_ID6} .gcdr-progress-overlay {
170460
170890
  position: absolute;
170461
170891
  inset: 0;
170462
170892
  background: rgba(255,255,255,0.92);
@@ -170470,17 +170900,17 @@ var STYLES2 = `
170470
170900
  text-align: center;
170471
170901
  z-index: 10;
170472
170902
  }
170473
- #${MODAL_ID5} .gcdr-progress-title {
170903
+ #${MODAL_ID6} .gcdr-progress-title {
170474
170904
  font-size: 16px;
170475
170905
  font-weight: 600;
170476
170906
  color: ${TEAL_DARK};
170477
170907
  }
170478
- #${MODAL_ID5} .gcdr-progress-entity {
170908
+ #${MODAL_ID6} .gcdr-progress-entity {
170479
170909
  font-size: 13px;
170480
170910
  color: #555;
170481
170911
  min-height: 20px;
170482
170912
  }
170483
- #${MODAL_ID5} .gcdr-progress-bar-wrap {
170913
+ #${MODAL_ID6} .gcdr-progress-bar-wrap {
170484
170914
  width: 100%;
170485
170915
  max-width: 360px;
170486
170916
  background: #e0ece9;
@@ -170488,46 +170918,46 @@ var STYLES2 = `
170488
170918
  height: 8px;
170489
170919
  overflow: hidden;
170490
170920
  }
170491
- #${MODAL_ID5} .gcdr-progress-bar {
170921
+ #${MODAL_ID6} .gcdr-progress-bar {
170492
170922
  height: 100%;
170493
170923
  background: ${TEAL};
170494
170924
  border-radius: 99px;
170495
170925
  transition: width 0.3s ease;
170496
170926
  width: 0%;
170497
170927
  }
170498
- #${MODAL_ID5} .gcdr-progress-counter {
170928
+ #${MODAL_ID6} .gcdr-progress-counter {
170499
170929
  font-size: 12px;
170500
170930
  color: #888;
170501
170931
  }
170502
- #${MODAL_ID5} .gcdr-result-counts {
170932
+ #${MODAL_ID6} .gcdr-result-counts {
170503
170933
  display: grid;
170504
170934
  grid-template-columns: repeat(3, 1fr);
170505
170935
  gap: 12px;
170506
170936
  margin-bottom: 20px;
170507
170937
  }
170508
- #${MODAL_ID5} .gcdr-result-card {
170938
+ #${MODAL_ID6} .gcdr-result-card {
170509
170939
  background: #f8faf9;
170510
170940
  border: 1px solid #e0eceb;
170511
170941
  border-radius: 10px;
170512
170942
  padding: 14px 12px;
170513
170943
  text-align: center;
170514
170944
  }
170515
- #${MODAL_ID5} .gcdr-result-num {
170945
+ #${MODAL_ID6} .gcdr-result-num {
170516
170946
  font-size: 28px;
170517
170947
  font-weight: 700;
170518
170948
  line-height: 1;
170519
170949
  margin-bottom: 4px;
170520
170950
  }
170521
- #${MODAL_ID5} .gcdr-result-label {
170951
+ #${MODAL_ID6} .gcdr-result-label {
170522
170952
  font-size: 12px;
170523
170953
  color: #666;
170524
170954
  text-transform: uppercase;
170525
170955
  letter-spacing: 0.04em;
170526
170956
  }
170527
- #${MODAL_ID5} .gcdr-result-ok { color: ${TEAL}; }
170528
- #${MODAL_ID5} .gcdr-result-fail { color: #d32f2f; }
170529
- #${MODAL_ID5} .gcdr-result-skip { color: #888; }
170530
- #${MODAL_ID5} .gcdr-fail-list {
170957
+ #${MODAL_ID6} .gcdr-result-ok { color: ${TEAL}; }
170958
+ #${MODAL_ID6} .gcdr-result-fail { color: #d32f2f; }
170959
+ #${MODAL_ID6} .gcdr-result-skip { color: #888; }
170960
+ #${MODAL_ID6} .gcdr-fail-list {
170531
170961
  background: #fff5f5;
170532
170962
  border: 1px solid #ffcdd2;
170533
170963
  border-radius: 8px;
@@ -170535,23 +170965,23 @@ var STYLES2 = `
170535
170965
  max-height: 160px;
170536
170966
  overflow-y: auto;
170537
170967
  }
170538
- #${MODAL_ID5} .gcdr-fail-item {
170968
+ #${MODAL_ID6} .gcdr-fail-item {
170539
170969
  font-size: 12px;
170540
170970
  color: #b71c1c;
170541
170971
  padding: 4px 0;
170542
170972
  border-bottom: 1px solid #ffebee;
170543
170973
  }
170544
- #${MODAL_ID5} .gcdr-fail-item:last-child { border-bottom: none; }
170974
+ #${MODAL_ID6} .gcdr-fail-item:last-child { border-bottom: none; }
170545
170975
  `;
170546
170976
  function injectStyles23() {
170547
- if (document.getElementById(`${MODAL_ID5}-styles`)) return;
170977
+ if (document.getElementById(`${MODAL_ID6}-styles`)) return;
170548
170978
  const style = document.createElement("style");
170549
- style.id = `${MODAL_ID5}-styles`;
170979
+ style.id = `${MODAL_ID6}-styles`;
170550
170980
  style.textContent = STYLES2;
170551
170981
  document.head.appendChild(style);
170552
170982
  }
170553
170983
  function removeExistingModal() {
170554
- const existing = document.getElementById(MODAL_ID5);
170984
+ const existing = document.getElementById(MODAL_ID6);
170555
170985
  existing?.remove();
170556
170986
  }
170557
170987
  function badgeHtml(type) {
@@ -170663,7 +171093,7 @@ async function openGCDRSyncModal(params) {
170663
171093
  return;
170664
171094
  }
170665
171095
  const overlay = document.createElement("div");
170666
- overlay.id = MODAL_ID5;
171096
+ overlay.id = MODAL_ID6;
170667
171097
  const card = document.createElement("div");
170668
171098
  card.className = "gcdr-card";
170669
171099
  card.style.position = "relative";
@@ -170893,13 +171323,13 @@ async function openGCDRSyncModal(params) {
170893
171323
  }
170894
171324
 
170895
171325
  // src/components/premium-modals/alarm-bundle-map/openAlarmBundleMapModal.ts
170896
- var MODAL_ID6 = "myio-alarm-bundle-map-modal";
171326
+ var MODAL_ID7 = "myio-alarm-bundle-map-modal";
170897
171327
  var GCDR_INTEGRATION_API_KEY = "gcdr_cust_tb_integration_key_2026";
170898
171328
  var TEAL2 = "#0a6d5e";
170899
171329
  var TEAL_DARK2 = "#084f44";
170900
171330
  var TEAL_LIGHT2 = "#0d8570";
170901
171331
  var STYLES3 = `
170902
- #${MODAL_ID6} {
171332
+ #${MODAL_ID7} {
170903
171333
  position: fixed;
170904
171334
  inset: 0;
170905
171335
  background: rgba(0, 0, 0, 0.60);
@@ -170911,7 +171341,7 @@ var STYLES3 = `
170911
171341
  justify-content: center;
170912
171342
  font-family: 'Nunito', system-ui, sans-serif;
170913
171343
  }
170914
- #${MODAL_ID6} .abm-card {
171344
+ #${MODAL_ID7} .abm-card {
170915
171345
  background: #fff;
170916
171346
  color: #1a1a1a;
170917
171347
  border-radius: 16px;
@@ -170922,12 +171352,12 @@ var STYLES3 = `
170922
171352
  flex-direction: column;
170923
171353
  overflow: hidden;
170924
171354
  }
170925
- #${MODAL_ID6} .abm-card.is-maximized {
171355
+ #${MODAL_ID7} .abm-card.is-maximized {
170926
171356
  width: 100vw !important; max-width: 100vw !important;
170927
171357
  height: 100vh !important; max-height: 100vh !important; border-radius: 0;
170928
171358
  }
170929
- #${MODAL_ID6} .myio-premium-chrome-header .abm-view-toggle { margin-left: 0; margin-right: 6px; }
170930
- #${MODAL_ID6} .abm-header {
171359
+ #${MODAL_ID7} .myio-premium-chrome-header .abm-view-toggle { margin-left: 0; margin-right: 6px; }
171360
+ #${MODAL_ID7} .abm-header {
170931
171361
  background: ${TEAL2};
170932
171362
  color: #fff;
170933
171363
  padding: 18px 24px 14px;
@@ -170936,123 +171366,123 @@ var STYLES3 = `
170936
171366
  gap: 12px;
170937
171367
  flex-shrink: 0;
170938
171368
  }
170939
- #${MODAL_ID6} .abm-header-icon { font-size: 22px; flex-shrink: 0; }
170940
- #${MODAL_ID6} .abm-header-text { flex: 1; }
170941
- #${MODAL_ID6} .abm-header-title {
171369
+ #${MODAL_ID7} .abm-header-icon { font-size: 22px; flex-shrink: 0; }
171370
+ #${MODAL_ID7} .abm-header-text { flex: 1; }
171371
+ #${MODAL_ID7} .abm-header-title {
170942
171372
  font-size: 17px; font-weight: 700; line-height: 1.2; margin: 0;
170943
171373
  }
170944
- #${MODAL_ID6} .abm-header-sub {
171374
+ #${MODAL_ID7} .abm-header-sub {
170945
171375
  font-size: 12px; opacity: 0.80; margin: 3px 0 0;
170946
171376
  }
170947
- #${MODAL_ID6} .abm-close-btn {
171377
+ #${MODAL_ID7} .abm-close-btn {
170948
171378
  background: none; border: none; color: #fff;
170949
171379
  font-size: 20px; cursor: pointer; padding: 4px 8px;
170950
171380
  border-radius: 6px; line-height: 1; opacity: 0.80; transition: opacity 0.15s; flex-shrink: 0;
170951
171381
  }
170952
- #${MODAL_ID6} .abm-close-btn:hover { opacity: 1; }
170953
- #${MODAL_ID6} .abm-body {
171382
+ #${MODAL_ID7} .abm-close-btn:hover { opacity: 1; }
171383
+ #${MODAL_ID7} .abm-body {
170954
171384
  padding: 20px 24px; overflow-y: auto; flex: 1;
170955
171385
  }
170956
- #${MODAL_ID6} .abm-footer {
171386
+ #${MODAL_ID7} .abm-footer {
170957
171387
  padding: 14px 24px; border-top: 1px solid #e8ecef;
170958
171388
  display: flex; gap: 12px; justify-content: flex-end; flex-shrink: 0;
170959
171389
  }
170960
- #${MODAL_ID6} .abm-btn {
171390
+ #${MODAL_ID7} .abm-btn {
170961
171391
  padding: 9px 18px; border-radius: 8px; font-size: 14px;
170962
171392
  font-weight: 600; cursor: pointer; border: none;
170963
171393
  transition: background 0.15s;
170964
171394
  display: inline-flex; align-items: center; gap: 6px;
170965
171395
  }
170966
- #${MODAL_ID6} .abm-btn-secondary {
171396
+ #${MODAL_ID7} .abm-btn-secondary {
170967
171397
  background: #f0f4f3; color: ${TEAL_DARK2}; border: 1px solid #d0dbd9;
170968
171398
  }
170969
- #${MODAL_ID6} .abm-btn-secondary:hover { background: #e0ecea; }
170970
- #${MODAL_ID6} .abm-error-box {
171399
+ #${MODAL_ID7} .abm-btn-secondary:hover { background: #e0ecea; }
171400
+ #${MODAL_ID7} .abm-error-box {
170971
171401
  background: #fff0f0; border: 1px solid #ffb3b3; border-radius: 8px;
170972
171402
  padding: 14px 16px; font-size: 14px; color: #b71c1c;
170973
171403
  line-height: 1.5; display: flex; gap: 10px; align-items: flex-start;
170974
171404
  }
170975
- #${MODAL_ID6} .abm-empty-box {
171405
+ #${MODAL_ID7} .abm-empty-box {
170976
171406
  background: #f0f9f7; border: 1px solid #c3e6e2; border-radius: 8px;
170977
171407
  padding: 16px; font-size: 14px; color: #1a4a45; line-height: 1.5;
170978
171408
  text-align: center;
170979
171409
  }
170980
- #${MODAL_ID6} .abm-loading {
171410
+ #${MODAL_ID7} .abm-loading {
170981
171411
  text-align: center; padding: 32px; color: #555; font-size: 14px;
170982
171412
  }
170983
- #${MODAL_ID6} .abm-summary-bar {
171413
+ #${MODAL_ID7} .abm-summary-bar {
170984
171414
  display: flex; gap: 20px; margin-bottom: 18px;
170985
171415
  padding: 12px 16px; background: #f8faf9;
170986
171416
  border: 1px solid #e0eceb; border-radius: 10px;
170987
171417
  }
170988
- #${MODAL_ID6} .abm-summary-item { text-align: center; flex: 1; }
170989
- #${MODAL_ID6} .abm-summary-num {
171418
+ #${MODAL_ID7} .abm-summary-item { text-align: center; flex: 1; }
171419
+ #${MODAL_ID7} .abm-summary-num {
170990
171420
  font-size: 22px; font-weight: 700; color: ${TEAL2}; line-height: 1;
170991
171421
  }
170992
- #${MODAL_ID6} .abm-summary-label {
171422
+ #${MODAL_ID7} .abm-summary-label {
170993
171423
  font-size: 11px; color: #666; text-transform: uppercase; letter-spacing: 0.04em;
170994
171424
  margin-top: 2px;
170995
171425
  }
170996
- #${MODAL_ID6} .abm-asset-group { margin-bottom: 16px; }
170997
- #${MODAL_ID6} .abm-asset-label {
171426
+ #${MODAL_ID7} .abm-asset-group { margin-bottom: 16px; }
171427
+ #${MODAL_ID7} .abm-asset-label {
170998
171428
  font-size: 11px; font-weight: 700; color: #888;
170999
171429
  text-transform: uppercase; letter-spacing: 0.07em;
171000
171430
  margin-bottom: 6px; padding-left: 2px;
171001
171431
  }
171002
- #${MODAL_ID6} .abm-device-card {
171432
+ #${MODAL_ID7} .abm-device-card {
171003
171433
  border: 1px solid #e0eceb; border-radius: 10px;
171004
171434
  margin-bottom: 8px; overflow: hidden;
171005
171435
  }
171006
- #${MODAL_ID6} .abm-device-header {
171436
+ #${MODAL_ID7} .abm-device-header {
171007
171437
  display: flex; align-items: center; gap: 10px;
171008
171438
  padding: 10px 14px; background: #f8faf9;
171009
171439
  border-bottom: 1px solid #e0eceb;
171010
171440
  }
171011
- #${MODAL_ID6} .abm-device-name {
171441
+ #${MODAL_ID7} .abm-device-name {
171012
171442
  flex: 1; font-size: 14px; font-weight: 600; color: #1a1a1a;
171013
171443
  }
171014
- #${MODAL_ID6} .abm-device-type {
171444
+ #${MODAL_ID7} .abm-device-type {
171015
171445
  font-size: 11px; font-weight: 600; padding: 2px 8px;
171016
171446
  border-radius: 4px; background: #e6f4f1; color: ${TEAL_DARK2};
171017
171447
  text-transform: uppercase; letter-spacing: 0.04em;
171018
171448
  }
171019
- #${MODAL_ID6} .abm-rule-list { padding: 0; list-style: none; margin: 0; }
171020
- #${MODAL_ID6} .abm-rule-item {
171449
+ #${MODAL_ID7} .abm-rule-list { padding: 0; list-style: none; margin: 0; }
171450
+ #${MODAL_ID7} .abm-rule-item {
171021
171451
  padding: 10px 14px; border-bottom: 1px solid #f0f4f3;
171022
171452
  font-size: 13px;
171023
171453
  }
171024
- #${MODAL_ID6} .abm-rule-item:last-child { border-bottom: none; }
171025
- #${MODAL_ID6} .abm-rule-name {
171454
+ #${MODAL_ID7} .abm-rule-item:last-child { border-bottom: none; }
171455
+ #${MODAL_ID7} .abm-rule-name {
171026
171456
  font-weight: 600; color: #333; margin-bottom: 4px;
171027
171457
  display: flex; align-items: center; gap: 6px;
171028
171458
  }
171029
- #${MODAL_ID6} .abm-rule-detail {
171459
+ #${MODAL_ID7} .abm-rule-detail {
171030
171460
  color: #555; line-height: 1.6;
171031
171461
  display: flex; flex-wrap: wrap; gap: 4px 12px;
171032
171462
  }
171033
- #${MODAL_ID6} .abm-rule-chip {
171463
+ #${MODAL_ID7} .abm-rule-chip {
171034
171464
  display: inline-flex; align-items: center; gap: 3px;
171035
171465
  font-size: 12px; background: #f0f4f3; border-radius: 4px;
171036
171466
  padding: 1px 7px; color: #444;
171037
171467
  }
171038
- #${MODAL_ID6} .abm-day-chip {
171468
+ #${MODAL_ID7} .abm-day-chip {
171039
171469
  font-size: 10px; font-weight: 700; padding: 1px 5px;
171040
171470
  border-radius: 3px; background: ${TEAL2}; color: #fff;
171041
171471
  }
171042
- #${MODAL_ID6} .abm-day-chip.off {
171472
+ #${MODAL_ID7} .abm-day-chip.off {
171043
171473
  background: #e8ecef; color: #aaa;
171044
171474
  }
171045
- #${MODAL_ID6} .abm-rule-name {
171475
+ #${MODAL_ID7} .abm-rule-name {
171046
171476
  justify-content: space-between;
171047
171477
  }
171048
- #${MODAL_ID6} .abm-edit-rule-btn {
171478
+ #${MODAL_ID7} .abm-edit-rule-btn {
171049
171479
  background: none; border: none; cursor: pointer;
171050
171480
  font-size: 13px; padding: 2px 5px; border-radius: 4px;
171051
171481
  color: #888; line-height: 1; transition: background 0.12s, color 0.12s;
171052
171482
  flex-shrink: 0;
171053
171483
  }
171054
- #${MODAL_ID6} .abm-edit-rule-btn:hover { background: #e6f4f1; color: ${TEAL2}; }
171055
- #${MODAL_ID6} .abm-edit-form {
171484
+ #${MODAL_ID7} .abm-edit-rule-btn:hover { background: #e6f4f1; color: ${TEAL2}; }
171485
+ #${MODAL_ID7} .abm-edit-form {
171056
171486
  margin-top: 8px; padding: 10px 12px;
171057
171487
  background: #f4fbf9; border: 1px solid #c3e6e2; border-radius: 8px;
171058
171488
  display: flex; flex-direction: column; gap: 10px;
@@ -171060,136 +171490,136 @@ var STYLES3 = `
171060
171490
  ele s\xF3 ocupava a largura do conte\xFAdo. For\xE7a ocupar a linha inteira. */
171061
171491
  flex: 1 1 100%; width: 100%; box-sizing: border-box;
171062
171492
  }
171063
- #${MODAL_ID6} .abm-ef-row {
171493
+ #${MODAL_ID7} .abm-ef-row {
171064
171494
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
171065
171495
  }
171066
- #${MODAL_ID6} .abm-ef-label {
171496
+ #${MODAL_ID7} .abm-ef-label {
171067
171497
  font-size: 11px; font-weight: 600; color: #555; min-width: 60px; flex-shrink: 0;
171068
171498
  }
171069
- #${MODAL_ID6} .abm-ef-input {
171499
+ #${MODAL_ID7} .abm-ef-input {
171070
171500
  border: 1px solid #b0d8d2; border-radius: 5px; padding: 4px 8px;
171071
171501
  font-size: 13px; color: #1a1a1a; background: #fff;
171072
171502
  outline: none; transition: border-color 0.15s;
171073
171503
  }
171074
- #${MODAL_ID6} .abm-ef-input:focus { border-color: ${TEAL2}; }
171075
- #${MODAL_ID6} .abm-ef-input--value { width: 80px; }
171076
- #${MODAL_ID6} .abm-ef-input--time { width: 88px; }
171077
- #${MODAL_ID6} .abm-ef-days { display: flex; gap: 4px; flex-wrap: wrap; }
171078
- #${MODAL_ID6} .abm-ef-day-btn {
171504
+ #${MODAL_ID7} .abm-ef-input:focus { border-color: ${TEAL2}; }
171505
+ #${MODAL_ID7} .abm-ef-input--value { width: 80px; }
171506
+ #${MODAL_ID7} .abm-ef-input--time { width: 88px; }
171507
+ #${MODAL_ID7} .abm-ef-days { display: flex; gap: 4px; flex-wrap: wrap; }
171508
+ #${MODAL_ID7} .abm-ef-day-btn {
171079
171509
  font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 3px;
171080
171510
  cursor: pointer; border: 1px solid #b0d8d2; background: #e8ecef; color: #aaa;
171081
171511
  transition: background 0.12s, color 0.12s;
171082
171512
  }
171083
- #${MODAL_ID6} .abm-ef-day-btn.on { background: ${TEAL2}; color: #fff; border-color: ${TEAL2}; }
171084
- #${MODAL_ID6} .abm-ef-actions { display: flex; gap: 8px; justify-content: flex-end; }
171085
- #${MODAL_ID6} .abm-ef-save-btn {
171513
+ #${MODAL_ID7} .abm-ef-day-btn.on { background: ${TEAL2}; color: #fff; border-color: ${TEAL2}; }
171514
+ #${MODAL_ID7} .abm-ef-actions { display: flex; gap: 8px; justify-content: flex-end; }
171515
+ #${MODAL_ID7} .abm-ef-save-btn {
171086
171516
  padding: 5px 14px; border-radius: 6px; font-size: 12px; font-weight: 700;
171087
171517
  cursor: pointer; border: none; background: ${TEAL2}; color: #fff;
171088
171518
  transition: background 0.15s;
171089
171519
  }
171090
- #${MODAL_ID6} .abm-ef-save-btn:hover { background: ${TEAL_LIGHT2}; }
171091
- #${MODAL_ID6} .abm-ef-save-btn:disabled { opacity: 0.55; cursor: not-allowed; }
171092
- #${MODAL_ID6} .abm-ef-cancel-btn {
171520
+ #${MODAL_ID7} .abm-ef-save-btn:hover { background: ${TEAL_LIGHT2}; }
171521
+ #${MODAL_ID7} .abm-ef-save-btn:disabled { opacity: 0.55; cursor: not-allowed; }
171522
+ #${MODAL_ID7} .abm-ef-cancel-btn {
171093
171523
  padding: 5px 14px; border-radius: 6px; font-size: 12px; font-weight: 600;
171094
171524
  cursor: pointer; background: #e8ecef; color: #555; border: 1px solid #ccc;
171095
171525
  transition: background 0.15s;
171096
171526
  }
171097
- #${MODAL_ID6} .abm-ef-cancel-btn:hover { background: #d8dfe0; }
171098
- #${MODAL_ID6} .abm-ef-error {
171527
+ #${MODAL_ID7} .abm-ef-cancel-btn:hover { background: #d8dfe0; }
171528
+ #${MODAL_ID7} .abm-ef-error {
171099
171529
  font-size: 11px; color: #c0392b; font-weight: 600;
171100
171530
  }
171101
- #${MODAL_ID6} .abm-view-toggle {
171531
+ #${MODAL_ID7} .abm-view-toggle {
171102
171532
  display: flex; gap: 0; border: 1px solid rgba(255,255,255,0.3); border-radius: 6px; overflow: hidden;
171103
171533
  margin-left: auto; flex-shrink: 0;
171104
171534
  }
171105
- #${MODAL_ID6} .abm-view-btn {
171535
+ #${MODAL_ID7} .abm-view-btn {
171106
171536
  background: none; border: none; color: rgba(255,255,255,0.7); font-size: 12px; font-weight: 600;
171107
171537
  padding: 5px 12px; cursor: pointer; transition: background 0.15s, color 0.15s; white-space: nowrap;
171108
171538
  }
171109
- #${MODAL_ID6} .abm-view-btn.active { background: rgba(255,255,255,0.25); color: #fff; }
171110
- #${MODAL_ID6} .abm-view-btn:hover:not(.active) { background: rgba(255,255,255,0.1); color: #fff; }
171111
- #${MODAL_ID6} .abm-restore-btn {
171539
+ #${MODAL_ID7} .abm-view-btn.active { background: rgba(255,255,255,0.25); color: #fff; }
171540
+ #${MODAL_ID7} .abm-view-btn:hover:not(.active) { background: rgba(255,255,255,0.1); color: #fff; }
171541
+ #${MODAL_ID7} .abm-restore-btn {
171112
171542
  background: none; border: none; cursor: pointer; font-size: 13px;
171113
171543
  padding: 2px 4px; border-radius: 4px; color: #e67e22; line-height: 1;
171114
171544
  flex-shrink: 0; transition: background 0.12s;
171115
171545
  title: "Restaurar valor padr\xE3o";
171116
171546
  }
171117
- #${MODAL_ID6} .abm-restore-btn:hover { background: #fef0e4; }
171118
- #${MODAL_ID6} .abm-override-badge {
171547
+ #${MODAL_ID7} .abm-restore-btn:hover { background: #fef0e4; }
171548
+ #${MODAL_ID7} .abm-override-badge {
171119
171549
  font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 3px;
171120
171550
  background: #e67e22; color: #fff; letter-spacing: 0.03em;
171121
171551
  }
171122
- #${MODAL_ID6} .abm-rule-group {
171552
+ #${MODAL_ID7} .abm-rule-group {
171123
171553
  border: 1px solid #e0eceb; border-radius: 10px; margin-bottom: 16px; overflow: hidden;
171124
171554
  }
171125
- #${MODAL_ID6} .abm-rule-group-header {
171555
+ #${MODAL_ID7} .abm-rule-group-header {
171126
171556
  display: flex; align-items: center; gap: 10px;
171127
171557
  padding: 10px 14px; background: #f0f9f7; border-bottom: 1px solid #e0eceb;
171128
171558
  }
171129
- #${MODAL_ID6} .abm-rule-group-name { flex: 1; font-size: 14px; font-weight: 600; color: #1a1a1a; }
171130
- #${MODAL_ID6} .abm-rule-group-devices { padding: 0; list-style: none; margin: 0; }
171131
- #${MODAL_ID6} .abm-rule-group-device {
171559
+ #${MODAL_ID7} .abm-rule-group-name { flex: 1; font-size: 14px; font-weight: 600; color: #1a1a1a; }
171560
+ #${MODAL_ID7} .abm-rule-group-devices { padding: 0; list-style: none; margin: 0; }
171561
+ #${MODAL_ID7} .abm-rule-group-device {
171132
171562
  padding: 8px 14px; border-bottom: 1px solid #f0f4f3;
171133
171563
  font-size: 13px; color: #555; display: flex; align-items: center; gap: 8px;
171134
171564
  }
171135
- #${MODAL_ID6} .abm-rule-group-device:last-child { border-bottom: none; }
171136
- #${MODAL_ID6} .abm-rule-description {
171565
+ #${MODAL_ID7} .abm-rule-group-device:last-child { border-bottom: none; }
171566
+ #${MODAL_ID7} .abm-rule-description {
171137
171567
  font-size: 12px; color: #777; font-style: italic;
171138
171568
  margin: 2px 0 6px; line-height: 1.4;
171139
171569
  }
171140
- #${MODAL_ID6} .abm-ef-input--desc {
171570
+ #${MODAL_ID7} .abm-ef-input--desc {
171141
171571
  flex: 1; min-width: 0; resize: vertical;
171142
171572
  font-family: inherit; line-height: 1.4;
171143
171573
  }
171144
171574
  /* Override value chip in por-regra device row */
171145
- #${MODAL_ID6} .abm-override-value {
171575
+ #${MODAL_ID7} .abm-override-value {
171146
171576
  font-size: 12px; font-weight: 600; color: #e67e22;
171147
171577
  background: #fef3e8; border-radius: 4px; padding: 1px 6px;
171148
171578
  }
171149
171579
  /* Collapse/expand */
171150
- #${MODAL_ID6} .abm-device-card.collapsed .abm-rule-list { display: none; }
171151
- #${MODAL_ID6} .abm-rule-group.collapsed .abm-rule-group-devices,
171152
- #${MODAL_ID6} .abm-rule-group.collapsed .abm-rule-detail-wrap { display: none; }
171153
- #${MODAL_ID6} .abm-chevron {
171580
+ #${MODAL_ID7} .abm-device-card.collapsed .abm-rule-list { display: none; }
171581
+ #${MODAL_ID7} .abm-rule-group.collapsed .abm-rule-group-devices,
171582
+ #${MODAL_ID7} .abm-rule-group.collapsed .abm-rule-detail-wrap { display: none; }
171583
+ #${MODAL_ID7} .abm-chevron {
171154
171584
  font-size: 11px; color: #94a3b8; transition: transform 0.18s; flex-shrink: 0; user-select: none;
171155
171585
  }
171156
- #${MODAL_ID6} .abm-device-card.collapsed .abm-chevron,
171157
- #${MODAL_ID6} .abm-rule-group.collapsed .abm-chevron { transform: rotate(-90deg); }
171158
- #${MODAL_ID6} .abm-device-header { cursor: pointer; }
171159
- #${MODAL_ID6} .abm-device-header:hover { background: #f0f9f7; }
171160
- #${MODAL_ID6} .abm-rule-group-header { cursor: pointer; }
171161
- #${MODAL_ID6} .abm-rule-group-header:hover { background: #e6f4f1; }
171586
+ #${MODAL_ID7} .abm-device-card.collapsed .abm-chevron,
171587
+ #${MODAL_ID7} .abm-rule-group.collapsed .abm-chevron { transform: rotate(-90deg); }
171588
+ #${MODAL_ID7} .abm-device-header { cursor: pointer; }
171589
+ #${MODAL_ID7} .abm-device-header:hover { background: #f0f9f7; }
171590
+ #${MODAL_ID7} .abm-rule-group-header { cursor: pointer; }
171591
+ #${MODAL_ID7} .abm-rule-group-header:hover { background: #e6f4f1; }
171162
171592
  /* Alarm badge */
171163
- #${MODAL_ID6} .abm-alarm-badge {
171593
+ #${MODAL_ID7} .abm-alarm-badge {
171164
171594
  display: inline-flex; align-items: center; gap: 3px;
171165
171595
  background: #fee2e2; color: #b91c1c; border-radius: 10px;
171166
171596
  font-size: 10px; font-weight: 700; padding: 1px 7px; flex-shrink: 0;
171167
171597
  }
171168
- #${MODAL_ID6} .abm-alarm-badge.zero { background: #f0f9f7; color: #6b7280; }
171598
+ #${MODAL_ID7} .abm-alarm-badge.zero { background: #f0f9f7; color: #6b7280; }
171169
171599
  /* Filter bar */
171170
- #${MODAL_ID6} .abm-filter-bar {
171600
+ #${MODAL_ID7} .abm-filter-bar {
171171
171601
  display: flex; gap: 8px; align-items: center; margin-bottom: 14px;
171172
171602
  padding: 10px 12px; background: #f8faf9; border: 1px solid #e0eceb; border-radius: 8px;
171173
171603
  }
171174
- #${MODAL_ID6} .abm-filter-input {
171604
+ #${MODAL_ID7} .abm-filter-input {
171175
171605
  flex: 1; border: 1px solid #d1d5db; border-radius: 6px; padding: 6px 10px;
171176
171606
  font-size: 12px; outline: none; transition: border-color 0.15s;
171177
171607
  }
171178
- #${MODAL_ID6} .abm-filter-input:focus { border-color: ${TEAL2}; }
171179
- #${MODAL_ID6} .abm-filter-select {
171608
+ #${MODAL_ID7} .abm-filter-input:focus { border-color: ${TEAL2}; }
171609
+ #${MODAL_ID7} .abm-filter-select {
171180
171610
  border: 1px solid #d1d5db; border-radius: 6px; padding: 5px 8px;
171181
171611
  font-size: 12px; outline: none; min-width: 140px; max-width: 220px;
171182
171612
  background: #fff; cursor: pointer;
171183
171613
  }
171184
- #${MODAL_ID6} .abm-filter-count {
171614
+ #${MODAL_ID7} .abm-filter-count {
171185
171615
  font-size: 11px; color: #64748b; white-space: nowrap; flex-shrink: 0;
171186
171616
  }
171187
- #${MODAL_ID6} .abm-filter-clear {
171617
+ #${MODAL_ID7} .abm-filter-clear {
171188
171618
  background: none; border: 1px solid #e0eceb; border-radius: 6px; cursor: pointer;
171189
171619
  font-size: 11px; color: #64748b; padding: 4px 8px; white-space: nowrap; flex-shrink: 0;
171190
171620
  transition: background 0.12s;
171191
171621
  }
171192
- #${MODAL_ID6} .abm-filter-clear:hover { background: #f0f4f3; color: #1e293b; }
171622
+ #${MODAL_ID7} .abm-filter-clear:hover { background: #f0f4f3; color: #1e293b; }
171193
171623
  /* Confirmation modal \u2014 value edit overwrite warning */
171194
171624
  .abm-confirm-overlay {
171195
171625
  position: fixed; inset: 0;
@@ -171226,14 +171656,14 @@ var STYLES3 = `
171226
171656
  .abm-confirm-btn--confirm:hover { background: #cf6d17; }
171227
171657
  `;
171228
171658
  function injectStyles24() {
171229
- if (document.getElementById(`${MODAL_ID6}-styles`)) return;
171659
+ if (document.getElementById(`${MODAL_ID7}-styles`)) return;
171230
171660
  const style = document.createElement("style");
171231
- style.id = `${MODAL_ID6}-styles`;
171661
+ style.id = `${MODAL_ID7}-styles`;
171232
171662
  style.textContent = STYLES3;
171233
171663
  document.head.appendChild(style);
171234
171664
  }
171235
171665
  function removeExistingModal2() {
171236
- document.getElementById(MODAL_ID6)?.remove();
171666
+ document.getElementById(MODAL_ID7)?.remove();
171237
171667
  }
171238
171668
  function escHtml5(str) {
171239
171669
  return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
@@ -171920,7 +172350,7 @@ async function openAlarmBundleMapModal(params) {
171920
172350
  }
171921
172351
  const baseUrl = params.gcdrApiBaseUrl;
171922
172352
  const overlay = document.createElement("div");
171923
- overlay.id = MODAL_ID6;
172353
+ overlay.id = MODAL_ID7;
171924
172354
  const card = document.createElement("div");
171925
172355
  card.className = "abm-card";
171926
172356
  overlay.appendChild(card);
@@ -173074,11 +173504,11 @@ function _esc(s) {
173074
173504
  const str = s == null ? "" : String(s);
173075
173505
  return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
173076
173506
  }
173077
- var STYLE_ID20 = "ntw-styles";
173507
+ var STYLE_ID21 = "ntw-styles";
173078
173508
  function _injectStyles2() {
173079
- if (document.getElementById(STYLE_ID20)) return;
173509
+ if (document.getElementById(STYLE_ID21)) return;
173080
173510
  const s = document.createElement("style");
173081
- s.id = STYLE_ID20;
173511
+ s.id = STYLE_ID21;
173082
173512
  s.textContent = NTW_CSS;
173083
173513
  document.head.appendChild(s);
173084
173514
  }
@@ -175779,7 +176209,7 @@ var IMPORTANCE_COLORS4 = {
175779
176209
  // red
175780
176210
  };
175781
176211
  var ITEM_TEXT_MAX = 120;
175782
- function escapeHtml21(input) {
176212
+ function escapeHtml22(input) {
175783
176213
  if (input == null) return "";
175784
176214
  return String(input).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
175785
176215
  }
@@ -175817,24 +176247,24 @@ function renderAnnotationItemCard(device, annotation, searchTerm) {
175817
176247
  const domainIcon = DOMAIN_ICONS3[device.domain] ?? DOMAIN_ICONS3.unknown;
175818
176248
  const typeIcon = TYPE_ICONS[annotation.type] ?? "\xB7";
175819
176249
  const importance = Math.max(1, Math.min(5, annotation.importance || 1));
175820
- const textEscaped = escapeHtml21(truncate2(annotation.text || "", ITEM_TEXT_MAX));
175821
- const deviceLabelEscaped = escapeHtml21(device.label || device.name || device.deviceId);
175822
- const author = escapeHtml21(annotation.createdBy?.name || "sem autor");
175823
- const when = escapeHtml21(formatRelative(annotation.createdAt));
176250
+ const textEscaped = escapeHtml22(truncate2(annotation.text || "", ITEM_TEXT_MAX));
176251
+ const deviceLabelEscaped = escapeHtml22(device.label || device.name || device.deviceId);
176252
+ const author = escapeHtml22(annotation.createdBy?.name || "sem autor");
176253
+ const when = escapeHtml22(formatRelative(annotation.createdAt));
175824
176254
  const overdueTag = isOverdue(annotation) ? '<span class="myio-annotations-overdue">Vencida</span>' : "";
175825
176255
  const text2 = searchTerm ? highlightMatches(textEscaped, searchTerm) : textEscaped;
175826
176256
  const deviceLabel = searchTerm ? highlightMatches(deviceLabelEscaped, searchTerm) : deviceLabelEscaped;
175827
- const identifierEscaped = device.identifier ? escapeHtml21(device.identifier) : "";
176257
+ const identifierEscaped = device.identifier ? escapeHtml22(device.identifier) : "";
175828
176258
  const identifierHighlighted = searchTerm && identifierEscaped ? highlightMatches(identifierEscaped, searchTerm) : identifierEscaped;
175829
176259
  const identifierTag = device.identifier ? `<span class="myio-annotations-item-device">${identifierHighlighted}</span>` : "";
175830
176260
  return `
175831
176261
  <button
175832
176262
  class="myio-annotations-item"
175833
176263
  type="button"
175834
- data-device-id="${escapeHtml21(device.deviceId)}"
175835
- data-annotation-id="${escapeHtml21(annotation.id)}"
176264
+ data-device-id="${escapeHtml22(device.deviceId)}"
176265
+ data-annotation-id="${escapeHtml22(annotation.id)}"
175836
176266
  tabindex="0"
175837
- aria-label="${escapeHtml21(annotation.text)} \u2014 ${deviceLabel}"
176267
+ aria-label="${escapeHtml22(annotation.text)} \u2014 ${deviceLabel}"
175838
176268
  >
175839
176269
  <span class="myio-annotations-item-icon" aria-hidden="true">${typeIcon}</span>
175840
176270
  <div class="myio-annotations-item-body">
@@ -176811,8 +177241,8 @@ var HeaderAnnotationsPanel = class _HeaderAnnotationsPanel {
176811
177241
  // group header
176812
177242
  render: () => `
176813
177243
  <header class="myio-annotations-group-header ${groupClass}">
176814
- ${g.icon ? `<span class="myio-annotations-group-icon" aria-hidden="true">${escapeHtml21(g.icon)}</span>` : ""}
176815
- <span class="myio-annotations-group-label">${escapeHtml21(g.label)}</span>
177244
+ ${g.icon ? `<span class="myio-annotations-group-icon" aria-hidden="true">${escapeHtml22(g.icon)}</span>` : ""}
177245
+ <span class="myio-annotations-group-label">${escapeHtml22(g.label)}</span>
176816
177246
  <span class="myio-annotations-group-count">${g.totalAnnotations}</span>
176817
177247
  </header>`
176818
177248
  });
@@ -176937,9 +177367,9 @@ ${this._renderToolbar(filteredCount, totalAllUnfiltered)}
176937
177367
  }
176938
177368
  _renderToolbar(filteredCount, totalCount) {
176939
177369
  const sortOptions = SORT_OPTIONS.map(
176940
- (o) => `<option value="${o.key}" ${o.key === this.sortBy ? "selected" : ""}>${escapeHtml21(o.label)}</option>`
177370
+ (o) => `<option value="${o.key}" ${o.key === this.sortBy ? "selected" : ""}>${escapeHtml22(o.label)}</option>`
176941
177371
  ).join("");
176942
- const term = escapeHtml21(this.filter.searchTerm || "");
177372
+ const term = escapeHtml22(this.filter.searchTerm || "");
176943
177373
  const filtersActiveCount = this._activeFilterCount();
176944
177374
  const filterIndicator = filtersActiveCount > 0 ? `<span class="myio-annotations-group-count">${filtersActiveCount}</span>` : "";
176945
177375
  const showingHtml = filteredCount === totalCount ? `${totalCount} anota\xE7\xF5es` : `${filteredCount} de ${totalCount} anota\xE7\xF5es`;
@@ -176980,13 +177410,13 @@ ${this._renderToolbar(filteredCount, totalAllUnfiltered)}
176980
177410
  const typesHtml = FILTER_TYPE_OPTIONS.map(
176981
177411
  (t) => `<label class="myio-annotations-filter-chip ${this.filter.types.has(t.id) ? "is-on" : ""}">
176982
177412
  <input type="checkbox" data-filter="type" value="${t.id}" ${this.filter.types.has(t.id) ? "checked" : ""} />
176983
- <span>${t.icon} ${escapeHtml21(t.label)}</span>
177413
+ <span>${t.icon} ${escapeHtml22(t.label)}</span>
176984
177414
  </label>`
176985
177415
  ).join("");
176986
177416
  const statusHtml = FILTER_STATUS_OPTIONS.map(
176987
177417
  (s) => `<label class="myio-annotations-filter-chip ${this.filter.statuses.has(s.id) ? "is-on" : ""}">
176988
177418
  <input type="checkbox" data-filter="status" value="${s.id}" ${this.filter.statuses.has(s.id) ? "checked" : ""} />
176989
- <span>${escapeHtml21(s.label)}</span>
177419
+ <span>${escapeHtml22(s.label)}</span>
176990
177420
  </label>`
176991
177421
  ).join("");
176992
177422
  const impHtml = [1, 2, 3, 4, 5].map(
@@ -177063,12 +177493,12 @@ ${this._renderToolbar(filteredCount, totalAllUnfiltered)}
177063
177493
  return `
177064
177494
  <section class="${groupClass}">
177065
177495
  <header class="myio-annotations-group-header" role="button" tabindex="0"
177066
- data-group-toggle="${escapeHtml21(group.key)}"
177496
+ data-group-toggle="${escapeHtml22(group.key)}"
177067
177497
  aria-expanded="${!isCollapsed}"
177068
177498
  title="${isCollapsed ? "Expandir grupo" : "Recolher grupo"}">
177069
177499
  <span class="myio-annotations-group-chevron" aria-hidden="true">${isCollapsed ? "\u25B6" : "\u25BC"}</span>
177070
- ${group.icon ? `<span class="myio-annotations-group-icon" aria-hidden="true">${escapeHtml21(group.icon)}</span>` : ""}
177071
- <span class="myio-annotations-group-label">${escapeHtml21(group.label)}</span>
177500
+ ${group.icon ? `<span class="myio-annotations-group-icon" aria-hidden="true">${escapeHtml22(group.icon)}</span>` : ""}
177501
+ <span class="myio-annotations-group-label">${escapeHtml22(group.label)}</span>
177072
177502
  <span class="myio-annotations-group-count">${group.totalAnnotations}</span>
177073
177503
  </header>
177074
177504
  ${itemsHtml}
@@ -177610,7 +178040,7 @@ function prefixForProductType(productType) {
177610
178040
  if (entry) return entry.prefix;
177611
178041
  return `T${productType}`;
177612
178042
  }
177613
- function pad26(n) {
178043
+ function pad27(n) {
177614
178044
  return String(n).padStart(2, "0");
177615
178045
  }
177616
178046
  function pad4(n) {
@@ -177618,9 +178048,9 @@ function pad4(n) {
177618
178048
  }
177619
178049
  function deviceProductCodeToName(value) {
177620
178050
  const prefix = prefixForProductType(value.productType);
177621
- const yy = pad26(value.year % 100);
177622
- const mm = pad26(value.month);
177623
- const dd = pad26(value.day);
178051
+ const yy = pad27(value.year % 100);
178052
+ const mm = pad27(value.month);
178053
+ const dd = pad27(value.day);
177624
178054
  const unit = value.seq3 * 254 + value.seq;
177625
178055
  return `${prefix} ${yy}${mm}${dd}-${pad4(unit)}`;
177626
178056
  }
@@ -177729,7 +178159,7 @@ function validateDeviceProductCode(code) {
177729
178159
  }
177730
178160
 
177731
178161
  // src/components/cards/central-status/v1.0.0/styles.ts
177732
- var STYLE_ID21 = "myio-central-status-card-styles";
178162
+ var STYLE_ID22 = "myio-central-status-card-styles";
177733
178163
  var CSS5 = `
177734
178164
  .myio-cscard{
177735
178165
  --cscard-surface:#ffffff;
@@ -178032,9 +178462,9 @@ var CSS5 = `
178032
178462
  `;
178033
178463
  function injectCentralStatusCardStyles() {
178034
178464
  if (typeof document === "undefined") return;
178035
- if (document.getElementById(STYLE_ID21)) return;
178465
+ if (document.getElementById(STYLE_ID22)) return;
178036
178466
  const tag = document.createElement("style");
178037
- tag.id = STYLE_ID21;
178467
+ tag.id = STYLE_ID22;
178038
178468
  tag.textContent = CSS5;
178039
178469
  document.head.appendChild(tag);
178040
178470
  }
@@ -178094,7 +178524,7 @@ function deriveCentralConnectivity(ev, opts) {
178094
178524
  }
178095
178525
 
178096
178526
  // src/components/cards/central-status/v1.0.0/TimelineModal.ts
178097
- var STYLE_ID22 = "myio-cscard-timeline-styles";
178527
+ var STYLE_ID23 = "myio-cscard-timeline-styles";
178098
178528
  var DEFAULT_PERIODS = [1, 7, 30, 90];
178099
178529
  function escAttr5(s) {
178100
178530
  return String(s ?? "").replace(
@@ -178103,9 +178533,9 @@ function escAttr5(s) {
178103
178533
  );
178104
178534
  }
178105
178535
  function injectTimelineModalStyles() {
178106
- if (typeof document === "undefined" || document.getElementById(STYLE_ID22)) return;
178536
+ if (typeof document === "undefined" || document.getElementById(STYLE_ID23)) return;
178107
178537
  const tag = document.createElement("style");
178108
- tag.id = STYLE_ID22;
178538
+ tag.id = STYLE_ID23;
178109
178539
  tag.textContent = `
178110
178540
  .myio-tlmodal{
178111
178541
  --tl-online:#3b82f6;
@@ -179401,6 +179831,7 @@ var version = package_default.version || "0.0.0";
179401
179831
  MENU_SHOPPING_CSS_PREFIX,
179402
179832
  METRO_TILE_COLORS,
179403
179833
  MONEY_DASH,
179834
+ MONEY_HOURLY_MAX_DAYS,
179404
179835
  MONEY_REQUIRES_DEVICE_GRANULARITY,
179405
179836
  MONEY_VARIANCE_HEADER,
179406
179837
  MOTOR_SORT_OPTIONS,
@@ -179482,6 +179913,7 @@ var version = package_default.version || "0.0.0";
179482
179913
  SolenoidControlView,
179483
179914
  SwitchControlController,
179484
179915
  SwitchControlView,
179916
+ TARIFF_DEFAULT_TIMEZONE,
179485
179917
  TELEMETRY_CONTEXT_CONFIG,
179486
179918
  TELEMETRY_DEFAULT_FILTER_TABS,
179487
179919
  TELEMETRY_DOMAIN_CONFIG,
@@ -179686,6 +180118,7 @@ var version = package_default.version || "0.0.0";
179686
180118
  createSwitchControl,
179687
180119
  createTariffApiAdapter,
179688
180120
  createTariffApiClient,
180121
+ createTariffValuator,
179689
180122
  createTbEnvelopeStore,
179690
180123
  createTelemetryGridComponent,
179691
180124
  createTelemetryGridShoppingComponent,
@@ -179977,6 +180410,7 @@ var version = package_default.version || "0.0.0";
179977
180410
  openGatewayModal,
179978
180411
  openGenericModal,
179979
180412
  openGoalsPanel,
180413
+ openGoalsTariffsHub,
179980
180414
  openHelpModal,
179981
180415
  openIntegrationsModal,
179982
180416
  openManualDeviceModal,