1(window.webpackJsonp=window.webpackJsonp||[]).push([[99],{1146:function(t,e,r){"use strict";r.r(e);r(49),r(38),r(48),r(13),r(37),r(11),r(8),r(7),r(6),r(10);var n=r(2),o=(r(18),r(3)),c=r(4),l=r(698),d=r.n(l);function h(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return f(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,l=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return c=t.done,t},e:function(t){l=!0,o=t},f:function(){try{c||null==r.return||r.return()}finally{if(l)throw o}}}}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,r=new Array(e);i<e;i++)r[i]=t[i];return r}function v(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,r)}return e}function m(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?v(Object(source),!0).forEach((function(e){Object(n.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):v(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var _={name:"SearchPage",components:{DesktopSidebar:r(695).default},i18n:{default:{input_placeholder:"Enter Keyword",search_result:"{searchContentLength} search result in total",no_result:"There is no related article, please enter another keyword.",is_bottom:"The end of the page",loading_error:"Loading error, please check the network environment and try again."},"zh-Hant-*":{input_placeholder:"è«è¼¸å
¥ééµå",search_result:"å
± {searchContentLength} åæå°çµæ",no_result:"å°ç¡ç¸éæç« ï¼æåééµåççå§ï¼",is_bottom:"å·²ç¶å°åºé¨åï¼",loading_error:"è¼å
¥é¯èª¤ï¼è«ç¢ºèªç¶²è·¯ç°å¢å¾é試"},"en-MY":{input_placeholder:"Sila masukkan kata kunci",search_result:"{searchContentLength} hasil carian",no_result:"Belum ada artikel yang berkaitan, cuba dengan kata kunci lain!",is_bottom:"Sudah sampai di bahagian bawah!",loading_error:"Ralat memuatkan halaman, sila semak rangkaian dan cuba lagi"}},asyncData:function(t){return Object(o.a)(regeneratorRuntime.mark((function e(){var r,n,o,c,l,d,f,v,_,y,k;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.query,n=t.store,e.prev=1,c=(null==r?void 0:r.q)||"",l=(null==r?void 0:r.slug)||"",d=1,f=20,v=null,l&&(v=n.state.categories.reduce((function(t,e){if(t)return t;if(decodeURIComponent(e.slug)===l)return m({},e);var r,n=h(e.subcategories);try{for(n.s();!(r=n.n()).done;){var o=r.value;if(decodeURIComponent(o.slug)===l)return m({},o)}}catch(t){n.e(t)}finally{n.f()}return t}),null)),e.next=10,n.dispatch("getArticleSearchResult",{page:d,termId:(null===(o=v)||void 0===o?void 0:o.id)||void 0,size:f,search:c});case 10:return _=e.sent,y=_.totalCount||0,k=_.data||[],e.abrupt("return",{postNum:y,posts:k,category:v,searchContext:c,currentPage:d,limit:f,status:"success"});case 16:return e.prev=16,e.t0=e.catch(1),e.abrupt("return",{status:"error"});case 19:case"end":return e.stop()}}),e,null,[[1,16]])})))()},layout:function(t){return"mobile"===t.store.state.device?"mobile":"default"},data:function(){return{loading:!1,searchValue:""}},computed:m(m({},Object(c.e)(["page","device","service"])),{},{isShownEnd:function(){var t=this.posts.length;return!!t&&t===this.postNum},searchContentLength:function(){return this.searchValue&&"error"!==this.status?this.postNum:0}}),mounted:function(){this.setSearchValue()},methods:m(m({},Object(c.b)(["updatePost","getArticleSearchResult"])),{},{setSearchValue:function(){console.log(this.searchContext),this.searchValue=JSON.parse(JSON.stringify(this.searchContext))},searchContentSubmit:function(){var t=this;return Object(o.a)(regeneratorRuntime.mark((function e(){var r,n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.currentPage=1,e.next=4,t.getArticleSearchResult({page:t.currentPage,termId:(null===(r=t.category)||void 0===r?void 0:r.id)||void 0,size:t.limit,search:t.searchValue});case 4:o=e.sent,t.postNum=o.totalCount||0,t.posts=o.data||[],t.$router.push({query:{q:t.searchValue,slug:(null===(n=t.category)||void 0===n?void 0:n.slug)||void 0}}),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),t.status="error";
1case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))()},searchSubmit:d()(Object(o.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.searchContentSubmit();case 2:case"end":return t.stop()}}),t,this)}))),300),loadMore:function(){var t=this;return Object(o.a)(regeneratorRuntime.mark((function e(){var r,n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.loading=!0,t.currentPage=t.currentPage+1,n=JSON.parse(JSON.stringify(t.posts)),e.next=6,t.getArticleSearchResult({page:t.currentPage,termId:(null===(r=t.category)||void 0===r?void 0:r.id)||void 0,size:t.limit,search:t.searchValue});case 6:o=e.sent,t.postNum=o.totalCount||0,t.posts=n.concat(o.data),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(0),t.status="error";case 14:return e.prev=14,t.loading=!1,e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[0,11,14,17]])})))()}})},y=(r(948),r(5)),component=Object(y.a)(_,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"search-page"},[t.category?r("div",{staticClass:"category-breadcrumbs",class:"category-breadcrumbs--"+t.device},[r("div",{staticClass:"category-breadcrumbs__item"},[r("nuxt-link",{attrs:{to:"/category/"+t.category.slug}},[t._v("\n "+t._s(t.category.name)+"\n ")]),t._v(" "),r("span",[t._v(">")])],1),t._v(" "),r("div",{staticClass:"category-breadcrumbs__item"},[t._v("\n æå°\n ")])]):t._e(),t._v(" "),r("div",{staticClass:"main-content",class:"main-content--"+t.device},[r("div",{staticClass:"search-page__bar"},[r("el-input",{attrs:{placeholder:t.$t("input_placeholder"),disabled:t.loading,"prefix-icon":"el-icon-search",clearable:""},on:{input:t.searchSubmit},model:{value:t.searchValue,callback:function(e){t.searchValue=e},expression:"searchValue"}}),t._v(" "),r("p",{staticClass:"search-page__num"},[t._v("\n "+t._s(t.$t("search_result",{searchContentLength:t.searchContentLength}))+"\n ")])],1),t._v(" "),"success"===t.status?[t.posts.length?[t._l(t.posts,(function(e,n){return r("div",{key:n,staticClass:"search-page__post-content"},[r("PlPostListCell",{key:"search-page-"+e.id,attrs:{"loading-img":t.$staticHost("/images/[email protected]"),"error-img":t.$staticHost("/images/[email protected]"),post:Object.assign({},e,{url:""+t.page.path+e.url,image:e.image}),"img-left":"","title-tag":"h2",size:"mobile"===t.device?"sm":"md","no-preview":"mobile"===t.device,"publish-bottom":"","no-meta":"","image-quality":""},on:{click:function(e){return t.updatePost({post:e.post})}}})],1)})),t._v(" "),t.loading?r("div",{staticClass:"search-page__loading-skeleton"},t._l(4,(function(e){return r("PlPostListSkeleton",{key:"skeleton-"+e,attrs:{card:t.$theme("post_list.card_cell")||!1,"static-host":"",size:"desktop"===t.device?"lg":"sm","image-url":"/images/post-list-skeleton.png","img-left":"desktop"===t.device}})})),1):t._e()]:t._e(),t._v(" "),t.posts.length?t._e():r("div",{staticClass:"search-page__no-result"},[r("img",{attrs:{src:t.$staticHost("/images/img-search-no-result.png"),alt:t.$t("no_result"),srcset:t.$staticHost("/images/[email protected]")+" 2x, "+t.$staticHost("/images/[email protected]")+" 3x"}}),t._v(" "),r("p",{staticClass:"search-page__no-result-content"},[t._v("\n "+t._s(t.$t("no_result"))+"\n ")])])]:t._e(),t._v(" "),"error"===t.status?r("div",{staticClass:"search-page__error"},[r("img",{attrs:{src:t.$staticHost("/images/search-error.svg"),alt:t.$t("loading_error")}}),t._v(" "),r("p",[t._v(t._s(t.$t("loading_error")))])]):t._e(),t._v(" "),"error"!==t.status?r("div",{staticClass:"search-page__in-end"},[t.isShownEnd?r("el-button",{staticClass:"search-page__bottom-btn",attrs:{disabled:"",type:"info",plain:""}},[r("img",{attrs:{src:t.$staticHost("/images/search-in-end.svg"),alt:t.$t("is_bottom")}}),t._v(" "),r("span",{staticClass:"search-page__in-end-content"},[t._v(t._s(t.$t("is_bottom")))])]):t._e(),t._v(" "),t.isShownEnd||!t.posts.length||t.loading?t._e():r("el-button",{staticClass:"search-page__load-more",attrs:{type:"primary",plain:""},on:{click:t.loadMore}},[t._v("\n "+t._s(t.$t("read_more"))+"\n ")])],1):t._e()],2),t._v(" "),"desktop"===t.device?r("DesktopSidebar",{staticClass:"hidden-md-and-down"}):t._e(),t._v(" "),r("div",{staticClass:"clear"})],1)}),[],!1,null,null,null);e.default=component.exports},698:function(t,e,r){var n=r(82),o=r(699),c=r(700),l=Math.max,d=Math.min;t.exports=function(t,e,r){var h,f,v,m,_,y,k=0,w=!1,C=!1,x=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function O(time){var e=h,r=f;return h=f=void 0,k=time,m=t.apply(r,e)}function S(time){return k=time,_=setTimeout($,e),w?O(time):m}function j(time){var t=time-y;return void 0===y||t>=e||t<0||C&&time-k>=v}function $(){var time=o();if(j(time))return P(time);_=setTimeout($,function(time){var t=e-(time-y);return C?d(t,v-(time-k)):t}(time))}function P(time){return _=void 0,x&&h?O(time):(h=f=void 0,m)}function R(){var time=o(),t=j(time);if(h=arguments,f=this,y=time,t){if(void 0===_)return S(y);if(C)return clearTimeout(_),_=setTimeout($,e),O(y)}return void 0===_&&(_=setTimeout($,e)),m}return e=c(e)||0,n(r)&&(w=!!r.leading,v=(C="maxWait"in r)?l(c(r.maxWait)||0,e):v,x="trailing"in r?!!r.trailing:x),R.cancel=function(){void 0!==_&&clearTimeout(_),k=0,h=y=f=_=void 0},R.flush=function(){return void 0===_?m:P(o())},R}},699:function(t,e,r){var n=r(40);t.exports=function(){return n.Date.now()}},700:function(t,e,r){var n=r(701),o=r(82),c=r(703),l=/^[-+]0x[0-9a-f]+$/i,d=/^0b[01]+$/i,h=/^0o[0-7]+$/i,f=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(c(t))return NaN;if(o(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=n(t);var r=d.test(t);return r||h.test(t)?f(t.slice(2),r?2:8):l.test(t)?NaN:+t}},701:function(t,e,r){var n=r(702),o=/^\s+/;t.exports=function(t){return t?t.slice(0,n(t)+1).replace(o,""):t}},702:function(t,e){var r=/\s/;t.exports=function(t){for(var e=t.length;e--&&r.test(t.charAt(e)););return e}},703:function(t,e,r){var n=r(105),o=r(84);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==n(t)}},771:function(t,e,r){},948:function(t,e,r){"use strict";r(771)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.