"use strict";
const errorCodes = require("./errorCodes-ifTrQJQk.cjs");
const z = require("zod");
const index = require("./user-v6mfWQ2d.cjs");
const lodash = require("lodash");
const short = require("short-uuid");
const uuid = require("uuid");
const SystemField = z.z.enum([
  "name",
  "email",
  "location",
  "title",
  "notes",
  "guests",
  "rescheduleReason",
  "smsReminderNumber",
  "attendeePhoneNumber"
]);
const SMS_REMINDER_NUMBER_FIELD = "smsReminderNumber";
const TITLE_FIELD = "title";
class ErrorWithCode extends Error {
  constructor(code, message, data) {
    super(message);
    this.code = code;
    this.data = data;
  }
  static get Factory() {
    return new Proxy(ErrorWithCode, {
      get(_, prop) {
        if (prop in errorCodes.ErrorCode) {
          const code = errorCodes.ErrorCode[prop];
          return (message, data) => new ErrorWithCode(code, message, data);
        }
        throw new Error(`Unknown error code: ${prop}`);
      }
    });
  }
}
function getErrorFromUnknown(cause) {
  if (cause instanceof Error) {
    return cause;
  }
  if (typeof cause === "string") {
    return new Error(cause, { cause });
  }
  return new Error(`Unhandled error of type '${typeof cause}''`);
}
async function handleErrorsJson(response) {
  if (response.headers.get("content-encoding") === "gzip") {
    const responseText = await response.text();
    return new Promise((resolve) => resolve(JSON.parse(responseText)));
  }
  if (response.status === 204) {
    return new Promise((resolve) => resolve({}));
  }
  if (!response.ok && (response.status < 200 || response.status >= 300)) {
    response.json().then(console.log);
    throw Error(response.statusText);
  }
  return response.json();
}
function handleErrorsRaw(response) {
  if (response.status === 204) {
    console.error({ response });
    return "{}";
  }
  if (!response.ok || response.status < 200 || response.status >= 300) {
    response.text().then(console.log);
    throw Error(response.statusText);
  }
  return response.text();
}
const name$G = "Campfire";
const slug$A = "campfire";
const type$A = "campfire_video";
const logo$A = "icon.svg";
const url$A = "https://cal.com/";
const variant$A = "conferencing";
const categories$A = [
  "conferencing"
];
const publisher$A = "Cal.com, Inc.";
const email$A = "help@cal.com";
const description$G = "Feel connected with your remote team. Team events, new hire onboardings, coffee chats, all on Campfire. No more awkward Zoom calls.\r\r";
const __createdUsingCli$z = true;
const appData$A = {
  location: {
    type: "integrations:campfire_video",
    label: "Campfire",
    linkType: "static",
    organizerInputPlaceholder: "https://party.campfire.to/your-team",
    urlRegExp: "^http(s)?:\\/\\/(www\\.)?party.campfire.to\\/[a-zA-Z0-9]*"
  }
};
const isOAuth$g = false;
const campfire_config_json = {
  "/*": "Don't modify slug - If required, do it using cli edit command",
  name: name$G,
  slug: slug$A,
  type: type$A,
  logo: logo$A,
  url: url$A,
  variant: variant$A,
  categories: categories$A,
  publisher: publisher$A,
  email: email$A,
  description: description$G,
  __createdUsingCli: __createdUsingCli$z,
  appData: appData$A,
  isOAuth: isOAuth$g
};
const name$F = "@calcom/dailyvideo";
const version$5 = "0.0.0";
const main$5 = "./index.ts";
const description$F = "Cal Video is the in-house web-based video conferencing platform powered by Daily.co, which is minimalistic and lightweight, but has most of the features you need.";
const dependencies$6 = {
  "@calcom/lib": "*",
  "@calcom/prisma": "*"
};
const devDependencies$5 = {
  "@calcom/types": "*"
};
const _package$5 = {
  "private": true,
  name: name$F,
  version: version$5,
  main: main$5,
  description: description$F,
  dependencies: dependencies$6,
  devDependencies: devDependencies$5
};
const metadata$5 = {
  name: "Cal Video",
  description: _package$5.description,
  installed: !!process.env.DAILY_API_KEY,
  type: "daily_video",
  variant: "conferencing",
  url: "https://daily.co",
  categories: ["conferencing"],
  logo: "icon.svg",
  publisher: "Cal.com",
  category: "conferencing",
  slug: "daily-video",
  title: "Cal Video",
  isGlobal: true,
  email: "help@cal.com",
  appData: {
    location: {
      linkType: "dynamic",
      type: "integrations:daily",
      label: "Cal Video"
    }
  },
  key: { apikey: process.env.DAILY_API_KEY },
  dirName: "dailyvideo",
  isOAuth: false
};
const name$E = "Demodesk";
const slug$z = "demodesk";
const type$z = "demodesk_conferencing";
const logo$z = "icon.svg";
const url$z = "https://demodesk.com";
const variant$z = "conferencing";
const categories$z = [
  "conferencing"
];
const publisher$z = "Cal.com, Inc.";
const email$z = "support@cal.com";
const appData$z = {
  location: {
    type: "integrations:{SLUG}_video",
    label: "{TITLE}",
    linkType: "static",
    organizerInputPlaceholder: "https://demodesk.com/meet/mylink",
    urlRegExp: "^http(s)?:\\/\\/(www\\.)?demodesk.com\\/[a-zA-Z0-9]*"
  }
};
const description$E = "Run Professional Video Meetings, Coach Sales Teams in Real-Time with AI, And Schedule Meetings on Auto-Pilot. 100% GDPR Compliant, Enterprise Ready.";
const isTemplate$n = false;
const __createdUsingCli$y = true;
const __template$j = "event-type-location-video-static";
const demodesk_config_json = {
  "/*": "Don't modify slug - If required, do it using cli edit command",
  name: name$E,
  slug: slug$z,
  type: type$z,
  logo: logo$z,
  url: url$z,
  variant: variant$z,
  categories: categories$z,
  publisher: publisher$z,
  email: email$z,
  appData: appData$z,
  description: description$E,
  isTemplate: isTemplate$n,
  __createdUsingCli: __createdUsingCli$y,
  __template: __template$j
};
const name$D = "dialpad";
const slug$y = "dialpad";
const type$y = "dialpad_conferencing";
const logo$y = "icon.svg";
const url$y = "https://meetings.dialpad.com/";
const variant$y = "conferencing";
const categories$y = [
  "conferencing"
];
const publisher$y = "Cal.com";
const email$y = "help@cal.com";
const appData$y = {
  location: {
    type: "integrations:{SLUG}_video",
    label: "{TITLE}",
    linkType: "static",
    organizerInputPlaceholder: "https://meetings.dialpad.com/adb2002",
    urlRegExp: "^https:\\/\\/meetings\\.dialpad\\.com\\/[a-zA-Z0-9]+$"
  }
};
const description$D = "A new way to meet, with built-in Ai";
const isTemplate$m = false;
const __createdUsingCli$x = true;
const __template$i = "event-type-location-video-static";
const dialpad_config_json = {
  "/*": "Don't modify slug - If required, do it using cli edit command",
  name: name$D,
  slug: slug$y,
  type: type$y,
  logo: logo$y,
  url: url$y,
  variant: variant$y,
  categories: categories$y,
  publisher: publisher$y,
  email: email$y,
  appData: appData$y,
  description: description$D,
  isTemplate: isTemplate$m,
  __createdUsingCli: __createdUsingCli$x,
  __template: __template$i
};
const name$C = "Discord";
const slug$x = "discord";
const type$x = "discord_video";
const logo$x = "icon.svg";
const url$x = "https://discord.com/";
const variant$x = "conferencing";
const categories$x = [
  "conferencing"
];
const publisher$x = "Cal.com, Inc.";
const email$x = "support@cal.com";
const appData$x = {
  location: {
    type: "integrations:{SLUG}_video",
    label: "{TITLE}",
    linkType: "static",
    organizerInputPlaceholder: "https://discord.gg/420gg69",
    urlRegExp: "^http(s)?:\\/\\/(www\\.)?discord\\.(gg|com)\\/[a-zA-Z0-9]+"
  }
};
const description$C = "Copy your server invite link and start scheduling calls in Discord! Discord is a VoIP and instant messaging social platform. Users have the ability to communicate with voice calls, video calls, text messaging, media and files in private chats or as part of communities.";
const isTemplate$l = false;
const __createdUsingCli$w = true;
const __template$h = "event-type-location-video-static";
const isOAuth$f = false;
const discord_config_json = {
  "/*": "Don't modify slug - If required, do it using cli edit command",
  name: name$C,
  slug: slug$x,
  type: type$x,
  logo: logo$x,
  url: url$x,
  variant: variant$x,
  categories: categories$x,
  publisher: publisher$x,
  email: email$x,
  appData: appData$x,
  description: description$C,
  isTemplate: isTemplate$l,
  __createdUsingCli: __createdUsingCli$w,
  __template: __template$h,
  isOAuth: isOAuth$f
};
const name$B = "8x8";
const slug$w = "eightxeight";
const type$w = "eightxeight_video";
const logo$w = "icon.svg";
const url$w = "https://github.com/shivamklr";
const variant$w = "conferencing";
const categories$w = [
  "conferencing"
];
const publisher$w = "Shivam Kalra";
const email$w = "shivamkalra98@gmail.com";
const appData$w = {
  location: {
    type: "integrations:{SLUG}_video",
    label: "{TITLE}",
    linkType: "static",
    organizerInputPlaceholder: "https://8x8.vc/company",
    urlRegExp: "^(http|https)://(www\\.)?8x8.vc/[a-zA-Z0-9]*"
  }
};
const description$B = "The best video conferencing solution for businesses of any size. Fully secure, reliable, packed with features and ridiculously simple to use.\r\r";
const isTemplate$k = false;
const __createdUsingCli$v = true;
const __template$g = "event-type-location-video-static";
const dirName$3 = "eightxeight";
const isOAuth$e = false;
const eightxeight_config_json = {
  "/*": "Don't modify slug - If required, do it using cli edit command",
  name: name$B,
  slug: slug$w,
  type: type$w,
  logo: logo$w,
  url: url$w,
  variant: variant$w,
  categories: categories$w,
  publisher: publisher$w,
  email: email$w,
  appData: appData$w,
  description: description$B,
  isTemplate: isTemplate$k,
  __createdUsingCli: __createdUsingCli$v,
  __template: __template$g,
  dirName: dirName$3,
  isOAuth: isOAuth$e
};
const name$A = "Element Call";
const slug$v = "element-call";
const type$v = "element-call_conferencing";
const logo$v = "icon.svg";
const url$v = "https://github.com/suyash5053/";
const variant$v = "conferencing";
const categories$v = [
  "conferencing"
];
const publisher$v = "Suyash Srivastava";
const email$v = "suyashsrivastava5053@gmail.com";
const appData$v = {
  location: {
    type: "integrations:{SLUG}_video",
    label: "{TITLE}",
    linkType: "static",
    organizerInputPlaceholder: "https://call.element.io/",
    urlRegExp: "^http(s)?:\\/\\/(www\\.)?call.element.io/[a-zA-Z0-9]*"
  }
};
const description$A = 'Element is an open-source communication platform that provides messaging, voice calling, and video conferencing capabilities. It is based on the Matrix protocol, which is a decentralized and federated messaging protocol designed to enable secure and interoperable communication across different platforms and services."';
const isTemplate$j = false;
const __createdUsingCli$u = true;
const __template$f = "event-type-location-video-static";
const dirName$2 = "element-call";
const isOAuth$d = false;
const element_call_config_json = {
  "/*": "Don't modify slug - If required, do it using cli edit command",
  name: name$A,
  slug: slug$v,
  type: type$v,
  logo: logo$v,
  url: url$v,
  variant: variant$v,
  categories: categories$v,
  publisher: publisher$v,
  email: email$v,
  appData: appData$v,
  description: description$A,
  isTemplate: isTemplate$j,
  __createdUsingCli: __createdUsingCli$u,
  __template: __template$f,
  dirName: dirName$2,
  isOAuth: isOAuth$d
};
const name$z = "Facetime";
const title$5 = "Facetime";
const slug$u = "facetime";
const type$u = "facetime_video";
const logo$u = "icon.svg";
const url$u = "https://github.com/Mythie";
const variant$u = "conferencing";
const categories$u = [
  "conferencing"
];
const publisher$u = "Lucas Smith";
const email$u = "help@cal.com";
const description$z = "Facetime makes it super simple for collaborating teams to jump on a video call.";
const __createdUsingCli$t = true;
const appData$u = {
  location: {
    linkType: "static",
    type: "integrations:facetime_video",
    label: "Facetime",
    organizerInputPlaceholder: "https://facetime.apple.com/join... link copied from the FaceTime app",
    urlRegExp: "^https?:\\/\\/facetime\\.apple\\.com\\/join.+$"
  }
};
const isTemplate$i = false;
const isOAuth$c = false;
const appConfig$2 = {
  "/*": "Don't modify slug - If required, do it using cli edit command",
  name: name$z,
  title: title$5,
  slug: slug$u,
  type: type$u,
  logo: logo$u,
  url: url$u,
  variant: variant$u,
  categories: categories$u,
  publisher: publisher$u,
  email: email$u,
  description: description$z,
  __createdUsingCli: __createdUsingCli$t,
  appData: appData$u,
  isTemplate: isTemplate$i,
  isOAuth: isOAuth$c
};
const name$y = "Fathom";
const slug$t = "fathom";
const type$t = "fathom_analytics";
const logo$t = "icon.svg";
const url$t = "https://cal.com";
const variant$t = "analytics";
const categories$t = [
  "analytics"
];
const publisher$t = "Cal.com, Inc.";
const email$t = "help@cal.com";
const extendsFeature$a = "EventType";
const appData$t = {
  tag: {
    scripts: [
      {
        src: "https://cdn.usefathom.com/script.js",
        attrs: {
          "data-site": "{TRACKING_ID}"
        }
      }
    ]
  }
};
const description$y = "Fathom Analytics provides simple, privacy-focused website analytics. We're a GDPR-compliant, Google Analytics alternative.";
const __createdUsingCli$s = true;
const isOAuth$b = false;
const fathom_config_json = {
  "/*": "Don't modify slug - If required, do it using cli edit command",
  name: name$y,
  slug: slug$t,
  type: type$t,
  logo: logo$t,
  url: url$t,
  variant: variant$t,
  categories: categories$t,
  publisher: publisher$t,
  email: email$t,
  extendsFeature: extendsFeature$a,
  appData: appData$t,
  description: description$y,
  __createdUsingCli: __createdUsingCli$s,
  isOAuth: isOAuth$b
};
const name$x = "Google Analytics";
const slug$s = "ga4";
const type$s = "ga4_analytics";
const logo$s = "icon.svg";
const url$s = "https://marketingplatform.google.com";
const variant$s = "analytics";
const categories$s = [
  "analytics"
];
const publisher$s = "Cal.com, Inc.";
const email$s = "support@cal.com";
const description$x = "Google Analytics is a web analytics service offered by Google that tracks and reports website traffic, currently as a platform inside the Google Marketing Platform brand.";
const extendsFeature$9 = "EventType";
const appData$s = {
  tag: {
    scripts: [
      {
        src: "https://www.googletagmanager.com/gtag/js?id={TRACKING_ID}",
        attrs: {}
      },
      {
        content: "window.dataLayer = window.dataLayer || [];\n      function gtag(){dataLayer.push(arguments);}\n      gtag('js', new Date());\n      gtag('config', '{TRACKING_ID}', {'cookie_flags': 'SameSite=None;Secure'});"
      }
    ]
  }
};
const __createdUsingCli$r = true;
const isOAuth$a = false;
const ga4_config_json = {
  "/*": "Don't modify slug - If required, do it using cli edit command",
  name: name$x,
  slug: slug$s,
  type: type$s,
  logo: logo$s,
  url: url$s,
  variant: variant$s,
  categories: categories$s,
  publisher: publisher$s,
  email: email$s,
  description: description$x,
  extendsFeature: extendsFeature$9,
  appData: appData$s,
  __createdUsingCli: __createdUsingCli$r,
  isOAuth: isOAuth$a
};
const validJson = (jsonString) => {
  try {
    const o = JSON.parse(jsonString);
    if (o && typeof o === "object") {
      return o;
    }
  } catch (e) {
    console.log("Invalid JSON:", e);
  }
  return false;
};
const $schema = "https://json.schemastore.org/package.json";
const name$w = "@calcom/googlevideo";
const version$4 = "0.0.0";
const main$4 = "./index.ts";
const description$w = "Google Meet is Google's web-based video conferencing platform, designed to compete with major conferencing platforms.";
const dependencies$5 = {
  "@calcom/prisma": "*"
};
const devDependencies$4 = {
  "@calcom/types": "*"
};
const _package$4 = {
  $schema,
  "private": true,
  name: name$w,
  version: version$4,
  main: main$4,
  description: description$w,
  dependencies: dependencies$5,
  devDependencies: devDependencies$4
};
const metadata$4 = {
  name: "Google Meet",
  description: _package$4.description,
  installed: !!(process.env.GOOGLE_API_CREDENTIALS && validJson(process.env.GOOGLE_API_CREDENTIALS)),
  slug: "google-meet",
  category: "conferencing",
  categories: ["conferencing"],
  type: "google_video",
  title: "Google Meet",
  variant: "conferencing",
  logo: "logo.webp",
  publisher: "Cal.com",
  url: "https://cal.com/",
  isGlobal: false,
  email: "help@cal.com",
  appData: {
    location: {
      linkType: "dynamic",
      type: "integrations:google:meet",
      label: "Google Meet"
    }
  },
  dirName: "googlevideo",
  dependencies: ["google-calendar"],
  isOAuth: false
};
const name$v = "Google Tag Manager";
const slug$r = "gtm";
const type$r = "gtm_analytics";
const logo$r = "icon.svg";
const url$r = "https://tagmanager.google.com";
const variant$r = "analytics";
const categories$r = [
  "analytics"
];
const publisher$r = "Black Lemon";
const email$r = "support@blacklemon.dk";
const description$v = "App to install Google Tag Manager";
const extendsFeature$8 = "EventType";
const appData$r = {
  tag: {
    scripts: [
      {
        content: "(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','{TRACKING_ID}');"
      }
    ],
    pushEventScript: {
      content: "function $pushEvent(event) {window.dataLayer.push({ event: event.name, ...event.data })}"
    }
  }
};
const isTemplate$h = false;
const __createdUsingCli$q = true;
const __template$e = "booking-pages-tag";
const isOAuth$9 = false;
const gtm_config_json = {
  name: name$v,
  slug: slug$r,
  type: type$r,
  logo: logo$r,
  url: url$r,
  variant: variant$r,
  categories: categories$r,
  publisher: publisher$r,
  email: email$r,
  description: description$v,
  extendsFeature: extendsFeature$8,
  appData: appData$r,
  isTemplate: isTemplate$h,
  __createdUsingCli: __createdUsingCli$q,
  __template: __template$e,
  isOAuth: isOAuth$9
};
const name$u = "Horizon Workrooms";
const slug$q = "horizon-workrooms";
const type$q = "horizon-workrooms_conferencing";
const logo$q = "icon.svg";
const url$q = "https://forwork.meta.com/de/en/horizon-workrooms/";
const variant$q = "conferencing";
const categories$q = [
  "conferencing"
];
const publisher$q = "Cal.com, Inc";
const email$q = "support@cal.com";
const appData$q = {
  location: {
    type: "integrations:{SLUG}_video",
    label: "{TITLE}",
    linkType: "static",
    organizerInputPlaceholder: "https://workrooms.workplace.com/groupcall/LINK:uALeBBTZbdBowT",
    urlRegExp: "^http(s)?:\\/\\/(www\\.)?workrooms.workplace.com\\/[a-zA-Z0-9]*"
  }
};
const description$u = "Workrooms is an immersive virtual space, where you and your team can work better together, from anywhere";
const isTemplate$g = false;
const __createdUsingCli$p = true;
const __template$d = "event-type-location-video-static";
const horizon_workrooms_config_json = {
  "/*": "Don't modify slug - If required, do it using cli edit command",
  name: name$u,
  slug: slug$q,
  type: type$q,
  logo: logo$q,
  url: url$q,
  variant: variant$q,
  categories: categories$q,
  publisher: publisher$q,
  email: email$q,
  appData: appData$q,
  description: description$u,
  isTemplate: isTemplate$g,
  __createdUsingCli: __createdUsingCli$p,
  __template: __template$d
};
const name$t = "@calcom/huddle01video";
const version$3 = "0.0.0";
const main$3 = "./index.ts";
const description$t = "Huddle01 is a new video conferencing software native to Web3 and is comparable to a decentralized version of Zoom. It supports conversations for NFT communities, DAOs, Builders and also has features such as token gating, NFTs as avatars, Web3 Login + ENS and recording over IPFS.";
const dependencies$4 = {
  "@calcom/lib": "*"
};
const devDependencies$3 = {
  "@calcom/types": "*"
};
const _package$3 = {
  "private": true,
  name: name$t,
  version: version$3,
  main: main$3,
  description: description$t,
  dependencies: dependencies$4,
  devDependencies: devDependencies$3
};
const metadata$3 = {
  name: "Huddle01",
  description: _package$3.description,
  installed: true,
  type: "huddle01_video",
  variant: "conferencing",
  categories: ["video", "conferencing"],
  logo: "icon.svg",
  publisher: "huddle01.com",
  url: "https://huddle01.com",
  category: "conferencing",
  slug: "huddle01",
  title: "Huddle01",
  isGlobal: false,
  email: "support@huddle01.com",
  appData: {
    location: {
      linkType: "dynamic",
      type: "integrations:huddle01_video",
      label: "Huddle01 Video"
    }
  },
  dirName: "huddle01video",
  concurrentMeetings: true,
  isOAuth: false
};
const name$s = "Insihts";
const slug$p = "insihts";
const type$p = "insihts_analytics";
const logo$p = "icon.svg";
const url$p = "https://cal.com/";
const variant$p = "analytics";
const categories$p = [
  "analytics"
];
const publisher$p = "Cal.com, Inc.";
const email$p = "help@cal.com";
const description$s = "Insihts is an all-in-one platform for businesses looking to track user behavior, optimize workflows, and make data-driven decisions. Whether you are a marketer, product manager, or part of a customer success team, Insihts provides the tools you need to succeed.";
const extendsFeature$7 = "EventType";
const appData$p = {
  tag: {
    scripts: [
      {
        src: "https://collector.insihts.com/script.js",
        attrs: {
          "data-website-id": "{SITE_ID}"
        }
      }
    ]
  }
};
const isTemplate$f = false;
const __createdUsingCli$o = true;
const __template$c = "booking-pages-tag";
const insihts_config_json = {
  name: name$s,
  slug: slug$p,
  type: type$p,
  logo: logo$p,
  url: url$p,
  variant: variant$p,
  categories: categories$p,
  publisher: publisher$p,
  email: email$p,
  description: description$s,
  extendsFeature: extendsFeature$7,
  appData: appData$p,
  isTemplate: isTemplate$f,
  __createdUsingCli: __createdUsingCli$o,
  __template: __template$c
};
const name$r = "Jelly";
const slug$o = "jelly";
const type$o = "jelly_conferencing";
const logo$o = "icon.svg";
const url$o = "https://jellyjelly.com";
const variant$o = "conferencing";
const categories$o = [
  "conferencing"
];
const publisher$o = "Jelly";
const email$o = "support@jellyjelly.com";
const appData$o = {
  location: {
    type: "integrations:{SLUG}_conferencing",
    label: "{TITLE}",
    linkType: "dynamic"
  }
};
const description$r = "Jelly is a camera-free voice chat platform. No frills, no makeup needed, just good talking. Our AI magic handles the rest by highlighting and publishing key moments with rich visuals.";
const isTemplate$e = false;
const __createdUsingCli$n = true;
const __template$b = "event-type-location-video-static";
const jelly_config_json = {
  "/*": "Don't modify slug - If required, do it using cli edit command",
  name: name$r,
  slug: slug$o,
  type: type$o,
  logo: logo$o,
  url: url$o,
  variant: variant$o,
  categories: categories$o,
  publisher: publisher$o,
  email: email$o,
  appData: appData$o,
  description: description$r,
  isTemplate: isTemplate$e,
  __createdUsingCli: __createdUsingCli$n,
  __template: __template$b
};
const name$q = "@calcom/jitsivideo";
const version$2 = "0.0.0";
const main$2 = "./index.ts";
const description$q = "Jitsi is a free open-source video conferencing software for web and mobile. Make a call, launch on your own servers, integrate into your app, and more.";
const dependencies$3 = {
  "@calcom/lib": "*"
};
const devDependencies$2 = {
  "@calcom/types": "*"
};
const _package$2 = {
  "private": true,
  name: name$q,
  version: version$2,
  main: main$2,
  description: description$q,
  dependencies: dependencies$3,
  devDependencies: devDependencies$2
};
const metadata$2 = {
  name: "Jitsi Video",
  description: _package$2.description,
  installed: true,
  type: "jitsi_video",
  variant: "conferencing",
  categories: ["conferencing"],
  logo: "icon.svg",
  publisher: "Cal.com",
  url: "https://jitsi.org/",
  slug: "jitsi",
  title: "Jitsi Meet",
  isGlobal: false,
  email: "help@cal.com",
  appData: {
    location: {
      linkType: "dynamic",
      type: "integrations:jitsi",
      label: "Jitsi Video"
    }
  },
  dirName: "jitsivideo",
  concurrentMeetings: true,
  isOAuth: false
};
const name$p = "Matomo";
const slug$n = "matomo";
const type$n = "matomo_analytics";
const logo$n = "icon.svg";
const url$n = "https://cal.com/";
const variant$n = "analytics";
const categories$n = [
  "analytics"
];
const publisher$n = "Cal.com, Inc.";
const email$n = "help@cal.com";
const description$p = "Google Analytics alternative that protects your data and your customers' privacy";
const extendsFeature$6 = "EventType";
const appData$n = {
  tag: {
    scripts: [
      {
        src: "{MATOMO_URL}/matomo.js",
        attrs: {}
      },
      {
        content: "var _paq = window._paq || [];\n      _paq.push(['trackPageView']);\n      _paq.push(['enableLinkTracking']);\n      (function() {\n        var u='{MATOMO_URL}/';  \n        _paq.push(['setTrackerUrl', u+'matomo.php']);\n        _paq.push(['setSiteId', '{SITE_ID}']);  \n        var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];\n        g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);\n      })();"
      }
    ]
  }
};
const isTemplate$d = false;
const __createdUsingCli$m = true;
const __template$a = "booking-pages-tag";
const matomo_config_json = {
  name: name$p,
  slug: slug$n,
  type: type$n,
  logo: logo$n,
  url: url$n,
  variant: variant$n,
  categories: categories$n,
  publisher: publisher$n,
  email: email$n,
  description: description$p,
  extendsFeature: extendsFeature$6,
  appData: appData$n,
  isTemplate: isTemplate$d,
  __createdUsingCli: __createdUsingCli$m,
  __template: __template$a
};
const name$o = "Meta Pixel";
const slug$m = "metapixel";
const type$m = "metapixel_analytics";
const logo$m = "icon.svg";
const url$m = "https://github.com/regexyl";
const variant$m = "analytics";
const categories$m = [
  "analytics"
];
const publisher$m = "Regina Liu";
const email$m = "info@regexyl.com";
const description$o = "Add Meta Pixel to your bookings page to measure, optimize and build audiences for your ad campaigns.";
const extendsFeature$5 = "EventType";
const isTemplate$c = false;
const __createdUsingCli$l = true;
const __template$9 = "event-type-app-card";
const appData$m = {
  tag: {
    scripts: [
      {
        content: "!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,document,'script','https://connect.facebook.net/en_US/fbevents.js');fbq('init','{TRACKING_ID}');fbq('trackCustom','CalcomView');"
      }
    ]
  }
};
const isOAuth$8 = false;
const metapixel_config_json = {
  name: name$o,
  slug: slug$m,
  type: type$m,
  logo: logo$m,
  url: url$m,
  variant: variant$m,
  categories: categories$m,
  publisher: publisher$m,
  email: email$m,
  description: description$o,
  extendsFeature: extendsFeature$5,
  isTemplate: isTemplate$c,
  __createdUsingCli: __createdUsingCli$l,
  __template: __template$9,
  appData: appData$m,
  isOAuth: isOAuth$8
};
const name$n = "Mirotalk";
const slug$l = "mirotalk";
const type$l = "mirotalk_video";
const logo$l = "icon.svg";
const url$l = "https://cal.com/";
const variant$l = "conferencing";
const categories$l = [
  "conferencing"
];
const publisher$l = "Cal.com, Inc.";
const email$l = "support@cal.com";
const appData$l = {
  location: {
    type: "integrations:{SLUG}_video",
    label: "{TITLE}",
    linkType: "static",
    organizerInputPlaceholder: "https://p2p.mirotalk.com/join/80085ShinyPhone",
    urlRegExp: "^(http|https):\\/\\/(p2p|sfu)\\.mirotalk\\.com\\/join\\/[a-zA-Z0-9._-]+$"
  }
};
const description$n = "Peer to peer real-time video conferences, optimized for small groups. Unlimited time, unlimited rooms each having 5-8 participants.";
const isTemplate$b = false;
const __createdUsingCli$k = true;
const __template$8 = "event-type-location-video-static";
const dirName$1 = "mirotalk";
const isOAuth$7 = false;
const mirotalk_config_json = {
  "/*": "Don't modify slug - If required, do it using cli edit command",
  name: name$n,
  slug: slug$l,
  type: type$l,
  logo: logo$l,
  url: url$l,
  variant: variant$l,
  categories: categories$l,
  publisher: publisher$l,
  email: email$l,
  appData: appData$l,
  description: description$n,
  isTemplate: isTemplate$b,
  __createdUsingCli: __createdUsingCli$k,
  __template: __template$8,
  dirName: dirName$1,
  isOAuth: isOAuth$7
};
const name$m = "Nextcloud Talk";
const slug$k = "nextcloudtalk";
const type$k = "nextcloudtalk_video";
const logo$k = "icon.svg";
const url$k = "https://nextcloud.com/talk";
const variant$k = "conferencing";
const categories$k = [
  "conferencing"
];
const publisher$k = "Cal.com";
const email$k = "help@cal.com";
const appData$k = {
  location: {
    type: "integrations:{SLUG}_conferencing",
    label: "{TITLE}",
    linkType: "dynamic"
  }
};
const description$m = "Nextcloud Talk is a fully self hosted, on-premises audio/video and chat communication service. It features web and mobile apps and is designed to offer the highest degree of security while being easy to use.";
const isTemplate$a = false;
const __createdUsingCli$j = true;
const config$4 = {
  "/*": "Don't modify slug - If required, do it using cli edit command",
  name: name$m,
  slug: slug$k,
  type: type$k,
  logo: logo$k,
  url: url$k,
  variant: variant$k,
  categories: categories$k,
  publisher: publisher$k,
  email: email$k,
  appData: appData$k,
  description: description$m,
  isTemplate: isTemplate$a,
  __createdUsingCli: __createdUsingCli$j
};
const name$l = "Microsoft 365/Teams (Requires work/school account)";
const description$l = "Microsoft Teams is a business communication platform and collaborative workspace included in Microsoft 365. It offers workspace chat and video conferencing, file storage, and application integration. Both web versions and desktop/mobile applications are available. NOTE: MUST HAVE A WORK / SCHOOL ACCOUNT";
const type$j = "office365_video";
const variant$j = "conferencing";
const logo$j = "icon.svg";
const publisher$j = "Cal.com";
const url$j = "https://www.microsoft.com/en-ca/microsoft-teams/group-chat-software";
const verified = true;
const rating = 4.3;
const reviews = 69;
const categories$j = [
  "conferencing"
];
const slug$j = "msteams";
const title$4 = "MS Teams (Requires work/school account)";
const trending = true;
const email$j = "help@cal.com";
const appData$j = {
  location: {
    linkType: "dynamic",
    type: "integrations:office365_video",
    label: "MS Teams"
  }
};
const dirName = "office365video";
const dependencies$2 = [
  "office365-calendar"
];
const concurrentMeetings$1 = true;
const isOAuth$6 = true;
const config$3 = {
  name: name$l,
  description: description$l,
  type: type$j,
  variant: variant$j,
  logo: logo$j,
  publisher: publisher$j,
  url: url$j,
  verified,
  rating,
  reviews,
  categories: categories$j,
  slug: slug$j,
  title: title$4,
  trending,
  email: email$j,
  appData: appData$j,
  dirName,
  dependencies: dependencies$2,
  concurrentMeetings: concurrentMeetings$1,
  isOAuth: isOAuth$6
};
const name$k = "Ping.gg";
const title$3 = "Ping.gg";
const slug$i = "ping";
const type$i = "ping_video";
const logo$i = "icon.svg";
const url$i = "https://ping.gg";
const variant$i = "conferencing";
const categories$i = [
  "conferencing"
];
const publisher$i = "Ping.gg";
const email$i = "support@ping.gg";
const description$k = "Ping.gg makes high quality video collaborations easier than ever. Think 'Zoom for streamers and creators'. Join a call in 3 clicks, manage audio and video like a pro, and copy-paste your guests straight into OBS";
const __createdUsingCli$i = true;
const appData$i = {
  location: {
    linkType: "static",
    type: "integrations:ping_video",
    label: "Ping.gg",
    organizerInputPlaceholder: "https://www.ping.gg/call/theo",
    urlRegExp: "^http(s)?:\\/\\/(www\\.)?ping.gg\\/call\\/[a-zA-Z0-9]*"
  }
};
const isOAuth$5 = false;
const ping_config_json = {
  "/*": "Don't modify slug - If required, do it using cli edit command",
  name: name$k,
  title: title$3,
  slug: slug$i,
  type: type$i,
  logo: logo$i,
  url: url$i,
  variant: variant$i,
  categories: categories$i,
  publisher: publisher$i,
  email: email$i,
  description: description$k,
  __createdUsingCli: __createdUsingCli$i,
  appData: appData$i,
  isOAuth: isOAuth$5
};
const name$j = "Plausible";
const slug$h = "plausible";
const type$h = "plausible_analytics";
const logo$h = "icon.svg";
const url$h = "https://cal.com/";
const variant$h = "analytics";
const categories$h = [
  "analytics"
];
const publisher$h = "Cal.com, Inc.";
const email$h = "help@cal.com";
const extendsFeature$4 = "EventType";
const appData$h = {
  tag: {
    scripts: [
      {
        src: "{PLAUSIBLE_URL}",
        attrs: {
          "data-domain": "{TRACKING_ID}"
        }
      }
    ]
  }
};
const description$j = "Simple, privacy-friendly Google Analytics alternative.";
const __createdUsingCli$h = true;
const isOAuth$4 = false;
const appConfig$1 = {
  "/*": "Don't modify slug - If required, do it using cli edit command",
  name: name$j,
  slug: slug$h,
  type: type$h,
  logo: logo$h,
  url: url$h,
  variant: variant$h,
  categories: categories$h,
  publisher: publisher$h,
  email: email$h,
  extendsFeature: extendsFeature$4,
  appData: appData$h,
  description: description$j,
  __createdUsingCli: __createdUsingCli$h,
  isOAuth: isOAuth$4
};
const name$i = "Posthog";
const slug$g = "posthog";
const type$g = "posthog_analytics";
const logo$g = "icon.svg";
const url$g = "https://posthog.com";
const variant$g = "analytics";
const categories$g = [
  "analytics"
];
const publisher$g = "Cal.com, Inc.";
const email$g = "help@cal.com";
const description$i = "PostHog is the all-in-one platform for building better products - with product analytics, feature flags, session recordings, a/b testing, heatmaps, and more.";
const extendsFeature$3 = "EventType";
const appData$g = {
  tag: {
    scripts: [
      {
        content: "!function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split('.');2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement('script')).type='text/javascript',p.async=!0,p.src=s.api_host.replace('.i.posthog.com','-assets.i.posthog.com')+'/static/array.js',(r=t.getElementsByTagName('script')[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a='posthog',u.people=u.people||[],u.toString=function(t){var e='posthog';return'posthog'!==a&&(e+='.'+a),t||(e+=' (stub)'),e},u.people.toString=function(){return u.toString(1)+'.people (stub)'},o='capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags getFeatureFlag getFeatureFlagPayload reloadFeatureFlags group updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures getActiveMatchingSurveys getSurveys onSessionId'.split(' '),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);posthog.init('{TRACKING_ID}',{api_host:'{API_HOST}'})"
      }
    ]
  }
};
const isTemplate$9 = false;
const __createdUsingCli$g = true;
const __template$7 = "booking-pages-tag";
const posthog_config_json = {
  name: name$i,
  slug: slug$g,
  type: type$g,
  logo: logo$g,
  url: url$g,
  variant: variant$g,
  categories: categories$g,
  publisher: publisher$g,
  email: email$g,
  description: description$i,
  extendsFeature: extendsFeature$3,
  appData: appData$g,
  isTemplate: isTemplate$9,
  __createdUsingCli: __createdUsingCli$g,
  __template: __template$7
};
const name$h = "Riverside";
const slug$f = "riverside";
const type$f = "riverside_video";
const logo$f = "icon-dark.svg";
const url$f = "https://cal.com/";
const variant$f = "conferencing";
const categories$f = [
  "conferencing"
];
const publisher$f = "Cal.com, Inc.";
const email$f = "help@cal.com";
const description$h = "Your online recording studio. The easiest way to record podcasts and videos in studio quality from anywhere. All from the browser.";
const __createdUsingCli$f = true;
const appData$f = {
  location: {
    label: "Riverside Video",
    urlRegExp: "^http(s)?:\\/\\/(www\\.)?riverside.fm\\/studio\\/[a-zA-Z0-9]*",
    type: "integrations:riverside_video",
    linkType: "static"
  }
};
const isOAuth$3 = false;
const riverside_config_json = {
  "/*": "Don't modify slug - If required, do it using cli edit command",
  name: name$h,
  slug: slug$f,
  type: type$f,
  logo: logo$f,
  url: url$f,
  variant: variant$f,
  categories: categories$f,
  publisher: publisher$f,
  email: email$f,
  description: description$h,
  __createdUsingCli: __createdUsingCli$f,
  appData: appData$f,
  isOAuth: isOAuth$3
};
const name$g = "Roam";
const slug$e = "roam";
const type$e = "roam_conferencing";
const logo$e = "icon.png";
const url$e = "https://ro.am";
const variant$e = "conferencing";
const categories$e = [
  "conferencing"
];
const publisher$e = "Roam HQ, Inc.";
const email$e = "support@ro.am";
const appData$e = {
  location: {
    type: "integrations:{SLUG}_video",
    label: "{TITLE}",
    linkType: "static",
    organizerInputPlaceholder: "https://ro.am/r/#/p/yHwFBQrRTMuptqKYo_wu8A/huzRiHnR-np4RGYKV-c0pQ",
    urlRegExp: "^http(s)?:\\/\\/(www\\.)?ro.am\\/[a-zA-Z0-9]*"
  }
};
const description$g = "Roam is Your Whole Company in one HQ\r";
const isTemplate$8 = false;
const __createdUsingCli$e = true;
const __template$6 = "event-type-location-video-static";
const roam_config_json = {
  "/*": "Don't modify slug - If required, do it using cli edit command",
  name: name$g,
  slug: slug$e,
  type: type$e,
  logo: logo$e,
  url: url$e,
  variant: variant$e,
  categories: categories$e,
  publisher: publisher$e,
  email: email$e,
  appData: appData$e,
  description: description$g,
  isTemplate: isTemplate$8,
  __createdUsingCli: __createdUsingCli$e,
  __template: __template$6
};
const name$f = "Salesroom";
const slug$d = "salesroom";
const type$d = "salesroom_conferencing";
const logo$d = "icon.svg";
const url$d = "https://salesroom.com/";
const variant$d = "conferencing";
const categories$d = [
  "conferencing"
];
const publisher$d = "Cal.com, Inc.";
const email$d = "support@cal.com";
const appData$d = {
  location: {
    type: "integrations:{SLUG}_video",
    label: "{TITLE}",
    linkType: "static",
    organizerInputPlaceholder: "https://user.sr.chat",
    urlRegExp: "^https:\\/\\/.+\\.sr\\.chat"
  }
};
const description$f = "Unlock real-time AI and take your sales game to the next level";
const isTemplate$7 = false;
const __createdUsingCli$d = true;
const __template$5 = "event-type-location-video-static";
const salesroom_config_json = {
  "/*": "Don't modify slug - If required, do it using cli edit command",
  name: name$f,
  slug: slug$d,
  type: type$d,
  logo: logo$d,
  url: url$d,
  variant: variant$d,
  categories: categories$d,
  publisher: publisher$d,
  email: email$d,
  appData: appData$d,
  description: description$f,
  isTemplate: isTemplate$7,
  __createdUsingCli: __createdUsingCli$d,
  __template: __template$5
};
const name$e = "Shimmer Video";
const slug$c = "shimmervideo";
const type$c = "shimmer_video";
const logo$c = "icon.png";
const url$c = "https://shimmer.care";
const variant$c = "conferencing";
const categories$c = [
  "conferencing"
];
const publisher$c = "Shimmer.care";
const email$c = "support@shimmer.care";
const description$e = "The #1 Expert ADHD Coach. Weekly calls and in-app support so that you can reach your full potential";
const isTemplate$6 = false;
const __createdUsingCli$c = true;
const __template$4 = "basic";
const appData$c = {
  location: {
    linkType: "dynamic",
    type: "integrations:shimmer_video",
    label: "Shimmer Video"
  }
};
const config$2 = {
  "/*": "Don't modify slug - If required, do it using cli edit command",
  name: name$e,
  slug: slug$c,
  type: type$c,
  logo: logo$c,
  url: url$c,
  variant: variant$c,
  categories: categories$c,
  publisher: publisher$c,
  email: email$c,
  description: description$e,
  isTemplate: isTemplate$6,
  __createdUsingCli: __createdUsingCli$c,
  __template: __template$4,
  appData: appData$c
};
const name$d = "Signal";
const slug$b = "signal";
const type$b = "signal_video";
const logo$b = "icon.svg";
const url$b = "https://cal.com/";
const variant$b = "messaging";
const categories$b = [
  "messaging"
];
const publisher$b = "Cal.com, Inc.";
const email$b = "support@cal.com";
const description$d = "Schedule a chat with your guests or have a Signal Video call.";
const __createdUsingCli$b = true;
const appData$b = {
  location: {
    type: "integrations:signal_video",
    label: "Signal",
    linkType: "static",
    organizerInputPlaceholder: "https://signal.me/#p/+11234567890",
    urlRegExp: "^http(s)?:\\/\\/(www\\.)?signal.me\\/[a-zA-Z0-9]*"
  }
};
const isOAuth$2 = false;
const signal_config_json = {
  "/*": "Don't modify slug - If required, do it using cli edit command",
  name: name$d,
  slug: slug$b,
  type: type$b,
  logo: logo$b,
  url: url$b,
  variant: variant$b,
  categories: categories$b,
  publisher: publisher$b,
  email: email$b,
  description: description$d,
  __createdUsingCli: __createdUsingCli$b,
  appData: appData$b,
  isOAuth: isOAuth$2
};
const name$c = "Sirius Video";
const slug$a = "sirius_video";
const type$a = "sirius_video_video";
const logo$a = "icon-dark.svg";
const url$a = "https://cal.com/";
const variant$a = "conferencing";
const categories$a = [
  "conferencing"
];
const publisher$a = "Cal.com, Inc.";
const email$a = "support@cal.com";
const description$c = "Video meetings made for music.\rCreate your own virtual music classroom, easily.";
const __createdUsingCli$a = true;
const appData$a = {
  location: {
    type: "integrations:sirius_video_video",
    label: "Sirius Video",
    linkType: "static",
    organizerInputPlaceholder: "https://sirius.video/sebastian",
    urlRegExp: "^http(s)?:\\/\\/(www\\.)?sirius.video\\/[a-zA-Z0-9]*"
  }
};
const isOAuth$1 = false;
const sirius_video_config_json = {
  "/*": "Don't modify slug - If required, do it using cli edit command",
  name: name$c,
  slug: slug$a,
  type: type$a,
  logo: logo$a,
  url: url$a,
  variant: variant$a,
  categories: categories$a,
  publisher: publisher$a,
  email: email$a,
  description: description$c,
  __createdUsingCli: __createdUsingCli$a,
  appData: appData$a,
  isOAuth: isOAuth$1
};
const name$b = "Skype";
const slug$9 = "skype";
const type$9 = "skype_conferencing";
const logo$9 = "icon.svg";
const url$9 = "https://github.com/anikdhabal/";
const variant$9 = "conferencing";
const categories$9 = [
  "conferencing"
];
const publisher$9 = "Anik Dhabal Babu";
const email$9 = "adhabl2002@gmail.com";
const appData$9 = {
  location: {
    type: "integrations:{SLUG}_video",
    label: "{TITLE}",
    linkType: "static",
    organizerInputPlaceholder: "https://join.skype.com/",
    urlRegExp: "https://join\\.skype\\.com/[a-zA-Z0-9]*"
  }
};
const description$b = "Skype is for connecting with the people that matter most in your life and work. It's built for both one-on-one and group conversations and works wherever you are – via mobile, PC and Alexa. Skype messaging and HD voice and video calling will help you share experiences and get things done with others.";
const isTemplate$5 = false;
const __createdUsingCli$9 = true;
const __template$3 = "event-type-location-video-static";
const skype_config_json = {
  "/*": "Don't modify slug - If required, do it using cli edit command",
  name: name$b,
  slug: slug$9,
  type: type$9,
  logo: logo$9,
  url: url$9,
  variant: variant$9,
  categories: categories$9,
  publisher: publisher$9,
  email: email$9,
  appData: appData$9,
  description: description$b,
  isTemplate: isTemplate$5,
  __createdUsingCli: __createdUsingCli$9,
  __template: __template$3
};
const name$a = "Sylaps";
const title$2 = "Sylaps";
const slug$8 = "sylapsvideo";
const type$8 = "sylaps_video";
const logo$8 = "icon.svg";
const url$8 = "https://sylaps.com";
const variant$8 = "conferencing";
const categories$8 = [
  "conferencing"
];
const publisher$8 = "Sylaps Inc";
const email$8 = "support@sylaps.com";
const description$a = "Free Audio and Video Conferencing, Online Collaboration, Screen Sharing on web browser, mobile and desktop.";
const __createdUsingCli$8 = true;
const appData$8 = {
  location: {
    linkType: "dynamic",
    type: "integrations:sylaps_video",
    label: "Sylaps"
  }
};
const isOAuth = false;
const config$1 = {
  "/*": "Don't modify slug - If required, do it using cli edit command",
  name: name$a,
  title: title$2,
  slug: slug$8,
  type: type$8,
  logo: logo$8,
  url: url$8,
  variant: variant$8,
  categories: categories$8,
  publisher: publisher$8,
  email: email$8,
  description: description$a,
  __createdUsingCli: __createdUsingCli$8,
  appData: appData$8,
  isOAuth
};
const name$9 = "@calcom/tandemvideo";
const version$1 = "0.0.0";
const main$1 = "./index.ts";
const description$9 = "Tandem is a new virtual office space that allows teams to effortlessly connect as though they are in a physical office, online. Through co-working rooms, available statuses, live real-time video call, and chat options, you can see who’s around, talk and collaborate in one click. It works cross-platform with both desktop and mobile versions.";
const dependencies$1 = {
  "@calcom/lib": "*",
  "@calcom/prisma": "*"
};
const devDependencies$1 = {
  "@calcom/types": "*"
};
const _package$1 = {
  "private": true,
  name: name$9,
  version: version$1,
  main: main$1,
  description: description$9,
  dependencies: dependencies$1,
  devDependencies: devDependencies$1
};
const metadata$1 = {
  name: "Tandem Video",
  description: _package$1.description,
  type: "tandem_video",
  title: "Tandem Video",
  variant: "conferencing",
  categories: ["conferencing"],
  slug: "tandem",
  category: "conferencing",
  logo: "icon.svg",
  publisher: "",
  url: "",
  isGlobal: false,
  email: "help@cal.com",
  appData: {
    location: {
      linkType: "dynamic",
      type: "integrations:tandem",
      label: "Tandem Video"
    }
  },
  dirName: "tandemvideo",
  isOAuth: true
};
const name$8 = "Telegram";
const slug$7 = "telegram";
const type$7 = "telegram_video";
const logo$7 = "icon.svg";
const url$7 = "https://cal.com/";
const variant$7 = "messaging";
const categories$7 = [
  "messaging"
];
const publisher$7 = "Cal.com, Inc.";
const email$7 = "support@cal.com";
const description$8 = "Schedule a chat with your guests or have a Telegram Video call.";
const __createdUsingCli$7 = true;
const appData$7 = {
  location: {
    type: "integrations:telegram_video",
    label: "Telegram",
    linkType: "static",
    organizerInputPlaceholder: "https://t.me/MyUsername",
    urlRegExp: "^http(s)?:\\/\\/(www\\.)?t.me\\/[a-zA-Z0-9]*"
  }
};
const appConfig = {
  "/*": "Don't modify slug - If required, do it using cli edit command",
  name: name$8,
  slug: slug$7,
  type: type$7,
  logo: logo$7,
  url: url$7,
  variant: variant$7,
  categories: categories$7,
  publisher: publisher$7,
  email: email$7,
  description: description$8,
  __createdUsingCli: __createdUsingCli$7,
  appData: appData$7
};
const name$7 = "Booking Pages Tag";
const slug$6 = "booking-pages-tag";
const type$6 = "booking-pages-tag_analytics";
const logo$6 = "icon.svg";
const url$6 = "https://example.com/link";
const variant$6 = "analytics";
const categories$6 = [
  "analytics"
];
const publisher$6 = "Cal.com, Inc.";
const email$6 = "support@cal.com";
const description$7 = "It is a template demoing a Booking Pages tracking app like GA4, Fathom and Plausible.";
const extendsFeature$2 = "EventType";
const appData$6 = {
  tag: {
    scripts: [
      {
        src: "https://cdn.example.com/script.js",
        attrs: {
          "data-site": "{TRACKING_ID}"
        }
      }
    ]
  }
};
const isTemplate$4 = true;
const __createdUsingCli$6 = true;
const booking_pages_tag_config_json = {
  name: name$7,
  slug: slug$6,
  type: type$6,
  logo: logo$6,
  url: url$6,
  variant: variant$6,
  categories: categories$6,
  publisher: publisher$6,
  email: email$6,
  description: description$7,
  extendsFeature: extendsFeature$2,
  appData: appData$6,
  isTemplate: isTemplate$4,
  __createdUsingCli: __createdUsingCli$6
};
const name$6 = "EventType Location Video - Static";
const slug$5 = "event-type-location-video-static";
const type$5 = "event-type-location-video-static_video";
const logo$5 = "icon.svg";
const url$5 = "https://example.com/link";
const variant$5 = "conferencing";
const categories$5 = [
  "conferencing"
];
const publisher$5 = "Cal.com Inc";
const email$5 = "support@cal.com";
const appData$5 = {
  location: {
    type: "integrations:{SLUG}_video",
    label: "{TITLE}",
    linkType: "static",
    organizerInputPlaceholder: "https://video.app/mylink",
    urlRegExp: "^http(s)?:\\/\\/(www\\.)?video.app\\/[a-zA-Z0-9]*"
  }
};
const description$6 = "It is a template showing how to add a static URL EventType location e.g. Around, Whereby";
const isTemplate$3 = true;
const __createdUsingCli$5 = true;
const event_type_location_video_static_config_json = {
  "/*": "Don't modify slug - If required, do it using cli edit command",
  name: name$6,
  slug: slug$5,
  type: type$5,
  logo: logo$5,
  url: url$5,
  variant: variant$5,
  categories: categories$5,
  publisher: publisher$5,
  email: email$5,
  appData: appData$5,
  description: description$6,
  isTemplate: isTemplate$3,
  __createdUsingCli: __createdUsingCli$5
};
const name$5 = "Twipla";
const slug$4 = "twipla";
const type$4 = "twipla_analytics";
const logo$4 = "icon.svg";
const url$4 = "https://cal.com/";
const variant$4 = "analytics";
const categories$4 = [
  "analytics"
];
const publisher$4 = "Cal.com, Inc.";
const email$4 = "help@cal.com";
const description$5 = "Twipla.com, formerly known as Visitor Analytics, is a website intelligence platform that helps you understand how visitors interact with your website.";
const extendsFeature$1 = "EventType";
const appData$4 = {
  tag: {
    scripts: [
      {
        content: "(function(v, i, s, a, t) {\n  v[t] = v[t] || function() {\n    (v[t].v = v[t].v || []).push(arguments);\n  };\n  if (!v._visaSettings) {\n    v._visaSettings = {};\n  }\n  v._visaSettings[a] = {\n    v: '1.0',\n    s: a,\n    a: '1',\n    t: t\n  };\n  var b = i.getElementsByTagName('body')[0];\n  var p = i.createElement('script');\n  p.defer = 1;\n  p.async = 1;\n  p.src = s + '?s=' + a;\n  b.appendChild(p);\n})(window, document, '//app-worker.visitor-analytics.io/main.js', '{SITE_ID}', 'va');"
      }
    ]
  }
};
const isTemplate$2 = false;
const __createdUsingCli$4 = true;
const __template$2 = "booking-pages-tag";
const twipla_config_json = {
  name: name$5,
  slug: slug$4,
  type: type$4,
  logo: logo$4,
  url: url$4,
  variant: variant$4,
  categories: categories$4,
  publisher: publisher$4,
  email: email$4,
  description: description$5,
  extendsFeature: extendsFeature$1,
  appData: appData$4,
  isTemplate: isTemplate$2,
  __createdUsingCli: __createdUsingCli$4,
  __template: __template$2
};
const name$4 = "Umami";
const slug$3 = "umami";
const type$3 = "umami_analytics";
const logo$3 = "icon.svg";
const url$3 = "https://cal.com/";
const variant$3 = "analytics";
const categories$3 = [
  "analytics"
];
const publisher$3 = "Cal.com, Inc.";
const email$3 = "help@cal.com";
const description$4 = "Umami makes it easy to collect, analyze, and understand your web data — while maintaining visitor privacy and data ownership.";
const extendsFeature = "EventType";
const appData$3 = {
  tag: {
    scripts: [
      {
        src: "{SCRIPT_URL}",
        attrs: {
          "data-website-id": "{SITE_ID}"
        }
      }
    ]
  }
};
const isTemplate$1 = false;
const __createdUsingCli$3 = true;
const __template$1 = "booking-pages-tag";
const umami_config_json = {
  name: name$4,
  slug: slug$3,
  type: type$3,
  logo: logo$3,
  url: url$3,
  variant: variant$3,
  categories: categories$3,
  publisher: publisher$3,
  email: email$3,
  description: description$4,
  extendsFeature,
  appData: appData$3,
  isTemplate: isTemplate$1,
  __createdUsingCli: __createdUsingCli$3,
  __template: __template$1
};
const name$3 = "Webex";
const title$1 = "Webex";
const slug$2 = "webex";
const type$2 = "webex_video";
const imageSrc = "/icon.ico";
const logo$2 = "/icon.ico";
const url$2 = "https://github.com/aar2dee2";
const variant$2 = "conferencing";
const categories$2 = [
  "conferencing"
];
const publisher$2 = "aar2dee2";
const email$2 = "support@cal.com";
const description$3 = "Create meetings with Cisco Webex";
const appData$2 = {
  location: {
    linkType: "dynamic",
    type: "integrations:webex_video",
    label: "Webex"
  }
};
const isTemplate = false;
const __createdUsingCli$2 = true;
const __template = "basic";
const concurrentMeetings = true;
const isAuth$2 = true;
const config = {
  "/*": "Don't modify slug - If required, do it using cli edit command",
  name: name$3,
  title: title$1,
  slug: slug$2,
  type: type$2,
  imageSrc,
  logo: logo$2,
  url: url$2,
  variant: variant$2,
  categories: categories$2,
  publisher: publisher$2,
  email: email$2,
  description: description$3,
  appData: appData$2,
  isTemplate,
  __createdUsingCli: __createdUsingCli$2,
  __template,
  concurrentMeetings,
  isAuth: isAuth$2
};
const name$2 = "WhatsApp";
const slug$1 = "whatsapp";
const type$1 = "whatsapp_video";
const logo$1 = "icon.svg";
const url$1 = "https://cal.com/";
const variant$1 = "messaging";
const categories$1 = [
  "messaging"
];
const publisher$1 = "Cal.com, Inc.";
const email$1 = "support@cal.com";
const description$2 = "Schedule a chat with your guests or have a WhatsApp Video call.";
const __createdUsingCli$1 = true;
const appData$1 = {
  location: {
    type: "integrations:whatsapp_video",
    label: "WhatsApp",
    linkType: "static",
    organizerInputPlaceholder: "https://wa.me/send?phone=1234567890",
    urlRegExp: "^http(s)?:\\/\\/(www\\.)?wa.me\\/[a-zA-Z0-9]*"
  }
};
const isAuth$1 = false;
const whatsapp_config_json = {
  "/*": "Don't modify slug - If required, do it using cli edit command",
  name: name$2,
  slug: slug$1,
  type: type$1,
  logo: logo$1,
  url: url$1,
  variant: variant$1,
  categories: categories$1,
  publisher: publisher$1,
  email: email$1,
  description: description$2,
  __createdUsingCli: __createdUsingCli$1,
  appData: appData$1,
  isAuth: isAuth$1
};
const name$1 = "Whereby";
const title = "Whereby";
const slug = "whereby";
const type = "whereby_video";
const logo = "icon-dark.svg";
const url = "https://cal.com/";
const variant = "conferencing";
const categories = [
  "conferencing"
];
const publisher = "Cal.com, Inc.";
const email = "help@cal.com";
const description$1 = "Whereby makes it super simple for collaborating teams to jump on a video call.";
const __createdUsingCli = true;
const appData = {
  location: {
    linkType: "static",
    type: "integrations:whereby_video",
    label: "Whereby Video",
    organizerInputPlaceholder: "https://www.whereby.com/cal",
    urlRegExp: "^(?:https?://)?(?:(?!.*-\\.)(?:\\w+(-\\w+)*\\.))*whereby\\.com(/[\\w\\-._~:?#\\[\\]@!$&'()*+,;%=]+)*$"
  }
};
const isAuth = false;
const whereby_config_json = {
  "/*": "Don't modify slug - If required, do it using cli edit command",
  name: name$1,
  title,
  slug,
  type,
  logo,
  url,
  variant,
  categories,
  publisher,
  email,
  description: description$1,
  __createdUsingCli,
  appData,
  isAuth
};
const name = "@calcom/zoomvideo";
const version = "0.0.0";
const main = "./index.ts";
const description = "Zoom is a secure and reliable video platform that supports all of your online communication needs. It can provide everything from one on one meetings, chat, phone, webinars, and large-scale online events. Available with both desktop, web, and mobile versions.";
const dependencies = {
  "@calcom/lib": "*",
  "@calcom/prisma": "*"
};
const devDependencies = {
  "@calcom/types": "*"
};
const _package = {
  "private": true,
  name,
  version,
  main,
  description,
  dependencies,
  devDependencies
};
const metadata = {
  linkType: "dynamic",
  name: "Zoom Video",
  description: _package.description,
  type: "zoom_video",
  categories: ["conferencing"],
  variant: "conferencing",
  logo: "icon.svg",
  publisher: "Cal.com",
  url: "https://zoom.us/",
  category: "conferencing",
  slug: "zoom",
  title: "Zoom Video",
  email: "help@cal.com",
  appData: {
    location: {
      default: false,
      linkType: "dynamic",
      type: "integrations:zoom",
      label: "Zoom Video"
    }
  },
  dirName: "zoomvideo",
  isOAuth: true
};
const appStoreMetadata$1 = {
  campfire: campfire_config_json,
  dailyvideo: metadata$5,
  demodesk: demodesk_config_json,
  dialpad: dialpad_config_json,
  discord: discord_config_json,
  eightxeight: eightxeight_config_json,
  "element-call": element_call_config_json,
  facetime: appConfig$2,
  fathom: fathom_config_json,
  ga4: ga4_config_json,
  googlevideo: metadata$4,
  gtm: gtm_config_json,
  "horizon-workrooms": horizon_workrooms_config_json,
  huddle01video: metadata$3,
  insihts: insihts_config_json,
  jelly: jelly_config_json,
  jitsivideo: metadata$2,
  matomo: matomo_config_json,
  metapixel: metapixel_config_json,
  mirotalk: mirotalk_config_json,
  nextcloudtalk: config$4,
  office365video: config$3,
  ping: ping_config_json,
  plausible: appConfig$1,
  posthog: posthog_config_json,
  riverside: riverside_config_json,
  roam: roam_config_json,
  salesroom: salesroom_config_json,
  shimmervideo: config$2,
  signal: signal_config_json,
  sirius_video: sirius_video_config_json,
  skype: skype_config_json,
  sylapsvideo: config$1,
  tandemvideo: metadata$1,
  telegram: appConfig,
  "booking-pages-tag": booking_pages_tag_config_json,
  "event-type-location-video-static": event_type_location_video_static_config_json,
  twipla: twipla_config_json,
  umami: umami_config_json,
  webex: config,
  whatsapp: whatsapp_config_json,
  whereby: whereby_config_json,
  zoomvideo: metadata
};
function getAppAssetFullPath(assetPath, metadata2) {
  const appDirName = `${metadata2.isTemplate ? "templates/" : ""}${metadata2.dirName}`;
  let assetFullPath = assetPath;
  if (!assetPath.startsWith("/app-store/") && !/^https?/.test(assetPath)) {
    assetFullPath = `/app-store/${appDirName}/${assetPath}`;
  }
  return assetFullPath;
}
const getNormalizedAppMetadata = (appMeta) => {
  const dirName2 = "dirName" in appMeta ? appMeta.dirName : appMeta.slug;
  if (!dirName2) {
    throw new Error(`Couldn't derive dirName for app ${appMeta.name}`);
  }
  const metadata2 = {
    appData: null,
    dirName: dirName2,
    __template: "",
    ...appMeta
  };
  metadata2.logo = getAppAssetFullPath(metadata2.logo, {
    dirName: dirName2,
    isTemplate: metadata2.isTemplate
  });
  return metadata2;
};
const appStoreMetadata = {};
for (const [key, value] of Object.entries(appStoreMetadata$1)) {
  appStoreMetadata[key] = getNormalizedAppMetadata(value);
}
const DailyLocationType = "integrations:daily";
const CalVideoLocationType = DailyLocationType;
const MeetLocationType = "integrations:google:meet";
const MSTeamsLocationType = "integrations:office365_video";
const OrganizerDefaultConferencingAppType = "conferencing";
var DefaultEventLocationTypeEnum = /* @__PURE__ */ ((DefaultEventLocationTypeEnum2) => {
  DefaultEventLocationTypeEnum2["AttendeeInPerson"] = "attendeeInPerson";
  DefaultEventLocationTypeEnum2["InPerson"] = "inPerson";
  DefaultEventLocationTypeEnum2["Phone"] = "phone";
  DefaultEventLocationTypeEnum2["UserPhone"] = "userPhone";
  DefaultEventLocationTypeEnum2["Link"] = "link";
  DefaultEventLocationTypeEnum2["Conferencing"] = "conferencing";
  DefaultEventLocationTypeEnum2["SomewhereElse"] = "somewhereElse";
  return DefaultEventLocationTypeEnum2;
})(DefaultEventLocationTypeEnum || {});
const defaultLocations = [
  {
    default: true,
    type: "attendeeInPerson",
    label: "in_person_attendee_address",
    variable: "address",
    organizerInputType: null,
    messageForOrganizer: "Cal will ask your invitee to enter an address before scheduling.",
    attendeeInputType: "attendeeAddress",
    attendeeInputPlaceholder: "enter_address",
    defaultValueVariable: "attendeeAddress",
    iconUrl: "/map-pin-dark.svg",
    category: "in person",
    linkType: "static"
  },
  {
    default: true,
    type: "somewhereElse",
    label: "custom_attendee_location",
    variable: "address",
    organizerInputType: null,
    messageForOrganizer: "Cal will ask your invitee to enter any location before scheduling.",
    attendeeInputType: "somewhereElse",
    attendeeInputPlaceholder: "any_location",
    defaultValueVariable: "somewhereElse",
    iconUrl: "/message-pin.svg",
    category: "other",
    linkType: "static"
  },
  {
    default: true,
    type: "inPerson",
    label: "in_person",
    organizerInputType: "text",
    messageForOrganizer: "Provide an Address or Place",
    // HACK:
    variable: "locationAddress",
    defaultValueVariable: "address",
    iconUrl: "/map-pin-dark.svg",
    category: "in person",
    linkType: "static"
  },
  {
    default: true,
    type: "conferencing",
    iconUrl: "/link.svg",
    organizerInputType: null,
    label: "organizer_default_conferencing_app",
    variable: "hostDefault",
    defaultValueVariable: "hostDefault",
    category: "conferencing",
    messageForOrganizer: "",
    linkType: "static",
    supportsCustomLabel: true
  },
  {
    default: true,
    type: "link",
    label: "link_meeting",
    organizerInputType: "text",
    organizerInputLabel: "meeting_link",
    variable: "locationLink",
    messageForOrganizer: "Provide a Meeting Link",
    defaultValueVariable: "link",
    iconUrl: "/link.svg",
    category: "other",
    linkType: "static",
    supportsCustomLabel: true
  },
  {
    default: true,
    type: "phone",
    label: "attendee_phone_number",
    variable: "phone",
    organizerInputType: null,
    attendeeInputType: "phone",
    attendeeInputPlaceholder: `enter_phone_number`,
    defaultValueVariable: "phone",
    messageForOrganizer: "Cal will ask your invitee to enter a phone number before scheduling.",
    // This isn't inputType phone because organizer doesn't need to provide it.
    // inputType: "phone"
    iconUrl: "/phone.svg",
    category: "phone",
    linkType: "static"
  },
  {
    default: true,
    type: "userPhone",
    label: "organizer_phone_number",
    messageForOrganizer: "Provide your phone number",
    organizerInputType: "phone",
    organizerInputLabel: "phone_number",
    variable: "locationPhoneNumber",
    defaultValueVariable: "hostPhoneNumber",
    iconUrl: "/phone.svg",
    category: "phone",
    linkType: "static"
  }
];
const AppStoreLocationType = {};
const locationsFromApps = [];
for (const [appName, meta] of Object.entries(appStoreMetadata)) {
  const location = meta.appData?.location;
  if (location) {
    for (const [key, value] of Object.entries(location)) {
      if (typeof value === "string") {
        location[key] = value.replace(/{SLUG}/g, meta.slug).replace(/{TITLE}/g, meta.name);
      }
    }
    const newLocation = {
      ...location,
      messageForOrganizer: location.messageForOrganizer || `Set ${location.label} link`,
      iconUrl: meta.logo,
      // For All event location apps, locationLink is where we store the input
      // TODO: locationLink and link seems redundant. We can modify the code to keep just one of them.
      variable: location.variable || "locationLink",
      defaultValueVariable: location.defaultValueVariable || "link"
    };
    if (newLocation.linkType === "static") {
      newLocation.organizerInputType = location.organizerInputType || "text";
      if (newLocation.organizerInputPlaceholder?.match(/https?:\/\//)) {
        newLocation.organizerInputPlaceholder = ` ${newLocation.organizerInputPlaceholder}`;
      }
    } else {
      newLocation.organizerInputType = null;
    }
    AppStoreLocationType[appName] = newLocation.type;
    locationsFromApps.push({
      ...newLocation
    });
  }
}
const locations = [...defaultLocations, ...locationsFromApps];
const getLocationFromApp = (locationType) => locationsFromApps.find((l) => l.type === locationType);
const getEventLocationType = (locationType) => locations.find((l) => l.type === locationType);
const getStaticLinkLocationByValue = (value) => {
  if (!value) {
    return null;
  }
  return locations.find((l) => {
    if (l.default || l.linkType == "dynamic" || !l.urlRegExp) {
      return;
    }
    return new RegExp(l.urlRegExp).test(value);
  });
};
const guessEventLocationType = (locationTypeOrValue) => getEventLocationType(locationTypeOrValue) || getStaticLinkLocationByValue(locationTypeOrValue);
({ ...DefaultEventLocationTypeEnum, ...AppStoreLocationType });
const privacyFilteredLocations = (locations2) => {
  const locationsAfterPrivacyFilter = locations2.map((location) => {
    const eventLocationType = getEventLocationType(location.type);
    if (!eventLocationType) {
      index.logger.debug(`Couldn't find location type. App might be uninstalled: ${location.type} `);
    }
    if (location.displayLocationPublicly || !eventLocationType) {
      return location;
    } else {
      const { address: _1, link: _2, hostPhoneNumber: _3, ...privacyFilteredLocation } = location;
      index.logger.debug("Applied Privacy Filter", location, privacyFilteredLocation);
      return privacyFilteredLocation;
    }
  });
  return locationsAfterPrivacyFilter;
};
const getHumanReadableLocationValue = (linkValue, translationFunction) => {
  if (!linkValue) {
    return translationFunction("no_location");
  }
  const eventLocationType = getEventLocationType(linkValue);
  const isDefault = eventLocationType?.default;
  if (eventLocationType) {
    return isDefault ? translationFunction(eventLocationType.label) : `${eventLocationType.label}`;
  }
  return linkValue || "";
};
const getLocationValueForDB = (bookingLocationTypeOrValue, eventLocations) => {
  let bookingLocation = bookingLocationTypeOrValue;
  let conferenceCredentialId = void 0;
  eventLocations.forEach((location) => {
    if (location.type === bookingLocationTypeOrValue) {
      const eventLocationType = getEventLocationType(bookingLocationTypeOrValue);
      conferenceCredentialId = location.credentialId;
      if (!eventLocationType) {
        return;
      }
      if (!eventLocationType.default && eventLocationType.linkType === "dynamic") {
        return;
      }
      bookingLocation = location[eventLocationType.defaultValueVariable] || bookingLocation;
    }
  });
  if (bookingLocation.trim().length === 0) {
    bookingLocation = DailyLocationType;
  }
  return { bookingLocation, conferenceCredentialId };
};
const formatClientIdFromEmails = (calEvent, clientId) => {
  const attendees = calEvent.attendees.map((attendee) => ({
    ...attendee,
    email: attendee.email.replace(`+${clientId}`, "")
  }));
  const organizer = {
    ...calEvent.organizer,
    email: calEvent.organizer.email.replace(`+${clientId}`, "")
  };
  return [attendees, organizer];
};
const formatCalEvent = (calEvent) => {
  const clonedEvent = lodash.cloneDeep(calEvent);
  if (clonedEvent.platformClientId) {
    const [attendees, organizer] = formatClientIdFromEmails(clonedEvent, clonedEvent.platformClientId);
    Object.assign(clonedEvent, { attendees, organizer });
  }
  return clonedEvent;
};
function getLabelValueMapFromResponses(calEvent, isOrganizer = false) {
  const { customInputs, userFieldsResponses, responses, eventTypeId } = calEvent;
  const isDynamicEvent = !eventTypeId;
  let labelValueMap = {};
  if (userFieldsResponses) {
    if (!!responses?.[TITLE_FIELD] && !isDynamicEvent) {
      userFieldsResponses[TITLE_FIELD] = responses[TITLE_FIELD];
    }
    if (!!responses?.[SMS_REMINDER_NUMBER_FIELD] && !isDynamicEvent) {
      userFieldsResponses[SMS_REMINDER_NUMBER_FIELD] = responses[SMS_REMINDER_NUMBER_FIELD];
    }
    for (const [, value] of Object.entries(userFieldsResponses)) {
      if (!value.label || !isOrganizer && value.isHidden) {
        continue;
      }
      labelValueMap[value.label] = value.value;
    }
  } else {
    labelValueMap = customInputs;
  }
  return labelValueMap;
}
function isSmsCalEmail(email2) {
  return email2.endsWith("@sms.cal.com");
}
const translator = short();
const getWhat = (calEvent, t) => {
  return `${t("what")}:
${calEvent.title}`;
};
const getWhen = (calEvent, t) => {
  const organizerTimezone = calEvent.organizer?.timeZone ?? "UTC";
  const defaultTimezone = organizerTimezone;
  const attendeeTimezone = calEvent.attendees?.[0]?.timeZone ?? defaultTimezone;
  return calEvent.seatsPerTimeSlot ? `${t("organizer_timezone")}:
${organizerTimezone}` : `${t("invitee_timezone")}:
${attendeeTimezone}`;
};
const getWho = (calEvent, t) => {
  let attendeesFromCalEvent = [...calEvent.attendees];
  if (calEvent.seatsPerTimeSlot && !calEvent.seatsShowAttendees) {
    attendeesFromCalEvent = [];
  }
  const attendees = attendeesFromCalEvent.map(
    (attendee) => `${attendee?.name || t("guest")}${attendee.phoneNumber ? ` - ${attendee.phoneNumber}` : ""}
${!isSmsCalEmail(attendee.email) ? attendee.email : ""}`
  ).join("\n");
  const organizer = calEvent.hideOrganizerEmail ? `${calEvent.organizer.name} - ${t("organizer")}` : `${calEvent.organizer.name} - ${t("organizer")}
${calEvent.organizer.email}`;
  const teamMembers = calEvent.team?.members ? calEvent.team.members.map((member) => `${member.name} - ${t("team_member")}
${member.email}`).join("\n") : [];
  return `${t("who")}:
${organizer}${attendees ? `
${attendees}` : ""}${teamMembers.length ? `
${teamMembers}` : ""}`;
};
const getAdditionalNotes = (calEvent, t) => {
  if (!calEvent.additionalNotes) {
    return "";
  }
  return `${t("additional_notes")}:
${calEvent.additionalNotes}`;
};
const getUserFieldsResponses = (calEvent, t) => {
  const labelValueMap = getLabelValueMapFromResponses(calEvent);
  if (!labelValueMap) {
    return "";
  }
  const responsesString = Object.keys(labelValueMap).map((key) => {
    if (!labelValueMap)
      return "";
    if (labelValueMap[key] !== "") {
      return `
${t(key)}:
${labelValueMap[key]}
  `;
    }
  }).join("");
  return responsesString;
};
const getAppsStatus = (calEvent, t) => {
  if (!calEvent.appsStatus) {
    return "";
  }
  return `
${t("apps_status")}
      ${calEvent.appsStatus.map((app) => {
    return `
- ${app.appName} ${app.success >= 1 ? `✅ ${app.success > 1 ? `(x${app.success})` : ""}` : ""}${app.warnings && app.warnings.length >= 1 ? app.warnings.map((warning) => `
   - ${warning}`) : ""} ${app.failures && app.failures >= 1 ? `❌ ${app.failures > 1 ? `(x${app.failures})` : ""}` : ""} ${app.errors && app.errors.length >= 1 ? app.errors.map((error) => `
   - ${error}`) : ""}`;
  })}
    `;
};
const getDescription = (calEvent, t) => {
  if (!calEvent.description) {
    return "";
  }
  const plainText = calEvent.description.replace(/<\/?[^>]+(>|$)/g, "").replace(/_/g, " ");
  return `${t("description")}
${plainText}`;
};
const getLocation = (calEvent) => {
  const meetingUrl = getVideoCallUrlFromCalEvent(calEvent);
  if (meetingUrl) {
    return meetingUrl;
  }
  const providerName = getProviderName(calEvent);
  return providerName || calEvent.location || "";
};
const getProviderName = (calEvent) => {
  if (calEvent.location && calEvent.location.includes("integrations:")) {
    let location = calEvent.location.split(":")[1];
    if (location === "daily") {
      location = "Cal Video";
    }
    return location[0].toUpperCase() + location.slice(1);
  }
  if (calEvent.location && /^https?:\/\//.test(calEvent.location)) {
    return calEvent.location;
  }
  return "";
};
const getUid = (calEvent) => {
  const uid = calEvent.uid;
  return uid ?? translator.fromUUID(uuid.v5(JSON.stringify(calEvent), uuid.v5.URL));
};
const getSeatReferenceId = (calEvent) => {
  return calEvent.attendeeSeatId ? calEvent.attendeeSeatId : "";
};
const getBookingUrl = (calEvent) => {
  if (calEvent.platformClientId) {
    if (!calEvent.platformBookingUrl)
      return "";
    return `${calEvent.platformBookingUrl}/${getUid(calEvent)}?slug=${calEvent.type}&username=${calEvent.organizer.username}&changes=true`;
  }
  return `${calEvent.bookerUrl ?? index.WEBAPP_URL}/booking/${getUid(calEvent)}?changes=true`;
};
const getPlatformManageLink = (calEvent, t) => {
  const shouldDisplayReschedule = !calEvent.recurringEvent && calEvent.platformRescheduleUrl;
  let res = calEvent.platformBookingUrl || shouldDisplayReschedule || calEvent.platformCancelUrl ? `${t("need_to_reschedule_or_cancel")} ` : ``;
  if (calEvent.platformBookingUrl) {
    res += `Check Here: ${calEvent.platformBookingUrl}/${getUid(calEvent)}?slug=${calEvent.type}&username=${calEvent.organizer.username}${calEvent?.team ? `&teamId=${calEvent.team.id}` : ""}&changes=true${calEvent.platformCancelUrl || shouldDisplayReschedule ? ` ${t("or_lowercase")} ` : ""}`;
  }
  if (calEvent.platformCancelUrl) {
    res += `${t("cancel")}: ${getCancelLink(calEvent)}`;
  }
  if (!calEvent.recurringEvent && calEvent.platformRescheduleUrl) {
    res += `${calEvent.platformCancelUrl ? ` ${t("or_lowercase")} ` : ""}${t(
      "reschedule"
    )}: ${getRescheduleLink({ calEvent })}`;
  }
  return res;
};
const getManageLink = (calEvent, t) => {
  if (calEvent.platformClientId) {
    return getPlatformManageLink(calEvent, t);
  }
  return `${t("need_to_reschedule_or_cancel")} ${calEvent.bookerUrl ?? index.WEBAPP_URL}/booking/${getUid(
    calEvent
  )}?changes=true`;
};
const getPlatformCancelLink = (calEvent, bookingUid, seatUid) => {
  if (calEvent.platformCancelUrl) {
    const platformCancelLink = new URL(`${calEvent.platformCancelUrl}/${bookingUid}`);
    platformCancelLink.searchParams.append("slug", calEvent.type);
    calEvent.organizer.username && platformCancelLink.searchParams.append("username", calEvent.organizer.username);
    platformCancelLink.searchParams.append("cancel", "true");
    platformCancelLink.searchParams.append("allRemainingBookings", String(!!calEvent.recurringEvent));
    if (seatUid)
      platformCancelLink.searchParams.append("seatReferenceUid", seatUid);
    if (calEvent?.team)
      platformCancelLink.searchParams.append("teamId", calEvent.team.id.toString());
    return platformCancelLink.toString();
  }
  return "";
};
const getCancelLink = (calEvent, attendee) => {
  const Uid = getUid(calEvent);
  const seatReferenceUid = getSeatReferenceId(calEvent);
  if (calEvent.platformClientId) {
    return getPlatformCancelLink(calEvent, Uid, seatReferenceUid);
  }
  const cancelLink = new URL(`${calEvent.bookerUrl ?? index.WEBAPP_URL}/booking/${Uid}`);
  cancelLink.searchParams.append("cancel", "true");
  cancelLink.searchParams.append("allRemainingBookings", String(!!calEvent.recurringEvent));
  if (attendee?.email) {
    cancelLink.searchParams.append("cancelledBy", attendee.email);
  }
  if (seatReferenceUid)
    cancelLink.searchParams.append("seatReferenceUid", seatReferenceUid);
  return cancelLink.toString();
};
const getPlatformRescheduleLink = (calEvent, bookingUid, seatUid) => {
  if (calEvent.platformRescheduleUrl) {
    const platformRescheduleLink = new URL(
      `${calEvent.platformRescheduleUrl}/${seatUid ? seatUid : bookingUid}`
    );
    platformRescheduleLink.searchParams.append("slug", calEvent.type);
    calEvent.organizer.username && platformRescheduleLink.searchParams.append("username", calEvent.organizer.username);
    platformRescheduleLink.searchParams.append("reschedule", "true");
    if (calEvent?.team)
      platformRescheduleLink.searchParams.append("teamId", calEvent.team.id.toString());
    return platformRescheduleLink.toString();
  }
  return "";
};
const getRescheduleLink = ({
  calEvent,
  allowRescheduleForCancelledBooking = false,
  attendee
}) => {
  const Uid = getUid(calEvent);
  const seatUid = getSeatReferenceId(calEvent);
  if (calEvent.platformClientId) {
    return getPlatformRescheduleLink(calEvent, Uid, seatUid);
  }
  const url2 = new URL(`${calEvent.bookerUrl ?? index.WEBAPP_URL}/reschedule/${seatUid ? seatUid : Uid}`);
  if (allowRescheduleForCancelledBooking) {
    url2.searchParams.append("allowRescheduleForCancelledBooking", "true");
  }
  if (attendee?.email) {
    url2.searchParams.append("rescheduledBy", attendee.email);
  }
  return url2.toString();
};
const getRichDescriptionHTML = (calEvent, t_, includeAppStatus = false) => {
  const t = t_ ?? calEvent.organizer.language.translate;
  const textToHtml = (text) => {
    if (!text)
      return "";
    const lines = text.split("\n").filter(Boolean);
    return lines.map((line, index2) => {
      if (index2 === 0) {
        return `<p><strong>${line}</strong></p>`;
      }
      return `<p>${line}</p>`;
    }).join("");
  };
  const manageLinkText = getManageLink(calEvent, t);
  const manageLinkHtml = manageLinkText ? (() => {
    const words = manageLinkText.split(" ");
    const lastWord = words.pop();
    if (lastWord && lastWord.includes("http")) {
      const textWithoutLink = words.join(" ").trim();
      return `<p><strong>${textWithoutLink}</strong> <a href="${lastWord}">Click here</a></p>`;
    }
    return `<p>${manageLinkText}</p>`;
  })() : "";
  const parts = [
    textToHtml(getCancellationReason(calEvent, t)),
    textToHtml(getWhat(calEvent, t)),
    textToHtml(getWhen(calEvent, t)),
    textToHtml(getWho(calEvent, t)),
    textToHtml(getDescription(calEvent, t)),
    textToHtml(getAdditionalNotes(calEvent, t)),
    textToHtml(getUserFieldsResponses(calEvent, t)),
    includeAppStatus ? textToHtml(getAppsStatus(calEvent, t)) : "",
    manageLinkHtml,
    calEvent.paymentInfo ? `<p><strong>${t("pay_now")}:</strong> <a href="${calEvent.paymentInfo.link}">${calEvent.paymentInfo.link}</a></p>` : ""
  ].filter(Boolean).join("\n");
  return parts.trim();
};
const getRichDescription = (calEvent, t_, includeAppStatus = false) => {
  const t = t_ ?? calEvent.organizer.language.translate;
  const parts = [
    getCancellationReason(calEvent, t),
    getWhat(calEvent, t),
    getWhen(calEvent, t),
    getWho(calEvent, t),
    `${t("where")}:
${getLocation(calEvent)}`,
    getDescription(calEvent, t),
    getAdditionalNotes(calEvent, t),
    getUserFieldsResponses(calEvent, t),
    includeAppStatus ? getAppsStatus(calEvent, t) : "",
    // TODO: Only the original attendee can make changes to the event
    // Guests cannot
    calEvent.seatsPerTimeSlot ? "" : getManageLink(calEvent, t),
    calEvent.paymentInfo ? `${t("pay_now")}:
${calEvent.paymentInfo.link}` : ""
  ].filter(Boolean).join("\n\n").replace(/\n{3,}/g, "\n\n").trim();
  return parts;
};
const getCancellationReason = (calEvent, t) => {
  if (!calEvent.cancellationReason)
    return "";
  return `${t("cancellation_reason")}:
${calEvent.cancellationReason}`;
};
const isDailyVideoCall = (calEvent) => {
  return calEvent?.videoCallData?.type === "daily_video";
};
const getPublicVideoCallUrl = (calEvent) => {
  return `${index.WEBAPP_URL}/video/${getUid(calEvent)}`;
};
const getVideoCallUrlFromCalEvent = (calEvent) => {
  if (calEvent.videoCallData) {
    if (isDailyVideoCall(calEvent)) {
      return getPublicVideoCallUrl(calEvent);
    }
    return calEvent.videoCallData.url;
  }
  if (calEvent.additionalInformation?.hangoutLink) {
    return calEvent.additionalInformation.hangoutLink;
  }
  if (calEvent.location?.startsWith("http")) {
    return calEvent.location;
  }
  return "";
};
exports.AppStoreLocationType = AppStoreLocationType;
exports.CalVideoLocationType = CalVideoLocationType;
exports.DailyLocationType = DailyLocationType;
exports.ErrorWithCode = ErrorWithCode;
exports.MSTeamsLocationType = MSTeamsLocationType;
exports.MeetLocationType = MeetLocationType;
exports.OrganizerDefaultConferencingAppType = OrganizerDefaultConferencingAppType;
exports.SMS_REMINDER_NUMBER_FIELD = SMS_REMINDER_NUMBER_FIELD;
exports.SystemField = SystemField;
exports.appConfig = appConfig$1;
exports.appConfig$1 = appConfig$2;
exports.appConfig$2 = appConfig;
exports.booking_pages_tag_config_json = booking_pages_tag_config_json;
exports.campfire_config_json = campfire_config_json;
exports.config = config$1;
exports.config$1 = config$4;
exports.config$2 = config$3;
exports.config$3 = config$2;
exports.config$4 = config;
exports.defaultLocations = defaultLocations;
exports.demodesk_config_json = demodesk_config_json;
exports.dialpad_config_json = dialpad_config_json;
exports.discord_config_json = discord_config_json;
exports.eightxeight_config_json = eightxeight_config_json;
exports.element_call_config_json = element_call_config_json;
exports.event_type_location_video_static_config_json = event_type_location_video_static_config_json;
exports.fathom_config_json = fathom_config_json;
exports.formatCalEvent = formatCalEvent;
exports.ga4_config_json = ga4_config_json;
exports.getBookingUrl = getBookingUrl;
exports.getCancelLink = getCancelLink;
exports.getErrorFromUnknown = getErrorFromUnknown;
exports.getHumanReadableLocationValue = getHumanReadableLocationValue;
exports.getLabelValueMapFromResponses = getLabelValueMapFromResponses;
exports.getLocation = getLocation;
exports.getLocationFromApp = getLocationFromApp;
exports.getLocationValueForDB = getLocationValueForDB;
exports.getManageLink = getManageLink;
exports.getNormalizedAppMetadata = getNormalizedAppMetadata;
exports.getRescheduleLink = getRescheduleLink;
exports.getRichDescription = getRichDescription;
exports.getRichDescriptionHTML = getRichDescriptionHTML;
exports.getUid = getUid;
exports.getVideoCallUrlFromCalEvent = getVideoCallUrlFromCalEvent;
exports.gtm_config_json = gtm_config_json;
exports.guessEventLocationType = guessEventLocationType;
exports.handleErrorsJson = handleErrorsJson;
exports.handleErrorsRaw = handleErrorsRaw;
exports.horizon_workrooms_config_json = horizon_workrooms_config_json;
exports.insihts_config_json = insihts_config_json;
exports.isSmsCalEmail = isSmsCalEmail;
exports.jelly_config_json = jelly_config_json;
exports.matomo_config_json = matomo_config_json;
exports.metadata = metadata$4;
exports.metadata$1 = metadata$5;
exports.metadata$2 = metadata$2;
exports.metadata$3 = metadata$1;
exports.metadata$4 = metadata$3;
exports.metadata$5 = metadata;
exports.metapixel_config_json = metapixel_config_json;
exports.mirotalk_config_json = mirotalk_config_json;
exports.ping_config_json = ping_config_json;
exports.posthog_config_json = posthog_config_json;
exports.privacyFilteredLocations = privacyFilteredLocations;
exports.riverside_config_json = riverside_config_json;
exports.roam_config_json = roam_config_json;
exports.salesroom_config_json = salesroom_config_json;
exports.signal_config_json = signal_config_json;
exports.sirius_video_config_json = sirius_video_config_json;
exports.skype_config_json = skype_config_json;
exports.twipla_config_json = twipla_config_json;
exports.umami_config_json = umami_config_json;
exports.validJson = validJson;
exports.whatsapp_config_json = whatsapp_config_json;
exports.whereby_config_json = whereby_config_json;
