{"version":3,"sources":["jsdelivr-header.js","/npm/hexo-theme-next@8.18.0/source/js/third-party/fancybox.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACJA,SAAS,iBAAiB,eAAe,KAKvC,SAAS,iBAAiB,8CAA8C,SAAQ,IAC9E,MAAM,EAAY,EAAM,QAAQ,KAAO,EAAM,IACvC,EAAgB,SAAS,cAAc,KAC7C,EAAc,UAAU,IAAI,YAC5B,EAAc,KAAO,EACrB,EAAc,aAAa,YAAa,IACxC,EAAc,aAAa,WAAY,iCACvC,EAAc,aAAa,WAAY,OAEvC,IAAI,EAAe,UACoB,OAAnC,EAAM,QAAQ,iBAChB,EAAe,UAC8B,OAApC,EAAM,QAAQ,oBACvB,EAAe,SAEjB,EAAc,QAAQ,SAAW,EAEjC,MAAM,EAAa,EAAM,OAAS,EAAM,IACpC,IACF,EAAc,MAAQ,EAEtB,EAAc,QAAQ,QAAU,GAElC,EAAM,KAAK,EAAc,IAG3B,SAAS,KAAK,kBAAkB","file":"/npm/hexo-theme-next@8.18.0/source/js/third-party/fancybox.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/hexo-theme-next@8.18.0/source/js/third-party/fancybox.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/* global Fancybox */\n\ndocument.addEventListener('page:loaded', () => {\n\n  /**\n   * Wrap images with fancybox.\n   */\n  document.querySelectorAll('.post-body :not(a) > img, .post-body > img').forEach(image => {\n    const imageLink = image.dataset.src || image.src;\n    const imageWrapLink = document.createElement('a');\n    imageWrapLink.classList.add('fancybox');\n    imageWrapLink.href = imageLink;\n    imageWrapLink.setAttribute('itemscope', '');\n    imageWrapLink.setAttribute('itemtype', 'http://schema.org/ImageObject');\n    imageWrapLink.setAttribute('itemprop', 'url');\n\n    let dataFancybox = 'default';\n    if (image.closest('.post-gallery') !== null) {\n      dataFancybox = 'gallery';\n    } else if (image.closest('.group-picture') !== null) {\n      dataFancybox = 'group';\n    }\n    imageWrapLink.dataset.fancybox = dataFancybox;\n\n    const imageTitle = image.title || image.alt;\n    if (imageTitle) {\n      imageWrapLink.title = imageTitle;\n      // Make sure img captions will show correctly in fancybox\n      imageWrapLink.dataset.caption = imageTitle;\n    }\n    image.wrap(imageWrapLink);\n  });\n\n  Fancybox.bind('[data-fancybox]');\n});\n"]}