PageSourceSearch

https://www.misbar.com/default-src_app_shared_components_date_date…s_date_date_-c2cf1f.a61789c390b839ca4bca.js

js misbar.com collected 2026-10-02 06:09:35 UTC 15,142 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkmisbar=self.webpackChunkmisbar||[]).push([["default-src_app_shared_components_date_date_component_ts-src_app_shared_components_date_date_-c2cf1f"],{420:(C,d,n)=>{n.d(d,{I:()=>A});var t=n(7716),p=n(20),r=n(8583);const m=["class","date-formater"];function o(c,T){if(1&c&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&c){const a=t.oxw();t.xp6(1),t.hij(" ",a.formatedDate," ")}}function _(c,T){1&c&&(t.TgZ(0,"span"),t._uU(1," - "),t.qZA())}function f(c,T){if(1&c&&(t.TgZ(0,"span",2),t.TgZ(1,"span"),t._uU(2),t.qZA(),t.qZA()),2&c){const a=t.oxw();t.xp6(2),t.Oqu(a.category)}}let A=(()=>{class c{constructor(a,l){this._cd=a,this._translationService=l,this.dateFormat="normal",this.showDate=!0,this.formatedDate=""}ngOnInit(){this.createDate()}createDate(){if(!this.date)return;const a=new Date(this.date);if(isNaN(a.getTime()))return;const l="ar"===this._translationService.getLang()?"ar-EG-u-ca-gregory":"en-US";this.formatedDate="fromNow"===this.dateFormat?this.getTimeAgo(a,l):new Intl.DateTimeFormat(l,{day:"numeric",month:"long",year:"numeric"}).format(a),this._cd.detectChanges()}getTimeAgo(a,l){const E=Math.floor(((new Date).getTime()-a.getTime())/1e3),x={year:31536e3,month:2592e3,week:604800,day:86400,hour:3600,minute:60,second:1};if("RelativeTimeFormat"in Intl){const I=new Intl.RelativeTimeFormat(l,{numeric:"auto",style:"long"});for(const D in x){const v=Math.floor(E/x[D]);if(v>0)return I.format(-v,D)}return I.format(0,"second")}return a.toLocaleDateString(l)}}return c.\u0275fac=function(a){return new(a||c)(t.Y36(t.sBO),t.Y36(p.D))},c.\u0275cmp=t.Xpm({type:c,selectors:[["",8,"date-formater"]],inputs:{date:"date",dateClass:"dateClass",dateFormat:"dateFormat",category:"category",showDate:"showDate"},attrs:m,decls:4,vars:5,consts:[[4,"ngIf"],["class","date-category",4,"ngIf"],[1,"date-category"]],template:function(a,l){1&a&&(t.TgZ(0,"span"),t.YNc(1,o,2,1,"span",0),t.YNc(2,_,2,0,"span",0),t.YNc(3,f,3,1,"span",1),t.qZA()),2&a&&(t.Tol(l.dateClass),t.xp6(1),t.Q6J("ngIf",l.showDate),t.xp6(1),t.Q6J("ngIf",l.showDate&&l.category),t.xp6(1),t.Q6J("ngIf",l.category))},directives:[r.O5],encapsulation:2,changeDetection:0}),c})()},6595:(C,d,n)=>{n.d(d,{r:()=>m});var t=n(8583),p=n(5469),r=n(7716);let m=(()=>{class o{}return o.\u0275fac=function(f){return new(f||o)}
1,o.\u0275mod=r.oAB({type:o}),o.\u0275inj=r.cJS({imports:[[t.ez,p.aw]]}),o})()},7725:(C,d,n)=>{n.d(d,{s:()=>O});var t=n(7716),p=n(5319),r=n(8583),m=n(9075),o=n(8104);const _=["class","app-quiz"],f=function(s,u,e,i){return{"btn--disabled":s,"user--selected":u,correct:e,wrong:i}};function A(s,u){if(1&s){const e=t.EpF();t.TgZ(0,"div",14),t.TgZ(1,"div",15),t._UZ(2,"img",16),t.qZA(),t.TgZ(3,"div",17),t.TgZ(4,"h4",18),t._uU(5),t.qZA(),t.qZA(),t.TgZ(6,"div",19),t.TgZ(7,"div",20),t.TgZ(8,"a",21),t.NdJ("click",function(){const g=t.CHM(e).index;return t.oxw(3).answer(g,"false")}),t._uU(9,"\u062e\u0637\u0623 "),t.TgZ(10,"span",22),t.O4$(),t.TgZ(11,"svg",23),t.TgZ(12,"g",24),t._UZ(13,"path",25),t._UZ(14,"path",26),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.kcU(),t.TgZ(15,"a",21),t.NdJ("click",function(){const g=t.CHM(e).index;return t.oxw(3).answer(g,"true")}),t._uU(16,"\u0635\u062d\u064a\u062d "),t.TgZ(17,"span",27),t.O4$(),t.TgZ(18,"svg",23),t.TgZ(19,"g",24),t._UZ(20,"path",28),t._UZ(21,"path",29),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&s){const e=u.$implicit,i=t.oxw(3);t.xp6(2),t.Q6J("src",null!=e&&null!=e.image&&null!=e.image.styles&&e.image.styles.large_470x470?i.prefix+(null==e||null==e.image||null==e.image.styles?null:e.image.styles.large_470x470):"",t.LSH),t.xp6(3),t.Oqu(null==e?null:e.title),t.xp6(3),t.Q6J("ngClass",t.l5B(4,f,e.user_answered,i.isUserSelected(e,"false"),i.isUserAnsweredCorrect(e,"false"),!i.isUserAnsweredCorrect(e,"false"))),t.xp6(7),t.Q6J("ngClass",t.l5B(9,f,e.user_answered,i.isUserSelected(e,"true"),i.isUserAnsweredCorrect(e,"true"),!i.isUserAnsweredCorrect(e,"true")))}}function c(s,u){if(1&s){const e=t.EpF();t.TgZ(0,"div",14),t.TgZ(1,"div",30),t._UZ(2,"img",31),t.qZA(),t.TgZ(3,"div",32),t.TgZ(4,"div",33),t._uU(5),t.qZA(),t._UZ(6,"h4",34),t.qZA(),t.TgZ(7,"div",35),t.TgZ(8,"div",20),t.TgZ(9,"a",36),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).nextQuiz()}),t.TgZ(10,"span",37),t._uU(11),t.qZA(),t.TgZ(12,"span",38),t._uU(13,"\u2039"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&s){const e=t.oxw(3);t.xp6(2),t.Q6J("src",e.getLastImg(),t.LSH),t.xp6(3),t.AsE(" ",e.countCorrect," / ",e.items.length," "),t.xp6(1),t.Q6J("innerHTML",e.getQuizDoneText(),t.oJD),t.xp6(5),t.hij(' \u0627\u0644\u0627\u062e\u062a\u0628\u0627\u0631 \u0627\u0644\u062c\u062f\u064a\u062f \u0633\u064a\u0628\u062f\u0623 \u062e\u0644\u0627\u0644 "',e.nextQuizTime,'" - \u0625\u0628\u062f\u0623 ')}}function T(s,u){if(1&s&&(t.TgZ(0,"div",11),t.YNc(1,A,22,14,"div",12),t.YNc(2,c,14,5,"div",13),t.qZA()),2&s){const e=t.oxw(2);t.Q6J("id","misbar_carousel--slide-"+e.slideId),t.xp6(1),t.Q6J("ngForOf",e.items),t.xp6(1),t.Q6J("ngIf",e.isQuizDone())}}const a=function(s,u,e){return{"is--active":s,correct:u,wrong:e}};function l(s,u){if(1&s&&t._UZ(0,"span",39),2&s){const e=u.$implicit;t.Q6J("ngClass",t.kEZ(1,a,e.user_answered,e.result===e.user_answer_result,e.result!==e.user_answer_result))}}function E(s,u){if(1&s){const e=t.EpF();t.TgZ(0,"p",40),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).previous()}),t.TgZ(1,"span"),t._uU(2,"\u2039"),t.qZA(),t.qZA()}}function x(s,u){if(1&s){const e=t.EpF();t.TgZ(0,"p",41),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).next()}),t.TgZ(1,"span"),t._uU(2,"\u203a"),t.qZA(),t.qZA()}}function I(s,u){if(1&s&&(t.TgZ(0,"div"),t.YNc(1,T,3,3,"div",4),t.TgZ(2,"div",5),t.TgZ(3,"div",6),t.YNc(4,l,1,5,"span",7),t.qZA(),t.qZA(),t.TgZ(5,"div",8),t.YNc(6,E,3,0,"p",9),t.YNc(7,x,3,0,"p",10),t.qZA(),t.qZA()),2&s){const e=t.oxw();
1t.xp6(1),t.Q6J("ngIf",e.items.length),t.xp6(3),t.Q6J("ngForOf",e.items),t.xp6(2),t.Q6J("ngIf",e.count>0),t.xp6(1),t.Q6J("ngIf",e.canGoNext())}}function D(s,u){1&s&&(t.TgZ(0,"div"),t.TgZ(1,"div",15),t._UZ(2,"img",42),t.qZA(),t.TgZ(3,"div",43),t.TgZ(4,"div",44),t._UZ(5,"div",45),t._UZ(6,"div",46),t._UZ(7,"div",47),t._UZ(8,"div",48),t._UZ(9,"div",49),t._UZ(10,"div",50),t._UZ(11,"div",51),t._UZ(12,"div",52),t._UZ(13,"div",53),t.qZA(),t.qZA(),t.qZA())}const v=(0,m.Cb)("quiz-api");let O=(()=>{class s{constructor(e,i,h,g){this._DataService=e,this.transferState=i,this.document=h,this.platformId=g,this.quizSubscribtion=new p.w,this.title="",this.slideId=+new Date+Math.floor(1e3*Math.random()),this.count=0,this.items=[],this.countCorrect=0,this.countWrong=0,this.autoNextTimeout=null,this.nextQuizTime=5,this.nextQuizBtn=null,this.nextQuizTimerTimeout=null,this.parentWidth=1e3,this.isLoading=!0,this.isError=!1,this.offset=0,this.limit=10,this.hostname="",this.observer=null,""!==this._DataService.imagePrefix&&(this.prefix=this._DataService.imagePrefix),this.hostname="https://"+this.document.location.hostname}ngOnInit(){var e;const i=this.document.getElementById("misbar_carousel--parent"),h=this.document.getElementById("misbar_carousel--container");this.parentWidth=(null==i?void 0:i.offsetWidth)||1e3,(0,r.NF)(this.platformId)&&("IntersectionObserver"in window&&(this.observer=new IntersectionObserver(this.onElementObserved,{root:i,threshold:0})),h&&(null===(e=this.observer)||void 0===e||e.observe(h))),null!=this.transferState.get(v,null)?(this.items=this.transferState.get(v,null),this.isLoading=!1):this.getQuiz()}ngOnDestroy(){var e;null===(e=this.observer)||void 0===e||e.disconnect()}previous(){this.count>0&&(this.count--,this.scroll("previous"))}next(){this.isQuizDone()&&this.countDownTimer(),(this.count<this.items.length-1||this.isQuizDone())&&(this.count++,this.scroll("next"),clearTimeout(this.autoNextTimeout))}scroll(e){const i=this.document.getElementById("misbar_carousel--container"),h=this.document.getElementById("misbar_carousel--slide-"+this.slideId);let g=0;const U=(null==i?void 0:i.offsetWidth)||0;let Z="reset"===e?this.items.length*U:U,b=setInterval(function(){var M;M=h,g>=Z?clearInterval(b):("next"===e?M.scrollLeft+=Z-g<8?Math.abs(Z-g):8:M.scrollLeft-=Z-g<8?Math.abs(Z-g):8,g+=8)},1)}answer(e,i){this.items[e].result===i?this.countCorrect++:this.countWrong++,this.items[e].user_answer_result=i,this.items[e].user_answered=!0,this.autoNextTimeout=setTimeout(()=>this.next(),750)}isUserAnsweredCorrect(e,i){return e.user_answer_result===i&&e.user_answer_result===e.result}isUserSelected(e,i){return e.user_answered&&e.user_answer_result===i}canGoNext(){return this.count<this.items.length&&this.items[this.count].user_answered}isQuizDone(){return!this.isLoading&&this.countWrong+this.countCorrect===this.items.length}countDownTimer(){this.nextQuizBtn||(this.nextQuizBtn=this.document.getElementById("next--quiz-btn_filler")),0===this.nextQuizTime&&this.nextQuiz(),this.nextQuizTime>0&&(this.nextQuizTimerTimeout=setTimeout(()=>{this.nextQuizTime-=1,this.countDownTimer()},1e3))}nextQuiz(){this.scroll("reset"),this.isLoading=!0,clearTimeout(this.nextQuizTimerTimeout),this.offset++,this.getQuiz()}resetData(){this.isLoading=!0,this.items=[],this.count=0,this.nextQuizTime=5,this.countWrong=0,this.countCorrect=0,this.autoNextTimeout=null}getQuiz(){(0,r.NF)(this.platformId)&&(this.isLoading=!0,this.transferState.set(v,null)),this.quizSubscribtion=this._DataService.getQuiz(this.offset,this.limit).subscribe(e=>{(0,r.PM)(this.platformId)&&this.transferState.set(v,e.items),this.resetData(),this.items=e.items,this.isLoading=!1},e=>{console.log(e)})}getLastImg(){var e;return this.items.length&&(null===(e=this.items[this.items.length-1].photo)||void 0===e?void 0:e.path)||this.hostname+"/assets/images/default.png"}getLoaderImg(){return"/icons/misbar_loader.svg"}getQuizDoneText(){return 10===this.countCorrect?"\u0623\u0646\u062a \u0645\u0644\u0643 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a! &#128081;":this.countCorrect>6&&this.countCorrect<10?"\u0623\u062d\u0633\u0646\u062a! \u062a\u062d\u062f\u0651\u0649 \u0646\u0641\u0633\u0643 \u0628\u0625\u062e\u062a\u0628\u0627\u0631 \u0622\u062e\u0631 \u0648\u062d\u0627\u0648\u0644 \u0627\u0644\u062d\u0635\u0648\u0644 \u0639\u0644\u0649 10/10 &#128077;":this.countCorrect>
13&&this.countCorrect<7?"\u062c\u064a\u062f \u0648\u0644\u0643\u0646\u0643 \u062a\u0633\u062a\u0637\u064a\u0639 \u0623\u0641\u0636\u0644 \u0645\u0646 \u0630\u0644\u0643\u060c \u062d\u0627\u0648\u0644 \u0645\u0631\u0629 \u0623\u062e\u0631\u0649 &#128578;":"\u0644\u0627 \u0628\u0623\u0633\u060c \u064a\u0645\u0643\u0646\u0643 \u0625\u0639\u0627\u062f\u0629 \u0627\u0644\u0627\u062e\u062a\u0628\u0627\u0631 \u0644\u062a\u062d\u0635\u064a\u0644 \u0646\u062a\u064a\u062c\u0629 \u0623\u0641\u0636\u0644 &#129322;"}getParentClass(){return this.parentWidth<601?"width--400":this.parentWidth>600&&this.parentWidth<801?"width--600":this.parentWidth>800&&this.parentWidth<1100?"width--800":"width--1100"}onElementObserved(e){e.forEach(({})=>{})}}return s.\u0275fac=function(e){return new(e||s)(t.Y36(o.D),t.Y36(m.ki),t.Y36(r.K0),t.Y36(t.Lbi))},s.\u0275cmp=t.Xpm({type:s,selectors:[["",8,"app-quiz"]],attrs:_,decls:5,vars:3,consts:[[1,"home_quiz--container"],["id","misbar_carousel--parent",3,"ngClass"],["id","misbar_carousel--container",1,"misbar_carousel--container"],[4,"ngIf"],["class","misbar_carousel--slide",3,"id",4,"ngIf"],[1,"progress-bar--container"],[1,"progress-bar--body"],[3,"ngClass",4,"ngFor","ngForOf"],[1,"control"],["class","prev",3,"click",4,"ngIf"],["class","next",3,"click",4,"ngIf"],[1,"misbar_carousel--slide",3,"id"],["class","slide--item",4,"ngFor","ngForOf"],["class","slide--item",4,"ngIf"],[1,"slide--item"],[1,"img--container"],["alt","item?.image?.alt",2,"width","100%",3,"src"],[1,"body"],[1,"slide--title"],[1,"answer-buttons--container-outer"],[1,"answer-buttons--container"],[3,"ngClass","click"],[1,"false-btn--icon"],["xmlns","http://www.w3.org/2000/svg","width","32","height","32","viewBox","0 0 32 32",1,""],["fill","none","fill-rule","evenodd","stroke","#593657"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2.2","d","M9.247 9.247l13.506 13.506M22.753 9.247L9.247 22.753"],["stroke-width","2","d","M31 16c0 8.285-6.715 15-15 15S1 24.285 1 16 7.715 1 16 1s15 6.715 15 15z"],[1,"true-btn--icon"],["stroke-width","2","d","M31 16c0 8.283-6.715 15-15 15S1 24.283 1 16C1 7.715 7.715 1 16 1s15 6.715 15 15z"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2.2","d","M23.647 11L12.174 22.415 7.666 17.93"],[1,"img--container","quiz-done_img---container"],[2,"width","100%",3,"src"],[1,"body","quiz-done_body"],[1,"quiz_result--container"],[1,"slide--title",3,"innerHTML"],[1,"answer-buttons--container-outer","quiz-done_answer-buttons--container-outer"],[1,"next--quiz-btn",3,"click"],[1,"text"],[1,"arrow"],[3,"ngClass"],[1,"prev",3,"click"],[1,"next",3,"click"],["src","/assets/images/default.png",2,"width","100%"],[1,"loader--container"],[1,"sk-cube-grid"],[1,"sk-cube","sk-cube1"],[1,"sk-cube","sk-cube2"],[1,"sk-cube","sk-cube3"],[1,"sk-cube","sk-cube4"],[1,"sk-cube","sk-cube5"],[1,"sk-cube","sk-cube6"],[1,"sk-cube","sk-cube7"],[1,"sk-cube","sk-cube8"],[1,"sk-cube","sk-cube9"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t.TgZ(2,"div",2),t.YNc(3,I,8,4,"div",3),t.YNc(4,D,14,0,"div",3),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngClass",i.getParentClass()),t.xp6(2),t.Q6J("ngIf",!i.isLoading),t.xp6(1),t.Q6J("ngIf",i.isLoading))},directives:[r.mk,r.O5,r.sg],encapsulation:2}),s})()},5677:(C,d,n)=>{n.d(d,{W:()=>o});var t=n(8583),p=n(985),r=n(5469),m=n(7716);let o=(()=>{class _{}return _.\u0275fac=function(A){return new(A||_)},_.\u0275mod=m.oAB({type:_}),_.\u0275inj=m.cJS({imports:[[t.ez,p.U,r.aw]]}),_})()},4469:(C,d,n)=>{n.d(d,{a:()=>t});const t={ALL:{translation:"CAT_ALL",filter:""},NEWS:{translation:"CAT_NEWS",filter:"news"},POLITICS:{translation:"CAT_POLITICS",filter:"politics"},SPORTS:{translation:"CAT_SPORTS",filter:"sports"},HEALTH:{translation:"CAT_HEALTH",filter:"health"},TECHNOLOGY:{translation:"CAT_TECHNOLOGY",filter:"technology"},ARTS_CULTURE:{translation:"CAT_ARTS_CULTURE",filter:"arts_culture"},ENTERTAINMENT:{translation:"CAT_ENTERTAINMENT",filter:"entertainment"},MUSIC:{translation:"CAT_MUSIC",filter:"music"},BUSINESS:{translation:"CAT_BUSINESS",filter:"business"},SCIENCE:{translation:"CAT_SCIENCE",filter:"science"},LIFESTYLE:{translation:"CAT_LIFESTYLE",filter:"lifestyle"},TRAVEL:{translation:"CAT_TRAVEL",filter:"travel"},GAMING:{translation:"CAT_GAMING",filter:"gaming"},NUTRITION:{translation:"CAT_NUTRITION",filter:"nutrition"},FOOD_BEVERAGES:{translation:"CAT_BEVERAGES",filter:"food_beverages"},SPIRITUALITY_RELIGION:{translation:"CAT_SPIRITUALITY_RELIGION",filter:"spirituality_religion"}}},2147:(C,d,n)=>{n.d(d,{f:()=>p});var t=n(7716);let p=(()=>{class r{}return r.\u0275fac=function(o){return new(o||r)},r.\u0275mod=t.oAB({type:r}),r.\u0275inj=t.cJS({providers:[],imports:[[]]}),r})()},3368:(C,d,n)=>{n.d(d,{p:()=>p});var t=n(7716);let p=(()=>
1{class r{constructor(){}transform(o,_=100){return(o?o.replace(/<.*?>/g,""):"").slice(0,_)}}return r.\u0275fac=function(o){return new(o||r)},r.\u0275pipe=t.Yjl({name:"stripHtml",type:r,pure:!0}),r})()}}]);

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.