(window.webpackJsonp=window.webpackJsonp||[]).push([[8,9],{"+7VV":function(e,t,n){"use strict";var r=n("E+oP"),o=n.n(r),i=n("q1tI"),a=n.n(i),c=n("Xaro"),u=n.n(c),s=n("xhFO"),l=(n("YO3V"),n("mdVC"),n("N35l")),p=n.n(l);function f(e,t){if(e===t)return!0;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=Object.prototype.hasOwnProperty,i=0;i0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(Object(i.isValidElement)(t)){var r=t;return function(e){if("string"!=typeof e.type){var t=e.type.displayName||e.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(t," into a
, or turn it into a ")+"drag source or a drop target itself.")}}(r),function(e,t){var n=e.ref;return n?Object(i.cloneElement)(e,{ref:function(e){t(e),n&&n(e)}}):Object(i.cloneElement)(e,{ref:t})}(r,n?function(t){return e(t,n)}:e)}e(t,n)}}function q(e){var t,n,r,o;function i(){o&&(o(),o=null),t&&n&&(o=e.connectChooseSource(t,n,r))}return{receiveHandlerId:function(e){e!==t&&(t=e,i())},hooks:function(e){var t={};return Object.keys(e).forEach(function(n){var r=R(e[n]);t[n]=function(){return r}}),t}({connectSource:function(e,t){e!==n&&(n=e,r=t,i())}})}}function I(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=e;"function"!=typeof e&&(o=function(){return e});var i=T(t);return function(e){return E({connectBackend:function(e,t){return e.connectDragSource(t)},containerDisplayName:"ChooseSource",createHandler:i,registerHandler:x,createMonitor:P,createConnector:q,DecoratedComponent:e,getType:o,collect:n,options:r})}}var N=n("wP27"),D=n.n(N),z=(n("dfIm"),n("MTU0")),M=n.n(z);function B(e){"@babel/helpers - typeof";return(B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function L(){return(L=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(Object(i.isValidElement)(t)){var r=t;return function(e){if("string"!=typeof e.type){var t=e.type.displayName||e.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(t," into a
, or turn it into a ")+"drag source or a drop target itself.")}}(r),function(e,t){var n=e.ref;return n?Object(i.cloneElement)(e,{ref:function(e){t(e),n&&n(e)}}):Object(i.cloneElement)(e,{ref:t})}(r,n?function(t){return e(t,n)}:e)}e(t,n)}}function Wn(e){var t={};return Object.keys(e).forEach(function(n){var r=Fn(e[n]);t[n]=function(){return r}}),t}function Kn(e){var t,n,r,o;function i(){o&&(o(),o=null),t&&n&&(o=e.connectChooseSource(t,n,r))}return{receiveHandlerId:function(e){e!==t&&(t=e,i())},hooks:Wn({connectSource:function(e,t){e!==n&&(n=e,r=t,i())}})}}function Yn(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=e;"function"!=typeof e&&(o=function(){return e});var i=Hn(t);return function(e){return Ln({connectBackend:function(e,t){return e.connectChooseSource(t)},containerDisplayName:"ChoiceSource",createHandler:i,registerHandler:An,createMonitor:Gn,createConnector:Kn,DecoratedComponent:e,getType:o,collect:n,options:r})}}function Xn(e,t,n){var r=n.getRegistry(),o=r.addSource(e,t);return{handlerId:o,unregister:function(){r.removeSource(o)}}}function Jn(e,t){for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:{},o=e;"function"!=typeof e&&(o=function(){return e});var i=Zn(t);return function(e){return Ln({connectBackend:function(e,t){return e.connectChooseTarget(t)},containerDisplayName:"ChoiceTarget",createHandler:i,registerHandler:Xn,createMonitor:tr,createConnector:nr,DecoratedComponent:e,getType:o,collect:n,options:r})}}var or={choiceTarget:function(e,t,n){if(!t.didChoiceTarget())return e}};function ir(e,t){return{connectDropTarget:e.connectTarget(),isOver:!!t.isOver(),canDrop:!!t.canDrop(),didDrop:t.didChoiceTarget(),dropResult:t.getTargetResult(),evtCounter:ae.a.inc()}}var ar={choiceSource:function(e,t,n){return log.info("start ----------------------- : ",e.id," ",e),e._beginDragHandler&&e._beginDragHandler(e),e},canChoice:function(e,t,n){return!e.replicate},endChoice:function(e,t,n){return log.info("end ----------------------- : ",e.id," ",e),e._endDragHandler&&e._endDragHandler(ie()({},{dropResult:t.getTargetResult(),evtCounter:ae.a.inc()})),e}};function cr(e,t){return{connectDrapSource:e.connectSource(),isDragging:t.isChoosing()}}var ur={IS_DRAGGING:"IS_DRAGGING",DROP_IN:"DROP_IN",DROP_OUT:"DROP_OUT"},sr={IS_DRAGGING:"IS_DRAGGING",IN_OVER:"IN_OVER",OUT_OVER:"OUT_OVER",DROP_OUT:"DROP_OUT",DROP_IN:"DROP_IN",RESET:"RESET"},lr=function(e){return void 0!==e&&null!==e};var pr={dragSource:{originStateArr:[{status:["init","dragEnd"],nextAction:ur.IS_DRAGGING,getNextProps:function(e){return{status:"isDragging",shouldUpdate:!0,isChange:!1}}},{status:["isDragging"],nextAction:ur.DROP_IN,getNextProps:function(e){return{status:"dragEnd",shouldUpdate:!0}}},{status:["isDragging"],nextAction:ur.DROP_OUT,getNextProps:function(e){return{status:"dragEnd",shouldUpdate:!0}}}],actionHandler:function(e,t){switch(e){case ur.IS_DRAGGING:return{hasPass:function(){return t.isDragging}};case ur.DROP_IN:return{hasPass:function(){return!t.isDragging&&lr(t.dropResult)}};case ur.DROP_OUT:return{hasPass:function(){return!t.isDragging&&!lr(t.dropResult)}};default:return{hasPass:function(){return!1}}}return{hasPass:function(){return!1}}}},dropTarget:{originStateArr:[{status:["init","dropIn"],nextAction:sr.IS_DRAGGING,getNextProps:function(e){return{status:"isDragging",srcItem:e.srcItem,shouldUpdate:!0}}},{status:["isDragging"],nextAction:sr.IN_OVER,getNextProps:function(e){return{status:"canDrop",shouldUpdate:!0}}},{status:["canDrop"],nextAction:sr.DROP_IN,getNextProps:function(e){return{status:"init",shouldUpdate:!0}}},{status:["dropIn"],action:sr.RESET,getNextProps:function(e){return{shouldUpdate:!1,status:"init"}}}],actionHandler:function(e,t){switch(e){case sr.IS_DRAGGING:return{hasPass:function(){return t.canDrop}};case sr.IN_OVER:return{hasPass:function(){return t.isOver}};case sr.DROP_IN:return{hasPass:function(){return!t.isOver&&t.dropResult&&t.didDrop}};case sr.DROP_OUT:return{hasPass:function(){return!t.canDrop}};case sr.RESET:return{hasPass:function(){return!t.isOver&&t.dropResult&&!t.didDrop}};default:return{hasPass:function(){return!1}}}return{hasPass:function(){return!1}}}}},fr=[{status:["isDragging"],nextAction:ur.DROP_OUT,getNextProps:function(e,t,n){return n._onSourceDropOut?n._onSourceDropOut(e):t}},{status:["isDragging"],nextAction:ur.DROP_IN,getNextProps:function(e,t,n){return e.replicate?{status:"init",shouldUpdate:!0}:n._onSourceDropIn?n._onSourceDropIn(e):t}}],dr=[{status:["canDrop"],nextAction:sr.DROP_IN,getNextProps:function(e,t,n){return n._onTargetDropIn?n._onTargetDropIn(e):t}},{status:["isDragging"],nextAction:sr.DROP_OUT,getNextProps:function(e,t,n){return n._onTargetDropOut?n._onTargetDropOut(e):t}}],hr=[{status:["canDrop"],nextAction:sr.DROP_IN,getNextProps:function(e,t,n){t.getComponentCoorStore().getSrcItem();return n&&n._onSourceDropIn?ie()({},n._onSourceDropIn(e),{status:"init"}):{status:"init"}}},{status:["isDragging"],nextAction:sr.DROP_OUT,getNextProps:function(e,t,n){return n&&n._onSourceDropOut?ie()({},n._onSourceDropOut(e),{status:"init"}):{status:"init"}}},{status:["isDragging"],nextAction:sr.IN_OVER,getNextProps:function(e,t,n){return n&&n._onSourceOver?ie()({},n._onSourceOver(e),{status:"canDrop"}):{status:"canDrop"}}}],yr={front:{dragMachine:st("dragSource",fr,pr),dropMachine:st("dropTarget",dr,pr)},back:{dropMachine:st("dropTarget",hr,pr)}},mr=function(e,t){return"dragSource"===e.obj_evt.dnd_type?Ge(0,Yn("item",ar,cr)(rt(Ne()(t,yr)))):"dropTarget"===e.obj_evt.dnd_type?Ge(0,rr("item",or,ir)(rt(Ne()(t,yr)))):rt(Ne()(t,yr))},br={dropMachine:st("dropTarget",[{status:["init"],nextAction:sr.IS_DRAGGING,getNextProps:function(e,t){var n=t.subItems,r=t.getComponentCoorStore().getSrcItem();return-1!==Ye()(n,function(e){return e.id===r.id})?(t.getAnswerStore().answer(r.id,{index:e.index}),{status:"isDragging",srcItem:r,shouldUpdate:!1}):{status:"isDragging",srcItem:r,shouldUpdate:!0}}},{status:["isDragging"],nextAction:sr.DROP_OUT,getNextProps:function(e,t){var n=t.subItems,r=t.getComponentCoorStore().getSrcItem(),o=Ye()(n,function(e){return e.id===r.id});return-1===o?{status:"init",shouldUpdate:!0}:(n.splice(o,1),{shouldUpdate:!0,subItems:n,status:"init"})}},{status:["canDrop"],nextAction:sr.DROP_IN,getNextProps:function(e,t){var n=t.subItems,r=t.getComponentCoorStore().getSrcItem();return-1===Ye()(n,function(e){return e.id===r.id})?(n=t.subItems.concat([ie()({},r,{replicate:!0})]),t.getAnswerStore().answer(r.id,{index:e.index}),{shouldUpdate:!0,subItems:n,status:"init"}):{shouldUpdate:!0,subItems:n,status:"init"}}}],pr)},vr=function(e,t){return Ge(0,rr("item",or,ir)(Yn("item",ar,cr)(rt(jt()(t,br)))))},gr=[{status:["canDrop"],nextAction:sr.DROP_IN,getNextProps:function(e,t,n){return n&&n._onTargetDropIn?ie()({},n._onTargetDropIn(),{status:"init"}):{status:"init"}}},{status:["isDragging"],nextAction:sr.DROP_OUT,getNextProps:function(e,t,n){return n&&n._onTargetDropOut?ie()({},n._onTargetDropOut(t.srcItem),{status:"init"}):{status:"init"}}},{status:["isDragging"],nextAction:sr.IN_OVER,getNextProps:function(e,t,n){return n&&n._onTargetOver?ie()({},n._onTargetOver(e),{status:"canDrop"}):{status:"canDrop"}}}],_r={source:{dragMachine:st("dragSource",[],pr),dropMachine:st("dropTarget",[],pr)},target:{dropMachine:st("dropTarget",gr,pr)}},wr=function(e,t){return"dragSource"===e.obj_evt.dnd_type?Ge(0,Yn("item",ar,cr)(rt(Zt()(t,_r)))):"dropTarget"===e.obj_evt.dnd_type?Ge(0,rr("item",or,ir)(rt(Zt()(t,_r)))):rt(Zt()(t,_r))};function Or(e){"@babel/helpers - typeof";return(Or="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Sr(){return(Sr=Object.assign||function(e){for(var t=1;t0?t:1/0}},{key:"reset",value:function(){this.setState({status:v,pos:0})}},{key:"release",value:function(e){this.setState({status:1,pos:e-this.state.y})}},{key:"fix",value:function(e){this.setState({status:2,pos:e})}},{key:"updateInitialDimension",value:function(e){e=e||{};var t=this.outerElement.getBoundingClientRect(),n=this.innerElement.getBoundingClientRect(),r=t.width||t.right-t.left,o=n.height||n.bottom-n.top,i=t.top+this.scrollTop;this.setState({top:this.getTopPosition(e.top),bottom:Math.min(this.state.top+o,O),width:r,height:o,x:t.left,y:i,bottomBoundary:this.getBottomBoundary(e.bottomBoundary),topBoundary:i})}},{key:"handleResize",value:function(e,t){this.props.shouldFreeze()||(O=t.resize.height,this.updateInitialDimension(),this.update())}},{key:"handleScrollStart",value:function(e,t){this.frozen=this.props.shouldFreeze(),this.frozen||(this.scrollTop===t.scroll.top?this.skipNextScrollEvent=!0:(this.scrollTop=t.scroll.top,this.updateInitialDimension()))}},{key:"handleScroll",value:function(e,t){this.skipNextScrollEvent?this.skipNextScrollEvent=!1:(w=t.scroll.delta,this.scrollTop=t.scroll.top,this.update())}},{key:"update",value:function(){if(!this.props.enabled||this.state.bottomBoundary-this.state.topBoundary<=this.state.height||0===this.state.width&&0===this.state.height)this.state.status!==v&&this.reset();else{var e=w,t=this.scrollTop+this.state.top,n=this.scrollTop+this.state.bottom;if(t<=this.state.topBoundary)this.reset();else if(n>=this.state.bottomBoundary)this.stickyBottom=this.state.bottomBoundary,this.stickyTop=this.stickyBottom-this.state.height,this.release(this.stickyTop);else if(this.state.height>O-this.state.top)switch(this.state.status){case v:this.release(this.state.y),this.stickyTop=this.state.y,this.stickyBottom=this.stickyTop+this.state.height;case 1:this.stickyBottom=this.stickyTop+this.state.height,e>0&&n>this.stickyBottom?this.fix(this.state.bottom-this.state.height):e<0&&t0&&o===this.state.top)this.stickyTop=t-e,this.stickyBottom=this.stickyTop+i;else if(e<0&&o===this.state.bottom-i)this.stickyBottom=n-e,this.stickyTop=this.stickyBottom-i;else if(o!==this.state.bottom-i&&o!==this.state.top){var a=o+i-this.state.bottom;this.stickyBottom=n-e+a,this.stickyTop=this.stickyBottom-i}else r=!1;r&&this.release(this.stickyTop)}else this.fix(this.state.top);this.delta=e}}},{key:"componentWillReceiveProps",value:function(e){this.updateInitialDimension(e),this.update()}},{key:"componentDidUpdate",value:function(e,t){var n=this;t.status!==this.state.status&&this.props.onStateChange&&this.props.onStateChange({status:this.state.status}),e.enabled!==this.props.enabled&&(this.props.enabled?this.setState({activated:!0},function(){n.updateInitialDimension(),n.update()}):this.setState({activated:!1},function(){n.reset()}))}},{key:"componentWillUnmount",value:function(){for(var e=(this.subscribers||[]).length-1;e>=0;e--)this.subscribers[e].unsubscribe()}},{key:"componentDidMount",value:function(){p||(p=window,c=document,s=c.documentElement,u=c.body,O=p.innerHeight||s.clientHeight,(l=window.Modernizr)&&l.prefixed&&(_=l.csstransforms3d,g=l.prefixed("transform"))),this.scrollTop=u.scrollTop+s.scrollTop,this.props.enabled&&(this.setState({activated:!0}),this.updateInitialDimension(),this.update()),this.subscribers=[(0,y.subscribe)("scrollStart",this.handleScrollStart.bind(this),{useRAF:!0}),(0,y.subscribe)("scroll",this.handleScroll.bind(this),{useRAF:!0,enableScrollInfo:!0}),(0,y.subscribe)("resize",this.handleResize.bind(this),{enableResizeInfo:!0})]}},{key:"translate",value:function(e,t){_&&this.props.enableTransforms&&this.state.activated?e[g]="translate3d(0,"+Math.round(t)+"px,0)":e.top=t+"px"}},{key:"shouldComponentUpdate",value:function(e,t){return!(this.props.shouldFreeze()||(0,b.default)(this.props,e)&&(0,b.default)(this.state,t))}},{key:"render",value:function(){var e,t=this,n={position:2===this.state.status?"fixed":"relative",top:2===this.state.status?"0px":"",zIndex:this.props.innerZ},r={};this.translate(n,this.state.pos),this.state.status!==v&&(n.width=this.state.width+"px",r.height=this.state.height+"px");var o=(0,m.default)("sticky-outer-wrapper",this.props.className,(a(e={},this.props.activeClass,2===this.state.status),a(e,this.props.releasedClass,1===this.state.status),e)),i=this.props.children;return d.default.createElement("div",{ref:function(e){t.outerElement=e},className:o,style:r},d.default.createElement("div",{ref:function(e){t.innerElement=e},className:"sticky-inner-wrapper",style:n},"function"==typeof i?i({status:this.state.status}):i))}}]),t}();S.displayName="Sticky",S.defaultProps={shouldFreeze:function(){return!1},enabled:!0,top:0,bottomBoundary:0,enableTransforms:!0,activeClass:"active",releasedClass:"released",onStateChange:null},S.propTypes={enabled:h.default.bool,top:h.default.oneOfType([h.default.string,h.default.number]),bottomBoundary:h.default.oneOfType([h.default.object,h.default.string,h.default.number]),enableTransforms:h.default.bool,activeClass:h.default.string,releasedClass:h.default.string,onStateChange:h.default.func,shouldFreeze:h.default.func,innerZ:h.default.oneOfType([h.default.string,h.default.number])},S.STATUS_ORIGINAL=v,S.STATUS_RELEASED=1,S.STATUS_FIXED=2,e.exports=S},"0/Q5":function(e,t,n){var r=n("o814");"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,o);r.locals&&(e.exports=r.locals)},"04Yj":function(e,t,n){var r=n("GJxA");"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,o);r.locals&&(e.exports=r.locals)},"0Zj6":function(e,t,n){var r=n("Giku");"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,o);r.locals&&(e.exports=r.locals)},"0iRS":function(e,t){function n(e){"@babel/helpers - typeof";return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(){function e(){}function t(e){var t=e.length-1;return function(){var n=d.call(arguments,0,t),r=d.call(arguments,t);return e.apply(this,n.concat([r]))}}function r(e){return t(function(t,n){"function"!=typeof t&&(t=h(t));return e.call(this,function(e){return t.apply(e,[e].concat(n))})})}function o(e){var t=d.call(arguments,1);return function(){return e.apply(this,t)}}function i(e,t){if(!t)throw new Error("prayer failed: "+e)}function a(e){i("a direction was passed",e===m||e===b)}function c(e,t,n){i("a parent is always present",e),i("leftward is properly set up",t?t[b]===n&&t.parent===e:e.ends[m]===n),i("rightward is properly set up",n?n[m]===t&&n.parent===e:e.ends[b]===t)}function u(e){return insistOnInterVer(),he(e)}function s(e){function t(e){var t,n;return e&&e.nodeType?(n=(t=v(e).children(".mq-root-block").attr(be))&&_.byId[t].controller)?r[n.KIND_OF_MQ](n):null:null}function n(e,t){var n,o,i;for(n in t&&t.handlers&&(t.handlers={fns:t.handlers,APIClasses:r}),t)t.hasOwnProperty(n)&&(o=t[n],i=T[n],e[n]=i?i(o):o)}var r,o,i;if(!(P<=e&&e<=R))throw"Only interface versions between "+P+" and "+R+" supported. You specified: "+e;for(i in r={},t.L=m,t.R=b,t.config=function(e){return n(j.p,e),this},t.registerEmbed=function(e,t){if(!/^[a-z][a-z0-9]*$/i.test(e))throw"Embed name must start with letter and be only letters and digits";k[e]=t},o=r.AbstractMathQuill=y(C,function(e){e.init=function(e){this.__controller=e,this.__options=e.options,this.id=e.id,this.data=e.data},e.__mathquillify=function(e){var t=this.__controller,n=t.root,r=t.container,o=r.addClass(e).contents().detach();n.jQ=v('').attr(be,n.id).appendTo(r),this.latex(o.text()),this.revert=function(){return r.empty().unbind(".mathquill").removeClass("mq-editable-field mq-math-mode mq-text-mode").append(o)}},e.config=function(e){return n(this.__options,e),this},e.el=function(){return this.__controller.container[0]},e.text=function(){return this.__controller.exportText()},e.latex=function(e){return arguments.length>0?(this.__controller.renderLatexMath(e),this.__controller.blurred&&this.__controller.cursor.hide().parent.blur(),this):this.__controller.exportLatex()},e.html=function(){return this.__controller.root.jQ.html().replace(/ mathquill-(?:command|block)-id="?\d+"?/g,"").replace(/.?<\/span>/i,"").replace(/ mq-hasCursor|mq-hasCursor ?/,"").replace(/ class=(""|(?= |>))/g,"")},e.reflow=function(){return this.__controller.root.postOrder("reflow"),this}}),t.prototype=o.prototype,x)!function(n,o){var i=r[n]=o(r);t[n]=function(r,o){var a,c=t(r);return c instanceof i||!r||!r.nodeType?c:((a=E(i.RootBlock(),v(r),j())).KIND_OF_MQ=n,i(a).__mathquillify(o,e))},t[n].prototype=i.prototype}(i,x[i]);return t}function l(e){var t=this.parent,n=e;do{if(n[b])return e.insLeftOf(t);n=n.parent.parent}while(n!==t);e.insRightOf(t)}function p(e,t){e.jQadd=function(){t.jQadd.apply(this,arguments),this.delimjQs=this.jQ.children(":first").add(this.jQ.children(":last")),this.contentjQ=this.jQ.children(":eq(1)")},e.reflow=function(){var e=this.contentjQ.outerHeight()/parseFloat(this.contentjQ.css("fontSize"));te(this.delimjQs,ve(1+.2*(e-1),1.2),1.2*e)}}function f(e,t){t=t||e;var n=de[e],r=de[t];S[e]=o(fe,m,e,n,t,r),S[n]=o(fe,b,e,n,t,r)}var d,h,y,m,b,v,g,_,w,O,S,E,x,j,T,C,k,P,R,q,I,N,D,z,M,B,L,A,U,H,V,Q,G,F,W,K,Y,X,J,Z,$,ee,te,ne,re,oe,ie,ae,ce,ue,se,le,pe,fe,de,he,ye,me=window.jQuery,be="mathquill-block-id",ve=Math.min,ge=Math.max;if(!me)throw"MathQuill requires jQuery 1.5.2+ to be loaded first";for(W in d=[].slice,h=t(function(e,n){return t(function(t,r){if(e in t)return t[e].apply(t,n.concat(r))})}),y=function(e,t,r){function o(e){return"object"==n(e)}function i(e){return"function"==typeof e}function a(){}return function e(n,r){function c(){var e=new u;return i(e.init)&&e.init.apply(e,arguments),e}function u(){}var s,l,p;return void 0===r&&(r=n,n=Object),c.Bare=u,s=a.prototype=n.prototype,(l=u.prototype=c.prototype=c.p=new a).constructor=c,c.extend=function(t){return e(c,t)},(c.open=function(e){if(p={},i(e)?p=e.call(c,l,s,c,n):o(e)&&(p=e),o(p))for(var r in p)t.call(p,r)&&(l[r]=p[r]);return i(l.init)||(l.init=n),c})(r)}}(0,{}.hasOwnProperty),m=-1,b=1,v=y(me,function(e){e.insDirOf=function(e,t){return e===m?this.insertBefore(t.first()):this.insertAfter(t.last())},e.insAtDirEnd=function(e,t){return e===m?this.prependTo(t):this.appendTo(t)}}),g=y(function(e){e.parent=0,e[m]=0,e[b]=0,e.init=function(e,t,n){this.parent=e,this[m]=t,this[b]=n},this.copy=function(e){return g(e.parent,e[m],e[b])}}),_=y(function(e){e[m]=0,e[b]=0,e.parent=0;var t=0;this.byId={},e.init=function(){this.id=t+=1,_.byId[this.id]=this,this.ends={},this.ends[m]=0,this.ends[b]=0},e.dispose=function(){delete _.byId[this.id]},e.toString=function(){return"{{ MathQuill Node #"+this.id+" }}"},e.jQ=v(),e.jQadd=function(e){return this.jQ=this.jQ.add(e)},e.jQize=function(e){function t(e){var n,r;for(e.getAttribute&&(n=e.getAttribute("mathquill-command-id"),r=e.getAttribute("mathquill-block-id"),n&&_.byId[n].jQadd(e),r&&_.byId[r].jQadd(e)),e=e.firstChild;e;e=e.nextSibling)t(e)}var n;for(e=v(e||this.html()),n=0;n"===t.slice(-2))c[e]=t.slice(0,-2)+a+"/>";else if("<"===t.charAt(0)){i("not an unmatched top-level close tag","/"!==t.charAt(1)),c[e]=t.slice(0,-1)+a+">",n=1;do{i("no missing close tags",t=c[e+=1]),""!==t.slice(-2)&&(n+=1)}while(n>0)}return c.join("").replace(/>&(\d+)/g,function(e,t){return" mathquill-block-id="+o[t].id+">"+o[t].join("html")})},e.latex=function(){return this.foldChildren(this.ctrlSeq,function(e,t){return e+"{"+(t.latex()||" ")+"}"})},e.textTemplate=[""],e.text=function(){var e=this,t=0;return e.foldChildren(e.textTemplate[t],function(n,r){t+=1;var o=r.text();return n&&"("===e.textTemplate[t]&&"("===o[0]&&")"===o.slice(-1)?n+o.slice(1,-1)+e.textTemplate[t]:n+r.text()+(e.textTemplate[t]||"")})}}),B=y(M,function(t,n){t.init=function(e,t,r){r||(r=e&&e.length>1?e.slice(1):e),n.init.call(this,e,t,[r])},t.parser=function(){return I.succeed(this)},t.numBlocks=function(){return 0},t.replaces=function(e){e.remove()},t.createBlocks=e,t.latex=function(){return this.ctrlSeq},t.text=function(){return this.textTemplate},t.isEmpty=function(){return!0}}),L=y(B,function(e,t){e.init=function(e,n){t.init.call(this,e,""+(n||e)+"")}}),A=y(B,function(e,t){e.init=function(e,n,r){t.init.call(this,e,''+n+"",r)}}),U=y(z,function(e,t){e.join=function(e){return this.foldChildren("",function(t,n){return t+n[e]()})},e.html=function(){return this.join("html")},e.latex=function(){return this.join("latex")},e.text=function(){return this.ends[m]===this.ends[b]&&0!==this.ends[m]?this.ends[m].text():this.join("text")}}),x.StaticMath=function(e){return y(e.AbstractMathQuill,function(t,n){this.RootBlock=U,t.__mathquillify=function(e,t){return this.config(e),n.__mathquillify.call(this,"mq-math-mode"),this},t.init=function(){n.init.apply(this,arguments),this.__controller.root.postOrder("registerInnerField",this.innerFields=[],e.MathField)},t.latex=function(){var t=n.latex.apply(this,arguments);return arguments.length>0&&this.__controller.root.postOrder("registerInnerField",this.innerFields=[],e.MathField),t},t.renderHtmlMath=function(e){return this.__controller.renderHtmlMath(e)},t.renderLatex=function(e){return this.__controller.renderLatex(e)}})},y(U,function(e){var t,n="moveOutOf deleteOutOf selectOutOf upOutOf downOutOf".split(" ");for(t=0;t"+(n||e)+"")},e.text=function(){var e=this.ctrlSeq;return this.isPartOfOperator?"\\"==e[0]?e=e.slice(1,e.length):" "==e[e.length-1]&&(e=e.slice(0,-1)):(!this[m]||this[m]instanceof H||this[m]instanceof A||"\\ "===this[m].ctrlSeq||(e="*"+e),!this[b]||this[b]instanceof A||this[b]instanceof ae||(e+="*")),e}}),V=y(H,function(e,t){e.init=function(e){return t.init.call(this,this.letter=e)},e.finalizeTree=e.siblingDeleted=e.siblingCreated=function(e,t){t!==m&&this[b]instanceof V||this.autoUnItalicize(e)}}),Q={},G=j.p.autoOperatorNames={_maxLength:9},function(){var e,t,n,r,o="arg deg det dim exp gcd hom inf ker lg lim ln log max min sup limsup liminf injlim projlim Pr".split(" ");for(e=0;ef')}}),O[" "]=O.space=o(L,"\\ "," "),O["'"]=O.prime=o(L,"'","′"),O["″"]=O.dprime=o(L,"″","″"),O.backslash=o(L,"\\backslash ","\\"),S["\\"]||(S["\\"]=O.backslash),O.$=o(L,"\\$","$"),K=y(B,function(e,t){e.init=function(e,n){t.init.call(this,e,''+(n||e)+"")}}),O["@"]=K,O["&"]=o(K,"\\&","&"),O["%"]=o(K,"\\%","%"),O.alpha=O.beta=O.gamma=O.delta=O.zeta=O.eta=O.theta=O.iota=O.kappa=O.mu=O.nu=O.xi=O.rho=O.sigma=O.tau=O.chi=O.psi=O.omega=y(H,function(e,t){e.init=function(e){t.init.call(this,"\\"+e+" ","&"+e+";")}}),O.phi=o(H,"\\phi ","ϕ"),O.phiv=O.varphi=o(H,"\\varphi ","φ"),O.epsilon=o(H,"\\epsilon ","ϵ"),O.epsiv=O.varepsilon=o(H,"\\varepsilon ","ε"),O.piv=O.varpi=o(H,"\\varpi ","ϖ"),O.sigmaf=O.sigmav=O.varsigma=o(H,"\\varsigma ","ς"),O.thetav=O.vartheta=O.thetasym=o(H,"\\vartheta ","ϑ"),O.upsilon=O.upsi=o(H,"\\upsilon ","υ"),O.gammad=O.Gammad=O.digamma=o(H,"\\digamma ","ϝ"),O.kappav=O.varkappa=o(H,"\\varkappa ","ϰ"),O.rhov=O.varrho=o(H,"\\varrho ","ϱ"),O.pi=O["π"]=o(K,"\\pi ","π"),O.lambda=o(K,"\\lambda ","λ"),O.Upsilon=O.Upsi=O.upsih=O.Upsih=o(B,"\\Upsilon ",'ϒ'),O.Gamma=O.Delta=O.Theta=O.Lambda=O.Xi=O.Pi=O.Sigma=O.Phi=O.Psi=O.Omega=O.forall=y(L,function(e,t){e.init=function(e){t.init.call(this,"\\"+e+" ","&"+e+";")}}),Y=y(M,function(e){e.init=function(e){this.latex=e},e.parser=function(){var e=N.parse(this.latex).children();return I.succeed(e)}}),O["¹"]=o(Y,"^1"),O["²"]=o(Y,"^2"),O["³"]=o(Y,"^3"),O["¼"]=o(Y,"\\frac14"),O["½"]=o(Y,"\\frac12"),O["¾"]=o(Y,"\\frac34"),X=y(A,function(e){e.init=L.prototype.init,e.contactWeld=e.siblingCreated=e.siblingDeleted=function(e,t){if(t!==b)return this.jQ[0].className=function e(t){return t[m]?t[m]instanceof A||/^[,;:\(\[]$/.test(t[m].ctrlSeq)?"":"mq-binary-operator":t.parent&&t.parent.parent&&t.parent.parent.isStyleBlock()?e(t.parent.parent):""}(this),this}}),O["+"]=o(X,"+","+"),O["–"]=O["-"]=o(X,"-","−"),O["±"]=O.pm=O.plusmn=O.plusminus=o(X,"\\pm ","±"),O.mp=O.mnplus=O.minusplus=o(X,"\\mp ","∓"),S["*"]=O.sdot=O.cdot=o(A,"\\cdot ","·","*"),J=y(A,function(e,t){e.init=function(e,n){this.data=e,this.strict=n;var r=n?"Strict":"";t.init.call(this,e["ctrlSeq"+r],e["html"+r],e["text"+r])},e.swap=function(e){this.strict=e;var t=e?"Strict":"";this.ctrlSeq=this.data["ctrlSeq"+t],this.jQ.html(this.data["html"+t]),this.textTemplate=[this.data["text"+t]]}}),Z={ctrlSeq:"\\le ",html:"≤",text:"≤",ctrlSeqStrict:"<",htmlStrict:"<",textStrict:"<"},$={ctrlSeq:"\\ge ",html:"≥",text:"≥",ctrlSeqStrict:">",htmlStrict:">",textStrict:">"},O["<"]=O.lt=o(J,Z,!0),O[">"]=O.gt=o(J,$,!0),O["≤"]=O.le=O.leq=o(J,Z,!1),O["≥"]=O.ge=O.geq=o(J,$,!1),ee=y(A,function(e,t){e.init=function(){t.init.call(this,"=","=")}}),O["="]=ee,O["×"]=O.times=o(A,"\\times ","×","[x]"),O["÷"]=O.div=O.divide=O.divides=o(A,"\\div ","÷","[/]"),S["~"]=O.sim=o(A,"\\sim ","~","~"),ne=document.createElement("div").style,{transform:1,WebkitTransform:1,MozTransform:1,OTransform:1,msTransform:1})if(oe in ne){re=oe;break}for(ye in te=re?function(e,t,n){e.css(re,"scale("+t+","+n+")")}:"filter"in ne?function(e,t,n){function r(){e.css("marginRight",(o.width()-1)*(t-1)/t+"px")}var o,i;t/=1+(n-1)/2,e.css("fontSize",n+"em"),e.hasClass("mq-matrixed-container")||e.addClass("mq-matrixed-container").wrapInner(''),o=e.children().css("filter","progid:DXImageTransform.Microsoft.Matrix(M11="+t+",SizingMethod='auto expand')"),r(),i=setInterval(r),v(window).load(function(){clearTimeout(i),r()})}:function(e,t,n){e.css("fontSize",n+"em")},ie=y(M,function(e,t){e.init=function(e,n,r){t.init.call(this,e,"<"+n+" "+r+">&0")}}),O.mathrm=o(ie,"\\mathrm","span",'class="mq-roman mq-font"'),O.mathit=o(ie,"\\mathit","i",'class="mq-font"'),O.mathbf=o(ie,"\\mathbf","b",'class="mq-font"'),O.mathsf=o(ie,"\\mathsf","span",'class="mq-sans-serif mq-font"'),O.mathtt=o(ie,"\\mathtt","span",'class="mq-monospace mq-font"'),O.underline=o(ie,"\\underline","span",'class="mq-non-leaf mq-underline"'),O.overline=O.bar=o(ie,"\\overline","span",'class="mq-non-leaf mq-overline"'),O.overrightarrow=o(ie,"\\overrightarrow","span",'class="mq-non-leaf mq-overarrow mq-arrow-right"'),O.overleftarrow=o(ie,"\\overleftarrow","span",'class="mq-non-leaf mq-overarrow mq-arrow-left"'),O.overleftrightarrow=o(ie,"\\overleftrightarrow","span",'class="mq-non-leaf mq-overarrow mq-arrow-both"'),O.overarc=o(ie,"\\overarc","span",'class="mq-non-leaf mq-overarc"'),O.dot=y(M,function(e,t){e.init=function(){t.init.call(this,"\\dot",'˙&0')}}),ae=y(M,function(e,t){e.ctrlSeq="_{...}^{...}",e.createLeftOf=function(e){if(this.replacedFragment||e[m]||!e.options.supSubsRequireOperand)return t.createLeftOf.apply(this,arguments)},e.contactWeld=function(e){var t,n,r,o,i,a;for(t=m;t;t=t===m&&b)if(this[t]instanceof ae){for(n="sub";n;n="sub"===n&&"sup")r=this[n],o=this[t][n],r&&(o?r.isEmpty()?a=g(o,0,o.ends[m]):(r.jQ.children().insAtDirEnd(-t,o.jQ),i=r.children().disown(),a=g(o,i.ends[b],o.ends[m]),t===m?i.adopt(o,o.ends[b],0):i.adopt(o,0,o.ends[m])):this[t].addBlock(r.disown()),this.placeCursor=function(e,n){return function(r){r.insAtDirEnd(-t,e||n)}}(o,r));this.remove(),e&&e[m]===this&&(t===b&&a?a[m]?e.insRightOf(a[m]):e.insAtLeftEnd(a.parent):e.insRightOf(this[t]));break}},j.p.charsThatBreakOutOfSupSub="",e.finalizeTree=function(){this.ends[m].write=function(e,t){if(e.options.autoSubscriptNumerals&&this===this.parent.sub){if("_"===t)return;var n=this.chToCmd(t,e.options);return n instanceof B?e.deleteSelection():e.clearSelection().insRightOf(this.parent),n.createLeftOf(e.show())}e[m]&&!e[b]&&!e.selection&&e.options.charsThatBreakOutOfSupSub.indexOf(t)>-1&&e.insRightOf(this.parent),U.p.write.apply(this,arguments)}},e.latex=function(){function e(e,t){var n=t&&t.latex();return t?e+(1===n.length?n:"{"+(n||" ")+"}"):""}return e("_",this.sub)+e("^",this.sup)},e.addBlock=function(e){"sub"===this.supsub?(this.sup=this.upInto=this.sub.upOutOf=e,e.adopt(this,this.sub,0).downOutOf=this.sub,e.jQ=v('').append(e.jQ.children()).attr(be,e.id).prependTo(this.jQ)):(this.sub=this.downInto=this.sup.downOutOf=e,e.adopt(this,0,this.sup).upOutOf=this.sup,e.jQ=v('').append(e.jQ.children()).attr(be,e.id).appendTo(this.jQ.removeClass("mq-sup-only")),this.jQ.append(''));for(var t=0;t<2;t+=1)!function(e,t,n,r){e[t].deleteOutOf=function(o,i){if(i.insDirOf(this[o]?-o:o,this.parent),!this.isEmpty()){var a=this.ends[o];this.children().disown().withDirAdopt(o,i.parent,i[o],i[-o]).jQ.insDirOf(-o,i.jQ),i[-o]=a}e.supsub=n,delete e[t],delete e[r+"Into"],e[n][r+"OutOf"]=l,delete e[n].deleteOutOf,"sub"===t&&v(e.jQ.addClass("mq-sup-only")[0].lastChild).remove(),this.remove()}}(this,"sub sup".split(" ")[t],"sup sub".split(" ")[t],"down up".split(" ")[t])}}),O.subscript=O._=y(ae,function(e,t){e.supsub="sub",e.htmlTemplate='&0',e.textTemplate=["_"],e.finalizeTree=function(){this.downInto=this.sub=this.ends[m],this.sub.upOutOf=l,t.finalizeTree.call(this)}}),O.superscript=O.supscript=O["^"]=y(ae,function(e,t){e.supsub="sup",e.htmlTemplate='&0',e.textTemplate=["^"],e.finalizeTree=function(){this.upInto=this.sup=this.ends[b],this.sup.downOutOf=l,t.finalizeTree.call(this)},e.reflow=function(){var e=this.jQ,t=e.prev().innerHeight();t*=.6,e.css("vertical-align",t+"px")}}),ce=y(M,function(e,t){e.init=function(e,t){var n='&1'+t+'&0';B.prototype.init.call(this,e,n)},e.latex=function(){function e(e){return 1===e.length?e:"{"+(e||" ")+"}"}return this.ctrlSeq+"_"+e(this.ends[m].latex())+"^"+e(this.ends[b].latex())},e.parser=function(){var e,t=I.string,n=I.optWhitespace,r=I.succeed,o=N.block,i=this,a=i.blocks=[U(),U()];for(e=0;e&1&0')},e.createLeftOf=M.p.createLeftOf}),ue=O.frac=O.dfrac=O.cfrac=O.fraction=y(M,function(e,t){e.ctrlSeq="\\frac",e.htmlTemplate='&0&1',e.textTemplate=["(",")/(",")"],e.finalizeTree=function(){this.upInto=this.ends[b].upOutOf=this.ends[m],this.downInto=this.ends[m].downOutOf=this.ends[b]}}),O.over=S["/"]=y(ue,function(e,t){}),se=O.sqrt=O["√"]=y(M,function(e,t){e.ctrlSeq="\\sqrt",e.htmlTemplate='&0',e.textTemplate=["sqrt(",")"],e.parser=function(){return N.optBlock.then(function(e){return N.block.map(function(t){var n=le();return n.blocks=[e,t],e.adopt(n,0,0),t.adopt(n,e,0),n})}).or(t.parser.call(this))},e.reflow=function(){var e=this.ends[b].jQ;te(e.prev(),1,e.innerHeight()/+e.css("fontSize").slice(0,-2)-.1)}}),O.hat=y(M,function(e,t){e.ctrlSeq="\\hat",e.htmlTemplate='^&0',e.textTemplate=["hat(",")"]}),le=O.nthroot=y(se,function(e,t){e.htmlTemplate='&0&1',e.textTemplate=["sqrt[","](",")"],e.latex=function(){return"\\sqrt["+this.ends[m].latex()+"]{"+this.ends[b].latex()+"}"}}),pe=y(M,function(e,t){e.init=function(e,n,r){var o=''+n+'&0';t.init.call(this,e,o,r)}}),O.vec=o(pe,"\\vec","→",["vec(",")"]),O.tilde=o(pe,"\\tilde","~",["tilde(",")"]),fe=y(y(M,p),function(e,t){e.init=function(e,n,r,o,i){t.init.call(this,"\\left"+o,void 0,[n,r]),this.side=e,this.sides={},this.sides[m]={ch:n,ctrlSeq:o},this.sides[b]={ch:r,ctrlSeq:i}},e.numBlocks=function(){return 1},e.html=function(){return this.htmlTemplate=''+this.sides[m].ch+'&0'+this.sides[b].ch+"",t.html.call(this)},e.latex=function(){return"\\left"+this.sides[m].ctrlSeq+this.ends[m].latex()+"\\right"+this.sides[b].ctrlSeq},e.matchBrack=function(e,t,n){return n instanceof fe&&n.side&&n.side!==-t&&(!e.restrictMismatchedBrackets||de[this.sides[this.side].ch]===n.sides[n.side].ch||{"(":"]","[":")"}[this.sides[m].ch]===n.sides[b].ch)&&n},e.closeOpposing=function(e){e.side=0,e.sides[this.side]=this.sides[this.side],e.delimjQs.eq(this.side===m?0:1).removeClass("mq-ghost").html(this.sides[this.side].ch)},e.finalizeTree=function(){this.ends[m].deleteOutOf=function(e,t){this.parent.deleteSide(e,!0,t)},this.finalizeTree=this.intentionalBlur=function(){this.delimjQs.eq(this.side===m?1:0).removeClass("mq-ghost"),this.side=0}},e.siblingCreated=function(e,t){t===-this.side&&this.finalizeTree()}}),de={"(":")",")":"(","[":"]","]":"[","{":"}","}":"{","\\{":"\\}","\\}":"\\{","⟨":"⟩","⟩":"⟨","\\langle ":"\\rangle ","\\rangle ":"\\langle ","|":"|","\\lVert ":"\\rVert ","\\rVert ":"\\lVert "},f("("),f("["),f("{","\\{"),O.langle=o(fe,m,"⟨","⟩","\\langle ","\\rangle "),O.rangle=o(fe,b,"⟨","⟩","\\langle ","\\rangle "),S["|"]=o(fe,m,"|","|","|","|"),O.lVert=o(fe,m,"∥","∥","\\lVert ","\\rVert "),O.rVert=o(fe,b,"∥","∥","\\lVert ","\\rVert "),O.left=y(M,function(e){e.parser=function(){var e=I.regex,t=I.string,n=(I.succeed,I.optWhitespace);return n.then(e(/^(?:[([|]|\\\{|\\langle\b|\\lVert\b)/)).then(function(r){var o="\\"===r.charAt(0)?r.slice(1):r;return"\\langle"==r&&(o="⟨",r+=" "),"\\lVert"==r&&(o="∥",r+=" "),N.then(function(i){return t("\\right").skip(n).then(e(/^(?:[\])|]|\\\}|\\rangle\b|\\rVert\b)/)).map(function(e){var t,n="\\"===e.charAt(0)?e.slice(1):e;return"\\rangle"==e&&(n="⟩",e+=" "),"\\rVert"==e&&(n="∥",e+=" "),(t=fe(0,o,n,r,e)).blocks=[i],i.adopt(t,0,0),t})})})}}),O.right=y(M,function(e){e.parser=function(){return I.fail("unmatched \\right")}}),O.binom=O.binomial=y(y(M,p),function(e,t){e.ctrlSeq="\\binom",e.htmlTemplate='(&0&1)',e.textTemplate=["choose(",",",")"]}),O.inputText=y(M,function(e,t){e.ctrlSeq="\\inputText",e.htmlTemplate='
&0 &1
',e.latex=function(){return"\\inputText{"+this.blocks[0].latex()+"}{}"},e.jsxHtml=function(){var e=D.getIdFromSuffix("inputText",this.blocks[0].latex()),t='
';return D.storeProps("inputText",e,this.blocks[1].latex()),t},e.textTemplate=["(",")/(",")"],e.finalizeTree=function(){this.upInto=this.ends[b].upOutOf=this.ends[m],this.downInto=this.ends[m].downOutOf=this.ends[b]}}),O.mInputText=y(M,function(e,t){e.ctrlSeq="\\mInputText",e.htmlTemplate='
&0 &1
',e.latex=function(){return"\\mInputText{"+this.blocks[0].latex()+"}{}"},e.jsxHtml=function(){var e=D.getIdFromSuffix("mInputText",this.blocks[0].latex()),t='
';return D.storeProps("mInputText",e,this.blocks[1].latex()),t},e.textTemplate=["(",")/(",")"],e.finalizeTree=function(){this.upInto=this.ends[b].upOutOf=this.ends[m],this.downInto=this.ends[m].downOutOf=this.ends[b]}}),O.ntimes=y(M,function(e,t){e.ctrlSeq="\\ntimes",e.htmlTemplate='
&0
×
&1
',e.textTemplate=["custime(",")"],e.parser=function(){return N.optBlock.then(function(e){return N.block.map(function(t){var n=le();return n.blocks=[e,t],e.adopt(n,0,0),t.adopt(n,e,0),n})}).or(t.parser.call(this))},e.reflow=function(){var e=this.ends[b].jQ;te(e.prev(),1,e.innerHeight()/+e.css("fontSize").slice(0,-2)-.1)}}),O.atimes=y(M,function(e,t){e.ctrlSeq="\\atimes",e.htmlTemplate='
&0
+
&1
',e.textTemplate=["custime(",")"],e.parser=function(){return N.optBlock.then(function(e){return N.block.map(function(t){var n=le();return n.blocks=[e,t],e.adopt(n,0,0),t.adopt(n,e,0),n})}).or(t.parser.call(this))},e.reflow=function(){var e=this.ends[b].jQ;te(e.prev(),1,e.innerHeight()/+e.css("fontSize").slice(0,-2)-.1)}}),O.stimes=y(M,function(e,t){e.ctrlSeq="\\stimes",e.htmlTemplate='
&0
-
&1
',e.textTemplate=["custime(",")"],e.parser=function(){return N.optBlock.then(function(e){return N.block.map(function(t){var n=le();return n.blocks=[e,t],e.adopt(n,0,0),t.adopt(n,e,0),n})}).or(t.parser.call(this))},e.reflow=function(){var e=this.ends[b].jQ;te(e.prev(),1,e.innerHeight()/+e.css("fontSize").slice(0,-2)-.1)}}),he=s(1))!function(e,t){"function"==typeof t?(u[e]=function(){return insistOnInterVer(),t.apply(this,arguments)},u[e].prototype=t.prototype):u[e]=t}(ye,he[ye])}()},"0px3":function(e,t,n){"use strict";var r=n("kOwS"),o=n("hi2O"),i=n("c7wz"),a=n("TSYQ"),c=n.n(a),u=n("q1tI"),s=n.n(u),l=n("17x9"),p=n.n(l),f=n("BGzO"),d=n.n(f),h=n("uwnE"),y=n("ga9N"),m={componentClass:d.a,xs:p.a.number,sm:p.a.number,md:p.a.number,lg:p.a.number,xsHidden:p.a.bool,smHidden:p.a.bool,mdHidden:p.a.bool,lgHidden:p.a.bool,xsOffset:p.a.number,smOffset:p.a.number,mdOffset:p.a.number,lgOffset:p.a.number,xsPush:p.a.number,smPush:p.a.number,mdPush:p.a.number,lgPush:p.a.number,xsPull:p.a.number,smPull:p.a.number,mdPull:p.a.number,lgPull:p.a.number},b=function(e){function t(){return e.apply(this,arguments)||this}return Object(i.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.componentClass,n=e.className,i=Object(o.a)(e,["componentClass","className"]),a=Object(h.f)(i),u=a[0],l=a[1],p=[];return y.a.forEach(function(e){function t(t,n){var r=""+e+t,o=l[r];null!=o&&p.push(Object(h.e)(u,""+e+n+"-"+o)),delete l[r]}t("",""),t("Offset","-offset"),t("Push","-push"),t("Pull","-pull");var n=e+"Hidden";l[n]&&p.push("hidden-"+e),delete l[n]}),s.a.createElement(t,Object(r.a)({},l,{className:c()(n,p)}))},t}(s.a.Component);b.propTypes=m,b.defaultProps={componentClass:"div"},t.a=Object(h.a)("col",b)},"1+Gg":function(e,t,n){"use strict";var r=n("q1tI"),o=n.n(r),i=n("I+pd"),a=(n("OO9F"),n("25vq")),c=n("g8p1");function u(e){"@babel/helpers - typeof";return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:null,r=a()(this.results,function(t){return t.id===e});-1===r?this.results.push({id:e,answer:t}):"delete"===n?o()(this.results,function(t){return t.id==e}):this.results[r].answer=t,this.actionDispatch&&this.actionDispatch.answer&&this.actionDispatch.answer(this.results,this.dispatchProps,n)}},{key:"answerBatch",value:function(e){this.results=e,this.actionDispatch.answer(this.results,this.dispatchProps)}},{key:"getResults",value:function(){return this.results}},{key:"reset",value:function(){this.results=[]}}]),e}()},"2ScO":function(e,t,n){"use strict";var r=n("kOwS"),o=n("hi2O"),i=n("c7wz"),a=n("TSYQ"),c=n.n(a),u=n("q1tI"),s=n.n(u),l=n("17x9"),p=n.n(l),f=n("uwnE"),d=n("ga9N"),h=n("NA7k"),y={controlId:p.a.string,validationState:p.a.oneOf(["success","warning","error",null])},m={$bs_formGroup:p.a.object.isRequired},b=function(e){function t(){return e.apply(this,arguments)||this}Object(i.a)(t,e);var n=t.prototype;return n.getChildContext=function(){var e=this.props;return{$bs_formGroup:{controlId:e.controlId,validationState:e.validationState}}},n.hasFeedback=function(e){var t=this;return h.a.some(e,function(e){return"feedback"===e.props.bsRole||e.props.children&&t.hasFeedback(e.props.children)})},n.render=function(){var e=this.props,t=e.validationState,n=e.className,i=e.children,a=Object(o.a)(e,["validationState","className","children"]),u=Object(f.g)(a,["controlId"]),l=u[0],p=u[1],d=Object(r.a)({},Object(f.d)(l),{"has-feedback":this.hasFeedback(i)});return t&&(d["has-"+t]=!0),s.a.createElement("div",Object(r.a)({},p,{className:c()(n,d)}),i)},t}(s.a.Component);b.propTypes=y,b.childContextTypes=m,t.a=Object(f.a)("form-group",Object(f.b)([d.c.LARGE,d.c.SMALL],b))},"2qFS":function(e,t,n){},"2wwy":function(e,t,n){e.exports=n("nhzr")},"3l72":function(e,t,n){var r=n("2qFS");"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,o);r.locals&&(e.exports=r.locals)},"3qhi":function(e,t,n){},"4/LL":function(e,t,n){"use strict";var r=n("UXZV"),o=n.n(r),i=n("2wwy"),a=n.n(i),c=n("kOwS"),u=n("c7wz"),s=n("TSYQ"),l=n.n(s),p=n("17x9"),f=n.n(p),d=n("q1tI"),h=n.n(d),y=n("bLWD"),m=n.n(y),b=(n("6DQo"),n("uwnE")),v=n("ga9N"),g=n("hi2O"),_=n("6BQ9"),w=n.n(_),O=n("sKrG"),S=n.n(O),E=n("S3Uj"),x=n.n(E);function j(e){return""+e.charAt(0).toUpperCase()+e.slice(1)}var T,C=n("Y7Jt"),k={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};var P=((T={})[E.EXITED]="collapse",T[E.EXITING]="collapsing",T[E.ENTERING]="collapsing",T[E.ENTERED]="collapse in",T),R={in:f.a.bool,mountOnEnter:f.a.bool,unmountOnExit:f.a.bool,appear:f.a.bool,timeout:f.a.number,onEnter:f.a.func,onEntering:f.a.func,onEntered:f.a.func,onExit:f.a.func,onExiting:f.a.func,onExited:f.a.func,dimension:f.a.oneOfType([f.a.oneOf(["height","width"]),f.a.func]),getDimensionValue:f.a.func,role:f.a.string},q={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,dimension:"height",getDimensionValue:function(e,t){var n=t["offset"+j(e)],r=k[e];return n+w()(S()(t,r[0]),10)+w()(S()(t,r[1]),10)}},I=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o|\?|\/|,|\.|\:|\;|\'|\"|\&|\#|\[|\]|~|\$|_|`|-|{|}|\||\\/g," ")).replace(/ + /g," ")).trim().split(" ").join("-")}n.d(t,"a",function(){return r})},Ag8Z:function(e,t,n){var r=n("JC6p"),o=n("EwQA");e.exports=function(e,t){return e&&r(e,o(t))}},At8f:function(e,t,n){},"Cd+2":function(e,t,n){},CnBM:function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=n("q1tI"),u=n("17x9"),s=[],l=[];function p(e){var t=e(),n={loading:!0,loaded:null,error:null};return n.promise=t.then(function(e){return n.loading=!1,n.loaded=e,e}).catch(function(e){throw n.loading=!1,n.error=e,e}),n}function f(e){var t={loading:!1,loaded:{},error:null},n=[];try{Object.keys(e).forEach(function(r){var o=p(e[r]);o.loading?t.loading=!0:(t.loaded[r]=o.loaded,t.error=o.error),n.push(o.promise),o.promise.then(function(e){t.loaded[r]=e}).catch(function(e){t.error=e})})}catch(e){t.error=e}return t.promise=Promise.all(n).then(function(e){return t.loading=!1,e}).catch(function(e){throw t.loading=!1,e}),t}function d(e,t){return c.createElement(function(e){return e&&e.__esModule?e.default:e}(e),t)}function h(e,t){var p,f;if(!t.loading)throw new Error("react-loadable requires a `loading` component");var h=Object.assign({loader:null,loading:null,delay:200,timeout:null,render:d,webpack:null,modules:null},t),y=null;function m(){return y||(y=e(h.loader)),y.promise}return s.push(m),"function"==typeof h.webpack&&l.push(function(){if(function(e){return"object"===r(n.m)&&e().every(function(e){return void 0!==e&&void 0!==n.m[e]})}(h.webpack))return m()}),f=p=function(t){function n(r){o(this,n);var a=i(this,t.call(this,r));return a.retry=function(){a.setState({error:null,loading:!0,timedOut:!1}),y=e(h.loader),a._loadModule()},m(),a.state={error:y.error,pastDelay:!1,timedOut:!1,loading:y.loading,loaded:y.loaded},a}return a(n,t),n.preload=function(){return m()},n.prototype.componentWillMount=function(){this._mounted=!0,this._loadModule()},n.prototype._loadModule=function(){var e=this;if(this.context.loadable&&Array.isArray(h.modules)&&h.modules.forEach(function(t){e.context.loadable.report(t)}),y.loading){"number"==typeof h.delay&&(0===h.delay?this.setState({pastDelay:!0}):this._delay=setTimeout(function(){e.setState({pastDelay:!0})},h.delay)),"number"==typeof h.timeout&&(this._timeout=setTimeout(function(){e.setState({timedOut:!0})},h.timeout));var t=function(){e._mounted&&(e.setState({error:y.error,loaded:y.loaded,loading:y.loading}),e._clearTimeouts())};y.promise.then(function(){t()}).catch(function(e){t()})}},n.prototype.componentWillUnmount=function(){this._mounted=!1,this._clearTimeouts()},n.prototype._clearTimeouts=function(){clearTimeout(this._delay),clearTimeout(this._timeout)},n.prototype.render=function(){return this.state.loading||this.state.error?c.createElement(h.loading,{isLoading:this.state.loading,pastDelay:this.state.pastDelay,timedOut:this.state.timedOut,error:this.state.error,retry:this.retry}):this.state.loaded?h.render(this.state.loaded,this.props):null},n}(c.Component),p.contextTypes={loadable:u.shape({report:u.func.isRequired})},f}function y(e){return h(p,e)}y.Map=function(e){if("function"!=typeof e.render)throw new Error("LoadableMap requires a `render(loaded, props)` function");return h(f,e)};var m=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.getChildContext=function(){return{loadable:{report:this.props.report}}},t.prototype.render=function(){return c.Children.only(this.props.children)},t}(c.Component);function b(e){for(var t=[];e.length;){var n=e.pop();t.push(n())}return Promise.all(t).then(function(){if(e.length)return b(e)})}m.propTypes={report:u.func.isRequired},m.childContextTypes={loadable:u.shape({report:u.func.isRequired}).isRequired},y.Capture=m,y.preloadAll=function(){return new Promise(function(e,t){b(s).then(e,t)})},y.preloadReady=function(){return new Promise(function(e,t){b(l).then(e,e)})},e.exports=y},CxGs:function(e,t,n){"use strict";var r=n("2wwy"),o=n.n(r),i=n("kOwS"),a=n("hi2O"),c=n("c7wz"),u=n("TSYQ"),s=n.n(u),l=n("q1tI"),p=n.n(l),f=n("17x9"),d=n.n(f),h=n("uwnE"),y=n("ga9N"),m=n("NA7k"),b=1e3;var v={min:d.a.number,now:d.a.number,max:d.a.number,label:d.a.node,srOnly:d.a.bool,striped:d.a.bool,active:d.a.bool,children:function(e,t,n){var r=e[t];if(!r)return null;var o=null;return p.a.Children.forEach(r,function(e){if(!o){var t=p.a.createElement(g,null);if(e.type!==t.type){var r=p.a.isValidElement(e)?e.type.displayName||e.type.name||e.type:e;o=new Error("Children of "+n+" can contain only ProgressBar components. Found "+r+".")}}}),o},isChild:d.a.bool};var g=function(e){function t(){return e.apply(this,arguments)||this}Object(c.a)(t,e);var n=t.prototype;return n.renderProgressBar=function(e){var t,n=e.min,r=e.now,o=e.max,c=e.label,u=e.srOnly,l=e.striped,f=e.active,d=e.className,y=e.style,m=Object(a.a)(e,["min","now","max","label","srOnly","striped","active","className","style"]),v=Object(h.f)(m),g=v[0],_=v[1],w=Object(i.a)({},Object(h.d)(g),((t={active:f})[Object(h.e)(g,"striped")]=f||l,t));return p.a.createElement("div",Object(i.a)({},_,{role:"progressbar",className:s()(d,w),style:Object(i.a)({width:function(e,t,n){var r=(e-t)/(n-t)*100;return Math.round(r*b)/b}(r,n,o)+"%"},y),"aria-valuenow":r,"aria-valuemin":n,"aria-valuemax":o}),u?p.a.createElement("span",{className:"sr-only"},c):c)},n.render=function(){var e=this.props,t=e.isChild,n=Object(a.a)(e,["isChild"]);if(t)return this.renderProgressBar(n);var r=n.min,o=n.now,c=n.max,u=n.label,f=n.srOnly,d=n.striped,h=n.active,y=n.bsClass,b=n.bsStyle,v=n.className,g=n.children,_=Object(a.a)(n,["min","now","max","label","srOnly","striped","active","bsClass","bsStyle","className","children"]);return p.a.createElement("div",Object(i.a)({},_,{className:s()(v,"progress")}),g?m.a.map(g,function(e){return Object(l.cloneElement)(e,{isChild:!0})}):this.renderProgressBar({min:r,now:o,max:c,label:u,srOnly:f,striped:d,active:h,bsClass:y,bsStyle:b}))},t}(p.a.Component);g.propTypes=v,g.defaultProps={min:0,max:100,active:!1,isChild:!1,srOnly:!1,striped:!1},t.a=Object(h.a)("progress-bar",Object(h.c)(o()(y.d),g))},D0HL:function(e,t,n){"use strict";n("TP7S"),n("mwIZ");var r=n("E+oP"),o=n.n(r),i=n("q1tI"),a=n.n(i),c=(n("dtw8"),n("u2mz")),u=n("cuY2"),s=n.n(u),l=(n("VpSC"),n("GKHL"),n("h6cg"));function p(e){"@babel/helpers - typeof";return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var n=0;n0&&r.article_id_lgh.fix_cat_id,qe()(r,"article_id_lgh.article_id")&&r.article_id_lgh.article_id;try{if(n.quiz.solution_suggesstion[0])return a.a.createElement("a",{className:"cursor-pointer btn-white-border-green btn-action ".concat(this.state.showSuggestionsButton),onClick:function(){return e.handleShowSuggestion(e.state.showSuggestionsStatus)}},a.a.createElement("i",null,a.a.createElement("img",{src:"images/icon_light.png"})),"Gợi ý")}catch(e){console.log(e)}return""}}]),n}();function Ae(e){"@babel/helpers - typeof";return(Ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ue(e,t){for(var n=0;n0&&(i+="c"+r.article_id_lgh.fix_cat_id),qe()(r,"article_id_lgh.article_id")&&(i+="a"+r.article_id_lgh.article_id+".html"),o&&r&&"https://xemloigiai.com/"!==i?a.a.createElement(Y.a,{to:i,target:"_blank",className:"cursor-pointer btn-white-border-green btn-action visible"}," Xem lại lý thuyết"):null}}]),n}();Fe.contextTypes={router:D.a.object};var We=Object(c.connect)(function(e){return{summuryQuiz:e.summuryQuiz}})(Fe);n("WTGj");function Ke(e){"@babel/helpers - typeof";return(Ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ye(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:0,n=[];if(t>0){for(var o=0;o|\?|\/|,|\.|\:|\;|\'|\"|\&|\#|\[|\]|~|\$|_|`|-|{|}|\||\\/g," ")).replace(/ + /g," ")).trim().split(" ").join("-")}n.d(t,"a",function(){return r})},Giku:function(e,t,n){},"H+PL":function(e,t,n){},HAuv:function(e,t,n){var r=n("nP6P");"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,o);r.locals&&(e.exports=r.locals)},HFOa:function(e,t,n){"use strict";var r=n("q1tI"),o=n.n(r);function i(e){"@babel/helpers - typeof";return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n"===(n+=e.content).substr(n.length-6)&&(n+="
"),t+=n;else if("image"===e.type){var r="",o=e.width?e.width:"";if(+e.quantity>0){for(var i=0;i'.concat(r,"
"),t+=n}else n+='
\n ').concat(e.caption,'\n
'),t+=n}else if("notice"===e.type){var a="";a=1==e.notice_type?"https://cdn.vungoi.vn/vungoi/2021/0507/1620375113123_icon_chuy.png":2==e.notice_type?"https://cdn.vungoi.vn/vungoi/2021/0507/1620375210964_icon_chuy2.png":"https://cdn.vungoi.vn/vungoi/2021/0507/1620375233555_icon_chuy3.png",n+='
'),n+='
'),n+='
'.concat(e.content,"
"),t+=n+="
"}else if("simple_notice"===e.type)n+='
'),n+='
'.concat(e.content,"
"),t+=n+="
";else if("icon_notice"===e.type){var c="";c=1==e.notice_type?"https://cdn.vungoi.vn/vungoi/2021/0507/1620375113123_icon_chuy.png":2==e.notice_type?"https://cdn.vungoi.vn/vungoi/2021/0507/1620375210964_icon_chuy2.png":"https://cdn.vungoi.vn/vungoi/2021/0507/1620375233555_icon_chuy3.png",n+='
'),n+='
'),n+='
'.concat(e.content,"
"),t+=n+="
"}}),t}},IHKf:function(e,t,n){var r=n("dl7v");"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,o);r.locals&&(e.exports=r.locals)},IIw4:function(e,t,n){var r=n("i6Mk");"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,o);r.locals&&(e.exports=r.locals)},JmpY:function(e,t,n){var r=n("eUgh");e.exports=function(e,t){return r(t,function(t){return e[t]})}},Jw0f:function(e,t,n){var r={"./vi":"KSF8","./vi.js":"KSF8"};function o(e){var t=i(e);return n(t)}function i(e){var t=r[e];if(!(t+1)){var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return t}o.keys=function(){return Object.keys(r)},o.resolve=i,e.exports=o,o.id="Jw0f"},K2iv:function(e,t,n){"use strict";var r=n("k4Da"),o=n.n(r),i=n("q1tI"),a=n.n(i),c=n("Vg22"),u=n("frVR"),s=n("ph6d"),l=n("dbib");n("gxy7");function p(e){"@babel/helpers - typeof";return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var n=0;n0&&this.setState({sended:!0}),this.setState({show_popup:!1})}},{key:"componentWillReceiveProps",value:function(e){if(this.props.quiz_id!==e.quiz_id){var t=e.note_types;o()(t,["note_type",1]).length>0?this.setState({sended:!0}):this.setState({sended:!1}),this.setState({show_popup:!1})}}},{key:"render",value:function(){var e=this;return a.a.createElement("div",{className:"btn-action-user cursor-pointer"},this.state.sended?a.a.createElement("a",{style:{cursor:"not-allowed"}},a.a.createElement("i",{className:"fa fa-download disabled","aria-hidden":"true"})," Lưu bài"):a.a.createElement("a",{onClick:function(t){return e.open_popup()}},a.a.createElement("i",{className:"fa fa-download","aria-hidden":"true"})," Lưu bài"),a.a.createElement("div",{className:"modal-container",style:{height:0}},a.a.createElement(u.a,{show:this.state.show_popup,onHide:function(t){return e.handleHide_popup()},"aria-labelledby":"contained-modal-title",id:"save-quiz-modal"},a.a.createElement(u.a.Header,{bsClass:"header_modal",closeButton:!0},a.a.createElement(u.a.Title,{id:"contained-modal-title"},a.a.createElement("p",{className:"font-roboto-b text-white font-size-16 no-margin text-uppercase"},"Lưu bài"))),a.a.createElement(u.a.Body,{bsClass:"body_fb"},a.a.createElement("p",null,"Bạn có muốn lưu lại câu hỏi này?"),a.a.createElement("p",{className:"text-center mg-top-30"},a.a.createElement("a",{className:"bg-orange text-white text-center btn-footer-quiz cursor-pointer",onClick:this.saveQuiz},"Lưu lại"),a.a.createElement("a",{onClick:this.handleHide_popup,className:"bg-grey text-center btn-footer-quiz cursor-pointer"},"Hủy bỏ"))))))}}]),n}();Object(c.connect)(function(e){return{userSession:e.user.session}})(v)},L32S:function(e,t,n){var r=n("VFls");"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,o);r.locals&&(e.exports=r.locals)},L6uP:function(e,t,n){"use strict";var r=n("mwIZ"),o=n.n(r),i=n("q1tI"),a=n.n(i),c=n("17x9"),u=n.n(c),s=n("N58Y"),l=n("V/K6"),p=n("ndap"),f=n("p/U9"),d=n("D9/2");function h(e){"@babel/helpers - typeof";return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(e,t){for(var n=0;n0?"bg-hightlight selected":""})}),d(p(r),"renderSolution",function(){var e=r.props,t=e.correct,n=e.answer;e.id;return o.a.createElement("div",{className:"select-area"},o.a.createElement("div",{className:"input-value"},t),o.a.createElement("span",{className:t.length>0?"wrap-input-line":"",dangerouslySetInnerHTML:{__html:Object(i.a)(n)}}))}),d(p(r),"renderQuiz",function(){var e,t=r.props,n=t.correct,a=t.answer,c=t.id,u=r.state,s=u.className,l=u.value,p=u.showInputText;return e=o.a.createElement("span",{className:"wrap-input "+s,dangerouslySetInnerHTML:{__html:Object(i.a)(a)}}),o.a.createElement("div",{className:"select-area",id:c,onClick:r.handleClick,ref:r.setWrapperRef},o.a.createElement("div",{className:"input-value"},r.state.valueTmp),o.a.createElement("span",{className:p?"input-text":"visibility input-text"},o.a.createElement("a",{className:"close-box",onClick:r.handleRemoveInput}),o.a.createElement("span",{className:"input-box"},o.a.createElement("input",{id:c,onChange:r.hanleChange,onKeyPress:r._handleKeyPress,defaultValue:n,value:l}))),e)}),r.state={className:"",showInputText:!1,value:"",valueTmp:""},r.handleClick=r.handleClick.bind(p(r)),r.setWrapperRef=r.setWrapperRef.bind(p(r)),r.handleOutsideClick=r.handleOutsideClick.bind(p(r)),r.hanleChange=r.hanleChange.bind(p(r)),r}return function(e,t,n){t&&u(e.prototype,t),n&&u(e,n)}(n,[{key:"componentDidMount",value:function(){document.addEventListener("mousedown",this.handleOutsideClick)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousedown",this.handleOutsideClick)}},{key:"handleOutsideClick",value:function(e){this.node&&this.node.contains(e.target)||this.setState({showInputText:!1,valueTmp:this.state.value,className:this.state.value.length>0?"bg-hightlight selected":""})}},{key:"handleClick",value:function(){this.setState({className:"bg-hightlight selected",showInputText:!0})}},{key:"setWrapperRef",value:function(e){this.node=e}},{key:"hanleChange",value:function(e){this.setState({value:e.target.value},this.props.storeAnswer(this.props.id,e.target.value))}},{key:"render",value:function(){return"quiz"===this.props.mode?this.renderQuiz():this.renderSolution()}}]),n}();h.contextTypes={answerStore:a.PropTypes.object.isRequired},t.a=h},MTB2:function(e,t,n){"use strict";n.r(t);var r=n("3OWR"),o=n.n(r),i=n("uhBA"),a=n.n(i),c=!1;if("undefined"!=typeof window)try{var u=Object.defineProperty({},"passive",{get:function(){c=!0}});window.addEventListener("test",null,u),window.removeEventListener("test",null,u)}catch(e){}var s=c,l={connections:{},EE:new a.a,enableResizeInfo:!1,enableScrollInfo:!1,listeners:{},removers:[],supportPassiveEvent:s},p=l.supportPassiveEvent,f={capture:!1,passive:!1};var d=function(e,t,n,r){var i="addEventListener",a="removeEventListener",c=t,u=!!p&&o()({},f,r);return!e.addEventListener&&e.attachEvent&&(i="attachEvent",a="detachEvent",c="on"+t),e[i](c,n,u),{remove:function(){e[a](t,n)}}},h=!1;if("undefined"!=typeof navigator){var y=navigator.userAgent.match(/MSIE (\d+\.\d+)/);y&&(h=parseFloat(y[1],10)<9)}var m=h,b=n("uM7l"),v=n.n(b),g=n("DzJC"),_=n.n(g),w=n("vN+2"),O=n.n(w),S=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=(t.mainType||"").toLowerCase(),r=(t.subType||"").toLowerCase();this.mainType=n,this.subType=r,this.type=n+r.charAt(0).toUpperCase()+r.slice(1)||"",this.scroll=x,this.resize=E,this.touch=j}return S(e,[{key:"update",value:function(e){var t=this.mainType,n=this.subType,r=document.documentElement;if(l.enableScrollInfo&&("scroll"===t||"touchmove"===t)){var o=r.scrollTop+document.body.scrollTop;o!==this.scroll.top&&(this.scroll.delta=o-this.scroll.top,this.scroll.top=o)}if(l.enableResizeInfo&&"resize"===t&&(this.resize.width=window.innerWidth||r.clientWidth,this.resize.height=window.innerHeight||r.clientHeight),l.enableTouchInfo&&e.touches&&("touchstart"===t||"touchmove"===t||"touchend"===t)){var i=void 0,a=void 0,c=void 0;"touchstart"===t||"start"===n?(i=T(e.touches[0]),this.touch.axisIntention="",this.touch.startX=i.x,this.touch.startY=i.y,this.touch.deltaX=0,this.touch.deltaY=0):"touchmove"===t&&(i=T(e.touches[0]),this.touch.deltaX=i.x-this.touch.startX,this.touch.deltaY=i.y-this.touch.startY,""===this.touch.axisIntention&&(a=Math.abs(this.touch.deltaX),c=Math.abs(this.touch.deltaY),a>5&&a>=c?this.touch.axisIntention="x":c>5&&c>a&&(this.touch.axisIntention="y")))}}}]),e}(),k=n("xEkU"),P=n.n(k),R=Date.now||function(){return(new Date).getTime()};var q=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,n=void 0,r=void 0,o=0,i=0,a=function a(){var c=R();t-(c-o)<=0?(o=c,i=0,e.apply(n,r)):i=P()(a)};return function(){n=this,r=arguments,i||(i=P()(a))}},I=100,N=50,D=l.connections,z=l.EE,M=l.listeners,B=l.removers,L=void 0,A=void 0,U=void 0,H=0;function V(e){return e.id||"target-id-"+H++}function Q(e,t,n,r){return z.on(e,t||O.a,n),D[r=r||e]=(D[r]||0)+1,{_type:e,_cb:t,_ctx:n,unsubscribe:function(){if(this._type){z.removeListener(e,t,n),D[r]--,0===D[r]&&(M[r].remove(),M[r]=void 0),this._type=void 0,this._cb=void 0,this._ctx=void 0;for(var o=B.length-1;o>=0;o--){if(B[o]===this){B.splice(o,1);break}}}}}}function G(e,t,n){return function(r,o,i,a){var c=i.context,u=i.target,s=u&&V(u),l=s?":"+s:"",p=t+"Start:"+r+l,f=t+"End:"+r+l,h=t+":"+r+l,y=Q(n+":"+r+l,o,c,h);if(B.push(y),M[h])return y;var b={start:new C({mainType:t,subType:"start"}),main:new C({mainType:t}),end:new C({mainType:t,subType:"end"})};"raf"===r?(r=16,O=q(O)):r>0&&(O=_()(O,r));var g=void 0;function w(e){b.end.update(e),z.emit(f,e,b.end),g=null}function O(e){g||(b.start.update(e),z.emit(p,e,b.start)),clearTimeout(g),b.main.update(e),z.emit(h,e,b.main),g=m?setTimeout(function(){w(v()(e))},r+I):setTimeout(w.bind(null,e),r+I)}return M[h]=d(u||e,t,O,a),y}}function F(e,t){return function(n,r,o,i){var a=o.context,c=o.target,u=c&&V(c),s=t+":0"+(u?":"+u:""),l=Q(s,r,a);if(B.push(l),M[s])return l;var p=new C({mainType:t});return M[s]=d(c||e,t,function(e){p.update(e),z.emit(s,e,p)},i),l}}"undefined"!=typeof window&&(U=(L=(A=window).document||document).body);var W={scrollStart:G(A,"scroll","scrollStart"),scrollEnd:G(A,"scroll","scrollEnd"),scroll:G(A,"scroll","scroll"),resizeStart:G(A,"resize","resizeStart"),resizeEnd:G(A,"resize","resizeEnd"),resize:G(A,"resize","resize"),visibilitychange:F(L,"visibilitychange"),touchmoveStart:G(U,"touchmove","touchmoveStart"),touchmoveEnd:G(U,"touchmove","touchmoveEnd"),touchmove:G(U,"touchmove","touchmove"),touchstart:F(U,"touchstart"),touchend:F(U,"touchend")};var K=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.useRAF||!1,o=parseInt(n.throttleRate,10),i=n.eventOptions;return isNaN(o)&&(o=N),r&&(o="raf"),m&&(o=0),l.enableScrollInfo=l.enableScrollInfo||n.enableScrollInfo||!1,l.enableResizeInfo=l.enableResizeInfo||n.enableResizeInfo||!1,l.enableTouchInfo=l.enableTouchInfo||n.enableTouchInfo||!1,W[e](o,t,n,i)},Y=l.removers;var X=function(e,t){for(var n=void 0,r=Y.length-1;r>=0;r-=1)(n=Y[r])._cb===t&&n._type.indexOf(e)>=0&&(n.unsubscribe(),Y.splice(r,1))};n.d(t,"listen",function(){return $}),n.d(t,"subscribe",function(){return ee}),n.d(t,"unsubscribe",function(){return te});var J="undefined"!=typeof window;function Z(){0}var $=J?d:Z,ee=J?K:Z,te=J?X:Z},N58Y:function(e,t,n){"use strict";n.d(t,"a",function(){return r});n("q1tI");var r=function(e){if(void 0===e)return null;var t="";return e.forEach(function(e){var n="";if(null===e)t+="";else if("html"===e.type)n+=e.content,t+=n;else if("image"===e.type)n+='
').concat(e.caption,'
'),t+=n;else if("notice"===e.type){var r="";r=1==e.notice_type?"https://cdn.vungoi.vn/vungoi/2021/0507/1620375113123_icon_chuy.png":2==e.notice_type?"https://cdn.vungoi.vn/vungoi/2021/0507/1620375210964_icon_chuy2.png":"https://cdn.vungoi.vn/vungoi/2021/0507/1620375233555_icon_chuy3.png",n+='
'),n+='
'),n+='
'.concat(e.content,"
"),t+=n+="
"}else if("simple_notice"===e.type)n+='
'),n+='
'.concat(e.content,"
"),t+=n+="
";else if("icon_notice"===e.type){var o="";o=1==e.notice_type?"https://cdn.vungoi.vn/vungoi/2021/0507/1620375113123_icon_chuy.png":2==e.notice_type?"https://cdn.vungoi.vn/vungoi/2021/0507/1620375210964_icon_chuy2.png":"https://cdn.vungoi.vn/vungoi/2021/0507/1620375233555_icon_chuy3.png",n+='
'),n+='
'),n+='
'.concat(e.content,"
"),t+=n+="
"}}),t}},NA7k:function(e,t,n){"use strict";var r=n("q1tI"),o=n.n(r);t.a={map:function(e,t,n){var r=0;return o.a.Children.map(e,function(e){return o.a.isValidElement(e)?t.call(n,e,r++):e})},forEach:function(e,t,n){var r=0;o.a.Children.forEach(e,function(e){o.a.isValidElement(e)&&t.call(n,e,r++)})},count:function(e){var t=0;return o.a.Children.forEach(e,function(e){o.a.isValidElement(e)&&++t}),t},find:function(e,t,n){var r,i=0;return o.a.Children.forEach(e,function(e){r||o.a.isValidElement(e)&&t.call(n,e,i++)&&(r=e)}),r},filter:function(e,t,n){var r=0,i=[];return o.a.Children.forEach(e,function(e){o.a.isValidElement(e)&&t.call(n,e,r++)&&i.push(e)}),i},every:function(e,t,n){var r=0,i=!0;return o.a.Children.forEach(e,function(e){i&&o.a.isValidElement(e)&&(t.call(n,e,r++)||(i=!1))}),i},some:function(e,t,n){var r=0,i=!1;return o.a.Children.forEach(e,function(e){i||o.a.isValidElement(e)&&t.call(n,e,r++)&&(i=!0)}),i},toArray:function(e){var t=[];return o.a.Children.forEach(e,function(e){o.a.isValidElement(e)&&t.push(e)}),t}}},NQgF:function(e,t,n){},NX03:function(e,t,n){"use strict";n.r(t);var r=n("bNQv"),o=n.n(r),i=n("3WF5"),a=n.n(i),c=n("q1tI"),u=n.n(c),s=n("Vg22"),l=n("ph6d");function p(e){return Object(l.a)("comments/resource/".concat(e.quizId),"post",e).then(function(e){return e}).catch(function(e){return e})}function f(e,t){var n="comments/resource/".concat(e,"?resource_type=quiz&page=").concat(t,"&limit=10");return Object(l.a)(n).then(function(e){return e}).catch(function(e){return e})}var d=n("kOwS"),h=n("hi2O"),y=n("c7wz"),m=n("TSYQ"),b=n.n(m),v=n("17x9"),g=n.n(v),_=n("uwnE"),w={glyph:g.a.string.isRequired},O=function(e){function t(){return e.apply(this,arguments)||this}return Object(y.a)(t,e),t.prototype.render=function(){var e,t=this.props,n=t.glyph,r=t.className,o=Object(h.a)(t,["glyph","className"]),i=Object(_.f)(o),a=i[0],c=i[1],s=Object(d.a)({},Object(_.d)(a),((e={})[Object(_.e)(a,n)]=!0,e));return u.a.createElement("span",Object(d.a)({},c,{className:b()(r,s)}))},t}(u.a.Component);O.propTypes=w;var S=Object(_.a)("glyphicon",O),E=n("wd/R"),x=n.n(E),j=n("mwIZ"),T=n.n(j),C=n("U6M7"),k=n("dbib");function P(e){"@babel/helpers - typeof";return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function R(e,t){for(var n=0;n0&&o()(n,function(e,t){e&&e._id&&4!==e.state&&r.push(u.a.createElement("div",{className:"comment-item",key:e._id},u.a.createElement("div",{className:"avata"},u.a.createElement("img",{src:e.author.icon?e.author.icon:"images/default-avatar.png"})),u.a.createElement("div",{className:"block-right-comment"},u.a.createElement("div",{className:""},u.a.createElement("p",null,u.a.createElement("span",{className:"cl-blue font-roboto-b"},e.author.full_name),u.a.createElement("span",{className:"time-pubsh font-roboto-b"},x()(e.created_date).format("x")>Date.now()?x()(Date.now()).fromNow():x()(e.created_date).fromNow()))),u.a.createElement("div",{className:""},u.a.createElement("p",{className:"content-comment word-break",dangerouslySetInnerHTML:{__html:e.text}})))))}),u.a.createElement("div",null,u.a.createElement("div",{className:this.props.hidden?"sub-comment":"sub-comment show-subcomment"},u.a.createElement("p",null,u.a.createElement("a",{className:"show-more-button",title:"Hiển Thị Thêm",onClick:this.showMore,href:"#",hidden:this.state.hiddenShowMore},"Xem Thêm Bình Luận")),u.a.createElement("div",null,r),u.a.createElement("div",{className:"form"},u.a.createElement("textarea",{id:"sub-comment-text-"+this.props.parentCommentId,placeholder:"Nhập bình luận ...",value:this.state.comment_content,onChange:this.onChangeComment(i),onKeyDown:this.onKeyDownComment(i)}),u.a.createElement("button",{className:"btn-submit",onClick:function(t){return e.handleSubmit(i,event)}},u.a.createElement(S,{glyph:"send"})))))}}]),n}(),B=Object(s.connect)(function(e){return{}},function(e){return{}})(M),L=(n("LMo2"),n("bxw6"),n("p/U9"));function A(e){"@babel/helpers - typeof";return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function U(e,t){for(var n=0;n10&&e.setState({hiddenShowMore:!1}),a()(t.items,function(e,t){n[e._id]=!1}),e.setState({items:t.items,total:t.total,hideSubComment:n,comment_content:"",show_popup_buy_course:!1})})}),F(Q(e),"onChangeComment",function(t){return function(t){e.setState({comment_content:t.target.value})}}),F(Q(e),"onKeyDownComment",function(t){return function(n){13===n.keyCode&&0==n.shiftKey&&e.handleSubmit(t,n)}}),F(Q(e),"handleSubmit",function(t,n){if(n.preventDefault(),JSON.parse(localStorage.getItem("user")).isGuest)e.setState({show_popup_login:!0});else{if(e.setState({show_popup_buy_course:!t}),""===e.state.comment_content)return!1;var r={quizId:e.props.quizId,parent_id:"",resource_type:"quiz",text:e.state.comment_content,examId:e.props.examId};!1!==t&&p(r).then(function(t){if(t._id){var n=e.state.items,r=e.state.hideSubComment;r[t._id]=!0,n.unshift(t),e.setState({items:n,hideSubComment:r,comment_content:""}),document.getElementById("comment-text").blur()}else 402===t.status?e.setState({show_popup_buy_course:!0}):Object(k.b)("error","Xin lỗi chưa thể thêm được comment!")})}}),F(Q(e),"toggleSubcomment",function(t){var n=e.state.hideSubComment;n[t]=!n[t],e.setState(n)}),F(Q(e),"showMore",function(t){t.preventDefault();var n=e.state.pageComments+1;f(e.props.quizId,n).then(function(t){var r=e.state.hideSubComment;a()(t.items,function(e,t){r[e._id]=!0});var o=e.state.items;o=o.concat(t.items),t.total!==o.length&&0!==t.items.length||e.setState({hiddenShowMore:!0}),e.setState({pageComments:n,items:o,hideSubComment:r})})}),e}return function(e,t,n){t&&U(e.prototype,t),n&&U(e,n)}(n,[{key:"componentDidMount",value:function(){void 0!==MathJax&&L.a.renderMathjax(document.getElementsByClassName("comment-box")),this.getComments(this.props.quizId)}},{key:"componentWillReceiveProps",value:function(e){void 0!==MathJax&&L.a.renderMathjax(document.getElementsByClassName("comment-box")),e.quizId!==this.props.quizId&&this.getComments(e.quizId)}},{key:"render",value:function(){var e=this,t=this.state,n=t.items,r=(t.total,[]),i=this.props,a=(i.questions,i.isfree),c=i.question;return n&&n.length>0&&o()(n,function(t,n){t.state&&4!==t.state&&r.push(u.a.createElement("div",{id:"comment_parent_id_".concat(t._id),className:"comment-item ",key:t._id},u.a.createElement("div",{className:"avata"},u.a.createElement("img",{src:t.author.icon?t.author.icon:"images/default-avatar.png"})),u.a.createElement("div",{className:"block-right-comment"},u.a.createElement("div",{className:""},u.a.createElement("p",null,u.a.createElement("span",{className:"cl-blue font-roboto-b"},t.author.full_name),u.a.createElement("span",{className:"time-pubsh font-roboto-b"},x()(t.created_date).format("x")>Date.now()?x()(Date.now()).fromNow():x()(t.created_date).fromNow()))),u.a.createElement("div",{className:""},u.a.createElement("p",{className:"content-comment word-break",dangerouslySetInnerHTML:{__html:t.text}}),u.a.createElement("div",null,u.a.createElement("a",{title:"Trả Lời",onClick:function(){return e.toggleSubcomment(t._id)},className:"cursor-pointer show-comment-reply cl-blue"},u.a.createElement("img",{src:"images/icon_comment.png"})," ",t.total_reply>0&&t.total_reply," Trả lời"),u.a.createElement("div",null,u.a.createElement(B,{hidden:e.state.hideSubComment[t._id],data:t.subComment,parentCommentId:t._id,parentText:t.text,created_date_parent_comment:t.created_date,quizId:e.props.quizId,isfree:a,question:c})))))))}),u.a.createElement("div",null,u.a.createElement("div",{className:"comment-box"},u.a.createElement("form",{className:"form",onSubmit:function(t){return e.handleSubmit(a,event)}},u.a.createElement("textarea",{id:"comment-text",placeholder:"Nhập bình luận ...",value:this.state.comment_content,onChange:this.onChangeComment(a),onKeyDown:this.onKeyDownComment(a)}),u.a.createElement("button",{type:"submit",className:"btn-submit",onSubmit:function(t){return e.handleSubmit(a,event)}},u.a.createElement(S,{glyph:"send"}))),u.a.createElement("div",{className:"list-comments"},r),u.a.createElement("center",null,u.a.createElement("a",{className:"show-more-button",title:"Hiển Thị Thêm",onClick:this.showMore,href:"#",hidden:this.state.hiddenShowMore},"Xem Thêm Bình Luận"))))}}]),n}();t.default=Object(s.connect)(function(e){return{questions:e.questions.next_items}},function(e){return{}})(W)},OO9F:function(e,t,n){"use strict";n.d(t,"a",function(){return f});var r=n("q1tI"),o=n.n(r),i=(n("wP27"),n("dfIm"),n("MTU0"),n("+7VV"));function a(e){"@babel/helpers - typeof";return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(){return(c=Object.assign||function(e){for(var t=1;t>",u=a||r;if(null==n[r])return t?new Error("Required "+i+" `"+u+"` was not specified in `"+c+"`."):null;for(var s=arguments.length,l=Array(s>6?s-6:0),p=6;pe.length)&&-1!==e.indexOf(t)}function u(e){for(var t="";e;)t+="0",e-=1;return t}function s(e,t){var n=e+"+"+b(E(t).sort(),function(e){return e+":"+t[e]}).join(",");return s.cache[n]||(s.cache[n]=Intl.NumberFormat(e,t)),s.cache[n]}function l(e,t,i){var a,c,p,f=t.useToLocaleString,d=t.useGrouping,h=d&&t.grouping.slice(),y=t.maximumSignificantDigits,m=t.minimumIntegerDigits||1,b=t.fractionDigits||0,v=t.groupingSeparator,g=t.decimalSeparator;if(f&&i){var _={minimumIntegerDigits:m,useGrouping:d};if(b&&(_.maximumFractionDigits=b,_.minimumFractionDigits=b),y&&e>0&&(_.maximumSignificantDigits=y),r){var w;if(!o)(w=S({},t)).useGrouping=!1,w.decimalSeparator=".",e=parseFloat(l(e,w),10);return s(i,_).format(e)}return n||((w=S({},t)).useGrouping=!1,w.decimalSeparator=".",e=parseFloat(l(e,w),10)),e.toLocaleString(i,_)}var O=(y?e.toPrecision(y+1):e.toFixed(b+1)).split("e");p=O[1]||"",c=(O=O[0].split("."))[1]||"";var E=(a=O[0]||"").length,x=c.length,j=E+x,T=a+c;(y&&j===y+1||!y&&x===b+1)&&((T=function(e){for(var t=e.split("").reverse(),n=0,r=!0;r&&n0?c.length<=C?(a+=c+=u(C-c.length),c=""):(a+=c.slice(0,C),c=c.slice(C)):C<0&&(c=u(Math.abs(C)-a.length)+a+c,a="0"),y||((c=c.slice(0,b)).lengtht.label.length?-1:e.label.length0,W=F?o.precision:0,K=W,Y=o.minValue,X=!1,J=o.maxValue,Z=!1,$=o.useToLocaleString,ee=o.groupingSeparator,te=o.decimalSeparator,ne=o.grouping;$=$&&(t||r);var re=o.trim;d(re)&&(re=re.join(" ")),null===re&&(z||J||F)&&(re="all"),null!==re&&!0!==re&&"left"!==re&&"right"!==re||(re="large"),!1===re&&(re="");var oe=function(e){return e.test(re)},ie=/both/,ae=/^all|[^sm]all/,ce=z>0||x([/large/,ie,ae],oe),ue=x([/small/,ie,ae],oe),se=x([/mid/,ae],oe),le=x([/final/,ae],oe),pe=b(I.match(q),function(e,t){var n=R(e);return"*"===e.slice(0,1)&&(e=e.slice(1),"escape"!==n&&"general"!==n&&M.push(n)),{index:t,length:e.length,text:"",token:"escape"===n?e.replace(P.escape,"$1"):e,type:"escape"===n||"general"===n?null:n}}),fe={index:0,length:0,token:"",text:"",type:null},de=[];A&&pe.reverse(),m(pe,function(e){if(e.type)return(fe.type||fe.text)&&de.push(fe),void(fe=e);A?fe.text=e.token+fe.text:fe.text+=e.token}),(fe.type||fe.text)&&de.push(fe),A&&de.reverse();var he=w(i,_(g(v(de,"type"))));if(!he.length)return v(de,"text").join("");he=b(he,function(e,t){var n,r=t+1===he.length,i=!t;n="years"===e||"months"===e?C.as(e):T.as(e);var a=Math.floor(n),c=n-a,u=y(de,function(t){return e===t.type});return i&&J&&n>J&&(Z=!0),r&&Y&&Math.abs(o.duration.as(e))1&&(V=!0),T.subtract(a,e),C.subtract(a,e),{rawValue:n,wholeValue:a,decimalValue:r?c:0,isSmallest:r,isLargest:i,type:e,tokenLength:u.length}});var ye=G?Math.floor:Math.round,me=function(e,t){var n=Math.pow(10,t);return ye(e*n)/n},be=!1,ve=!1,ge=function(e,t){var n={useGrouping:Q,groupingSeparator:ee,decimalSeparator:te,grouping:ne,useToLocaleString:$};return F&&(W<=0?(e.rawValue=0,e.wholeValue=0,e.decimalValue=0):(n.maximumSignificantDigits=W,e.significantDigits=W)),Z&&!ve&&(e.isLargest?(e.wholeValue=J,e.decimalValue=0):(e.wholeValue=0,e.decimalValue=0)),X&&!ve&&(e.isSmallest?(e.wholeValue=Y,e.decimalValue=0):(e.wholeValue=0,e.decimalValue=0)),e.isSmallest||e.significantDigits&&e.significantDigits-e.wholeValue.toString().length<=0?H<0?e.value=me(e.wholeValue,H):0===H?e.value=ye(e.wholeValue+e.decimalValue):F?(e.value=G?me(e.rawValue,W-e.wholeValue.toString().length):e.rawValue,e.wholeValue&&(W-=e.wholeValue.toString().length)):(n.fractionDigits=H,e.value=G?e.wholeValue+me(e.decimalValue,H):e.wholeValue+e.decimalValue):F&&e.wholeValue?(e.value=Math.round(me(e.wholeValue,e.significantDigits-e.wholeValue.toString().length)),W-=e.wholeValue.toString().length):e.value=e.wholeValue,e.tokenLength>1&&(V||be)&&(n.minimumIntegerDigits=e.tokenLength,ve&&n.maximumSignificantDigits0||""===re||y(M,e.type)||y(N,e.type))&&(be=!0),e.formattedValue=l(e.value,n,L),n.useGrouping=!1,n.decimalSeparator=".",e.formattedValueEn=l(e.value,n,"en"),2===e.tokenLength&&"milliseconds"===e.type&&(e.formattedValueMS=l(e.value,{minimumIntegerDigits:3,useGrouping:!1},"en").slice(0,2)),e};if((he=g(he=b(he,ge))).length>1){var _e=function(e){return y(he,function(t){return t.type===e})};m(a,function(e){var t=_e(e.type);t&&m(e.targets,function(e){var n=_e(e.type);n&&parseInt(t.formattedValueEn,10)===e.value&&(t.rawValue=0,t.wholeValue=0,t.decimalValue=0,n.rawValue+=1,n.wholeValue+=1,n.decimalValue=0,n.formattedValueEn=n.wholeValue.toString(),ve=!0)})})}return ve&&(be=!1,W=K,he=g(he=b(he,ge))),!N||Z&&!o.trim?(ce&&(he=O(he,function(e){return!e.isSmallest&&!e.wholeValue&&!y(M,e.type)})),z&&he.length&&(he=he.slice(0,z)),ue&&he.length>1&&(he=function(e,t){return O(e.slice().reverse(),t).reverse()}(he,function(e){return!e.wholeValue&&!y(M,e.type)&&!e.isLargest})),se&&(he=g(he=b(he,function(e,t){return t>0&&t ",Z=!1,X=!1),j&&(t.value>0||""===re||y(M,t.type)||y(N,t.type))&&(n+="-",j=!1),"milliseconds"===e.type&&t.formattedValueMS?n+=t.formattedValueMS:n+=t.formattedValue,A||(n+=e.text),n})).join("").replace(/(,| |:|\.)*$/,"").replace(/^(,| |:|\.)*/,""))}function P(){var e=this.duration,t=function(t){return e._data[t]},n=y(this.types,t),r=function(e,t){for(var n=e.length;n-=1;)if(t(e[n]))return e[n]}(this.types,t);switch(n){case"milliseconds":return"S __";case"seconds":case"minutes":return"*_MS_";case"hours":return"_HMS_";case"days":if(n===r)return"d __";case"weeks":return n===r?"w __":(null===this.trim&&(this.trim="both"),"w __, d __, h __");case"months":if(n===r)return"M __";case"years":return n===r?"y __":(null===this.trim&&(this.trim="both"),"y __, M __, d __");default:return null===this.trim&&(this.trim="both"),"y __, d __, h __, m __, s __"}}function R(e){if(!e)throw"Moment Duration Format init cannot find moment instance.";e.duration.format=C,e.duration.fn.format=k,e.duration.fn.format.defaults={trim:null,stopTrim:null,largest:null,maxValue:null,minValue:null,precision:0,trunc:!1,forceLength:null,userLocale:null,usePlural:!0,useLeftUnits:!1,useGrouping:!0,useSignificantDigits:!1,template:P,useToLocaleString:!0,groupingSeparator:",",decimalSeparator:".",grouping:[3]},e.updateLocale("en",f)}var q=function(e,t,n){return e.toLocaleString(t,n)};t=function(){try{(0).toLocaleString("i")}catch(e){return"RangeError"===e.name}return!1}()&&T(q),n=t&&j(q);var I=function(e,t,n){if("undefined"!=typeof window&&window&&window.Intl&&window.Intl.NumberFormat)return window.Intl.NumberFormat(t,n).format(e)};return r=T(I),o=r&&j(I),R(e),R})},SFtt:function(e){e.exports={}},SyXz:function(e,t,n){"use strict";var r=n("kOwS"),o=n("hi2O"),i=n("c7wz"),a=n("TSYQ"),c=n.n(a),u=n("q1tI"),s=n.n(u),l=n("17x9"),p=n.n(l),f=(n("6DQo"),n("uwnE")),d={htmlFor:p.a.string,srOnly:p.a.bool},h={$bs_formGroup:p.a.object},y=function(e){function t(){return e.apply(this,arguments)||this}return Object(i.a)(t,e),t.prototype.render=function(){var e=this.context.$bs_formGroup,t=e&&e.controlId,n=this.props,i=n.htmlFor,a=void 0===i?t:i,u=n.srOnly,l=n.className,p=Object(o.a)(n,["htmlFor","srOnly","className"]),d=Object(f.f)(p),h=d[0],y=d[1],m=Object(r.a)({},Object(f.d)(h),{"sr-only":u});return s.a.createElement("label",Object(r.a)({},y,{htmlFor:a,className:c()(l,m)}))},t}(s.a.Component);y.propTypes=d,y.defaultProps={srOnly:!1},y.contextTypes=h,t.a=Object(f.a)("control-label",y)},TWDj:function(e,t,n){var r=n("v1DJ");"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,o);r.locals&&(e.exports=r.locals)},U6M7:function(e,t,n){"use strict";n.d(t,"b",function(){return o}),n.d(t,"c",function(){return i}),n.d(t,"a",function(){return a});var r=n("ph6d");function o(e){var t="getQuiz/".concat(e);return Object(r.a)(t).then(function(e){return e}).catch(function(e){return e})}function i(e){return Object(r.a)("notification","post",e).then(function(e){return e}).catch(function(e){return e})}function a(e){var t="get_feedback/".concat(e);return Object(r.a)(t).then(function(e){return e}).catch(function(e){return e})}},UAcW:function(e,t,n){"use strict";n.d(t,"b",function(){return i}),n.d(t,"a",function(){return a});var r=n("q1tI"),o=n.n(r).a.createContext({}),i=o.Provider,a=o.Consumer},UB5X:function(e,t,n){var r=n("NykK"),o=n("ExA7"),i="[object Number]";e.exports=function(e){return"number"==typeof e||o(e)&&r(e)==i}},UIfy:function(e,t,n){"use strict";t.__esModule=!0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},o=a(n("q1tI")),i=a(n("PZZ8"));function a(e){return e&&e.__esModule?e:{default:e}}t.default=(0,i.default)(function(e,t,n,i,a){var c=e[t],u=void 0===c?"undefined":r(c);return o.default.isValidElement(c)?new Error("Invalid "+i+" `"+a+"` of type ReactElement supplied to `"+n+"`, expected an element type (a string or a ReactClass)."):"function"!==u&&"string"!==u?new Error("Invalid "+i+" `"+a+"` of value `"+c+"` supplied to `"+n+"`, expected an element type (a string or a ReactClass)."):null})},UYr5:function(e,t,n){},UoGI:function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return a}),n.d(t,"c",function(){return c});var r=n("3OWR"),o=n.n(r),i="DRAG_OPERATION",a="RESET";function c(e){return o()({},{type:i},{target:e})}},"V/K6":function(e,t,n){"use strict";var r=n("mwIZ"),o=n.n(r),i=n("bNQv"),a=n.n(i),c=n("q1tI"),u=n.n(c),s=n("u2mz"),l=(n("YCeY"),n("R7+6")),p=n("xyTa"),f=n("h6cg");n("qCb6");function d(e){"@babel/helpers - typeof";return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t){for(var n=0;n0&&o()(d,"quiz.order_subquiz")>=0&&(b=o()(d,"quiz.start_blank")+o()(d,"quiz.order_subquiz")),u.a.createElement("div",{id:"quiz-single"},u.a.createElement("div",null,u.a.createElement("div",{className:"vn-tit-question"},u.a.createElement("strong",{className:"cl5 fl"},"Câu ",n||"hỏi:"," "),u.a.createElement("span",{className:"clf pull-right ".concat(m.color)},m.text_level)),u.a.createElement("div",{className:"question-content",id:"question-content"},u.a.createElement("div",{className:"content-quiz mg-top-10"},b>0&&!y&&u.a.createElement("div",{style:{fontWeight:"bold"}},"Please choose an answer for blank number (",b,")"),u.a.createElement("p",{dangerouslySetInnerHTML:{__html:y}})),u.a.createElement("br",null),u.a.createElement(l.a,{question_state:i,answers:h,handleChooseAnswer:this.handleChooseAnswer,activeSelect:a,question_style:c}))))}}]),n}();t.a=g},V4u1:function(e,t,n){"use strict";var r=n("4qC0"),o=n.n(r),i=n("6qam"),a=n.n(i),c=n("BkRI"),u=n.n(c),s=n("OFL0"),l=n.n(s),p=n("mwIZ"),f=n.n(p),d=n("TP7S"),h=n.n(d),y=n("q1tI"),m=n.n(y),b=n("u2mz"),v=n("xyTa"),g=n("h6cg"),_=(n("D0HL"),n("F7wJ"),n("kSTI"),n("04Yj"),n("D9/2"));function w(e){"@babel/helpers - typeof";return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function O(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=E(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}function S(e){return function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||E(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e,t){if(e){if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&n.push(e),r.setState({question:i}),r.setState({options_dnd:n}),r.draggedItem=null,r.dropItem=null,r.dragContainer=null;var a={dndAnswer:i};r.props.set_answer({choice_answer:a},r.props.question_index,a),r.setState({answer:r.props.items.quiz.answer})}),I(R(r),"onDragOver",function(e){r.dragContainer!==e?r.dropItem=e:r.dropItem=null}),I(R(r),"matchItem",function(e){e.trim()&&(r.setState({activeDragValue:e.trim()}),r.setState({activeContainerValue:void 0}))}),I(R(r),"matchContainer",function(){var e=T(regeneratorRuntime.mark(function e(t){var n,o,i,a,c,s,l,p,f,d,y,m,b,v,g,_,w;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=u()(r.state.question),alert(r.state.activeDragValue),""==r.state.activeDragValue){e.next=13;break}n.coordinates[t].answer=r.state.activeDragValue.trim(),r.setState({question:n}),r.setState({activeDragValue:""}),o=S(r.state.question.options_dnd),i=[],a=O(n.coordinates);try{for(a.s();!(c=a.n()).done;)s=c.value,h()(s.answer)||i.push(s.answer.trim())}catch(e){a.e(e)}finally{a.f()}return l=o.filter(function(e){return!i.includes(e.trim())}),e.next=13,r.setState({options_dnd:l});case 13:if(""!==r.state.activeDragValue.trim()){e.next=43;break}if(h()(r.state.activeContainerValue)){e.next=40;break}if((p=r.state.activeContainerValue)!==(f=t)){e.next=31;break}n.coordinates[t].answer="",r.setState({question:n}),r.setState({activeDragValue:""}),d=S(r.state.question.options_dnd),y=[],m=O(n.coordinates);try{for(m.s();!(b=m.n()).done;)v=b.value,h()(v.answer)||y.push(v.answer.trim())}catch(e){m.e(e)}finally{m.f()}return g=d.filter(function(e){return!y.includes(e.trim())}),r.setState({options_dnd:g}),e.next=29,r.setState({activeContainerValue:void 0});case 29:e.next=38;break;case 31:if(_=n.coordinates[f].answer,h()(n.coordinates[p].answer)){e.next=38;break}return n.coordinates[f].answer=n.coordinates[p].answer,n.coordinates[p].answer=_,r.setState({question:n}),e.next=38,r.setState({activeContainerValue:void 0});case 38:e.next=43;break;case 40:if(h()(n.coordinates[t].answer)){e.next=43;break}return e.next=43,r.setState({activeContainerValue:t});case 43:return w={dndAnswer:n},e.next=46,r.props.set_answer({choice_answer:w},r.props.question_index,w);case 46:return e.next=48,r.setState({answer:r.props.items.quiz.answer});case 48:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),r.state={question:[],text_fill:"",answer:[],userchoose:"",hide:!0,renderNow:!0,height:0,typingTimeout:0,activeDragValue:"",activeContainerValue:void 0},r}return function(e,t,n){t&&C(e.prototype,t),n&&C(e,n)}(n,[{key:"componentDidMount",value:function(){var e=T(regeneratorRuntime.mark(function e(){var t,n,r,o,i,a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.props.items){e.next=10;break}return e.next=3,this.setState({question:h()(this.props.items.quiz.answer)?this.props.items.quiz.question:this.props.items.quiz.answer.choice.dndAnswer,options_dnd:this.props.items.quiz.question.options_dnd,answer:f()(this.props.items,"quiz.answer.choice.dndAnswer")});case 3:t=[],n=O(this.state.question.coordinates);try{for(n.s();!(r=n.n()).done;)o=r.value,h()(o.answer)||t.push(o.answer.trim())}catch(e){n.e(e)}finally{n.f()}return i=S(this.state.question.options_dnd),a=i.filter(function(e){return!t.includes(e.trim())}),e.next=10,this.setState({options_dnd:a});case 10:if(h()(this.props.userAnswer)){e.next=13;break}return e.next=13,this.setState({answer:h()(this.props.userAnswer.answer_key.dndAnswer)?this.props.items.quiz.answer.choice.dndAnswer:this.props.userAnswer.answer_key.dndAnswer});case 13:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"componentWillReceiveProps",value:function(){var e=T(regeneratorRuntime.mark(function e(t){var n,r,o,i,a,c;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t._id==this.props._id){e.next=10;break}return e.next=3,this.setState({question:h()(t.items.quiz.answer)?t.items.quiz.question:t.items.quiz.answer.choice.dndAnswer,options_dnd:t.items.quiz.question.options_dnd,answer:f()(t.items,"quiz.answer.choice.dndAnswer")});case 3:n=[],r=O(this.state.question.coordinates);try{for(r.s();!(o=r.n()).done;)i=o.value,h()(i.answer)||n.push(i.answer.trim())}catch(e){r.e(e)}finally{r.f()}return a=S(this.state.question.options_dnd),c=a.filter(function(e){return!n.includes(e.trim())}),e.next=10,this.setState({options_dnd:c});case 10:if(h()(t.userAnswer)){e.next=13;break}return e.next=13,this.setState({answer:h()(t.userAnswer.answer_key.dndAnswer)?t.items.quiz.answer.choice.dndAnswer:t.userAnswer.answer_key.dndAnswer});case 13:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"componentDidUpdate",value:function(){g.a.renderMathjax(document.getElementsByClassName("quiz-single"))}},{key:"render",value:function(){var e=this,t=this.props,n=t.question_index,r=t.diff_level,o=(t.dataPreview,t.question_state,t.activeSelect),i=(t.question_style,t.teacherOverView,t.items),a=this.state,c=a.question,u=a.options_dnd,s=a.activeContainerValue,l=a.activeDragValue,p=a.answer;if(void 0===c)return null;var d=Object(v.a)(r),y="url(".concat(c.picture_dnd,")"),g=c.width,w=c.height,O=360*w/g,S=320*w/g;O=parseInt(O),S=parseInt(S);var E=u&&u.map(function(t,n){return m.a.createElement("div",{className:t.trim()==l?"boxDrag boxDragActive":"boxDrag",key:"dnd"+n,draggable:!0,onDragStart:function(t){return e.onDragStart(t,n)},onDragEnd:e.onDragEnd},t)}),x="";return x=o?c.coordinates&&c.coordinates.map(function(t,n){return m.a.createElement("div",{className:n==parseInt(s)?"boxSmart boxSmartActive":"boxSmart",key:"cor"+n,style:{left:t.x_percent+"%",top:t.y_percent+"%",minWidth:"60px",minHeight:"30px",textAlign:"center"},onDragOver:function(){return e.onDragOver(n)}},f()(t,"answer")?m.a.createElement("div",{className:"subItemContainer",draggable:!0,onDragStart:function(t){return e.onDragStartInner(t,n)},onDragEnd:e.onDragEndInner}," ",f()(t,"answer")," "):"")}):c.coordinates&&c.coordinates.map(function(t,n){return m.a.createElement("div",{className:n==parseInt(s)?"boxSmart boxSmartActive":"boxSmart",key:"cor"+n,style:{left:t.x_percent+"%",top:t.y_percent+"%",minWidth:"120px",minHeight:"30px",textAlign:"center"},onDragOver:function(){return e.onDragOver(n)}},m.a.createElement("span",null,f()(p,"coordinates[".concat(n,"].answer"))?f()(p,"coordinates[".concat(n,"].answer")):""),m.a.createElement("div",{style:{backgroundColor:"#1270e3",position:"absolute",top:"-40px",left:"10px",padding:"10px",borderRadius:"50px"}},!h()(f()(p,"coordinates[".concat(n,"].answer")))&&f()(t,"correct_text").trim()===f()(p,"coordinates[".concat(n,"].answer")).trim()&&m.a.createElement("img",{src:"images/s-check.png"}),f()(t,"correct_text")?f()(t,"correct_text"):""))}),m.a.createElement("div",{id:"quiz-dnd-english-21"},m.a.createElement("div",null,m.a.createElement("div",{className:"vn-tit-question"},m.a.createElement("strong",{className:"cl5 fl"},"Câu ",n||"hỏi:"," "),m.a.createElement("span",{className:"clf pull-right ".concat(d.color)},d.text_level)),m.a.createElement("div",{className:"question-content",id:"question-content"},m.a.createElement("div",{className:"content-quiz mg-top-10"},m.a.createElement(_.a,{__html:Object(b.a)(c.content)})),m.a.createElement("div",null,i.quiz.attachment.audioFile&&m.a.createElement("p",null,m.a.createElement("audio",{controls:!0},m.a.createElement("source",{src:i.quiz.attachment.audioFile,type:"audio/mpeg"}))))),m.a.createElement("div",{style:{display:"flex",justifyContent:"center"}},E),m.a.createElement("div",{className:"demo",style:{backgroundImage:y,backgroundRepeat:"no-repeat",backgroundSize:"contain",height:O+"px",width:"360px",display:"flex",position:"relative",overflow:"visible",padding:"0",boxSizing:"border-box"}},x)))}}]),n}();t.a=N},VFls:function(e,t,n){},VpSC:function(e,t,n){"use strict";var r=n("nbsC"),o=n.n(r),i=n("pM09"),a={getURLExerciseChapter:function(e){return o.a.render("/{{lop}}/bai-tap-muc-{{chapter}}-c{{chapterID}}.html",{lop:"lop-"+i[e.gradeType].lop,chapter:e.chapterName,chapterID:e.chapterID})},getURLQuestion:function(e){return o.a.render("/{{lop}}/luyen-bai-tap-muc-{{chapter}}-{{chapterID}}.html",{lop:"lop-"+i[e.gradeType].lop,chapter:e.chapterName,chapterID:e.chapterID})},getURLLyThuyetSubject:function(e){return o.a.render("/{{lop}}/ly-thuyet-{{subject}}-{{subjectID}}.html",{lop:"lop-"+i[e.gradeType].lop,subject:e.subjectName,subjectID:e.subjectID})},getURLBaitapSubject:function(e){return o.a.render("/{{lop}}/bai-tap-{{subject}}-s{{subjectID}}.html",{lop:"lop-"+i[e.gradeType].lop,subject:e.subjectName,subjectID:e.subjectID})},getURLExam:function(e){return o.a.render("/{{lop}}/de-thi-de-kiem-tra-{{subject}}-s{{subjectID}}.html",{lop:"lop-"+i[e.gradeType].lop,subject:e.subjectName,subjectID:e.subjectID})},getURLTagExam:function(e){return o.a.render("/{{lop}}/de-thi-{{tag}}-t{{tagID}}.html",{lop:"lop-"+i[e.gradeType].lop,tag:e.tagName,tagID:e.tagID})},getURLExerciseExam:function(e){return e.typeExam?o.a.render("/{{lop}}/chi-tiet-{{exam}}-x{{examID}}.html?typeExam={{typeExam}}",{lop:"lop-"+i[e.gradeType].lop,exam:e.title,examID:e.examID,typeExam:e.typeExam}):o.a.render("/{{lop}}/chi-tiet-{{exam}}-x{{examID}}.html",{lop:"lop-"+i[e.gradeType].lop,exam:e.title,examID:e.examID})},getURLQuestionExam:function(e){return o.a.render("/{{lop}}/luyen-de-thi-muc-{{exam}}-x{{examID}}-t{{typeExam}}.html",{lop:"lop-"+i[e.gradeType].lop,exam:e.title,examID:e.examID,typeExam:e.typeExam})},getURLLyThuyetChapter:function(e){return e.related_id?o.a.render("/{{lop}}/chi-tiet-ly-thuyet-{{chapter}}-{{chapterID}}.html#{{related_id}}",{lop:"lop-"+i[e.gradeType].lop,chapter:e.chapterName,chapterID:e.chapterID,related_id:e.related_id}):o.a.render("/{{lop}}/chi-tiet-ly-thuyet-{{chapter}}-{{chapterID}}.html",{lop:"lop-"+i[e.gradeType].lop,chapter:e.chapterName,chapterID:e.chapterID})},getURLConcept:function(e){return o.a.render("ly-thuyet/{{alias}}-{{idx}}.html"+"".concat(e.related_id?"#"+e.related_id:""),e)},getURLThongbao:function(e){return o.a.render("/thong-bao-{{newsName}}-{{newsId}}.html",{newsName:e.newsName,newsId:e.newsId})},getURLHome:function(e){return o.a.render("/{{lop}}.html",{lop:"lop-"+i[e.gradeType].lop})},getURLHomeLyThuyet:function(e){return o.a.render("/{{lop}}/ly-thuyet.html",{lop:"lop-"+i[e.gradeType].lop})},getURLHomeDeThi:function(e){return o.a.render("/{{lop}}/de-thi-de-kiem-tra.html",{lop:"lop-"+i[e.gradeType].lop})},getURLListTheoryFollowingChapter:function(e){return o.a.render("/{{lop}}/ly-thuyet-{{chapterName}}-ct{{chapterId}}.html",{lop:"lop-"+i[e.gradeType].lop,chapterName:e.chapterName,chapterId:e.chapterId,subjectId:e.subjectId,subject:e.subject})},getURLListExFollowingChapter:function(e){return o.a.render("/{{lop}}/bai-tap-{{chapterName}}-ct{{chapterId}}.html",{lop:"lop-"+i[e.gradeType].lop,chapterName:e.chapterName,chapterId:e.chapterId,subjectId:e.subjectId,subject:e.subject})},getUrlPersonal:function(e){return o.a.render("/thong-ke/{{statusmenu}}/{{subjectName}}/{{subjectID}}",{subjectName:e.subjectName,subjectID:e.subjectID,statusmenu:e.statusmenu})},getURLUserExercise:function(e){return o.a.render("/thong-ke/ket_qua/{{subjectName}}/{{subjectID}}",{subjectName:e.subjectName,subjectID:e.subjectID})},getUrlSaveExercise:function(e){return o.a.render("/thong-ke/luu_bai/{{subjectName}}/{{subjectID}}",{subjectName:e.subjectName,subjectID:e.subjectID})},getUrlWrongExercise:function(e){return o.a.render("/thong-ke/bai_sai/{{subjectName}}/{{subjectID}}",{subjectName:e.subjectName,subjectID:e.subjectID})},getNoteExersise:function(e){return o.a.render("/thong-ke/ghi_chu/{{subjectName}}/{{subjectID}}",{subjectName:e.subjectName,subjectID:e.subjectID})},getURLEditExam:function(e){var t=e.examId;return o.a.render("/giao-vien/sua-bai-tap-{{examId}}",{examId:t})}};t.a=a},WTGj:function(e,t,n){var r=n("x+el");"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,o);r.locals&&(e.exports=r.locals)},WTOR:function(e,t,n){var r=n("fXez");"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,o);r.locals&&(e.exports=r.locals)},X7jl:function(e,t,n){"use strict";var r=0,o={inc:function(){return r++},get:function(){return r}};t.a=o},XWtR:function(e,t,n){var r=n("5T2Y").parseInt,o=n("oc46").trim,i=n("5pKv"),a=/^[-+]?0[xX]/;e.exports=8!==r(i+"08")||22!==r(i+"0x16")?function(e,t){var n=o(String(e),3);return r(n,t>>>0||(a.test(n)?16:10))}:r},YCeY:function(e,t,n){var r=n("At8f");"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,o);r.locals&&(e.exports=r.locals)},YECT:function(e,t,n){"use strict";n.d(t,"a",function(){return O});var r=n("k4Da"),o=n.n(r),i=n("mUg4"),a=n.n(i),c=n("bNQv"),u=n.n(c),s=n("UrOp"),l=n.n(s),p=n("3WF5"),f=n.n(p),d=n("UfWW"),h=n.n(d),y=n("nEsn"),m=n.n(y),b=n("E+oP"),v=n.n(b),g=n("3OWR"),_=n.n(g);n("X7jl");function w(e,t){for(var n=0;n=2){log.getLogger("dnd_core").debug("container_event: newIntersectCompLst ",o," ",this.crossHoverComp),this.intersectCompLst=o;var s=m()(o,this.hoverCompLst,function(e,t){return e.props.id===t.props.id});if(!v()(s))if(c)-1===h()(this.hoverCompLst,function(e){return n.crossHoverComp.props&&e.props.id===n.crossHoverComp.props.id})&&(i.push(n.packOverEvt("outhover",this.crossHoverComp.props.id,this.crossHoverComp.props)),i.push(n.packOverEvt("hover",this.hoverCompLst[0].props.id,this.hoverCompLst[0].props)),a=this.hoverCompLst[0]);else i.push(n.packOverEvt("hover",this.hoverCompLst[0].props.id,this.hoverCompLst[0].props)),a=this.hoverCompLst[0];else f()(this.hoverCompLst,function(e){i.push(n.packOverEvt("outhover",e.props.id,e.props))}),-1===h()(o,function(e){return n.crossHoverComp.props&&e.props.id===n.crossHoverComp.props.id})&&(c&&i.push(n.packOverEvt("outhover",this.crossHoverComp.props.id,this.crossHoverComp.props)),i.push(n.packOverEvt("hover",o[0].props.id,o[0].props)),a=o[0]);return a.props&&this.crossHoverComp.props&&a.props.id!==this.crossHoverComp.props.id&&!v()(i)||v()(this.crossHoverComp)?(this.crossHoverComp=a,log.getLogger("dnd_core").debug("container_event: before_fire outhover ",i),{status:"over_outover",shouldChildUpdate:!0,refs:i}):{shouldChildUpdate:!1}}if(0===o.length&&(n.crossHoverComp={}),this.intersectCompLst.length>=2){var p=m()(o,this.intersectCompLst,function(e,t){return t.props.id===e.props.id}),d=l()(this.intersectCompLst,o,function(e,t){return e.props.id===t.props.id}),y={status:"over_outover",srcItem:e,shouldChildUpdate:!0,refs:[]};return u()(p,function(e){n.crossHoverComp=e,y.refs.push(n.packOverEvt("hover",e.props.id,e.props))}),u()(d,function(e){y.refs.push(n.packOverEvt("outhover",e.props.id,e.props))}),this.intersectCompLst=o,y}var b=l()(o,this.intersectCompLst,function(e,t){return e.props.id===t.props.id}),g=l()(this.intersectCompLst,o,function(e,t){return e.props.id===t.props.id});this.intersectCompLst=o;var _={status:"over_outover",srcItem:e,shouldChildUpdate:!0,refs:[]};return u()(b,function(e){n.crossHoverComp=e,_.refs.push(n.packOverEvt("hover",e.props.id,e.props))}),u()(g,function(e){_.refs.push(n.packOverEvt("outhover",e.props.id,e.props))}),v()(b)&&v()(g)?{shouldChildUpdate:!1}:(log.getLogger("dnd_core").debug("container_event: updatedProps",_),_)}},{key:"drop",value:function(e,t,n,r){if(n){this.resetSession();var o={shouldChildUpdate:!0,refs:[],status:"drop"};return v()(this.crossHoverComp)||r.id===this.crossHoverComp.props.id||o.refs.push(_()({},this.crossHoverComp.props,{id:this.crossHoverComp.props.id,isOver:!1,didDrop:!0,dropResult:this.crossHoverComp.props,canDrop:!1})),o}if(v()(this.intersectCompLst))return this.resetSession(),{shouldChildUpdate:!0,refs:[],status:"drop"};var i={shouldChildUpdate:!0,status:"drop",refs:[],srcItem:e};return v()(this.crossHoverComp)||i.refs.push(_()({},this.crossHoverComp.props,{id:this.crossHoverComp.props.id,isOver:!1,didDrop:!0,dropResult:this.crossHoverComp.props,canDrop:!1})),this.resetSession(),i}},{key:"resetSrc",value:function(e,t){var n=this.generateCompId(e,t);delete this.components[n]}},{key:"resetSession",value:function(){this.hoverCompLst=[],this.startDragSession=!1,this.intersectCompLst=[],this.crossHoverComp={}}},{key:"reset",value:function(){this.resetSession(),this.startedSession=!1,this.srcItem={},this.swappableSrcItem={},this.components={}}},{key:"triggerStartSession",value:function(){this.startedSession=!0}},{key:"hasStartSession",value:function(){return this.startedSession}},{key:"calIntersectionComps",value:function(e,t){var n=this.components[e];if(!n)return[];var r={left:t.x,top:t.y,right:n.boundbox.width+t.x,bottom:n.boundbox.height+t.y},i=[];return a()(this.components,function(e,t){"dropTarget"===e.srcEvtType&&i.push(e)}),o()(i,function(e){return function(e,t){return!(t.left>e.right||t.righte.bottom||t.bottom20?o()(s):20,i=o()(s)>20?"
":""}if(!0===c)return"richText"===t.obj_type?m.a.createElement(_.a,{__html:Object(b.a)(t.content)}):"inputText"===t.obj_type?m.a.createElement(m.a.Fragment,null,m.a.createElement("div",{dangerouslySetInnerHTML:{__html:i}}),m.a.createElement("input",{style:{margin:"0 5px",width:i?"90%":"auto"},key:t.id,name:t.id,type:"text",size:n,autoComplete:"off",value:l()(e.state.inputValue,[t.id]),onChange:function(n){return e.handleFillAnswer(n,t.id,t.question_child)}}),m.a.createElement("div",{dangerouslySetInnerHTML:{__html:i}})):"breakLine"===t.obj_type?m.a.createElement("br",null):"";var p="",f=l()(r,"question_child.option_items");return u()(f)&&!a()(f)&&f.forEach(function(e){e.id===t.id&&(p=e.selected)}),"richText"===t.obj_type?m.a.createElement(_.a,{__html:Object(b.a)(t.content)}):"inputText"===t.obj_type?m.a.createElement(m.a.Fragment,null,m.a.createElement("div",{dangerouslySetInnerHTML:{__html:i}}),m.a.createElement("input",{key:t.id,style:{width:i?"90%":"auto"},name:t.id,type:"text",size:n,autoComplete:"off",value:p}),m.a.createElement("div",{dangerouslySetInnerHTML:{__html:i}})):"breakLine"===t.obj_type?"
":""})))})))))}}]),n}();t.a=B},Zam9:function(e,t,n){"use strict";var r=n("q1tI"),o=n.n(r),i=n("am8X"),a=n.n(i);function c(e){"@babel/helpers - typeof";return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{chooseOperation:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:w,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case h:var n=e.counter+1;return d()({},e,{sourceId:t.sourceId,item:t.item,itemType:t.itemType,counter:n});case y:return g(g({},e),{},{itemType:null,item:null,sourceId:null,targetResult:null,didChoiceTarget:!1,isSourcePublic:null,targetIds:[]});default:return e}}(e.chooseOperation,t),stateId:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)+1}(e.stateId)}}var S=n("mdVC"),E=n.n(S),x=(n("Z0cm"),n("I9jU")),j=n.n(x),T="ADD_SOURCE",C="REMOVE_SOURCE";var k=0;function P(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{}).handlerIds,this.store.getState().stateId;return this.store.subscribe(function(){var n=t.store.getState().stateId;try{e()}finally{n}})}},{key:"canDragSource",value:function(e){var t=this.registry.getSource(e);return E()(t,"Expected to find a valid source."),!this.isDragging()&&t.canDrag(this,e)}},{key:"isChoosing",value:function(){return Boolean(this.getItemType())}},{key:"isChooseSource",value:function(e){var t=this.registry.getSource(e,!0);return!!this.isChoosing()&&(this.registry.getSourceType(e)===this.getItemType()&&t.isChoosing(this,e))}},{key:"getSourceId",value:function(){return this.store.getState().chooseOperation.sourceId}},{key:"getItem",value:function(){return this.store.getState().chooseOperation.item}},{key:"getItemType",value:function(){return this.store.getState().chooseOperation.itemType}},{key:"getCounter",value:function(){return this.store.getState().chooseOperation.counter}}]),e}(),z=n("bdvY");function M(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var r=p()(O);this.context=n,this.store=r,this.monitor=new D(r),this.registry=this.monitor.registry,this.backend=new z.a(this)}return function(e,t,n){t&&M(e.prototype,t),n&&M(e,n)}(e,[{key:"getContext",value:function(){return this.context}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.registry}},{key:"getActions",value:function(){var e=this,t=this.store.dispatch;return Object.keys(r).filter(function(e){return"function"==typeof r[e]}).reduce(function(n,o){var i=r[o];return n[o]=function(n){return function(){for(var r=arguments.length,o=new Array(r),i=0;i1&&void 0!==arguments[1]?arguments[1]:{}).clientOffset,n=void 0===t?null:t,r=e.slice(0),o=this.getMonitor(),i=this.getRegistry(),a=o.getItemType(),c=r.length-1;c>=0;c--){var u=r[c];w(i.getTargetType(u),a)||r.splice(c,1)}for(var s=0;s0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{choiceOperation:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:D,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case E:var n=e.counter+1;return v()({},e,{sourceId:t.sourceId,counter:n,itemType:t.itemType,item:t.item});case T:return I(I({},e),{},{targetIds:t.targetIds});case x:return I(I({},e),{},{targetResult:t.targetResult,didChoiceTarget:!0,targetIds:[]});case j:return I(I({},e),{},{itemType:null,item:null,sourceId:null,targetResult:null,didChoiceTarget:!1,isSourcePublic:null,targetIds:[]});default:return e}}(e.choiceOperation,t),stateId:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)+1}(e.stateId)}}var M=n("jiGI"),B=n.n(M),L=n("A1CB"),A=n.n(L),U="ADD_SOURCE",H="REMOVE_SOURCE";var V=0;function Q(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{}).handlerIds,this.store.getState().stateId;return this.store.subscribe(function(){var n=t.store.getState().stateId;try{e()}finally{n}})}},{key:"isChoosing",value:function(){return Boolean(this.getItemType())}},{key:"isChooseSource",value:function(e){var t=this.registry.getSource(e,!0);return!!this.isChoosing()&&(this.registry.getSourceType(e)===this.getItemType()&&t.isChoosing(this,e))}},{key:"canDropOnTarget",value:function(e){var t=this.registry.getTarget(e);return!(!this.isChoosing()||this.didChoiceTarget())&&(w(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e))}},{key:"getTargetResult",value:function(){return this.store.getState().choiceOperation.targetResult}},{key:"didChoiceTarget",value:function(){return this.store.getState().choiceOperation.didChoiceTarget}},{key:"canChoiceOnTarget",value:function(e){var t=this.registry.getTarget(e);return!!this.isChoosing()&&(w(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e))}},{key:"isOverTarget",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1}).shallow;if(!this.isChoosing())return!1;if(!w(this.registry.getTargetType(e),this.getItemType()))return!1;var n=this.getTargetIds();if(!n.length)return!1;var r=n.indexOf(e);return t?r===n.length-1:r>-1}},{key:"getItemType",value:function(){return this.store.getState().choiceOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().choiceOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().choiceOperation.sourceId}},{key:"getCounter",value:function(){return this.store.getState().choiceOperation.counter}},{key:"getTargetIds",value:function(){return this.store.getState().choiceOperation.targetIds}}]),e}();function X(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var r=m()(z);this.context=n,this.store=r,this.monitor=new Y(r),this.registry=this.monitor.registry,this.backend=new J(this)}return function(e,t,n){t&&Z(e.prototype,t),n&&Z(e,n)}(e,[{key:"getContext",value:function(){return this.context}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.registry}},{key:"getActions",value:function(){var e=this,t=this.store.dispatch;return Object.keys(r).filter(function(e){return"function"==typeof r[e]}).reduce(function(n,o){var i=r[o];return n[o]=function(n){return function(){for(var r=arguments.length,o=new Array(r),i=0;i7?a.a.createElement("div",{className:"text-center font-roboto-b font-size-22 color-green"},t):null,e)}}]),n}();n("eNPF");function V(e){"@babel/helpers - typeof";return(V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Q(){return(Q=Object.assign||function(e){for(var t=1;t> ",t),"breakDown"===t.obj_type?a.a.createElement("br",null):a.a.createElement(Xo.a,Zo({},t,{mode:e.props.showMode,storeAnswer:e.storeAnswer}))})))}}]),n}();oi.contextTypes={loadComponent:p.PropTypes.func.isRequired,answerStore:p.PropTypes.object.isRequired};var ii=oi;n("OQIr");function ai(e){"@babel/helpers - typeof";return(ai="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ci(){return(ci=Object.assign||function(e){for(var t=1;t1?i-1:0),c=1;ce.offsetWidth?r():(console.log("el.offsetWidth ",e.offsetWidth),e.style.width="unset")}},{key:"render",value:function(){var e=this.state.value;return void 0===this.props.edit&&e&&(e=e.split("||")[0]),o.a.createElement("span",{className:"InputText-input-text"},o.a.createElement("a",{className:"Input_text ".concat(this.props.className)}),o.a.createElement("input",{type:"text",className:"inline-block txt ",value:e,onChange:this.handleChange,id:this.domId,size:this.props.width?this.props.width:"3"}))}}]),n}();f.contextTypes={answerStore:i.PropTypes.object.isRequired},t.a=f},eNPF:function(e,t,n){var r=n("QGou");"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,o);r.locals&&(e.exports=r.locals)},ecek:function(e,t,n){var r=n("z+rg");"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,o);r.locals&&(e.exports=r.locals)},eh63:function(e,t,n){},emDs:function(e,t,n){"use strict";var r=n("q1tI"),o=n.n(r),i=(n("Vg22"),n("1gjd"));function a(e){"@babel/helpers - typeof";return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n0&&Object(l.i)(n[0]._id).then(function(t){e.setState({note:t.note})}),this.setState({show_popup:!1})}},{key:"componentWillReceiveProps",value:function(e){var t=this;if(this.props.quiz_id!==e.quiz_id){var n=e.note_types,r=o()(n,["note_type",2]);r.length>0?Object(l.i)(r[0]._id).then(function(e){t.setState({note:e.note})}):this.setState({note:""}),this.setState({show_popup:!1})}}},{key:"render",value:function(){var e=this;this.props.detailNote;return a.a.createElement("div",{className:"cursor-pointer btn-action-user"},a.a.createElement("a",{onClick:function(){return e.openNote()}},a.a.createElement("i",{className:"fa fa-pencil-square-o","aria-hidden":"true"}),"Note"),a.a.createElement("div",{className:"modal-container",style:{height:0}},a.a.createElement(u.a,{show:this.state.show_popup,onHide:this.handleHide_popup,"aria-labelledby":"contained-modal-title",id:"quiz-note"},a.a.createElement(u.a.Header,{bsClass:"header_modal",closeButton:!0},a.a.createElement(u.a.Title,{id:"contained-modal-title"},a.a.createElement("p",{className:"font-roboto-b text-white font-size-16 no-margin text-uppercase"},"Note"))),a.a.createElement(u.a.Body,{bsClass:"body_fb"},a.a.createElement("textarea",{type:"text",className:"full-width font-size-14",placeholder:"Nếu có chú ý cần ghi nhớ. Hãy nhập nội dung tại đây...",onChange:this.onChangeNote,value:this.state.note}),a.a.createElement("br",null),a.a.createElement("br",null),a.a.createElement("p",{className:"text-center"},a.a.createElement("a",{onClick:this.saveNote,className:"cursor-pointer bg-green text-white text-center btn-footer-quiz"},"Lưu note"),a.a.createElement("a",{onClick:this.handleHide_popup,className:"cursor-pointer bg-grey text-center btn-footer-quiz"},"Hủy bỏ"))))))}}]),n}();Object(c.connect)(function(e){return{userSession:e.user.session}})(v)},ijCd:function(e,t,n){var r=n("R/W3"),o=n("MMmD"),i=n("4qC0"),a=n("Sxd8"),c=n("P/G1"),u=Math.max;e.exports=function(e,t,n,s){e=o(e)?e:c(e),n=n&&!s?a(n):0;var l=e.length;return n<0&&(n=u(l+n,0)),i(e)?n<=l&&e.indexOf(t,n)>-1:!!l&&r(e,t,n)>-1}},jU7i:function(e,t,n){"use strict";var r=n("q1tI"),o=n.n(r),i=n("u2mz"),a=n("xyTa"),c=n("h6cg"),u=(n("qCb6"),n("D0HL"),n("F7wJ"),n("kSTI"),n("vDqi")),s=n.n(u).a.create({baseURL:"http://localhost:8080",headers:{"Content-type":"application/json"}});function l(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o.a.createElement("div",{className:"alert alert-secondary mt-2",role:"alert"},o.a.createElement("ul",null,i.map(function(e,t){return o.a.createElement("li",{key:t},e)}))),o.a.createElement("div",{className:"card mt-3"},o.a.createElement("ul",{className:"list-group list-group-flush"},a&&a.map(function(e,t){return o.a.createElement("li",{className:"list-group-item",key:t},o.a.createElement("p",null,o.a.createElement("a",{href:e.url},e.name)),o.a.createElement("img",{src:e.url,alt:e.name,height:"80px"}))}))),o.a.createElement("div",null,o.a.createElement("input",{type:"file",className:"custom-file-input",multiple:!0,accept:"image/*",onChange:this.selectFiles})))}}]),n}();n("ecek");function w(e){"@babel/helpers - typeof";return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function O(e,t){for(var n=0;nThis is the initial content of the editor

",init:{height:500,plugins:"link image code",toolbar:"undo redo | bold italic | alignleft aligncenter alignright | code"},onChange:this.onChangeEditor}),o.a.createElement("button",{className:"send-essay-btn",onClick:function(){return e.handleChooseAnswer()}},"Gửi bài"))}},{key:"renderUploadMobile",value:function(){return o.a.createElement("div",{style:{color:"red"}},"Upload Mobile")}},{key:"render",value:function(){var e=this.props,t=e.question,n=e.question_index,r=e.diff_level,c=(e.dataPreview,e.question_state,e.activeSelect,e.question_style,e.teacherOverView,e.items);if(void 0===t)return null;this.state.answer;var u=Object(i.a)(t.content),s="";try{s=c.quiz.request_question?Object(i.a)(c.quiz.request_question):""}catch(e){}var l=Object(a.a)(r);return o.a.createElement("div",{id:"quiz-essay"},o.a.createElement("div",null,o.a.createElement("div",{className:"vn-tit-question"},o.a.createElement("strong",{className:"cl5 fl"},"Câu ",n||"hỏi:"," "),o.a.createElement("span",{className:"clf pull-right ".concat(l.color)},l.text_level)),o.a.createElement("div",{className:"question-content",id:"question-content"},o.a.createElement("p",{style:{color:"red"}},"Đọc đề bài trong khung và thực hiện các yêu cầu "),o.a.createElement("div",{className:"content-quiz mg-top-10"},o.a.createElement("p",{dangerouslySetInnerHTML:{__html:u}})),s&&o.a.createElement("p",{style:{color:"red"}},"Yêu cầu"),s&&o.a.createElement("div",{className:"content-quiz mg-top-10"},o.a.createElement("p",{dangerouslySetInnerHTML:{__html:s}})))))}}]),n}();t.a=C},jY6F:function(e,t,n){"use strict";n("xeH2");var r=n("nbsC"),o=n.n(r),i=n("DDKi"),a=n("obyI");t.a={getURLExerciseChapter:function(e){return o.a.render(a.m+"/tu-luyen-{{lop}}-muc-{{chapter}}-c{{chapterID}}.html",{lop:"lop-"+i[e.gradeType].lop,chapter:e.chapterName,chapterID:e.chapterID})},getURLQuestion:function(e){return o.a.render(a.m+"/{{lop}}/luyen-bai-tap-muc-{{chapter}}-{{chapterID}}.html",{lop:"lop-"+i[e.gradeType].lop,chapter:e.chapterName,chapterID:e.chapterID})},getURLLyThuyetSubject:function(e){return o.a.render(a.m+"/{{lop}}/ly-thuyet-{{subject}}-{{subjectID}}.html",{lop:"lop-"+i[e.gradeType].lop,subject:e.subjectName,subjectID:e.subjectID})},getURLBaitapSubject:function(e){return""!=e.subjectID&&0!=e.subjectID&&e.subjectID?o.a.render(a.m+"/tu-luyen-{{subject}}-c{{subjectID}}.html",{subject:e.subjectName,subjectID:e.subjectID}):""},getURLExam:function(e){return o.a.render(a.m+"/de-thi-{{lop}}-s-{{subject}}-c{{subjectID}}.html",{lop:"lop-"+i[e.gradeType].lop,subject:e.subjectName,subjectID:e.subjectID})},getURLTagExam:function(e){return o.a.render(a.m+"/de-thi-{{lop}}-loai-{{tag}}-t{{tagID}}.html",{lop:"lop-"+i[e.gradeType].lop,tag:e.tagName,tagID:e.tagID})},getURLExerciseExam:function(e){return e.typeExam?o.a.render(a.m+"/de-thi-{{lop}}-chi-tiet-{{exam}}-x{{examID}}.html?typeExam={{typeExam}}",{lop:"lop-"+i[e.gradeType].lop,exam:e.title,examID:e.examID,typeExam:e.typeExam}):o.a.render(a.m+"/de-thi-{{lop}}-chi-tiet-{{exam}}-x{{examID}}.html",{lop:"lop-"+i[e.gradeType].lop,exam:e.title,examID:e.examID})},getURLQuestionExam:function(e){return o.a.render(a.m+"/{{lop}}/luyen-de-thi-muc-{{exam}}-x{{examID}}-t{{typeExam}}.html",{lop:"lop-"+i[e.gradeType].lop,exam:e.title,examID:e.examID,typeExam:e.typeExam})},getURLLyThuyetChapter:function(e){return e.related_id?o.a.render(a.m+"/{{lop}}/chi-tiet-ly-thuyet-{{chapter}}-{{chapterID}}.html#{{related_id}}",{lop:"lop-"+i[e.gradeType].lop,chapter:e.chapterName,chapterID:e.chapterID,related_id:e.related_id}):o.a.render(a.m+"/{{lop}}/chi-tiet-ly-thuyet-{{chapter}}-{{chapterID}}.html",{lop:"lop-"+i[e.gradeType].lop,chapter:e.chapterName,chapterID:e.chapterID})},getURLConcept:function(e){return o.a.render(a.m+"ly-thuyet/{{alias}}-{{idx}}.html",e)},getURLThongbao:function(e){return o.a.render(a.m+"/thong-bao-{{newsName}}-{{newsId}}.html",{newsName:e.newsName,newsId:e.newsId})},getURLHome:function(e){return o.a.render(a.m+"/{{lop}}.html",{lop:"lop-"+i[e.gradeType].lop})},getURLHomeLyThuyet:function(e){return o.a.render(a.m+"/{{lop}}/ly-thuyet.html",{lop:"lop-"+i[e.gradeType].lop})},getURLHomeDeThi:function(e){return o.a.render(a.m+"/{{lop}}/de-thi-de-kiem-tra.html",{lop:"lop-"+i[e.gradeType].lop})},getURLListTheoryFollowingChapter:function(e){return o.a.render(a.m+"/{{lop}}/ly-thuyet-{{chapterName}}-ct{{chapterId}}.html",{lop:"lop-"+i[e.gradeType].lop,chapterName:e.chapterName,chapterId:e.chapterId,subjectId:e.subjectId,subject:e.subject})},getURLListExFollowingChapter:function(e){return o.a.render(a.m+"/{{lop}}/bai-tap-{{chapterName}}-ct{{chapterId}}.html",{lop:"lop-"+i[e.gradeType].lop,chapterName:e.chapterName,chapterId:e.chapterId,subjectId:e.subjectId,subject:e.subject})},getUrlPersonal:function(e){return o.a.render(a.m+"/thong-ke/{{statusmenu}}/{{subjectName}}/{{subjectID}}",{subjectName:e.subjectName,subjectID:e.subjectID,statusmenu:e.statusmenu})},getURLUserExercise:function(e){return o.a.render(a.m+"/thong-ke/ket_qua/{{subjectName}}/{{subjectID}}",{subjectName:e.subjectName,subjectID:e.subjectID})},getUrlSaveExercise:function(e){return o.a.render(a.m+"/thong-ke/luu_bai/{{subjectName}}/{{subjectID}}",{subjectName:e.subjectName,subjectID:e.subjectID})},getUrlWrongExercise:function(e){return o.a.render(a.m+"/thong-ke/bai_sai/{{subjectName}}/{{subjectID}}",{subjectName:e.subjectName,subjectID:e.subjectID})},getNoteExersise:function(e){return o.a.render(a.m+"/thong-ke/ghi_chu/{{subjectName}}/{{subjectID}}",{subjectName:e.subjectName,subjectID:e.subjectID})}}},jpPY:function(e,t,n){var r=n("3qhi");"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,o);r.locals&&(e.exports=r.locals)},kG2s:function(e,t,n){},kSTI:function(e,t,n){"use strict";var r=n("q1tI"),o=n.n(r);function i(e){"@babel/helpers - typeof";return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{dragOperation:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:j,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case x.a:return u()({},e,t.target);case x.b:return{srcItem:null,evtCounter:0,dropTargets:[]};default:return e}}(e.dragOperation,t)}}function C(e){"@babel/helpers - typeof";return(C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t&&window.scrollY<=i.offsetHeight?(n.style.position="fixed",n.style.top="3px",n.style.bottom="unset"):n.style.position="static",window.scrollY>=i.offsetHeight-(n.offsetHeight-20)?(r.style.height=(i.offsetHeight+10).toString()+"px",n.style.position="absolute",n.style.bottom="0",n.style.top="unset"):r.style.height="auto"}}),o.state={positionAds:1e3},o}return function(e,t,n){t&&a(e.prototype,t),n&&a(e,n)}(n,[{key:"componentDidMount",value:function(){document.getElementById("google-ads-right-sticky");try{(window.adsbygoogle=window.adsbygoogle||[]).push({})}catch(e){console.log("error :",e)}}},{key:"render",value:function(){return o.a.createElement("div",{id:"google-ads-right-sticky",style:{background:"red3"}},"Mobile"==this.props.device&&o.a.createElement("div",{className:"ads_txt"},o.a.createElement("span",null,"Quảng Cáo")),o.a.createElement("ins",{className:"adsbygoogle bn300x600 hd-ads-pc lgh-detail-right-pos-2","data-ad-client":"ca-pub-8730483863942113","data-ad-slot":"3797422607","data-ad-format":"auto",style:{display:"inline-block",height:"600px",width:"300px"}}))}}]),n}()},qDOb:function(e,t,n){var r=n("gfFt");"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,o);r.locals&&(e.exports=r.locals)},qfp5:function(e,t,n){},sEfC:function(e,t,n){var r=n("GoyQ"),o=n("QIyF"),i=n("tLB3"),a="Expected a function",c=Math.max,u=Math.min;e.exports=function(e,t,n){var s,l,p,f,d,h,y=0,m=!1,b=!1,v=!0;if("function"!=typeof e)throw new TypeError(a);function g(t){var n=s,r=l;return s=l=void 0,y=t,f=e.apply(r,n)}function _(e){var n=e-h;return void 0===h||n>=t||n<0||b&&e-y>=p}function w(){var e=o();if(_(e))return O(e);d=setTimeout(w,function(e){var n=t-(e-h);return b?u(n,p-(e-y)):n}(e))}function O(e){return d=void 0,v&&s?g(e):(s=l=void 0,f)}function S(){var e=o(),n=_(e);if(s=arguments,l=this,h=e,n){if(void 0===d)return function(e){return y=e,d=setTimeout(w,t),m?g(e):f}(h);if(b)return clearTimeout(d),d=setTimeout(w,t),g(h)}return void 0===d&&(d=setTimeout(w,t)),f}return t=i(t)||0,r(n)&&(m=!!n.leading,p=(b="maxWait"in n)?c(i(n.maxWait)||0,t):p,v="trailing"in n?!!n.trailing:v),S.cancel=function(){void 0!==d&&clearTimeout(d),y=0,s=h=l=d=void 0},S.flush=function(){return void 0===d?f:O(o())},S}},t8Fj:function(e,t,n){e.exports=n("+VcZ")},tLB3:function(e,t){e.exports=function(e){return e}},tiOK:function(e,t,n){var r=n("Cd+2");"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,o);r.locals&&(e.exports=r.locals)},u2mz:function(e,t,n){"use strict";n.d(t,"a",function(){return r});n("q1tI");var r=function(e){if(void 0===e)return null;var t="";return e.forEach(function(e){var n="";if(null===e)t+="";else if("html"===e.type)n+=e.content,t+=n;else if("image"===e.type)n+='
').concat(e.caption,'
'),t+=n;else if("notice"===e.type){var r="";r=1==e.notice_type?"https://cdn.vungoi.vn/vungoi/2021/0507/1620375113123_icon_chuy.png":2==e.notice_type?"https://cdn.vungoi.vn/vungoi/2021/0507/1620375210964_icon_chuy2.png":"https://cdn.vungoi.vn/vungoi/2021/0507/1620375233555_icon_chuy3.png",n+='
'),n+='
'),n+='
'.concat(e.content,"
"),t+=n+="
"}else if("simple_notice"===e.type)n+='
'),n+='
'.concat(e.content,"
"),t+=n+="
";else if("icon_notice"===e.type){var o="";o=1==e.notice_type?"https://cdn.vungoi.vn/vungoi/2021/0507/1620375113123_icon_chuy.png":2==e.notice_type?"https://cdn.vungoi.vn/vungoi/2021/0507/1620375210964_icon_chuy2.png":"https://cdn.vungoi.vn/vungoi/2021/0507/1620375233555_icon_chuy3.png",n+='
'),n+='
'),n+='
'.concat(e.content,"
"),t+=n+="
"}}),t}},"uQQ+":function(e,t,n){},uekQ:function(e,t,n){n("dEVD"),e.exports=n("WEpk").parseInt},uuqw:function(e,t,n){"use strict";n.r(t);var r=n("mwIZ"),o=n.n(r),i=n("E+oP"),a=n.n(i),c=n("J2m7"),u=n.n(c),s=n("UB5X"),l=n.n(s),p=n("q1tI"),f=n.n(p),d=n("TJpk"),h=n.n(d),y=n("Vg22");function m(e){"@babel/helpers - typeof";return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b(e,t){for(var n=0;n> ",e.props.disableExType),!e.props.disableExType){t.next=7;break}return e.sendGA(n),e.props.fechQuiz("new"),Object(C.a)("startNewQuiz",{url:e.context.router.location.pathname}),e.props.beginWork(),t.abrupt("return");case 7:e.setState({state_action:"new"}),e.setState({show_select_level:!0}),e.setState({link:n});case 10:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()),K(F(e),"returnQuizHandler",function(){var t=H(regeneratorRuntime.mark(function t(n){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(console.log("this.props.disableExType :>> ",e.props.disableExType),!e.props.disableExType){t.next=7;break}return e.sendGA(n),e.props.fechQuiz("rework"),Object(C.a)("startAgainQuiz",{url:e.context.router.location.pathname}),e.props.beginWork(),t.abrupt("return");case 7:e.setState({state_action:"rework"}),e.setState({show_select_level:!0}),e.setState({link:n});case 10:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()),K(F(e),"continueQuizHandler",function(t){return function(n){e.sendGA(t),e.props.fechQuiz("last"),Object(C.a)("resumeQuiz",{url:e.context.router.location.pathname}),e.props.beginWork()}}),K(F(e),"sendGA",function(e){}),e}return function(e,t,n){t&&V(e.prototype,t),n&&V(e,n)}(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.stateSummury,r=t.chapterName,o=t.chapterID,i=t.summuryQuiz;t.userSession;return f.a.createElement("div",{className:"text-center "},"new"==n?f.a.createElement("div",null,f.a.createElement("p",{onClick:function(){return e.newQuizHandler(j.a.getURLExerciseChapter({gradeType:i.grade.type,chapterName:r,chapterID:o}))}},f.a.createElement(x.a,{className:"text-white btn-green btn-action"},"Bắt đầu",f.a.createElement("i",{className:"fa fa-angle-double-right","aria-hidden":"true"})))):f.a.createElement("div",null,f.a.createElement("p",null,f.a.createElement(x.a,{className:"text-white btn-gray btn-action",onClick:function(){return e.returnQuizHandler(j.a.getURLExerciseChapter({gradeType:i.grade.type,chapterName:r,chapterID:o}))}},f.a.createElement("i",{className:"fa fa-reply"}),"Làm lại tất cả"),i.totalCorrect+i.totalWrong!==i.total&&f.a.createElement(x.a,{className:"text-white btn-orange btn-action",onClick:e.continueQuizHandler(j.a.getURLExerciseChapter({gradeType:i.grade.type,chapterName:r,chapterID:o}))},"Tiếp tục",f.a.createElement("i",{className:"fa fa-angle-double-right","aria-hidden":"true"})))),f.a.createElement(L,{show_popup_select_level:this.state.show_select_level,interceptorAction:this.interceptorAction}))}}]),n}();Y.contextTypes={router:S.a.object};var X=Object(y.connect)(function(e){return{gradeType:e.grade.gradeType,userSession:e.user.session}},function(e){return{fechQuiz:function(t){return e(Object(E.n)(t))}}})(Y),J=n("ijCd"),Z=n.n(J);function $(e){"@babel/helpers - typeof";return($="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ee(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n handleExTypes -> value",t),new Promise(function(n,r){try{e.setState({exerciseType:t}),n(t)}catch(e){console.log("SummuryPage -> handleExTypes -> error",e),r(e)}})}),rt(tt(e),"beginWork",function(){console.log("begin work"),e.setState({working:!0})}),rt(tt(e),"renderQuizSummary",function(){var t,r=e.props,o=r.summuryQuiz,i=r.list_quiz;if(t=l()(e.state.exerciseType)?e.state.exerciseType:o.exercise_type,e.state.working&&void 0!==("undefined"==typeof window?"undefined":Je(window))){var a=n("DSe2").default;return f.a.createElement(a,{grade:e.props.params.lop,chapterID:e.props.params.chapterID,chapterName:e.props.params.chapterName,exerciseType:t})}var c=u()(Ye.a,function(t){return t.type==e.props.gradeType}).name,s=o.grade.type,p={1:{link:"https://www.facebook.com/groups/dodaihoc.tlot",text:"Group Ôn Thi ĐGNL & ĐGTD Miễn Phí"},2:{link:"https://Conkec.com/s/489cgC0X",text:"Group 2K8 ôn Thi ĐGNL & ĐGTD Miễn Phí"},3:{link:"https://www.facebook.com/groups/348700535253997/",text:"Tham Gia Group Dành Cho 2K9 Chia Sẻ, Trao Đổi Tài Liệu Miễn Phí"},4:{link:"https://www.facebook.com/groups/2010.Tuyensinh247",text:"Tham Gia Group 2K10 Ôn Thi Vào Lớp 10 Miễn Phí"},5:{link:"https://www.facebook.com/groups/2011.Tuyensinh247",text:"Tham Gia Group Dành Cho 2K11 Chia Sẻ, Trao Đổi Tài Liệu Miễn Phí"},6:{link:"https://www.facebook.com/groups/2k12.Tuyensinh247",text:"Tham Gia Group Dành Cho 2K12 Chia Sẻ, Trao Đổi Tài Liệu Miễn Phí"},7:{link:"https://www.facebook.com/groups/2013.tuyensinh247",text:"Tham Gia Group Dành Cho 2K13 Chia Sẻ, Trao Đổi Tài Liệu Miễn Phí"}};return f.a.createElement("div",null,e.props.gradeType<13&&e.props.gradeType>7?f.a.createElement(f.a.Fragment,null,f.a.createElement(Ge,{summuryQuiz:o,chapterID:e.props.params.chapterID,chapterName:e.props.params.chapter,beginWork:e.beginWork,gradeName:c,gradeType:s,list_quiz:i})):f.a.createElement("div",{className:"bg-grey"},f.a.createElement("div",{className:"container"},f.a.createElement("div",{className:"row"},f.a.createElement("div",{className:"col-sm-8"},(o.type,f.a.createElement(ge,{summuryQuiz:o,chapterID:e.props.params.chapterID,chapterName:e.props.params.chapter,beginWork:e.beginWork,gradeName:c,handleExTypes:e.handleExTypes,exerciseType:t})),[1,2,3,4,5,6,7].includes(s)&&f.a.createElement("div",null,f.a.createElement("div",{style:{display:"block",width:"100%",textAlign:"center",padding:"5px 0",borderLeft:"7px solid #44a601",borderRadius:"7px",background:"#fcedd5",marginBottom:"15px"}},f.a.createElement("h3",{style:{fontSize:"20px",color:"#44a601",margin:"15px 0 20px 0",lineHeight:"25px"}},p[s].text),f.a.createElement("p",{style:{textAlign:"center"}},f.a.createElement("a",{href:p[s].link,target:"_blank"},f.a.createElement("img",{src:"https://w.ladicdn.com/s250x250/5f4df9eb12de6c65fd4c378c/join-group-20221129073656-rwr5b.png",width:"218",height:"45",alt:"zalo"}))),f.a.createElement("br",null))),f.a.createElement("div",{style:{marginBottom:10}},f.a.createElement(Me,{grade:s}))),f.a.createElement("div",{className:"col-sm-4",style:{position:"relative"}},f.a.createElement("div",{style:{marginTop:"20px",marginBottom:"15px"}},f.a.createElement(ke.a,{id:10.3,device:"PC"})))))))}),e}return function(e,t,n){t&&Ze(e.prototype,t),n&&Ze(e,n)}(r,[{key:"componentDidMount",value:function(){this.props.setMenu("menu_question_chapter");var e=this.props.params.chapterID;this.props.fetchQuizsum(e),Ke.a.setUserLink({link:this.props.location.pathname+this.props.location.search}),Object(C.a)("summaryQuizPage",{url:this.props.location.pathname})}},{key:"componentDidUpdate",value:function(){Xe.a.renderMathjax(document.getElementById("list_relate-quiz"))}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.summuryQuiz;n.list_quiz;if(e=l()(this.state.exerciseType)?this.state.exerciseType:r.exercise_type,a()(r))return null;var o=r.seo_chapter,i="",c="",s="",p="",d="";r&&r.chapter&&r.chapter.name&&(s=o&&o.meta_title?o.meta_title:"Bài tập trắc nghiệm ".concat(r.chapter.name," có lời giải ").concat(r.subject.name," ").concat(r.grade.name),p=o&&o.meta_desc?o.meta_desc:"Luyện bài tập ".concat(r.chapter.name," trắc nghiệm có lời giải chi tiết kèm phương pháp giải ").concat(r.subject.name," ").concat(r.grade.name),o&&o.image?(d=o.image,d=Be.d):d=Be.d,o&&o.alias&&(i="https://xemloigiai.com".concat(j.a.getURLExerciseChapter({gradeType:r.grade.type,chapterName:o.alias,chapterID:r.chapter.id})),c="https://m.xemloigiai.com".concat(j.a.getURLExerciseChapter({gradeType:r.grade.type,chapterName:o.alias,chapterID:r.chapter.id}))));var y=!0;"undefined"!=typeof window&&window.__isBrowser__&&0!==r.type&&(y=!1);var m=u()(Ye.a,function(e){return e.type==t.props.gradeType}).name;r.grade.type;return f.a.createElement("div",null,o?f.a.createElement(h.a,{title:s,meta:[{name:"description",content:"".concat(p)},{name:"robots",content:"noindex,follow"},{property:"og:title",content:"".concat(s)},{property:"og:description",content:"".concat(p)},{property:"og:url",content:"".concat(i)},{property:"og:image",content:"".concat(d)}],link:[{rel:"alternate",media:"handheld",href:"".concat(c)},{rel:"canonical",href:"".concat(i)},{rel:"image_src",href:"".concat(d)}],script:[]}):f.a.createElement(h.a,{meta:[{name:"robots",content:"noindex,follow"}]}),y?f.a.createElement("div",null,f.a.createElement(ge,{summuryQuiz:r,chapterID:this.props.params.chapterID,chapterName:this.props.params.chapter,beginWork:this.beginWork,gradeName:m,handleExTypes:this.handleExTypes,exerciseType:e})):this.renderQuizSummary())}}]),r}();t.default=Object(y.connect)(function(e){return{gradeType:e.grade.gradeType,summuryQuiz:e.summuryQuiz.items,userSession:e.user.session,list_quiz:o()(e,"summuryQuiz.items.chapter.list_quiz")||[]}},function(e){return{fetchQuizsum:function(t){return e(Object(Fe.c)(t))},setMenu:function(t){return e(Object(We.n)(t))}}})(ot)},v1DJ:function(e,t,n){},"x+el":function(e,t,n){},x5Km:function(e,t,n){var r=n("FUuT");"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,o);r.locals&&(e.exports=r.locals)},xEkU:function(e,t,n){(function(t){for(var r=n("bQgK"),o="undefined"==typeof window?t:window,i=["moz","webkit"],a="AnimationFrame",c=o["request"+a],u=o["cancel"+a]||o["cancelRequest"+a],s=0;!c&&s