PageSourceSearch

https://www.visualcrossing.com/wp-content/plugins/visualcrossing-dashboards/dist/UnitGroupDropdown-BmiwFnXt.js

js visualcrossing.com collected 2026-09-24 18:01:49 UTC 49,898 bytes, 1,225 lines download raw bytes

1import { b as V, a as E } from "./prism-tomorrow-Bc1Uoa8w.js";
2import { C as S } from "./DateRangeChooser-C52zJq-Z.js";
3import { _ as k, c, b as s, t as l, j as T, d as h, e as u, F as b, f as v, w as g, h as p, v as C, i as I, k as P, n as m, l as w, g as y, o as d, Z as D, a as q } from "./vccommunicator-h1efvEAV.js";
4var _ = /* @__PURE__ */ function() {
5  return {
6    validateEmail: function(e) {
7      return /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(e).toLowerCase());
8    },
9    validatePassword: function(e) {
10      if (!e || e.length < 8) return !1;
11      const t = /[A-Z]/.test(e), i = /[a-z]/.test(e), a = /[0-9]/.test(e);
12      return t && i && a;
13    },
14    getPasswordRequirements: function() {
15      return "Password must be at least 8 characters with uppercase, lowercase, and a number";
16    },
17    validateAuthCode: function(e) {
18      return e && e.length === 5;
19    }
20  };
21}();
22const K = {
23  en: {
24    accountemail: "Account Email",
25    emailprompt: "Enter an email address for your account",
26    signinPrompt: "Already have an account? {0}.",
27    continue: "Continue",
28    cancel: "Cancel",
29    password: "Password",
30    enterpassword: "Enter password",
31    password_requirements: "At least 8 characters with uppercase, lowercase, and a number",
32    pwd_length: "At least 8 characters",
33    pwd_uppercase: "One uppercase letter",
34    pwd_lowercase: "One lowercase letter",
35    pwd_number: "One number",
36    showpassword: "Show password",
37    hidepassword: "Hide password",
38    autologin_failed: "Your account was created but automatic sign-in failed. Please sign in manually.",
39    validationcode: "Validation Code",
40    validationcodeprompt: "Enter the validation code sent to your email",
41    signin_term: "Your account has been created successfully. Please {0} to start.",
42    signin_link: "Sign in",
43    requestanothercode_term: "Please check your spam folder if a code doesn't arrive. {0}.",
44    requestanothercode_link: "Request another code",
45    agree_terms: 'I agree to the <a href="{link}" target="_blank">Terms & Conditions</a>',
46    validation_incorrect: "The validation code was incorrect",
47    validation_too_long: "Verification code is too long. It must be five letters or numbers",
48    validation_too_short: "Verification code is too short. It must be five letters or numbers",
49    validation_wait: "Please wait at least 30 seconds for the validation email to arrive.",
50    reset: "Reset",
51    creatingaccount: "Creating account",
52    createaccount: "Create account",
53    signedin: {
54      loading: "Loading…",
55      title: "You're already signed in",
56      subtitle: "You already have an active Visual Crossing account, so there's no need to sign up again.",
57      welcometitle: "Your account is ready!",
58      welcomesubtitle: "You're all set and signed in. Copy your API key below to start calling the Weather API, or open the Weather Query Builder to explore and download data — no code required.",
59      username: "Username",
60      email: "Email",
61      apikey: "API Key",
62      copy: "Copy",
63      copied: "Copied!",
64      accountpage: "Account page",
65      querybuilder: "Weather Query Builder",
66      close: "Close"
67    },
68    emailprefs: {
69      title: "Stay informed",
70      service: "Service notifications (billing, security, password resets)",
71      news_and_announcements: "Tips, tutorials, product announcements & news",
72      marketing: "Promotions & special offers"
73    },
74    errors: {
75      validation: "We couldn't accept this email address. Please try a different one or contact support.",
76      network: "We couldn't reach the server. Please check your internet connection (or any ad-blocker / VPN / firewall) and try again.",
77      genauthcode: "There was a problem generating the authentication code.",
78      validateemail: "There was a problem validating the email.",
79      createaccount: "There was a problem creating the account.",
80      createaccounterror: "There was a problem create the account. error code=",
81      captcha: "Security verification failed. Please try again.",
82      details_show: "Show technical details",
83      details_hide: "Hide technical details",
84      details_copy: "Copy details",
85      details_copied: "Copied!",
86      ref_label: "Reference"
87    }
88  },
89  de: {
90    accountemail: "Konto-E-Mail",
91    emailprompt: "Geben Sie eine E-Mail-Adresse für Ihr Konto ein",
92    signinPrompt: "Haben Sie bereits ein Konto? {0}.",
93    continue: "Weiter",
94    cancel: "Abbrechen",
95    password: "Passwort",
96    enterpassword: "Passwort eingeben",
97    password_requirements: "Mindestens 8 Zeichen mit Groß-, Kleinbuchstaben und einer Zahl",
98    pwd_length: "Mindestens 8 Zeichen",
99    pwd_uppercase: "Ein Großbuchstabe",
100    pwd_lowercase: "Ein Kleinbuchstabe",
101    pwd_number: "Eine Zahl",
102    showpassword: "Passwort anzeigen",
103    hidepassword: "Passwort verbergen",
104    autologin_failed: "Ihr Konto wurde erstellt, aber die automatische Anmeldung ist fehlgeschlagen. Bitte melden Sie sich manuell an.",
105    validationcode: "Validierungscode",
106    validationcodeprompt: "Geben Sie den an Ihre E-Mail gesendeten Validierungscode ein",
107    signin_term: "Ihr Konto wurde erfolgreich erstellt. Bitte {0}, um zu starten.",
108    signin_link: "Anmelden",
109    requestanothercode_term: "Bitte überprüfen Sie Ihren Spam-Ordner, falls kein Code eintrifft. {0}.",
110    requestanothercode_link: "Fordern Sie einen weiteren Code an",
111    agree_terms: 'Ich stimme den <a href="{link}" target="_blank">Nutzungsbedingungen</a> zu',
112    validation_incorrect: "Der Validierungscode war falsch",
113    validation_too_long: "Der Validierungscode ist zu lang. Er muss aus fünf Buchstaben oder Zahlen bestehen",
114    validation_too_short: "Der Validierungscode ist zu kurz. Er muss aus fünf Buchstaben oder Zahlen bestehen",
115    validation_wait: "Bitte warten Sie mindestens 30 Sekunden, bis die Validierungs-E-Mail eintrifft.",
116    reset: "Zurücksetzen",
117    creatingaccount: "Konto wird erstellt",
118    createaccount: "Konto erstellen",
119    emailprefs: {
120      title: "Informiert bleiben",
121      service: "Service-Benachrichtigungen (Rechnungsstellung, Sicherheit, Passwort-Zurücksetzung)",
122      news_and_announcements: "Tipps, Tutorials, Produktankündigungen & Neuigkeiten",
123      marketing: "Aktionen & Sonderangebote"
124    },
125    errors: {
126      validation: "Beim Überprüfen der E-Mail ist ein Fehler aufgetreten",
127      network: "Der Server konnte nicht erreicht werden. Bitte prüfen Sie Ihre Internetverbindung (oder einen Werbeblocker / VPN / eine Firewall) und versuchen Sie es erneut.",
128      genauthcode: "Es gab ein Problem beim Generieren des Authentifizierungscodes.",
129      validateemail: "Es gab ein Problem bei der Validierung der E-Mail.",
130      createaccount: "Es gab ein Problem beim Erstellen des Kontos.",
131      createaccounterror: "Es gab ein Problem beim Erstellen des Kontos. Fehlercode=",
132      captcha: "Sicherheitsüberprüfung fehlgeschlagen. Bitte versuchen Sie es erneut.",
133      details_show: "Technische Details anzeigen",
134      details_hide: "Technische Details ausblenden",
135      details_copy: "Details kopieren",
136      details_copied: "Kopiert!",
137      ref_label: "Referenz"
138    }
139  }
140}, L = "6LfK47orAAAAACnvv9p0jg3BxJMCHDzDDWtrdyLB", R = {
141  i18n: {
142    messages: K
143  },
144  name: "SignUp",
145  emits: ["cancel", "signupcomplete"],
146  props: {
147    showCancel: !1,
148    completionAction: null,
149    // Redirect after signup is now opt-in: only redirect when a destination is
150    // explicitly requested via the ?from= query param or a non-empty completionPath
151    // prop. When neither is set, signup finishes on the in-page account screen.
152    completionPath: {
153      type: String,
154      default: null
155    }
156  },
157  data() {
158    return {
159      email: null,
160      password1: null,
161      authCode: null,
162      hasValidatedEmail: !1,
163      hasRequestedAuthCode: !1,
164      hasValidatedAuthCode: !1,
165      hasCreatedAccount: !1,
166      hasAgreedToToS: !1,
167      forwardLocation: null,
168      requestedPlan: null,
169      errorStatus: null,
170      isCreatingAccount: !1,
171      isValidatingCaptcha: !1,
172      isValidatingAuthCode: !1,
173      showPassword: !1,
174      honeypot: null,
175      autoLoginFailed: !1,
176      isContainerInited: !1,
177      sessionId: null,
178      sessionState: null,
179      apiKeyCopied: !1,
180      signupToken: null,
181      signupSessionId: null,
182      signupProtectionEnabled: !0,
183      emailPrefs: { news_and_announcements: !1, marketing: !1 },
184      needsV2Challenge: !1,
185      v2WidgetId: null,
186      v2Token: null,
187      needsV2ChallengeCreate: !1,
188      v2WidgetIdCreate: null,
189      v2TokenCreate: null,
190      // Diagnostic details for the most recent error, surfaced under the error banner
191      // so users can include them in support reports (also identified by correlationId).
192      errorDetails: null,
193      showErrorDetails: !1,
194      errorDetailsCopied: !1
195    };
196  },
197  methods: {
198    /**
199     * Set the user-visible error message AND the diagnostic details panel.
200     * Always prefers the actual error/server message over a generic i18n fallback so
201     * support reports surface the real reason ("Verification failed (1)",
202     * "Please use your primary email address for signup.", etc.) instead of a
203     * uniform "We couldn't accept this email address" for every distinct cause.
204     *
205     * context: short string identifying which call failed (validateuseremail,
206     *          createnewclient, signup_init, recaptcha, ...)
207     */
208    _setError(e, t, i) {
209      var a = this, n, o = "client";
210      e && e.isNetworkError ? (o = "network", n = a.$t("errors.network")) : e && typeof e == "object" && e.message ? (o = e.serverErrorCode ? "server" : e.status ? "http" : e.name === "VcFetchError" ? "server" : "client", n = e.message) : typeof e == "string" && e.length ? n = e : n = a.$t(i || "errors.validation"), a.errorStatus = n, a.errorDetails = {
211        type: o,
212        context: t || "",
213        status: e && e.status || 0,
214        serverErrorCode: e && e.serverErrorCode || 0,
215        url: e && e.url || null,
216        contentType: e && e.contentType || null,
217        correlationId: e && e.correlationId || "",
218        message: n,
219        signupTokenLoaded: !!a.signupToken,
220        captchaLoaded: typeof grecaptcha < "u",
221        online: typeof navigator < "u" ? navigator.onLine : !0,
222        userAgent: typeof navigator < "u" ? (navigator.userAgent || "").slice(0, 200) : "",
223        timestamp: (/* @__PURE__ */ new Date()).toISOString()
224      }, a.showErrorDetails = !1, a.errorDetailsCopied = !1;
225      try {
226        console.error("[signup] " + t + ":", e, a.errorDetails);
227      } catch {
228      }
229    },
230    copyErrorDetails() {
231      var e = this;
232      try {
233        var t = e.errorDetailsText;
234        if (navigator && navigator.clipboard && navigator.clipboard.writeText)
235          navigator.clipboard.writeText(t).then(function() {
236            e.errorDetailsCopied = !0, setTimeout(function() {
237              e.errorDetailsCopied = !1;
238            }, 2e3);
239          });
240        else {
241          var i = document.createElement("textarea");
242          i.value = t, document.body.appendChild(i), i.select();
243          try {
244            document.execCommand("copy"), e.errorDetailsCopied = !0, setTimeout(function() {
245              e.errorDetailsCopied = !1;
246            }, 2e3);
247          } catch {
248          }
249          document.body.removeChild(i);
250        }
251      } catch (a) {
252        console.warn("copy failed", a);
253      }
254    },
255    cancel() {
256      this.$emit("cancel");
257    },
258    copyApiKey() {
259      var e = this, t = e.signedInApiKey;
260      if (t)
261        try {
262          if (navigator && navigator.clipboard && navigator.clipboard.writeText)
263            navigator.clipboard.writeText(t).then(function() {
264              e.apiKeyCopied = !0, setTimeout(function() {
265                e.apiKeyCopied = !1;
266              }, 2e3);
267            });
268          else {
269            var i = document.createElement("textarea");
270            i.value = t, document.body.appendChild(i), i.select();
271            try {
272              document.execCommand("copy"), e.apiKeyCopied = !0, setTimeout(function() {
273                e.apiKeyCopied = !1;
274              }, 2e3);
275            } catch {
276            }
277            document.body.removeChild(i);
278          }
279        } catch (a) {
280          console.warn("copy failed", a);
281        }
282    },
283    /**
284     * Execute reCAPTCHA v3 and return the token.
285     * In dev mode, returns null so the server skips verification
286     * (requires server to have recaptchaSecretKey unconfigured).
287     */
288    async executeRecaptcha(e) {
289      return this.signupProtectionEnabled ? new Promise((t, i) => {
290        if (typeof grecaptcha > "u") {
291          console.warn("reCAPTCHA not loaded"), i(new Error("reCAPTCHA not loaded. Please refresh the page and try again."));
292          return;
293        }
294        grecaptcha.ready(() => {
295          grecaptcha.execute(L, { action: e }).then((a) => t(a)).catch((a) => {
296            console.error("reCAPTCHA error:", a), i(a);
297          });
298        });
299      }) : null;
300    },
301    reset() {
302      var e = this;
303      if (e.email = null, e.password1 = null, e.authCode = null, e.hasValidatedEmail = !1, e.hasRequestedAuthCode = !1, e.hasValidatedAuthCode = !1, e.hasCreatedAccount = !1, e.hasAgreedToToS = !1, e.errorStatus = null, e.errorDetails = null, e.showErrorDetails = !1, e.showPassword = !1, e.autoLoginFailed = !1, e.emailPrefs = { news_and_announcements: !1, marketing: !1 }, e.needsV2Challenge = !1, e.v2Token = null, e.v2WidgetId && typeof grecaptcha < "u")
304        try {
305          grecaptcha.reset(e.v2WidgetId);
306        } catch {
307        }
308      if (e.needsV2ChallengeCreate = !1, e.v2TokenCreate = null, e.v2WidgetIdCreate && typeof grecaptcha < "u")
309        try {
310          grecaptcha.reset(e.v2WidgetIdCreate);
311        } catch {
312        }
313    },
314    requestEmailValidation(e) {
315      var t = this;
316      if (e) {
317        t.requestValidationCode();
318        return;
319      }
320      t.errorStatus = null, t.errorDetails = null, t.showErrorDetails = !1, t.hasValidatedAuthCode = !1, t.isValidatingCaptcha = !0, t.needsV2Challenge = !1, t.v2Token = null, t.executeRecaptcha("signup_email_validation").then((i) => {
321        t.isValidatingCaptcha = !1, vcCommunicator.validateuseremail(t.email, !!e, i, null, t.signupToken, t.signupSessionId).then(function(a) {
322          a && a.availableEmail ? (t.hasValidatedEmail = !0, a.sentValidationCode ? t.hasRequestedAuthCode = !0 : t.requestValidationCode()) : a && a.needsChallenge && a.challengeType === "recaptcha_v2" ? (t.needsV2Challenge = !0, t.$nextTick(() => {
323            typeof grecaptcha < "u" && (t.v2WidgetId = grecaptcha.render(t.$refs.recaptchaV2, {
324              sitekey: window.RECAPTCHA_V2_SITE_KEY || "6LfWzNAsAAAAAMHKkGvDrtBi0-K6KTv5iahzBLCU",
325              callback: function(n) {
326                t.v2Token = n, t.isValidatingCaptcha = !0, vcCommunicator.validateuseremail(t.email, !!e, null, t.v2Token, t.signupToken, t.signupSessionId).then(function(o) {
327                  t.isValidatingCaptcha = !1, o && o.availableEmail ? (t.hasValidatedEmail = !0, t.needsV2Challenge = !1, o.sentValidationCode ? t.hasRequestedAuthCode = !0 : t.requestValidationCode()) : (t.hasValidatedEmail = !1, t.errorStatus = o.info || t.$t("errors.validation"));
328                }).catch((o) => {
329                  t.isValidatingCaptcha = !1, t.hasValidatedEmail = !1, t._setError(o, "validateuseremail_v2");
330                });
331              }
332            }));
333          })) : (t.hasValidatedEmail = !1, t.errorStatus = a.info);
334        }).catch((a) => {
335          t.hasValidatedEmail = !1, t._setError(a, "validateuseremail");
336        });
337      }).catch((i) => {
338        t.isValidatingCaptcha = !1, t._setError(i, "recaptcha_v3", "errors.captcha"), t.errorStatus = t.$t("errors.captcha");
339      });
340    },
341    requestValidationCode() {
342      var e = this;
343      let t = (/* @__PURE__ */ new Date()).getTime();
344      if (e._validationRequests > 10) {
345        e.errorStatus = "Email validation request limit exceeded.";
346        return;
347      }
348      if (t - e._lastValidationRequest < 3e4) {
349        e.errorStatus = e.$t("validation_wait");
350        return;
351      }
352      e.errorStatus = null, e._validationRequests++, e._lastValidationRequest = t, e.hasRequestedAuthCode = !0, e.errorStatus = null, vcCommunicator.generateAuthCode(e.email).then(function(i) {
353      }).catch((i) => {
354        e.hasRequestedAuthCode = !1, e._setError(i, "generateAuthCode", "errors.genauthcode");
355      });
356    },
357    requestValidateValidationCode: function() {
358      var e = this;
359      if (e.hasValidatedAuthCode = !1, !e.authCode || e.authCode.length !== 5) {
360        e.hasValidatedAuthCode = !1, !e.authCode || e.authCode.length < 5 ? e.errorStatus = e.$t("validation_too_short") : e.errorStatus = e.$t("validation_too_long"), e.processingMsg = null;
361        return;
362      }
363      e.isValidatingAuthCode = !0, vcCommunicator.validateemail(e.email, e.authCode, null).then(function(t) {
364        e.isValidatingAuthCode = !1, t && t.validCode ? (e.hasValidatedAuthCode = !0, e.errorStatus = null) : (e.errorStatus = e.$t("validation_incorrect"), e.hasValidatedAuthCode = !1);
365      }).catch((t) => {
366        e.isValidatingAuthCode = !1, e.hasValidatedAuthCode = !1, e._setError(t, "validateemail", "errors.validateemail");
367      });
368    },
369    createAccount: function() {
370      var e = this;
371      if (e.honeypot) {
372        e.hasCreatedAccount = !0;
373        return;
374      }
375      e.hasCreatedAccount = !1, e.isCreatingAccount = !0, e.errorStatus = null, e.needsV2ChallengeCreate = !1, e.v2TokenCreate = null, e.executeRecaptcha("signup_create_account").then((t) => vcCommunicator.createnewclient(e.email, e.password1, e.authCode, null, t, null)).then(function(t) {
376        if (t && t.needsChallenge && t.challengeType === "recaptcha_v2") {
377          e.isCreatingAccount = !1, e.needsV2ChallengeCreate = !0, e.$nextTick(() => {
378            typeof grecaptcha < "u" && e.$refs.recaptchaV2Create && (e.v2WidgetIdCreate = grecaptcha.render(e.$refs.recaptchaV2Create, {
379              sitekey: window.RECAPTCHA_V2_SITE_KEY || "6LfWzNAsAAAAAMHKkGvDrtBi0-K6KTv5iahzBLCU",
380              callback: function(i) {
381                e.v2TokenCreate = i, e.isCreatingAccount = !0, vcCommunicator.createnewclient(e.email, e.password1, e.authCode, null, null, e.v2TokenCreate).then(function(a) {
382                  e.needsV2ChallengeCreate = !1, e._handleCreateAccountResult(a);
383                }).catch((a) => {
384                  e.isCreatingAccount = !1, e._setError(a, "createnewclient_v2", "errors.createaccount");
385                });
386              }
387            }));
388          });
389          return;
390        }
391        e._handleCreateAccountResult(t);
392      }).catch((t) => {
393        e.isCreatingAccount = !1, e._setError(t, "createnewclient", "errors.createaccount");
394      });
395    },
396    /**
397     * Shared post-createnewclient handler. Runs analytics, auto-login, prefs save and redirect.
398     * Called both from the normal v3 flow and the v2-challenge fallback so behavior is identical.
399     */
400    _handleCreateAccountResult(e) {
401      var t = this;
402      t.isCreatingAccount = !1;
403      try {
404        if (window.gtag) {
405          let a = e && e.domainCategory || "Unknown";
406          gtag("event", "sign_up", { method: "Email", domaincategory: a }), gtag("set", "user_data", { email: t.email }), gtag("event", "conversion", {
407            send_to: "AW-1045373784/vk2eCMWmgboBENjGvPID",
408            event_callback: null
409          });
410        }
411      } catch (a) {
412        console.error("createAccount error", a);
413      }
414      if (e && !e.errorCode)
415        t.hasCreatedAccount = !0, vcCommunicator.createsession(t.email, t.password1).then(() => {
416          t.sessionId = vcCommunicator.sessionId, (t.emailPrefs.news_and_announcements || t.emailPrefs.marketing) && vcCommunicator.saveEmailPreferences(t.emailPrefs).catch((n) => {
417            console.warn("Could not save email preferences", n);
418          });
419          var a = t.forwardLocation || t.completionPath;
420          a && (window.location = a);
421        }).catch((a) => {
422          t.autoLoginFailed = !0;
423        }), t.$emit("signupcomplete");
424      else {
425        var i = {
426          message: e && e.message || t.$t("errors.createaccount") + " " + (e && e.errorCode || ""),
427          serverErrorCode: e && e.errorCode || 0,
428          status: 200,
429          url: "/createnewclient",
430          name: "VcServerError"
431        };
432        t._setError(i, "createnewclient_response", "errors.createaccount");
433      }
434    }
435  },
436  computed: {
437    hasSession() {
438      return !!this.sessionId;
439    },
440    signedInApiKey() {
441      return this.sessionState && this.sessionState.apiKey;
442    },
443    signedInEmail() {
444      return this.sessionState && this.sessionState.subscriptionParams && this.sessionState.subscriptionParams.custEmail;
445    },
446    signedInUsername() {
447      return this.sessionState && this.sessionState.contextProperties && this.sessionState.contextProperties.userName;
448    },
449    createAccountLabel() {
450      return this.$t(this.isCreatingAccount ? "creatingaccount" : "createaccount");
451    },
452    hasValidEmail() {
453      return this.email && _.validateEmail(this.email);
454    },
455    hasPwdConditions() {
456      var e = this;
457      return e.hasValidEmail && _.validateAuthCode(e.authCode) && _.validatePassword(e.password1);
458    },
459    hasCreateAccountConditions() {
460      var e = this;
461      return e.hasPwdConditions && e.hasAgreedToToS;
462    },
463    errorDetailsText() {
464      var e = this.errorDetails;
465      if (!e) return "";
466      var t = [
467        "Visual Crossing signup error",
468        "time:           " + e.timestamp,
469        "reference:      " + e.correlationId,
470        "context:        " + e.context,
471        "type:           " + e.type,
472        "http status:    " + e.status,
473        "server code:    " + e.serverErrorCode,
474        "url:            " + (e.url || ""),
475        "content-type:   " + (e.contentType || ""),
476        "message:        " + e.message,
477        "online:         " + e.online,
478        "captcha loaded: " + e.captchaLoaded,
479        "token loaded:   " + e.signupTokenLoaded,
480        "browser:        " + e.userAgent
481      ];
482      return t.join(`
483`);
484    }
485  },
486  watch: {
487    email: function() {
488      if (this.hasValidatedEmail = !1, this.hasRequestedAuthCode = !1, this.hasValidatedAuthCode = !1, this.authCode = null, this.password1 = null, this.hasAgreedToToS = !1, this.errorStatus = null, this.errorDetails = null, this.showErrorDetails = !1, this.needsV2Challenge = !1, this.v2Token = null, this.v2WidgetId && typeof grecaptcha < "u")
489        try {
490          grecaptcha.reset(this.v2WidgetId);
491        } catch {
492        }
493    },
494    authCode: function(e) {
495      e && e.length === 5 && !this.isValidatingAuthCode && this.requestValidateValidationCode();
496    },
497    hasRequestedAuthCode: function(e) {
498      e && this.$nextTick(() => {
499        var t;
500        return (t = this.$refs.authCodeInput) == null ? void 0 : t.focus();
501      });
502    },
503    hasValidatedAuthCode: function(e) {
504      e && this.$nextTick(() => {
505        var t;
506        return (t = this.$refs.passwordInput) == null ? void 0 : t.focus();
507      });
508    }
509  },
510  mounted() {
511    var e = this;
512    e._validationRequests = 0, e._lastValidationRequest = 0, e.forwardLocation = VcUtils.qs.from || null, e.requestedPlan = VcUtils.qs.pln || null;
513    var t = window.vcCommunicator;
514    if (!t) {
515      console.error("No vcCommunicator"), e.isContainerInited = !0;
516      return;
517    }
518    e.sessionId = t.sessionId, e.sessionState = t.sessionState, e.isContainerInited = t.isInited || !!e.sessionId, t.addHandler("createsession", function(i, a) {
519      e.sessionId = i, e.sessionState = a, e.isContainerInited = !0;
520    }), t.addHandler("createsessionfailed", function() {
521      e.sessionId = null, e.sessionState = null, e.isContainerInited = !0;
522    }), t.addHandler("terminatesession", function() {
523      e.sessionId = null, e.sessionState = null;
524    }), e.$nextTick(() => {
525      var i;
526      return (i = e.$refs.emailInput) == null ? void 0 : i.focus();
527    }), window.RECAPTCHA_V2_SITE_KEY || (window.RECAPTCHA_V2_SITE_KEY = "6LfWzNAsAAAAAMHKkGvDrtBi0-K6KTv5iahzBLCU"), window.onRecaptchaV2Load = function() {
528    }, e._fetchSignupToken = function() {
529      t.signupInit().then(function(i) {
530        i && i.signupToken && (e.signupToken = i.signupToken, e.signupSessionId = i.signupSessionId), i && typeof i.signupProtectionEnabled == "boolean" && (e.signupProtectionEnabled = i.signupProtectionEnabled);
531      }).catch(function(i) {
532        console.warn("signup/init failed:", i);
533      });
534    }, e._fetchSignupToken(), e._signupTokenRefreshTimer = setInterval(e._fetchSignupToken, 4 * 60 * 1e3);
535  },
536  beforeUnmount() {
537    this._signupTokenRefreshTimer && clearInterval(this._signupTokenRefreshTimer);
538  },
539  components: {
540    //CommonModals
541  }
542}, M = { class: "my-3" }, H = {
543  class: "signup card card-body border-0 shadow-sm p-4 mb-4",
544  style: { "max-width": "640px" }
545}, z = {
546  key: 0,
547  class: "alert alert-danger my-3",
548  role: "alert"
549}, U = {
550  key: 0,
551  class: "mt-2 small"
552}, x = { class: "text-muted ms-2" }, B = {
553  key: 0,
554  class: "mt-2"
555}, W = {
556  class: "bg-light p-2 mb-1 small",
557  style: { "white-space": "pre-wrap", "word-break": "break-word" }
558}, N = {
559  key: 1,
560  class: "d-flex align-items-center justify-content-center",
561  style: { "min-height": "220px" }
562}, G = {
563  class: "spinner-border mx-2",
564  style: { width: "3rem", height: "3rem" },
565  role: "status"
566}, F = { class: "visually-hidden" }, Z = { class: "text-center mb-3" }, Y = { class: "mt-2 mb-1" }, j = { class: "text-muted mb-0" }, O = { class: "card border-0 bg-light p-3 mb-3" }, Q = {
567  key: 0,
568  class: "mb-2"
569}, J = { class: "fw-bold fs-xs mb-1" }, X = {
570  key: 1,
571  class: "mb-2"
572}, $ = { class: "fw-bold fs-xs mb-1" }, ee = { class: "mb-1" }, te = { class: "fw-bold fs-xs mb-1" }, se = { class: "d-flex align-items-center flex-wrap" }, ne = { class: "fs-sm me-2 text-break" }, ie = { class: "d-flex gap-2 flex-wrap" }, ae = {
573  class: "btn btn-primary",
574  href: "/account"
575}, oe = {
576  class: "btn btn-outline-primary",
577  href: "/weather-query-builder/"
578}, re = {
579  class: "alert alert-success my-3",
580  role: "alert"
581}, le = {
582  class: "alert-link",
583  href: "#",
584  onclick: "window.dialogManager?.showSignIn(); return false;"
585}, de = {
586  key: 0,
587  class: "alert alert-warning my-1",
588  role: "alert"
589}, ce = { key: 1 }, ue = {
590  style: { position: "absolute", left: "-9999px" },
591  "aria-hidden": "true"
592}, he = { class: "row" }, me = { class: "col-12 col-md-10 col-lg-8" }, pe = { class: "mb-3" }, fe = ["disabled"], ge = ["placeholder", "disabled"], be = {
593  key: 0,
594  class: "row"
595}, ve = {
596  key: 0,
597  class: "col-12 mb-2"
598}, Ce = { ref: "recaptchaV2" }, we = {
599  key: 1,
600  class: "col-12"
601}, _e = ["disabled"], ye = {
602  key: 0,
603  class: "spinner-border spinner-border-sm me-1",
604  role: "status"
605}, ke = { class: "col-12 mt-2" }, Ae = {
606  class: "alert-link",
607  href: "#",
608  onclick: "window.dialogManager?.showSignIn(); return false;"
609}, Ve = { class: "row" }, Ee = { class: "col-12 col-md-10 col-lg-8" }, Se = { class: "mb-3" }, Te = {
610  for: "input-authcode",
611  class: "form-label"
612}, Ie = ["placeholder"], Pe = { class: "form-text" }, De = {
613  key: 0,
614  class: "text-danger"
615}, qe = { class: "row" }, Ke = { class: "col-12" }, Le = ["disabled"], Re = {
616  key: 0,
617  class: "spinner-border spinner-border-sm me-1",
618  role: "status"
619}, Me = { class: "row mb-3" }, He = { class: "col-12 col-md-10 col-lg-8 mb-2" }, ze = {
620  class: "form-label",
621  for: "pass-visibility1"
622}, Ue = { class: "input-group" }, xe = ["type", "placeholder"], Be = ["title"], We = {
623  key: 0,
624  class: "mt-1"
625}, Ne = { class: "small" }, Ge = { class: "col-12 col-md-10 col-lg-8 mb-2" }, Fe = { class: "form-label mb-1" }, Ze = { class: "form-check" }, Ye = {
626  class: "form-check-label small text-muted",
627  for: "pref-service"
628}, je = { class: "form-check" }, Oe = {
629  class: "form-check-label small",
630  for: "pref-news"
631}, Qe = { class: "form-check" }, Je = {
632  class: "form-check-label small",
633  for: "pref-marketing"
634}, Xe = { class: "col-12 col-md-10 col-lg-8 mb-3" }, $e = { class: "form-check" }, et = ["innerHTML"], tt = {
635  key: 0,
636  class: "row mb-2"
637}, st = { class: "col-12" }, nt = { ref: "recaptchaV2Create" }, it = {
638  key: 1,
639  class: "row"
640}, at = { class: "col-12" }, ot = ["disabled"], rt = ["disabled"], lt = ["disabled"];
641function dt(e, t, i, a, n, o) {
642  const f = y("i18n-t");
643  return d(), c("div", M, [
644    s("div", H, [
645      n.errorStatus ? (d(), c("div", z, [
646        s("div", null, l(n.errorStatus), 1),
647        n.errorDetails ? (d(), c("div", U, [
648          s("a", {
649            href: "#",
650            class: "alert-link",
651            onClick: t[0] || (t[0] = T((r) => n.showErrorDetails = !n.showErrorDetails, ["prevent"]))
652          }, l(n.showErrorDetails ? e.$t("errors.details_hide") : e.$t("errors.details_show")), 1),
653          s("span", x, [
654            h(l(e.$t("errors.ref_label")) + ": ", 1),
655            s("code", null, l(n.errorDetails.correlationId), 1)
656          ]),
657          n.showErrorDetails ? (d(), c("div", B, [
658            s("pre", W, l(o.errorDetailsText), 1),
659            s("button", {
660              type: "button",
661              class: "btn btn-sm btn-outline-secondary",
662              onClick: t[1] || (t[1] = (...r) => o.copyErrorDetails && o.copyErrorDetails(...r))
663            }, l(n.errorDetailsCopied ? e.$t("errors.details_copied") : e.$t("errors.details_copy")), 1)
664          ])) : u("", !0)
665        ])) : u("", !0)
666      ])) : u("", !0),
667      n.isContainerInited ? o.hasSession ? (d(), c(b, { key: 2 }, [
668        s("div", Z, [
669          t[22] || (t[22] = s("i", {
670            class: "bi bi-person-check-fill text-success",
671            style: { "font-size": "2.5rem" }
672          }, null, -1)),
673          s("h4", Y, l(n.hasCreatedAccount ? e.$t("signedin.welcometitle") : e.$t("signedin.title")), 1),
674          s("p", j, l(n.hasCreatedAccount ? e.$t("signedin.welcomesubtitle") : e.$t("signedin.subtitle")), 1)
675        ]),
676        s("div", O, [
677          o.signedInUsername ? (d(), c("div", Q, [
678            s("div", J, [
679              t[23] || (t[23] = s("i", { class: "bi bi-person me-1" }, null, -1)),
680              h(l(e.$t("signedin.username")), 1)
681            ]),
682            s("div", null, l(o.signedInUsername), 1)
683          ])) : u("", !0),
684          o.signedInEmail ? (d(), c("div", X, [
685            s("div", $, [
686              t[24] || (t[24] = s("i", { class: "bi bi-envelope me-1" }, null, -1)),
687              h(l(e.$t("signedin.email")), 1)
688            ]),
689            s("div", null, l(o.signedInEmail), 1)
690          ])) : u("", !0),
691          s("div", ee, [
692            s("div", te, [
693              t[25] || (t[25] = s("i", { class: "bi bi-code-slash me-1" }, null, -1)),
694              h(l(e.$t("signedin.apikey")), 1)
695            ]),
696            s("div", se, [
697              s("code", ne, l(o.signedInApiKey), 1),
698              s("button", {
699                type: "button",
700                class: "btn btn-sm btn-outline-primary",
701                onClick: t[2] || (t[2] = (...r) => o.copyApiKey && o.copyApiKey(...r))
702              }, [
703                t[26] || (t[26] = s("i", { class: "bi bi-clipboard me-1" }, null, -1)),
704                h(l(n.apiKeyCopied ? e.$t("signedin.copied") : e.$t("signedin.copy")), 1)
705              ])
706            ])
707          ])
708        ]),
709        s("div", ie, [
710          s("a", ae, [
711            t[27] || (t[27] = s("i", { class: "bi bi-person-gear me-1" }, null, -1)),
712            h(l(e.$t("signedin.accountpage")), 1)
713          ]),
714          s("a", oe, [
715            t[28] || (t[28] = s("i", { class: "bi bi-cloud-sun me-1" }, null, -1)),
716            h(l(e.$t("signedin.querybuilder")), 1)
717          ]),
718          i.showCancel ? (d(), c("button", {
719            key: 0,
720            type: "button",
721            class: "btn btn-link text-muted ms-auto",
722            onClick: t[3] || (t[3] = (...r) => o.cancel && o.cancel(...r))
723          }, l(e.$t("signedin.close")), 1)) : u("", !0)
724        ])
725      ], 64)) : n.hasCreatedAccount ? (d(), c(b, { key: 3 }, [
726        s("div", re, [
727          v(f, {
728            keypath: "signin_term",
729            tag: "label",
730            for: "signin_link"
731          }, {
732            default: g(() => [
733              s("a", le, l(e.$t("signin_link")), 1)
734            ]),
735            _: 1
736          })
737        ]),
738        n.autoLoginFailed ? (d(), c("div", de, l(e.$t("autologin_failed")), 1)) : u("", !0),
739        i.showCancel ? (d(), c("div", ce, [
740          s("button", {
741            type: "button",
742            class: "btn btn-link text-muted ps-0",
743            onClick: t[4] || (t[4] = (...r) => o.cancel && o.cancel(...r))
744          }, l(e.$t("signedin.close")), 1)
745        ])) : u("", !0)
746      ], 64)) : (d(), c(b, { key: 4 }, [
747        s("div", ue, [
748          t[29] || (t[29] = s("label", { for: "input-website" }, "Website", -1)),
749          p(s("input", {
750            "onUpdate:modelValue": t[5] || (t[5] = (r) => n.honeypot = r),
751            type: "text",
752            id: "input-website",
753            name: "website",
754            tabindex: "-1",
755            autocomplete: "off"
756          }, null, 512), [
757            [C, n.honeypot]
758          ])
759        ]),
760        s("div", he, [
761          s("div", me, [
762            s("div", pe, [
763              s("label", {
764                for: "input-email",
765                class: "form-label",
766                disabled: n.hasValidatedEmail
767              }, l(e.$t("accountemail")), 9, fe),
768              p(s("input", {
769                "onUpdate:modelValue": t[6] || (t[6] = (r) => n.email = r),
770                ref: "emailInput",
771                class: "form-control email",
772                id: "input-email",
773                type: "email",
774                placeholder: e.$t("emailprompt"),
775                disabled: n.hasValidatedEmail,
776                onKeyup: t[7] || (t[7] = I((r) => o.hasValidEmail && !n.isValidatingCaptcha && o.requestEmailValidation(!1), ["enter"]))
777              }, null, 40, ge), [
778                [
779                  C,
780                  n.email,
781                  void 0,
782                  { trim: !0 }
783                ]
784              ])
785            ])
786          ])
787        ]),
788        n.hasValidatedEmail ? u("", !0) : (d(), c("div", be, [
789          n.needsV2Challenge ? (d(), c("div", ve, [
790            t[30] || (t[30] = s("div", { class: "alert alert-info py-2 mb-2" }, "Please complete the verification below to continue.", -1)),
791            s("div", Ce, null, 512)
792          ])) : u("", !0),
793          n.needsV2Challenge ? u("", !0) : (d(), c("div", we, [
794            s("button", {
795              type: "button",
796              class: "btn btn-primary",
797              disabled: !o.hasValidEmail || n.isValidatingCaptcha,
798              onClick: t[8] || (t[8] = (r) => o.requestEmailValidation(!1))
799            }, [
800              n.isValidatingCaptcha ? (d(), c("span", ye)) : u("", !0),
801              h(" " + l(e.$t("continue")), 1)
802            ], 8, _e),
803            i.showCancel ? (d(), c("a", {
804              key: 0,
805              class: "alert-link px-2",
806              href: "#",
807              onClick: t[9] || (t[9] = (r) => o.cancel())
808            }, l(e.$t("cancel")), 1)) : u("", !0)
809          ])),
810          s("div", ke, [
811            v(f, {
812              keypath: "signinPrompt",
813              tag: "label",
814              for: "signin_link"
815            }, {
816              default: g(() => [
817                s("a", Ae, l(e.$t("signin_link")), 1)
818              ]),
819              _: 1
820            })
821          ])
822        ])),
823        n.hasRequestedAuthCode && !n.hasValidatedAuthCode ? (d(), c(b, { key: 1 }, [
824          s("div", Ve, [
825            s("div", Ee, [
826              s("div", Se, [
827                s("label", Te, l(e.$t("validationcode")), 1),
828                p(s("input", {
829                  "onUpdate:modelValue": t[10] || (t[10] = (r) => n.authCode = r),
830                  ref: "authCodeInput",
831                  class: "form-control",
832                  id: "input-authcode",
833                  type: "text",
834                  autocomplete: "one-time-code",
835                  inputmode: "numeric",
836                  maxlength: "5",
837                  placeholder: e.$t("validationcodeprompt")
838                }, null, 8, Ie), [
839                  [
840                    C,
841                    n.authCode,
842                    void 0,
843                    { trim: !0 }
844                  ]
845                ]),
846                s("div", Pe, [
847                  v(f, {
848                    keypath: "requestanothercode_term",
849                    tag: "span",
850                    for: "requestanothercode_link"
851                  }, {
852                    default: g(() => [
853                      s("a", {
854                        href: "#",
855                        onClick: t[11] || (t[11] = (r) => o.requestEmailValidation(!0))
856                      }, l(e.$t("requestanothercode_link")), 1)
857                    ]),
858                    _: 1
859                  })
860                ]),
861                n.errorStatus ? (d(), c("div", De, l(n.errorStatus), 1)) : u("", !0)
862              ])
863            ])
864          ]),
865          s("div", qe, [
866            s("div", Ke, [
867              s("button", {
868                type: "button",
869                class: "btn btn-primary",
870                disabled: !o.hasValidEmail || n.isValidatingAuthCode,
871                onClick: t[12] || (t[12] = (...r) => o.requestValidateValidationCode && o.requestValidateValidationCode(...r))
872              }, [
873                n.isValidatingAuthCode ? (d(), c("span", Re)) : u("", !0),
874                h(" " + l(e.$t("continue")), 1)
875              ], 8, Le),
876              i.showCancel ? (d(), c("a", {
877                key: 0,
878                class: "alert-link px-2",
879                href: "#",
880                onClick: t[13] || (t[13] = (r) => o.cancel())
881              }, l(e.$t("cancel")), 1)) : u("", !0)
882            ])
883          ])
884        ], 64)) : u("", !0),
885        n.hasValidatedAuthCode ? (d(), c(b, { key: 2 }, [
886          s("div", Me, [
887            s("div", He, [
888              s("label", ze, l(e.$t("password")), 1),
889              s("div", Ue, [
890                p(s("input", {
891                  "onUpdate:modelValue": t[14] || (t[14] = (r) => n.password1 = r),
892                  ref: "passwordInput",
893                  class: "form-control",
894                  type: n.showPassword ? "text" : "password",
895                  id: "pass-visibility1",
896                  autocomplete: "new-password",
897                  placeholder: e.$t("enterpassword")
898                }, null, 8, xe), [
899                  [P, n.password1]
900                ]),
901                s("button", {
902                  class: "btn btn-outline-secondary",
903                  type: "button",
904                  onClick: t[15] || (t[15] = (r) => n.showPassword = !n.showPassword),
905                  title: n.showPassword ? e.$t("hidepassword") : e.$t("showpassword")
906                }, [
907                  s("i", {
908                    class: m(["bi", n.showPassword ? "bi-eye-slash" : "bi-eye"])
909                  }, null, 2)
910                ], 8, Be)
911              ]),
912              n.password1 ? (d(), c("div", We, [
913                s("div", Ne, [
914                  s("span", {
915                    class: m(n.password1.length >= 8 ? "text-success" : "text-danger")
916                  }, [
917                    s("i", {
918                      class: m(["bi", n.password1.length >= 8 ? "bi-check-circle-fill" : "bi-x-circle"])
919                    }, null, 2),
920                    h(" " + l(e.$t("pwd_length")), 1)
921                  ], 2),
922                  t[31] || (t[31] = s("br", null, null, -1)),
923                  s("span", {
924                    class: m(/[A-Z]/.test(n.password1) ? "text-success" : "text-danger")
925                  }, [
926                    s("i", {
927                      class: m(["bi", /[A-Z]/.test(n.password1) ? "bi-check-circle-fill" : "bi-x-circle"])
928                    }, null, 2),
929                    h(" " + l(e.$t("pwd_uppercase")), 1)
930                  ], 2),
931                  t[32] || (t[32] = s("br", null, null, -1)),
932                  s("span", {
933                    class: m(/[a-z]/.test(n.password1) ? "text-success" : "text-danger")
934                  }, [
935                    s("i", {
936                      class: m(["bi", /[a-z]/.test(n.password1) ? "bi-check-circle-fill" : "bi-x-circle"])
937                    }, null, 2),
938                    h(" " + l(e.$t("pwd_lowercase")), 1)
939                  ], 2),
940                  t[33] || (t[33] = s("br", null, null, -1)),
941                  s("span", {
942                    class: m(/[0-9]/.test(n.password1) ? "text-success" : "text-danger")
943                  }, [
944                    s("i", {
945                      class: m(["bi", /[0-9]/.test(n.password1) ? "bi-check-circle-fill" : "bi-x-circle"])
946                    }, null, 2),
947                    h(" " + l(e.$t("pwd_number")), 1)
948                  ], 2)
949                ])
950              ])) : u("", !0)
951            ]),
952            s("div", Ge, [
953              s("label", Fe, l(e.$t("emailprefs.title")), 1),
954              s("div", Ze, [
955                t[34] || (t[34] = s("input", {
956                  class: "form-check-input",
957                  type: "checkbox",
958                  id: "pref-service",
959                  checked: "",
960                  disabled: ""
961                }, null, -1)),
962                s("label", Ye, l(e.$t("emailprefs.service")), 1)
963              ]),
964              s("div", je, [
965                p(s("input", {
966                  class: "form-check-input",
967                  type: "checkbox",
968                  id: "pref-news",
969                  "onUpdate:modelValue": t[16] || (t[16] = (r) => n.emailPrefs.news_and_announcements = r)
970                }, null, 512), [
971                  [w, n.emailPrefs.news_and_announcements]
972                ]),
973                s("label", Oe, l(e.$t("emailprefs.news_and_announcements")), 1)
974              ]),
975              s("div", Qe, [
976                p(s("input", {
977                  class: "form-check-input",
978                  type: "checkbox",
979                  id: "pref-marketing",
980                  "onUpdate:modelValue": t[17] || (t[17] = (r) => n.emailPrefs.marketing = r)
981                }, null, 512), [
982                  [w, n.emailPrefs.marketing]
983                ]),
984                s("label", Je, l(e.$t("emailprefs.marketing")), 1)
985              ])
986            ]),
987            s("div", Xe, [
988              s("div", $e, [
989                p(s("input", {
990                  class: "form-check-input",
991                  type: "checkbox",
992                  id: "toc",
993                  "onUpdate:modelValue": t[18] || (t[18] = (r) => n.hasAgreedToToS = r)
994                }, null, 512), [
995                  [w, n.hasAgreedToToS]
996                ]),
997                s("label", {
998                  class: "form-check-label",
999                  for: "toc",
1000                  innerHTML: e.$t("agree_terms", { link: "/weather-services-terms" })
1001                }, null, 8, et)
1002              ])
1003            ])
1004          ]),
1005          n.needsV2ChallengeCreate ? (d(), c("div", tt, [
1006            s("div", st, [
1007              t[35] || (t[35] = s("div", { class: "alert alert-info py-2 mb-2" }, "Please complete the verification below to create your account.", -1)),
1008              s("div", nt, null, 512)
1009            ])
1010          ])) : u("", !0),
1011          n.needsV2ChallengeCreate ? u("", !0) : (d(), c("div", it, [
1012            s("div", at, [
1013              s("button", {
1014                type: "button",
1015                class: "btn btn-secondary",
1016                disabled: n.isCreatingAccount,
1017                onClick: t[19] || (t[19] = (...r) => o.reset && o.reset(...r))
1018              }, l(e.$t("reset")), 9, ot),
1019              s("button", {
1020                type: "button",
1021                class: "btn btn-primary ms-2",
1022                disabled: !o.hasCreateAccountConditions || n.isCreatingAccount || n.errorStatus,
1023                onClick: t[20] || (t[20] = (...r) => o.createAccount && o.createAccount(...r))
1024              }, l(o.createAccountLabel), 9, rt),
1025              i.showCancel ? (d(), c("a", {
1026                key: 0,
1027                disabled: n.isCreatingAccount,
1028                class: "alert-link px-2",
1029                href: "#",
1030                onClick: t[21] || (t[21] = (r) => o.cancel())
1031              }, l(e.$t("cancel")), 9, lt)) : u("", !0)
1032            ])
1033          ]))
1034        ], 64)) : u("", !0)
1035      ], 64)) : (d(), c("div", N, [
1036        s("div", G, [
1037          s("span", F, l(e.$t("signedin.loading")), 1)
1038        ]),
1039        h(" " + l(e.$t("signedin.loading")), 1)
1040      ]))
1041    ])
1042  ]);
1043}
1044const Tt = /* @__PURE__ */ k(R, [["render", dt], ["__scopeId", "data-v-3e2b8622"]]), ct = {
1045  en: {
1046    messages: {
1047      loading: "Loading...",
1048      notsignedin: "You aren't signed into an account. Please {0} to access account information.",
1049      signin: "sign in"
1050    }
1051  },
1052  de: {
1053    messages: {
1054      loading: "Lädt...",
1055      notsignedin: "Sie sind nicht an einem Konto angemeldet. Bitte {0}, um auf Kontoinformationen zuzugreifen.",
1056      signin: "Anmelden"
1057    }
1058  }
1059}, ut = {
1060  key: 0,
1061  class: "d-flex align-items-center justify-content-center",
1062  style: { "min-height": "300px" }
1063}, ht = {
1064  class: "spinner-border mx-2",
1065  style: { width: "3rem", height: "3rem" },
1066  role: "status"
1067}, mt = { class: "visually-hidden" }, pt = {
1068  key: 1,
1069  class: "container my-3"
1070}, ft = {
1071  key: 2,
1072  class: "alert alert-primary my-3",
1073  role: "alert"
1074}, gt = {
1075  href: "#",
1076  onclick: "window.dialogManager?.showSignIn(); return false;"
1077}, bt = {
1078  i18n: {
1079    messages: ct
1080  },
1081  name: "LoaderMonitor",
1082  props: {
1083    optional: !1
1084  },
1085  data() {
1086    return {
1087      isContainerInited: !1,
1088      sessionId: null,
1089      sessionState: null
1090    };
1091  },
1092  methods: {},
1093  computed: {
1094    hasSession() {
1095      return this.sessionId && this.sessionState;
1096    }
1097  },
1098  unmounted() {
1099  },
1100  mounted() {
1101    var e = this, t = window.vcCommunicator;
1102    if (!t) {
1103      console.error("No vcCommunicator in LoaderMonitor!");
1104      return;
1105    }
1106    e.sessionId = t.sessionId, e.sessionState = t.sessionState, e.isContainerInited = t.isInited || e.sessionId, t.addHandler("createsession", function(i, a) {
1107      e.sessionId = i, e.sessionState = a, e.isContainerInited = !0;
1108    }), t.addHandler("createsessionfailed", function(i, a) {
1109      e.sessionId = null, e.sessionState = null, e.isContainerInited = !0;
1110    }), t.addHandler("terminatesession", function() {
1111      e.sessionId = null;
1112    });
1113  }
1114}, It = /* @__PURE__ */ Object.assign(bt, {
1115  setup(e) {
1116    return (t, i) => {
1117      const a = y("i18n-t");
1118      return d(), c("div", null, [
1119        t.isContainerInited ? u("", !0) : (d(), c("div", ut, [
1120          s("div", ht, [
1121            s("span", mt, l(t.$t("messages.loading")), 1)
1122          ]),
1123          h(" " + l(t.$t("messages.loading")), 1)
1124        ])),
1125        e.optional || t.hasSession ? (d(), c("div", pt, [
1126          D(t.$slots, "default", {
1127            sessionState: t.sessionState,
1128            sessionId: t.sessionId
1129          })
1130        ])) : (d(), c("div", ft, [
1131          i[0] || (i[0] = s("i", { class: "bi bi-lock" }, null, -1)),
1132          v(a, {
1133            keypath: "messages.notsignedin",
1134            tag: "span",
1135            for: "messages.signin"
1136          }, {
1137            default: g(() => [
1138              s("a", gt, l(t.$t("messages.signin")), 1)
1139            ]),
1140            _: 1
1141          })
1142        ])),
1143        v(S)
1144      ]);
1145    };
1146  }
1147}), vt = {
1148  name: "UnitGroupDropdown",
1149  components: { VcDropdown: V },
1150  props: {
1151    modelValue: { required: !0 },
1152    linkClass: {
1153      type: [String, Array, Object],
1154      default: ""
1155    }
1156  },
1157  data() {
1158    return {
1159      unitGroups: E.UNITGROUPS
1160    };
1161  },
1162  computed: {
1163    internalValue: {
1164      get() {
1165        return this.modelValue;
1166      },
1167      set(e) {
1168        this.$emit("update:modelValue", e);
1169      }
1170    }
1171  },
1172  methods: {
1173    labelFor(e, t) {
1174      const i = this.unitGroups.find((a) => (a == null ? void 0 : a.id) === e);
1175      return i ? t ? (i == null ? void 0 : i.shortlabel) ?? (i == null ? void 0 : i.label) ?? "" : (i == null ? void 0 : i.label) ?? "" : "";
1176    },
1177    onChange(e) {
1178      this.$emit("change", e);
1179    }
1180  }
1181}, Ct = ["innerHTML"], wt = ["innerHTML"], _t = ["innerHTML"], yt = ["innerHTML"], kt = {
1182  key: 0,
1183  class: "ms-2"
1184};
1185function At(e, t, i, a, n, o) {
1186  const f = y("VcDropdown");
1187  return d(), q(f, {
1188    modelValue: o.internalValue,
1189    "onUpdate:modelValue": t[0] || (t[0] = (r) => o.internalValue = r),
1190    items: n.unitGroups,
1191    linkClass: i.linkClass,
1192    onChange: o.onChange
1193  }, {
1194    button: g(({ selected: r }) => [
1195      s("span", {
1196        class: "d-none d-md-inline",
1197        innerHTML: o.labelFor(r == null ? void 0 : r.id, !1)
1198      }, null, 8, Ct),
1199      s("span", {
1200        class: "d-inline d-md-none",
1201        innerHTML: o.labelFor(r == null ? void 0 : r.id, !0)
1202      }, null, 8, wt)
1203    ]),
1204    item: g(({ item: r, selected: A }) => [
1205      s("span", {
1206        class: "d-none d-md-inline",
1207        innerHTML: r.label
1208      }, null, 8, _t),
1209      s("span", {
1210        class: "d-inline d-md-none",
1211        innerHTML: r.shortlabel || r.label
1212      }, null, 8, yt),
1213      A ? (d(), c("span", kt, "✓")) : u("", !0)
1214    ]),
1215    _: 1
1216  }, 8, ["modelValue", "items", "linkClass", "onChange"]);
1217}
1218const Pt = /* @__PURE__ */ k(vt, [["render", At]]);
1219export {
1220  Tt as S,
1221  Pt as U,
1222  _ as V,
1223  It as _
1224};
1225//# sourceMappingURL=UnitGroupDropdown-BmiwFnXt.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.