\n \n \n {nickName}님, 질문에 대한 답변채택을\n 기다리고 있어요.\n
\n \n ) : null;\n};\n","import { createUuid } from '@common/utils';\nimport { preventSkipToken } from '@common/utils/preventSkipToken';\nimport { infiniteQueryOptions, queryOptions } from '@tanstack/react-query';\n\nimport { AUTH_API, UNAUTH_API } from '@/api';\nimport { AuthInfiniteQueryOptions, UnauthInfiniteQueryOptions } from '@/api/v2';\n\nexport const communityQueryOptionsKeys = {\n latest: createUuid(),\n communityFreeTalkHot: createUuid(),\n communityPolicyTalkHot: createUuid(),\n rollingBannerList: createUuid(),\n newPolicyInfo: createUuid(),\n popularPolicyTalk: createUuid(),\n popularHometownNews: createUuid(),\n popularPolicyInfo: createUuid(),\n popularFreeTalk: createUuid(),\n};\n\nexport const communityFeedbackQueryOptionsKeys = {\n welloNews: createUuid(),\n policyTalk: createUuid(),\n freeTalk: createUuid(),\n};\n\ninterface CommunityQueryOptionsNewsProps {\n searchKeyword?: string;\n isLogin?: boolean;\n communityCategoryId?: number;\n}\n\ninterface CommunityQueryOptionsLatestProps {\n isLogin: boolean | undefined;\n}\n\ninterface CommunityQueryOptionsPolicyTalkProps {\n searchKeyword?: string;\n isLogin?: boolean;\n code?: string;\n}\n\nexport const communityQueryOptions = {\n welloNews: ({\n searchKeyword,\n isLogin,\n communityCategoryId,\n }: CommunityQueryOptionsNewsProps) => {\n const INITIAL_PAGE = 1;\n const INITIAL_SIZE = 20;\n\n const options = infiniteQueryOptions({\n ...(isLogin\n ? AuthInfiniteQueryOptions['get:/wello/v2/auth/community/wello-news']\n : UnauthInfiniteQueryOptions[\n 'get:/wello/v2/allows/community/wello-news'\n ])({\n query: {\n page: INITIAL_PAGE,\n size: INITIAL_SIZE,\n search_keyword: searchKeyword,\n community_category_id: communityCategoryId,\n },\n }),\n enabled: isLogin !== undefined,\n getNextPageParam: (lastPage) => {\n const { page: currentPage, total_count: totalCount } =\n lastPage.context ?? {};\n\n if (!totalCount || !currentPage) return;\n\n const nextPage = currentPage + 1;\n const totalPageCount = Math.ceil(totalCount / INITIAL_SIZE);\n\n if (nextPage <= totalPageCount) return nextPage;\n },\n initialPageParam: INITIAL_PAGE,\n });\n\n return preventSkipToken(options);\n },\n policyTalk: ({\n isLogin,\n code,\n searchKeyword,\n }: CommunityQueryOptionsPolicyTalkProps) => {\n const INITIAL_PAGE = 1;\n const INITIAL_SIZE = 20;\n\n const options = infiniteQueryOptions({\n ...(isLogin\n ? AuthInfiniteQueryOptions['get:/wello/v2/auth/community/policy-talk']\n : UnauthInfiniteQueryOptions[\n 'get:/wello/v2/allows/community/policy-talk'\n ])({\n query: {\n page: INITIAL_PAGE,\n size: INITIAL_SIZE,\n search_keyword: searchKeyword,\n code,\n },\n }),\n enabled: isLogin !== undefined,\n getNextPageParam: (lastPage) => {\n const { page: currentPage, total_count: totalCount } =\n lastPage.context ?? {};\n\n if (!totalCount || !currentPage) return;\n\n const nextPage = currentPage + 1;\n const totalPageCount = Math.ceil(totalCount / INITIAL_SIZE);\n\n if (nextPage <= totalPageCount) return nextPage;\n },\n initialPageParam: INITIAL_PAGE,\n });\n\n return preventSkipToken(options);\n },\n freeTalk: ({ isLogin, searchKeyword }: CommunityQueryOptionsNewsProps) => {\n const INITIAL_PAGE = 1;\n const INITIAL_SIZE = 20;\n\n const options = infiniteQueryOptions({\n ...(isLogin\n ? AuthInfiniteQueryOptions['get:/wello/v2/auth/community/free-talk']\n : UnauthInfiniteQueryOptions[\n 'get:/wello/v2/allows/community/free-talk'\n ])({\n query: {\n page: INITIAL_PAGE,\n size: INITIAL_SIZE,\n search_keyword: searchKeyword,\n },\n }),\n enabled: isLogin !== undefined,\n getNextPageParam: (lastPage) => {\n const { page: currentPage, total_count: totalCount } =\n lastPage.context ?? {};\n\n if (!totalCount || !currentPage) return;\n\n const nextPage = currentPage + 1;\n const totalPageCount = Math.ceil(totalCount / INITIAL_SIZE);\n\n if (nextPage <= totalPageCount) return nextPage;\n },\n initialPageParam: INITIAL_PAGE,\n });\n\n return preventSkipToken(options);\n },\n latest: ({ isLogin }: CommunityQueryOptionsLatestProps) =>\n queryOptions({\n queryKey: [communityQueryOptionsKeys.latest, isLogin],\n enabled: isLogin !== undefined,\n queryFn: () => {\n return isLogin\n ? AUTH_API.getLatestCommunityList()\n : UNAUTH_API.getLatestCommunityList();\n },\n select: (data) => data?.context?.contents,\n }),\n communityFreeTalkHot: ({\n page,\n size,\n enabled,\n }: {\n page: number;\n size: number;\n enabled: boolean;\n }) =>\n queryOptions({\n queryKey: [communityQueryOptionsKeys.communityFreeTalkHot, page, size],\n queryFn: () => UNAUTH_API.getCommunityFreeTalkHot({ page, size }),\n enabled,\n }),\n communityPolicyTalkHot: ({\n page,\n size,\n enabled,\n }: {\n page: number;\n size: number;\n enabled: boolean;\n }) =>\n queryOptions({\n queryKey: [communityQueryOptionsKeys.communityPolicyTalkHot, page, size],\n queryFn: () => UNAUTH_API.getCommunityPolicyTalkHot({ page, size }),\n enabled,\n }),\n rollingBannerList: () =>\n queryOptions({\n queryKey: [communityQueryOptionsKeys.rollingBannerList],\n queryFn: UNAUTH_API.getRollingBannerList,\n }),\n newPolicyInfo: () =>\n queryOptions({\n queryKey: [communityQueryOptionsKeys.newPolicyInfo],\n queryFn: UNAUTH_API.getNewPolicyInfo,\n }),\n popularPolicyTalk: () =>\n queryOptions({\n queryKey: [communityQueryOptionsKeys.popularPolicyTalk],\n queryFn: UNAUTH_API.getPolicyTalkPopular,\n }),\n popularHometownNews: () =>\n queryOptions({\n queryKey: [communityQueryOptionsKeys.popularHometownNews],\n queryFn: UNAUTH_API.getCommunityHometownNewsPopular,\n }),\n popularPolicyInfo: () =>\n queryOptions({\n queryKey: [communityQueryOptionsKeys.popularPolicyInfo],\n queryFn: UNAUTH_API.getPolicyInfoPopular,\n }),\n popularFreeTalk: () =>\n queryOptions({\n queryKey: [communityQueryOptionsKeys.popularFreeTalk],\n queryFn: UNAUTH_API.getFreeTalkPopular,\n }),\n};\n","import dayjs from 'dayjs';\n\nexport const extractDate = (text: string) => {\n const dateRegex = /(\\d{2})\\.(\\d{2})\\.(\\d{2})/;\n const match = text.match(dateRegex);\n\n if (!match) return;\n\n const [, year, month, day] = match;\n\n return dayjs(`20${year}-${month}-${day}`).format('YYYY-MM-DD');\n};\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"contents\":\"page_contents__GgO2A\",\"contentsdiv\":\"page_contentsdiv__kBS8d\"};"],"names":["Promise","resolve","then","__webpack_require__","bind","t","BottomButton","idx","param","isKbWebview","useDeviceInfoStore","state","webviewType","WEBVIEW_TYPE","KB_PAY","setWelloWebLinkModalProps","useGlobalStore","isLogin","useAuthStore","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","jsx","footer","className","Button","onClick","descriptions","link","ROUTES","POLICY_TALK_COMMENT_NEW","pathname","contentIdx","asChild","CustomLink","href","CommentSection","restProps","searchParams","useSearchParams","sortType","get","SEARCH_PARAMS","SORT_TYPE","COMMENT_SORT_TYPE","LATEST","isEnumValue","CustomError","return_message","data","hasPickButton","useQuery","AuthQueryOptions","path","community_id_idx","select","context","comment_pick_check_yn","enabled","toast","useToast","mutate","useMutation","meta","reset","communityFeedbackQueryOptionsKeys","policyTalk","AuthQueryKey","mutationFn","AuthApi","onSuccess","message","type","router","useCustomRouter","CommentList","commentType","COMMENT_TYPE","COMMUNITY","onClickEditButton","push","POLICY_TALK_COMMENT_EDIT","commentId","onClickPickButton","onClickReplyButton","rootCommentId","parentCommentId","COMMENT_LIST","withSearchParams","dynamicPath","contentId","policyTalkContentIdx","PolicyCardList","policyList","isOpen","setIsOpen","useState","isOver","length","jsxs","ul","map","policy","index","idIdx","meta_policy_id_idx","li","POLICY_DETAIL","div","LazyImage","height","src","agency_logo","width","strong","policy_name","p","support_benefit","time","dateTime","extractDate","expiration_date","dimensions","theme","_g","_defs","_extends","Object","assign","n","e","arguments","r","hasOwnProperty","call","apply","components_SvgNoti","createSvgComponent","props","react","createElement","xmlns","fill","viewBox","clipPath","fillRule","d","clipRule","id","RequestPickBanner","nickName","myInfo","jsx_runtime","section","SvgNoti","originalFill","span","communityQueryOptionsKeys","latest","createUuid","communityFreeTalkHot","communityPolicyTalkHot","rollingBannerList","newPolicyInfo","popularPolicyTalk","popularHometownNews","popularPolicyInfo","popularFreeTalk","welloNews","freeTalk","communityQueryOptions","searchKeyword","communityCategoryId","options","infiniteQueryOptions","AuthInfiniteQueryOptions","UnauthInfiniteQueryOptions","query","page","size","search_keyword","community_category_id","undefined","getNextPageParam","lastPage","currentPage","total_count","totalCount","nextPage","Math","ceil","initialPageParam","preventSkipToken","code","queryOptions","queryKey","queryFn","AUTH_API","getLatestCommunityList","UNAUTH_API","contents","getCommunityFreeTalkHot","getCommunityPolicyTalkHot","getRollingBannerList","getNewPolicyInfo","getPolicyTalkPopular","getCommunityHometownNewsPopular","getPolicyInfoPopular","getFreeTalkPopular","match","text","year","month","day","dayjs","concat","format","module","exports"],"sourceRoot":""}