{"version":3,"sources":["jsdelivr-header.js","/npm/ivy-ui@1.0.0-beta.6/dist/components/src/utils/message.ts","/npm/ivy-ui@1.0.0-beta.6/dist/components/src/utils/notification.ts","/npm/ivy-ui@1.0.0-beta.6/dist/components/src/global.ts","/npm/ivy-ui@1.0.0-beta.6/dist/components/@stencil/core/internal/app-globals"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,85ECIgB,QAAQ,GACtB,MAMM,EAAI,OAAA,OAAA,OAAA,OAAA,GANyB,CACjC,KAAM,OACN,QAAS,GACT,SAAU,MAKP,GAEL,IAAI,SAAS,GAkBX,MAAM,IAAI,MAAM,kBAlBC,CACjB,MAAM,EAAa,WAAW,eAAe,IAAI,eACjD,IAAI,EAaF,MAAM,IAAI,MAAM,oBAbF,CACd,MAAM,EAAW,IAAI,EACf,EAAS,SAAS,cAAc,oBACrC,EAAiB,QAAU,EAAK,SAAW,GAC3C,EAAiB,KAAO,EAAK,MAAQ,OACtC,EAAO,YAAY,GAClB,EAA4B,aAAa,OAAQ,QAClD,MAAM,EAAQ,YAAW,KAEvB,EAAO,YAAY,GACnB,aAAa,EAAM,GAClB,EAAK,S,EAOd,C,SAqEgB,gBACd,IAAK,SAAS,eAAe,mBAAoB,CAC/C,MAAM,EAAS,SAAS,cAAc,OACtC,EAAO,GAAK,kBACZ,EAAO,MAAM,SAAW,QACxB,EAAO,MAAM,IAAM,OACnB,EAAO,MAAM,KAAO,IACpB,EAAO,MAAM,OAAS,QACtB,EAAO,MAAM,MAAQ,OACrB,EAAO,MAAM,cAAgB,OAC7B,EAAO,MAAM,SAAW,OACxB,SAAS,KAAK,YAAY,E,CAE9B,C,SCjHgB,aAAa,GAC3B,MAMM,EAAI,OAAA,OAAA,OAAA,OAAA,GAN8B,CACtC,KAAM,OACN,QAAS,GACT,SAAU,MAKP,GAEL,IAAI,SAAS,GAkBX,MAAM,IAAI,MAAM,kBAlBC,CACjB,MAAM,EAAa,WAAW,eAAe,IAAI,oBACjD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2B,CAC7B,KAAM,QACN,QAAS,GACT,SAAU,KAEZ,GAAgB,WAAZ,EACF,EAAI,OAAA,OAAA,OAAA,OAAA,GAAS,GAA2B,CAAE,QAAS,QAC9C,IAAgB,WAAZ,EAGT,MAAM,IAAI,MAAM,IAFhB,EAAI,OAAA,OAAA,OAAA,OAAA,GAAS,GAAmB,E,CAIlC,aAAa,EACf,EAEA,aAAa,QAAU,SAAU,GAC/B,MAAM,EAAU,QAAQ,GACxB,IAAI,EAA2B,CAC7B,KAAM,UACN,QAAS,GACT,SAAU,KAEZ,GAAgB,WAAZ,EACF,EAAI,OAAA,OAAA,OAAA,OAAA,GAAS,GAA2B,CAAE,QAAS,QAC9C,IAAgB,WAAZ,EAGT,MAAM,IAAI,MAAM,IAFhB,EAAI,OAAA,OAAA,OAAA,OAAA,GAAS,GAAmB,E,CAIlC,aAAa,EACf,ECzGA,MAAA,gBAAe,KACb,MAAM,EAAiB,WAAW,KAC5B,EAAU,QAEV,EAAI,OAAA,OAAA,OAAA,OAAA,GACL,GAAc,CACjB,UACA,aAAc,eAEhB,WAAW,KAAO,EAClB,gBACA,oBAAoB,ECbT,cAAgB,gB","file":"/npm/ivy-ui@1.0.0-beta.6/dist/components/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/ivy-ui@1.0.0-beta.6/dist/components/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import { getType, isObject } from './utils';\n\ntype MessageObject = {\n  content: string;\n  duration?: number;\n  type?: string;\n};\n\ntype Message = MessageObject | string;\n\nexport function Message(opt: MessageObject) {\n  const defaultConf: MessageObject = {\n    type: 'info',\n    content: '',\n    duration: 3000,\n  };\n\n  const conf = {\n    ...defaultConf,\n    ...opt,\n  };\n  if (isObject(opt)) {\n    const IvyMessage = globalThis.customElements.get('ivy-message');\n    if (IvyMessage) {\n      const instance = new IvyMessage();\n      const ivyBox = document.querySelector('#ivy-message-box');\n      (instance as any).content = conf.content || '';\n      (instance as any).type = conf.type || 'info';\n      ivyBox.appendChild(instance as unknown as Node);\n      (instance as unknown as any).setAttribute('show', 'show');\n      const timer = setTimeout(() => {\n        // (instance as unknown as any).removeAttribute('show');\n        ivyBox.removeChild(instance as unknown as Node);\n        clearTimeout(timer);\n      }, conf.duration);\n    } else {\n      throw new Error('请先引入ivyMessage组件');\n    }\n  } else {\n    throw new Error('参数opt必须是Object');\n  }\n}\nMessage.info = function (opt: Message) {\n  const typeStr = getType(opt);\n  let conf: MessageObject = {\n    type: 'info',\n    content: '',\n    duration: 3000,\n  };\n  if (typeStr === 'String') {\n    conf = { ...(conf as MessageObject), content: opt as string };\n  } else if (typeStr === 'Object') {\n    conf = { ...(opt as object), ...conf };\n  } else {\n    throw new Error('');\n  }\n  Message(conf);\n};\n\nMessage.success = function (opt: Message) {\n  const typeStr = getType(opt);\n  let conf: MessageObject = {\n    type: 'success',\n    content: '',\n    duration: 3000,\n  };\n  if (typeStr === 'String') {\n    conf = { ...(conf as MessageObject), content: opt as string };\n  } else if (typeStr === 'Object') {\n    conf = { ...(opt as object), ...conf };\n  } else {\n    throw new Error('');\n  }\n  Message(conf);\n};\n\nMessage.error = function (opt: Message) {\n  const typeStr = getType(opt);\n  let conf: MessageObject = {\n    type: 'error',\n    content: '',\n    duration: 3000,\n  };\n  if (typeStr === 'String') {\n    conf = { ...(conf as MessageObject), content: opt as string };\n  } else if (typeStr === 'Object') {\n    conf = { ...(opt as object), ...conf };\n  } else {\n    throw new Error('');\n  }\n  Message(conf);\n};\n\nMessage.warning = function (opt: Message) {\n  const typeStr = getType(opt);\n  let conf: MessageObject = {\n    type: 'warning',\n    content: '',\n    duration: 3000,\n  };\n  if (typeStr === 'String') {\n    conf = { ...(conf as MessageObject), content: opt as string };\n  } else if (typeStr === 'Object') {\n    conf = { ...(opt as object), ...conf };\n  } else {\n    throw new Error('');\n  }\n  Message(conf);\n};\n\nexport function addMessageBox() {\n  if (!document.getElementById('ivy-message-box')) {\n    const parent = document.createElement('div');\n    parent.id = 'ivy-message-box';\n    parent.style.position = 'fixed';\n    parent.style.top = '24px';\n    parent.style.left = '0';\n    parent.style.zIndex = '10000';\n    parent.style.width = '100%';\n    parent.style.pointerEvents = 'none';\n    parent.style.fontSize = '14px';\n    document.body.appendChild(parent);\n  }\n}\n","import { getType, isObject } from './utils';\n\ntype NotificationObject = {\n  content: string;\n  duration?: number;\n  type?: string;\n};\n\ntype Notification = NotificationObject | string;\n\nexport function Notification(opt: NotificationObject) {\n  const defaultConf: NotificationObject = {\n    type: 'info',\n    content: '',\n    duration: 3000,\n  };\n\n  const conf = {\n    ...defaultConf,\n    ...opt,\n  };\n  if (isObject(opt)) {\n    const IvyMessage = globalThis.customElements.get('ivy-notification');\n    if (IvyMessage) {\n      const instance = new IvyMessage();\n      const ivyBox = document.querySelector('#ivy-notification-box');\n      (instance as any).content = conf.content || '';\n      (instance as any).type = conf.type || 'info';\n      ivyBox.appendChild(instance as unknown as Node);\n      (instance as unknown as any).setAttribute('show', 'show');\n      const timer = setTimeout(() => {\n        // (instance as unknown as any).removeAttribute('show');\n        ivyBox.removeChild(instance as unknown as Node);\n        clearTimeout(timer);\n      }, conf.duration);\n    } else {\n      throw new Error('请先引入ivyNotification组件');\n    }\n  } else {\n    throw new Error('参数opt必须是Object');\n  }\n}\nNotification.info = function (opt: Notification) {\n  const typeStr = getType(opt);\n  let conf: NotificationObject = {\n    type: 'info',\n    content: '',\n    duration: 3000,\n  };\n  if (typeStr === 'String') {\n    conf = { ...(conf as NotificationObject), content: opt as string };\n  } else if (typeStr === 'Object') {\n    conf = { ...(opt as object), ...conf };\n  } else {\n    throw new Error('');\n  }\n  Notification(conf);\n};\n\nNotification.success = function (opt: Notification) {\n  const typeStr = getType(opt);\n  let conf: NotificationObject = {\n    type: 'success',\n    content: '',\n    duration: 30000,\n  };\n  if (typeStr === 'String') {\n    conf = { ...(conf as NotificationObject), content: opt as string };\n  } else if (typeStr === 'Object') {\n    conf = { ...(opt as object), ...conf };\n  } else {\n    throw new Error('');\n  }\n  Notification(conf);\n};\n\nNotification.error = function (opt: Notification) {\n  const typeStr = getType(opt);\n  let conf: NotificationObject = {\n    type: 'error',\n    content: '',\n    duration: 3000,\n  };\n  if (typeStr === 'String') {\n    conf = { ...(conf as NotificationObject), content: opt as string };\n  } else if (typeStr === 'Object') {\n    conf = { ...(opt as object), ...conf };\n  } else {\n    throw new Error('');\n  }\n  Notification(conf);\n};\n\nNotification.warning = function (opt: Notification) {\n  const typeStr = getType(opt);\n  let conf: NotificationObject = {\n    type: 'warning',\n    content: '',\n    duration: 3000,\n  };\n  if (typeStr === 'String') {\n    conf = { ...(conf as NotificationObject), content: opt as string };\n  } else if (typeStr === 'Object') {\n    conf = { ...(opt as object), ...conf };\n  } else {\n    throw new Error('');\n  }\n  Notification(conf);\n};\n\nexport function addNotificationBox() {\n  if (!document.getElementById('ivy-message-box')) {\n    const parent = document.createElement('div');\n    parent.id = 'ivy-notification-box';\n    parent.style.position = 'fixed';\n    parent.style.top = '24px';\n    parent.style.left = '0';\n    parent.style.zIndex = '10000';\n    parent.style.width = '0';\n    parent.style.pointerEvents = 'none';\n    parent.style.fontSize = '14px';\n    document.body.appendChild(parent);\n  }\n}\n","import { addMessageBox, Message } from './utils/message';\nimport { addNotificationBox, Notification } from './utils/notification';\n\nexport default () => {\n  const cacheIvyOption = globalThis.$ivy;\n  const message = Message;\n\n  const conf = {\n    ...cacheIvyOption,\n    message,\n    notification: Notification,\n  };\n  globalThis.$ivy = conf;\n  addMessageBox();\n  addNotificationBox();\n};\n","import appGlobalScript from 'E:/private/ivy-ui/packages/components/src/global.ts';\nexport const globalScripts = appGlobalScript;\n"]}