-
Notifications
You must be signed in to change notification settings - Fork 0
/
component---node-modules-unisite-theme-blog-src-unisite-core-blog-templates-column-tsx-e120293e4ac10e9d653f.js.map
1 lines (1 loc) · 30.7 KB
/
component---node-modules-unisite-theme-blog-src-unisite-core-blog-templates-column-tsx-e120293e4ac10e9d653f.js.map
1
{"version":3,"file":"component---node-modules-unisite-theme-blog-src-unisite-core-blog-templates-column-tsx-e120293e4ac10e9d653f.js","mappings":"4EAKA,IAAIA,EAAc,EAAQ,KAE1BC,EAAOC,QAAU,CACfF,YAAaA,I,oBCRf,IAAIG,EAAa,EAAQ,MAErBC,EAAqB,EAAQ,MAE7BC,EAAkB,EAAQ,MAE1BC,EAAgC,EAAQ,MAExCC,EAAY,CAAC,QAAS,YAE1B,SAASC,EAAQC,EAAQC,GACvB,IAAIC,EAAOC,OAAOD,KAAKF,GAEvB,GAAIG,OAAOC,sBAAuB,CAChC,IAAIC,EAAUF,OAAOC,sBAAsBJ,GAEvCC,IACFI,EAAUA,EAAQC,QAAO,SAAUC,GACjC,OAAOJ,OAAOK,yBAAyBR,EAAQO,GAAKE,eAIxDP,EAAKQ,KAAKC,MAAMT,EAAMG,GAGxB,OAAOH,EAGT,SAASU,EAAcC,GACrB,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CACzC,IAAIG,EAAyB,MAAhBF,UAAUD,GAAaC,UAAUD,GAAK,GAE/CA,EAAI,EACNf,EAAQI,OAAOc,IAAS,GAAMC,SAAQ,SAAUC,GAC9CvB,EAAgBiB,EAAQM,EAAKF,EAAOE,OAE7BhB,OAAOiB,0BAChBjB,OAAOkB,iBAAiBR,EAAQV,OAAOiB,0BAA0BH,IAEjElB,EAAQI,OAAOc,IAASC,SAAQ,SAAUC,GACxChB,OAAOmB,eAAeT,EAAQM,EAAKhB,OAAOK,yBAAyBS,EAAQE,OAKjF,OAAON,EAGT,IAAIU,EAAQ,EAAQ,MAGhBC,EADW,EAAQ,MACJA,IAGfC,EADY,EAA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OC,QAASD,EAAOC,QAAQiH,YAAa,G,qBCbxE,IAAIC,EAAmB,EAAQ,MAW/BnH,EAAOC,QATP,SAAqCkJ,EAAGC,GACtC,GAAKD,EAAL,CACA,GAAiB,iBAANA,EAAgB,OAAOhC,EAAiBgC,EAAGC,GACtD,IAAIC,EAAI1I,OAAOoH,UAAUuB,SAASd,KAAKW,GAAGI,MAAM,GAAI,GAEpD,MADU,WAANF,GAAkBF,EAAEK,cAAaH,EAAIF,EAAEK,YAAYvF,MAC7C,QAANoF,GAAqB,QAANA,EAAoBpC,MAAM4B,KAAKM,GACxC,cAANE,GAAqB,2CAA2CI,KAAKJ,GAAWlC,EAAiBgC,EAAGC,QAAxG,IAIFpJ,EAAOC,QAAiB,QAAID,EAAOC,QAASD,EAAOC,QAAQiH,YAAa","sources":["webpack:///./node_modules/gatsby-plugin-mdx/index.js","webpack:///./node_modules/gatsby-plugin-mdx/mdx-renderer.js","webpack:///./node_modules/@unisite/theme-blog/src/components/Tabs/Tabs.tsx","webpack:///./node_modules/@unisite/theme-blog/src/components/Tabs/TabItem.tsx","webpack:///./node_modules/@unisite/theme-blog/src/@unisite/core-blog/templates/column.tsx","webpack:///./node_modules/@unisite/theme-blog/src/components/Card/Card.tsx","webpack:///./node_modules/@unisite/theme-blog/src/components/MDXContent/MDXContent.tsx","webpack:///./node_modules/@unisite/theme-blog/src/components/MDXContent/MDXCard.tsx","webpack:///./node_modules/gatsby/node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack:///./node_modules/gatsby/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","webpack:///./node_modules/gatsby/node_modules/@babel/runtime/helpers/construct.js","webpack:///./node_modules/gatsby/node_modules/@babel/runtime/helpers/defineProperty.js","webpack:///./node_modules/gatsby/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js","webpack:///./node_modules/gatsby/node_modules/@babel/runtime/helpers/iterableToArray.js","webpack:///./node_modules/gatsby/node_modules/@babel/runtime/helpers/nonIterableSpread.js","webpack:///./node_modules/gatsby/node_modules/@babel/runtime/helpers/toConsumableArray.js","webpack:///./node_modules/gatsby/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"],"sourcesContent":["/**\n * Welcome to gatsby-plugin-mdx!\n *\n * Start reading in gatsby-node.js\n */\nvar MDXRenderer = require(\"./mdx-renderer\");\n\nmodule.exports = {\n MDXRenderer: MDXRenderer\n};","var _construct = require(\"@babel/runtime/helpers/construct\");\n\nvar _toConsumableArray = require(\"@babel/runtime/helpers/toConsumableArray\");\n\nvar _defineProperty = require(\"@babel/runtime/helpers/defineProperty\");\n\nvar _objectWithoutPropertiesLoose = require(\"@babel/runtime/helpers/objectWithoutPropertiesLoose\");\n\nvar _excluded = [\"scope\", \"children\"];\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nvar React = require(\"react\");\n\nvar _require = require(\"@mdx-js/react\"),\n mdx = _require.mdx;\n\nvar _require2 = require(\"./context\"),\n useMDXScope = _require2.useMDXScope;\n\nmodule.exports = function MDXRenderer(_ref) {\n var scope = _ref.scope,\n children = _ref.children,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var mdxScope = useMDXScope(scope); // Memoize the compiled component\n\n var End = React.useMemo(function () {\n if (!children) {\n return null;\n }\n\n var fullScope = _objectSpread({\n // React is here just in case the user doesn't pass them in\n // in a manual usage of the renderer\n React: React,\n mdx: mdx\n }, mdxScope);\n\n var keys = Object.keys(fullScope);\n var values = keys.map(function (key) {\n return fullScope[key];\n });\n\n var fn = _construct(Function, [\"_fn\"].concat(_toConsumableArray(keys), [\"\" + children]));\n\n return fn.apply(void 0, [{}].concat(_toConsumableArray(values)));\n }, [children, scope]);\n return React.createElement(End, _objectSpread({}, props));\n};","import React, { useEffect, useMemo, useState } from \"react\";\n\ntype TabsProps = {\n defaultActiveKey?: string;\n onChange?: (activeKey: string) => void;\n};\ntype TabsFC = React.FC<TabsProps>;\n\nconst Tabs: TabsFC = ({ defaultActiveKey, children }) => {\n const values = useMemo(\n () =>\n (\n React.Children.map(children, (child) =>\n React.isValidElement(child) ? child : null\n ) || []\n )\n .filter((child) => !!child)\n .map((child) => ({\n key: child.props.tabKey,\n children: child.props.children,\n })),\n [children]\n );\n const defaultVal = useMemo(\n () =>\n values.filter((item) => item.key === defaultActiveKey)[0] || values[0],\n [values, defaultActiveKey]\n );\n const [currentKey, setCurrentKey] = useState(defaultVal?.key);\n const [content, setContent] = useState<React.ReactChild>(\n defaultVal?.children\n );\n\n useEffect(() => {\n if (!defaultVal) return;\n setCurrentKey(defaultVal?.key);\n setContent(defaultVal?.children);\n }, [defaultVal]);\n\n return (\n <>\n <div className=\"inline-flex flex-row items-center p-1 space-x-4 bg-gray-200 rounded-full dark:bg-true-gray-900\">\n {React.Children.map(children, (child) =>\n React.isValidElement(child)\n ? React.cloneElement(child, {\n key: child.props.tabKey,\n active: currentKey === child.props.tabKey,\n onClick: () => {\n setCurrentKey(child.props.tabKey);\n setContent(child.props.children);\n },\n })\n : child\n )}\n </div>\n <div>{content}</div>\n </>\n );\n};\n\nexport type { TabsProps };\nexport default Tabs;\n","import React from \"react\";\nimport cls from \"classnames\";\n\ntype TabItemProps = {\n tabKey: string;\n tab: React.ReactChild;\n active?: boolean;\n onClick?: () => void;\n};\ntype TabItemFC = React.FC<TabItemProps>;\n\nconst TabItem: TabItemFC = ({ tab, active, onClick }) => {\n return (\n <div\n className={cls([\n active\n ? \"text-gray-900 font-semibold bg-white shadow dark:text-gray-100 dark:bg-true-gray-700\"\n : \"text-gray-700 dark:text-gray-300\",\n \"inline-flex flex-row items-center px-4 py-1 text-sm hover:text-gray-900 hover:font-semibold cursor-pointer rounded-full transition duration-300 ease-in-out\",\n ])}\n onClick={onClick}\n >\n {tab}\n </div>\n );\n};\n\nexport type { TabItemProps };\nexport default TabItem;\n","import React from \"react\";\nimport { graphql, Link } from \"gatsby\";\nimport { GatsbyImage, getImage } from \"gatsby-plugin-image\";\nimport type { Category, Tag, Column, ColumnContent } from \"@unisite/core-blog\";\n\nimport DefaultLayout from \"../../../layouts/DefaultLayout\";\nimport Card from \"../../../components/Card\";\nimport AspectRatio from \"../../../components/AspectRatio\";\nimport { Tabs, TabItem } from \"../../../components/Tabs\";\nimport { MDXCard } from \"../../../components/MDXContent\";\nimport type { PageProps } from \"../../../utils\";\nimport { useCategoryPath, useTagPath } from \"../../../utils\";\n\ntype PageData = {\n column: Column;\n contents: {\n nodes: ColumnContent[];\n };\n};\ntype PageContext = {\n id: string;\n contents: string[];\n};\ntype ColumnDetailPage = PageProps<PageData, PageContext>;\n\nfunction ColumnDetailPage(props: ColumnDetailPage): React.ReactElement {\n const { column, contents } = props.data;\n const cover = getImage(column.cover);\n const authors = column.authors || [];\n const categories = column.categories || [];\n const tags = column.tags || [];\n const intro = contents.nodes.filter((node) => node.type === \"intro\")[0]?.body;\n const chapters = column.chapters;\n\n return (\n <DefaultLayout>\n <div className=\"max-w-6xl mx-auto px-6 py-8 grid grid-cols-12\">\n <div className=\"col-start-1 col-span-8 space-y-8\">\n <Card>\n <div className=\"flex flex-row items-center\">\n {cover ? (\n <div className=\"mr-8 w-32 bg-gray-50 rounded-2xl overflow-hidden border border-gray-200 hover:shadow-lg\">\n <AspectRatio ratio={300 / 424}>\n <GatsbyImage image={cover} alt={column.title} />\n </AspectRatio>\n </div>\n ) : null}\n <div className=\"flex flex-1 flex-col\">\n <h1 className=\"text-4xl text-gray-900 font-semibold dark:text-gray-100\">\n {column.title}\n </h1>\n {column.subTitle ? (\n <div className=\"text-gray-700 mt-2 dark:text-gray-300\">\n {column.subTitle}\n </div>\n ) : null}\n <div className=\"mt-4 flex flex-row items-center\">\n {authors.map((author) => (\n <div\n key={author.uid}\n className=\"inline-flex flex-row items-center\"\n >\n <GatsbyImage\n className=\"mr-2 rounded-full cursor-pointer\"\n alt={author.name}\n image={getImage(author.avatar)!}\n />\n <span className=\"text-lg text-gray-900 cursor-pointer hover:underline dark:text-gray-100\">\n {author.name}\n </span>\n </div>\n ))}\n </div>\n </div>\n </div>\n </Card>\n <Tabs>\n <TabItem tab=\"简介\" tabKey=\"intro\">\n <MDXCard>{intro}</MDXCard>\n </TabItem>\n <TabItem tab=\"目录\" tabKey=\"category\">\n <Card>\n <section>\n {(chapters || []).map(({ title, link, sections }, idx) => {\n if (link || !sections)\n return (\n <div\n key={idx}\n className=\"px-4 py-2 text-gray-900 hover:bg-gray-100 rounded-md dark:text-gray-100 dark:hover:bg-true-gray-800\"\n >\n {link ? (\n <Link className=\"block\" to={link}>\n {title}\n </Link>\n ) : (\n <div>{title}</div>\n )}\n </div>\n );\n\n return (\n <div key={idx}>\n <div className=\"mt-6 mb-3 text-2xl text-gray-900 font-semibold dark:text-gray-100\">\n {title}\n </div>\n <ul>\n {(sections || []).map(({ title, link }, idx) => (\n <li\n key={idx}\n className=\"px-4 py-2 text-gray-900 hover:bg-gray-100 rounded-md dark:text-gray-100 dark:hover:bg-true-gray-800\"\n >\n {link ? (\n <Link className=\"block\" to={link}>\n {title}\n </Link>\n ) : (\n <div className=\"flex flex-row justify-between items-center opacity-50\">\n <span>{title}</span>\n <span className=\"text-xs\">待更新</span>\n </div>\n )}\n </li>\n ))}\n </ul>\n </div>\n );\n })}\n </section>\n </Card>\n </TabItem>\n <TabItem tab=\"留言\" tabKey=\"comment\">\n <span className=\"dark:text-gray-300\">暂未开放</span>\n </TabItem>\n </Tabs>\n </div>\n <div className=\"ml-8 col-start-9 col-span-4\">\n <div className=\"sticky top-20 space-y-8\">\n <Card>\n <div className=\"space-y-2\">\n <div className=\"flex flex-row items-center\">\n <span className=\"dark:text-gray-300\">发布时间:</span>\n <div className=\"dark:text-gray-100\">2019-01-01</div>\n </div>\n <div className=\"flex flex-row items-center\">\n <span className=\"dark:text-gray-300\">最近更新:</span>\n <div className=\"dark:text-gray-100\">2019-01-01</div>\n </div>\n <div className=\"flex flex-row items-center\">\n <span className=\"dark:text-gray-300\">分类:</span>\n <div className=\"space-x-2\">\n {categories.map((category) => (\n <CategoryItem key={category.cid} {...category} />\n ))}\n </div>\n </div>\n <div className=\"flex flex-row items-center\">\n <span className=\"dark:text-gray-300\">标签:</span>\n <div className=\"space-x-2\">\n {tags.map((tag) => (\n <TagItem key={tag.tid} {...tag} />\n ))}\n </div>\n </div>\n </div>\n </Card>\n </div>\n </div>\n </div>\n </DefaultLayout>\n );\n}\n\nfunction CategoryItem({ cid, name }: Category) {\n const categoryPath = useCategoryPath(cid);\n\n return (\n <Link\n className=\"px-2 py-0.5 text-gray-700 text-sm bg-gray-100 hover:bg-gray-200 hover:shadow rounded dark:text-true-gray-300 dark:hover:text-true-gray-100 dark:bg-true-gray-800 dark:hover:bg-true-gray-700\"\n to={categoryPath}\n >\n {name}\n </Link>\n );\n}\n\nfunction TagItem({ tid, name }: Tag) {\n const tagPath = useTagPath(tid);\n\n return (\n <Link\n className=\"px-2 py-0.5 text-gray-700 text-sm bg-gray-100 hover:bg-gray-200 hover:shadow rounded dark:text-true-gray-300 dark:hover:text-true-gray-100 dark:bg-true-gray-800 dark:hover:bg-true-gray-700\"\n to={tagPath}\n >\n #{name}\n </Link>\n );\n}\n\nexport const query = graphql`\n query ColumnDetailPageQuery($id: String!, $contents: [String!]!) {\n column(id: { eq: $id }) {\n title\n subTitle\n cover {\n childImageSharp {\n gatsbyImageData(\n width: 300\n aspectRatio: 0.707\n placeholder: BLURRED\n formats: [AUTO, WEBP]\n )\n }\n }\n authors {\n __typename\n uid\n name\n avatar {\n childImageSharp {\n gatsbyImageData(\n width: 40\n height: 40\n layout: FIXED\n placeholder: TRACED_SVG\n formats: [AUTO, WEBP]\n )\n }\n }\n }\n categories {\n cid\n name\n }\n tags {\n tid\n name\n }\n chapters\n }\n contents: allMdxColumnContent(filter: { id: { in: $contents } }) {\n nodes {\n type\n body\n }\n }\n }\n`;\n\nexport default ColumnDetailPage;\n","import React from \"react\";\nimport cls from \"classnames\";\n\ntype CardProps = {\n hoverable?: boolean;\n className?: string;\n};\ntype CardFC = React.FC<CardProps>;\n\nconst Card: CardFC = ({ hoverable = false, className, children }) => {\n return (\n <div\n className={cls([\n \"w-full p-4 md:px-8 md:py-6 transform duration-300 ease-in-out bg-white rounded-2xl shadow-sm dark:bg-true-gray-900\",\n hoverable ? \"hover:shadow-md\" : \"\",\n className,\n ])}\n >\n {children}\n </div>\n );\n};\n\nexport type { CardProps };\nexport default Card;\n","import React from \"react\";\nimport cls from \"classnames\";\nimport { MDXRenderer } from \"gatsby-plugin-mdx\";\n\ntype MDXContentProps = {\n className?: string;\n children?: any;\n};\n\nconst MDXContent = React.forwardRef<HTMLDivElement, MDXContentProps>(\n ({ className, children }, forwardRef) => {\n return (\n <div\n ref={forwardRef}\n className={cls([\n className,\n \"gatsby-typography\",\n \"gatsby-typography--no-last-margin\",\n ])}\n >\n <MDXRenderer>{children}</MDXRenderer>\n </div>\n );\n }\n);\n\nexport type { MDXContentProps };\nexport default MDXContent;\n","import React, { useRef } from \"react\";\n\nimport Card from \"../Card\";\nimport type { CardProps } from \"../Card\";\nimport MDXContent from \"./MDXContent\";\n\ntype MDXCardProps = CardProps & {\n contentClassName?: string;\n children?: any;\n};\n\ntype MDXCardFC = React.FC<MDXCardProps>;\n\nconst MDXCard: MDXCardFC = ({ contentClassName, children, ...props }) => {\n const contentRef = useRef(null);\n\n return (\n <Card {...props}>\n <MDXContent className={contentClassName} ref={contentRef}>\n {children}\n </MDXContent>\n </Card>\n );\n};\n\nexport type { MDXCardProps };\nexport default MDXCard;\n","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var setPrototypeOf = require(\"./setPrototypeOf.js\");\n\nvar isNativeReflectConstruct = require(\"./isNativeReflectConstruct.js\");\n\nfunction _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n module.exports = _construct = Reflect.construct;\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n } else {\n module.exports = _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n }\n\n return _construct.apply(null, arguments);\n}\n\nmodule.exports = _construct;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nmodule.exports = _isNativeReflectConstruct;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var arrayWithoutHoles = require(\"./arrayWithoutHoles.js\");\n\nvar iterableToArray = require(\"./iterableToArray.js\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread.js\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;"],"names":["MDXRenderer","module","exports","_construct","_toConsumableArray","_defineProperty","_objectWithoutPropertiesLoose","_excluded","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","getOwnPropertyDescriptors","defineProperties","defineProperty","React","mdx","useMDXScope","_ref","scope","children","props","mdxScope","End","useMemo","fullScope","values","map","Function","concat","createElement","defaultActiveKey","child","tabKey","defaultVal","item","useState","currentKey","setCurrentKey","content","setContent","useEffect","className","active","onClick","tab","cls","CategoryItem","cid","name","categoryPath","useCategoryPath","to","TagItem","tid","tagPath","useTagPath","data","column","contents","cover","getImage","authors","categories","tags","intro","nodes","node","type","body","chapters","DefaultLayout","Card","AspectRatio","ratio","G","image","alt","title","subTitle","author","uid","avatar","idx","link","sections","category","tag","hoverable","forwardRef","ref","contentClassName","contentRef","useRef","arr","len","arr2","Array","__esModule","arrayLikeToArray","isArray","setPrototypeOf","isNativeReflectConstruct","Parent","args","Class","Reflect","construct","a","instance","bind","prototype","obj","value","configurable","writable","sham","Proxy","Boolean","valueOf","call","e","iter","Symbol","iterator","from","TypeError","arrayWithoutHoles","iterableToArray","unsupportedIterableToArray","nonIterableSpread","o","minLen","n","toString","slice","constructor","test"],"sourceRoot":""}