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AAQ,IAClB,EAAQ,UAAU,IAAI,cAGnB,EACT,EAEA,QAAA,GACE,MAAM,EAAW,IACX,WAAE,EAAU,YAAE,EAAW,UAAE,EAAS,YAAE,GAAgB,OAAO,OAAO,WAE1E,SAAS,EAAQ,EAAW,GACrB,GACL,EAAS,QAAQ,IACf,EAAS,KAAK,CACZ,UACA,SAAU,IAAM,EAAQ,UAAU,IAAI,WAAY,GAClD,OAAU,WAGhB,CAeA,OAbA,SAAS,iBAAiB,eAAe,QAAQ,IAC/C,EAAS,KAAK,CACZ,UACA,SAAU,IAAM,EAAQ,UAAU,IAAI,WAAY,GAClD,OAAU,UAEZ,EAAQ,EAAa,EAAQ,iBAAiB,uBAC9C,EAAQ,EAAa,EAAQ,iBAAiB,iBAC9C,EAAQ,EAAW,EAAQ,iBAAiB,iBAG9C,EAAQ,EAAY,SAAS,iBAAiB,2BAEvC,CACT,EAEA,OAAA,GACE,MAAM,EAAW,GACX,EAAU,SAAS,iBAAiB,kBACpC,EAAoB,OAAO,OAAO,WAAW,QAWnD,OATI,IAAwC,WAAlB,OAAO,QAAyC,WAAlB,OAAO,SAAwB,OAAO,YAAc,KAC1G,EAAQ,QAAQ,IACd,EAAS,KAAK,CACZ,UACA,SAAU,IAAM,EAAQ,UAAU,IAAI,WAAY,GAClD,OAAU,YAIT,CACT,EAEA,OAAM,IACG,CAAC,CACN,QAAS,SAAS,cAAc,WAChC,QAAS","file":"/npm/hexo-theme-next@8.28.0/source/js/motion.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.48.0.\n * Original file: /npm/hexo-theme-next@8.28.0/source/js/motion.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 NexT, CONFIG */\n\nNexT.motion = {};\n\nNexT.motion.integrator = {\n  queue: [],\n  init() {\n    this.queue = [];\n    return this;\n  },\n  add(fn) {\n    const sequence = fn();\n    this.queue.push(sequence);\n    return this;\n  },\n  bootstrap() {\n    if (!CONFIG.motion.async) this.queue = [this.queue.flat()];\n    this.queue.forEach(sequence => {\n      const timeline = window.anime.timeline({\n        duration: CONFIG.motion?.duration ?? 200,\n        easing  : 'linear'\n      });\n      sequence.forEach(item => {\n        if (item.deltaT) timeline.add(item, item.deltaT);\n        else timeline.add(item);\n      });\n    });\n  }\n};\n\nNexT.motion.middleWares = {\n  header() {\n    const sequence = [];\n\n    function getMistLineSettings(targets) {\n      sequence.push({\n        targets,\n        scaleX  : [0, 1],\n        duration: 500,\n        deltaT  : '-=200'\n      });\n    }\n\n    function pushToSequence(targets, sequenceQueue = false) {\n      sequence.push({\n        targets,\n        opacity: 1,\n        top    : 0,\n        deltaT : sequenceQueue ? '-=200' : '-=0'\n      });\n    }\n\n    pushToSequence('.column');\n    CONFIG.scheme === 'Mist' && getMistLineSettings('.logo-line');\n    CONFIG.scheme === 'Muse' && pushToSequence('.custom-logo-image');\n    pushToSequence('.site-title');\n    pushToSequence('.site-brand-container .toggle', true);\n    pushToSequence('.site-subtitle');\n    (CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini') && pushToSequence('.custom-logo-image');\n\n    const menuItemTransition = CONFIG.motion.transition.menu_item;\n    if (menuItemTransition) {\n      document.querySelectorAll('.menu-item').forEach(targets => {\n        sequence.push({\n          targets,\n          complete: () => targets.classList.add('animated', menuItemTransition),\n          deltaT  : '-=200'\n        });\n      });\n    }\n\n    return sequence;\n  },\n\n  subMenu() {\n    const subMenuItem = document.querySelectorAll('.sub-menu .menu-item');\n    if (subMenuItem.length > 0) {\n      subMenuItem.forEach(element => {\n        element.classList.add('animated');\n      });\n    }\n    return [];\n  },\n\n  postList() {\n    const sequence = [];\n    const { post_block, post_header, post_body, coll_header } = CONFIG.motion.transition;\n\n    function animate(animation, elements) {\n      if (!animation) return;\n      elements.forEach(targets => {\n        sequence.push({\n          targets,\n          complete: () => targets.classList.add('animated', animation),\n          deltaT  : '-=100'\n        });\n      });\n    }\n\n    document.querySelectorAll('.post-block').forEach(targets => {\n      sequence.push({\n        targets,\n        complete: () => targets.classList.add('animated', post_block),\n        deltaT  : '-=100'\n      });\n      animate(coll_header, targets.querySelectorAll('.collection-header'));\n      animate(post_header, targets.querySelectorAll('.post-header'));\n      animate(post_body, targets.querySelectorAll('.post-body'));\n    });\n\n    animate(post_block, document.querySelectorAll('.pagination, .comments'));\n\n    return sequence;\n  },\n\n  sidebar() {\n    const sequence = [];\n    const sidebar = document.querySelectorAll('.sidebar-inner');\n    const sidebarTransition = CONFIG.motion.transition.sidebar;\n    // Only for desktop of Pisces | Gemini.\n    if (sidebarTransition && (CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini') && window.innerWidth >= 992) {\n      sidebar.forEach(targets => {\n        sequence.push({\n          targets,\n          complete: () => targets.classList.add('animated', sidebarTransition),\n          deltaT  : '-=100'\n        });\n      });\n    }\n    return sequence;\n  },\n\n  footer() {\n    return [{\n      targets: document.querySelector('.footer'),\n      opacity: 1\n    }];\n  }\n};\n"]}