text: webpackJsonp([0],{"+1pv":function(t,e,n){function r(t,e,n,r){return g.call(this,e,r),this.parser=t,this.decisionToDFA=n,this.predictionMode=v.LL,this._input=null,this._startIndex=0,this._outerContext=null,this._dfa=null,this.mergeCache=null,this}var i=n("bz+k"),o=i.Set,a=i.BitSet,s=i.DoubleDict,u=n("7y1Z").ATN,c=n("j0Qz").ATNState,l=n("yEAX").ATNConfig,h=n("wMEt").ATNConfigSet,p=n("j/5l").Token,f=n("IUCG").DFAState,d=n("IUCG").PredPrediction,g=n("bcvg").ATNSimulator,v=n("LYMb").PredictionMode,y=n("6GCw").RuleContext,_=(n("EesY").ParserRuleContext,n("wQJ6").SemanticContext),m=(n("j0Qz").StarLoopEntryState,n("j0Qz").RuleStopState),x=n("YFoD").PredictionContext,T=n("T+Yw").Interval,E=n("VS1O"),S=E.Transition,C=E.SetTransition,b=E.NotSetTransition,A=E.RuleTransition,w=E.ActionTransition,R=n("5d5Q").NoViableAltException,N=n("YFoD").SingletonPredictionContext,I=n("YFoD").predictionContextFromRuleContext;(r.prototype=Object.create(g.prototype)).constructor=r,r.prototype.debug=!1,r.prototype.debug_closure=!1,r.prototype.debug_add=!1,r.prototype.debug_list_atn_decisions=!1,r.prototype.dfa_debug=!1,r.prototype.retry_debug=!1,r.prototype.reset=function(){},r.prototype.adaptivePredict=function(t,e,n){(this.debug||this.debug_list_atn_decisions)&&console.log("adaptivePredict decision "+e+" exec LA(1)=="+this.getLookaheadName(t)+" line "+t.LT(1).line+":"+t.LT(1).column),this._input=t,this._startIndex=t.index,this._outerContext=n;var r=this.decisionToDFA[e];this._dfa=r;var i=t.mark(),o=t.index;try{var a;if(null===(a=r.precedenceDfa?r.getPrecedenceStartState(this.parser.getPrecedence()):r.s0)){null===n&&(n=y.EMPTY),(this.debug||this.debug_list_atn_decisions)&&console.log("predictATN decision "+r.decision+" exec LA(1)=="+this.getLookaheadName(t)+", outerContext="+n.toString(this.parser.ruleNames));var s=this.computeStartState(r.atnStartState,y.EMPTY,!1);r.precedenceDfa?(r.s0.configs=s,s=this.applyPrecedenceFilter(s),a=this.addDFAState(r,new f(null,s)),r.setPrecedenceStartState(this.parser.getPrecedence(),a)):(a=this.addDFAState(r,new f(null,s)),r.s0=a)}var u=this.execATN(r,a,t,o,n);return this.debug&&console.log("DFA after predictATN: "+r.toString(this.parser.literalNames)),u}finally{this._dfa=null,this.mergeCache=null,t.seek(o),t.release(i)}},r.prototype.execATN=function(t,e,n,r,i){(this.debug||this.debug_list_atn_decisions)&&console.log("execATN decision "+t.decision+" exec LA(1)=="+this.getLookaheadName(n)+" line "+n.LT(1).line+":"+n.LT(1).column);var o,a=e;this.debug&&console.log("s0 = "+e);for(var s=n.LA(1);;){var c=this.getExistingTargetState(a,s);if(null===c&&(c=this.computeTargetState(t,a,s)),c===g.ERROR){var l=this.noViableAlt(n,i,a.configs,r);if(n.seek(r),(o=this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(a.configs,i))!==u.INVALID_ALT_NUMBER)return o;throw l}if(c.requiresFullContext&&this.predictionMode!==v.SLL){var h=null;if(null!==c.predicates){this.debug&&console.log("DFA state has preds in DFA sim LL failover");var f=n.index;if(f!==r&&n.seek(r),1===(h=this.evalSemanticContext(c.predicates,i,!0)).length)return this.debug&&console.log("Full LL avoided"),h.minValue();f!==r&&n.seek(f)}this.dfa_debug&&console.log("ctx sensitive state "+i+" in "+c);var d=this.computeStartState(t.atnStartState,i,!0);return this.reportAttemptingFullContext(t,h,c.configs,r,n.index),o=this.execATNWithFullContext(t,c,d,n,r,i)}if(c.isAcceptState){if(null===c.predicates)return c.prediction;var y=n.index;n.seek(r);var _=this.evalSemanticContext(c.predicates,i,!0);if(0===_.length)throw this.noViableAlt(n,i,c.configs,r);return 1===_.length?_.minValue():(this.reportAmbiguity(t,c,r,y,!1,_,c.configs),_.minValue())}a=c,s!==p.EOF&&(n.consume(),s=n.LA(1))}},r.prototype.getExistingTargetState=function(t,e){var n=t.edges;return null===n?null:n[e+1]||null},r.prototype.computeTargetState=function(t,e,n){var r=this.computeReachSet(e.configs,n,!1);if(null===r)return this.addDFAEdge(t,e,n,g.ERROR),g.ERROR;var o=new f(null,r),a=this.getUniqueAlt(r);if(this.debug){var s=v.getConflictingAltSubsets(r);console.log("SLL altSubSets="+i.arrayToString(s)+", previous="+e.configs+", configs="+r+", predict="+a+", allSubsetsConflict="+v.allSubsetsConflict(s)+", conflictingAlts="+this.getConflictingAlts(r))}return a!==u.INVALID_ALT_NUMBER?(o.isAcceptState=!0,o.configs.uniqueAlt=a,o.prediction=a):v.hasSLLConflictTerminatingPrediction(this.predictionMode,r)&&(o.configs.conflictingAlts=this.getConflictingAlts(r),o.requiresFullContext=!0,o.isAcceptState=!0,o.prediction=o.configs.conflictingAlts.minValue()),o.isAcceptState&&o.configs.hasSemanticContext&&(this.predicateDFAState(o,this.atn.getDecisionState(t.decision)),null!==o.predicates&&(o.prediction=u.INVALID_ALT_NUMBER)),o=this.addDFAEdge(t,e,n,o)},r.prototype.predicateDFAState=function(t,e){var n=e.transitions.length,r=this.getConflictingAltsOrUniqueAlt(t.configs),i=this.getPredsForAmbigAlts(r,t.configs,n);null!==i?(t.predicates=this.getPredicatePredictions(r,i),t.prediction=u.INVALID_ALT_NUMBER):t.prediction=r.minValue()},r.prototype.execATNWithFullContext=function(t,e,n,r,i,o){(this.debug||this.debug_list_atn_decisions)&&console.log("execATNWithFullContext "+n);var a=!1,s=null,c=n;r.seek(i);for(var l=r.LA(1),h=-1;;){if(null===(s=this.computeReachSet(c,l,!0))){var f=this.noViableAlt(r,o,c,i);r.seek(i);var d=this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(c,o);if(d!==u.INVALID_ALT_NUMBER)return d;throw f}var g=v.getConflictingAltSubsets(s);if(this.debug&&console.log("LL altSubSets="+g+", predict="+v.getUniqueAlt(g)+", resolvesToJustOneViableAlt="+v.resolvesToJustOneViableAlt(g)),s.uniqueAlt=this.getUniqueAlt(s),s.uniqueAlt!==u.INVALID_ALT_NUMBER){h=s.uniqueAlt;break}if(this.predictionMode!==v.LL_EXACT_AMBIG_DETECTION){if((h=v.resolvesToJustOneViableAlt(g))!==u.INVALID_ALT_NUMBER)break}else if(v.allSubsetsConflict(g)&&v.allSubsetsEqual(g)){a=!0,h=v.getSingleViableAlt(g);break}c=s,l!==p.EOF&&(r.consume(),l=r.LA(1))}return s.uniqueAlt!==u.INVALID_ALT_NUMBER?(this.reportContextSensitivity(t,h,s,i,r.index),h):(this.reportAmbiguity(t,e,i,r.index,a,null,s),h)},r.prototype.computeReachSet=function(t,e,n){this.debug&&console.log("in computeReachSet, starting closure: "+t),null===this.mergeCache&&(this.mergeCache=new s);for(var r=new h(n),i=null,a=0;a<t.items.length;a++){var c=t.items[a];if(this.debug_add&&console.log("testing "+this.getTokenName(e)+" at "+c),c.state instanceof m)(n||e===p.EOF)&&(null===i&&(i=[]),i.push(c),this.debug_add&&console.log("added "+c+" to skippedStopStates"));else for(var f=0;f<c.state.transitions.length;f++){var d=c.state.transitions[f],g=this.getReachableTarget(d,e);if(null!==g){var y=new l({state:g},c);r.add(y,this.mergeCache),this.debug_add&&console.log("added "+y+" to intermediate")}}}var _=null;if(null===i&&e!==p.EOF&&(1===r.items.length?_=r:this.getUniqueAlt(r)!==u.INVALID_ALT_NUMBER&&(_=r)),null===_){_=new h(n);for(var x=new o,T=e===p.EOF,E=0;E<r.items.length;E++)this.closure(r.items[E],_,x,!1,n,T)}if(e===p.EOF&&(_=this.removeAllConfigsNotInRuleStopState(_,_===r)),!(null===i||n&&v.hasConfigInRuleStopState(_)))for(var S=0;S<i.length;S++)_.add(i[S],this.mergeCache);return 0===_.items.length?null:_},r.prototype.removeAllConfigsNotInRuleStopState=function(t,e){if(v.allConfigsInRuleStopStates(t))return t;for(var n=new h(t.fullCtx),r=0;r<t.items.length;r++){var i=t.items[r];if(i.state instanceof m)n.add(i,this.mergeCache);else if(e&&i.state.epsilonOnlyTransitions){if(this.atn.nextTokens(i.state).contains(p.EPSILON)){var o=this.atn.ruleToStopState[i.state.ruleIndex];n.add(new l({state:o},i),this.mergeCache)}}}return n},r.prototype.computeStartState=function(t,e,n){for(var r=I(this.atn,e),i=new h(n),a=0;a<t.transitions.length;a++){var s=t.transitions[a].target,u=new l({state:s,alt:a+1,context:r},null),c=new o;this.closure(u,i,c,!0,n,!1)}return i},r.prototype.applyPrecedenceFilter=function(t){for(var e,n=[],r=new h(t.fullCtx),i=0;i<t.items.length;i++)if(1===(e=t.items[i]).alt){var o=e.semanticContext.evalPrecedence(this.parser,this._outerContext);null!==o&&(n[e.state.stateNumber]=e.context,o!==e.semanticContext?r.add(new l({semanticContext:o},e),this.mergeCache):r.add(e,this.mergeCache))}for(i=0;i<t.items.length;i++)if(1!==(e=t.items[i]).alt){if(!e.precedenceFilterSuppressed){var a=n[e.state.stateNumber]||null;if(null!==a&&a.equals(e.context))continue}r.add(e,this.mergeCache)}return r},r.prototype.getReachableTarget=function(t,e){return t.matches(e,0,this.atn.maxTokenType)?t.target:null},r.prototype.getPredsForAmbigAlts=function(t,e,n){for(var r=[],o=0;o<e.items.length;o++){var a=e.items[o];t.contains(a.alt)&&(r[a.alt]=_.orContext(r[a.alt]||null,a.semanticContext))}var s=0;for(o=1;o<n+1;o++){var u=r[o]||null;null===u?r[o]=_.NONE:u!==_.NONE&&(s+=1)}return 0===s&&(r=null),this.debug&&console.log("getPredsForAmbigAlts result "+i.arrayToString(r)),r},r.prototype.getPredicatePredictions=function(t,e){for(var n=[],r=!1,i=1;i<e.length;i++){var o=e[i];null!==t&&t.contains(i)&&n.push(new d(o,i)),o!==_.NONE&&(r=!0)}return r?n:null},r.prototype.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule=function(t,e){var n=this.splitAccordingToSemanticValidity(t,e),r=n[0],i=n[1],o=this.getAltThatFinishedDecisionEntryRule(r);return o!==u.INVALID_ALT_NUMBER?o:i.items.length>0&&(o=this.getAltThatFinishedDecisionEntryRule(i))!==u.INVALID_ALT_NUMBER?o:u.INVALID_ALT_NUMBER},r.prototype.getAltThatFinishedDecisionEntryRule=function(t){for(var e=[],n=0;n<t.items.length;n++){var r=t.items[n];(r.reachesIntoOuterContext>0||r.state instanceof m&&r.context.hasEmptyPath())&&e.indexOf(r.alt)<0&&e.push(r.alt)}return 0===e.length?u.INVALID_ALT_NUMBER:Math.min.apply(null,e)},r.prototype.splitAccordingToSemanticValidity=function(t,e){for(var n=new h(t.fullCtx),r=new h(t.fullCtx),i=0;i<t.items.length;i++){var o=t.items[i];if(o.semanticContext!==_.NONE){o.semanticContext.evaluate(this.parser,e)?n.add(o):r.add(o)}else n.add(o)}return[n,r]},r.prototype.evalSemanticContext=function(t,e,n){for(var r=new a,i=0;i<t.length;i++){var o=t[i];if(o.pred!==_.NONE){var s=o.pred.evaluate(this.parser,e);if((this.debug||this.dfa_debug)&&console.log("eval pred "+o+"="+s),s&&((this.debug||this.dfa_debug)&&console.log("PREDICT "+o.alt),r.add(o.alt),!n))break}else if(r.add(o.alt),!n)break}return r},r.prototype.closure=function(t,e,n,r,i,o){this.closureCheckingStopState(t,e,n,r,i,0,o)},r.prototype.closureCheckingStopState=function(t,e,n,r,i,o,a){if((this.debug||this.debug_closure)&&(console.log("closure("+t.toString(this.parser,!0)+")"),t.reachesIntoOuterContext>50))throw"problem";if(t.state instanceof m){if(!t.context.isEmpty()){for(var s=0;s<t.context.length;s++)if(t.context.getReturnState(s)!==x.EMPTY_RETURN_STATE){var u=this.atn.states[t.context.getReturnState(s)],c=t.context.getParent(s),h={state:u,alt:t.alt,context:c,semanticContext:t.semanticContext},p=new l(h,null);p.reachesIntoOuterContext=t.reachesIntoOuterContext,this.closureCheckingStopState(p,e,n,r,i,o-1,a)}else{if(i){e.add(new l({state:t.state,context:x.EMPTY},t),this.mergeCache);continue}this.debug&&console.log("FALLING off rule "+this.getRuleName(t.state.ruleIndex)),this.closure_(t,e,n,r,i,o,a)}return}if(i)return void e.add(t,this.mergeCache);this.debug&&console.log("FALLING off rule "+this.getRuleName(t.state.ruleIndex))}this.closure_(t,e,n,r,i,o,a)},r.prototype.closure_=function(t,e,n,r,i,o,a){var s=t.state;s.epsilonOnlyTransitions||e.add(t,this.mergeCache);for(var u=0;u<s.transitions.length;u++)if(0!=u||!this.canDropLoopEntryEdgeInLeftRecursiveRule(t)){var c=s.transitions[u],l=r&&!(c instanceof w),h=this.getEpsilonTarget(t,c,l,0===o,i,a);if(null!==h){if(!c.isEpsilon&&n.add(h)!==h)continue;var p=o;if(t.state instanceof m){if(n.add(h)!==h)continue;null!==this._dfa&&this._dfa.precedenceDfa&&c.outermostPrecedenceReturn===this._dfa.atnStartState.ruleIndex&&(h.precedenceFilterSuppressed=!0),h.reachesIntoOuterContext+=1,e.dipsIntoOuterContext=!0,p-=1,this.debug&&console.log("dips into outer ctx: "+h)}else c instanceof A&&p>=0&&(p+=1);this.closureCheckingStopState(h,e,n,l,i,p,a)}}},r.prototype.canDropLoopEntryEdgeInLeftRecursiveRule=function(t){var e=t.state;if(e.stateType!=c.STAR_LOOP_ENTRY)return!1;if(e.stateType!=c.STAR_LOOP_ENTRY||!e.isPrecedenceDecision||t.context.isEmpty()||t.context.hasEmptyPath())return!1;for(var n=t.context.length,r=0;r<n;r++){if((s=this.atn.states[t.context.getReturnState(r)]).ruleIndex!=e.ruleIndex)return!1}for(var i=e.transitions[0].target.endState.stateNumber,o=this.atn.states[i],r=0;r<n;r++){var a=t.context.getReturnState(r),s=this.atn.states[a];if(1!=s.transitions.length||!s.transitions[0].isEpsilon)return!1;var u=s.transitions[0].target;if((s.stateType!=c.BLOCK_END||u!=e)&&(s!=o&&u!=o&&(u.stateType!=c.BLOCK_END||1!=u.transitions.length||!u.transitions[0].isEpsilon||u.transitions[0].target!=e)))return!1}return!0},r.prototype.getRuleName=function(t){return null!==this.parser&&t>=0?this.parser.ruleNames[t]:"<rule "+t+">"},r.prototype.getEpsilonTarget=function(t,e,n,r,i,o){switch(e.serializationType){case S.RULE:return this.ruleTransition(t,e);case S.PRECEDENCE:return this.precedenceTransition(t,e,n,r,i);case S.PREDICATE:return this.predTransition(t,e,n,r,i);case S.ACTION:return this.actionTransition(t,e);case S.EPSILON:return new l({state:e.target},t);case S.ATOM:case S.RANGE:case S.SET:return o&&e.matches(p.EOF,0,1)?new l({state:e.target},t):null;default:return null}},r.prototype.actionTransition=function(t,e){if(this.debug){var n=-1==e.actionIndex?65535:e.actionIndex;console.log("ACTION edge "+e.ruleIndex+":"+n)}return new l({state:e.target},t)},r.prototype.precedenceTransition=function(t,e,n,r,o){this.debug&&(console.log("PRED (collectPredicates="+n+") "+e.precedence+">=_p, ctx dependent=true"),null!==this.parser&&console.log("context surrounding pred is "+i.arrayToString(this.parser.getRuleInvocationStack())));var a=null;if(n&&r)if(o){var s=this._input.index;this._input.seek(this._startIndex);var u=e.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(s),u&&(a=new l({state:e.target},t))}else{var c=_.andContext(t.semanticContext,e.getPredicate());a=new l({state:e.target,semanticContext:c},t)}else a=new l({state:e.target},t);return this.debug&&console.log("config from pred transition="+a),a},r.prototype.predTransition=function(t,e,n,r,o){this.debug&&(console.log("PRED (collectPredicates="+n+") "+e.ruleIndex+":"+e.predIndex+", ctx dependent="+e.isCtxDependent),null!==this.parser&&console.log("context surrounding pred is "+i.arrayToString(this.parser.getRuleInvocationStack())));var a=null;if(n&&(e.isCtxDependent&&r||!e.isCtxDependent))if(o){var s=this._input.index;this._input.seek(this._startIndex);var u=e.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(s),u&&(a=new l({state:e.target},t))}else{var c=_.andContext(t.semanticContext,e.getPredicate());a=new l({state:e.target,semanticContext:c},t)}else a=new l({state:e.target},t);return this.debug&&console.log("config from pred transition="+a),a},r.prototype.ruleTransition=function(t,e){this.debug&&console.log("CALL rule "+this.getRuleName(e.target.ruleIndex)+", ctx="+t.context);var n=e.followState,r=N.create(t.context,n.stateNumber);return new l({state:e.target,context:r},t)},r.prototype.getConflictingAlts=function(t){var e=v.getConflictingAltSubsets(t);return v.getAlts(e)},r.prototype.getConflictingAltsOrUniqueAlt=function(t){var e=null;return t.uniqueAlt!==u.INVALID_ALT_NUMBER?(e=new a).add(t.uniqueAlt):e=t.conflictingAlts,e},r.prototype.getTokenName=function(t){if(t===p.EOF)return"EOF";if(null!==this.parser&&null!==this.parser.literalNames){if(!(t>=this.parser.literalNames.length&&t>=this.parser.symbolicNames.length)){return(this.parser.literalNames[t]||this.parser.symbolicNames[t])+"<"+t+">"}console.log(t+" ttype out of range: "+this.parser.literalNames),console.log(""+this.parser.getInputStream().getTokens())}return""+t},r.prototype.getLookaheadName=function(t){return this.getTokenName(t.LA(1))},r.prototype.dumpDeadEndConfigs=function(t){console.log("dead end configs: ");for(var e=t.getDeadEndConfigs(),n=0;n<e.length;n++){var r=e[n],i="no edges";if(r.state.transitions.length>0){var o=r.state.transitions[0];if(o instanceof AtomTransition)i="Atom "+this.getTokenName(o.label);else if(o instanceof C){i=(o instanceof b?"~":"")+"Set "+o.set}}console.error(r.toString(this.parser,!0)+":"+i)}},r.prototype.noViableAlt=function(t,e,n,r){return new R(this.parser,t,t.get(r),t.LT(1),n,e)},r.prototype.getUniqueAlt=function(t){for(var e=u.INVALID_ALT_NUMBER,n=0;n<t.items.length;n++){var r=t.items[n];if(e===u.INVALID_ALT_NUMBER)e=r.alt;else if(r.alt!==e)return u.INVALID_ALT_NUMBER}return e},r.prototype.addDFAEdge=function(t,e,n,r){if(this.debug&&console.log("EDGE "+e+" -> "+r+" upon "+this.getTokenName(n)),null===r)return null;if(r=this.addDFAState(t,r),null===e||n<-1||n>this.atn.maxTokenType)return r;if(null===e.edges&&(e.edges=[]),e.edges[n+1]=r,this.debug){var i=null===this.parser?null:this.parser.literalNames,o=null===this.parser?null:this.parser.symbolicNames;console.log("DFA=\n"+t.toString(i,o))}return r},r.prototype.addDFAState=function(t,e){if(e==g.ERROR)return e;var n=t.states.get(e);return null!==n?n:(e.stateNumber=t.states.length,e.configs.readOnly||(e.configs.optimizeConfigs(this),e.configs.setReadonly(!0)),t.states.add(e),this.debug&&console.log("adding new DFA state: "+e),e)},r.prototype.reportAttemptingFullContext=function(t,e,n,r,i){if(this.debug||this.retry_debug){var o=new T(r,i+1);console.log("reportAttemptingFullContext decision="+t.decision+":"+n+", input="+this.parser.getTokenStream().getText(o))}null!==this.parser&&this.parser.getErrorListenerDispatch().reportAttemptingFullContext(this.parser,t,r,i,e,n)},r.prototype.reportContextSensitivity=function(t,e,n,r,i){if(this.debug||this.retry_debug){var o=new T(r,i+1);console.log("reportContextSensitivity decision="+t.decision+":"+n+", input="+this.parser.getTokenStream().getText(o))}null!==this.parser&&this.parser.getErrorListenerDispatch().reportContextSensitivity(this.parser,t,r,i,e,n)},r.prototype.reportAmbiguity=function(t,e,n,r,i,o,a){if(this.debug||this.retry_debug){var s=new T(n,r+1);console.log("reportAmbiguity "+o+":"+a+", input="+this.parser.getTokenStream().getText(s))}null!==this.parser&&this.parser.getErrorListenerDispatch().reportAmbiguity(this.parser,t,n,r,i,o,a)},e.ParserATNSimulator=r},"/UbI":function(t,e,n){},"/Z+8":function(t,e,n){function r(t){return this.lexerActions=null===t?[]:t,this.cachedHashCode=i(t),this}var i=n("bz+k").hashStuff,o=n("J8R0").LexerIndexedCustomAction;r.append=function(t,e){if(null===t)return new r([e]);return new r(t.lexerActions.concat([e]))},r.prototype.fixOffsetBeforeMatch=function(t){for(var e=null,n=0;n<this.lexerActions.length;n++)!this.lexerActions[n].isPositionDependent||this.lexerActions[n]instanceof o||(null===e&&(e=this.lexerActions.concat([])),e[n]=new o(t,this.lexerActions[n]));return null===e?this:new r(e)},r.prototype.execute=function(t,e,n){var r=!1,i=e.index;try{for(var a=0;a<this.lexerActions.length;a++){var s=this.lexerActions[a];if(s instanceof o){var u=s.offset;e.seek(n+u),s=s.action,r=n+u!==i}else s.isPositionDependent&&(e.seek(i),r=!1);s.execute(t)}}finally{r&&e.seek(i)}},r.prototype.hashCode=function(){return this.cachedHashCode},r.prototype.updateHashCode=function(t){t.update(this.cachedHashCode)},r.prototype.equals=function(t){if(this===t)return!0;if(t instanceof r){if(this.cachedHashCode!=t.cachedHashCode)return!1;if(this.lexerActions.length!=t.lexerActions.length)return!1;for(var e=this.lexerActions.length,n=0;n<e;++n)if(!this.lexerActions[n].equals(t.lexerActions[n]))return!1;return!0}return!1},e.LexerActionExecutor=r},"13lD":function(t,e){String.prototype.codePointAt||function(){"use strict";var t=function(){try{var t={},e=Object.defineProperty,n=e(t,t,t)&&e}catch(t){}return n}(),e=function(t){if(null==this)throw TypeError();var e=String(this),n=e.length,r=t?Number(t):0;if(r!=r&&(r=0),!(r<0||r>=n)){var i,o=e.charCodeAt(r);return o>=55296&&o<=56319&&n>r+1&&(i=e.charCodeAt(r+1))>=56320&&i<=57343?1024*(o-55296)+i-56320+65536:o}};t?t(String.prototype,"codePointAt",{value:e,configurable:!0,writable:!0}):String.prototype.codePointAt=e}()},"2EdO":function(t,e,n){function r(){return this._listeners=[o.INSTANCE],this._interp=null,this._stateNumber=-1,this}var i=n("j/5l").Token,o=n("qFmK").ConsoleErrorListener,a=n("qFmK").ProxyErrorListener;r.tokenTypeMapCache={},r.ruleIndexMapCache={},r.prototype.checkVersion=function(t){"4.7.1"!==t&&console.log("ANTLR runtime and generated code versions disagree: 4.7.1!="+t)},r.prototype.addErrorListener=function(t){this._listeners.push(t)},r.prototype.removeErrorListeners=function(){this._listeners=[]},r.prototype.getTokenTypeMap=function(){var t=this.getTokenNames();if(null===t)throw"The current recognizer does not provide a list of token names.";var e=this.tokenTypeMapCache[t];return void 0===e&&((e=t.reduce(function(t,e,n){t[e]=n})).EOF=i.EOF,this.tokenTypeMapCache[t]=e),e},r.prototype.getRuleIndexMap=function(){var t=this.ruleNames;if(null===t)throw"The current recognizer does not provide a list of rule names.";var e=this.ruleIndexMapCache[t];return void 0===e&&(e=t.reduce(function(t,e,n){t[e]=n}),this.ruleIndexMapCache[t]=e),e},r.prototype.getTokenType=function(t){var e=this.getTokenTypeMap()[t];return void 0!==e?e:i.INVALID_TYPE},r.prototype.getErrorHeader=function(t){return"line "+t.getOffendingToken().line+":"+t.getOffendingToken().column},r.prototype.getTokenErrorDisplay=function(t){if(null===t)return"<no token>";var e=t.text;return null===e&&(e=t.type===i.EOF?"<EOF>":"<"+t.type+">"),"'"+(e=e.replace("\n","\\n").replace("\r","\\r").replace("\t","\\t"))+"'"},r.prototype.getErrorListenerDispatch=function(){return new a(this._listeners)},r.prototype.sempred=function(t,e,n){return!0},r.prototype.precpred=function(t,e){return!0},Object.defineProperty(r.prototype,"state",{get:function(){return this._stateNumber},set:function(t){this._stateNumber=t}}),e.Recognizer=r},"3Rtt":function(t,e,n){function r(t,e){var n=[];return n[t-1]=e,n.map(function(t){return e})}function i(t){return void 0!==t&&null!==t||(t=U.defaultOptions),this.deserializationOptions=t,this.stateFactories=null,this.actionFactories=null,this}var o=n("j/5l").Token,a=n("7y1Z").ATN,s=n("8Teg").ATNType,u=n("j0Qz"),c=u.ATNState,l=u.BasicState,h=u.DecisionState,p=u.BlockStartState,f=u.BlockEndState,d=u.LoopEndState,g=u.RuleStartState,v=u.RuleStopState,y=u.TokensStartState,_=u.PlusLoopbackState,m=u.StarLoopbackState,x=u.StarLoopEntryState,T=u.PlusBlockStartState,E=u.StarBlockStartState,S=u.BasicBlockStartState,C=n("VS1O"),b=C.Transition,A=C.AtomTransition,w=C.SetTransition,R=C.NotSetTransition,N=C.RuleTransition,I=C.RangeTransition,k=C.ActionTransition,M=C.EpsilonTransition,L=C.WildcardTransition,O=C.PredicateTransition,P=C.PrecedencePredicateTransition,D=n("T+Yw").IntervalSet,U=(n("T+Yw").Interval,n("hs4g").ATNDeserializationOptions),F=n("J8R0"),H=F.LexerActionType,j=F.LexerSkipAction,B=F.LexerChannelAction,z=F.LexerCustomAction,q=F.LexerMoreAction,V=F.LexerTypeAction,G=F.LexerPushModeAction,Y=F.LexerPopModeAction,$=F.LexerModeAction,K="59627784-3BE5-417A-B9EB-8131A7286089",W=["AADB8D7E-AEEF-4415-AD2B-8204D6CF042E",K];i.prototype.isFeatureSupported=function(t,e){var n=W.indexOf(t);if(n<0)return!1;return W.indexOf(e)>=n},i.prototype.deserialize=function(t){this.reset(t),this.checkVersion(),this.checkUUID();var e=this.readATN();this.readStates(e),this.readRules(e),this.readModes(e);var n=[];return this.readSets(e,n,this.readInt.bind(this)),this.isFeatureSupported(K,this.uuid)&&this.readSets(e,n,this.readInt32.bind(this)),this.readEdges(e,n),this.readDecisions(e),this.readLexerActions(e),this.markPrecedenceDecisions(e),this.verifyATN(e),this.deserializationOptions.generateRuleBypassTransitions&&e.grammarType===s.PARSER&&(this.generateRuleBypassTransitions(e),this.verifyATN(e)),e},i.prototype.reset=function(t){var e=t.split("").map(function(t){var e=t.charCodeAt(0);return e>1?e-2:e+65533});e[0]=t.charCodeAt(0),this.data=e,this.pos=0},i.prototype.checkVersion=function(){var t=this.readInt();if(3!==t)throw"Could not deserialize ATN with version "+t+" (expected 3)."},i.prototype.checkUUID=function(){var t=this.readUUID();if(W.indexOf(t)<0)throw"59627784-3BE5-417A-B9EB-8131A7286089";this.uuid=t},i.prototype.readATN=function(){var t=this.readInt(),e=this.readInt();return new a(t,e)},i.prototype.readStates=function(t){for(var e,n,r,i=[],o=[],a=this.readInt(),s=0;s<a;s++){var u=this.readInt();if(u!==c.INVALID_TYPE){var l=this.readInt();65535===l&&(l=-1);var h=this.stateFactory(u,l);if(u===c.LOOP_END){var f=this.readInt();i.push([h,f])}else if(h instanceof p){var d=this.readInt();o.push([h,d])}t.addState(h)}else t.addState(null)}for(e=0;e<i.length;e++)(n=i[e])[0].loopBackState=t.states[n[1]];for(e=0;e<o.length;e++)(n=o[e])[0].endState=t.states[n[1]];var g=this.readInt();for(e=0;e<g;e++)r=this.readInt(),t.states[r].nonGreedy=!0;var v=this.readInt();for(e=0;e<v;e++)r=this.readInt(),t.states[r].isPrecedenceRule=!0},i.prototype.readRules=function(t){var e,n=this.readInt();for(t.grammarType===s.LEXER&&(t.ruleToTokenType=r(n,0)),t.ruleToStartState=r(n,0),e=0;e<n;e++){var i=this.readInt(),a=t.states[i];if(t.ruleToStartState[e]=a,t.grammarType===s.LEXER){var u=this.readInt();65535===u&&(u=o.EOF),t.ruleToTokenType[e]=u}}for(t.ruleToStopState=r(n,0),e=0;e<t.states.length;e++){var c=t.states[e];c instanceof v&&(t.ruleToStopState[c.ruleIndex]=c,t.ruleToStartState[c.ruleIndex].stopState=c)}},i.prototype.readModes=function(t){for(var e=this.readInt(),n=0;n<e;n++){var r=this.readInt();t.modeToStartState.push(t.states[r])}},i.prototype.readSets=function(t,e,n){for(var r=this.readInt(),i=0;i<r;i++){var o=new D;e.push(o);var a=this.readInt();0!==this.readInt()&&o.addOne(-1);for(var s=0;s<a;s++){var u=n(),c=n();o.addRange(u,c)}}},i.prototype.readEdges=function(t,e){var n,r,i,o,a,s=this.readInt();for(n=0;n<s;n++){var u=this.readInt(),c=this.readInt(),l=this.readInt(),h=this.readInt(),f=this.readInt(),d=this.readInt();o=this.edgeFactory(t,l,u,c,h,f,d,e);t.states[u].addTransition(o)}for(n=0;n<t.states.length;n++)for(i=t.states[n],r=0;r<i.transitions.length;r++){var g=i.transitions[r];if(g instanceof N){var v=-1;t.ruleToStartState[g.target.ruleIndex].isPrecedenceRule&&0===g.precedence&&(v=g.target.ruleIndex),o=new M(g.followState,v),t.ruleToStopState[g.target.ruleIndex].addTransition(o)}}for(n=0;n<t.states.length;n++){if((i=t.states[n])instanceof p){if(null===i.endState)throw"IllegalState";if(null!==i.endState.startState)throw"IllegalState";i.endState.startState=i}if(i instanceof _)for(r=0;r<i.transitions.length;r++)(a=i.transitions[r].target)instanceof T&&(a.loopBackState=i);else if(i instanceof m)for(r=0;r<i.transitions.length;r++)(a=i.transitions[r].target)instanceof x&&(a.loopBackState=i)}},i.prototype.readDecisions=function(t){for(var e=this.readInt(),n=0;n<e;n++){var r=this.readInt(),i=t.states[r];t.decisionToState.push(i),i.decision=n}},i.prototype.readLexerActions=function(t){if(t.grammarType===s.LEXER){var e=this.readInt();t.lexerActions=r(e,null);for(var n=0;n<e;n++){var i=this.readInt(),o=this.readInt();65535===o&&(o=-1);var a=this.readInt();65535===a&&(a=-1);var u=this.lexerActionFactory(i,o,a);t.lexerActions[n]=u}}},i.prototype.generateRuleBypassTransitions=function(t){var e,n=t.ruleToStartState.length;for(e=0;e<n;e++)t.ruleToTokenType[e]=t.maxTokenType+e+1;for(e=0;e<n;e++)this.generateRuleBypassTransition(t,e)},i.prototype.generateRuleBypassTransition=function(t,e){var n,r,i=new S;i.ruleIndex=e,t.addState(i);var o=new f;o.ruleIndex=e,t.addState(o),i.endState=o,t.defineDecisionState(i),o.startState=i;var a=null,s=null;if(t.ruleToStartState[e].isPrecedenceRule){for(s=null,n=0;n<t.states.length;n++)if(r=t.states[n],this.stateIsEndStateFor(r,e)){s=r,a=r.loopBackState.transitions[0];break}if(null===a)throw"Couldn't identify final state of the precedence rule prefix section."}else s=t.ruleToStopState[e];for(n=0;n<t.states.length;n++){r=t.states[n];for(var u=0;u<r.transitions.length;u++){var c=r.transitions[u];c!==a&&(c.target===s&&(c.target=o))}}for(var h=t.ruleToStartState[e],p=h.transitions.length;p>0;)i.addTransition(h.transitions[p-1]),h.transitions=h.transitions.slice(-1);t.ruleToStartState[e].addTransition(new M(i)),o.addTransition(new M(s));var d=new l;t.addState(d),d.addTransition(new A(o,t.ruleToTokenType[e])),i.addTransition(new M(d))},i.prototype.stateIsEndStateFor=function(t,e){if(t.ruleIndex!==e)return null;if(!(t instanceof x))return null;var n=t.transitions[t.transitions.length-1].target;return n instanceof d&&n.epsilonOnlyTransitions&&n.transitions[0].target instanceof v?t:null},i.prototype.markPrecedenceDecisions=function(t){for(var e=0;e<t.states.length;e++){var n=t.states[e];if(n instanceof x&&t.ruleToStartState[n.ruleIndex].isPrecedenceRule){var r=n.transitions[n.transitions.length-1].target;r instanceof d&&r.epsilonOnlyTransitions&&r.transitions[0].target instanceof v&&(n.isPrecedenceDecision=!0)}}},i.prototype.verifyATN=function(t){if(this.deserializationOptions.verifyATN)for(var e=0;e<t.states.length;e++){var n=t.states[e];if(null!==n)if(this.checkCondition(n.epsilonOnlyTransitions||n.transitions.length<=1),n instanceof T)this.checkCondition(null!==n.loopBackState);else if(n instanceof x)if(this.checkCondition(null!==n.loopBackState),this.checkCondition(2===n.transitions.length),n.transitions[0].target instanceof E)this.checkCondition(n.transitions[1].target instanceof d),this.checkCondition(!n.nonGreedy);else{if(!(n.transitions[0].target instanceof d))throw"IllegalState";this.checkCondition(n.transitions[1].target instanceof E),this.checkCondition(n.nonGreedy)}else n instanceof m?(this.checkCondition(1===n.transitions.length),this.checkCondition(n.transitions[0].target instanceof x)):n instanceof d?this.checkCondition(null!==n.loopBackState):n instanceof g?this.checkCondition(null!==n.stopState):n instanceof p?this.checkCondition(null!==n.endState):n instanceof f?this.checkCondition(null!==n.startState):n instanceof h?this.checkCondition(n.transitions.length<=1||n.decision>=0):this.checkCondition(n.transitions.length<=1||n instanceof v)}},i.prototype.checkCondition=function(t,e){if(!t)throw void 0!==e&&null!==e||(e="IllegalState"),e},i.prototype.readInt=function(){return this.data[this.pos++]},i.prototype.readInt32=function(){return this.readInt()|this.readInt()<<16},i.prototype.readLong=function(){return 4294967295&this.readInt32()|this.readInt32()<<32};var Q=function(){for(var t=[],e=0;e<256;e++)t[e]=(e+256).toString(16).substr(1).toUpperCase();return t}();i.prototype.readUUID=function(){for(var t=[],e=7;e>=0;e--){var n=this.readInt();t[2*e+1]=255&n,t[2*e]=n>>8&255}return Q[t[0]]+Q[t[1]]+Q[t[2]]+Q[t[3]]+"-"+Q[t[4]]+Q[t[5]]+"-"+Q[t[6]]+Q[t[7]]+"-"+Q[t[8]]+Q[t[9]]+"-"+Q[t[10]]+Q[t[11]]+Q[t[12]]+Q[t[13]]+Q[t[14]]+Q[t[15]]},i.prototype.edgeFactory=function(t,e,n,r,i,a,s,u){var c=t.states[r];switch(e){case b.EPSILON:return new M(c);case b.RANGE:return 0!==s?new I(c,o.EOF,a):new I(c,i,a);case b.RULE:return new N(t.states[i],a,s,c);case b.PREDICATE:return new O(c,i,a,0!==s);case b.PRECEDENCE:return new P(c,i);case b.ATOM:return 0!==s?new A(c,o.EOF):new A(c,i);case b.ACTION:return new k(c,i,a,0!==s);case b.SET:return new w(c,u[i]);case b.NOT_SET:return new R(c,u[i]);case b.WILDCARD:return new L(c);default:throw"The specified transition type: "+e+" is not valid."}},i.prototype.stateFactory=function(t,e){if(null===this.stateFactories){var n=[];n[c.INVALID_TYPE]=null,n[c.BASIC]=function(){return new l},n[c.RULE_START]=function(){return new g},n[c.BLOCK_START]=function(){return new S},n[c.PLUS_BLOCK_START]=function(){return new T},n[c.STAR_BLOCK_START]=function(){return new E},n[c.TOKEN_START]=function(){return new y},n[c.RULE_STOP]=function(){return new v},n[c.BLOCK_END]=function(){return new f},n[c.STAR_LOOP_BACK]=function(){return new m},n[c.STAR_LOOP_ENTRY]=function(){return new x},n[c.PLUS_LOOP_BACK]=function(){return new _},n[c.LOOP_END]=function(){return new d},this.stateFactories=n}if(t>this.stateFactories.length||null===this.stateFactories[t])throw"The specified state type "+t+" is not valid.";var r=this.stateFactories[t]();if(null!==r)return r.ruleIndex=e,r},i.prototype.lexerActionFactory=function(t,e,n){if(null===this.actionFactories){var r=[];r[H.CHANNEL]=function(t,e){return new B(t)},r[H.CUSTOM]=function(t,e){return new z(t,e)},r[H.MODE]=function(t,e){return new $(t)},r[H.MORE]=function(t,e){return q.INSTANCE},r[H.POP_MODE]=function(t,e){return Y.INSTANCE},r[H.PUSH_MODE]=function(t,e){return new G(t)},r[H.SKIP]=function(t,e){return j.INSTANCE},r[H.TYPE]=function(t,e){return new V(t)},this.actionFactories=r}if(t>this.actionFactories.length||null===this.actionFactories[t])throw"The specified lexer action type "+t+" is not valid.";return this.actionFactories[t](e,n)},e.ATNDeserializer=i},"4iSB":function(t,e,n){function r(t,e){return this.name="<empty>",this.strdata=t,this.decodeToUnicodeCodePoints=e||!1,function(t,e){if(t._index=0,t.data=[],t.decodeToUnicodeCodePoints)for(r=0;r<t.strdata.length;){var n=t.strdata.codePointAt(r);t.data.push(n),r+=n<=65535?1:2}else for(var r=0;r<t.strdata.length;r++){var i=t.strdata.charCodeAt(r);t.data.push(i)}t._size=t.data.length}(this),this}var i=n("j/5l").Token;n("13lD"),n("pr/i"),Object.defineProperty(r.prototype,"index",{get:function(){return this._index}}),Object.defineProperty(r.prototype,"size",{get:function(){return this._size}}),r.prototype.reset=function(){this._index=0},r.prototype.consume=function(){if(this._index>=this._size)throw"cannot consume EOF";this._index+=1},r.prototype.LA=function(t){if(0===t)return 0;t<0&&(t+=1);var e=this._index+t-1;return e<0||e>=this._size?i.EOF:this.data[e]},r.prototype.LT=function(t){return this.LA(t)},r.prototype.mark=function(){return-1},r.prototype.release=function(t){},r.prototype.seek=function(t){t<=this._index?this._index=t:this._index=Math.min(t,this._size)},r.prototype.getText=function(t,e){if(e>=this._size&&(e=this._size-1),t>=this._size)return"";if(this.decodeToUnicodeCodePoints){for(var n="",r=t;r<=e;r++)n+=String.fromCodePoint(this.data[r]);return n}return this.strdata.slice(t,e+1)},r.prototype.toString=function(){return this.strdata},e.InputStream=r},"5d5Q":function(t,e,n){function r(t){if(Error.call(this),Error.captureStackTrace)Error.captureStackTrace(this,r);else(new Error).stack;return this.message=t.message,this.recognizer=t.recognizer,this.input=t.input,this.ctx=t.ctx,this.offendingToken=null,this.offendingState=-1,null!==this.recognizer&&(this.offendingState=this.recognizer.state),this}function i(t,e,n,i){return r.call(this,{message:"",recognizer:t,input:e,ctx:null}),this.startIndex=n,this.deadEndConfigs=i,this}function o(t,e,n,i,o,a){a=a||t._ctx,i=i||t.getCurrentToken(),n=n||t.getCurrentToken(),e=e||t.getInputStream(),r.call(this,{message:"",recognizer:t,input:e,ctx:a}),this.deadEndConfigs=o,this.startToken=n,this.offendingToken=i}function a(t){r.call(this,{message:"",recognizer:t,input:t.getInputStream(),ctx:t._ctx}),this.offendingToken=t.getCurrentToken()}function s(t,e,n){r.call(this,{message:this.formatMessage(e,n||null),recognizer:t,input:t.getInputStream(),ctx:t._ctx});var i=t._interp.atn.states[t.state].transitions[0];return i instanceof c?(this.ruleIndex=i.ruleIndex,this.predicateIndex=i.predIndex):(this.ruleIndex=0,this.predicateIndex=0),this.predicate=e,this.offendingToken=t.getCurrentToken(),this}function u(){return Error.call(this),Error.captureStackTrace(this,u),this}var c=n("VS1O").PredicateTransition;(r.prototype=Object.create(Error.prototype)).constructor=r,r.prototype.getExpectedTokens=function(){return null!==this.recognizer?this.recognizer.atn.getExpectedTokens(this.offendingState,this.ctx):null},r.prototype.toString=function(){return this.message},(i.prototype=Object.create(r.prototype)).constructor=i,i.prototype.toString=function(){var t="";return this.startIndex>=0&&this.startIndex<this.input.size&&(t=this.input.getText((this.startIndex,this.startIndex))),"LexerNoViableAltException"+t},(o.prototype=Object.create(r.prototype)).constructor=o,(a.prototype=Object.create(r.prototype)).constructor=a,(s.prototype=Object.create(r.prototype)).constructor=s,s.prototype.formatMessage=function(t,e){return null!==e?e:"failed predicate: {"+t+"}?"},(u.prototype=Object.create(Error.prototype)).constructor=u,e.RecognitionException=r,e.NoViableAltException=o,e.LexerNoViableAltException=i,e.InputMismatchException=a,e.FailedPredicateException=s,e.ParseCancellationException=u},"5dCK":function(t,e,n){t.exports.presentablePolicyLexer=n("rBFZ").presentablePolicyLexer,t.exports.presentablePolicyParser=n("Dxx8").presentablePolicyParser,t.exports.presentablePolicyListener=n("7JQk").presentablePolicyListener},"6GCw":function(t,e,n){function r(t,e){return i.call(this),this.parentCtx=t||null,this.invokingState=e||-1,this}var i=n("VnEu").RuleNode,o=n("VnEu").INVALID_INTERVAL,a=n("7y1Z").INVALID_ALT_NUMBER;(r.prototype=Object.create(i.prototype)).constructor=r,r.prototype.depth=function(){for(var t=0,e=this;null!==e;)e=e.parentCtx,t+=1;return t},r.prototype.isEmpty=function(){return-1===this.invokingState},r.prototype.getSourceInterval=function(){return o},r.prototype.getRuleContext=function(){return this},r.prototype.getPayload=function(){return this},r.prototype.getText=function(){return 0===this.getChildCount()?"":this.children.map(function(t){return t.getText()}).join("")},r.prototype.getAltNumber=function(){return a},r.prototype.setAltNumber=function(t){},r.prototype.getChild=function(t){return null},r.prototype.getChildCount=function(){return 0},r.prototype.accept=function(t){return t.visitChildren(this)},e.RuleContext=r;var s=n("WmJ1").Trees;r.prototype.toStringTree=function(t,e){return s.toStringTree(this,t,e)},r.prototype.toString=function(t,e){t=t||null,e=e||null;for(var n=this,r="[";null!==n&&n!==e;){if(null===t)n.isEmpty()||(r+=n.invokingState);else{var i=n.ruleIndex;r+=i>=0&&i<t.length?t[i]:""+i}null===n.parentCtx||null===t&&n.parentCtx.isEmpty()||(r+=" "),n=n.parentCtx}return r+="]"}},"6Z45":function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n("5dCK").presentablePolicyListener,o=/^<.+>$/,a=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var t=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.errorMsg=null,t.policy_segments=[],t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i),r(e,[{key:"enterPolicy",value:function(t){}},{key:"exitPolicy",value:function(t){}},{key:"formatSegmentBlock",value:function(){var t=this._segment_block,e={};t.users.forEach(function(t){e[t.userType]=e[t.userType]||{userType:t.userType,users:[]},e[t.userType].users.push(t.user)}),t.users=Object.values(e),t.all_occured_states=Array.from(t.all_occured_states),t.activatedStates=t.all_occured_states.filter(function(t){if(o.test(t))return t})}},{key:"enterSegment",value:function(t){var e=t.start.getInputStream().strdata.slice(t.start.start,t.stop.stop+1);e=e.replace(/[ \t\r\n]+/g," "),this._segment_block={segmentText:e,initialState:"",terminateState:"terminate",users:[],states:[],all_occured_states:new Set,state_transition_table:[],activatedStates:[]}}},{key:"exitSegment",value:function(t){var e=this._segment_block;this.formatSegmentBlock(),e.activatedStates.length||(this.errorMsg="missing activated states"),this.policy_segments.push(e),delete this._segment_block,delete this._events,delete this._current_state}},{key:"enterUsers",value:function(t){var e=this._segment_block,n=t.getText(),r=/^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/.test(n),i=/^1[34578]\d{9}$/.test(n),o=/self/.test(n.toLowerCase());r||i||o?e.users.push({userType:"individual",user:n}):e.users.push({userType:"group",user:n})}},{key:"enterCurrent_state_clause",value:function(t){var e=this._segment_block,n=t.ID().getText();this._current_state=n,e.states.push(n),e.all_occured_states.add(n)}},{key:"enterInitial_state_clause",value:function(t){var e=this._segment_block,n=t.children[1].getText();e.initialState=n,this._current_state=n,e.states.push(n),e.all_occured_states.add(n)}},{key:"enterTarget_clause",value:function(t){var e=this._segment_block;"terminate"!==t.getText().toLowerCase()&&(t.next_state=t.ID().getText(),e.all_occured_states.add(t.next_state)),this._events=[]}},{key:"exitTarget_clause",value:function(t){var e=this._segment_block,n={currentState:this._current_state,nextState:t.next_state};this._events.length>1?n.event={type:"compoundEvents",params:this._events}:n.event=this._events[0],e.state_transition_table.push(n)}},{key:"enterPeriod_event",value:function(t){var e=t.TIMEUNIT().getText();this._events.push({type:"period",params:[e],eventName:["period",e,"event"].join("_")})}},{key:"enterSpecific_date_event",value:function(t){var e=t.DATE().getText(),n=t.HOUR().getText();this._events.push({type:"arrivalDate",params:[1,e+" "+n],eventName:["arrivalDate_1",e,"event"].join("_")})}},{key:"enterRelative_date_event",value:function(t){var e=Number(t.INTEGER_NUMBER().getText()),n=t.TIMEUNIT().getText();n=n.replace(/s$/,""),this._events.push({type:"arrivalDate",params:[0,e,n],eventName:["arrivalDate_0",e,n,"event"].join("_")})}},{key:"enterPricing_agreement_event",value:function(t){this._events.push({type:"pricingAgreement",params:[],eventName:"pricingAgreement"})}},{key:"enterTransaction_event",value:function(t){var e=Number(t.INTEGER_NUMBER().getText()),n=t.FEATHERACCOUNT().getText();this._events.push({type:"transaction",params:[n,e],eventName:["transaction",n,e,"event"].join("_")})}},{key:"enterSigning_event",value:function(t){var e=t.license_resource_id().map(function(t){return t.getText()});this._events.push({type:"signing",params:e,eventName:"signing_"+e.join("_")})}},{key:"enterContract_guaranty",value:function(t){var e=t.INTEGER_NUMBER()[0].getText(),n=t.INTEGER_NUMBER()[1].getText();this._events.push({type:"contractGuaranty",params:[e,n,"day"],eventName:["contractGuaranty",e,n,"event"].join("_")})}},{key:"enterPlatform_guaranty",value:function(t){this._events.push({type:"platformGuaranty",params:[Number(t.INTEGER_NUMBER().getText())],eventName:"platformGuaranty"})}},{key:"enterSettlement_event",value:function(t){this._events.push({type:"accountSettled",params:[]})}},{key:"enterVisit_increment_event",value:function(t){this._events.push({type:"accessCountIncrement",params:[Number(t.INTEGER_NUMBER().getText())]})}},{key:"enterVisit_event",value:function(t){this._events.push({type:"accessCount",params:[Number(t.INTEGER_NUMBER().getText())]})}},{key:"enterBalance_greater",value:function(t){this._events.push({type:"balance_greater_event",params:t.INTEGER_NUMBER().getText()})}},{key:"enterBalance_smaller",value:function(t){this._events.push({type:"balance_smaller_event",params:t.INTEGER_NUMBER().getText()})}}]),e}();t.exports=a},"7JQk":function(t,e,n){function r(){return i.tree.ParseTreeListener.call(this),this}var i=n("9C8F");(r.prototype=Object.create(i.tree.ParseTreeListener.prototype)).constructor=r,r.prototype.enterPolicy=function(t){},r.prototype.exitPolicy=function(t){},r.prototype.enterSegment=function(t){},r.prototype.exitSegment=function(t){},r.prototype.enterAudience_clause=function(t){},r.prototype.exitAudience_clause=function(t){},r.prototype.enterState_clause=function(t){},r.prototype.exitState_clause=function(t){},r.prototype.enterInitial_state_clause=function(t){},r.prototype.exitInitial_state_clause=function(t){},r.prototype.enterCurrent_state_clause=function(t){},r.prototype.exitCurrent_state_clause=function(t){},r.prototype.enterTarget_clause=function(t){},r.prototype.exitTarget_clause=function(t){},r.prototype.enterEvent=function(t){},r.prototype.exitEvent=function(t){},r.prototype.enterAnd_event=function(t){},r.prototype.exitAnd_event=function(t){},r.prototype.enterPeriod_event=function(t){},r.prototype.exitPeriod_event=function(t){},r.prototype.enterSpecific_date_event=function(t){},r.prototype.exitSpecific_date_event=function(t){},r.prototype.enterRelative_date_event=function(t){},r.prototype.exitRelative_date_event=function(t){},r.prototype.enterPricing_agreement_event=function(t){},r.prototype.exitPricing_agreement_event=function(t){},r.prototype.enterTransaction_event=function(t){},r.prototype.exitTransaction_event=function(t){},r.prototype.enterGuaranty_event=function(t){},r.prototype.exitGuaranty_event=function(t){},r.prototype.enterContract_guaranty=function(t){},r.prototype.exitContract_guaranty=function(t){},r.prototype.enterPlatform_guaranty=function(t){},r.prototype.exitPlatform_guaranty=function(t){},r.prototype.enterSigning_event=function(t){},r.prototype.exitSigning_event=function(t){},r.prototype.enterAccess_count_event=function(t){},r.prototype.exitAccess_count_event=function(t){},r.prototype.enterVisit_increment_event=function(t){},r.prototype.exitVisit_increment_event=function(t){},r.prototype.enterVisit_event=function(t){},r.prototype.exitVisit_event=function(t){},r.prototype.enterBalance_event=function(t){},r.prototype.exitBalance_event=function(t){},r.prototype.enterBalance_greater=function(t){},r.prototype.exitBalance_greater=function(t){},r.prototype.enterBalance_smaller=function(t){},r.prototype.exitBalance_smaller=function(t){},r.prototype.enterSettlement_event=function(t){},r.prototype.exitSettlement_event=function(t){},r.prototype.enterLicense_resource_id=function(t){},r.prototype.exitLicense_resource_id=function(t){},r.prototype.enterUsers=function(t){},r.prototype.exitUsers=function(t){},e.presentablePolicyListener=r},"7y1Z":function(t,e,n){function r(t,e){return this.grammarType=t,this.maxTokenType=e,this.states=[],this.decisionToState=[],this.ruleToStartState=[],this.ruleToStopState=null,this.modeNameToStartState={},this.ruleToTokenType=null,this.lexerActions=null,this.modeToStartState=[],this}var i=n("RuwF").LL1Analyzer,o=n("T+Yw").IntervalSet;r.prototype.nextTokensInContext=function(t,e){return new i(this).LOOK(t,null,e)},r.prototype.nextTokensNoContext=function(t){return null!==t.nextTokenWithinRule?t.nextTokenWithinRule:(t.nextTokenWithinRule=this.nextTokensInContext(t,null),t.nextTokenWithinRule.readOnly=!0,t.nextTokenWithinRule)},r.prototype.nextTokens=function(t,e){return void 0===e?this.nextTokensNoContext(t):this.nextTokensInContext(t,e)},r.prototype.addState=function(t){null!==t&&(t.atn=this,t.stateNumber=this.states.length),this.states.push(t)},r.prototype.removeState=function(t){this.states[t.stateNumber]=null},r.prototype.defineDecisionState=function(t){return this.decisionToState.push(t),t.decision=this.decisionToState.length-1,t.decision},r.prototype.getDecisionState=function(t){return 0===this.decisionToState.length?null:this.decisionToState[t]};var a=n("j/5l").Token;r.prototype.getExpectedTokens=function(t,e){if(t<0||t>=this.states.length)throw"Invalid state number.";var n=this.states[t],r=this.nextTokens(n);if(!r.contains(a.EPSILON))return r;var i=new o;for(i.addSet(r),i.removeOne(a.EPSILON);null!==e&&e.invokingState>=0&&r.contains(a.EPSILON);){var s=this.states[e.invokingState].transitions[0];r=this.nextTokens(s.followState),i.addSet(r),i.removeOne(a.EPSILON),e=e.parentCtx}return r.contains(a.EPSILON)&&i.addOne(a.EOF),i},r.INVALID_ALT_NUMBER=0,e.ATN=r},"8Teg":function(t,e){function n(){}n.LEXER=0,n.PARSER=1,e.ATNType=n},"9C8F":function(t,e,n){e.atn=n("pHgc"),e.codepointat=n("13lD"),e.dfa=n("CF8A"),e.fromcodepoint=n("pr/i"),e.tree=n("CLgU"),e.error=n("y2Ps"),e.Token=n("j/5l").Token,e.CharStreams=n("HNBV").CharStreams,e.CommonToken=n("j/5l").CommonToken,e.InputStream=n("4iSB").InputStream,e.FileStream=n("wf8X").FileStream,e.CommonTokenStream=n("Fzuw").CommonTokenStream,e.Lexer=n("h0lj").Lexer,e.Parser=n("VgzD").Parser;var r=n("YFoD");e.PredictionContextCache=r.PredictionContextCache,e.ParserRuleContext=n("EesY").ParserRuleContext,e.Interval=n("T+Yw").Interval,e.Utils=n("bz+k")},AqiS:function(t,e,n){},Ayu9:function(t,e,n){},B0bK:function(t,e,n){function r(t){return o.call(this),t=t||!0,this.exactOnly=t,this}var i=n("bz+k").BitSet,o=n("qFmK").ErrorListener,a=n("T+Yw").Interval;(r.prototype=Object.create(o.prototype)).constructor=r,r.prototype.reportAmbiguity=function(t,e,n,r,i,o,s){if(!this.exactOnly||i){var u="reportAmbiguity d="+this.getDecisionDescription(t,e)+": ambigAlts="+this.getConflictingAlts(o,s)+", input='"+t.getTokenStream().getText(new a(n,r))+"'";t.notifyErrorListeners(u)}},r.prototype.reportAttemptingFullContext=function(t,e,n,r,i,o){var s="reportAttemptingFullContext d="+this.getDecisionDescription(t,e)+", input='"+t.getTokenStream().getText(new a(n,r))+"'";t.notifyErrorListeners(s)},r.prototype.reportContextSensitivity=function(t,e,n,r,i,o){var s="reportContextSensitivity d="+this.getDecisionDescription(t,e)+", input='"+t.getTokenStream().getText(new a(n,r))+"'";t.notifyErrorListeners(s)},r.prototype.getDecisionDescription=function(t,e){var n=e.decision,r=e.atnStartState.ruleIndex,i=t.ruleNames;if(r<0||r>=i.length)return""+n;var o=i[r]||null;return null===o||0===o.length?""+n:n+" ("+o+")"},r.prototype.getConflictingAlts=function(t,e){if(null!==t)return t;for(var n=new i,r=0;r<e.items.length;r++)n.add(e.items[r].alt);return"{"+n.values().join(", ")+"}"},e.DiagnosticErrorListener=r},CF8A:function(t,e,n){e.DFA=n("VIKC").DFA,e.DFASerializer=n("hL6x").DFASerializer,e.LexerDFASerializer=n("hL6x").LexerDFASerializer,e.PredPrediction=n("IUCG").PredPrediction},CLgU:function(t,e,n){var r=n("VnEu");e.Trees=n("WmJ1").Trees,e.RuleNode=r.RuleNode,e.ParseTreeListener=r.ParseTreeListener,e.ParseTreeVisitor=r.ParseTreeVisitor,e.ParseTreeWalker=r.ParseTreeWalker},"DHN+":function(t,e,n){},Dxx8:function(t,e,n){function r(t){return k.Parser.call(this,t),this._interp=new k.atn.ParserATNSimulator(this,O,P,D),this.ruleNames=H,this.literalNames=U,this.symbolicNames=F,this}function i(t,e,n){return void 0===e&&(e=null),void 0!==n&&null!==n||(n=-1),k.ParserRuleContext.call(this,e,n),this.parser=t,this.ruleIndex=r.RULE_policy,this}function o(t,e,n){return void 0===e&&(e=null),void 0!==n&&null!==n||(n=-1),k.ParserRuleContext.call(this,e,n),this.parser=t,this.ruleIndex=r.RULE_segment,this}function a(t,e,n){return void 0===e&&(e=null),void 0!==n&&null!==n||(n=-1),k.ParserRuleContext.call(this,e,n),this.parser=t,this.ruleIndex=r.RULE_audience_clause,this}function s(t,e,n){return void 0===e&&(e=null),void 0!==n&&null!==n||(n=-1),k.ParserRuleContext.call(this,e,n),this.parser=t,this.ruleIndex=r.RULE_state_clause,this}function u(t,e,n){return void 0===e&&(e=null),void 0!==n&&null!==n||(n=-1),k.ParserRuleContext.call(this,e,n),this.parser=t,this.ruleIndex=r.RULE_initial_state_clause,this}function c(t,e,n){return void 0===e&&(e=null),void 0!==n&&null!==n||(n=-1),k.ParserRuleContext.call(this,e,n),this.parser=t,this.ruleIndex=r.RULE_current_state_clause,this}function l(t,e,n){return void 0===e&&(e=null),void 0!==n&&null!==n||(n=-1),k.ParserRuleContext.call(this,e,n),this.parser=t,this.ruleIndex=r.RULE_target_clause,this}function h(t,e,n){return void 0===e&&(e=null),void 0!==n&&null!==n||(n=-1),k.ParserRuleContext.call(this,e,n),this.parser=t,this.ruleIndex=r.RULE_event,this}function p(t,e,n){return void 0===e&&(e=null),void 0!==n&&null!==n||(n=-1),k.ParserRuleContext.call(this,e,n),this.parser=t,this.ruleIndex=r.RULE_and_event,this}function f(t,e,n){return void 0===e&&(e=null),void 0!==n&&null!==n||(n=-1),k.ParserRuleContext.call(this,e,n),this.parser=t,this.ruleIndex=r.RULE_period_event,this}function d(t,e,n){return void 0===e&&(e=null),void 0!==n&&null!==n||(n=-1),k.ParserRuleContext.call(this,e,n),this.parser=t,this.ruleIndex=r.RULE_specific_date_event,this}function g(t,e,n){return void 0===e&&(e=null),void 0!==n&&null!==n||(n=-1),k.ParserRuleContext.call(this,e,n),this.parser=t,this.ruleIndex=r.RULE_relative_date_event,this}function v(t,e,n){return void 0===e&&(e=null),void 0!==n&&null!==n||(n=-1),k.ParserRuleContext.call(this,e,n),this.parser=t,this.ruleIndex=r.RULE_pricing_agreement_event,this}function y(t,e,n){return void 0===e&&(e=null),void 0!==n&&null!==n||(n=-1),k.ParserRuleContext.call(this,e,n),this.parser=t,this.ruleIndex=r.RULE_transaction_event,this}function _(t,e,n){return void 0===e&&(e=null),void 0!==n&&null!==n||(n=-1),k.ParserRuleContext.call(this,e,n),this.parser=t,this.ruleIndex=r.RULE_guaranty_event,this}function m(t,e,n){return void 0===e&&(e=null),void 0!==n&&null!==n||(n=-1),k.ParserRuleContext.call(this,e,n),this.parser=t,this.ruleIndex=r.RULE_contract_guaranty,this}function x(t,e,n){return void 0===e&&(e=null),void 0!==n&&null!==n||(n=-1),k.ParserRuleContext.call(this,e,n),this.parser=t,this.ruleIndex=r.RULE_platform_guaranty,this}function T(t,e,n){return void 0===e&&(e=null),void 0!==n&&null!==n||(n=-1),k.ParserRuleContext.call(this,e,n),this.parser=t,this.ruleIndex=r.RULE_signing_event,this}function E(t,e,n){return void 0===e&&(e=null),void 0!==n&&null!==n||(n=-1),k.ParserRuleContext.call(this,e,n),this.parser=t,this.ruleIndex=r.RULE_access_count_event,this}function S(t,e,n){return void 0===e&&(e=null),void 0!==n&&null!==n||(n=-1),k.ParserRuleContext.call(this,e,n),this.parser=t,this.ruleIndex=r.RULE_visit_increment_event,this}function C(t,e,n){return void 0===e&&(e=null),void 0!==n&&null!==n||(n=-1),k.ParserRuleContext.call(this,e,n),this.parser=t,this.ruleIndex=r.RULE_visit_event,this}function b(t,e,n){return void 0===e&&(e=null),void 0!==n&&null!==n||(n=-1),k.ParserRuleContext.call(this,e,n),this.parser=t,this.ruleIndex=r.RULE_balance_event,this}function A(t,e,n){return void 0===e&&(e=null),void 0!==n&&null!==n||(n=-1),k.ParserRuleContext.call(this,e,n),this.parser=t,this.ruleIndex=r.RULE_balance_greater,this}function w(t,e,n){return void 0===e&&(e=null),void 0!==n&&null!==n||(n=-1),k.ParserRuleContext.call(this,e,n),this.parser=t,this.ruleIndex=r.RULE_balance_smaller,this}function R(t,e,n){return void 0===e&&(e=null),void 0!==n&&null!==n||(n=-1),k.ParserRuleContext.call(this,e,n),this.parser=t,this.ruleIndex=r.RULE_settlement_event,this}function N(t,e,n){return void 0===e&&(e=null),void 0!==n&&null!==n||(n=-1),k.ParserRuleContext.call(this,e,n),this.parser=t,this.ruleIndex=r.RULE_license_resource_id,this}function I(t,e,n){return void 0===e&&(e=null),void 0!==n&&null!==n||(n=-1),k.ParserRuleContext.call(this,e,n),this.parser=t,this.ruleIndex=r.RULE_users,this}var k=n("9C8F"),M=n("7JQk").presentablePolicyListener,L=["悋Ꜫ脳맭䅼㯧瞆奤","-Ö\t\t\t","\t\t\t","\b\t\b\t\t\t\n\t\n\v\t\v\f\t\f","\r\t\r\t\t\t","\t\t\t\t","\t\t\t","\t\t\t\t","\t:\n\f","=\v","C\n\rD","I\n\fL\v","T","\n\fW\v","[\n\r\\","a\n\rbe\n\f","h\v","\b\b","\b\b\bv\n\b\f\b\by\v\b\b\b|\n\b","\t\t\t\t\t\t\t\t\t","\t\t\t\t\t\t\t\t\n\t","\n\n\n\v\v\v\f","\f\f\f\r\r\r\r\r","","¨\n","","","·\n\fº\v","¾\n","","È\n","","","\b\n\f",' "$&(*,.0246'," #$Ð;@","M\bX\ni","\fm{","","",""," §",' ©"¯',"$²&½","(¿*Â,Ç",".É0Ì","2Ï4Ñ","6Ó8:","98:=;9",";<<>=;",">??","@BACBA","CDDBDE","EFFJGI","\bHGILJ","HJKK","LJMN\bNO","6OUPQ\fQR","RTSP","TWUSUV","VWUXZ","\nY[\bZY[\\","\\Z\\]","]f^`\f_a\b","`_abb`","bcced^","ehfdfg","g\thf","ijjk\tkl","l\vmnno",'"opp\r','qr\brs"sw\tt',"v\nutvy","wuwxx|","ywz|!{q","{z|","}~\t~\v","\f\r","\t","\t","\t","$\t&","\t,","2}","","","","","","\n\t","\v","","\f)","'","\r(","",""," ¡¡¢(","¢££¤%","¤¥¨ ",'¦¨"§¥',"§¦¨","©ªª«(","«¬¬­(","­®®!","¯°°±(","±#²³","³¸4´µ","µ·4¶´","·º¸¶","¸¹¹%","º¸»¾(","¼¾*½»","½¼¾'","¿ÀÀÁ(","Á)ÂÃ","ÃÄ(Ä+","ÅÈ.ÆÈ0","ÇÅÇÆ","È-ÉÊ","ÊË(Ë/Ì","ÍÍÎ(Î","1ÏÐÐ","3ÑÒ*Ò5","ÓÔ\tÔ7",";DJU\\bfw{§¸½Ç"].join(""),O=(new k.atn.ATNDeserializer).deserialize(L),P=O.decisionToState.map(function(t,e){return new k.dfa.DFA(t,e)}),D=new k.PredictionContextCache,U=[null,"':'","','","'in'","'initial'","'<initial>'","'proceed to'","'on'","'and'","'end of'","'at'","'after'","'of contract creation'","'price priceExpression'","'receiving transaction of'","'to'","'contract_guaranty of'","'refund after'","'receiving platform_guaranty of'","'accepting license'","'visit_increment of'","'visit of'","'account_balance greater than'","'account_balance smaller than'","'account_settled'"],F=[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"TIMEUNIT","FOR","SELF","GROUPUSER","REGISTERED_USERS","PUBLIC","TERMINATE","ID","MOBILEPHONE","EMAIL","FEATHERACCOUNT","TWO_DIGITS","HOUR","INTEGER_NUMBER","DATE","ALPHANUMERIC","NIGHT_DIGITS","FOUR_DIGITS","WS"],H=["policy","segment","audience_clause","state_clause","initial_state_clause","current_state_clause","target_clause","event","and_event","period_event","specific_date_event","relative_date_event","pricing_agreement_event","transaction_event","guaranty_event","contract_guaranty","platform_guaranty","signing_event","access_count_event","visit_increment_event","visit_event","balance_event","balance_greater","balance_smaller","settlement_event","license_resource_id","users"];(r.prototype=Object.create(k.Parser.prototype)).constructor=r,Object.defineProperty(r.prototype,"atn",{get:function(){return O}}),r.EOF=k.Token.EOF,r.T__0=1,r.T__1=2,r.T__2=3,r.T__3=4,r.T__4=5,r.T__5=6,r.T__6=7,r.T__7=8,r.T__8=9,r.T__9=10,r.T__10=11,r.T__11=12,r.T__12=13,r.T__13=14,r.T__14=15,r.T__15=16,r.T__16=17,r.T__17=18,r.T__18=19,r.T__19=20,r.T__20=21,r.T__21=22,r.T__22=23,r.T__23=24,r.TIMEUNIT=25,r.FOR=26,r.SELF=27,r.GROUPUSER=28,r.REGISTERED_USERS=29,r.PUBLIC=30,r.TERMINATE=31,r.ID=32,r.MOBILEPHONE=33,r.EMAIL=34,r.FEATHERACCOUNT=35,r.TWO_DIGITS=36,r.HOUR=37,r.INTEGER_NUMBER=38,r.DATE=39,r.ALPHANUMERIC=40,r.NIGHT_DIGITS=41,r.FOUR_DIGITS=42,r.WS=43,r.RULE_policy=0,r.RULE_segment=1,r.RULE_audience_clause=2,r.RULE_state_clause=3,r.RULE_initial_state_clause=4,r.RULE_current_state_clause=5,r.RULE_target_clause=6,r.RULE_event=7,r.RULE_and_event=8,r.RULE_period_event=9,r.RULE_specific_date_event=10,r.RULE_relative_date_event=11,r.RULE_pricing_agreement_event=12,r.RULE_transaction_event=13,r.RULE_guaranty_event=14,r.RULE_contract_guaranty=15,r.RULE_platform_guaranty=16,r.RULE_signing_event=17,r.RULE_access_count_event=18,r.RULE_visit_increment_event=19,r.RULE_visit_event=20,r.RULE_balance_event=21,r.RULE_balance_greater=22,r.RULE_balance_smaller=23,r.RULE_settlement_event=24,r.RULE_license_resource_id=25,r.RULE_users=26,(i.prototype=Object.create(k.ParserRuleContext.prototype)).constructor=i,i.prototype.EOF=function(){return this.getToken(r.EOF,0)},i.prototype.segment=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(o):this.getTypedRuleContext(o,t)},i.prototype.enterRule=function(t){t instanceof M&&t.enterPolicy(this)},i.prototype.exitRule=function(t){t instanceof M&&t.exitPolicy(this)},r.PolicyContext=i,r.prototype.policy=function(){var t=new i(this,this._ctx,this.state);this.enterRule(t,0,r.RULE_policy);var e=0;try{for(this.enterOuterAlt(t,1),this.state=57,this._errHandler.sync(this),e=this._input.LA(1);e===r.FOR;)this.state=54,this.segment(),this.state=59,this._errHandler.sync(this),e=this._input.LA(1);this.state=60,this.match(r.EOF)}catch(e){if(!(e instanceof k.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t},(o.prototype=Object.create(k.ParserRuleContext.prototype)).constructor=o,o.prototype.FOR=function(){return this.getToken(r.FOR,0)},o.prototype.audience_clause=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(a):this.getTypedRuleContext(a,t)},o.prototype.state_clause=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(s):this.getTypedRuleContext(s,t)},o.prototype.enterRule=function(t){t instanceof M&&t.enterSegment(this)},o.prototype.exitRule=function(t){t instanceof M&&t.exitSegment(this)},r.SegmentContext=o,r.prototype.segment=function(){var t=new o(this,this._ctx,this.state);this.enterRule(t,2,r.RULE_segment);var e=0;try{this.enterOuterAlt(t,1),this.state=62,this.match(r.FOR),this.state=64,this._errHandler.sync(this),e=this._input.LA(1);do{this.state=63,this.audience_clause(0),this.state=66,this._errHandler.sync(this),e=this._input.LA(1)}while(0==(e-27&-32)&&0!=(1<<e-27&(1<<r.SELF-27|1<<r.GROUPUSER-27|1<<r.REGISTERED_USERS-27|1<<r.PUBLIC-27|1<<r.MOBILEPHONE-27|1<<r.EMAIL-27)));for(this.state=68,this.match(r.T__0),this.state=72,this._errHandler.sync(this),e=this._input.LA(1);e===r.T__2;)this.state=69,this.state_clause(),this.state=74,this._errHandler.sync(this),e=this._input.LA(1)}catch(e){if(!(e instanceof k.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t},(a.prototype=Object.create(k.ParserRuleContext.prototype)).constructor=a,a.prototype.users=function(){return this.getTypedRuleContext(I,0)},a.prototype.audience_clause=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(a):this.getTypedRuleContext(a,t)},a.prototype.enterRule=function(t){t instanceof M&&t.enterAudience_clause(this)},a.prototype.exitRule=function(t){t instanceof M&&t.exitAudience_clause(this)},r.prototype.audience_clause=function(t){void 0===t&&(t=0);var e=this._ctx,n=this.state,i=new a(this,this._ctx,n);this.enterRecursionRule(i,4,r.RULE_audience_clause,t);try{this.enterOuterAlt(i,1),this.state=76,this.users(),this._ctx.stop=this._input.LT(-1),this.state=83,this._errHandler.sync(this);for(var o=this._interp.adaptivePredict(this._input,3,this._ctx);2!=o&&o!=k.atn.ATN.INVALID_ALT_NUMBER;){if(1===o){if(null!==this._parseListeners&&this.triggerExitRuleEvent(),i,i=new a(this,e,n),this.pushNewRecursionContext(i,4,r.RULE_audience_clause),this.state=78,!this.precpred(this._ctx,1))throw new k.error.FailedPredicateException(this,"this.precpred(this._ctx, 1)");this.state=79,this.match(r.T__1),this.state=80,this.audience_clause(2)}this.state=85,this._errHandler.sync(this),o=this._interp.adaptivePredict(this._input,3,this._ctx)}}catch(t){if(!(t instanceof k.error.RecognitionException))throw t;i.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.unrollRecursionContexts(e)}return i},(s.prototype=Object.create(k.ParserRuleContext.prototype)).constructor=s,s.prototype.initial_state_clause=function(){return this.getTypedRuleContext(u,0)},s.prototype.target_clause=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(l):this.getTypedRuleContext(l,t)},s.prototype.current_state_clause=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(c):this.getTypedRuleContext(c,t)},s.prototype.enterRule=function(t){t instanceof M&&t.enterState_clause(this)},s.prototype.exitRule=function(t){t instanceof M&&t.exitState_clause(this)},r.State_clauseContext=s,r.prototype.state_clause=function(){var t=new s(this,this._ctx,this.state);this.enterRule(t,6,r.RULE_state_clause);var e=0;try{this.enterOuterAlt(t,1),this.state=86,this.initial_state_clause(),this.state=88,this._errHandler.sync(this),e=this._input.LA(1);do{this.state=87,this.target_clause(),this.state=90,this._errHandler.sync(this),e=this._input.LA(1)}while(e===r.T__5||e===r.TERMINATE);this.state=100,this._errHandler.sync(this);for(var n=this._interp.adaptivePredict(this._input,6,this._ctx);2!=n&&n!=k.atn.ATN.INVALID_ALT_NUMBER;){if(1===n){this.state=92,this.current_state_clause(),this.state=94,this._errHandler.sync(this),e=this._input.LA(1);do{this.state=93,this.target_clause(),this.state=96,this._errHandler.sync(this),e=this._input.LA(1)}while(e===r.T__5||e===r.TERMINATE)}this.state=102,this._errHandler.sync(this),n=this._interp.adaptivePredict(this._input,6,this._ctx)}}catch(e){if(!(e instanceof k.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t},(u.prototype=Object.create(k.ParserRuleContext.prototype)).constructor=u,u.prototype.enterRule=function(t){t instanceof M&&t.enterInitial_state_clause(this)},u.prototype.exitRule=function(t){t instanceof M&&t.exitInitial_state_clause(this)},r.Initial_state_clauseContext=u,r.prototype.initial_state_clause=function(){var t=new u(this,this._ctx,this.state);this.enterRule(t,8,r.RULE_initial_state_clause);var e=0;try{this.enterOuterAlt(t,1),this.state=103,this.match(r.T__2),this.state=104,(e=this._input.LA(1))!==r.T__3&&e!==r.T__4?this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=105,this.match(r.T__0)}catch(e){if(!(e instanceof k.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t},(c.prototype=Object.create(k.ParserRuleContext.prototype)).constructor=c,c.prototype.ID=function(){return this.getToken(r.ID,0)},c.prototype.enterRule=function(t){t instanceof M&&t.enterCurrent_state_clause(this)},c.prototype.exitRule=function(t){t instanceof M&&t.exitCurrent_state_clause(this)},r.Current_state_clauseContext=c,r.prototype.current_state_clause=function(){var t=new c(this,this._ctx,this.state);this.enterRule(t,10,r.RULE_current_state_clause);try{this.enterOuterAlt(t,1),this.state=107,this.match(r.T__2),this.state=108,this.match(r.ID),this.state=109,this.match(r.T__0)}catch(e){if(!(e instanceof k.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t},(l.prototype=Object.create(k.ParserRuleContext.prototype)).constructor=l,l.prototype.ID=function(){return this.getToken(r.ID,0)},l.prototype.event=function(){return this.getTypedRuleContext(h,0)},l.prototype.and_event=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(p):this.getTypedRuleContext(p,t)},l.prototype.TERMINATE=function(){return this.getToken(r.TERMINATE,0)},l.prototype.enterRule=function(t){t instanceof M&&t.enterTarget_clause(this)},l.prototype.exitRule=function(t){t instanceof M&&t.exitTarget_clause(this)},r.Target_clauseContext=l,r.prototype.target_clause=function(){var t=new l(this,this._ctx,this.state);this.enterRule(t,12,r.RULE_target_clause);var e=0;try{switch(this.state=121,this._errHandler.sync(this),this._input.LA(1)){case r.T__5:for(this.enterOuterAlt(t,1),this.state=111,this.match(r.T__5),this.state=112,this.match(r.ID),this.state=113,this.event(),this.state=117,this._errHandler.sync(this),e=this._input.LA(1);e===r.T__7;)this.state=114,this.and_event(),this.state=119,this._errHandler.sync(this),e=this._input.LA(1);break;case r.TERMINATE:this.enterOuterAlt(t,2),this.state=120,this.match(r.TERMINATE);break;default:throw new k.error.NoViableAltException(this)}}catch(e){if(!(e instanceof k.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t},(h.prototype=Object.create(k.ParserRuleContext.prototype)).constructor=h,h.prototype.period_event=function(){return this.getTypedRuleContext(f,0)},h.prototype.specific_date_event=function(){return this.getTypedRuleContext(d,0)},h.prototype.relative_date_event=function(){return this.getTypedRuleContext(g,0)},h.prototype.pricing_agreement_event=function(){return this.getTypedRuleContext(v,0)},h.prototype.transaction_event=function(){return this.getTypedRuleContext(y,0)},h.prototype.guaranty_event=function(){return this.getTypedRuleContext(_,0)},h.prototype.signing_event=function(){return this.getTypedRuleContext(T,0)},h.prototype.access_count_event=function(){return this.getTypedRuleContext(E,0)},h.prototype.balance_event=function(){return this.getTypedRuleContext(b,0)},h.prototype.settlement_event=function(){return this.getTypedRuleContext(R,0)},h.prototype.enterRule=function(t){t instanceof M&&t.enterEvent(this)},h.prototype.exitRule=function(t){t instanceof M&&t.exitEvent(this)},r.EventContext=h,r.prototype.event=function(){var t=new h(this,this._ctx,this.state);this.enterRule(t,14,r.RULE_event);try{this.state=139,this._errHandler.sync(this);switch(this._interp.adaptivePredict(this._input,9,this._ctx)){case 1:this.enterOuterAlt(t,1),this.state=123,this.match(r.T__6),this.state=124,this.period_event();break;case 2:this.enterOuterAlt(t,2),this.state=125,this.specific_date_event();break;case 3:this.enterOuterAlt(t,3),this.state=126,this.relative_date_event();break;case 4:this.enterOuterAlt(t,4),this.state=127,this.pricing_agreement_event();break;case 5:this.enterOuterAlt(t,5),this.state=128,this.match(r.T__6),this.state=129,this.transaction_event();break;case 6:this.enterOuterAlt(t,6),this.state=130,this.match(r.T__6),this.state=131,this.guaranty_event();break;case 7:this.enterOuterAlt(t,7),this.state=132,this.match(r.T__6),this.state=133,this.signing_event();break;case 8:this.enterOuterAlt(t,8),this.state=134,this.match(r.T__6),this.state=135,this.access_count_event();break;case 9:this.enterOuterAlt(t,9),this.state=136,this.match(r.T__6),this.state=137,this.balance_event();break;case 10:this.enterOuterAlt(t,10),this.state=138,this.settlement_event()}}catch(e){if(!(e instanceof k.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t},(p.prototype=Object.create(k.ParserRuleContext.prototype)).constructor=p,p.prototype.event=function(){return this.getTypedRuleContext(h,0)},p.prototype.enterRule=function(t){t instanceof M&&t.enterAnd_event(this)},p.prototype.exitRule=function(t){t instanceof M&&t.exitAnd_event(this)},r.And_eventContext=p,r.prototype.and_event=function(){var t=new p(this,this._ctx,this.state);this.enterRule(t,16,r.RULE_and_event);try{this.enterOuterAlt(t,1),this.state=141,this.match(r.T__7),this.state=142,this.event()}catch(e){if(!(e instanceof k.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t},(f.prototype=Object.create(k.ParserRuleContext.prototype)).constructor=f,f.prototype.TIMEUNIT=function(){return this.getToken(r.TIMEUNIT,0)},f.prototype.enterRule=function(t){t instanceof M&&t.enterPeriod_event(this)},f.prototype.exitRule=function(t){t instanceof M&&t.exitPeriod_event(this)},r.Period_eventContext=f,r.prototype.period_event=function(){var t=new f(this,this._ctx,this.state);this.enterRule(t,18,r.RULE_period_event);try{this.enterOuterAlt(t,1),this.state=144,this.match(r.T__8),this.state=145,this.match(r.TIMEUNIT)}catch(e){if(!(e instanceof k.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t},(d.prototype=Object.create(k.ParserRuleContext.prototype)).constructor=d,d.prototype.DATE=function(){return this.getToken(r.DATE,0)},d.prototype.HOUR=function(){return this.getToken(r.HOUR,0)},d.prototype.enterRule=function(t){t instanceof M&&t.enterSpecific_date_event(this)},d.prototype.exitRule=function(t){t instanceof M&&t.exitSpecific_date_event(this)},r.Specific_date_eventContext=d,r.prototype.specific_date_event=function(){var t=new d(this,this._ctx,this.state);this.enterRule(t,20,r.RULE_specific_date_event);try{this.enterOuterAlt(t,1),this.state=147,this.match(r.T__9),this.state=148,this.match(r.DATE),this.state=149,this.match(r.HOUR)}catch(e){if(!(e instanceof k.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t},(g.prototype=Object.create(k.ParserRuleContext.prototype)).constructor=g,g.prototype.INTEGER_NUMBER=function(){return this.getToken(r.INTEGER_NUMBER,0)},g.prototype.TIMEUNIT=function(){return this.getToken(r.TIMEUNIT,0)},g.prototype.enterRule=function(t){t instanceof M&&t.enterRelative_date_event(this)},g.prototype.exitRule=function(t){t instanceof M&&t.exitRelative_date_event(this)},r.Relative_date_eventContext=g,r.prototype.relative_date_event=function(){var t=new g(this,this._ctx,this.state);this.enterRule(t,22,r.RULE_relative_date_event);try{this.enterOuterAlt(t,1),this.state=151,this.match(r.T__10),this.state=152,this.match(r.INTEGER_NUMBER),this.state=153,this.match(r.TIMEUNIT),this.state=154,this.match(r.T__11)}catch(e){if(!(e instanceof k.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t},(v.prototype=Object.create(k.ParserRuleContext.prototype)).constructor=v,v.prototype.enterRule=function(t){t instanceof M&&t.enterPricing_agreement_event(this)},v.prototype.exitRule=function(t){t instanceof M&&t.exitPricing_agreement_event(this)},r.Pricing_agreement_eventContext=v,r.prototype.pricing_agreement_event=function(){var t=new v(this,this._ctx,this.state);this.enterRule(t,24,r.RULE_pricing_agreement_event);try{this.enterOuterAlt(t,1),this.state=156,this.match(r.T__12)}catch(e){if(!(e instanceof k.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t},(y.prototype=Object.create(k.ParserRuleContext.prototype)).constructor=y,y.prototype.INTEGER_NUMBER=function(){return this.getToken(r.INTEGER_NUMBER,0)},y.prototype.FEATHERACCOUNT=function(){return this.getToken(r.FEATHERACCOUNT,0)},y.prototype.enterRule=function(t){t instanceof M&&t.enterTransaction_event(this)},y.prototype.exitRule=function(t){t instanceof M&&t.exitTransaction_event(this)},r.Transaction_eventContext=y,r.prototype.transaction_event=function(){var t=new y(this,this._ctx,this.state);this.enterRule(t,26,r.RULE_transaction_event);try{this.enterOuterAlt(t,1),this.state=158,this.match(r.T__13),this.state=159,this.match(r.INTEGER_NUMBER),this.state=160,this.match(r.T__14),this.state=161,this.match(r.FEATHERACCOUNT)}catch(e){if(!(e instanceof k.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t},(_.prototype=Object.create(k.ParserRuleContext.prototype)).constructor=_,_.prototype.contract_guaranty=function(){return this.getTypedRuleContext(m,0)},_.prototype.platform_guaranty=function(){return this.getTypedRuleContext(x,0)},_.prototype.enterRule=function(t){t instanceof M&&t.enterGuaranty_event(this)},_.prototype.exitRule=function(t){t instanceof M&&t.exitGuaranty_event(this)},r.Guaranty_eventContext=_,r.prototype.guaranty_event=function(){var t=new _(this,this._ctx,this.state);this.enterRule(t,28,r.RULE_guaranty_event);try{switch(this.state=165,this._errHandler.sync(this),this._input.LA(1)){case r.T__15:this.enterOuterAlt(t,1),this.state=163,this.contract_guaranty();break;case r.T__17:this.enterOuterAlt(t,2),this.state=164,this.platform_guaranty();break;default:throw new k.error.NoViableAltException(this)}}catch(e){if(!(e instanceof k.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t},(m.prototype=Object.create(k.ParserRuleContext.prototype)).constructor=m,m.prototype.INTEGER_NUMBER=function(t){return void 0===t&&(t=null),null===t?this.getTokens(r.INTEGER_NUMBER):this.getToken(r.INTEGER_NUMBER,t)},m.prototype.TIMEUNIT=function(){return this.getToken(r.TIMEUNIT,0)},m.prototype.enterRule=function(t){t instanceof M&&t.enterContract_guaranty(this)},m.prototype.exitRule=function(t){t instanceof M&&t.exitContract_guaranty(this)},r.Contract_guarantyContext=m,r.prototype.contract_guaranty=function(){var t=new m(this,this._ctx,this.state);this.enterRule(t,30,r.RULE_contract_guaranty);try{this.enterOuterAlt(t,1),this.state=167,this.match(r.T__15),this.state=168,this.match(r.INTEGER_NUMBER),this.state=169,this.match(r.T__16),this.state=170,this.match(r.INTEGER_NUMBER),this.state=171,this.match(r.TIMEUNIT)}catch(e){if(!(e instanceof k.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t},(x.prototype=Object.create(k.ParserRuleContext.prototype)).constructor=x,x.prototype.INTEGER_NUMBER=function(){return this.getToken(r.INTEGER_NUMBER,0)},x.prototype.enterRule=function(t){t instanceof M&&t.enterPlatform_guaranty(this)},x.prototype.exitRule=function(t){t instanceof M&&t.exitPlatform_guaranty(this)},r.Platform_guarantyContext=x,r.prototype.platform_guaranty=function(){var t=new x(this,this._ctx,this.state);this.enterRule(t,32,r.RULE_platform_guaranty);try{this.enterOuterAlt(t,1),this.state=173,this.match(r.T__17),this.state=174,this.match(r.INTEGER_NUMBER)}catch(e){if(!(e instanceof k.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t},(T.prototype=Object.create(k.ParserRuleContext.prototype)).constructor=T,T.prototype.license_resource_id=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(N):this.getTypedRuleContext(N,t)},T.prototype.enterRule=function(t){t instanceof M&&t.enterSigning_event(this)},T.prototype.exitRule=function(t){t instanceof M&&t.exitSigning_event(this)},r.Signing_eventContext=T,r.prototype.signing_event=function(){var t=new T(this,this._ctx,this.state);this.enterRule(t,34,r.RULE_signing_event);var e=0;try{for(this.enterOuterAlt(t,1),this.state=176,this.match(r.T__18),this.state=177,this.license_resource_id(),this.state=182,this._errHandler.sync(this),e=this._input.LA(1);e===r.T__1;)this.state=178,this.match(r.T__1),this.state=179,this.license_resource_id(),this.state=184,this._errHandler.sync(this),e=this._input.LA(1)}catch(e){if(!(e instanceof k.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t},(E.prototype=Object.create(k.ParserRuleContext.prototype)).constructor=E,E.prototype.visit_increment_event=function(){return this.getTypedRuleContext(S,0)},E.prototype.visit_event=function(){return this.getTypedRuleContext(C,0)},E.prototype.enterRule=function(t){t instanceof M&&t.enterAccess_count_event(this)},E.prototype.exitRule=function(t){t instanceof M&&t.exitAccess_count_event(this)},r.Access_count_eventContext=E,r.prototype.access_count_event=function(){var t=new E(this,this._ctx,this.state);this.enterRule(t,36,r.RULE_access_count_event);try{switch(this.state=187,this._errHandler.sync(this),this._input.LA(1)){case r.T__19:this.enterOuterAlt(t,1),this.state=185,this.visit_increment_event();break;case r.T__20:this.enterOuterAlt(t,2),this.state=186,this.visit_event();break;default:throw new k.error.NoViableAltException(this)}}catch(e){if(!(e instanceof k.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t},(S.prototype=Object.create(k.ParserRuleContext.prototype)).constructor=S,S.prototype.INTEGER_NUMBER=function(){return this.getToken(r.INTEGER_NUMBER,0)},S.prototype.enterRule=function(t){t instanceof M&&t.enterVisit_increment_event(this)},S.prototype.exitRule=function(t){t instanceof M&&t.exitVisit_increment_event(this)},r.Visit_increment_eventContext=S,r.prototype.visit_increment_event=function(){var t=new S(this,this._ctx,this.state);this.enterRule(t,38,r.RULE_visit_increment_event);try{this.enterOuterAlt(t,1),this.state=189,this.match(r.T__19),this.state=190,this.match(r.INTEGER_NUMBER)}catch(e){if(!(e instanceof k.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t},(C.prototype=Object.create(k.ParserRuleContext.prototype)).constructor=C,C.prototype.INTEGER_NUMBER=function(){return this.getToken(r.INTEGER_NUMBER,0)},C.prototype.enterRule=function(t){t instanceof M&&t.enterVisit_event(this)},C.prototype.exitRule=function(t){t instanceof M&&t.exitVisit_event(this)},r.Visit_eventContext=C,r.prototype.visit_event=function(){var t=new C(this,this._ctx,this.state);this.enterRule(t,40,r.RULE_visit_event);try{this.enterOuterAlt(t,1),this.state=192,this.match(r.T__20),this.state=193,this.match(r.INTEGER_NUMBER)}catch(e){if(!(e instanceof k.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t},(b.prototype=Object.create(k.ParserRuleContext.prototype)).constructor=b,b.prototype.balance_greater=function(){return this.getTypedRuleContext(A,0)},b.prototype.balance_smaller=function(){return this.getTypedRuleContext(w,0)},b.prototype.enterRule=function(t){t instanceof M&&t.enterBalance_event(this)},b.prototype.exitRule=function(t){t instanceof M&&t.exitBalance_event(this)},r.Balance_eventContext=b,r.prototype.balance_event=function(){var t=new b(this,this._ctx,this.state);this.enterRule(t,42,r.RULE_balance_event);try{switch(this.state=197,this._errHandler.sync(this),this._input.LA(1)){case r.T__21:this.enterOuterAlt(t,1),this.state=195,this.balance_greater();break;case r.T__22:this.enterOuterAlt(t,2),this.state=196,this.balance_smaller();break;default:throw new k.error.NoViableAltException(this)}}catch(e){if(!(e instanceof k.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t},(A.prototype=Object.create(k.ParserRuleContext.prototype)).constructor=A,A.prototype.INTEGER_NUMBER=function(){return this.getToken(r.INTEGER_NUMBER,0)},A.prototype.enterRule=function(t){t instanceof M&&t.enterBalance_greater(this)},A.prototype.exitRule=function(t){t instanceof M&&t.exitBalance_greater(this)},r.Balance_greaterContext=A,r.prototype.balance_greater=function(){var t=new A(this,this._ctx,this.state);this.enterRule(t,44,r.RULE_balance_greater);try{this.enterOuterAlt(t,1),this.state=199,this.match(r.T__21),this.state=200,this.match(r.INTEGER_NUMBER)}catch(e){if(!(e instanceof k.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t},(w.prototype=Object.create(k.ParserRuleContext.prototype)).constructor=w,w.prototype.INTEGER_NUMBER=function(){return this.getToken(r.INTEGER_NUMBER,0)},w.prototype.enterRule=function(t){t instanceof M&&t.enterBalance_smaller(this)},w.prototype.exitRule=function(t){t instanceof M&&t.exitBalance_smaller(this)},r.Balance_smallerContext=w,r.prototype.balance_smaller=function(){var t=new w(this,this._ctx,this.state);this.enterRule(t,46,r.RULE_balance_smaller);try{this.enterOuterAlt(t,1),this.state=202,this.match(r.T__22),this.state=203,this.match(r.INTEGER_NUMBER)}catch(e){if(!(e instanceof k.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t},(R.prototype=Object.create(k.ParserRuleContext.prototype)).constructor=R,R.prototype.enterRule=function(t){t instanceof M&&t.enterSettlement_event(this)},R.prototype.exitRule=function(t){t instanceof M&&t.exitSettlement_event(this)},r.Settlement_eventContext=R,r.prototype.settlement_event=function(){var t=new R(this,this._ctx,this.state);this.enterRule(t,48,r.RULE_settlement_event);try{this.enterOuterAlt(t,1),this.state=205,this.match(r.T__23)}catch(e){if(!(e instanceof k.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t},(N.prototype=Object.create(k.ParserRuleContext.prototype)).constructor=N,N.prototype.ALPHANUMERIC=function(){return this.getToken(r.ALPHANUMERIC,0)},N.prototype.enterRule=function(t){t instanceof M&&t.enterLicense_resource_id(this)},N.prototype.exitRule=function(t){t instanceof M&&t.exitLicense_resource_id(this)},r.License_resource_idContext=N,r.prototype.license_resource_id=function(){var t=new N(this,this._ctx,this.state);this.enterRule(t,50,r.RULE_license_resource_id);try{this.enterOuterAlt(t,1),this.state=207,this.match(r.ALPHANUMERIC)}catch(e){if(!(e instanceof k.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t},(I.prototype=Object.create(k.ParserRuleContext.prototype)).constructor=I,I.prototype.SELF=function(){return this.getToken(r.SELF,0)},I.prototype.GROUPUSER=function(){return this.getToken(r.GROUPUSER,0)},I.prototype.REGISTERED_USERS=function(){return this.getToken(r.REGISTERED_USERS,0)},I.prototype.PUBLIC=function(){return this.getToken(r.PUBLIC,0)},I.prototype.MOBILEPHONE=function(){return this.getToken(r.MOBILEPHONE,0)},I.prototype.EMAIL=function(){return this.getToken(r.EMAIL,0)},I.prototype.enterRule=function(t){t instanceof M&&t.enterUsers(this)},I.prototype.exitRule=function(t){t instanceof M&&t.exitUsers(this)},r.UsersContext=I,r.prototype.users=function(){var t=new I(this,this._ctx,this.state);this.enterRule(t,52,r.RULE_users);var e=0;try{this.enterOuterAlt(t,1),this.state=209,0!=((e=this._input.LA(1))-27&-32)||0==(1<<e-27&(1<<r.SELF-27|1<<r.GROUPUSER-27|1<<r.REGISTERED_USERS-27|1<<r.PUBLIC-27|1<<r.MOBILEPHONE-27|1<<r.EMAIL-27))?this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume())}catch(e){if(!(e instanceof k.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t},r.prototype.sempred=function(t,e,n){switch(e){case 2:return this.audience_clause_sempred(t,n);default:throw"No predicate with index:"+e}},r.prototype.audience_clause_sempred=function(t,e){switch(e){case 0:return this.precpred(this._ctx,1);default:throw"No predicate with index:"+e}},e.presentablePolicyParser=r},EesY:function(t,e,n){function r(t,e){t=t||null,e=e||null,o.call(this,t,e),this.ruleIndex=-1,this.children=null,this.start=null,this.stop=null,this.exception=null}function i(t,e,n){return r.call(t,e),this.ruleIndex=n,this}var o=n("6GCw").RuleContext,a=n("VnEu"),s=a.INVALID_INTERVAL,u=a.TerminalNode,c=a.TerminalNodeImpl,l=a.ErrorNodeImpl,h=n("T+Yw").Interval;(r.prototype=Object.create(o.prototype)).constructor=r,r.prototype.copyFrom=function(t){this.parentCtx=t.parentCtx,this.invokingState=t.invokingState,this.children=null,this.start=t.start,this.stop=t.stop,t.children&&(this.children=[],t.children.map(function(t){t instanceof l&&(this.children.push(t),t.parentCtx=this)},this))},r.prototype.enterRule=function(t){},r.prototype.exitRule=function(t){},r.prototype.addChild=function(t){return null===this.children&&(this.children=[]),this.children.push(t),t},r.prototype.removeLastChild=function(){null!==this.children&&this.children.pop()},r.prototype.addTokenNode=function(t){var e=new c(t);return this.addChild(e),e.parentCtx=this,e},r.prototype.addErrorNode=function(t){var e=new l(t);return this.addChild(e),e.parentCtx=this,e},r.prototype.getChild=function(t,e){if(e=e||null,null===this.children||t<0||t>=this.children.length)return null;if(null===e)return this.children[t];for(var n=0;n<this.children.length;n++){var r=this.children[n];if(r instanceof e){if(0===t)return r;t-=1}}return null},r.prototype.getToken=function(t,e){if(null===this.children||e<0||e>=this.children.length)return null;for(var n=0;n<this.children.length;n++){var r=this.children[n];if(r instanceof u&&r.symbol.type===t){if(0===e)return r;e-=1}}return null},r.prototype.getTokens=function(t){if(null===this.children)return[];for(var e=[],n=0;n<this.children.length;n++){var r=this.children[n];r instanceof u&&r.symbol.type===t&&e.push(r)}return e},r.prototype.getTypedRuleContext=function(t,e){return this.getChild(e,t)},r.prototype.getTypedRuleContexts=function(t){if(null===this.children)return[];for(var e=[],n=0;n<this.children.length;n++){var r=this.children[n];r instanceof t&&e.push(r)}return e},r.prototype.getChildCount=function(){return null===this.children?0:this.children.length},r.prototype.getSourceInterval=function(){return null===this.start||null===this.stop?s:new h(this.start.tokenIndex,this.stop.tokenIndex)},o.EMPTY=new r,(i.prototype=Object.create(r.prototype)).constructor=i,e.ParserRuleContext=r},ExQ7:function(t,e,n){function r(){return this}function i(t){return r.call(this),this.tokenSource=t,this.tokens=[],this.index=-1,this.fetchedEOF=!1,this}var o=n("j/5l").Token,a=n("h0lj").Lexer,s=n("T+Yw").Interval;(i.prototype=Object.create(r.prototype)).constructor=i,i.prototype.mark=function(){return 0},i.prototype.release=function(t){},i.prototype.reset=function(){this.seek(0)},i.prototype.seek=function(t){this.lazyInit(),this.index=this.adjustSeekIndex(t)},i.prototype.get=function(t){return this.lazyInit(),this.tokens[t]},i.prototype.consume=function(){if(!(this.index>=0&&(this.fetchedEOF?this.index<this.tokens.length-1:this.index<this.tokens.length))&&this.LA(1)===o.EOF)throw"cannot consume EOF";this.sync(this.index+1)&&(this.index=this.adjustSeekIndex(this.index+1))},i.prototype.sync=function(t){var e=t-this.tokens.length+1;if(e>0){return this.fetch(e)>=e}return!0},i.prototype.fetch=function(t){if(this.fetchedEOF)return 0;for(var e=0;e<t;e++){var n=this.tokenSource.nextToken();if(n.tokenIndex=this.tokens.length,this.tokens.push(n),n.type===o.EOF)return this.fetchedEOF=!0,e+1}return t},i.prototype.getTokens=function(t,e,n){if(void 0===n&&(n=null),t<0||e<0)return null;this.lazyInit();var r=[];e>=this.tokens.length&&(e=this.tokens.length-1);for(var i=t;i<e;i++){var a=this.tokens[i];if(a.type===o.EOF)break;(null===n||n.contains(a.type))&&r.push(a)}return r},i.prototype.LA=function(t){return this.LT(t).type},i.prototype.LB=function(t){return this.index-t<0?null:this.tokens[this.index-t]},i.prototype.LT=function(t){if(this.lazyInit(),0===t)return null;if(t<0)return this.LB(-t);var e=this.index+t-1;return this.sync(e),e>=this.tokens.length?this.tokens[this.tokens.length-1]:this.tokens[e]},i.prototype.adjustSeekIndex=function(t){return t},i.prototype.lazyInit=function(){-1===this.index&&this.setup()},i.prototype.setup=function(){this.sync(0),this.index=this.adjustSeekIndex(0)},i.prototype.setTokenSource=function(t){this.tokenSource=t,this.tokens=[],this.index=-1,this.fetchedEOF=!1},i.prototype.nextTokenOnChannel=function(t,e){if(this.sync(t),t>=this.tokens.length)return-1;for(var n=this.tokens[t];n.channel!==this.channel;){if(n.type===o.EOF)return-1;t+=1,this.sync(t),n=this.tokens[t]}return t},i.prototype.previousTokenOnChannel=function(t,e){for(;t>=0&&this.tokens[t].channel!==e;)t-=1;return t},i.prototype.getHiddenTokensToRight=function(t,e){if(void 0===e&&(e=-1),this.lazyInit(),t<0||t>=this.tokens.length)throw t+" not in 0.."+this.tokens.length-1;var n=this.nextTokenOnChannel(t+1,a.DEFAULT_TOKEN_CHANNEL),r=t+1,i=-1===n?this.tokens.length-1:n;return this.filterForChannel(r,i,e)},i.prototype.getHiddenTokensToLeft=function(t,e){if(void 0===e&&(e=-1),this.lazyInit(),t<0||t>=this.tokens.length)throw t+" not in 0.."+this.tokens.length-1;var n=this.previousTokenOnChannel(t-1,a.DEFAULT_TOKEN_CHANNEL);if(n===t-1)return null;var r=n+1,i=t-1;return this.filterForChannel(r,i,e)},i.prototype.filterForChannel=function(t,e,n){for(var r=[],i=t;i<e+1;i++){var o=this.tokens[i];-1===n?o.channel!==a.DEFAULT_TOKEN_CHANNEL&&r.push(o):o.channel===n&&r.push(o)}return 0===r.length?null:r},i.prototype.getSourceName=function(){return this.tokenSource.getSourceName()},i.prototype.getText=function(t){this.lazyInit(),this.fill(),void 0!==t&&null!==t||(t=new s(0,this.tokens.length-1));var e=t.start;e instanceof o&&(e=e.tokenIndex);var n=t.stop;if(n instanceof o&&(n=n.tokenIndex),null===e||null===n||e<0||n<0)return"";n>=this.tokens.length&&(n=this.tokens.length-1);for(var r="",i=e;i<n+1;i++){var a=this.tokens[i];if(a.type===o.EOF)break;r+=a.text}return r},i.prototype.fill=function(){for(this.lazyInit();1e3===this.fetch(1e3););},e.BufferedTokenStream=i},Fzuw:function(t,e,n){function r(t,e){return o.call(this,t),this.channel=void 0===e?i.DEFAULT_CHANNEL:e,this}var i=n("j/5l").Token,o=n("ExQ7").BufferedTokenStream;(r.prototype=Object.create(o.prototype)).constructor=r,r.prototype.adjustSeekIndex=function(t){return this.nextTokenOnChannel(t,this.channel)},r.prototype.LB=function(t){if(0===t||this.index-t<0)return null;for(var e=this.index,n=1;n<=t;)e=this.previousTokenOnChannel(e-1,this.channel),n+=1;return e<0?null:this.tokens[e]},r.prototype.LT=function(t){if(this.lazyInit(),0===t)return null;if(t<0)return this.LB(-t);for(var e=this.index,n=1;n<t;)this.sync(e+1)&&(e=this.nextTokenOnChannel(e+1,this.channel)),n+=1;return this.tokens[e]},r.prototype.getNumberOfOnChannelTokens=function(){var t=0;this.fill();for(var e=0;e<this.tokens.length;e++){var n=this.tokens[e];if(n.channel===this.channel&&(t+=1),n.type===i.EOF)break}return t},e.CommonTokenStream=r},HK9E:function(t,e,n){},HNBV:function(t,e,n){var r=n("4iSB").InputStream,i="undefined"==typeof window&&"undefined"==typeof importScripts?n("Ya8g"):null,o={fromString:function(t){return new r(t,!0)},fromBlob:function(t,e,n,i){var o=FileReader();o.onload=function(t){var e=new r(t.target.result,!0);n(e)},o.onerror=i,o.readAsText(t,e)},fromBuffer:function(t,e){return new r(t.toString(e),!0)},fromPath:function(t,e,n){i.readFile(t,e,function(t,e){var i=null;null!==e&&(i=new r(e,!0)),n(t,i)})},fromPathSync:function(t,e){var n=i.readFileSync(t,e);return new r(n,!0)}};e.CharStreams=o},Hw2x:function(t,e,n){"use strict";t.exports=function(t){t.syntaxError=function(t,e,n,r,i,o){this.errorMsg="line "+n+": "+i}}},IUCG:function(t,e,n){function r(t,e){return this.alt=e,this.pred=t,this}function i(t,e){return null===t&&(t=-1),null===e&&(e=new o),this.stateNumber=t,this.configs=e,this.edges=null,this.isAcceptState=!1,this.prediction=0,this.lexerActionExecutor=null,this.requiresFullContext=!1,this.predicates=null,this}var o=n("wMEt").ATNConfigSet,a=n("bz+k"),s=a.Hash,u=a.Set;r.prototype.toString=function(){return"("+this.pred+", "+this.alt+")"},i.prototype.getAltSet=function(){var t=new u;if(null!==this.configs)for(var e=0;e<this.configs.length;e++){var n=this.configs[e];t.add(n.alt)}return 0===t.length?null:t},i.prototype.equals=function(t){return this===t||t instanceof i&&this.configs.equals(t.configs)},i.prototype.toString=function(){var t=this.stateNumber+":"+this.configs;return this.isAcceptState&&(t+="=>",null!==this.predicates?t+=this.predicates:t+=this.prediction),t},i.prototype.hashCode=function(){var t=new s;return t.update(this.configs),this.isAcceptState&&(null!==this.predicates?t.update(this.predicates):t.update(this.prediction)),t.finish()},e.DFAState=i,e.PredPrediction=r},J8R0:function(t,e){function n(){}function r(t){return this.actionType=t,this.isPositionDependent=!1,this}function i(){return r.call(this,n.SKIP),this}function o(t){return r.call(this,n.TYPE),this.type=t,this}function a(t){return r.call(this,n.PUSH_MODE),this.mode=t,this}function s(){return r.call(this,n.POP_MODE),this}function u(){return r.call(this,n.MORE),this}function c(t){return r.call(this,n.MODE),this.mode=t,this}function l(t,e){return r.call(this,n.CUSTOM),this.ruleIndex=t,this.actionIndex=e,this.isPositionDependent=!0,this}function h(t){return r.call(this,n.CHANNEL),this.channel=t,this}function p(t,e){return r.call(this,e.actionType),this.offset=t,this.action=e,this.isPositionDependent=!0,this}n.CHANNEL=0,n.CUSTOM=1,n.MODE=2,n.MORE=3,n.POP_MODE=4,n.PUSH_MODE=5,n.SKIP=6,n.TYPE=7,r.prototype.hashCode=function(){var t=new Hash;return this.updateHashCode(t),t.finish()},r.prototype.updateHashCode=function(t){t.update(this.actionType)},r.prototype.equals=function(t){return this===t},(i.prototype=Object.create(r.prototype)).constructor=i,i.INSTANCE=new i,i.prototype.execute=function(t){t.skip()},i.prototype.toString=function(){return"skip"},(o.prototype=Object.create(r.prototype)).constructor=o,o.prototype.execute=function(t){t.type=this.type},o.prototype.updateHashCode=function(t){t.update(this.actionType,this.type)},o.prototype.equals=function(t){return this===t||t instanceof o&&this.type===t.type},o.prototype.toString=function(){return"type("+this.type+")"},(a.prototype=Object.create(r.prototype)).constructor=a,a.prototype.execute=function(t){t.pushMode(this.mode)},a.prototype.updateHashCode=function(t){t.update(this.actionType,this.mode)},a.prototype.equals=function(t){return this===t||t instanceof a&&this.mode===t.mode},a.prototype.toString=function(){return"pushMode("+this.mode+")"},(s.prototype=Object.create(r.prototype)).constructor=s,s.INSTANCE=new s,s.prototype.execute=function(t){t.popMode()},s.prototype.toString=function(){return"popMode"},(u.prototype=Object.create(r.prototype)).constructor=u,u.INSTANCE=new u,u.prototype.execute=function(t){t.more()},u.prototype.toString=function(){return"more"},(c.prototype=Object.create(r.prototype)).constructor=c,c.prototype.execute=function(t){t.mode(this.mode)},c.prototype.updateHashCode=function(t){t.update(this.actionType,this.mode)},c.prototype.equals=function(t){return this===t||t instanceof c&&this.mode===t.mode},c.prototype.toString=function(){return"mode("+this.mode+")"},(l.prototype=Object.create(r.prototype)).constructor=l,l.prototype.execute=function(t){t.action(null,this.ruleIndex,this.actionIndex)},l.prototype.updateHashCode=function(t){t.update(this.actionType,this.ruleIndex,this.actionIndex)},l.prototype.equals=function(t){return this===t||t instanceof l&&(this.ruleIndex===t.ruleIndex&&this.actionIndex===t.actionIndex)},(h.prototype=Object.create(r.prototype)).constructor=h,h.prototype.execute=function(t){t._channel=this.channel},h.prototype.updateHashCode=function(t){t.update(this.actionType,this.channel)},h.prototype.equals=function(t){return this===t||t instanceof h&&this.channel===t.channel},h.prototype.toString=function(){return"channel("+this.channel+")"},(p.prototype=Object.create(r.prototype)).constructor=p,p.prototype.execute=function(t){this.action.execute(t)},p.prototype.updateHashCode=function(t){t.update(this.actionType,this.offset,this.action)},p.prototype.equals=function(t){return this===t||t instanceof p&&(this.offset===t.offset&&this.action===t.action)},e.LexerActionType=n,e.LexerSkipAction=i,e.LexerChannelAction=h,e.LexerCustomAction=l,e.LexerIndexedCustomAction=p,e.LexerMoreAction=u,e.LexerTypeAction=o,e.LexerPushModeAction=a,e.LexerPopModeAction=s,e.LexerModeAction=c},LYMb:function(t,e,n){function r(){return this}n("bz+k").Set;var i=n("bz+k").Map,o=n("bz+k").BitSet,a=n("bz+k").AltDict,s=n("7y1Z").ATN,u=n("j0Qz").RuleStopState,c=n("wMEt").ATNConfigSet,l=n("yEAX").ATNConfig,h=n("wQJ6").SemanticContext,p=(n("bz+k").Hash,n("bz+k").hashStuff);n("bz+k").equalArrays;r.SLL=0,r.LL=1,r.LL_EXACT_AMBIG_DETECTION=2,r.hasSLLConflictTerminatingPrediction=function(t,e){if(r.allConfigsInRuleStopStates(e))return!0;if(t===r.SLL&&e.hasSemanticContext){for(var n=new c,i=0;i<e.items.length;i++){var o=e.items[i];o=new l({semanticContext:h.NONE},o),n.add(o)}e=n}var a=r.getConflictingAltSubsets(e);return r.hasConflictingAltSet(a)&&!r.hasStateAssociatedWithOneAlt(e)},r.hasConfigInRuleStopState=function(t){for(var e=0;e<t.items.length;e++){if(t.items[e].state instanceof u)return!0}return!1},r.allConfigsInRuleStopStates=function(t){for(var e=0;e<t.items.length;e++){if(!(t.items[e].state instanceof u))return!1}return!0},r.resolvesToJustOneViableAlt=function(t){return r.getSingleViableAlt(t)},r.allSubsetsConflict=function(t){return!r.hasNonConflictingAltSet(t)},r.hasNonConflictingAltSet=function(t){for(var e=0;e<t.length;e++){if(1===t[e].length)return!0}return!1},r.hasConflictingAltSet=function(t){for(var e=0;e<t.length;e++){if(t[e].length>1)return!0}return!1},r.allSubsetsEqual=function(t){for(var e=null,n=0;n<t.length;n++){var r=t[n];if(null===e)e=r;else if(r!==e)return!1}return!0},r.getUniqueAlt=function(t){var e=r.getAlts(t);return 1===e.length?e.minValue():s.INVALID_ALT_NUMBER},r.getAlts=function(t){var e=new o;return t.map(function(t){e.or(t)}),e},r.getConflictingAltSubsets=function(t){var e=new i;return e.hashFunction=function(t){p(t.state.stateNumber,t.context)},e.equalsFunction=function(t,e){return t.state.stateNumber==e.state.stateNumber&&t.context.equals(e.context)},t.items.map(function(t){var n=e.get(t);null===n&&(n=new o,e.put(t,n)),n.add(t.alt)}),e.getValues()},r.getStateToAltMap=function(t){var e=new a;return t.items.map(function(t){var n=e.get(t.state);null===n&&(n=new o,e.put(t.state,n)),n.add(t.alt)}),e},r.hasStateAssociatedWithOneAlt=function(t){for(var e=r.getStateToAltMap(t).values(),n=0;n<e.length;n++)if(1===e[n].length)return!0;return!1},r.getSingleViableAlt=function(t){for(var e=null,n=0;n<t.length;n++){var r=t[n].minValue();if(null===e)e=r;else if(e!==r)return s.INVALID_ALT_NUMBER}return e},e.PredictionMode=r},"NUe/":function(t,e,n){},RuwF:function(t,e,n){function r(t){this.atn=t}var i=n("bz+k").Set,o=n("bz+k").BitSet,a=n("j/5l").Token,s=n("yEAX").ATNConfig,u=(n("T+Yw").Interval,n("T+Yw").IntervalSet),c=n("j0Qz").RuleStopState,l=n("VS1O").RuleTransition,h=n("VS1O").NotSetTransition,p=n("VS1O").WildcardTransition,f=n("VS1O").AbstractPredicateTransition,d=n("YFoD"),g=d.predictionContextFromRuleContext,v=d.PredictionContext,y=d.SingletonPredictionContext;r.HIT_PRED=a.INVALID_TYPE,r.prototype.getDecisionLookahead=function(t){if(null===t)return null;for(var e=t.transitions.length,n=[],a=0;a<e;a++){n[a]=new u;var s=new i;this._LOOK(t.transition(a).target,null,v.EMPTY,n[a],s,new o,!1,!1),(0===n[a].length||n[a].contains(r.HIT_PRED))&&(n[a]=null)}return n},r.prototype.LOOK=function(t,e,n){var r=new u,a=null!==(n=n||null)?g(t.atn,n):null;return this._LOOK(t,e,a,r,new i,new o,!0,!0),r},r.prototype._LOOK=function(t,e,n,i,o,u,d,g){var _=new s({state:t,alt:0,context:n},null);if(!o.contains(_)){if(o.add(_),t===e){if(null===n)return void i.addOne(a.EPSILON);if(n.isEmpty()&&g)return void i.addOne(a.EOF)}if(t instanceof c){if(null===n)return void i.addOne(a.EPSILON);if(n.isEmpty()&&g)return void i.addOne(a.EOF);if(n!==v.EMPTY){for(var m=0;m<n.length;m++){var x=this.atn.states[n.getReturnState(m)],T=u.contains(x.ruleIndex);try{u.remove(x.ruleIndex),this._LOOK(x,e,n.getParent(m),i,o,u,d,g)}finally{T&&u.add(x.ruleIndex)}}return}}for(var E=0;E<t.transitions.length;E++){var S=t.transitions[E];if(S.constructor===l){if(u.contains(S.target.ruleIndex))continue;var C=y.create(n,S.followState.stateNumber);try{u.add(S.target.ruleIndex),this._LOOK(S.target,e,C,i,o,u,d,g)}finally{u.remove(S.target.ruleIndex)}}else if(S instanceof f)d?this._LOOK(S.target,e,n,i,o,u,d,g):i.addOne(r.HIT_PRED);else if(S.isEpsilon)this._LOOK(S.target,e,n,i,o,u,d,g);else if(S.constructor===p)i.addRange(a.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType);else{var b=S.label;null!==b&&(S instanceof h&&(b=b.complement(a.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType)),i.addSet(b))}}}},e.LL1Analyzer=r},S9ky:function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n("5dCK").presentablePolicyListener,o=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var t=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.errorMsg=null,t.stringArray=[],t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i),r(e,[{key:"pushIndent",value:function(t){t=void 0===t?2:t,this.stringArray.push(" ".repeat(t))}},{key:"pushChildren",value:function(t){var e=this;t.forEach(function(t){e.stringArray.push(t.getText())})}},{key:"enterSegment",value:function(t){this.stringArray.push("for")}},{key:"exitSegment",value:function(t){this.stringArray.push("\n")}},{key:"enterUsers",value:function(t){this.stringArray.push(t.getText()),this.stringArray.push(",")}},{key:"enterState_clause",value:function(t){","===this.stringArray[this.stringArray.length-1]&&(this.stringArray.pop(),this.stringArray.push(":")),this.stringArray.push("\n"),this.pushIndent(1)}},{key:"enterInitial_state_clause",value:function(t){this.pushChildren(t.children)}},{key:"enterCurrent_state_clause",value:function(t){this.stringArray.push("\n"),this.pushIndent(1),this.pushChildren(t.children)}},{key:"enterTarget_clause",value:function(t){this.stringArray.push("\n"),this.pushIndent(3),!function(t,e){return null!==e[t]()}("ID",t)?this.stringArray.push(t.getText()):this.stringArray=this.stringArray.concat(["proceed to",t.ID().getText(),"on"])}},{key:"enterAccepting",value:function(t){this.stringArray.push("accepting")}},{key:"enterAnd_event",value:function(t){this.stringArray.push("and on")}},{key:"enterPeriod_event",value:function(t){this.pushChildren(t.children)}},{key:"enterSpecific_date_event",value:function(t){this.pushChildren(t.children)}},{key:"enterRelative_date_event",value:function(t){this.pushChildren(t.children)}},{key:"enterPricing_agreement_event",value:function(t){this.pushChildren(t.children)}},{key:"enterTransaction_event",value:function(t){this.pushChildren(t.children)}},{key:"enterContract_guaranty",value:function(t){this.pushChildren(t.children)}},{key:"enterPlatform_guaranty",value:function(t){this.pushChildren(t.children)}},{key:"enterSigning_event",value:function(t){this.pushChildren(t.children)}},{key:"enterSettlement_event",value:function(t){this.pushChildren(t.children)}},{key:"enterVisit_increment_event",value:function(t){this.pushChildren(t.children)}},{key:"enterVisit_event",value:function(t){this.pushChildren(t.children)}},{key:"enterBalance_greater",value:function(t){this.pushChildren(t.children)}},{key:"enterBalance_smaller",value:function(t){this.pushChildren(t.children)}}]),e}();t.exports=o},SS0H:function(t,e,n){},"T+Yw":function(t,e,n){function r(t,e){return this.start=t,this.stop=e,this}function i(){this.intervals=null,this.readOnly=!1}var o=n("j/5l").Token;r.prototype.contains=function(t){return t>=this.start&&t<this.stop},r.prototype.toString=function(){return this.start===this.stop-1?this.start.toString():this.start.toString()+".."+(this.stop-1).toString()},Object.defineProperty(r.prototype,"length",{get:function(){return this.stop-this.start}}),i.prototype.first=function(t){return null===this.intervals||0===this.intervals.length?o.INVALID_TYPE:this.intervals[0].start},i.prototype.addOne=function(t){this.addInterval(new r(t,t+1))},i.prototype.addRange=function(t,e){this.addInterval(new r(t,e+1))},i.prototype.addInterval=function(t){if(null===this.intervals)this.intervals=[],this.intervals.push(t);else{for(var e=0;e<this.intervals.length;e++){var n=this.intervals[e];if(t.stop<n.start)return void this.intervals.splice(e,0,t);if(t.stop===n.start)return void(this.intervals[e].start=t.start);if(t.start<=n.stop)return this.intervals[e]=new r(Math.min(n.start,t.start),Math.max(n.stop,t.stop)),void this.reduce(e)}this.intervals.push(t)}},i.prototype.addSet=function(t){if(null!==t.intervals)for(var e=0;e<t.intervals.length;e++){var n=t.intervals[e];this.addInterval(new r(n.start,n.stop))}return this},i.prototype.reduce=function(t){if(t<this.intervalslength-1){var e=this.intervals[t],n=this.intervals[t+1];e.stop>=n.stop?(this.intervals.pop(t+1),this.reduce(t)):e.stop>=n.start&&(this.intervals[t]=new r(e.start,n.stop),this.intervals.pop(t+1))}},i.prototype.complement=function(t,e){var n=new i;n.addInterval(new r(t,e+1));for(var o=0;o<this.intervals.length;o++)n.removeRange(this.intervals[o]);return n},i.prototype.contains=function(t){if(null===this.intervals)return!1;for(var e=0;e<this.intervals.length;e++)if(this.intervals[e].contains(t))return!0;return!1},Object.defineProperty(i.prototype,"length",{get:function(){var t=0;return this.intervals.map(function(e){t+=e.length}),t}}),i.prototype.removeRange=function(t){if(t.start===t.stop-1)this.removeOne(t.start);else if(null!==this.intervals)for(var e=0,n=0;n<this.intervals.length;n++){var i=this.intervals[e];if(t.stop<=i.start)return;if(t.start>i.start&&t.stop<i.stop){this.intervals[e]=new r(i.start,t.start);var o=new r(t.stop,i.stop);return void this.intervals.splice(e,0,o)}t.start<=i.start&&t.stop>=i.stop?(this.intervals.splice(e,1),e-=1):t.start<i.stop?this.intervals[e]=new r(i.start,t.start):t.stop<i.stop&&(this.intervals[e]=new r(t.stop,i.stop)),e+=1}},i.prototype.removeOne=function(t){if(null!==this.intervals)for(var e=0;e<this.intervals.length;e++){var n=this.intervals[e];if(t<n.start)return;if(t===n.start&&t===n.stop-1)return void this.intervals.splice(e,1);if(t===n.start)return void(this.intervals[e]=new r(n.start+1,n.stop));if(t===n.stop-1)return void(this.intervals[e]=new r(n.start,n.stop-1));if(t<n.stop-1){var i=new r(n.start,t);return n.start=t+1,void this.intervals.splice(e,0,i)}}},i.prototype.toString=function(t,e,n){return t=t||null,e=e||null,n=n||!1,null===this.intervals?"{}":null!==t||null!==e?this.toTokenString(t,e):n?this.toCharString():this.toIndexString()},i.prototype.toCharString=function(){for(var t=[],e=0;e<this.intervals.length;e++){var n=this.intervals[e];n.stop===n.start+1?n.start===o.EOF?t.push("<EOF>"):t.push("'"+String.fromCharCode(n.start)+"'"):t.push("'"+String.fromCharCode(n.start)+"'..'"+String.fromCharCode(n.stop-1)+"'")}return t.length>1?"{"+t.join(", ")+"}":t[0]},i.prototype.toIndexString=function(){for(var t=[],e=0;e<this.intervals.length;e++){var n=this.intervals[e];n.stop===n.start+1?n.start===o.EOF?t.push("<EOF>"):t.push(n.start.toString()):t.push(n.start.toString()+".."+(n.stop-1).toString())}return t.length>1?"{"+t.join(", ")+"}":t[0]},i.prototype.toTokenString=function(t,e){for(var n=[],r=0;r<this.intervals.length;r++)for(var i=this.intervals[r],o=i.start;o<i.stop;o++)n.push(this.elementName(t,e,o));return n.length>1?"{"+n.join(", ")+"}":n[0]},i.prototype.elementName=function(t,e,n){return n===o.EOF?"<EOF>":n===o.EPSILON?"<EPSILON>":t[n]||e[n]},e.Interval=r,e.IntervalSet=i},TEvv:function(t,e,n){function r(){return this}function i(t){return r.call(this),this.copyText=void 0!==t&&t,this}var o=n("j/5l").CommonToken;(i.prototype=Object.create(r.prototype)).constructor=i,i.DEFAULT=new i,i.prototype.create=function(t,e,n,r,i,a,s,u){var c=new o(t,e,r,i,a);return c.line=s,c.column=u,null!==n?c.text=n:this.copyText&&null!==t[1]&&(c.text=t[1].getText(i,a)),c},i.prototype.createThin=function(t,e){var n=new o(null,t);return n.text=e,n},e.CommonTokenFactory=i},U7AC:function(t,e,n){},VIKC:function(t,e,n){function r(t,e){if(void 0===e&&(e=0),this.atnStartState=t,this.decision=e,this._states=new i,this.s0=null,this.precedenceDfa=!1,t instanceof a&&t.isPrecedenceDecision){this.precedenceDfa=!0;var n=new o(null,new s);n.edges=[],n.isAcceptState=!1,n.requiresFullContext=!1,this.s0=n}return this}var i=n("bz+k").Set,o=n("IUCG").DFAState,a=n("j0Qz").StarLoopEntryState,s=n("wMEt").ATNConfigSet,u=n("hL6x").DFASerializer,c=n("hL6x").LexerDFASerializer;r.prototype.getPrecedenceStartState=function(t){if(!this.precedenceDfa)throw"Only precedence DFAs may contain a precedence start state.";return t<0||t>=this.s0.edges.length?null:this.s0.edges[t]||null},r.prototype.setPrecedenceStartState=function(t,e){if(!this.precedenceDfa)throw"Only precedence DFAs may contain a precedence start state.";t<0||(this.s0.edges[t]=e)},r.prototype.setPrecedenceDfa=function(t){if(this.precedenceDfa!==t){if(this._states=new DFAStatesSet,t){var e=new o(null,new s);e.edges=[],e.isAcceptState=!1,e.requiresFullContext=!1,this.s0=e}else this.s0=null;this.precedenceDfa=t}},Object.defineProperty(r.prototype,"states",{get:function(){return this._states}}),r.prototype.sortedStates=function(){return this._states.values().sort(function(t,e){return t.stateNumber-e.stateNumber})},r.prototype.toString=function(t,e){if(t=t||null,e=e||null,null===this.s0)return"";return new u(this,t,e).toString()},r.prototype.toLexerString=function(){if(null===this.s0)return"";return new c(this).toString()},e.DFA=r},VS1O:function(t,e,n){function r(t){if(void 0===t||null===t)throw"target cannot be null.";return this.target=t,this.isEpsilon=!1,this.label=null,this}function i(t,e){return r.call(this,t),this.label_=e,this.label=this.makeLabel(),this.serializationType=r.ATOM,this}function o(t,e,n,i){return r.call(this,t),this.ruleIndex=e,this.precedence=n,this.followState=i,this.serializationType=r.RULE,this.isEpsilon=!0,this}function a(t,e){return r.call(this,t),this.serializationType=r.EPSILON,this.isEpsilon=!0,this.outermostPrecedenceReturn=e,this}function s(t,e,n){return r.call(this,t),this.serializationType=r.RANGE,this.start=e,this.stop=n,this.label=this.makeLabel(),this}function u(t){return r.call(this,t),this}function c(t,e,n,i){return u.call(this,t),this.serializationType=r.PREDICATE,this.ruleIndex=e,this.predIndex=n,this.isCtxDependent=i,this.isEpsilon=!0,this}function l(t,e,n,i){return r.call(this,t),this.serializationType=r.ACTION,this.ruleIndex=e,this.actionIndex=void 0===n?-1:n,this.isCtxDependent=void 0!==i&&i,this.isEpsilon=!0,this}function h(t,e){return r.call(this,t),this.serializationType=r.SET,void 0!==e&&null!==e?this.label=e:(this.label=new v,this.label.addOne(g.INVALID_TYPE)),this}function p(t,e){return h.call(this,t,e),this.serializationType=r.NOT_SET,this}function f(t){return r.call(this,t),this.serializationType=r.WILDCARD,this}function d(t,e){return u.call(this,t),this.serializationType=r.PRECEDENCE,this.precedence=e,this.isEpsilon=!0,this}var g=n("j/5l").Token,v=(n("T+Yw").Interval,n("T+Yw").IntervalSet),y=n("wQJ6").Predicate,_=n("wQJ6").PrecedencePredicate;r.EPSILON=1,r.RANGE=2,r.RULE=3,r.PREDICATE=4,r.ATOM=5,r.ACTION=6,r.SET=7,r.NOT_SET=8,r.WILDCARD=9,r.PRECEDENCE=10,r.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"],r.serializationTypes={EpsilonTransition:r.EPSILON,RangeTransition:r.RANGE,RuleTransition:r.RULE,PredicateTransition:r.PREDICATE,AtomTransition:r.ATOM,ActionTransition:r.ACTION,SetTransition:r.SET,NotSetTransition:r.NOT_SET,WildcardTransition:r.WILDCARD,PrecedencePredicateTransition:r.PRECEDENCE},(i.prototype=Object.create(r.prototype)).constructor=i,i.prototype.makeLabel=function(){var t=new v;return t.addOne(this.label_),t},i.prototype.matches=function(t,e,n){return this.label_===t},i.prototype.toString=function(){return this.label_},(o.prototype=Object.create(r.prototype)).constructor=o,o.prototype.matches=function(t,e,n){return!1},(a.prototype=Object.create(r.prototype)).constructor=a,a.prototype.matches=function(t,e,n){return!1},a.prototype.toString=function(){return"epsilon"},(s.prototype=Object.create(r.prototype)).constructor=s,s.prototype.makeLabel=function(){var t=new v;return t.addRange(this.start,this.stop),t},s.prototype.matches=function(t,e,n){return t>=this.start&&t<=this.stop},s.prototype.toString=function(){return"'"+String.fromCharCode(this.start)+"'..'"+String.fromCharCode(this.stop)+"'"},(u.prototype=Object.create(r.prototype)).constructor=u,(c.prototype=Object.create(u.prototype)).constructor=c,c.prototype.matches=function(t,e,n){return!1},c.prototype.getPredicate=function(){return new y(this.ruleIndex,this.predIndex,this.isCtxDependent)},c.prototype.toString=function(){return"pred_"+this.ruleIndex+":"+this.predIndex},(l.prototype=Object.create(r.prototype)).constructor=l,l.prototype.matches=function(t,e,n){return!1},l.prototype.toString=function(){return"action_"+this.ruleIndex+":"+this.actionIndex},(h.prototype=Object.create(r.prototype)).constructor=h,h.prototype.matches=function(t,e,n){return this.label.contains(t)},h.prototype.toString=function(){return this.label.toString()},(p.prototype=Object.create(h.prototype)).constructor=p,p.prototype.matches=function(t,e,n){return t>=e&&t<=n&&!h.prototype.matches.call(this,t,e,n)},p.prototype.toString=function(){return"~"+h.prototype.toString.call(this)},(f.prototype=Object.create(r.prototype)).constructor=f,f.prototype.matches=function(t,e,n){return t>=e&&t<=n},f.prototype.toString=function(){return"."},(d.prototype=Object.create(u.prototype)).constructor=d,d.prototype.matches=function(t,e,n){return!1},d.prototype.getPredicate=function(){return new _(this.precedence)},d.prototype.toString=function(){return this.precedence+" >= _p"},e.Transition=r,e.AtomTransition=i,e.SetTransition=h,e.NotSetTransition=p,e.RuleTransition=o,e.ActionTransition=l,e.EpsilonTransition=a,e.RangeTransition=s,e.WildcardTransition=f,e.PredicateTransition=c,e.PrecedencePredicateTransition=d,e.AbstractPredicateTransition=u},VgzD:function(t,e,n){function r(t){return a.call(this),this.parser=t,this}function i(t){return s.call(this),this._input=null,this._errHandler=new u,this._precedenceStack=[],this._precedenceStack.push(0),this._ctx=null,this.buildParseTrees=!0,this._tracer=null,this._parseListeners=null,this._syntaxErrors=0,this.setInputStream(t),this}var o=n("j/5l").Token,a=n("VnEu").ParseTreeListener,s=n("2EdO").Recognizer,u=n("k1zP").DefaultErrorStrategy,c=n("3Rtt").ATNDeserializer,l=n("hs4g").ATNDeserializationOptions,h=n("VnEu").TerminalNode,p=n("VnEu").ErrorNode;(r.prototype=Object.create(a.prototype)).constructor=r,r.prototype.enterEveryRule=function(t){console.log("enter   "+this.parser.ruleNames[t.ruleIndex]+", LT(1)="+this.parser._input.LT(1).text)},r.prototype.visitTerminal=function(t){console.log("consume "+t.symbol+" rule "+this.parser.ruleNames[this.parser._ctx.ruleIndex])},r.prototype.exitEveryRule=function(t){console.log("exit    "+this.parser.ruleNames[t.ruleIndex]+", LT(1)="+this.parser._input.LT(1).text)},(i.prototype=Object.create(s.prototype)).contructor=i,i.bypassAltsAtnCache={},i.prototype.reset=function(){null!==this._input&&this._input.seek(0),this._errHandler.reset(this),this._ctx=null,this._syntaxErrors=0,this.setTrace(!1),this._precedenceStack=[],this._precedenceStack.push(0),null!==this._interp&&this._interp.reset()},i.prototype.match=function(t){var e=this.getCurrentToken();return e.type===t?(this._errHandler.reportMatch(this),this.consume()):(e=this._errHandler.recoverInline(this),this.buildParseTrees&&-1===e.tokenIndex&&this._ctx.addErrorNode(e)),e},i.prototype.matchWildcard=function(){var t=this.getCurrentToken();return t.type>0?(this._errHandler.reportMatch(this),this.consume()):(t=this._errHandler.recoverInline(this),this._buildParseTrees&&-1===t.tokenIndex&&this._ctx.addErrorNode(t)),t},i.prototype.getParseListeners=function(){return this._parseListeners||[]},i.prototype.addParseListener=function(t){if(null===t)throw"listener";null===this._parseListeners&&(this._parseListeners=[]),this._parseListeners.push(t)},i.prototype.removeParseListener=function(t){if(null!==this._parseListeners){var e=this._parseListeners.indexOf(t);e>=0&&this._parseListeners.splice(e,1),0===this._parseListeners.length&&(this._parseListeners=null)}},i.prototype.removeParseListeners=function(){this._parseListeners=null},i.prototype.triggerEnterRuleEvent=function(){if(null!==this._parseListeners){var t=this._ctx;this._parseListeners.map(function(e){e.enterEveryRule(t),t.enterRule(e)})}},i.prototype.triggerExitRuleEvent=function(){if(null!==this._parseListeners){var t=this._ctx;this._parseListeners.slice(0).reverse().map(function(e){t.exitRule(e),e.exitEveryRule(t)})}},i.prototype.getTokenFactory=function(){return this._input.tokenSource._factory},i.prototype.setTokenFactory=function(t){this._input.tokenSource._factory=t},i.prototype.getATNWithBypassAlts=function(){var t=this.getSerializedATN();if(null===t)throw"The current parser does not support an ATN with bypass alternatives.";var e=this.bypassAltsAtnCache[t];if(null===e){var n=new l;n.generateRuleBypassTransitions=!0,e=new c(n).deserialize(t),this.bypassAltsAtnCache[t]=e}return e};var f=n("h0lj").Lexer;i.prototype.compileParseTreePattern=function(t,e,n){if(null===(n=n||null)&&null!==this.getTokenStream()){var r=this.getTokenStream().tokenSource;r instanceof f&&(n=r)}if(null===n)throw"Parser can't discover a lexer to use";return new ParseTreePatternMatcher(n,this).compile(t,e)},i.prototype.getInputStream=function(){return this.getTokenStream()},i.prototype.setInputStream=function(t){this.setTokenStream(t)},i.prototype.getTokenStream=function(){return this._input},i.prototype.setTokenStream=function(t){this._input=null,this.reset(),this._input=t},i.prototype.getCurrentToken=function(){return this._input.LT(1)},i.prototype.notifyErrorListeners=function(t,e,n){e=e||null,n=n||null,null===e&&(e=this.getCurrentToken()),this._syntaxErrors+=1;var r=e.line,i=e.column;this.getErrorListenerDispatch().syntaxError(this,e,r,i,t,n)},i.prototype.consume=function(){var t=this.getCurrentToken();t.type!==o.EOF&&this.getInputStream().consume();var e=null!==this._parseListeners&&this._parseListeners.length>0;if(this.buildParseTrees||e){var n;(n=this._errHandler.inErrorRecoveryMode(this)?this._ctx.addErrorNode(t):this._ctx.addTokenNode(t)).invokingState=this.state,e&&this._parseListeners.map(function(t){n instanceof p||void 0!==n.isErrorNode&&n.isErrorNode()?t.visitErrorNode(n):n instanceof h&&t.visitTerminal(n)})}return t},i.prototype.addContextToParseTree=function(){null!==this._ctx.parentCtx&&this._ctx.parentCtx.addChild(this._ctx)},i.prototype.enterRule=function(t,e,n){this.state=e,this._ctx=t,this._ctx.start=this._input.LT(1),this.buildParseTrees&&this.addContextToParseTree(),null!==this._parseListeners&&this.triggerEnterRuleEvent()},i.prototype.exitRule=function(){this._ctx.stop=this._input.LT(-1),null!==this._parseListeners&&this.triggerExitRuleEvent(),this.state=this._ctx.invokingState,this._ctx=this._ctx.parentCtx},i.prototype.enterOuterAlt=function(t,e){t.setAltNumber(e),this.buildParseTrees&&this._ctx!==t&&null!==this._ctx.parentCtx&&(this._ctx.parentCtx.removeLastChild(),this._ctx.parentCtx.addChild(t)),this._ctx=t},i.prototype.getPrecedence=function(){return 0===this._precedenceStack.length?-1:this._precedenceStack[this._precedenceStack.length-1]},i.prototype.enterRecursionRule=function(t,e,n,r){this.state=e,this._precedenceStack.push(r),this._ctx=t,this._ctx.start=this._input.LT(1),null!==this._parseListeners&&this.triggerEnterRuleEvent()},i.prototype.pushNewRecursionContext=function(t,e,n){var r=this._ctx;r.parentCtx=t,r.invokingState=e,r.stop=this._input.LT(-1),this._ctx=t,this._ctx.start=r.start,this.buildParseTrees&&this._ctx.addChild(r),null!==this._parseListeners&&this.triggerEnterRuleEvent()},i.prototype.unrollRecursionContexts=function(t){this._precedenceStack.pop(),this._ctx.stop=this._input.LT(-1);var e=this._ctx;if(null!==this._parseListeners)for(;this._ctx!==t;)this.triggerExitRuleEvent(),this._ctx=this._ctx.parentCtx;else this._ctx=t;e.parentCtx=t,this.buildParseTrees&&null!==t&&t.addChild(e)},i.prototype.getInvokingContext=function(t){for(var e=this._ctx;null!==e;){if(e.ruleIndex===t)return e;e=e.parentCtx}return null},i.prototype.precpred=function(t,e){return e>=this._precedenceStack[this._precedenceStack.length-1]},i.prototype.inContext=function(t){return!1},i.prototype.isExpectedToken=function(t){var e=this._interp.atn,n=this._ctx,r=e.states[this.state],i=e.nextTokens(r);if(i.contains(t))return!0;if(!i.contains(o.EPSILON))return!1;for(;null!==n&&n.invokingState>=0&&i.contains(o.EPSILON);){var a=e.states[n.invokingState].transitions[0];if((i=e.nextTokens(a.followState)).contains(t))return!0;n=n.parentCtx}return!(!i.contains(o.EPSILON)||t!==o.EOF)},i.prototype.getExpectedTokens=function(){return this._interp.atn.getExpectedTokens(this.state,this._ctx)},i.prototype.getExpectedTokensWithinCurrentRule=function(){var t=this._interp.atn,e=t.states[this.state];return t.nextTokens(e)},i.prototype.getRuleIndex=function(t){var e=this.getRuleIndexMap()[t];return null!==e?e:-1},i.prototype.getRuleInvocationStack=function(t){null===(t=t||null)&&(t=this._ctx);for(var e=[];null!==t;){var n=t.ruleIndex;n<0?e.push("n/a"):e.push(this.ruleNames[n]),t=t.parentCtx}return e},i.prototype.getDFAStrings=function(){return this._interp.decisionToDFA.toString()},i.prototype.dumpDFA=function(){for(var t=!1,e=0;e<this._interp.decisionToDFA.length;e++){var n=this._interp.decisionToDFA[e];n.states.length>0&&(t&&console.log(),this.printer.println("Decision "+n.decision+":"),this.printer.print(n.toString(this.literalNames,this.symbolicNames)),t=!0)}},i.prototype.getSourceName=function(){return this._input.sourceName},i.prototype.setTrace=function(t){t?(null!==this._tracer&&this.removeParseListener(this._tracer),this._tracer=new r(this),this.addParseListener(this._tracer)):(this.removeParseListener(this._tracer),this._tracer=null)},e.Parser=i},VnEu:function(t,e,n){function r(){return this}function i(){return r.call(this),this}function o(){return i.call(this),this}function a(){return o.call(this),this}function s(){return o.call(this),this}function u(){return s.call(this),this}function c(){return this}function l(){return this}function h(t){return s.call(this),this.parentCtx=null,this.symbol=t,this}function p(t){return h.call(this,t),this}function f(){return this}var d=n("j/5l").Token,g=n("T+Yw").Interval,v=new g(-1,-2);n("bz+k");(i.prototype=Object.create(r.prototype)).constructor=i,(o.prototype=Object.create(i.prototype)).constructor=o,(a.prototype=Object.create(o.prototype)).constructor=a,(s.prototype=Object.create(o.prototype)).constructor=s,(u.prototype=Object.create(s.prototype)).constructor=u,c.prototype.visit=function(t){return Array.isArray(t)?t.map(function(t){return t.accept(this)},this):t.accept(this)},c.prototype.visitChildren=function(t){return this.visit(t.children)},c.prototype.visitTerminal=function(t){},c.prototype.visitErrorNode=function(t){},l.prototype.visitTerminal=function(t){},l.prototype.visitErrorNode=function(t){},l.prototype.enterEveryRule=function(t){},l.prototype.exitEveryRule=function(t){},(h.prototype=Object.create(s.prototype)).constructor=h,h.prototype.getChild=function(t){return null},h.prototype.getSymbol=function(){return this.symbol},h.prototype.getParent=function(){return this.parentCtx},h.prototype.getPayload=function(){return this.symbol},h.prototype.getSourceInterval=function(){if(null===this.symbol)return v;var t=this.symbol.tokenIndex;return new g(t,t)},h.prototype.getChildCount=function(){return 0},h.prototype.accept=function(t){return t.visitTerminal(this)},h.prototype.getText=function(){return this.symbol.text},h.prototype.toString=function(){return this.symbol.type===d.EOF?"<EOF>":this.symbol.text},(p.prototype=Object.create(h.prototype)).constructor=p,p.prototype.isErrorNode=function(){return!0},p.prototype.accept=function(t){return t.visitErrorNode(this)},f.prototype.walk=function(t,e){if(e instanceof u||void 0!==e.isErrorNode&&e.isErrorNode())t.visitErrorNode(e);else if(e instanceof s)t.visitTerminal(e);else{this.enterRule(t,e);for(var n=0;n<e.getChildCount();n++){var r=e.getChild(n);this.walk(t,r)}this.exitRule(t,e)}},f.prototype.enterRule=function(t,e){var n=e.getRuleContext();t.enterEveryRule(n),n.enterRule(t)},f.prototype.exitRule=function(t,e){var n=e.getRuleContext();n.exitRule(t),t.exitEveryRule(n)},f.DEFAULT=new f,e.RuleNode=a,e.ErrorNode=u,e.TerminalNode=s,e.ErrorNodeImpl=p,e.TerminalNodeImpl=h,e.ParseTreeListener=l,e.ParseTreeVisitor=c,e.ParseTreeWalker=f,e.INVALID_INTERVAL=v},WbBd:function(t,e,n){},WcIR:function(t,e,n){function r(t){t.index=-1,t.line=0,t.column=-1,t.dfaState=null}function i(){return r(this),this}function o(t,e,n,r){return c.call(this,e,r),this.decisionToDFA=n,this.recog=t,this.startIndex=-1,this.line=1,this.column=0,this.mode=s.DEFAULT_MODE,this.prevAccept=new i,this}var a=n("j/5l").Token,s=n("h0lj").Lexer,u=n("7y1Z").ATN,c=n("bcvg").ATNSimulator,l=n("IUCG").DFAState,h=(n("wMEt").ATNConfigSet,n("wMEt").OrderedATNConfigSet),p=n("YFoD").PredictionContext,f=n("YFoD").SingletonPredictionContext,d=n("j0Qz").RuleStopState,g=n("yEAX").LexerATNConfig,v=n("VS1O").Transition,y=n("/Z+8").LexerActionExecutor,_=n("5d5Q").LexerNoViableAltException;i.prototype.reset=function(){r(this)},(o.prototype=Object.create(c.prototype)).constructor=o,o.debug=!1,o.dfa_debug=!1,o.MIN_DFA_EDGE=0,o.MAX_DFA_EDGE=127,o.match_calls=0,o.prototype.copyState=function(t){this.column=t.column,this.line=t.line,this.mode=t.mode,this.startIndex=t.startIndex},o.prototype.match=function(t,e){this.match_calls+=1,this.mode=e;var n=t.mark();try{this.startIndex=t.index,this.prevAccept.reset();var r=this.decisionToDFA[e];return null===r.s0?this.matchATN(t):this.execATN(t,r.s0)}finally{t.release(n)}},o.prototype.reset=function(){this.prevAccept.reset(),this.startIndex=-1,this.line=1,this.column=0,this.mode=s.DEFAULT_MODE},o.prototype.matchATN=function(t){var e=this.atn.modeToStartState[this.mode];o.debug&&console.log("matchATN mode "+this.mode+" start: "+e);var n=this.mode,r=this.computeStartState(t,e),i=r.hasSemanticContext;r.hasSemanticContext=!1;var a=this.addDFAState(r);i||(this.decisionToDFA[this.mode].s0=a);var s=this.execATN(t,a);return o.debug&&console.log("DFA after matchATN: "+this.decisionToDFA[n].toLexerString()),s},o.prototype.execATN=function(t,e){o.debug&&console.log("start state closure="+e.configs),e.isAcceptState&&this.captureSimState(this.prevAccept,t,e);for(var n=t.LA(1),r=e;;){o.debug&&console.log("execATN loop starting closure: "+r.configs);var i=this.getExistingTargetState(r,n);if(null===i&&(i=this.computeTargetState(t,r,n)),i===c.ERROR)break;if(n!==a.EOF&&this.consume(t),i.isAcceptState&&(this.captureSimState(this.prevAccept,t,i),n===a.EOF))break;n=t.LA(1),r=i}return this.failOrAccept(this.prevAccept,t,r.configs,n)},o.prototype.getExistingTargetState=function(t,e){if(null===t.edges||e<o.MIN_DFA_EDGE||e>o.MAX_DFA_EDGE)return null;var n=t.edges[e-o.MIN_DFA_EDGE];return void 0===n&&(n=null),o.debug&&null!==n&&console.log("reuse state "+t.stateNumber+" edge to "+n.stateNumber),n},o.prototype.computeTargetState=function(t,e,n){var r=new h;return this.getReachableConfigSet(t,e.configs,r,n),0===r.items.length?(r.hasSemanticContext||this.addDFAEdge(e,n,c.ERROR),c.ERROR):this.addDFAEdge(e,n,null,r)},o.prototype.failOrAccept=function(t,e,n,r){if(null!==this.prevAccept.dfaState){var i=t.dfaState.lexerActionExecutor;return this.accept(e,i,this.startIndex,t.index,t.line,t.column),t.dfaState.prediction}if(r===a.EOF&&e.index===this.startIndex)return a.EOF;throw new _(this.recog,e,this.startIndex,n)},o.prototype.getReachableConfigSet=function(t,e,n,r){for(var i=u.INVALID_ALT_NUMBER,s=0;s<e.items.length;s++){var c=e.items[s],l=c.alt===i;if(!l||!c.passedThroughNonGreedyDecision){o.debug&&console.log("testing %s at %s\n",this.getTokenName(r),c.toString(this.recog,!0));for(var h=0;h<c.state.transitions.length;h++){var p=c.state.transitions[h],f=this.getReachableTarget(p,r);if(null!==f){var d=c.lexerActionExecutor;null!==d&&(d=d.fixOffsetBeforeMatch(t.index-this.startIndex));var v=r===a.EOF,y=new g({state:f,lexerActionExecutor:d},c);this.closure(t,y,n,l,!0,v)&&(i=c.alt)}}}}},o.prototype.accept=function(t,e,n,r,i,a){o.debug&&console.log("ACTION %s\n",e),t.seek(r),this.line=i,this.column=a,null!==e&&null!==this.recog&&e.execute(this.recog,t,n)},o.prototype.getReachableTarget=function(t,e){return t.matches(e,0,s.MAX_CHAR_VALUE)?t.target:null},o.prototype.computeStartState=function(t,e){for(var n=p.EMPTY,r=new h,i=0;i<e.transitions.length;i++){var o=e.transitions[i].target,a=new g({state:o,alt:i+1,context:n},null);this.closure(t,a,r,!1,!1,!1)}return r},o.prototype.closure=function(t,e,n,r,i,a){var s=null;if(o.debug&&console.log("closure("+e.toString(this.recog,!0)+")"),e.state instanceof d){if(o.debug&&(null!==this.recog?console.log("closure at %s rule stop %s\n",this.recog.ruleNames[e.state.ruleIndex],e):console.log("closure at rule stop %s\n",e)),null===e.context||e.context.hasEmptyPath()){if(null===e.context||e.context.isEmpty())return n.add(e),!0;n.add(new g({state:e.state,context:p.EMPTY},e)),r=!0}if(null!==e.context&&!e.context.isEmpty())for(var u=0;u<e.context.length;u++)if(e.context.getReturnState(u)!==p.EMPTY_RETURN_STATE){var c=e.context.getParent(u),l=this.atn.states[e.context.getReturnState(u)];s=new g({state:l,context:c},e),r=this.closure(t,s,n,r,i,a)}return r}e.state.epsilonOnlyTransitions||r&&e.passedThroughNonGreedyDecision||n.add(e);for(var h=0;h<e.state.transitions.length;h++){var f=e.state.transitions[h];null!==(s=this.getEpsilonTarget(t,e,f,n,i,a))&&(r=this.closure(t,s,n,r,i,a))}return r},o.prototype.getEpsilonTarget=function(t,e,n,r,i,u){var c=null;if(n.serializationType===v.RULE){var l=f.create(e.context,n.followState.stateNumber);c=new g({state:n.target,context:l},e)}else{if(n.serializationType===v.PRECEDENCE)throw"Precedence predicates are not supported in lexers.";if(n.serializationType===v.PREDICATE)o.debug&&console.log("EVAL rule "+n.ruleIndex+":"+n.predIndex),r.hasSemanticContext=!0,this.evaluatePredicate(t,n.ruleIndex,n.predIndex,i)&&(c=new g({state:n.target},e));else if(n.serializationType===v.ACTION)if(null===e.context||e.context.hasEmptyPath()){var h=y.append(e.lexerActionExecutor,this.atn.lexerActions[n.actionIndex]);c=new g({state:n.target,lexerActionExecutor:h},e)}else c=new g({state:n.target},e);else n.serializationType===v.EPSILON?c=new g({state:n.target},e):n.serializationType!==v.ATOM&&n.serializationType!==v.RANGE&&n.serializationType!==v.SET||u&&n.matches(a.EOF,0,s.MAX_CHAR_VALUE)&&(c=new g({state:n.target},e))}return c},o.prototype.evaluatePredicate=function(t,e,n,r){if(null===this.recog)return!0;if(!r)return this.recog.sempred(null,e,n);var i=this.column,o=this.line,a=t.index,s=t.mark();try{return this.consume(t),this.recog.sempred(null,e,n)}finally{this.column=i,this.line=o,t.seek(a),t.release(s)}},o.prototype.captureSimState=function(t,e,n){t.index=e.index,t.line=this.line,t.column=this.column,t.dfaState=n},o.prototype.addDFAEdge=function(t,e,n,r){if(void 0===n&&(n=null),void 0===r&&(r=null),null===n&&null!==r){var i=r.hasSemanticContext;if(r.hasSemanticContext=!1,n=this.addDFAState(r),i)return n}return e<o.MIN_DFA_EDGE||e>o.MAX_DFA_EDGE?n:(o.debug&&console.log("EDGE "+t+" -> "+n+" upon "+e),null===t.edges&&(t.edges=[]),t.edges[e-o.MIN_DFA_EDGE]=n,n)},o.prototype.addDFAState=function(t){for(var e=new l(null,t),n=null,r=0;r<t.items.length;r++){var i=t.items[r];if(i.state instanceof d){n=i;break}}null!==n&&(e.isAcceptState=!0,e.lexerActionExecutor=n.lexerActionExecutor,e.prediction=this.atn.ruleToTokenType[n.state.ruleIndex]);var o=this.decisionToDFA[this.mode],a=o.states.get(e);if(null!==a)return a;var s=e;return s.stateNumber=o.states.length,t.setReadonly(!0),s.configs=t,o.states.add(s),s},o.prototype.getDFA=function(t){return this.decisionToDFA[t]},o.prototype.getText=function(t){return t.getText(this.startIndex,t.index-1)},o.prototype.consume=function(t){t.LA(1)==="\n".charCodeAt(0)?(this.line+=1,this.column=0):this.column+=1,t.consume()},o.prototype.getTokenName=function(t){return-1===t?"EOF":"'"+String.fromCharCode(t)+"'"},e.LexerATNSimulator=o},WmJ1:function(t,e,n){function r(){}var i=n("bz+k"),o=n("j/5l").Token,a=(n("VnEu").RuleNode,n("VnEu").ErrorNode),s=n("VnEu").TerminalNode,u=n("EesY").ParserRuleContext,c=n("6GCw").RuleContext,l=n("7y1Z").INVALID_ALT_NUMBER;r.toStringTree=function(t,e,n){e=e||null,null!==(n=n||null)&&(e=n.ruleNames);var o=r.getNodeText(t,e);o=i.escapeWhitespace(o,!1);var a=t.getChildCount();if(0===a)return o;var s="("+o+" ";a>0&&(o=r.toStringTree(t.getChild(0),e),s=s.concat(o));for(var u=1;u<a;u++)o=r.toStringTree(t.getChild(u),e),s=s.concat(" "+o);return s=s.concat(")")},r.getNodeText=function(t,e,n){if(e=e||null,null!==(n=n||null)&&(e=n.ruleNames),null!==e){if(t instanceof c){var r=t.getAltNumber();return r!=l?e[t.ruleIndex]+":"+r:e[t.ruleIndex]}if(t instanceof a)return t.toString();if(t instanceof s&&null!==t.symbol)return t.symbol.text}var i=t.getPayload();return i instanceof o?i.text:t.getPayload().toString()},r.getChildren=function(t){for(var e=[],n=0;n<t.getChildCount();n++)e.push(t.getChild(n));return e},r.getAncestors=function(t){var e=[];for(t=t.getParent();null!==t;)e=[t].concat(e),t=t.getParent();return e},r.findAllTokenNodes=function(t,e){return r.findAllNodes(t,e,!0)},r.findAllRuleNodes=function(t,e){return r.findAllNodes(t,e,!1)},r.findAllNodes=function(t,e,n){var i=[];return r._findAllNodes(t,e,n,i),i},r._findAllNodes=function(t,e,n,i){n&&t instanceof s?t.symbol.type===e&&i.push(t):!n&&t instanceof u&&t.ruleIndex===e&&i.push(t);for(var o=0;o<t.getChildCount();o++)r._findAllNodes(t.getChild(o),e,n,i)},r.descendants=function(t){for(var e=[t],n=0;n<t.getChildCount();n++)e=e.concat(r.descendants(t.getChild(n)));return e},e.Trees=r},XTzU:function(t,e,n){"use strict";function r(t){var e=[],n=[],r={};return t.forEach(function(t,n){t.forEach(function(t){t.stateClass=function(t){var e="is-disabled";t.isProcess?e="is-process":t.isFinish?e="is-finish":t.isWaiting?e="is-wait":t.isNext&&(e=" is-next");t.isActive&&(e+=" is-active");return e}(t);var n=function(t,e){var n={id:++y,reflexive:!1,data:e};return Object.assign(n,t),n}(t.pos,t);r[t.state]=n,e.push(n)})}),e.forEach(function(t){t.data.nextStates.forEach(function(e){n.push({source:t,target:r[e.state],left:!1,right:!0})})}),{nodes:e,links:n}}function i(t){var e={name:t.state,children:[]};return t.nextStates.forEach(function(t){e.children.push(i(t))}),e}Object.defineProperty(e,"__esModule",{value:!0});var o=n("fnIZ"),a={name:"tool-bar",data:function(){return{hidden:!0}},mounted:function(){this.initHotKeyEvent()},methods:{initHotKeyEvent:function(){var t={ctrl:17,T:84},e={},n=this,r=function(e){return t.ctrl===e||t.T===e};window.addEventListener("keydown",function(i){r(i.keyCode)&&(e[i.keyCode]=!0,e[t.ctrl]&&e[t.T]&&(n.toggleToolBar(),e={}))}),window.addEventListener("keyup",function(t){r(t.keyCode)&&(e[t.keyCode]=!1)})},showAuthDialog:function(){window.FreeLogApp.trigger(window.FreeLogApp.EventCode.showSystemDialog,{callback:function(){console.log("close dialog@toolbar")}})},toggleToolBar:function(){this.hidden=!this.hidden},show:function(){this.hidden=!1},hide:function(){this.hidden=!0}}},s={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ul",{directives:[{name:"show",rawName:"v-show",value:!t.hidden,expression:"!hidden"}],staticClass:"tool-bar-wrap",on:{keyup:function(e){return("button"in e||84===e.keyCode)&&e.ctrlKey?void t.toggleToolBar(e):null}}},[t._m(0),t._v(" "),n("li",{staticClass:"contract-tab",attrs:{title:"合同管理"},on:{click:t.showAuthDialog}},[n("i",{staticClass:"el-icon-document"})])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("li",{staticClass:"user-tab",attrs:{title:"个人中心"}},[e("a",{attrs:{href:"//www.freelog.com/pages/user/index.html",target:"_blank"}},[e("i",{staticClass:"el-icon-fa-user",attrs:{"aria-hidden":"true"}})])])}]},u=n("VU/8")(a,s,!1,function(t){n("/UbI")},"data-v-17e34143",null).exports,c=function(t){function e(e,n){var r=t.container.parentNode.getBoundingClientRect(),i=t.container.getBoundingClientRect(),o=i.x-r.x,a=i.y-r.y,s=c.getBoundingClientRect();n=n||{x:0,y:0};var u=o+e.x,l=a+e.y;u+s.width>i.width&&(u-=s.width+n.x),l+s.height>i.height&&(l-=s.height+n.y),c.style.left=u+"px",c.style.top=l+"px"}function n(){(g=g.data(h)).enter().append("foreignObject").attr({x:-20,y:-10,width:30,height:30}).append("xhtml:div").attr("class","step-tip-wrap").on("mouseenter",function(t){var n=d3.transform(d3.select(this.parentNode).attr("transform")).translate;c.style.opacity=1,s._opts.overlayHandler&&(s._opts.overlayHandler(t,c),setTimeout(e({x:n[0]+30,y:n[1]},{x:30}),20))}).append("div").attr({class:"tooltip"}).html('<i class="el-icon-info"></i>').attr("class",function(t){return"action-btn"}),g.exit().remove(),(f=f.data(h)).style("marker-start",function(t){return t.left?"url(#start-arrow)":""}).style("marker-end",function(t){return t.right?"url(#end-arrow)":""}),f.enter().append("svg:path").attr("class",function(t){return t.source.data.stateClass+" link"}).style("marker-start",function(t){return t.left?"url(#start-arrow)":""}).style("marker-end",function(t){return t.right?"url(#end-arrow)":""}),f.exit().remove(),(d=d.data(l,function(t){return t.id})).selectAll("circle").classed("reflexive",function(t){return t.reflexive}),d.enter().append("svg:g").append("svg:circle").attr("class",function(t){return"node "+(t.data.stateClass||"")}).attr("r",a).on("mouseenter",function(t){c.style.opacity=1;var n=d3.transform(d3.select(this.parentNode).attr("transform")).translate;s._opts.overlayHandler&&(s._opts.overlayHandler(t.data,c),setTimeout(e({x:n[0]+40,y:n[1]},{x:40}),20))}),d.exit().remove(),p.start()}var r,i=(t=t||{}).width||960,o=t.height||500,a=(d3.scale.category10(),t.radius||20),s=this,u="string"==typeof t.container?document.querySelector(t.container):t.container;this._opts=t,t.container?r=d3.select(t.container):(r=d3.select("body").append("svg"),t.container=r),r.attr("width",i).attr("height",o);var c=t.$tip||u.parentNode.querySelector(".js-svg-tip");c||((c=document.createElement("div")).classList.add("tip"),u.parentNode.appendChild(c));var l=[],h=[],p=d3.layout.force().size([i,o]).linkDistance(150).charge(-500).on("tick",function(){f.attr("d",function(t){var e=t.target.x-t.source.x,n=t.target.y-t.source.y,r=Math.sqrt(e*e+n*n),i=e/r,o=n/r,a=t.left?17:12,s=t.right?17:12;return"M"+(t.source.x+a*i)+","+(t.source.y+a*o)+"L"+(t.target.x-s*i)+","+(t.target.y-s*o)}),g.attr("transform",function(t){return"translate("+(t.target.x+t.source.x)/2+","+(t.target.y+t.source.y)/2+")"}),d.attr("transform",function(t){return"translate("+t.x+","+t.y+")"})});r.append("svg:defs").append("svg:marker").attr("id","end-arrow").attr("viewBox","0 -5 10 10").attr("refX",6).attr("markerWidth",3).attr("markerHeight",3).attr("orient","auto").append("svg:path").attr("d","M0,-5L10,0L0,5").attr("fill","#000"),r.append("svg:defs").append("svg:marker").attr("id","start-arrow").attr("viewBox","0 -5 10 10").attr("refX",4).attr("markerWidth",3).attr("markerHeight",3).attr("orient","auto").append("svg:path").attr("d","M10,-5L0,0L10,5").attr("fill","#000");var f=r.append("svg:g").attr("class","state-link").selectAll("path"),d=r.append("svg:g").selectAll("g"),g=r.append("svg:g").attr("class","state-step").selectAll("g");return t.nodes.forEach(function(t){l.push(t),n()}),t.links.forEach(function(t){h.push(t),n()}),this},l={name:"license-event",data:function(){return{accepted:!1,licenses:[]}},props:["data"],mounted:function(){this.loadLicenses()},methods:{loadLicenses:function(){var t=this,e=this.data.event.params.map(function(e){return t.loadLicenseContent(e)});Promise.all(e).then(function(e){t.licenses=e}).catch(function(e){t.$message.error(e)})},loadLicenseContent:function(t){var e=this;return this.$axios.get("/v1/auths/resource/"+t+".data").then(function(t){return t.data}).catch(function(t){e.$message.error(t)})},doneHandler:function(t){this.$emit("close",{shouldUpdate:t})},signHandler:function(){var t=this;this.$axios.post("/v1/contracts/signingLicenses",{contractId:this.data.contract.contractId,eventId:this.data.event.eventId,licenseIds:this.data.event.params}).then(function(e){0===e.data.errcode?(t.$message.success("签约成功"),t.doneHandler(!0)):t.$message.error(e.data.msg)})}}},h={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"license-wrap"},[t.data?n("el-form",{attrs:{"label-position":"left","label-width":"80px",model:t.data}},[n("el-form-item",{attrs:{label:"协议"}},[n("div",{staticClass:"license-window"},t._l(t.licenses,function(e){return n("pre",{staticClass:"license-format"},[t._v("          "+t._s(e)+"\n        ")])}))]),t._v(" "),n("el-form-item",[n("el-checkbox",{staticClass:"accept-license",model:{value:t.accepted,callback:function(e){t.accepted=e},expression:"accepted"}},[t._v("接受协议")])],1),t._v(" "),n("div",{staticClass:"center"},[n("el-button",{on:{click:t.doneHandler}},[t._v("取 消")]),t._v(" "),n("el-button",{attrs:{type:"primary",disabled:!t.accepted},on:{click:t.signHandler}},[t._v("sign")])],1)],1):t._e()],1)},staticRenderFns:[]},p=n("VU/8")(l,h,!1,function(t){n("x18q")},"data-v-4b768da4",null).exports,f=n("nOLo"),d={name:"transaction-event",data:function(){return{accounts:[],password:"",fromAccountId:"",showError:!1}},props:{data:{type:Object,default:function(){return null}}},computed:{unitType:function(){return this.data.event.params[0].substr(0,4)}},mounted:function(){var t=this;this.$axios.get("/v1/pay/accounts").then(function(e){t.accounts=e.data.data})},methods:{doneHandler:function(t){this.$emit("close",{shouldUpdate:t})},payResultHandler:function(t){var e=f.a[t.status],n=e&&e.desc||"未知的支付状态";1===t.status&&(n+="，稍后查询支付结果"),this.$message.success(n)},pay:function(){var t=this;this.$axios.post("/v1/pay",{targetId:this.data.contract.contractId,orderType:1,fromAccountId:this.fromAccountId,toAccountId:this.data.event.params[0],amount:this.data.event.params[1],password:this.password}).then(function(e){var n=e.data;0===n.errcode?(t.showError=!1,t.$message.success("操作成功"),t.payResultHandler(n.data),t.doneHandler({shouldUpdate:2===n.status,payResult:n})):(t.showError=!0,t.$message.error(n.msg))})}}},g={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"contract-transaction-wrap"},[t.showError?n("el-alert",{attrs:{type:"warning"}},[t._v("\n      未设置支付密码，"),n("a",{staticStyle:{color:"#409EFF"},attrs:{href:"//www.freelog.com/pages/account/security.html",target:"_blank"}},[t._v("去设置")])]):t._e(),t._v(" "),t.data?n("el-form",{attrs:{"label-position":"left","label-width":"80px",model:t.data}},[n("el-form-item",{attrs:{label:"资源名称"}},[t._v("\n        "+t._s(t.data.contract.resourceDetail.resourceName)+"\n      ")]),t._v(" "),n("el-form-item",{attrs:{label:"资源类型"}},[t._v("\n        "+t._s(t.data.contract.resourceDetail.resourceType)+"\n      ")]),t._v(" "),n("el-form-item",{attrs:{label:"contractId"}},[t._v("\n        "+t._s(t.data.event.contractId)+"\n      ")]),t._v(" "),n("el-form-item",{attrs:{label:"甲方"}},[t._v("\n        "+t._s(t.data.contract.partyOne)+"\n      ")]),t._v(" "),n("el-form-item",{attrs:{label:"乙方"}},[t._v("\n        "+t._s(t.data.contract.partyTwo)+"\n      ")]),t._v(" "),n("el-form-item",{attrs:{label:"转入账号"}},[t._v("\n        "+t._s(t.data.event.params[0])+"\n      ")]),t._v(" "),n("el-form-item",{attrs:{label:"转账金额"}},[t._v("\n        "+t._s(t._f("humanizeCurrency")(t.data.event.params[1]))+" "+t._s(t.unitType)+"\n      ")]),t._v(" "),n("el-form-item",{attrs:{label:"转出账号"}},[n("el-select",{attrs:{size:"small",placeholder:"请选择"},model:{value:t.fromAccountId,callback:function(e){t.fromAccountId=e},expression:"fromAccountId"}},t._l(t.accounts,function(t){return n("el-option",{key:t.accountId,attrs:{label:t.accountId,value:t.accountId}})})),t._v(" "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},slot:"content"},[n("p",[n("a",{staticStyle:{color:"white"},attrs:{href:"//www.freelog.com/pages/account/create.html",target:"_blank"}},[t._v("没有账号？去添加一个")])])]),t._v(" "),n("i",{staticClass:"el-icon-question"})])],1),t._v(" "),n("el-form-item",{attrs:{label:"支付密码"}},[n("el-input",{staticStyle:{"max-width":"300px"},attrs:{type:"password",size:"small",placeholder:"请输入支付密码"},model:{value:t.password,callback:function(e){t.password=e},expression:"password"}})],1),t._v(" "),n("el-form-item",[n("el-button",{on:{click:t.doneHandler}},[t._v("取 消")]),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:t.pay}},[t._v("确 定")])],1)],1):t._e()],1)},staticRenderFns:[]},v=n("VU/8")(d,g,!1,function(t){n("U7AC")},null,null).exports;n("iMi6");var y=-1,_={signing:{name:"license-event",title:"签约license"},transaction:{name:"transaction-event",title:"支付"}},m={name:"contract-state",props:{data:{type:Object,default:function(){return null}}},data:function(){var t=this;return{showEventDialog:!1,eventComponentOpt:{},params:{},popData:{},opts:{radius:12,width:400,height:200,container:null,overlayHandler:function(e){var n=Object.assign({},e);if(e.source){n.type="path",n.disabled=e.source.data.state!==t.data.fsmState;var r=e.source.data.targetEvents.filter(function(t){return t.nextState===e.target.data.state});n.event=r[0]&&r[0].event||{}}else n.type="node";t.popData=n,t.$refs.popover.showPopper=!0}}}},components:{LicenseEvent:p,TransactionEvent:v},watch:{data:"redraw"},mounted:function(){this.opts.$tip=this.$el.querySelector(".js-svg-tip"),this.opts.container=this.$refs.stateTree,this.opts.width=.8*this.getWidth(),this.draw()},methods:{getWidth:function(){for(var t,e=this.$el.parentNode,n=void 0;;){if(n=getComputedStyle(e),t=parseInt(n.width),Number.isInteger(t))break;e=e.parentNode}return t},updateContractState:function(){var t=this;return this.loadContractDetail(this.data.contractId).then(function(e){return Object.assign(t.data,e),{contract:e}})},loadContractDetail:function(t){return window.QI.fetch("/v1/contracts/"+t).then(function(t){return 200===t.status?t.json():Promise.reject(t)}).then(function(t){return 0===t.ret&&0===t.errcode?t.data:Promise.reject(t)})},activateContractHandler:function(t){function e(t){var e=Object.assign({},_[t.type]);e.data={contract:r,event:t},n.showEventDialog=!0,n.eventComponentOpt=e}var n=this,r=n.data;n.params=Object.assign(n.popData.event,{contractId:r.contractId});var i=t.source.data,o=t.target.data.state,a=i.targetEvents.filter(function(t){return t.nextState===o});if(0===a.length)return n.$message.error("没有可触发的事件");a.forEach(function(t){"compoundEvents"===t.event.type?t.event.params.forEach(function(t){e(t)}):e(t.event)})},hideDialogHandler:function(t){this.closeDialogHandler(),t()},closeDialogHandler:function(t){var e=this;t&&t.shouldUpdate&&(this.$refs.popover.showPopper=!1,setTimeout(function(){e.updateContractState().then(function(t){e.$eventBus.$emit("updateList",{update:t}),e.draw()})},500)),this.$refs.eventDialog.hide(),this.eventComponentOpt={}},hidePopover:function(t){["circle","path"].includes(t.target.nodeName)||this.$refs.popover.$el.contains(t.target)?t.stopPropagation():this.$refs.popover.showPopper=!1},draw:function(){if(this.data.contractId){var t=function(t){function e(t){return{nextStates:[],targetEvents:[],state:t,isActive:s.includes(t),isProcess:t===i,deep:0}}function n(t){l[t.deep]||(l[t.deep]=[]),l[t.deep].push(t),t.nextStates.length&&t.nextStates.forEach(function(e){var r=c[e.state];r.deep=t.deep+1,t.isProcess?r.isNext=!0:r.isWaiting=!0,r.isProcess&&(t.isFinish=!0),r.targetEvents.length&&r.targetEvents.forEach(function(e){c[e.nextState]&&e.nextState!==t.state&&r.nextStates.push(c[e.nextState])}),n(r),r.isFinish&&(t.isFinish=!0)})}var r,i=t.fsmState,o=t.policySegment,a=o.fsmDescription,s=o.activatedStates,u=o.initialState,c={},l=[];return a.forEach(function(t){var n=c[t.currentState]||e(t.currentState),r=c[t.nextState];n.targetEvents.push(t),r||(r=e(t.nextState),c[t.nextState]=r),t.currentState===u&&n.nextStates.push(r),c[t.currentState]=n}),r=c[u],n(r),{stateTreeRoot:r,stateMap:c,nodeList:l}}(this.data);!function(t,e){var n=i(t.stateTreeRoot),r=e.height,o=e.width;d3.layout.tree().size([r,o]).nodes(n).forEach(function(e){var n=t.stateMap[e.name];if(n){n.pos={},["depth","x","y"].forEach(function(t){n.pos[t]=e[t]});var r=n.pos.x;n.pos.x=n.pos.y,n.pos.y=r}})}(t,this.opts);var e=r(t.nodeList);Object.assign(this.opts,e),this.$refs.stateTree.childNodes.forEach(function(t){return t.remove()}),new c(this.opts)}},redraw:function(){this.draw()},update:function(t){this.data=t,this.draw()}}},x={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{ref:"wrapper",staticClass:"contract-state-wrap",on:{click:t.hidePopover}},[n("el-dialog",{ref:"eventDialog",attrs:{title:t.eventComponentOpt.title,"append-to-body":"",visible:t.showEventDialog,"before-close":t.hideDialogHandler,width:"40%"},on:{"update:visible":function(e){t.showEventDialog=e}}},[n(t.eventComponentOpt.name,{tag:"component",attrs:{data:t.eventComponentOpt.data},on:{close:t.closeDialogHandler}})],1),t._v(" "),n("el-popover",{ref:"popover",attrs:{"popper-class":"contract-step-tip js-svg-tip",width:"250"}},[n("div",[n("div",{directives:[{name:"show",rawName:"v-show",value:"node"==t.popData.type,expression:"popData.type == 'node'"}]},[n("h3",[t._v("合同状态:"+t._s(t.popData.state))]),t._v(" "),n("ul",[n("li",{directives:[{name:"show",rawName:"v-show",value:t.popData.isActive,expression:"popData.isActive"}]},[t._v("当合同状态处于此状态时，合同则有效")]),t._v(" "),n("li",{directives:[{name:"show",rawName:"v-show",value:t.popData.isProcess,expression:"popData.isProcess"}]},[t._v("合同处于当前状态")]),t._v(" "),n("li",{directives:[{name:"show",rawName:"v-show",value:t.popData.isFinish,expression:"popData.isFinish"}]},[t._v("当前状态已执行过")])])]),t._v(" "),"path"==t.popData.type&&t.popData.source?n("div",[n("p",[t._v("event name: "+t._s(t.popData.event.eventName))]),t._v(" "),n("p",[t._v("from "+t._s(t.popData.source.data.state)+" to "+t._s(t.popData.target.data.state))]),t._v(" "),n("el-button",{attrs:{size:"mini",disabled:t.popData.disabled},on:{click:function(e){t.activateContractHandler(t.popData)}}},[t._v("去执行")])],1):t._e()])]),t._v(" "),n("svg",{ref:"stateTree"})],1)},staticRenderFns:[]},T=n("VU/8")(m,x,!1,function(t){n("SS0H")},null,null).exports,E=n("kIFb"),S={name:"presentables",data:function(){return{presentables:[],CONTRACT_STATUS_ACTION_TIPS:{0:"通知节点","-1":"去创建合同",1:"去执行合同",2:"去执行合同",3:"合同生效中",4:"用户终止合同",5:"系统终止合同",6:"合同已终止"}}},props:{data:{type:Array,default:function(){return null}}},mounted:function(){this.formatPresentableList(this.data),this.$eventBus.$on("updateList",this.refresh.bind(this))},watch:{data:function(){this.formatPresentableList(this.data)}},methods:{refresh:function(t){if(t&&t.update){var e=t.update.contract;t.update.contract&&this.presentables.forEach(function(t){t.contractId===e.contractId&&Object.assign(t.contractDetail,e)})}this.formatPresentableList(this.presentables)},formatPresentableList:function(t){var e=this;t.forEach(function(t){e.resovlePresentableStatus(t)}),(t=t.slice(0)).sort(function(t,e){return t._contractStatus-e._contractStatus}),this.presentables=t},resovlePresentableStatus:function(t){t.contractDetail?t._contractStatus=t.contractDetail.status:t.nodeContractDetail?(t.name=t.resourceDetail.resourceName,t._contractStatus=E.a.invalid):t._contractStatus=E.a.uncreated,t._statusInfo=E.b[t._contractStatus]},notifyNodeUser:function(){this.$message.success("已通知")},tabActionHandler:function(t){var e={content:"contract-detail",data:t,title:"合同管理",name:"tab_"+t.presentableId};switch(t._contractStatus){case E.a.invalid:this.notifyNodeUser();break;case E.a.uncreated:Object.assign(e,{title:"创建合同",content:"contract-creator",name:"create_"+t.presentableId});case E.a.initial:case E.a.running:case E.a.activated:case E.a.userTerminated:case E.a.sysTerminated:case E.a.terminated:this.$emit("tabChange",e);break;default:this.$message("no action")}}}},C={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticStyle:{width:"100%"}},[n("el-table",{attrs:{data:t.presentables,stripe:"","cell-class-name":"presentable-cell"}},[n("el-table-column",{attrs:{label:"资源名称","min-width":"250",prop:"resourceDetail.resourceName"}}),t._v(" "),n("el-table-column",{attrs:{label:"合同名称","min-width":"250",prop:"name"}}),t._v(" "),n("el-table-column",{attrs:{label:"资源类型",prop:"resourceDetail.resourceType",width:"120"}}),t._v(" "),n("el-table-column",{attrs:{"min-width":"120",label:"状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-tag",{attrs:{type:e.row._statusInfo.type}},[t._v(t._s(e.row._statusInfo.desc))])]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"操作",align:"center",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{size:"mini"},on:{click:function(n){t.tabActionHandler(e.row,e.$index)}}},[t._v("\n                    "+t._s(t.CONTRACT_STATUS_ACTION_TIPS[e.row._contractStatus])+"\n                ")])]}}])})],1)],1)},staticRenderFns:[]},b=n("VU/8")(S,C,!1,function(t){n("NUe/")},null,null).exports,A={name:"contract-steps",data:function(){return{}},props:{step:{type:Number,default:function(){return 0}}},mounted:function(){},methods:{}},w={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("el-steps",{staticClass:"contract-steps",attrs:{active:this.step,"finish-status":"success",simple:""}},[e("el-step",{attrs:{title:"1、创建合同"}}),this._v(" "),e("el-step",{attrs:{title:"2、执行合同"}}),this._v(" "),e("el-step",{attrs:{title:"3、合同生效"}})],1)],1)},staticRenderFns:[]},R=n("VU/8")(A,w,!1,function(t){n("Ayu9")},"data-v-0e0dde9d",null).exports,N=n("iCeg"),I=n.n(N),k={transaction:function(){return"支付事件"},signing:function(t){return"进入协议签署页面"},contractGuaranty:function(){return"进入支付保证金"},period:function(){return"周期性支付"},arrivalDate:function(t){return 1===t[0]?"到达日期"+t[1]+"进入下一个状态":0===t[0]?t[1]+"天后进入下一个状态":void 0}},M={name:"contract-content",data:function(){return{segmentDetail:""}},props:{data:{type:Object}},watch:{data:"render"},mounted:function(){this.render()},methods:{render:function(){this.currentEvents=this.resolveContractEvents(this.data),this.segmentDetail=this.parseContract(this.data)},cmdHandler:function(t){var e=t.target.dataset.action;this[e]&&this[e](t.target.dataset)},execEvent:function(t){this.$emit("execute",this.currentEvents[t.index])},resolveContractEvents:function(t){var e=[],n=t.fsmState,r=[];t.policySegment.fsmDescription.forEach(function(t){t.currentState===n&&r.push(t)});var i=function(t){var n=k[t.type];n&&e.push({desc:n(t.type),eventId:t.eventId,type:t.type,params:t.params})};return r.forEach(function(t){"compoundEvents"===t.event.type?t.event.params.forEach(i):i(t.event)}),e},fillSpace:function(t){return t.replace(/^(\s+)/g,function(t){var e=new Array(t.length);return e.fill("&nbsp;"),e.join("")})},getState:function(t){var e=this.data,n=[];return t===e.fsmState&&n.push("cur-state"),e.policySegment.activatedStates.includes(t)&&n.push("active-state"),n.join(" ")},tagState:function(t){var e=this;return t=t.replace(/in (\S+)\s*:/,function(t,n){var r=e.escapeOutputState(n),i='<span class="from-state '+e.getState(n)+'" data-action="info" data-state="'+n+'">'+r+'<i class="el-icon-fa-stop-circle-o cur-step-icon"></i><span class="state-tip">当前合同状态</span></span>';return t.replace(n,i)})},getEvent:function(t){var e;return this.currentEvents.forEach(function(n,r){n.params.every(function(e){return t.includes(e)})&&((e=n).index=r)}),e},escapeOutputState:function(t){return t=t.replace("<","&lt;").replace(">","&gt;")},tagOperation:function(t){var e=this;return t=t.replace(/proceed\s+to\s+(\S+)\s+on\s+(.+)$/,function(t,n,r){var i=e.getEvent(r),o='<span class="to-state">'+e.escapeOutputState(n)+"</span>",a="";return a=i?'<span class="operation-tag" data-action="execEvent" data-index="'+i.index+'">'+r+'<i class="el-icon-fa-hand-o-left cur-step-icon"></i></span>':'<span class="operation-tag">'+r+"</span>",t=t.replace(n,o),t=t.replace(r,a)})},parseContract:function(t){var e=this,n="";return I.a.beautify(t.policySegment.segmentText).split(/\n/).forEach(function(t){var r=e.fillSpace(t);r=e.tagState(r),r=e.tagOperation(r),n+="<p>"+r+"</p>"}),t._segmentDetail=n,n}}},L={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"contract-detail-content-wrapper"},[e("div",{domProps:{innerHTML:this._s(this.segmentDetail)},on:{click:this.cmdHandler}})])},staticRenderFns:[]},O=n("VU/8")(M,L,!1,function(t){n("WbBd")},null,null).exports,P=n("fl6T"),D={transaction:{type:"transaction-event",title:"支付"},signing:{type:"license-event",title:"签署"}},U={name:"contract-info-detail",data:function(){return{refreshing:!1,eventComponent:"",dialogTitle:"",showEventExecDialog:!1,selectedContractEvent:"",showData:{contractStatus:""}}},components:{ContractState:T,ContractContent:O,LicenseEvent:p,TransactionEvent:v},props:{data:{type:Object,default:function(){return null}},collapseName:String},watch:{data:"formatData"},methods:{loadContractDetail:function(t){return window.QI.fetch("/v1/contracts/"+t).then(function(t){return 200===t.status?t.json():Promise.reject(t)}).then(function(t){return 0===t.ret&&0===t.errcode?t.data:Promise.reject(t)})},refreshHandler:function(){var t=this;this.refreshing||(this.refreshing=!0,this.updateContract().then(function(e){t.refreshing=!1,t.$eventBus.$emit("updateList",{update:e}),t.formatData()}).catch(function(){t.refreshing=!1}))},formatData:function(){var t=this,e=this.data;if(e.contractDetail){e.contractDetail.resourceDetail||(e.contractDetail.resourceDetail=e.resourceDetail);var n=e.contractDetail.policySegment.users.reduce(function(t,e){return t=t.concat(e.users)},[]),r=E.b[e.contractDetail.status];this.$set(e.contractDetail,"_statusInfo",r),this.$set(e.contractDetail,"_userGroup",n.join("/")),this.$store.dispatch("getCurrentUserInfo").then(function(n){t.$set(e.contractDetail,"partyTwoInfo",n)}),this.loadNodeInfo().then(function(n){t.$set(e.contractDetail,"partyOneInfo",n)})}},loadNodeInfo:function(){var t=this,e=window.__auth_info__.__auth_node_id__;return new Promise(function(n){var r=P.b.get("nodesInfo")||{};r[e]?n(r[e]):t.$axios.get("/v1/nodes/"+e).then(function(t){r[e]=t.data.data,P.b.set("nodesInfo",r),n(t.data.data)})})},handleCloseDialog:function(t){this.closeDialogHandler(),t()},updateContract:function(){var t=this;return this.loadContractDetail(this.data.contractDetail.contractId).then(function(e){return t.$set(t.data,"contractDetail",e),{contract:e}})},closeDialogHandler:function(t){var e=this;t&&t.shouldUpdate&&setTimeout(function(){e.updateContract().then(function(t){e.$eventBus.$emit("updateList",{update:t}),e.formatData()})},500),this.eventComponent="",this.dialogTitle="",this.showEventExecDialog=!1},executeContractHandler:function(t){var e=D[t.type];this.selectedContractEvent={event:t,contract:this.data.contractDetail},this.eventComponent=e.type,this.dialogTitle=e.title,this.showEventExecDialog=!0}}},F={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"presentable-detail"},[n("el-form",{staticClass:"presentable-info small-el-form",attrs:{"label-position":"right",inline:"","label-width":"120px"}},[n("el-form-item",{staticClass:"info-row",attrs:{label:"presentable名"}},[t._v("\n      "+t._s(t.data.name)+"\n    ")]),t._v(" "),n("el-form-item",{staticClass:"info-row",attrs:{label:"资源名"}},[t._v("\n      "+t._s(t.data.resourceDetail.resourceName)+"\n    ")]),t._v(" "),n("el-form-item",{staticClass:"info-row",attrs:{label:"资源类型"}},[t._v("\n      "+t._s(t.data.resourceDetail.resourceType)+"\n    ")]),t._v(" "),t.data.contractDetail?[n("el-form-item",{staticClass:"info-row",attrs:{label:"合同ID"}},[t._v("\n        "+t._s(t.data.contractDetail.contractId)+"\n      ")]),t._v(" "),n("el-form-item",{staticClass:"info-row",attrs:{label:"创建日期"}},[n("span",[t._v(t._s(t._f("fmtDate")(t.data.contractDetail.createDate)))])]),t._v(" "),t.data.contractDetail._statusInfo?n("el-form-item",{staticClass:"info-row",attrs:{label:"合同状态"}},[n("el-tag",{attrs:{type:t.data.contractDetail._statusInfo.type}},[t._v("\n          "+t._s(t.data.contractDetail._statusInfo.desc)+"\n        ")])],1):t._e(),t._v(" "),n("el-form-item",{staticClass:"info-row",attrs:{label:"执行状态"}},[t._v("\n        "+t._s("none"===t.data.contractDetail.fsmState?"正在初始化合同中":t.data.contractDetail.fsmState)+"\n        "),t.data.contractDetail.status<3?n("i",{staticClass:"el-icon-refresh",class:{loading:t.refreshing},on:{click:t.refreshHandler}}):t._e()]),t._v(" "),n("el-form-item",{staticClass:"info-row",attrs:{label:"甲方"}},[t.data.contractDetail.partyOneInfo?n("span",[t._v(t._s(t.data.contractDetail.partyOneInfo.nodeName))]):n("span",[t._v(t._s(t.data.contractDetail.partyOne))])]),t._v(" "),n("el-form-item",{staticClass:"info-row",attrs:{label:"乙方"}},[t.data.contractDetail.partyTwoInfo?n("span",[t._v(t._s(t.data.contractDetail.partyTwoInfo.nickname))]):n("span",[t._v(t._s(t.data.contractDetail.partyTwo))])]),t._v(" "),n("el-form-item",{staticClass:"info-row",attrs:{label:"合同目标用户"}},[t._v("\n        "+t._s(t.data.contractDetail._userGroup)+"\n      ")])]:t._e()],2),t._v(" "),n("el-dialog",{ref:"eventDialog",attrs:{title:t.dialogTitle,visible:t.showEventExecDialog,"before-close":t.handleCloseDialog,"append-to-body":"",center:!0,width:"40%"},on:{"update:visible":function(e){t.showEventExecDialog=e}}},[n(t.eventComponent,{tag:"component",attrs:{data:t.selectedContractEvent},on:{close:t.closeDialogHandler}})],1),t._v(" "),t.data.contractDetail?n("div",{staticStyle:{"margin-top":"15px"}},[n("el-collapse",{attrs:{value:t.collapseName}},[n("el-collapse-item",{attrs:{title:"合同流程",name:"process"}},[n("contract-content",{staticStyle:{"padding-left":"20px"},attrs:{data:t.data.contractDetail},on:{execute:t.executeContractHandler}})],1)],1)],1):t._e()],1)},staticRenderFns:[]},H=n("VU/8")(U,F,!1,function(t){n("HK9E")},"data-v-aeff08f6",null).exports,j={name:"contract-detail",data:function(){return{}},components:{ContractState:T,ContractSteps:R,ContractInfoDetail:H},props:{data:{type:Object,default:function(){return null}}},watch:{data:"formatData"},mounted:function(){this.formatData()},methods:{formatData:function(){var t=this.data;this.$set(this.data,"_showContractSteps",t.contractDetail.status<3)}}},B={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("contract-steps",{directives:[{name:"show",rawName:"v-show",value:this.data._showContractSteps,expression:"data._showContractSteps"}],attrs:{step:1}}),this._v(" "),e("contract-info-detail",{staticClass:"contract-detail",attrs:{data:this.data,collapseName:"process"}})],1)},staticRenderFns:[]},z=n("VU/8")(j,B,!1,function(t){n("AqiS")},"data-v-216c4411",null).exports,q={name:"contract-creator",data:function(){return{loading:!1,btnType:""}},props:{data:{type:Object,default:function(){return null}},tabName:String},watch:{data:"formatPolicy"},components:{ContractSteps:R,ContractInfoDetail:H},mounted:function(){this.formatPolicy()},methods:{formatPolicy:function(){try{var t=I.a.beautify(this.data.policyText);this.$set(this.data,"_formatPolicyText",t),this.data.segments.forEach(function(t){t.detail._formatPolicyText=I.a.beautify(t.detail.segmentText)})}catch(t){this.$message.error(t)}this.parsePolicy(this.data)},parsePolicy:function(t){var e=[];t.policy.forEach(function(t){var n={detail:t,states:t.fsmDescription,selected:!1};t._userGroup=t.users.reduce(function(t,e){return t=t.concat(e.users)},[]).join("/"),e.push(n)}),this.$set(this.data,"segments",e)},policyHandler:function(){this.btnType?this.gotoExecuteContract():this.signPolicyHandler()},gotoExecuteContract:function(){var t={content:"contract-detail",data:this.data,title:"合同管理",name:"tab_"+this.data.presentableId};this.$emit("tabChange",{action:"close",tabName:this.tabName}),this.$emit("tabChange",t)},signPolicyHandler:function(){var t=this,e=t.data;if(!e.selectedSegmentId)return this.$message.warning("没有选择策略");var n="<ul><li>presentable name: "+e.name+"</li><li>resource name: "+e.resourceDetail.resourceName+"</li></ul>";this.$confirm("<h3>合同详情</h3><p>"+n+"</p>确定签约合同？","提示",{confirmButtonText:"确定",cancelButtonText:"取消",dangerouslyUseHTMLString:!0,type:"warning"}).then(function(){t.createContract(e)}).catch(function(){})},cancelSegmentSelection:function(){this.data.selectedSegmentId=""},loadContractDetail:function(t){return window.QI.fetch("/v1/contracts/"+t).then(function(t){return 200===t.status?t.json():Promise.reject(t)}).then(function(t){return 0===t.ret&&0===t.errcode?t.data:Promise.reject(t)})},updateContractDetail:function(t){var e=this;return new Promise(function(n){if("none"===t.fsmState)return e.loadContractDetail(t.contractId).then(function(e){Object.assign(t,e),n(t)});n(t)})},loadPartyTwo:function(){var t=this;return new Promise(function(e){window.__auth_info__.__auth_user_id__?e(window.__auth_info__.__auth_user_id__):t.$store.dispatch("getCurrentUserInfo").then(function(t){e(t.userId)})})},createContract:function(t){var e=this,n=this;n.loading||(n.loading=!0,this.loadPartyTwo().then(function(r){if(!r)return e.$message.error("获取不到用户ID");window.QI.fetch("/v1/contracts",{method:"POST",data:{contractType:3,targetId:t.presentableId,segmentId:t.selectedSegmentId,serialNumber:t.serialNumber,partyTwo:r}}).then(function(t){return t.json()}).then(function(t){n.loading=!1,0===t.ret&&0===t.errcode?(n.btnType="success",n.$message.success("签约成功"),e.updateContractDetail(t.data).then(function(t){n.$set(n.data,"contractDetail",t),n.$eventBus.$emit("updateList")})):n.$message.error(t.msg)})}).catch(function(t){n.loading=!1,n.$error.showErrorMessage(t)}))}}},V={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("contract-steps"),t._v(" "),n("contract-info-detail",{attrs:{data:t.data}}),t._v(" "),n("el-table",{directives:[{name:"show",rawName:"v-show",value:!t.data.contractDetail,expression:"!data.contractDetail"}],staticClass:"segments",staticStyle:{width:"100%"},attrs:{data:t.data.segments,stripe:""}},[n("el-table-column",{attrs:{type:"expand"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("pre",[t._v(t._s(e.row.detail._formatPolicyText||t.data._formatPolicyText))])]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"用户",prop:"detail._userGroup"}}),t._v(" "),n("el-table-column",{attrs:{label:"合同ID",prop:"detail.segmentId"}}),t._v(" "),n("el-table-column",{scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-radio",{staticClass:"select-btn",attrs:{label:e.row.detail.segmentId},model:{value:t.data.selectedSegmentId,callback:function(e){t.$set(t.data,"selectedSegmentId",e)},expression:"data.selectedSegmentId"}},[t._v("选择\n                ")]),t._v(" "),n("el-tooltip",{directives:[{name:"show",rawName:"v-show",value:t.data.selectedSegmentId===e.row.detail.segmentId,expression:"data.selectedSegmentId===scope.row.detail.segmentId"}],staticClass:"item",attrs:{effect:"dark",content:"取消选择",placement:"top"}},[n("i",{staticClass:"el-icon-circle-close-outline",on:{click:function(n){t.cancelSegmentSelection(e.row)}}})])]}}])})],1),t._v(" "),n("div",{staticClass:"actions"},[n("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{type:t.btnType,disabled:!t.data.selectedSegmentId},on:{click:t.policyHandler}},[t._v(t._s(t.btnType?"去执行合同":"创建合同")+"\n        ")])],1)],1)},staticRenderFns:[]},G={data:function(){return{showUpgrade:!window.__supports,shouldShowAuthDialog:!1,presentables:[],tabs:[],activeTabName:"presentables"}},components:{ToolBar:u,ContractState:T,Presentables:b,ContractCreator:n("VU/8")(q,V,!1,function(t){n("DHN+")},"data-v-756c92e6",null).exports,ContractDetail:z},mounted:function(){this.$emit("ready",this)},methods:{refreshHandler:function(){this.$refs.list.refresh()},_tabChange:function(t){if("close"===t.action)this._removeTab(t.tabName);else{this.tabs.some(function(e){return e.name===t.name})||this.tabs.push(t),this.activeTabName=t.name}},_removeTab:function(t){var e=this,n=this.activeTabName;n===t&&this.tabs.forEach(function(r,i){if(r.name===t){var o=e.tabs[i+1]||e.tabs[i-1];n=o?o.name:null}}),this.activeTabName=n||"presentables",this.tabs=this.tabs.filter(function(e){return e.name!==t})},_closeDialogHandler:function(){this.$emit("close",{presentables:this.presentables})},showAuthDialog:function(){this.shouldShowAuthDialog=!0},appendData:function(t){this.presentables.some(function(e){return e.presentableId===t.presentableId})||this.presentables.push(t)},showToolBar:function(){this.$refs.toolbar.show()},hideToolBar:function(){this.$refs.toolbar.hide()}}},Y={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"app"}},[t.showUpgrade?n("el-alert",{attrs:{title:"",type:"warning",center:"","show-icon":""}},[t._v("请使用"),n("a",{attrs:{href:"https://www.google.cn/chrome/index.html"}},[t._v("chrome")]),t._v("访问本页面！")]):n("div",[n("tool-bar",{ref:"toolbar"}),t._v(" "),n("el-dialog",{attrs:{"close-on-click-modal":!1,title:"合同管理",visible:t.shouldShowAuthDialog,fullscreen:!1,"custom-class":"auth-dialog",width:"960px",center:""},on:{"update:visible":function(e){t.shouldShowAuthDialog=e},close:t._closeDialogHandler}},[n("el-tabs",{attrs:{type:"card"},on:{"tab-remove":t._removeTab},model:{value:t.activeTabName,callback:function(e){t.activeTabName=e},expression:"activeTabName"}},[n("el-tab-pane",{attrs:{label:"presentable list",name:"presentables"}},[n("presentables",{ref:"list",attrs:{data:t.presentables},on:{tabChange:t._tabChange}})],1),t._v(" "),t._l(t.tabs,function(e,r){return n("el-tab-pane",{key:e.name,attrs:{closable:"",label:e.title,name:e.name}},[n(e.content,{tag:"component",attrs:{"tab-name":e.name,data:e.data},on:{tabChange:t._tabChange,refresh:t.refreshHandler}})],1)})],2)],1)],1)],1)},staticRenderFns:[]},$=n("VU/8")(G,Y,!1,function(t){n("j1YA")},"data-v-2b13f907",null).exports,K={start:function(){var t=window.__auth_info__,e=t&&t.__auth_error_info__;e?window.FreeLogApp.trigger(window.FreeLogApp.EventCode.invalidResponse,{data:e||{},callback:function(t){3===t._contractStatus&&location.reload()}}):this.loadWidgets()},getWidgets:function(){return document.querySelector("#js-page-container").querySelectorAll(".js-wc-widget")},importHtml:function(t){var e=new File([t.content],t.name,{type:t.type||"text/html"}),n=window.URL.createObjectURL(e),r=document.createElement("link");r.rel="import",r.href=n,document.head.appendChild(r)},parseWidgetPresentable:function(t){var e=this,n=atob(t.headers.get("freelog-system-meta"));try{n=JSON.parse(n)}catch(t){console.log(t)}t.text().then(function(t){e.importHtml({name:n.widgetName,content:t,type:n.mimeType})})},triggerPresentableAuth:function(t){t.json().then(function(t){window.FreeLogApp.trigger(window.FreeLogApp.EventCode.invalidResponse,{data:t,callback:function(t){3===t._contractStatus&&location.reload()}})})},loadWidgets:function(){var t=this,e=this.getWidgets();Array.from(e).forEach(function(e){var n=e.getAttribute("data-widget-presentable-id");if(n)window.QI.fetchPresentable(n+".data").then(function(e){e.headers.get("freelog-contract-id")?t.parseWidgetPresentable(e):t.triggerPresentableAuth(e)}).catch(function(t){console.error(t)});else{var r=e.getAttribute("data-widget-src");r?(console.error("还未关联组件:"+e.getAttribute("data-widget-src")),window.QI.fetch("/v1/resources/"+r).then(function(t){return t.json()}).then(function(t){0===t.errcode&&(e.innerHTML='<div class="no-widget-error-tip">组件'+t.data.resourceName+'还没有被关联，<a href="javascript:;">通知节点</a></div>')})):console.error("没有找到对应的组件ID")}})}},W={invalidResponse:"errorResponseHandler",showSystemDialog:"showDialogHandler",showToolBar:"showToolBarHandler",loginHandler:"loginHandler",reportHandler:"reportHandler"},Q=n("7+uW"),Z={loadResourceDetail:function(t){return window.QI.fetch("/v1/resources/"+t).then(function(t){return 200===t.status?t.json():Promise.reject(t)}).then(function(t){return 0===t.ret&&0===t.errcode?t.data:Promise.reject(t)})},loadPresentableDetail:function(t){return window.QI.fetch("/v1/presentables/"+t).then(function(t){return 200===t.status?t.json():Promise.reject(t)}).then(function(t){return 0===t.ret&&0===t.errcode?t.data:Promise.reject(t)})},loadContractDetail:function(t){var e=t.contract;return this.loadPresentableDetail(e.targetId).then(function(t){return e.resourceDetail=t.tagInfo.resourceInfo,t.contractDetail=e,t.resourceDetail=t.tagInfo.resourceInfo,t})},loadPolicyDetail:function(t){var e=t.presentableId;return this.loadPresentableDetail(e).then(function(t){return t.resourceDetail=t.tagInfo.resourceInfo,t})}},J={name:"errorResponseHandler",_unactivatedHandler:function(t){Z.loadContractDetail(t).then(this.appendDataToUI.bind(this))},_unauthHandler:function(t){Z.loadPolicyDetail(t).then(this.appendDataToUI.bind(this))},_invalidHandler:function(t){Z.loadResourceDetail(t.contract.resourceId).then(function(e){return{resourceDetail:e,nodeContractDetail:t.contract}}).then(this.appendDataToUI.bind(this))},_gotoLoginHandler:function(){location.href="//www.freelog.com/pages/user/login.html?redirect="+encodeURIComponent(location.href)},handle:function(t,e,n){if(this.appUI=e,t&&t.errcode){var r=t.msg,i=t.data&&t.data.data;switch(t.errcode){case 70080104:this._unactivatedHandler(i);break;case 70080302:case 70080303:case 70080305:case 70080306:case 70080101:this._unauthHandler(i);break;case 70080202:this._invalidHandler(i);break;case 70080301:case 28:case 30:this._gotoLoginHandler();break;default:throw new Error(r)}"function"==typeof n&&e.$on("close",function(t){console.log(t);var e=null;t.presentables.forEach(function(t){i.presentableId!==t.presentableId&&i.contractId!==t.contractId||(e=t)}),n(e)})}},appendDataToUI:function(t){this.appUI.appendData(t),this.appUI.showAuthDialog()}},X={name:"loginHandler",handle:function(t,e,n){location.href="//www.freelog.com/pages/user/login.html"}},tt=n("zL8q"),et={errorResponseHandler:J,showDialogHandler:{name:"showDialogHandler",handle:function(t,e,n){e.showAuthDialog(),n&&n()}},loginHandler:X,reportHandler:{name:"reportHandler",handle:function(t,e,n){Object(tt.Message)({message:"已上报",type:"success"})}},notifyNodeHandler:{name:"notifyNodeHandler",handle:function(t,e,n){Object(tt.Message)({type:"success",message:"已通知节点"})}}},nt={init:function(t){this.appUI=t,this.bus=new Q.default,this.bus.$on("freelogSystemService",this.dispatchHandler.bind(this))},showErrorMessage:function(t){var e=t&&t.message||t;Object(tt.Message)({type:"error",message:e})},dispatchHandler:function(t){var e=t.detail,n=e.eventName,r=e.opts||{},i=et[n];if(i)try{i.handle(r.data,this.appUI,r.callback)}catch(t){this.showErrorMessage(t)}else console.warn("不存在对应的异常处理函数")},trigger:function(t,e){this.bus.$emit("freelogSystemService",{detail:{eventName:t,opts:e}})}},rt={isValidResponse:function(t){return t&&0===t.ret&&0===t.errcode},trigger:function(){nt.trigger.apply(nt,arguments)},EventCode:W,ExceptionCode:{70080101:{desc:"未找到用户合同",tip:"去创建合同"},70080102:{desc:"选择需要执行的合同.一般有两个或两个以上的时候需要用户选择具体执行哪个",tip:"去选择合同"},70080103:{desc:"参数userContractId错误,找不到有效的合同",tip:"数据错误"},70080104:{desc:"用户的合同未激活",tip:"去激活合同"},70080105:{desc:"用户合同授权异常",tip:"去查看合同状态"},70080201:{desc:"未找到节点与资源的合同信息",tip:"去通知节点",action:"notifyNodeHandler"},70080202:{desc:"节点的合同未激活",tip:"去通知节点",action:"notifyNodeHandler"},70080203:{desc:"节点合同授权异常",tip:"去通知节点",action:"notifyNodeHandler"},70080301:{desc:"未登陆用户",action:"loginHandler",tip:"去登录"},70080302:{desc:"个人身份授权不通过",tip:"查看详情"},70080303:{desc:"用户分组策认证不通过",tip:"去查看用户分组策略"},70080304:{desc:"未找到节点信息",action:"reportHandler",tip:"我要上报"},70080305:{desc:"资源策略拒绝",tip:"查看策略"},70080306:{desc:"presentable策略拒绝",tip:"查看策略"},70080307:{desc:"身份认证失败",action:"loginHandler",tip:"去登录"},7008e4:{desc:"未知异常",action:"reportHandler",tip:"我要上报"}}};window.QI=document.querySelector(".js-lib-qi"),Object(o.a)({el:"#app",template:'<app-view @ready="onReady"/>',components:{"app-view":$},methods:{onReady:function(t){this.appUI=t,window.FreeLogApp=rt,nt.init(t),window.__supports&&K.start(),t.$on("close",function(){})}}});e.default=rt},YFoD:function(t,e,n){function r(t){this.cachedHashCode=t}function i(){return this.cache={},this}function o(t,e){var n=0;if(null!==t){var i=new p;i.update(t,e),n=i.finish()}r.call(this,n),this.parentCtx=t,this.returnState=e}function a(){return o.call(this,null,r.EMPTY_RETURN_STATE),this}function s(t,e){var n=new p;n.update(t,e);var i=n.finish();return r.call(this,i),this.parents=t,this.returnStates=e,this}function u(t,e){if(void 0!==e&&null!==e||(e=h.EMPTY),null===e.parentCtx||e===h.EMPTY)return r.EMPTY;var n=u(t,e.parentCtx),i=t.states[e.invokingState].transitions[0];return o.create(n,i.followState.stateNumber)}function c(t,e,n,i){if(t===e)return t;if(t instanceof o&&e instanceof o)return function(t,e,n,i){if(null!==i){var a=i.get(t,e);if(null!==a)return a;if(null!==(a=i.get(e,t)))return a}var u=function(t,e,n){if(n){if(t===r.EMPTY)return r.EMPTY;if(e===r.EMPTY)return r.EMPTY}else{if(t===r.EMPTY&&e===r.EMPTY)return r.EMPTY;if(t===r.EMPTY){i=[e.returnState,r.EMPTY_RETURN_STATE];return new s(o=[e.parentCtx,null],i)}if(e===r.EMPTY){var i=[t.returnState,r.EMPTY_RETURN_STATE],o=[t.parentCtx,null];return new s(o,i)}}return null}(t,e,n);if(null!==u)return null!==i&&i.set(t,e,u),u;{if(t.returnState===e.returnState){var l=c(t.parentCtx,e.parentCtx,n,i);if(l===t.parentCtx)return t;if(l===e.parentCtx)return e;var h=o.create(l,t.returnState);return null!==i&&i.set(t,e,h),h}var p=null;if((t===e||null!==t.parentCtx&&t.parentCtx===e.parentCtx)&&(p=t.parentCtx),null!==p){d=[t.returnState,e.returnState];t.returnState>e.returnState&&(d[0]=e.returnState,d[1]=t.returnState);var f=new s(g=[p,p],d);return null!==i&&i.set(t,e,f),f}var d=[t.returnState,e.returnState],g=[t.parentCtx,e.parentCtx];t.returnState>e.returnState&&(d[0]=e.returnState,d[1]=t.returnState,g=[e.parentCtx,t.parentCtx]);var v=new s(g,d);return null!==i&&i.set(t,e,v),v}}(t,e,n,i);if(n){if(t instanceof a)return t;if(e instanceof a)return e}return t instanceof o&&(t=new s([t.getParent()],[t.returnState])),e instanceof o&&(e=new s([e.getParent()],[e.returnState])),function(t,e,n,i){if(null!==i){var a=i.get(t,e);if(null!==a)return a;if(null!==(a=i.get(e,t)))return a}var u=0,l=0,h=0,p=[],f=[];for(;u<t.returnStates.length&&l<e.returnStates.length;){var d=t.parents[u],g=e.parents[l];if(t.returnStates[u]===e.returnStates[l]){var v=t.returnStates[u];if(v===r.EMPTY_RETURN_STATE&&null===d&&null===g||null!==d&&null!==g&&d===g)f[h]=d,p[h]=v;else{var y=c(d,g,n,i);f[h]=y,p[h]=v}u+=1,l+=1}else t.returnStates[u]<e.returnStates[l]?(f[h]=d,p[h]=t.returnStates[u],u+=1):(f[h]=g,p[h]=e.returnStates[l],l+=1);h+=1}if(u<t.returnStates.length)for(_=u;_<t.returnStates.length;_++)f[h]=t.parents[_],p[h]=t.returnStates[_],h+=1;else for(var _=l;_<e.returnStates.length;_++)f[h]=e.parents[_],p[h]=e.returnStates[_],h+=1;if(h<f.length){if(1===h){var m=o.create(f[0],p[0]);return null!==i&&i.set(t,e,m),m}f=f.slice(0,h),p=p.slice(0,h)}var x=new s(f,p);if(x===t)return null!==i&&i.set(t,e,t),t;if(x===e)return null!==i&&i.set(t,e,e),e;(function(t){for(var e={},n=0;n<t.length;n++){var r=t[n];r in e||(e[r]=r)}for(var i=0;i<t.length;i++)t[i]=e[t[i]]})(f),null!==i&&i.set(t,e,x);return x}(t,e,n,i)}function l(t,e,n){if(t.isEmpty())return t;var i=n[t]||null;if(null!==i)return i;if(null!==(i=e.get(t)))return n[t]=i,i;for(var a=!1,u=[],c=0;c<u.length;c++){var h=l(t.getParent(c),e,n);if(a||h!==t.getParent(c)){if(!a){u=[];for(var p=0;p<t.length;p++)u[p]=t.getParent(p);a=!0}u[c]=h}}if(!a)return e.add(t),n[t]=t,t;var f=null;return f=0===u.length?r.EMPTY:1===u.length?o.create(u[0],t.getReturnState(0)):new s(u,t.returnStates),e.add(f),n[f]=f,n[t]=f,f}var h=n("6GCw").RuleContext,p=n("bz+k").Hash;r.EMPTY=null,r.EMPTY_RETURN_STATE=2147483647,r.id=r.globalNodeCount=1,r.prototype.isEmpty=function(){return this===r.EMPTY},r.prototype.hasEmptyPath=function(){return this.getReturnState(this.length-1)===r.EMPTY_RETURN_STATE},r.prototype.hashCode=function(){return this.cachedHashCode},r.prototype.updateHashCode=function(t){t.update(this.cachedHashCode)},i.prototype.add=function(t){if(t===r.EMPTY)return r.EMPTY;var e=this.cache[t]||null;return null!==e?e:(this.cache[t]=t,t)},i.prototype.get=function(t){return this.cache[t]||null},Object.defineProperty(i.prototype,"length",{get:function(){return this.cache.length}}),(o.prototype=Object.create(r.prototype)).contructor=o,o.create=function(t,e){return e===r.EMPTY_RETURN_STATE&&null===t?r.EMPTY:new o(t,e)},Object.defineProperty(o.prototype,"length",{get:function(){return 1}}),o.prototype.getParent=function(t){return this.parentCtx},o.prototype.getReturnState=function(t){return this.returnState},o.prototype.equals=function(t){return this===t||t instanceof o&&(this.hashCode()===t.hashCode()&&(this.returnState===t.returnState&&(null==this.parentCtx?null==t.parentCtx:this.parentCtx.equals(t.parentCtx))))},o.prototype.toString=function(){var t=null===this.parentCtx?"":this.parentCtx.toString();return 0===t.length?this.returnState===r.EMPTY_RETURN_STATE?"$":""+this.returnState:this.returnState+" "+t},(a.prototype=Object.create(o.prototype)).constructor=a,a.prototype.isEmpty=function(){return!0},a.prototype.getParent=function(t){return null},a.prototype.getReturnState=function(t){return this.returnState},a.prototype.equals=function(t){return this===t},a.prototype.toString=function(){return"$"},r.EMPTY=new a,(s.prototype=Object.create(r.prototype)).constructor=s,s.prototype.isEmpty=function(){return this.returnStates[0]===r.EMPTY_RETURN_STATE},Object.defineProperty(s.prototype,"length",{get:function(){return this.returnStates.length}}),s.prototype.getParent=function(t){return this.parents[t]},s.prototype.getReturnState=function(t){return this.returnStates[t]},s.prototype.equals=function(t){return this===t||t instanceof s&&(this.hashCode()===t.hashCode()&&(this.returnStates===t.returnStates&&this.parents===t.parents))},s.prototype.toString=function(){if(this.isEmpty())return"[]";for(var t="[",e=0;e<this.returnStates.length;e++)e>0&&(t+=", "),this.returnStates[e]!==r.EMPTY_RETURN_STATE?(t+=this.returnStates[e],null!==this.parents[e]?t=t+" "+this.parents[e]:t+="null"):t+="$";return t+"]"},e.merge=c,e.PredictionContext=r,e.PredictionContextCache=i,e.SingletonPredictionContext=o,e.predictionContextFromRuleContext=u,e.getCachedPredictionContext=l},Ya8g:function(t,e){},bcvg:function(t,e,n){function r(t,e){return this.atn=t,this.sharedContextCache=e,this}var i=n("IUCG").DFAState,o=n("wMEt").ATNConfigSet,a=n("YFoD").getCachedPredictionContext;r.ERROR=new i(2147483647,new o),r.prototype.getCachedContext=function(t){if(null===this.sharedContextCache)return t;return a(t,this.sharedContextCache,{})},e.ATNSimulator=r},"bz+k":function(t,e){function n(t){return"["+t.join(", ")+"]"}function r(t,e){return t.equals(e)}function i(t){return t.hashCode()}function o(t,e){return this.data={},this.hashFunction=t||i,this.equalsFunction=e||r,this}function a(){return this.data=[],this}function s(t,e){return this.data={},this.hashFunction=t||i,this.equalsFunction=e||r,this}function u(){return this.data={},this}function c(){return this}function l(){return this.count=0,this.hash=0,this}String.prototype.seed=String.prototype.seed||Math.round(Math.random()*Math.pow(2,32)),String.prototype.hashCode=function(){var t,e,n,r,i,o,a,s,u=this.toString();for(t=3&u.length,e=u.length-t,n=String.prototype.seed,i=3432918353,o=461845907,s=0;s<e;)a=255&u.charCodeAt(s)|(255&u.charCodeAt(++s))<<8|(255&u.charCodeAt(++s))<<16|(255&u.charCodeAt(++s))<<24,++s,n=27492+(65535&(r=5*(65535&(n=(n^=a=(65535&(a=(a=(65535&a)*i+(((a>>>16)*i&65535)<<16)&4294967295)<<15|a>>>17))*o+(((a>>>16)*o&65535)<<16)&4294967295)<<13|n>>>19))+((5*(n>>>16)&65535)<<16)&4294967295))+((58964+(r>>>16)&65535)<<16);switch(a=0,t){case 3:a^=(255&u.charCodeAt(s+2))<<16;case 2:a^=(255&u.charCodeAt(s+1))<<8;case 1:n^=a=(65535&(a=(a=(65535&(a^=255&u.charCodeAt(s)))*i+(((a>>>16)*i&65535)<<16)&4294967295)<<15|a>>>17))*o+(((a>>>16)*o&65535)<<16)&4294967295}return n^=u.length,n^=n>>>16,n=2246822507*(65535&n)+((2246822507*(n>>>16)&65535)<<16)&4294967295,n^=n>>>13,n=3266489909*(65535&n)+((3266489909*(n>>>16)&65535)<<16)&4294967295,(n^=n>>>16)>>>0},Object.defineProperty(o.prototype,"length",{get:function(){var t=0;for(var e in this.data)0===e.indexOf("hash_")&&(t+=this.data[e].length);return t}}),o.prototype.add=function(t){var e="hash_"+this.hashFunction(t);if(e in this.data){for(var n=this.data[e],r=0;r<n.length;r++)if(this.equalsFunction(t,n[r]))return n[r];return n.push(t),t}return this.data[e]=[t],t},o.prototype.contains=function(t){return null!=this.get(t)},o.prototype.get=function(t){var e="hash_"+this.hashFunction(t);if(e in this.data)for(var n=this.data[e],r=0;r<n.length;r++)if(this.equalsFunction(t,n[r]))return n[r];return null},o.prototype.values=function(){var t=[];for(var e in this.data)0===e.indexOf("hash_")&&(t=t.concat(this.data[e]));return t},o.prototype.toString=function(){return n(this.values())},a.prototype.add=function(t){this.data[t]=!0},a.prototype.or=function(t){var e=this;Object.keys(t.data).map(function(t){e.add(t)})},a.prototype.remove=function(t){delete this.data[t]},a.prototype.contains=function(t){return!0===this.data[t]},a.prototype.values=function(){return Object.keys(this.data)},a.prototype.minValue=function(){return Math.min.apply(null,this.values())},a.prototype.hashCode=function(){var t=new l;return t.update(this.values()),t.finish()},a.prototype.equals=function(t){return t instanceof a&&this.hashCode()===t.hashCode()},Object.defineProperty(a.prototype,"length",{get:function(){return this.values().length}}),a.prototype.toString=function(){return"{"+this.values().join(", ")+"}"},Object.defineProperty(s.prototype,"length",{get:function(){var t=0;for(var e in this.data)0===e.indexOf("hash_")&&(t+=this.data[e].length);return t}}),s.prototype.put=function(t,e){var n="hash_"+this.hashFunction(t);if(n in this.data){for(var r=this.data[n],i=0;i<r.length;i++){var o=r[i];if(this.equalsFunction(t,o.key)){var a=o.value;return o.value=e,a}}return r.push({key:t,value:e}),e}return this.data[n]=[{key:t,value:e}],e},s.prototype.containsKey=function(t){var e="hash_"+this.hashFunction(t);if(e in this.data)for(var n=this.data[e],r=0;r<n.length;r++){var i=n[r];if(this.equalsFunction(t,i.key))return!0}return!1},s.prototype.get=function(t){var e="hash_"+this.hashFunction(t);if(e in this.data)for(var n=this.data[e],r=0;r<n.length;r++){var i=n[r];if(this.equalsFunction(t,i.key))return i.value}return null},s.prototype.entries=function(){var t=[];for(var e in this.data)0===e.indexOf("hash_")&&(t=t.concat(this.data[e]));return t},s.prototype.getKeys=function(){return this.entries().map(function(t){return t.key})},s.prototype.getValues=function(){return this.entries().map(function(t){return t.value})},s.prototype.toString=function(){return"["+this.entries().map(function(t){return"{"+t.key+":"+t.value+"}"}).join(", ")+"]"},u.prototype.get=function(t){return(t="k-"+t)in this.data?this.data[t]:null},u.prototype.put=function(t,e){t="k-"+t,this.data[t]=e},u.prototype.values=function(){var t=this.data;return Object.keys(this.data).map(function(e){return t[e]})},l.prototype.update=function(){for(var t=0;t<arguments.length;t++){var e=arguments[t];if(null!=e)if(Array.isArray(e))this.update.apply(e);else{var n=0;switch(typeof e){case"undefined":case"function":continue;case"number":case"boolean":n=e;break;case"string":n=e.hashCode();break;default:e.updateHashCode(this);continue}n=(n*=3432918353)<<15|n>>>17,n*=461845907,this.count=this.count+1;var r=this.hash^n;r=5*(r=r<<13|r>>>19)+3864292196,this.hash=r}}},l.prototype.finish=function(){var t=this.hash^4*this.count;return t^=t>>>16,t*=2246822507,t^=t>>>13,t*=3266489909,t^=t>>>16},c.prototype.get=function(t,e){var n=this[t]||null;return null===n?null:n[e]||null},c.prototype.set=function(t,e,n){var r=this[t]||null;null===r&&(r={},this[t]=r),r[e]=n},e.Hash=l,e.Set=o,e.Map=s,e.BitSet=a,e.AltDict=u,e.DoubleDict=c,e.hashStuff=function(){var t=new l;return t.update.apply(arguments),t.finish()},e.escapeWhitespace=function(t,e){return t=t.replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r"),e&&(t=t.replace(/ /g,"·")),t},e.arrayToString=n,e.titleCase=function(t){return t.replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1)})},e.equalArrays=function(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t==e)return!0;if(t.length!=e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!=e[n]&&!t[n].equals(e[n]))return!1;return!0}},fnIZ:function(t,e,n){"use strict";var r=n("G3VR"),i=n("IcnI");e.a=function(t){new r.a(Object.assign({el:"#app",store:i.a},t))}},h0lj:function(t,e,n){function r(t){return o.call(this),this._input=t,this._factory=a.DEFAULT,this._tokenFactorySourcePair=[this,t],this._interp=null,this._token=null,this._tokenStartCharIndex=-1,this._tokenStartLine=-1,this._tokenStartColumn=-1,this._hitEOF=!1,this._channel=i.DEFAULT_CHANNEL,this._type=i.INVALID_TYPE,this._modeStack=[],this._mode=r.DEFAULT_MODE,this._text=null,this}var i=n("j/5l").Token,o=n("2EdO").Recognizer,a=n("TEvv").CommonTokenFactory,s=n("5d5Q").RecognitionException,u=n("5d5Q").LexerNoViableAltException;(r.prototype=Object.create(o.prototype)).constructor=r,r.DEFAULT_MODE=0,r.MORE=-2,r.SKIP=-3,r.DEFAULT_TOKEN_CHANNEL=i.DEFAULT_CHANNEL,r.HIDDEN=i.HIDDEN_CHANNEL,r.MIN_CHAR_VALUE=0,r.MAX_CHAR_VALUE=1114111,r.prototype.reset=function(){null!==this._input&&this._input.seek(0),this._token=null,this._type=i.INVALID_TYPE,this._channel=i.DEFAULT_CHANNEL,this._tokenStartCharIndex=-1,this._tokenStartColumn=-1,this._tokenStartLine=-1,this._text=null,this._hitEOF=!1,this._mode=r.DEFAULT_MODE,this._modeStack=[],this._interp.reset()},r.prototype.nextToken=function(){if(null===this._input)throw"nextToken requires a non-null input stream.";var t=this._input.mark();try{for(;;){if(this._hitEOF)return this.emitEOF(),this._token;this._token=null,this._channel=i.DEFAULT_CHANNEL,this._tokenStartCharIndex=this._input.index,this._tokenStartColumn=this._interp.column,this._tokenStartLine=this._interp.line,this._text=null;for(var e=!1;;){this._type=i.INVALID_TYPE;var n=r.SKIP;try{n=this._interp.match(this._input,this._mode)}catch(t){if(!(t instanceof s))throw console.log(t.stack),t;this.notifyListeners(t),this.recover(t)}if(this._input.LA(1)===i.EOF&&(this._hitEOF=!0),this._type===i.INVALID_TYPE&&(this._type=n),this._type===r.SKIP){e=!0;break}if(this._type!==r.MORE)break}if(!e)return null===this._token&&this.emit(),this._token}}finally{this._input.release(t)}},r.prototype.skip=function(){this._type=r.SKIP},r.prototype.more=function(){this._type=r.MORE},r.prototype.mode=function(t){this._mode=t},r.prototype.pushMode=function(t){this._interp.debug&&console.log("pushMode "+t),this._modeStack.push(this._mode),this.mode(t)},r.prototype.popMode=function(){if(0===this._modeStack.length)throw"Empty Stack";return this._interp.debug&&console.log("popMode back to "+this._modeStack.slice(0,-1)),this.mode(this._modeStack.pop()),this._mode},Object.defineProperty(r.prototype,"inputStream",{get:function(){return this._input},set:function(t){this._input=null,this._tokenFactorySourcePair=[this,this._input],this.reset(),this._input=t,this._tokenFactorySourcePair=[this,this._input]}}),Object.defineProperty(r.prototype,"sourceName",{get:function(){return this._input.sourceName}}),r.prototype.emitToken=function(t){this._token=t},r.prototype.emit=function(){var t=this._factory.create(this._tokenFactorySourcePair,this._type,this._text,this._channel,this._tokenStartCharIndex,this.getCharIndex()-1,this._tokenStartLine,this._tokenStartColumn);return this.emitToken(t),t},r.prototype.emitEOF=function(){var t=this.column,e=this.line,n=this._factory.create(this._tokenFactorySourcePair,i.EOF,null,i.DEFAULT_CHANNEL,this._input.index,this._input.index-1,e,t);return this.emitToken(n),n},Object.defineProperty(r.prototype,"type",{get:function(){return this.type},set:function(t){this._type=t}}),Object.defineProperty(r.prototype,"line",{get:function(){return this._interp.line},set:function(t){this._interp.line=t}}),Object.defineProperty(r.prototype,"column",{get:function(){return this._interp.column},set:function(t){this._interp.column=t}}),r.prototype.getCharIndex=function(){return this._input.index},Object.defineProperty(r.prototype,"text",{get:function(){return null!==this._text?this._text:this._interp.getText(this._input)},set:function(t){this._text=t}}),r.prototype.getAllTokens=function(){for(var t=[],e=this.nextToken();e.type!==i.EOF;)t.push(e),e=this.nextToken();return t},r.prototype.notifyListeners=function(t){var e=this._tokenStartCharIndex,n=this._input.index,r=this._input.getText(e,n),i="token recognition error at: '"+this.getErrorDisplay(r)+"'";this.getErrorListenerDispatch().syntaxError(this,null,this._tokenStartLine,this._tokenStartColumn,i,t)},r.prototype.getErrorDisplay=function(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n]);return e.join("")},r.prototype.getErrorDisplayForChar=function(t){return t.charCodeAt(0)===i.EOF?"<EOF>":"\n"===t?"\\n":"\t"===t?"\\t":"\r"===t?"\\r":t},r.prototype.getCharErrorDisplay=function(t){return"'"+this.getErrorDisplayForChar(t)+"'"},r.prototype.recover=function(t){this._input.LA(1)!==i.EOF&&(t instanceof u?this._interp.consume(this._input):this._input.consume())},e.Lexer=r},hL6x:function(t,e){function n(t,e,n){return this.dfa=t,this.literalNames=e||[],this.symbolicNames=n||[],this}function r(t){return n.call(this,t,null),this}n.prototype.toString=function(){if(null===this.dfa.s0)return null;for(var t="",e=this.dfa.sortedStates(),n=0;n<e.length;n++){var r=e[n];if(null!==r.edges)for(var i=r.edges.length,o=0;o<i;o++){var a=r.edges[o]||null;null!==a&&2147483647!==a.stateNumber&&(t=(t=(t=(t=(t=(t=t.concat(this.getStateString(r))).concat("-")).concat(this.getEdgeLabel(o))).concat("->")).concat(this.getStateString(a))).concat("\n"))}}return 0===t.length?null:t},n.prototype.getEdgeLabel=function(t){return 0===t?"EOF":null!==this.literalNames||null!==this.symbolicNames?this.literalNames[t-1]||this.symbolicNames[t-1]:String.fromCharCode(t-1)},n.prototype.getStateString=function(t){var e=(t.isAcceptState?":":"")+"s"+t.stateNumber+(t.requiresFullContext?"^":"");return t.isAcceptState?null!==t.predicates?e+"=>"+t.predicates.toString():e+"=>"+t.prediction.toString():e},(r.prototype=Object.create(n.prototype)).constructor=r,r.prototype.getEdgeLabel=function(t){return"'"+String.fromCharCode(t)+"'"},e.DFASerializer=n,e.LexerDFASerializer=r},hs4g:function(t,e){function n(t){return void 0===t&&(t=null),this.readOnly=!1,this.verifyATN=null===t||t.verifyATN,this.generateRuleBypassTransitions=null!==t&&t.generateRuleBypassTransitions,this}(n.defaultOptions=new n).readOnly=!0,e.ATNDeserializationOptions=n},iCeg:function(t,e,n){"use strict";function r(t,e){var n=new o(t),r=new u(n),i=new a(r),s=new c(i);s.buildParseTrees=!0;var h=s.policy(),p=new e;return(new l).walk(p,h),s._listeners[0].errorMsg&&(p.errorMsg=s._listeners[0].errorMsg,s._listeners[0].errorMsg=null),p}var i=n("9C8F"),o=i.InputStream,a=i.CommonTokenStream,s=n("5dCK"),u=s.presentablePolicyLexer,c=s.presentablePolicyParser,l=n("CLgU").ParseTreeWalker,h=n("qFmK").ConsoleErrorListener;n("Hw2x")(h.prototype),e.beautify=function(t){return r(t,n("S9ky")).stringArray.join(" ").replace(/\n\s/g,"\n")},e.compile=function(t){var e=void 0;return e=n("6Z45"),r(t,e)}},iMi6:function(t,e,n){var r,i,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(){function a(t){return t&&(t.ownerDocument||t.document||t).documentElement}function s(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}function u(t,e){return e>t?-1:t>e?1:t>=e?0:NaN}function c(t){return null===t?NaN:+t}function l(t){return!isNaN(t)}function h(t){return{left:function(e,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=e.length);i>r;){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=e.length);i>r;){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}}function p(t){return t.length}function f(t,e){for(var n in e)Object.defineProperty(t.prototype,n,{value:e[n],enumerable:!1})}function d(){this._=Object.create(null)}function g(t){return(t+="")===yo||t[0]===_o?_o+t:t}function v(t){return(t+="")[0]===_o?t.slice(1):t}function y(t){return g(t)in this._}function _(t){return(t=g(t))in this._&&delete this._[t]}function m(){var t=[];for(var e in this._)t.push(v(e));return t}function x(){var t=0;for(var e in this._)++t;return t}function T(){for(var t in this._)return!1;return!0}function E(){this._=Object.create(null)}function S(t){return t}function C(t,e,n){return function(){var r=n.apply(e,arguments);return r===e?t:r}}function b(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var n=0,r=mo.length;r>n;++n){var i=mo[n]+e;if(i in t)return i}}function A(){}function w(){}function R(t){function e(){for(var e,r=n,i=-1,o=r.length;++i<o;)(e=r[i].on)&&e.apply(this,arguments);return t}var n=[],r=new d;return e.on=function(e,i){var o,a=r.get(e);return arguments.length<2?a&&a.on:(a&&(a.on=null,n=n.slice(0,o=n.indexOf(a)).concat(n.slice(o+1)),r.remove(e)),i&&n.push(r.set(e,{on:i})),t)},e}function N(){oo.event.preventDefault()}function I(){for(var t,e=oo.event;t=e.sourceEvent;)e=t;return e}function k(t){for(var e=new w,n=0,r=arguments.length;++n<r;)e[arguments[n]]=R(e);return e.of=function(n,r){return function(i){try{var o=i.sourceEvent=oo.event;i.target=t,oo.event=i,e[i.type].apply(n,r)}finally{oo.event=o}}},e}function M(t){return To(t,bo),t}function L(t){return"function"==typeof t?t:function(){return Eo(t,this)}}function O(t){return"function"==typeof t?t:function(){return So(t,this)}}function P(t,e){return t=oo.ns.qualify(t),null==e?t.local?function(){this.removeAttributeNS(t.space,t.local)}:function(){this.removeAttribute(t)}:"function"==typeof e?t.local?function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}:function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}:t.local?function(){this.setAttributeNS(t.space,t.local,e)}:function(){this.setAttribute(t,e)}}function D(t){return t.trim().replace(/\s+/g," ")}function U(t){return new RegExp("(?:^|\\s+)"+oo.requote(t)+"(?:\\s+|$)","g")}function F(t){return(t+"").trim().split(/^|\s+/)}function H(t,e){var n=(t=F(t).map(j)).length;return"function"==typeof e?function(){for(var r=-1,i=e.apply(this,arguments);++r<n;)t[r](this,i)}:function(){for(var r=-1;++r<n;)t[r](this,e)}}function j(t){var e=U(t);return function(n,r){if(i=n.classList)return r?i.add(t):i.remove(t);var i=n.getAttribute("class")||"";r?(e.lastIndex=0,e.test(i)||n.setAttribute("class",D(i+" "+t))):n.setAttribute("class",D(i.replace(e," ")))}}function B(t,e,n){return null==e?function(){this.style.removeProperty(t)}:"function"==typeof e?function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}:function(){this.style.setProperty(t,e,n)}}function z(t,e){return null==e?function(){delete this[t]}:"function"==typeof e?function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}:function(){this[t]=e}}function q(t){return"function"==typeof t?t:(t=oo.ns.qualify(t)).local?function(){return this.ownerDocument.createElementNS(t.space,t.local)}:function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Ao&&e.documentElement.namespaceURI===Ao?e.createElement(t):e.createElementNS(n,t)}}function V(){var t=this.parentNode;t&&t.removeChild(this)}function G(t){return{__data__:t}}function Y(t){return function(){return Co(this,t)}}function $(t){return arguments.length||(t=u),function(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}}function K(t,e){for(var n=0,r=t.length;r>n;n++)for(var i,o=t[n],a=0,s=o.length;s>a;a++)(i=o[a])&&e(i,a,n);return t}function W(t){return To(t,Ro),t}function Q(t,e,n){function r(){var e=this[i];e&&(this.removeEventListener(t,e,e.$),delete this[i])}var i="__on"+t,o=t.indexOf("."),a=Z;o>0&&(t=t.slice(0,o));var s=No.get(t);return s&&(t=s,a=J),o?e?function(){var o=a(e,so(arguments));r.call(this),this.addEventListener(t,this[i]=o,o.$=n),o._=e}:r:e?A:function(){var e,n=new RegExp("^__on([^.]+)"+oo.requote(t)+"$");for(var r in this)if(e=r.match(n)){var i=this[r];this.removeEventListener(e[1],i,i.$),delete this[r]}}}function Z(t,e){return function(n){var r=oo.event;oo.event=n,e[0]=this.__data__;try{t.apply(this,e)}finally{oo.event=r}}}function J(t,e){var n=Z(t,e);return function(t){var e=this,r=t.relatedTarget;r&&(r===e||8&r.compareDocumentPosition(e))||n.call(e,t)}}function X(t){var e=".dragsuppress-"+ ++ko,n="click"+e,r=oo.select(s(t)).on("touchmove"+e,N).on("dragstart"+e,N).on("selectstart"+e,N);if(null==Io&&(Io=!("onselectstart"in t)&&b(t.style,"userSelect")),Io){var i=a(t).style,o=i[Io];i[Io]="none"}return function(t){if(r.on(e,null),Io&&(i[Io]=o),t){var a=function(){r.on(n,null)};r.on(n,function(){N(),a()},!0),setTimeout(a,0)}}}function tt(t,e){e.changedTouches&&(e=e.changedTouches[0]);var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();if(0>Mo){var i=s(t);if(i.scrollX||i.scrollY){var o=(n=oo.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();Mo=!(o.f||o.e),n.remove()}}return Mo?(r.x=e.pageX,r.y=e.pageY):(r.x=e.clientX,r.y=e.clientY),r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}var a=t.getBoundingClientRect();return[e.clientX-a.left-t.clientLeft,e.clientY-a.top-t.clientTop]}function et(){return oo.event.changedTouches[0].identifier}function nt(t){return t>0?1:0>t?-1:0}function rt(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function it(t){return t>1?0:-1>t?Po:Math.acos(t)}function ot(t){return t>1?Fo:-1>t?-Fo:Math.asin(t)}function at(t){return((t=Math.exp(t))+1/t)/2}function st(t){return(t=Math.sin(t/2))*t}function ut(){}function ct(t,e,n){return this instanceof ct?(this.h=+t,this.s=+e,void(this.l=+n)):arguments.length<2?t instanceof ct?new ct(t.h,t.s,t.l):St(""+t,Ct,ct):new ct(t,e,n)}function lt(t,e,n){function r(t){return Math.round(255*function(t){return t>360?t-=360:0>t&&(t+=360),60>t?i+(o-i)*t/60:180>t?o:240>t?i+(o-i)*(240-t)/60:i}(t))}var i,o;return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:0>e?0:e>1?1:e,n=0>n?0:n>1?1:n,o=.5>=n?n*(1+e):n+e-n*e,i=2*n-o,new mt(r(t+120),r(t),r(t-120))}function ht(t,e,n){return this instanceof ht?(this.h=+t,this.c=+e,void(this.l=+n)):arguments.length<2?t instanceof ht?new ht(t.h,t.c,t.l):t instanceof ft?gt(t.l,t.a,t.b):gt((t=bt((t=oo.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new ht(t,e,n)}function pt(t,e,n){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new ft(n,Math.cos(t*=Ho)*e,Math.sin(t)*e)}function ft(t,e,n){return this instanceof ft?(this.l=+t,this.a=+e,void(this.b=+n)):arguments.length<2?t instanceof ft?new ft(t.l,t.a,t.b):t instanceof ht?pt(t.h,t.c,t.l):bt((t=mt(t)).r,t.g,t.b):new ft(t,e,n)}function dt(t,e,n){var r=(t+16)/116,i=r+e/500,o=r-n/200;return i=vt(i)*Ko,r=vt(r)*Wo,o=vt(o)*Qo,new mt(_t(3.2404542*i-1.5371385*r-.4985314*o),_t(-.969266*i+1.8760108*r+.041556*o),_t(.0556434*i-.2040259*r+1.0572252*o))}function gt(t,e,n){return t>0?new ht(Math.atan2(n,e)*jo,Math.sqrt(e*e+n*n),t):new ht(NaN,NaN,t)}function vt(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function yt(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function _t(t){return Math.round(255*(.00304>=t?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function mt(t,e,n){return this instanceof mt?(this.r=~~t,this.g=~~e,void(this.b=~~n)):arguments.length<2?t instanceof mt?new mt(t.r,t.g,t.b):St(""+t,mt,lt):new mt(t,e,n)}function xt(t){return new mt(t>>16,t>>8&255,255&t)}function Tt(t){return xt(t)+""}function Et(t){return 16>t?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function St(t,e,n){var r,i,o,a=0,s=0,u=0;if(r=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return n(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(wt(i[0]),wt(i[1]),wt(i[2]))}return(o=Xo.get(t))?e(o.r,o.g,o.b):(null==t||"#"!==t.charAt(0)||isNaN(o=parseInt(t.slice(1),16))||(4===t.length?(a=(3840&o)>>4,a|=a>>4,s=240&o,s|=s>>4,u=15&o,u|=u<<4):7===t.length&&(a=(16711680&o)>>16,s=(65280&o)>>8,u=255&o)),e(a,s,u))}function Ct(t,e,n){var r,i,o=Math.min(t/=255,e/=255,n/=255),a=Math.max(t,e,n),s=a-o,u=(a+o)/2;return s?(i=.5>u?s/(a+o):s/(2-a-o),r=t==a?(e-n)/s+(n>e?6:0):e==a?(n-t)/s+2:(t-e)/s+4,r*=60):(r=NaN,i=u>0&&1>u?0:r),new ct(r,i,u)}function bt(t,e,n){var r=yt((.4124564*(t=At(t))+.3575761*(e=At(e))+.1804375*(n=At(n)))/Ko),i=yt((.2126729*t+.7151522*e+.072175*n)/Wo);return ft(116*i-16,500*(r-i),200*(i-yt((.0193339*t+.119192*e+.9503041*n)/Qo)))}function At(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function wt(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}function Rt(t){return"function"==typeof t?t:function(){return t}}function Nt(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),It(e,n,t,r)}}function It(t,e,n,r){function i(){var t,e=u.status;if(!e&&function(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}(u)||e>=200&&300>e||304===e){try{t=n.call(o,u)}catch(t){return void a.error.call(o,t)}a.load.call(o,t)}else a.error.call(o,u)}var o={},a=oo.dispatch("beforesend","progress","load","error"),s={},u=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in u||!/^(http(s)?:)?\/\//.test(t)||(u=new XDomainRequest),"onload"in u?u.onload=u.onerror=i:u.onreadystatechange=function(){u.readyState>3&&i()},u.onprogress=function(t){var e=oo.event;oo.event=t;try{a.progress.call(o,u)}finally{oo.event=e}},o.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?s[t]:(null==e?delete s[t]:s[t]=e+"",o)},o.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",o):e},o.responseType=function(t){return arguments.length?(c=t,o):c},o.response=function(t){return n=t,o},["get","post"].forEach(function(t){o[t]=function(){return o.send.apply(o,[t].concat(so(arguments)))}}),o.send=function(n,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),u.open(n,t,!0),null==e||"accept"in s||(s.accept=e+",*/*"),u.setRequestHeader)for(var l in s)u.setRequestHeader(l,s[l]);return null!=e&&u.overrideMimeType&&u.overrideMimeType(e),null!=c&&(u.responseType=c),null!=i&&o.on("error",i).on("load",function(t){i(null,t)}),a.beforesend.call(o,u),u.send(null==r?null:r),o},o.abort=function(){return u.abort(),o},oo.rebind(o,a,"on"),null==r?o:o.get(function(t){return 1===t.length?function(e,n){t(null==e?n:null)}:t}(r))}function kt(t,e,n){var r=arguments.length;2>r&&(e=0),3>r&&(n=Date.now());var i={c:t,t:n+e,n:null};return ea?ea.n=i:ta=i,ea=i,na||(ra=clearTimeout(ra),na=1,ia(Mt)),i}function Mt(){var t=Lt(),e=Ot()-t;e>24?(isFinite(e)&&(clearTimeout(ra),ra=setTimeout(Mt,e)),na=0):(na=1,ia(Mt))}function Lt(){for(var t=Date.now(),e=ta;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Ot(){for(var t,e=ta,n=1/0;e;)e.c?(e.t<n&&(n=e.t),e=(t=e).n):e=t?t.n=e.n:ta=e.n;return ea=t,n}function Pt(t,e){return e-(t?Math.ceil(Math.log(t)/Math.LN10):1)}function Dt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ut(t,e,n){function r(e){var n=t(e),r=o(n,1);return r-e>e-n?n:r}function i(n){return e(n=t(new ca(n-1)),1),n}function o(t,n){return e(t=new ca(+t),n),t}function a(t,r,o){var a=i(t),s=[];if(o>1)for(;r>a;)n(a)%o||s.push(new Date(+a)),e(a,1);else for(;r>a;)s.push(new Date(+a)),e(a,1);return s}t.floor=t,t.round=r,t.ceil=i,t.offset=o,t.range=a;var s=t.utc=Ft(t);return s.floor=s,s.round=Ft(r),s.ceil=Ft(i),s.offset=Ft(o),s.range=function(t,e,n){try{ca=Dt;var r=new Dt;return r._=t,a(r,e,n)}finally{ca=Date}},t}function Ft(t){return function(e,n){try{ca=Dt;var r=new Dt;return r._=e,t(r,n)._}finally{ca=Date}}}function Ht(t,e,n){var r=0>t?"-":"",i=(r?-t:t)+"",o=i.length;return r+(n>o?new Array(n-o+1).join(e)+i:i)}function jt(t){return new RegExp("^(?:"+t.map(oo.requote).join("|")+")","i")}function Bt(t){for(var e=new d,n=-1,r=t.length;++n<r;)e.set(t[n].toLowerCase(),n);return e}function zt(t,e,n){pa.lastIndex=0;var r=pa.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function qt(t,e,n){pa.lastIndex=0;var r=pa.exec(e.slice(n));return r?(t.U=+r[0],n+r[0].length):-1}function Vt(t,e,n){pa.lastIndex=0;var r=pa.exec(e.slice(n));return r?(t.W=+r[0],n+r[0].length):-1}function Gt(t,e,n){pa.lastIndex=0;var r=pa.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Yt(t,e,n){pa.lastIndex=0;var r=pa.exec(e.slice(n,n+2));return r?(t.y=function(t){return t+(t>68?1900:2e3)}(+r[0]),n+r[0].length):-1}function $t(t,e,n){return/^[+-]\d{4}$/.test(e=e.slice(n,n+5))?(t.Z=-e,n+5):-1}function Kt(t,e,n){pa.lastIndex=0;var r=pa.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Wt(t,e,n){pa.lastIndex=0;var r=pa.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Qt(t,e,n){pa.lastIndex=0;var r=pa.exec(e.slice(n,n+3));return r?(t.j=+r[0],n+r[0].length):-1}function Zt(t,e,n){pa.lastIndex=0;var r=pa.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Jt(t,e,n){pa.lastIndex=0;var r=pa.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Xt(t,e,n){pa.lastIndex=0;var r=pa.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function te(t,e,n){pa.lastIndex=0;var r=pa.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function ee(t){var e=t.getTimezoneOffset(),n=e>0?"-":"+",r=vo(e)/60|0,i=vo(e)%60;return n+Ht(r,"0",2)+Ht(i,"0",2)}function ne(t,e,n){fa.lastIndex=0;var r=fa.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function re(t){for(var e=t.length,n=-1;++n<e;)t[n][0]=this(t[n][0]);return function(e){for(var n=0,r=t[n];!r[1](e);)r=t[++n];return r[0](e)}}function ie(){}function oe(t,e,n){var r=n.s=t+e,i=r-t,o=r-i;n.t=t-o+(e-i)}function ae(t,e){t&&ya.hasOwnProperty(t.type)&&ya[t.type](t,e)}function se(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function ue(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)se(t[n],e,1);e.polygonEnd()}function ce(){function t(t,e){e=e*Ho/2+Po/4;var n=(t*=Ho)-r,a=n>=0?1:-1,s=a*n,u=Math.cos(e),c=Math.sin(e),l=o*c,h=i*u+l*Math.cos(s),p=l*a*Math.sin(s);ma.add(Math.atan2(p,h)),r=t,i=u,o=c}var e,n,r,i,o;xa.point=function(a,s){xa.point=t,r=(e=a)*Ho,i=Math.cos(s=(n=s)*Ho/2+Po/4),o=Math.sin(s)},xa.lineEnd=function(){t(e,n)}}function le(t){var e=t[0],n=t[1],r=Math.cos(n);return[r*Math.cos(e),r*Math.sin(e),Math.sin(n)]}function he(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function pe(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function fe(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function de(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function ge(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function ve(t){return[Math.atan2(t[1],t[0]),ot(t[2])]}function ye(t,e){return vo(t[0]-e[0])<Lo&&vo(t[1]-e[1])<Lo}function _e(t,e){t*=Ho;var n=Math.cos(e*=Ho);me(n*Math.cos(t),n*Math.sin(t),Math.sin(e))}function me(t,e,n){Sa+=(t-Sa)/++Ta,Ca+=(e-Ca)/Ta,ba+=(n-ba)/Ta}function xe(){function t(t,i){t*=Ho;var o=Math.cos(i*=Ho),a=o*Math.cos(t),s=o*Math.sin(t),u=Math.sin(i),c=Math.atan2(Math.sqrt((c=n*u-r*s)*c+(c=r*a-e*u)*c+(c=e*s-n*a)*c),e*a+n*s+r*u);Ea+=c,Aa+=c*(e+(e=a)),wa+=c*(n+(n=s)),Ra+=c*(r+(r=u)),me(e,n,r)}var e,n,r;Ma.point=function(i,o){i*=Ho;var a=Math.cos(o*=Ho);e=a*Math.cos(i),n=a*Math.sin(i),r=Math.sin(o),Ma.point=t,me(e,n,r)}}function Te(){Ma.point=_e}function Ee(){function t(t,e){t*=Ho;var n=Math.cos(e*=Ho),a=n*Math.cos(t),s=n*Math.sin(t),u=Math.sin(e),c=i*u-o*s,l=o*a-r*u,h=r*s-i*a,p=Math.sqrt(c*c+l*l+h*h),f=r*a+i*s+o*u,d=p&&-it(f)/p,g=Math.atan2(p,f);Na+=d*c,Ia+=d*l,ka+=d*h,Ea+=g,Aa+=g*(r+(r=a)),wa+=g*(i+(i=s)),Ra+=g*(o+(o=u)),me(r,i,o)}var e,n,r,i,o;Ma.point=function(a,s){e=a,n=s,Ma.point=t,a*=Ho;var u=Math.cos(s*=Ho);r=u*Math.cos(a),i=u*Math.sin(a),o=Math.sin(s),me(r,i,o)},Ma.lineEnd=function(){t(e,n),Ma.lineEnd=Te,Ma.point=_e}}function Se(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function Ce(){return!0}function be(t,e,n,r,i){var o=[],a=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n=t[0],r=t[e];if(ye(n,r)){i.lineStart();for(var s=0;e>s;++s)i.point((n=t[s])[0],n[1]);return void i.lineEnd()}var u=new we(n,t,null,!0),c=new we(n,null,u,!1);u.o=c,o.push(u),a.push(c),c=new we(r,null,u=new we(r,t,null,!1),!0),u.o=c,o.push(u),a.push(c)}}),a.sort(e),Ae(o),Ae(a),o.length){for(var s=0,u=n,c=a.length;c>s;++s)a[s].e=u=!u;for(var l,h,p=o[0];;){for(var f=p,d=!0;f.v;)if((f=f.n)===p)return;l=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(d)for(var s=0,c=l.length;c>s;++s)i.point((h=l[s])[0],h[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(d)for(s=(l=f.p.z).length-1;s>=0;--s)i.point((h=l[s])[0],h[1]);else r(f.x,f.p.x,-1,i);f=f.p}l=(f=f.o).z,d=!d}while(!f.v);i.lineEnd()}}}function Ae(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function we(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Re(t,e,n,r){return function(i,o){function a(e,n){var r=i(e,n);t(e=r[0],n=r[1])&&o.point(e,n)}function s(t,e){var n=i(t,e);v.point(n[0],n[1])}function u(){_.point=s,v.lineStart()}function c(){_.point=a,v.lineEnd()}function l(t,e){g.push([t,e]);var n=i(t,e);x.point(n[0],n[1])}function h(){x.lineStart(),g=[]}function p(){l(g[0][0],g[0][1]),x.lineEnd();var t,e=x.clean(),n=m.buffer(),r=n.length;if(g.pop(),d.push(g),g=null,r)if(1&e){var i,a=-1;if((r=(t=n[0]).length-1)>0){for(T||(o.polygonStart(),T=!0),o.lineStart();++a<r;)o.point((i=t[a])[0],i[1]);o.lineEnd()}}else r>1&&2&e&&n.push(n.pop().concat(n.shift())),f.push(n.filter(Ne))}var f,d,g,v=e(o),y=i.invert(r[0],r[1]),_={point:a,lineStart:u,lineEnd:c,polygonStart:function(){_.point=l,_.lineStart=h,_.lineEnd=p,f=[],d=[]},polygonEnd:function(){_.point=a,_.lineStart=u,_.lineEnd=c,f=oo.merge(f);var t=function(t,e){var n=t[0],r=t[1],i=[Math.sin(n),-Math.cos(n),0],o=0,a=0;ma.reset();for(var s=0,u=e.length;u>s;++s){var c=e[s],l=c.length;if(l)for(var h=c[0],p=h[0],f=h[1]/2+Po/4,d=Math.sin(f),g=Math.cos(f),v=1;;){v===l&&(v=0);var y=(t=c[v])[0],_=t[1]/2+Po/4,m=Math.sin(_),x=Math.cos(_),T=y-p,E=T>=0?1:-1,S=E*T,C=S>Po,b=d*m;if(ma.add(Math.atan2(b*E*Math.sin(S),g*x+b*Math.cos(S))),o+=C?T+E*Do:T,C^p>=n^y>=n){var A=pe(le(h),le(t));ge(A);var w=pe(i,A);ge(w);var R=(C^T>=0?-1:1)*ot(w[2]);(r>R||r===R&&(A[0]||A[1]))&&(a+=C^T>=0?1:-1)}if(!v++)break;p=y,d=m,g=x,h=t}}return(-Lo>o||Lo>o&&-Lo>ma)^1&a}(y,d);f.length?(T||(o.polygonStart(),T=!0),be(f,ke,t,n,o)):t&&(T||(o.polygonStart(),T=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),T&&(o.polygonEnd(),T=!1),f=d=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}},m=Ie(),x=e(m),T=!1;return _}}function Ne(t){return t.length>1}function Ie(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,n){t.push([e,n])},lineEnd:A,buffer:function(){var n=e;return e=[],t=null,n},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function ke(t,e){return((t=t.x)[0]<0?t[1]-Fo-Lo:Fo-t[1])-((e=e.x)[0]<0?e[1]-Fo-Lo:Fo-e[1])}function Me(t,e,n,r){return function(i){var o,a=i.a,s=i.b,u=a.x,c=a.y,l=0,h=1,p=s.x-u,f=s.y-c;if(o=t-u,p||!(o>0)){if(o/=p,0>p){if(l>o)return;h>o&&(h=o)}else if(p>0){if(o>h)return;o>l&&(l=o)}if(o=n-u,p||!(0>o)){if(o/=p,0>p){if(o>h)return;o>l&&(l=o)}else if(p>0){if(l>o)return;h>o&&(h=o)}if(o=e-c,f||!(o>0)){if(o/=f,0>f){if(l>o)return;h>o&&(h=o)}else if(f>0){if(o>h)return;o>l&&(l=o)}if(o=r-c,f||!(0>o)){if(o/=f,0>f){if(o>h)return;o>l&&(l=o)}else if(f>0){if(l>o)return;h>o&&(h=o)}return l>0&&(i.a={x:u+l*p,y:c+l*f}),1>h&&(i.b={x:u+h*p,y:c+h*f}),i}}}}}}function Le(t,e,n,r){function i(r,i){return vo(r[0]-t)<Lo?i>0?0:3:vo(r[0]-n)<Lo?i>0?2:1:vo(r[1]-e)<Lo?i>0?1:0:i>0?3:2}function o(t,e){return a(t.x,e.x)}function a(t,e){var n=i(t,1),r=i(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(s){function u(o,s,u,c){var l=0,h=0;if(null==o||(l=i(o,u))!==(h=i(s,u))||a(o,s)<0^u>0)do{c.point(0===l||3===l?t:n,l>1?r:e)}while((l=(l+u+4)%4)!==h);else c.point(s[0],s[1])}function c(i,o){return i>=t&&n>=i&&o>=e&&r>=o}function l(t,e){c(t,e)&&s.point(t,e)}function h(t,e){var n=c(t=Math.max(-Oa,Math.min(Oa,t)),e=Math.max(-Oa,Math.min(Oa,e)));if(f&&d.push([t,e]),T)g=t,v=e,y=n,T=!1,n&&(s.lineStart(),s.point(t,e));else if(n&&x)s.point(t,e);else{var r={a:{x:_,y:m},b:{x:t,y:e}};b(r)?(x||(s.lineStart(),s.point(r.a.x,r.a.y)),s.point(r.b.x,r.b.y),n||s.lineEnd(),E=!1):n&&(s.lineStart(),s.point(t,e),E=!1)}_=t,m=e,x=n}var p,f,d,g,v,y,_,m,x,T,E,S=s,C=Ie(),b=Me(t,e,n,r),A={point:l,lineStart:function(){A.point=h,f&&f.push(d=[]),T=!0,x=!1,_=m=NaN},lineEnd:function(){p&&(h(g,v),y&&x&&C.rejoin(),p.push(C.buffer())),A.point=l,x&&s.lineEnd()},polygonStart:function(){s=C,p=[],f=[],E=!0},polygonEnd:function(){s=S,p=oo.merge(p);var e=function(t){for(var e=0,n=f.length,r=t[1],i=0;n>i;++i)for(var o,a=1,s=f[i],u=s.length,c=s[0];u>a;++a)o=s[a],c[1]<=r?o[1]>r&&rt(c,o,t)>0&&++e:o[1]<=r&&rt(c,o,t)<0&&--e,c=o;return 0!==e}([t,r]),n=E&&e,i=p.length;(n||i)&&(s.polygonStart(),n&&(s.lineStart(),u(null,null,1,s),s.lineEnd()),i&&be(p,o,e,u,s),s.polygonEnd()),p=f=d=null}};return A}}function Oe(t){var e=0,n=Po/3,r=Ye(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*Po/180,n=t[1]*Po/180):[e/Po*180,n/Po*180]},i}function Pe(t,e){function n(t,e){var n=Math.sqrt(o-2*i*Math.sin(e))/i;return[n*Math.sin(t*=i),a-n*Math.cos(t)]}var r=Math.sin(t),i=(r+Math.sin(e))/2,o=1+r*(2*i-r),a=Math.sqrt(o)/i;return n.invert=function(t,e){var n=a-e;return[Math.atan2(t,n)/i,ot((o-(t*t+n*n)*i*i)/(2*i))]},n}function De(){function t(t,e){Da+=i*t-r*e,r=t,i=e}var e,n,r,i;Ba.point=function(o,a){Ba.point=t,e=r=o,n=i=a},Ba.lineEnd=function(){t(e,n)}}function Ue(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Fe(t,e){Sa+=t,Ca+=e,++ba}function He(){function t(t,r){var i=t-e,o=r-n,a=Math.sqrt(i*i+o*o);Aa+=a*(e+t)/2,wa+=a*(n+r)/2,Ra+=a,Fe(e=t,n=r)}var e,n;qa.point=function(r,i){qa.point=t,Fe(e=r,n=i)}}function je(){qa.point=Fe}function Be(){function t(t,e){var n=t-r,o=e-i,a=Math.sqrt(n*n+o*o);Aa+=a*(r+t)/2,wa+=a*(i+e)/2,Ra+=a,Na+=(a=i*t-r*e)*(r+t),Ia+=a*(i+e),ka+=3*a,Fe(r=t,i=e)}var e,n,r,i;qa.point=function(o,a){qa.point=t,Fe(e=r=o,n=i=a)},qa.lineEnd=function(){t(e,n)}}function ze(t){function e(t){return(s?r:n)(t)}function n(e){return Ve(e,function(n,r){n=t(n,r),e.point(n[0],n[1])})}function r(e){function n(n,r){n=t(n,r),e.point(n[0],n[1])}function r(){m=NaN,C.point=o,e.lineStart()}function o(n,r){var o=le([n,r]),a=t(n,r);i(m,x,_,T,E,S,m=a[0],x=a[1],_=n,T=o[0],E=o[1],S=o[2],s,e),e.point(m,x)}function a(){C.point=n,e.lineEnd()}function u(){r(),C.point=c,C.lineEnd=l}function c(t,e){o(h=t,p=e),f=m,d=x,g=T,v=E,y=S,C.point=o}function l(){i(m,x,_,T,E,S,f,d,h,g,v,y,s,e),C.lineEnd=a,a()}var h,p,f,d,g,v,y,_,m,x,T,E,S,C={point:n,lineStart:r,lineEnd:a,polygonStart:function(){e.polygonStart(),C.lineStart=u},polygonEnd:function(){e.polygonEnd(),C.lineStart=r}};return C}function i(e,n,r,s,u,c,l,h,p,f,d,g,v,y){var _=l-e,m=h-n,x=_*_+m*m;if(x>4*o&&v--){var T=s+f,E=u+d,S=c+g,C=Math.sqrt(T*T+E*E+S*S),b=Math.asin(S/=C),A=vo(vo(S)-1)<Lo||vo(r-p)<Lo?(r+p)/2:Math.atan2(E,T),w=t(A,b),R=w[0],N=w[1],I=R-e,k=N-n,M=m*I-_*k;(M*M/x>o||vo((_*I+m*k)/x-.5)>.3||a>s*f+u*d+c*g)&&(i(e,n,r,s,u,c,R,N,A,T/=C,E/=C,S,v,y),y.point(R,N),i(R,N,A,T,E,S,l,h,p,f,d,g,v,y))}}var o=.5,a=Math.cos(30*Ho),s=16;return e.precision=function(t){return arguments.length?(s=(o=t*t)>0&&16,e):Math.sqrt(o)},e}function qe(t){this.stream=t}function Ve(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function Ge(t){return Ye(function(){return t})()}function Ye(t){function e(t){return t=a(t[0]*Ho,t[1]*Ho),[t[0]*h+s,u-t[1]*h]}function n(){a=Se(o=Qe(v,y,_),i);var t=i(d,g);return s=p-t[0]*h,u=f+t[1]*h,r()}function r(){return c&&(c.valid=!1,c=null),e}var i,o,a,s,u,c,l=ze(function(t,e){return t=i(t,e),[t[0]*h+s,u-t[1]*h]}),h=150,p=480,f=250,d=0,g=0,v=0,y=0,_=0,m=La,x=S,T=null,E=null;return e.stream=function(t){return c&&(c.valid=!1),c=$e(m(o,l(x(t)))),c.valid=!0,c},e.clipAngle=function(t){return arguments.length?(m=null==t?(T=t,La):function(t){function e(t,e){return Math.cos(t)*Math.cos(e)>i}function n(t,e,n){var r=[1,0,0],o=pe(le(t),le(e)),a=he(o,o),s=o[0],u=a-s*s;if(!u)return!n&&t;var c=i*a/u,l=-i*s/u,h=pe(r,o),p=de(r,c);fe(p,de(o,l));var f=h,d=he(p,f),g=he(f,f),v=d*d-g*(he(p,p)-1);if(!(0>v)){var y=Math.sqrt(v),_=de(f,(-d-y)/g);if(fe(_,p),_=ve(_),!n)return _;var m,x=t[0],T=e[0],E=t[1],S=e[1];x>T&&(m=x,x=T,T=m);var C=T-x,b=vo(C-Po)<Lo;if(!b&&E>S&&(m=E,E=S,S=m),b||Lo>C?b?E+S>0^_[1]<(vo(_[0]-x)<Lo?E:S):E<=_[1]&&_[1]<=S:C>Po^(x<=_[0]&&_[0]<=T)){var A=de(f,(-d+y)/g);return fe(A,p),[_,ve(A)]}}}function r(e,n){var r=o?t:Po-t,i=0;return-r>e?i|=1:e>r&&(i|=2),-r>n?i|=4:n>r&&(i|=8),i}var i=Math.cos(t),o=i>0,a=vo(i)>Lo;return Re(e,function(t){var i,s,u,c,l;return{lineStart:function(){c=u=!1,l=1},point:function(h,p){var f,d=[h,p],g=e(h,p),v=o?g?0:r(h,p):g?r(h+(0>h?Po:-Po),p):0;if(!i&&(c=u=g)&&t.lineStart(),g!==u&&(f=n(i,d),(ye(i,f)||ye(d,f))&&(d[0]+=Lo,d[1]+=Lo,g=e(d[0],d[1]))),g!==u)l=0,g?(t.lineStart(),f=n(d,i),t.point(f[0],f[1])):(f=n(i,d),t.point(f[0],f[1]),t.lineEnd()),i=f;else if(a&&i&&o^g){var y;v&s||!(y=n(d,i,!0))||(l=0,o?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1])))}!g||i&&ye(i,d)||t.point(d[0],d[1]),i=d,u=g,s=v},lineEnd:function(){u&&t.lineEnd(),i=null},clean:function(){return l|(c&&u)<<1}}},tn(t,6*Ho),o?[0,-t]:[-Po,t-Po])}((T=+t)*Ho),r()):T},e.clipExtent=function(t){return arguments.length?(E=t,x=t?Le(t[0][0],t[0][1],t[1][0],t[1][1]):S,r()):E},e.scale=function(t){return arguments.length?(h=+t,n()):h},e.translate=function(t){return arguments.length?(p=+t[0],f=+t[1],n()):[p,f]},e.center=function(t){return arguments.length?(d=t[0]%360*Ho,g=t[1]%360*Ho,n()):[d*jo,g*jo]},e.rotate=function(t){return arguments.length?(v=t[0]%360*Ho,y=t[1]%360*Ho,_=t.length>2?t[2]%360*Ho:0,n()):[v*jo,y*jo,_*jo]},oo.rebind(e,l,"precision"),function(){return i=t.apply(this,arguments),e.invert=i.invert&&function(t){return(t=a.invert((t[0]-s)/h,(u-t[1])/h))&&[t[0]*jo,t[1]*jo]},n()}}function $e(t){return Ve(t,function(e,n){t.point(e*Ho,n*Ho)})}function Ke(t,e){return[t,e]}function We(t,e){return[t>Po?t-Do:-Po>t?t+Do:t,e]}function Qe(t,e,n){return t?e||n?Se(Je(t),Xe(e,n)):Je(t):e||n?Xe(e,n):We}function Ze(t){return function(e,n){return e+=t,[e>Po?e-Do:-Po>e?e+Do:e,n]}}function Je(t){var e=Ze(t);return e.invert=Ze(-t),e}function Xe(t,e){function n(t,e){var n=Math.cos(e),s=Math.cos(t)*n,u=Math.sin(t)*n,c=Math.sin(e),l=c*r+s*i;return[Math.atan2(u*o-l*a,s*r-c*i),ot(l*o+u*a)]}var r=Math.cos(t),i=Math.sin(t),o=Math.cos(e),a=Math.sin(e);return n.invert=function(t,e){var n=Math.cos(e),s=Math.cos(t)*n,u=Math.sin(t)*n,c=Math.sin(e),l=c*o-u*a;return[Math.atan2(u*o+c*a,s*r+l*i),ot(l*r-s*i)]},n}function tn(t,e){var n=Math.cos(t),r=Math.sin(t);return function(i,o,a,s){var u=a*e;null!=i?(i=en(n,i),o=en(n,o),(a>0?o>i:i>o)&&(i+=a*Do)):(i=t+a*Do,o=t-.5*u);for(var c,l=i;a>0?l>o:o>l;l-=u)s.point((c=ve([n,-r*Math.cos(l),-r*Math.sin(l)]))[0],c[1])}}function en(t,e){var n=le(e);n[0]-=t,ge(n);var r=it(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-Lo)%(2*Math.PI)}function nn(t,e,n){var r=oo.range(t,e-Lo,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function rn(t,e,n){var r=oo.range(t,e-Lo,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}function on(t){return t.source}function an(t){return t.target}function sn(t,e){function n(e,n){var r=Math.cos(e),i=Math.cos(n),o=t(r*i);return[o*i*Math.sin(e),o*Math.sin(n)]}return n.invert=function(t,n){var r=Math.sqrt(t*t+n*n),i=e(r),o=Math.sin(i),a=Math.cos(i);return[Math.atan2(t*o,r*a),Math.asin(r&&n*o/r)]},n}function un(t,e){function n(t,e){a>0?-Fo+Lo>e&&(e=-Fo+Lo):e>Fo-Lo&&(e=Fo-Lo);var n=a/Math.pow(i(e),o);return[n*Math.sin(o*t),a-n*Math.cos(o*t)]}var r=Math.cos(t),i=function(t){return Math.tan(Po/4+t/2)},o=t===e?Math.sin(t):Math.log(r/Math.cos(e))/Math.log(i(e)/i(t)),a=r*Math.pow(i(t),o)/o;return o?(n.invert=function(t,e){var n=a-e,r=nt(o)*Math.sqrt(t*t+n*n);return[Math.atan2(t,n)/o,2*Math.atan(Math.pow(a/r,1/o))-Fo]},n):ln}function cn(t,e){function n(t,e){var n=o-e;return[n*Math.sin(i*t),o-n*Math.cos(i*t)]}var r=Math.cos(t),i=t===e?Math.sin(t):(r-Math.cos(e))/(e-t),o=r/i+t;return vo(i)<Lo?Ke:(n.invert=function(t,e){var n=o-e;return[Math.atan2(t,n)/i,o-nt(i)*Math.sqrt(t*t+n*n)]},n)}function ln(t,e){return[t,Math.log(Math.tan(Po/4+e/2))]}function hn(t){var e,n=Ge(t),r=n.scale,i=n.translate,o=n.clipExtent;return n.scale=function(){var t=r.apply(n,arguments);return t===n?e?n.clipExtent(null):n:t},n.translate=function(){var t=i.apply(n,arguments);return t===n?e?n.clipExtent(null):n:t},n.clipExtent=function(t){var a=o.apply(n,arguments);if(a===n){if(e=null==t){var s=Po*r(),u=i();o([[u[0]-s,u[1]-s],[u[0]+s,u[1]+s]])}}else e&&(a=null);return a},n.clipExtent(null)}function pn(t,e){return[Math.log(Math.tan(Po/4+e/2)),-t]}function fn(t){return t[0]}function dn(t){return t[1]}function gn(t){for(var e=t.length,n=[0,1],r=2,i=2;e>i;i++){for(;r>1&&rt(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function vn(t,e){return t[0]-e[0]||t[1]-e[1]}function yn(t,e,n){return(n[0]-e[0])*(t[1]-e[1])<(n[1]-e[1])*(t[0]-e[0])}function _n(t,e,n,r){var i=t[0],o=n[0],a=e[0]-i,s=r[0]-o,u=t[1],c=n[1],l=e[1]-u,h=r[1]-c,p=(s*(u-c)-h*(i-o))/(h*a-s*l);return[i+p*a,u+p*l]}function mn(t){var e=t[0],n=t[t.length-1];return!(e[0]-n[0]||e[1]-n[1])}function xn(t){var e=rs.pop()||new function(){Pn(this),this.edge=this.site=this.circle=null};return e.site=t,e}function Tn(t){Nn(t),ts.remove(t),rs.push(t),Pn(t)}function En(t){var e=t.circle,n=e.x,r=e.cy,i={x:n,y:r},o=t.P,a=t.N,s=[t];Tn(t);for(var u=o;u.circle&&vo(n-u.circle.x)<Lo&&vo(r-u.circle.cy)<Lo;)o=u.P,s.unshift(u),Tn(u),u=o;s.unshift(u),Nn(u);for(var c=a;c.circle&&vo(n-c.circle.x)<Lo&&vo(r-c.circle.cy)<Lo;)a=c.N,s.push(c),Tn(c),c=a;s.push(c),Nn(c);var l,h=s.length;for(l=1;h>l;++l)c=s[l],u=s[l-1],Mn(c.edge,u.site,c.site,i);u=s[0],(c=s[h-1]).edge=kn(u.site,c.site,null,i),Rn(u),Rn(c)}function Sn(t){for(var e,n,r,i,o=t.x,a=t.y,s=ts._;s;)if((r=Cn(s,a)-o)>Lo)s=s.L;else{if(!((i=o-function(t,e){var n=t.N;if(n)return Cn(n,e);var r=t.site;return r.y===e?r.x:1/0}(s,a))>Lo)){r>-Lo?(e=s.P,n=s):i>-Lo?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}var u=xn(t);if(ts.insert(e,u),e||n){if(e===n)return Nn(e),n=xn(e.site),ts.insert(u,n),u.edge=n.edge=kn(e.site,u.site),Rn(e),void Rn(n);if(!n)return void(u.edge=kn(e.site,u.site));Nn(e),Nn(n);var c=e.site,l=c.x,h=c.y,p=t.x-l,f=t.y-h,d=n.site,g=d.x-l,v=d.y-h,y=2*(p*v-f*g),_=p*p+f*f,m=g*g+v*v,x={x:(v*_-f*m)/y+l,y:(p*m-g*_)/y+h};Mn(n.edge,c,d,x),u.edge=kn(c,t,null,x),n.edge=kn(t,d,null,x),Rn(e),Rn(n)}}function Cn(t,e){var n=t.site,r=n.x,i=n.y,o=i-e;if(!o)return r;var a=t.P;if(!a)return-1/0;var s=(n=a.site).x,u=n.y,c=u-e;if(!c)return s;var l=s-r,h=1/o-1/c,p=l/c;return h?(-p+Math.sqrt(p*p-2*h*(l*l/(-2*c)-u+c/2+i-o/2)))/h+r:(r+s)/2}function bn(t){this.site=t,this.edges=[]}function An(t){for(var e,n,r,i,o,a,s,u,c,l,h=t[0][0],p=t[1][0],f=t[0][1],d=t[1][1],g=Xa,v=g.length;v--;)if((o=g[v])&&o.prepare())for(s=o.edges,u=s.length,a=0;u>a;)r=(l=s[a].end()).x,i=l.y,e=(c=s[++a%u].start()).x,n=c.y,(vo(r-e)>Lo||vo(i-n)>Lo)&&(s.splice(a,0,new Ln(function(t,e,n){var r=new In(t,null);return r.a=e,r.b=n,Ja.push(r),r}(o.site,l,vo(r-h)<Lo&&d-i>Lo?{x:h,y:vo(e-h)<Lo?n:d}:vo(i-d)<Lo&&p-r>Lo?{x:vo(n-d)<Lo?e:p,y:d}:vo(r-p)<Lo&&i-f>Lo?{x:p,y:vo(e-p)<Lo?n:f}:vo(i-f)<Lo&&r-h>Lo?{x:vo(n-f)<Lo?e:h,y:f}:null),o.site,null)),++u)}function wn(t,e){return e.angle-t.angle}function Rn(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,o=n.site;if(r!==o){var a=i.x,s=i.y,u=r.x-a,c=r.y-s,l=o.x-a,h=2*(u*(v=o.y-s)-c*l);if(!(h>=-Oo)){var p=u*u+c*c,f=l*l+v*v,d=(v*p-c*f)/h,g=(u*f-l*p)/h,v=g+s,y=is.pop()||new function(){Pn(this),this.x=this.y=this.arc=this.site=this.cy=null};y.arc=t,y.site=i,y.x=d+a,y.y=v+Math.sqrt(d*d+g*g),y.cy=v,t.circle=y;for(var _=null,m=ns._;m;)if(y.y<m.y||y.y===m.y&&y.x<=m.x){if(!m.L){_=m.P;break}m=m.L}else{if(!m.R){_=m;break}m=m.R}ns.insert(_,y),_||(es=y)}}}}function Nn(t){var e=t.circle;e&&(e.P||(es=e.N),ns.remove(e),is.push(e),Pn(e),t.circle=null)}function In(t,e){this.l=t,this.r=e,this.a=this.b=null}function kn(t,e,n,r){var i=new In(t,e);return Ja.push(i),n&&Mn(i,t,e,n),r&&Mn(i,e,t,r),Xa[t.i].edges.push(new Ln(i,t,e)),Xa[e.i].edges.push(new Ln(i,e,t)),i}function Mn(t,e,n,r){t.a||t.b?t.l===n?t.b=r:t.a=r:(t.a=r,t.l=e,t.r=n)}function Ln(t,e,n){var r=t.a,i=t.b;this.edge=t,this.site=e,this.angle=n?Math.atan2(n.y-e.y,n.x-e.x):t.l===e?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}function On(){this._=null}function Pn(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Dn(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Un(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function Fn(t){for(;t.L;)t=t.L;return t}function Hn(t,e){var n,r,i,o=t.sort(jn).pop();for(Ja=[],Xa=new Array(t.length),ts=new On,ns=new On;;)if(i=es,o&&(!i||o.y<i.y||o.y===i.y&&o.x<i.x))o.x===n&&o.y===r||(Xa[o.i]=new bn(o),Sn(o),n=o.x,r=o.y),o=t.pop();else{if(!i)break;En(i.arc)}e&&(function(t){for(var e,n=Ja,r=Me(t[0][0],t[0][1],t[1][0],t[1][1]),i=n.length;i--;)(!function(t,e){var n=t.b;if(n)return!0;var r,i,o=t.a,a=e[0][0],s=e[1][0],u=e[0][1],c=e[1][1],l=t.l,h=t.r,p=l.x,f=l.y,d=h.x,g=h.y,v=(p+d)/2,y=(f+g)/2;if(g===f){if(a>v||v>=s)return;if(p>d){if(o){if(o.y>=c)return}else o={x:v,y:u};n={x:v,y:c}}else{if(o){if(o.y<u)return}else o={x:v,y:c};n={x:v,y:u}}}else if(r=(p-d)/(g-f),i=y-r*v,-1>r||r>1)if(p>d){if(o){if(o.y>=c)return}else o={x:(u-i)/r,y:u};n={x:(c-i)/r,y:c}}else{if(o){if(o.y<u)return}else o={x:(c-i)/r,y:c};n={x:(u-i)/r,y:u}}else if(g>f){if(o){if(o.x>=s)return}else o={x:a,y:r*a+i};n={x:s,y:r*s+i}}else{if(o){if(o.x<a)return}else o={x:s,y:r*s+i};n={x:a,y:r*a+i}}return t.a=o,t.b=n,!0}(e=n[i],t)||!r(e)||vo(e.a.x-e.b.x)<Lo&&vo(e.a.y-e.b.y)<Lo)&&(e.a=e.b=null,n.splice(i,1))}(e),An(e));var a={cells:Xa,edges:Ja};return ts=ns=Ja=Xa=null,a}function jn(t,e){return e.y-t.y||e.x-t.x}function Bn(t,e,n){return(t.x-n.x)*(e.y-t.y)-(t.x-e.x)*(n.y-t.y)}function zn(t){return t.x}function qn(t){return t.y}function Vn(t,e,n,r,i,o){if(!t(e,n,r,i,o)){var a=.5*(n+i),s=.5*(r+o),u=e.nodes;u[0]&&Vn(t,u[0],n,r,a,s),u[1]&&Vn(t,u[1],a,r,i,s),u[2]&&Vn(t,u[2],n,s,a,o),u[3]&&Vn(t,u[3],a,s,i,o)}}function Gn(t,e){t=oo.rgb(t),e=oo.rgb(e);var n=t.r,r=t.g,i=t.b,o=e.r-n,a=e.g-r,s=e.b-i;return function(t){return"#"+Et(Math.round(n+o*t))+Et(Math.round(r+a*t))+Et(Math.round(i+s*t))}}function Yn(t,e){var n,r={},i={};for(n in t)n in e?r[n]=Wn(t[n],e[n]):i[n]=t[n];for(n in e)n in t||(i[n]=e[n]);return function(t){for(n in r)i[n]=r[n](t);return i}}function $n(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Kn(t,e){var n,r,i,o=as.lastIndex=ss.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=as.exec(t))&&(r=ss.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:$n(n,r)})),o=ss.lastIndex;return o<e.length&&(i=e.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?u[0]?(e=u[0].x,function(t){return e(t)+""}):function(){return e}:(e=u.length,function(t){for(var n,r=0;e>r;++r)s[(n=u[r]).i]=n.x(t);return s.join("")})}function Wn(t,e){for(var n,r=oo.interpolators.length;--r>=0&&!(n=oo.interpolators[r](t,e)););return n}function Qn(t,e){var n,r=[],i=[],o=t.length,a=e.length,s=Math.min(t.length,e.length);for(n=0;s>n;++n)r.push(Wn(t[n],e[n]));for(;o>n;++n)i[n]=t[n];for(;a>n;++n)i[n]=e[n];return function(t){for(n=0;s>n;++n)i[n]=r[n](t);return i}}function Zn(t){return function(e){return 1-t(1-e)}}function Jn(t){return function(e){return.5*(.5>e?t(2*e):2-t(2-2*e))}}function Xn(t){return t*t}function tr(t){return t*t*t}function er(t){return 1-Math.cos(t*Fo)}function nr(t){return Math.pow(2,10*(t-1))}function rr(t){return 1-Math.sqrt(1-t*t)}function ir(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function or(t,e){return e-=t,function(n){return Math.round(t+e*n)}}function ar(t){var e=[t.a,t.b],n=[t.c,t.d],r=ur(e),i=sr(e,n),o=ur(function(t,e,n){return t[0]+=n*e[0],t[1]+=n*e[1],t}(n,e,-i))||0;e[0]*n[1]<n[0]*e[1]&&(e[0]*=-1,e[1]*=-1,r*=-1,i*=-1),this.rotate=(r?Math.atan2(e[1],e[0]):Math.atan2(-n[0],n[1]))*jo,this.translate=[t.e,t.f],this.scale=[r,o],this.skew=o?Math.atan2(i,o)*jo:0}function sr(t,e){return t[0]*e[0]+t[1]*e[1]}function ur(t){var e=Math.sqrt(sr(t,t));return e&&(t[0]/=e,t[1]/=e),e}function cr(t){return t.length?t.pop()+",":""}function lr(t,e){var n=[],r=[];return t=oo.transform(t),e=oo.transform(e),function(t,e,n,r){if(t[0]!==e[0]||t[1]!==e[1]){var i=n.push("translate(",null,",",null,")");r.push({i:i-4,x:$n(t[0],e[0])},{i:i-2,x:$n(t[1],e[1])})}else(e[0]||e[1])&&n.push("translate("+e+")")}(t.translate,e.translate,n,r),function(t,e,n,r){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),r.push({i:n.push(cr(n)+"rotate(",null,")")-2,x:$n(t,e)})):e&&n.push(cr(n)+"rotate("+e+")")}(t.rotate,e.rotate,n,r),function(t,e,n,r){t!==e?r.push({i:n.push(cr(n)+"skewX(",null,")")-2,x:$n(t,e)}):e&&n.push(cr(n)+"skewX("+e+")")}(t.skew,e.skew,n,r),function(t,e,n,r){if(t[0]!==e[0]||t[1]!==e[1]){var i=n.push(cr(n)+"scale(",null,",",null,")");r.push({i:i-4,x:$n(t[0],e[0])},{i:i-2,x:$n(t[1],e[1])})}else 1===e[0]&&1===e[1]||n.push(cr(n)+"scale("+e+")")}(t.scale,e.scale,n,r),t=e=null,function(t){for(var e,i=-1,o=r.length;++i<o;)n[(e=r[i]).i]=e.x(t);return n.join("")}}function hr(t){for(var e=t.source,n=t.target,r=function(t,e){if(t===e)return t;for(var n=pr(t),r=pr(e),i=n.pop(),o=r.pop(),a=null;i===o;)a=i,i=n.pop(),o=r.pop();return a}(e,n),i=[e];e!==r;)e=e.parent,i.push(e);for(var o=i.length;n!==r;)i.splice(o,0,n),n=n.parent;return i}function pr(t){for(var e=[],n=t.parent;null!=n;)e.push(t),t=n,n=n.parent;return e.push(t),e}function fr(t){t.fixed|=2}function dr(t){t.fixed&=-7}function gr(t){t.fixed|=4,t.px=t.x,t.py=t.y}function vr(t){t.fixed&=-5}function yr(t,e,n){var r=0,i=0;if(t.charge=0,!t.leaf)for(var o,a=t.nodes,s=a.length,u=-1;++u<s;)null!=(o=a[u])&&(yr(o,e,n),t.charge+=o.charge,r+=o.charge*o.cx,i+=o.charge*o.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var c=e*n[t.point.index];t.charge+=t.pointCharge=c,r+=c*t.point.x,i+=c*t.point.y}t.cx=r/t.charge,t.cy=i/t.charge}function _r(t,e){return oo.rebind(t,e,"sort","children","value"),t.nodes=t,t.links=Cr,t}function mr(t,e){for(var n=[t];null!=(t=n.pop());)if(e(t),(i=t.children)&&(r=i.length))for(var r,i;--r>=0;)n.push(i[r])}function xr(t,e){for(var n=[t],r=[];null!=(t=n.pop());)if(r.push(t),(o=t.children)&&(i=o.length))for(var i,o,a=-1;++a<i;)n.push(o[a]);for(;null!=(t=r.pop());)e(t)}function Tr(t){return t.children}function Er(t){return t.value}function Sr(t,e){return e.value-t.value}function Cr(t){return oo.merge(t.map(function(t){return(t.children||[]).map(function(e){return{source:t,target:e}})}))}function br(t){return t.x}function Ar(t){return t.y}function wr(t,e,n){t.y0=e,t.y=n}function Rr(t){return oo.range(t.length)}function Nr(t){for(var e=-1,n=t[0].length,r=[];++e<n;)r[e]=0;return r}function Ir(t){for(var e,n=1,r=0,i=t[0][1],o=t.length;o>n;++n)(e=t[n][1])>i&&(r=n,i=e);return r}function kr(t){return t.reduce(Mr,0)}function Mr(t,e){return t+e[1]}function Lr(t,e){return Or(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function Or(t,e){for(var n=-1,r=+t[0],i=(t[1]-r)/e,o=[];++n<=e;)o[n]=i*n+r;return o}function Pr(t){return[oo.min(t),oo.max(t)]}function Dr(t,e){return t.value-e.value}function Ur(t,e){var n=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=n,n._pack_prev=e}function Fr(t,e){t._pack_next=e,e._pack_prev=t}function Hr(t,e){var n=e.x-t.x,r=e.y-t.y,i=t.r+e.r;return.999*i*i>n*n+r*r}function jr(t){function e(t){l=Math.min(t.x-t.r,l),h=Math.max(t.x+t.r,h),p=Math.min(t.y-t.r,p),f=Math.max(t.y+t.r,f)}if((n=t.children)&&(c=n.length)){var n,r,i,o,a,s,u,c,l=1/0,h=-1/0,p=1/0,f=-1/0;if(n.forEach(Br),r=n[0],r.x=-r.r,r.y=0,e(r),c>1&&(i=n[1],i.x=i.r,i.y=0,e(i),c>2))for(o=n[2],Vr(r,i,o),e(o),Ur(r,o),r._pack_prev=o,Ur(o,i),i=r._pack_next,a=3;c>a;a++){Vr(r,i,o=n[a]);var d=0,g=1,v=1;for(s=i._pack_next;s!==i;s=s._pack_next,g++)if(Hr(s,o)){d=1;break}if(1==d)for(u=r._pack_prev;u!==s._pack_prev&&!Hr(u,o);u=u._pack_prev,v++);d?(v>g||g==v&&i.r<r.r?Fr(r,i=s):Fr(r=u,i),a--):(Ur(r,o),i=o,e(o))}var y=(l+h)/2,_=(p+f)/2,m=0;for(a=0;c>a;a++)(o=n[a]).x-=y,o.y-=_,m=Math.max(m,o.r+Math.sqrt(o.x*o.x+o.y*o.y));t.r=m,n.forEach(zr)}}function Br(t){t._pack_next=t._pack_prev=t}function zr(t){delete t._pack_next,delete t._pack_prev}function qr(t,e,n,r){var i=t.children;if(t.x=e+=r*t.x,t.y=n+=r*t.y,t.r*=r,i)for(var o=-1,a=i.length;++o<a;)qr(i[o],e,n,r)}function Vr(t,e,n){var r=t.r+n.r,i=e.x-t.x,o=e.y-t.y;if(r&&(i||o)){var a=e.r+n.r,s=i*i+o*o,u=.5+((r*=r)-(a*=a))/(2*s),c=Math.sqrt(Math.max(0,2*a*(r+s)-(r-=s)*r-a*a))/(2*s);n.x=t.x+u*i+c*o,n.y=t.y+u*o-c*i}else n.x=t.x+r,n.y=t.y}function Gr(t,e){return t.parent==e.parent?1:2}function Yr(t){var e=t.children;return e.length?e[0]:t.t}function $r(t){var e,n=t.children;return(e=n.length)?n[e-1]:t.t}function Kr(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function Wr(t,e,n){return t.a.parent===e.parent?t.a:n}function Qr(t){var e=t.children;return e&&e.length?Qr(e[0]):t}function Zr(t){var e,n=t.children;return n&&(e=n.length)?Zr(n[e-1]):t}function Jr(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function Xr(t,e){var n=t.x+e[3],r=t.y+e[0],i=t.dx-e[1]-e[3],o=t.dy-e[0]-e[2];return 0>i&&(n+=i/2,i=0),0>o&&(r+=o/2,o=0),{x:n,y:r,dx:i,dy:o}}function ti(t){var e=t[0],n=t[t.length-1];return n>e?[e,n]:[n,e]}function ei(t){return t.rangeExtent?t.rangeExtent():ti(t.range())}function ni(t,e){var n,r=0,i=t.length-1,o=t[r],a=t[i];return o>a&&(n=r,r=i,i=n,n=o,o=a,a=n),t[r]=e.floor(o),t[i]=e.ceil(a),t}function ri(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:_s}function ii(t,e,n,r){function i(){var i=Math.min(t.length,e.length)>2?function(t,e,n,r){var i=[],o=[],a=0,s=Math.min(t.length,e.length)-1;for(t[s]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<=s;)i.push(n(t[a-1],t[a])),o.push(r(e[a-1],e[a]));return function(e){var n=oo.bisect(t,e,1,s)-1;return o[n](i[n](e))}}:function(t,e,n,r){var i=n(t[0],t[1]),o=r(e[0],e[1]);return function(t){return o(i(t))}},u=r?function(t,e){return e=(e-=t=+t)||1/e,function(n){return Math.max(0,Math.min(1,(n-t)/e))}}:function(t,e){return e=(e-=t=+t)||1/e,function(n){return(n-t)/e}};return a=i(t,e,u,n),s=i(e,t,u,Wn),o}function o(t){return a(t)}var a,s;return o.invert=function(t){return s(t)},o.domain=function(e){return arguments.length?(t=e.map(Number),i()):t},o.range=function(t){return arguments.length?(e=t,i()):e},o.rangeRound=function(t){return o.range(t).interpolate(or)},o.clamp=function(t){return arguments.length?(r=t,i()):r},o.interpolate=function(t){return arguments.length?(n=t,i()):n},o.ticks=function(e){return ui(t,e)},o.tickFormat=function(e,n){return ci(t,e,n)},o.nice=function(e){return ai(t,e),i()},o.copy=function(){return ii(t,e,n,r)},i()}function oi(t,e){return oo.rebind(t,e,"range","rangeRound","interpolate","clamp")}function ai(t,e){return ni(t,ri(si(t,e)[2])),ni(t,ri(si(t,e)[2])),t}function si(t,e){null==e&&(e=10);var n=ti(t),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/e)/Math.LN10)),o=e/r*i;return.15>=o?i*=10:.35>=o?i*=5:.75>=o&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+.5*i,n[2]=i,n}function ui(t,e){return oo.range.apply(oo,si(t,e))}function ci(t,e,n){var r=si(t,e);if(n){var i=aa.exec(n);if(i.shift(),"s"===i[8]){var o=oo.formatPrefix(Math.max(vo(r[0]),vo(r[1])));return i[7]||(i[7]="."+li(o.scale(r[2]))),i[8]="f",n=oo.format(i.join("")),function(t){return n(o.scale(t))+o.symbol}}i[7]||(i[7]="."+function(t,e){var n=li(e[2]);return t in ms?Math.abs(n-li(Math.max(vo(e[0]),vo(e[1]))))+ +("e"!==t):n-2*("%"===t)}(i[8],r)),n=i.join("")}else n=",."+li(r[2])+"f";return oo.format(n)}function li(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function hi(t,e,n,r){function i(t){return(n?Math.log(0>t?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function o(t){return n?Math.pow(e,t):-Math.pow(e,-t)}function a(e){return t(i(e))}return a.invert=function(e){return o(t.invert(e))},a.domain=function(e){return arguments.length?(n=e[0]>=0,t.domain((r=e.map(Number)).map(i)),a):r},a.base=function(n){return arguments.length?(e=+n,t.domain(r.map(i)),a):e},a.nice=function(){var e=ni(r.map(i),n?Math:Ts);return t.domain(e),r=e.map(o),a},a.ticks=function(){var t=ti(r),a=[],s=t[0],u=t[1],c=Math.floor(i(s)),l=Math.ceil(i(u)),h=e%1?2:e;if(isFinite(l-c)){if(n){for(;l>c;c++)for(p=1;h>p;p++)a.push(o(c)*p);a.push(o(c))}else for(a.push(o(c));c++<l;)for(var p=h-1;p>0;p--)a.push(o(c)*p);for(c=0;a[c]<s;c++);for(l=a.length;a[l-1]>u;l--);a=a.slice(c,l)}return a},a.tickFormat=function(t,n){if(!arguments.length)return xs;arguments.length<2?n=xs:"function"!=typeof n&&(n=oo.format(n));var r=Math.max(1,e*t/a.ticks().length);return function(t){var a=t/o(Math.round(i(t)));return e-.5>a*e&&(a*=e),r>=a?n(t):""}},a.copy=function(){return hi(t.copy(),e,n,r)},oi(a,t)}function pi(t,e,n){function r(e){return t(i(e))}var i=fi(e),o=fi(1/e);return r.invert=function(e){return o(t.invert(e))},r.domain=function(e){return arguments.length?(t.domain((n=e.map(Number)).map(i)),r):n},r.ticks=function(t){return ui(n,t)},r.tickFormat=function(t,e){return ci(n,t,e)},r.nice=function(t){return r.domain(ai(n,t))},r.exponent=function(a){return arguments.length?(i=fi(e=a),o=fi(1/e),t.domain(n.map(i)),r):e},r.copy=function(){return pi(t.copy(),e,n)},oi(r,t)}function fi(t){return function(e){return 0>e?-Math.pow(-e,t):Math.pow(e,t)}}function di(t,e){function n(n){return o[((i.get(n)||("range"===e.t?i.set(n,t.push(n)):NaN))-1)%o.length]}function r(e,n){return oo.range(t.length).map(function(t){return e+n*t})}var i,o,a;return n.domain=function(r){if(!arguments.length)return t;t=[],i=new d;for(var o,a=-1,s=r.length;++a<s;)i.has(o=r[a])||i.set(o,t.push(o));return n[e.t].apply(n,e.a)},n.range=function(t){return arguments.length?(o=t,a=0,e={t:"range",a:arguments},n):o},n.rangePoints=function(i,s){arguments.length<2&&(s=0);var u=i[0],c=i[1],l=t.length<2?(u=(u+c)/2,0):(c-u)/(t.length-1+s);return o=r(u+l*s/2,l),a=0,e={t:"rangePoints",a:arguments},n},n.rangeRoundPoints=function(i,s){arguments.length<2&&(s=0);var u=i[0],c=i[1],l=t.length<2?(u=c=Math.round((u+c)/2),0):(c-u)/(t.length-1+s)|0;return o=r(u+Math.round(l*s/2+(c-u-(t.length-1+s)*l)/2),l),a=0,e={t:"rangeRoundPoints",a:arguments},n},n.rangeBands=function(i,s,u){arguments.length<2&&(s=0),arguments.length<3&&(u=s);var c=i[1]<i[0],l=i[c-0],h=(i[1-c]-l)/(t.length-s+2*u);return o=r(l+h*u,h),c&&o.reverse(),a=h*(1-s),e={t:"rangeBands",a:arguments},n},n.rangeRoundBands=function(i,s,u){arguments.length<2&&(s=0),arguments.length<3&&(u=s);var c=i[1]<i[0],l=i[c-0],h=i[1-c],p=Math.floor((h-l)/(t.length-s+2*u));return o=r(l+Math.round((h-l-(t.length-s)*p)/2),p),c&&o.reverse(),a=Math.round(p*(1-s)),e={t:"rangeRoundBands",a:arguments},n},n.rangeBand=function(){return a},n.rangeExtent=function(){return ti(e.a[0])},n.copy=function(){return di(t,e)},n.domain(t)}function gi(t,e){function n(){var n=0,o=e.length;for(i=[];++n<o;)i[n-1]=oo.quantile(t,n/o);return r}function r(t){return isNaN(t=+t)?void 0:e[oo.bisect(i,t)]}var i;return r.domain=function(e){return arguments.length?(t=e.map(c).filter(l).sort(u),n()):t},r.range=function(t){return arguments.length?(e=t,n()):e},r.quantiles=function(){return i},r.invertExtent=function(n){return 0>(n=e.indexOf(n))?[NaN,NaN]:[n>0?i[n-1]:t[0],n<i.length?i[n]:t[t.length-1]]},r.copy=function(){return gi(t,e)},n()}function vi(t,e,n){function r(e){return n[Math.max(0,Math.min(a,Math.floor(o*(e-t))))]}function i(){return o=n.length/(e-t),a=n.length-1,r}var o,a;return r.domain=function(n){return arguments.length?(t=+n[0],e=+n[n.length-1],i()):[t,e]},r.range=function(t){return arguments.length?(n=t,i()):n},r.invertExtent=function(e){return e=n.indexOf(e),e=0>e?NaN:e/o+t,[e,e+1/o]},r.copy=function(){return vi(t,e,n)},i()}function yi(t,e){function n(n){return n>=n?e[oo.bisect(t,n)]:void 0}return n.domain=function(e){return arguments.length?(t=e,n):t},n.range=function(t){return arguments.length?(e=t,n):e},n.invertExtent=function(n){return n=e.indexOf(n),[t[n-1],t[n]]},n.copy=function(){return yi(t,e)},n}function _i(t){function e(t){return+t}return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=n.map(e),e):t},e.ticks=function(e){return ui(t,e)},e.tickFormat=function(e,n){return ci(t,e,n)},e.copy=function(){return _i(t)},e}function mi(){return 0}function xi(t){return t.innerRadius}function Ti(t){return t.outerRadius}function Ei(t){return t.startAngle}function Si(t){return t.endAngle}function Ci(t){return t&&t.padAngle}function bi(t,e,n,r){return(t-n)*e-(e-r)*t>0?0:1}function Ai(t,e,n,r,i){var o=t[0]-e[0],a=t[1]-e[1],s=(i?r:-r)/Math.sqrt(o*o+a*a),u=s*a,c=-s*o,l=t[0]+u,h=t[1]+c,p=e[0]+u,f=e[1]+c,d=(l+p)/2,g=(h+f)/2,v=p-l,y=f-h,_=v*v+y*y,m=n-r,x=l*f-p*h,T=(0>y?-1:1)*Math.sqrt(Math.max(0,m*m*_-x*x)),E=(x*y-v*T)/_,S=(-x*v-y*T)/_,C=(x*y+v*T)/_,b=(-x*v+y*T)/_,A=E-d,w=S-g,R=C-d,N=b-g;return A*A+w*w>R*R+N*N&&(E=C,S=b),[[E-u,S-c],[E*n/m,S*n/m]]}function wi(t){function e(e){function a(){c.push("M",o(t(l),s))}for(var u,c=[],l=[],h=-1,p=e.length,f=Rt(n),d=Rt(r);++h<p;)i.call(this,u=e[h],h)?l.push([+f.call(this,u,h),+d.call(this,u,h)]):l.length&&(a(),l=[]);return l.length&&a(),c.length?c.join(""):null}var n=fn,r=dn,i=Ce,o=Ri,a=o.key,s=.7;return e.x=function(t){return arguments.length?(n=t,e):n},e.y=function(t){return arguments.length?(r=t,e):r},e.defined=function(t){return arguments.length?(i=t,e):i},e.interpolate=function(t){return arguments.length?(a="function"==typeof t?o=t:(o=ws.get(t)||Ri).key,e):a},e.tension=function(t){return arguments.length?(s=t,e):s},e}function Ri(t){return t.length>1?t.join("L"):t+"Z"}function Ni(t){return t.join("L")+"Z"}function Ii(t){for(var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];++e<n;)i.push("V",(r=t[e])[1],"H",r[0]);return i.join("")}function ki(t){for(var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];++e<n;)i.push("H",(r=t[e])[0],"V",r[1]);return i.join("")}function Mi(t,e){if(e.length<1||t.length!=e.length&&t.length!=e.length+2)return Ri(t);var n=t.length!=e.length,r="",i=t[0],o=t[1],a=e[0],s=a,u=1;if(n&&(r+="Q"+(o[0]-2*a[0]/3)+","+(o[1]-2*a[1]/3)+","+o[0]+","+o[1],i=t[1],u=2),e.length>1){s=e[1],o=t[u],u++,r+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1];for(var c=2;c<e.length;c++,u++)o=t[u],s=e[c],r+="S"+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1]}if(n){var l=t[u];r+="Q"+(o[0]+2*s[0]/3)+","+(o[1]+2*s[1]/3)+","+l[0]+","+l[1]}return r}function Li(t,e){for(var n,r=[],i=(1-e)/2,o=t[0],a=t[1],s=1,u=t.length;++s<u;)n=o,o=a,a=t[s],r.push([i*(a[0]-n[0]),i*(a[1]-n[1])]);return r}function Oi(t){if(t.length<3)return Ri(t);var e=1,n=t.length,r=t[0],i=r[0],o=r[1],a=[i,i,i,(r=t[1])[0]],s=[o,o,o,r[1]],u=[i,",",o,"L",Pi(Is,a),",",Pi(Is,s)];for(t.push(t[n-1]);++e<=n;)r=t[e],a.shift(),a.push(r[0]),s.shift(),s.push(r[1]),Di(u,a,s);return t.pop(),u.push("L",r),u.join("")}function Pi(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function Di(t,e,n){t.push("C",Pi(Rs,e),",",Pi(Rs,n),",",Pi(Ns,e),",",Pi(Ns,n),",",Pi(Is,e),",",Pi(Is,n))}function Ui(t,e){return(e[1]-t[1])/(e[0]-t[0])}function Fi(t){for(var e,n,r,i,o=[],a=function(t){for(var e=0,n=t.length-1,r=[],i=t[0],o=t[1],a=r[0]=Ui(i,o);++e<n;)r[e]=(a+(a=Ui(i=o,o=t[e+1])))/2;return r[e]=a,r}(t),s=-1,u=t.length-1;++s<u;)e=Ui(t[s],t[s+1]),vo(e)<Lo?a[s]=a[s+1]=0:(n=a[s]/e,r=a[s+1]/e,(i=n*n+r*r)>9&&(i=3*e/Math.sqrt(i),a[s]=i*n,a[s+1]=i*r));for(s=-1;++s<=u;)i=(t[Math.min(u,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+a[s]*a[s])),o.push([i||0,a[s]*i||0]);return o}function Hi(t){for(var e,n,r,i=-1,o=t.length;++i<o;)n=(e=t[i])[0],r=e[1]-Fo,e[0]=n*Math.cos(r),e[1]=n*Math.sin(r);return t}function ji(t){function e(e){function u(){g.push("M",s(t(y),h),l,c(t(v.reverse()),h),"Z")}for(var p,f,d,g=[],v=[],y=[],_=-1,m=e.length,x=Rt(n),T=Rt(i),E=n===r?function(){return f}:Rt(r),S=i===o?function(){return d}:Rt(o);++_<m;)a.call(this,p=e[_],_)?(v.push([f=+x.call(this,p,_),d=+T.call(this,p,_)]),y.push([+E.call(this,p,_),+S.call(this,p,_)])):v.length&&(u(),v=[],y=[]);return v.length&&u(),g.length?g.join(""):null}var n=fn,r=fn,i=0,o=dn,a=Ce,s=Ri,u=s.key,c=s,l="L",h=.7;return e.x=function(t){return arguments.length?(n=r=t,e):r},e.x0=function(t){return arguments.length?(n=t,e):n},e.x1=function(t){return arguments.length?(r=t,e):r},e.y=function(t){return arguments.length?(i=o=t,e):o},e.y0=function(t){return arguments.length?(i=t,e):i},e.y1=function(t){return arguments.length?(o=t,e):o},e.defined=function(t){return arguments.length?(a=t,e):a},e.interpolate=function(t){return arguments.length?(u="function"==typeof t?s=t:(s=ws.get(t)||Ri).key,c=s.reverse||s,l=s.closed?"M":"L",e):u},e.tension=function(t){return arguments.length?(h=t,e):h},e}function Bi(t){return t.radius}function zi(t){return[t.x,t.y]}function qi(){return 64}function Vi(){return"circle"}function Gi(t){var e=Math.sqrt(t/Po);return"M0,"+e+"A"+e+","+e+" 0 1,1 0,"+-e+"A"+e+","+e+" 0 1,1 0,"+e+"Z"}function Yi(t){return function(){var e,n,r;(e=this[t])&&(r=e[n=e.active])&&(r.timer.c=null,r.timer.t=NaN,--e.count?delete e[n]:delete this[t],e.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function $i(t,e,n){return To(t,Us),t.namespace=e,t.id=n,t}function Ki(t,e,n,r){var i=t.id,o=t.namespace;return K(t,"function"==typeof n?function(t,a,s){t[o][i].tween.set(e,r(n.call(t,t.__data__,a,s)))}:(n=r(n),function(t){t[o][i].tween.set(e,n)}))}function Wi(t){return null==t&&(t=""),function(){this.textContent=t}}function Qi(t){return null==t?"__transition__":"__transition_"+t+"__"}function Zi(t,e,n,r,i){function o(n){var i=p.active,o=p[i];o&&(o.timer.c=null,o.timer.t=NaN,--p.count,delete p[i],o.event&&o.event.interrupt.call(t,t.__data__,o.index));for(var d in p)if(r>+d){var g=p[d];g.timer.c=null,g.timer.t=NaN,--p.count,delete p[d]}u.c=a,kt(function(){return u.c&&a(n||1)&&(u.c=null,u.t=NaN),1},0,s),p.active=r,f.event&&f.event.start.call(t,t.__data__,e),h=[],f.tween.forEach(function(n,r){(r=r.call(t,t.__data__,e))&&h.push(r)}),l=f.ease,c=f.duration}function a(i){for(var o=i/c,a=l(o),s=h.length;s>0;)h[--s].call(t,a);return o>=1?(f.event&&f.event.end.call(t,t.__data__,e),--p.count?delete p[r]:delete t[n],1):void 0}var s,u,c,l,h,p=t[n]||(t[n]={active:0,count:0}),f=p[r];f||(s=i.time,u=kt(function(t){var e=f.delay;return u.t=e+s,t>=e?o(t-e):void(u.c=o)},0,s),f=p[r]={tween:new d,time:s,timer:u,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++p.count)}function Ji(t,e,n){t.attr("transform",function(t){var r=e(t);return"translate("+(isFinite(r)?r:n(t))+",0)"})}function Xi(t,e,n){t.attr("transform",function(t){var r=e(t);return"translate(0,"+(isFinite(r)?r:n(t))+")"})}function to(t){return t.toISOString()}function eo(t,e,n){function r(e){return t(e)}function i(t,n){var r=(t[1]-t[0])/n,i=oo.bisect(Ys,r);return i==Ys.length?[e.year,si(t.map(function(t){return t/31536e6}),n)[2]]:i?e[r/Ys[i-1]<Ys[i]/r?i-1:i]:[Ws,si(t,n)[2]]}return r.invert=function(e){return no(t.invert(e))},r.domain=function(e){return arguments.length?(t.domain(e),r):t.domain().map(no)},r.nice=function(t,e){function n(n){return!isNaN(n)&&!t.range(n,no(+n+1),e).length}var o=r.domain(),a=ti(o),s=null==t?i(a,10):"number"==typeof t&&i(a,t);return s&&(t=s[0],e=s[1]),r.domain(ni(o,e>1?{floor:function(e){for(;n(e=t.floor(e));)e=no(e-1);return e},ceil:function(e){for(;n(e=t.ceil(e));)e=no(+e+1);return e}}:t))},r.ticks=function(t,e){var n=ti(r.domain()),o=null==t?i(n,10):"number"==typeof t?i(n,t):!t.range&&[{range:t},e];return o&&(t=o[0],e=o[1]),t.range(n[0],no(+n[1]+1),1>e?1:e)},r.tickFormat=function(){return n},r.copy=function(){return eo(t.copy(),e,n)},oi(r,t)}function no(t){return new Date(t)}function ro(t){return JSON.parse(t.responseText)}function io(t){var e=uo.createRange();return e.selectNode(uo.body),e.createContextualFragment(t.responseText)}var oo={version:"3.5.17"},ao=[].slice,so=function(t){return ao.call(t)},uo=this.document;if(uo)try{so(uo.documentElement.childNodes)[0].nodeType}catch(t){so=function(t){for(var e=t.length,n=new Array(e);e--;)n[e]=t[e];return n}}if(Date.now||(Date.now=function(){return+new Date}),uo)try{uo.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var co=this.Element.prototype,lo=co.setAttribute,ho=co.setAttributeNS,po=this.CSSStyleDeclaration.prototype,fo=po.setProperty;co.setAttribute=function(t,e){lo.call(this,t,e+"")},co.setAttributeNS=function(t,e,n){ho.call(this,t,e,n+"")},po.setProperty=function(t,e,n){fo.call(this,t,e+"",n)}}oo.ascending=u,oo.descending=function(t,e){return t>e?-1:e>t?1:e>=t?0:NaN},oo.min=function(t,e){var n,r,i=-1,o=t.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=t[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=t[i])&&n>r&&(n=r)}else{for(;++i<o;)if(null!=(r=e.call(t,t[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=e.call(t,t[i],i))&&n>r&&(n=r)}return n},oo.max=function(t,e){var n,r,i=-1,o=t.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=t[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=t[i])&&r>n&&(n=r)}else{for(;++i<o;)if(null!=(r=e.call(t,t[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=e.call(t,t[i],i))&&r>n&&(n=r)}return n},oo.extent=function(t,e){var n,r,i,o=-1,a=t.length;if(1===arguments.length){for(;++o<a;)if(null!=(r=t[o])&&r>=r){n=i=r;break}for(;++o<a;)null!=(r=t[o])&&(n>r&&(n=r),r>i&&(i=r))}else{for(;++o<a;)if(null!=(r=e.call(t,t[o],o))&&r>=r){n=i=r;break}for(;++o<a;)null!=(r=e.call(t,t[o],o))&&(n>r&&(n=r),r>i&&(i=r))}return[n,i]},oo.sum=function(t,e){var n,r=0,i=t.length,o=-1;if(1===arguments.length)for(;++o<i;)l(n=+t[o])&&(r+=n);else for(;++o<i;)l(n=+e.call(t,t[o],o))&&(r+=n);return r},oo.mean=function(t,e){var n,r=0,i=t.length,o=-1,a=i;if(1===arguments.length)for(;++o<i;)l(n=c(t[o]))?r+=n:--a;else for(;++o<i;)l(n=c(e.call(t,t[o],o)))?r+=n:--a;return a?r/a:void 0},oo.quantile=function(t,e){var n=(t.length-1)*e+1,r=Math.floor(n),i=+t[r-1],o=n-r;return o?i+o*(t[r]-i):i},oo.median=function(t,e){var n,r=[],i=t.length,o=-1;if(1===arguments.length)for(;++o<i;)l(n=c(t[o]))&&r.push(n);else for(;++o<i;)l(n=c(e.call(t,t[o],o)))&&r.push(n);return r.length?oo.quantile(r.sort(u),.5):void 0},oo.variance=function(t,e){var n,r,i=t.length,o=0,a=0,s=-1,u=0;if(1===arguments.length)for(;++s<i;)l(n=c(t[s]))&&(r=n-o,o+=r/++u,a+=r*(n-o));else for(;++s<i;)l(n=c(e.call(t,t[s],s)))&&(r=n-o,o+=r/++u,a+=r*(n-o));return u>1?a/(u-1):void 0},oo.deviation=function(){var t=oo.variance.apply(this,arguments);return t?Math.sqrt(t):t};var go=h(u);oo.bisectLeft=go.left,oo.bisect=oo.bisectRight=go.right,oo.bisector=function(t){return h(1===t.length?function(e,n){return u(t(e),n)}:t)},oo.shuffle=function(t,e,n){(o=arguments.length)<3&&(n=t.length,2>o&&(e=0));for(var r,i,o=n-e;o;)i=Math.random()*o--|0,r=t[o+e],t[o+e]=t[i+e],t[i+e]=r;return t},oo.permute=function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r},oo.pairs=function(t){for(var e=0,n=t.length-1,r=t[0],i=new Array(0>n?0:n);n>e;)i[e]=[r,r=t[++e]];return i},oo.transpose=function(t){if(!(i=t.length))return[];for(var e=-1,n=oo.min(t,p),r=new Array(n);++e<n;)for(var i,o=-1,a=r[e]=new Array(i);++o<i;)a[o]=t[o][e];return r},oo.zip=function(){return oo.transpose(arguments)},oo.keys=function(t){var e=[];for(var n in t)e.push(n);return e},oo.values=function(t){var e=[];for(var n in t)e.push(t[n]);return e},oo.entries=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e},oo.merge=function(t){for(var e,n,r,i=t.length,o=-1,a=0;++o<i;)a+=t[o].length;for(n=new Array(a);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--a]=r[e];return n};var vo=Math.abs;oo.range=function(t,e,n){if(arguments.length<3&&(n=1,arguments.length<2&&(e=t,t=0)),(e-t)/n==1/0)throw new Error("infinite range");var r,i=[],o=function(t){for(var e=1;t*e%1;)e*=10;return e}(vo(n)),a=-1;if(t*=o,e*=o,0>(n*=o))for(;(r=t+n*++a)>e;)i.push(r/o);else for(;(r=t+n*++a)<e;)i.push(r/o);return i},oo.map=function(t,e){var n=new d;if(t instanceof d)t.forEach(function(t,e){n.set(t,e)});else if(Array.isArray(t)){var r,i=-1,o=t.length;if(1===arguments.length)for(;++i<o;)n.set(i,t[i]);else for(;++i<o;)n.set(e.call(t,r=t[i],i),r)}else for(var a in t)n.set(a,t[a]);return n};var yo="__proto__",_o="\0";f(d,{has:y,get:function(t){return this._[g(t)]},set:function(t,e){return this._[g(t)]=e},remove:_,keys:m,values:function(){var t=[];for(var e in this._)t.push(this._[e]);return t},entries:function(){var t=[];for(var e in this._)t.push({key:v(e),value:this._[e]});return t},size:x,empty:T,forEach:function(t){for(var e in this._)t.call(this,v(e),this._[e])}}),oo.nest=function(){function t(e,a,s){if(s>=o.length)return r?r.call(i,a):n?a.sort(n):a;for(var u,c,l,h,p=-1,f=a.length,g=o[s++],v=new d;++p<f;)(h=v.get(u=g(c=a[p])))?h.push(c):v.set(u,[c]);return e?(c=e(),l=function(n,r){c.set(n,t(e,r,s))}):(c={},l=function(n,r){c[n]=t(e,r,s)}),v.forEach(l),c}function e(t,n){if(n>=o.length)return t;var r=[],i=a[n++];return t.forEach(function(t,i){r.push({key:t,values:e(i,n)})}),i?r.sort(function(t,e){return i(t.key,e.key)}):r}var n,r,i={},o=[],a=[];return i.map=function(e,n){return t(n,e,0)},i.entries=function(n){return e(t(oo.map,n,0),0)},i.key=function(t){return o.push(t),i},i.sortKeys=function(t){return a[o.length-1]=t,i},i.sortValues=function(t){return n=t,i},i.rollup=function(t){return r=t,i},i},oo.set=function(t){var e=new E;if(t)for(var n=0,r=t.length;r>n;++n)e.add(t[n]);return e},f(E,{has:y,add:function(t){return this._[g(t+="")]=!0,t},remove:_,values:m,size:x,empty:T,forEach:function(t){for(var e in this._)t.call(this,v(e))}}),oo.behavior={},oo.rebind=function(t,e){for(var n,r=1,i=arguments.length;++r<i;)t[n=arguments[r]]=C(t,e,e[n]);return t};var mo=["webkit","ms","moz","Moz","o","O"];oo.dispatch=function(){for(var t=new w,e=-1,n=arguments.length;++e<n;)t[arguments[e]]=R(t);return t},w.prototype.on=function(t,e){var n=t.indexOf("."),r="";if(n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),t)return arguments.length<2?this[t].on(r):this[t].on(r,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(r,null);return this}},oo.event=null,oo.requote=function(t){return t.replace(xo,"\\$&")};var xo=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,To={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)t[n]=e[n]},Eo=function(t,e){return e.querySelector(t)},So=function(t,e){return e.querySelectorAll(t)},Co=function(t,e){var n=t.matches||t[b(t,"matchesSelector")];return(Co=function(t,e){return n.call(t,e)})(t,e)};"function"==typeof Sizzle&&(Eo=function(t,e){return Sizzle(t,e)[0]||null},So=Sizzle,Co=Sizzle.matchesSelector),oo.selection=function(){return oo.select(uo.documentElement)};var bo=oo.selection.prototype=[];bo.select=function(t){var e,n,r,i,o=[];t=L(t);for(var a=-1,s=this.length;++a<s;){o.push(e=[]),e.parentNode=(r=this[a]).parentNode;for(var u=-1,c=r.length;++u<c;)(i=r[u])?(e.push(n=t.call(i,i.__data__,u,a)),n&&"__data__"in i&&(n.__data__=i.__data__)):e.push(null)}return M(o)},bo.selectAll=function(t){var e,n,r=[];t=O(t);for(var i=-1,o=this.length;++i<o;)for(var a=this[i],s=-1,u=a.length;++s<u;)(n=a[s])&&(r.push(e=so(t.call(n,n.__data__,s,i))),e.parentNode=n);return M(r)};var Ao="http://www.w3.org/1999/xhtml",wo={svg:"http://www.w3.org/2000/svg",xhtml:Ao,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};oo.ns={prefix:wo,qualify:function(t){var e=t.indexOf(":"),n=t;return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),wo.hasOwnProperty(n)?{space:wo[n],local:t}:t}},bo.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node();return(t=oo.ns.qualify(t)).local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(e in t)this.each(P(e,t[e]));return this}return this.each(P(t,e))},bo.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node(),r=(t=F(t)).length,i=-1;if(e=n.classList){for(;++i<r;)if(!e.contains(t[i]))return!1}else for(e=n.getAttribute("class");++i<r;)if(!U(t[i]).test(e))return!1;return!0}for(e in t)this.each(H(e,t[e]));return this}return this.each(H(t,e))},bo.style=function(t,e,n){var r=arguments.length;if(3>r){if("string"!=typeof t){2>r&&(e="");for(n in t)this.each(B(n,t[n],e));return this}if(2>r){var i=this.node();return s(i).getComputedStyle(i,null).getPropertyValue(t)}n=""}return this.each(B(t,e,n))},bo.property=function(t,e){if(arguments.length<2){if("string"==typeof t)return this.node()[t];for(e in t)this.each(z(e,t[e]));return this}return this.each(z(t,e))},bo.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},bo.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},bo.append=function(t){return t=q(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})},bo.insert=function(t,e){return t=q(t),e=L(e),this.select(function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)})},bo.remove=function(){return this.each(V)},bo.data=function(t,e){function n(t,n){var r,i,o,a=t.length,l=n.length,h=Math.min(a,l),p=new Array(l),f=new Array(l),g=new Array(a);if(e){var v,y=new d,_=new Array(a);for(r=-1;++r<a;)(i=t[r])&&(y.has(v=e.call(i,i.__data__,r))?g[r]=i:y.set(v,i),_[r]=v);for(r=-1;++r<l;)(i=y.get(v=e.call(n,o=n[r],r)))?!0!==i&&(p[r]=i,i.__data__=o):f[r]=G(o),y.set(v,!0);for(r=-1;++r<a;)r in _&&!0!==y.get(_[r])&&(g[r]=t[r])}else{for(r=-1;++r<h;)i=t[r],o=n[r],i?(i.__data__=o,p[r]=i):f[r]=G(o);for(;l>r;++r)f[r]=G(n[r]);for(;a>r;++r)g[r]=t[r]}f.update=p,f.parentNode=p.parentNode=g.parentNode=t.parentNode,s.push(f),u.push(p),c.push(g)}var r,i,o=-1,a=this.length;if(!arguments.length){for(t=new Array(a=(r=this[0]).length);++o<a;)(i=r[o])&&(t[o]=i.__data__);return t}var s=W([]),u=M([]),c=M([]);if("function"==typeof t)for(;++o<a;)n(r=this[o],t.call(r,r.parentNode.__data__,o));else for(;++o<a;)n(r=this[o],t);return u.enter=function(){return s},u.exit=function(){return c},u},bo.datum=function(t){return arguments.length?this.property("__data__",t):this.property("__data__")},bo.filter=function(t){var e,n,r,i=[];"function"!=typeof t&&(t=Y(t));for(var o=0,a=this.length;a>o;o++){i.push(e=[]),e.parentNode=(n=this[o]).parentNode;for(var s=0,u=n.length;u>s;s++)(r=n[s])&&t.call(r,r.__data__,s,o)&&e.push(r)}return M(i)},bo.order=function(){for(var t=-1,e=this.length;++t<e;)for(var n,r=this[t],i=r.length-1,o=r[i];--i>=0;)(n=r[i])&&(o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o),o=n);return this},bo.sort=function(t){t=$.apply(this,arguments);for(var e=-1,n=this.length;++e<n;)this[e].sort(t);return this.order()},bo.each=function(t){return K(this,function(e,n,r){t.call(e,e.__data__,n,r)})},bo.call=function(t){var e=so(arguments);return t.apply(e[0]=this,e),this},bo.empty=function(){return!this.node()},bo.node=function(){for(var t=0,e=this.length;e>t;t++)for(var n=this[t],r=0,i=n.length;i>r;r++){var o=n[r];if(o)return o}return null},bo.size=function(){var t=0;return K(this,function(){++t}),t};var Ro=[];oo.selection.enter=W,oo.selection.enter.prototype=Ro,Ro.append=bo.append,Ro.empty=bo.empty,Ro.node=bo.node,Ro.call=bo.call,Ro.size=bo.size,Ro.select=function(t){for(var e,n,r,i,o,a=[],s=-1,u=this.length;++s<u;){r=(i=this[s]).update,a.push(e=[]),e.parentNode=i.parentNode;for(var c=-1,l=i.length;++c<l;)(o=i[c])?(e.push(r[c]=n=t.call(i.parentNode,o.__data__,c,s)),n.__data__=o.__data__):e.push(null)}return M(a)},Ro.insert=function(t,e){return arguments.length<2&&(e=function(t){var e,n;return function(r,i,o){var a,s=t[o].update,u=s.length;for(o!=n&&(n=o,e=0),i>=e&&(e=i+1);!(a=s[e])&&++e<u;);return a}}(this)),bo.insert.call(this,t,e)},oo.select=function(t){var e;return"string"==typeof t?(e=[Eo(t,uo)],e.parentNode=uo.documentElement):(e=[t],e.parentNode=a(t)),M([e])},oo.selectAll=function(t){var e;return"string"==typeof t?(e=so(So(t,uo)),e.parentNode=uo.documentElement):(e=so(t),e.parentNode=null),M([e])},bo.on=function(t,e,n){var r=arguments.length;if(3>r){if("string"!=typeof t){2>r&&(e=!1);for(n in t)this.each(Q(n,t[n],e));return this}if(2>r)return(r=this.node()["__on"+t])&&r._;n=!1}return this.each(Q(t,e,n))};var No=oo.map({mouseenter:"mouseover",mouseleave:"mouseout"});uo&&No.forEach(function(t){"on"+t in uo&&No.remove(t)});var Io,ko=0;oo.mouse=function(t){return tt(t,I())};var Mo=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;oo.touch=function(t,e,n){if(arguments.length<3&&(n=e,e=I().changedTouches),e)for(var r,i=0,o=e.length;o>i;++i)if((r=e[i]).identifier===n)return tt(t,r)},oo.behavior.drag=function(){function t(){this.on("mousedown.drag",i).on("touchstart.drag",o)}function e(t,e,i,o,a){return function(){var s,u=this,c=oo.event.target.correspondingElement||oo.event.target,l=u.parentNode,h=n.of(u,arguments),p=0,f=t(),d=".drag"+(null==f?"":"-"+f),g=oo.select(i(c)).on(o+d,function(){var t,n,r=e(l,f);r&&(t=r[0]-y[0],n=r[1]-y[1],p|=t|n,y=r,h({type:"drag",x:r[0]+s[0],y:r[1]+s[1],dx:t,dy:n}))}).on(a+d,function(){e(l,f)&&(g.on(o+d,null).on(a+d,null),v(p),h({type:"dragend"}))}),v=X(c),y=e(l,f);r?(s=r.apply(u,arguments),s=[s.x-y[0],s.y-y[1]]):s=[0,0],h({type:"dragstart"})}}var n=k(t,"drag","dragstart","dragend"),r=null,i=e(A,oo.mouse,s,"mousemove","mouseup"),o=e(et,oo.touch,S,"touchmove","touchend");return t.origin=function(e){return arguments.length?(r=e,t):r},oo.rebind(t,n,"on")},oo.touches=function(t,e){return arguments.length<2&&(e=I().touches),e?so(e).map(function(e){var n=tt(t,e);return n.identifier=e.identifier,n}):[]};var Lo=1e-6,Oo=Lo*Lo,Po=Math.PI,Do=2*Po,Uo=Do-Lo,Fo=Po/2,Ho=Po/180,jo=180/Po,Bo=Math.SQRT2;oo.interpolateZoom=function(t,e){var n,r,i=t[0],o=t[1],a=t[2],s=e[0],u=e[1],c=e[2],l=s-i,h=u-o,p=l*l+h*h;if(Oo>p)r=Math.log(c/a)/Bo,n=function(t){return[i+t*l,o+t*h,a*Math.exp(Bo*t*r)]};else{var f=Math.sqrt(p),d=(c*c-a*a+4*p)/(2*a*2*f),g=(c*c-a*a-4*p)/(2*c*2*f),v=Math.log(Math.sqrt(d*d+1)-d),y=Math.log(Math.sqrt(g*g+1)-g);r=(y-v)/Bo,n=function(t){var e=t*r,n=at(v),s=a/(2*f)*(n*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(Bo*e+v)-function(t){return((t=Math.exp(t))-1/t)/2}(v));return[i+s*l,o+s*h,a*n/at(Bo*e+v)]}}return n.duration=1e3*r,n},oo.behavior.zoom=function(){function t(t){t.on(R,l).on(qo+".zoom",p).on("dblclick.zoom",f).on(L,h)}function e(t){return[(t[0]-S.x)/S.k,(t[1]-S.y)/S.k]}function n(t){S.k=Math.max(b[0],Math.min(b[1],t))}function r(t,e){e=function(t){return[t[0]*S.k+S.x,t[1]*S.k+S.y]}(e),S.x+=t[0]-e[0],S.y+=t[1]-e[1]}function i(e,i,o,a){e.__chart__={x:S.x,y:S.y,k:S.k},n(Math.pow(2,a)),r(g=i,o),e=oo.select(e),A>0&&(e=e.transition().duration(A)),e.call(t.event)}function o(){x&&x.domain(m.range().map(function(t){return(t-S.x)/S.k}).map(m.invert)),E&&E.domain(T.range().map(function(t){return(t-S.y)/S.k}).map(T.invert))}function a(t){w++||t({type:"zoomstart"})}function u(t){o(),t({type:"zoom",scale:S.k,translate:[S.x,S.y]})}function c(t){--w||(t({type:"zoomend"}),g=null)}function l(){var t=this,n=O.of(t,arguments),i=0,o=oo.select(s(t)).on(I,function(){i=1,r(oo.mouse(t),l),u(n)}).on(M,function(){o.on(I,null).on(M,null),h(i),c(n)}),l=e(oo.mouse(t)),h=X(t);Ds.call(t),a(n)}function h(){function t(){var t=oo.touches(d);return f=S.k,t.forEach(function(t){t.identifier in v&&(v[t.identifier]=e(t))}),t}function o(){var e=oo.event.target;oo.select(e).on(x,s).on(T,p),E.push(e);for(var n=oo.event.changedTouches,r=0,o=n.length;o>r;++r)v[n[r].identifier]=null;var a=t(),u=Date.now();if(1===a.length){if(500>u-_){c=a[0];i(d,c,v[c.identifier],Math.floor(Math.log(S.k)/Math.LN2)+1),N()}_=u}else if(a.length>1){var c=a[0],l=a[1],h=c[0]-l[0],f=c[1]-l[1];y=h*h+f*f}}function s(){var t,e,i,o,a=oo.touches(d);Ds.call(d);for(var s=0,c=a.length;c>s;++s,o=null)if(i=a[s],o=v[i.identifier]){if(e)break;t=i,e=o}if(o){var l=(l=i[0]-t[0])*l+(l=i[1]-t[1])*l,h=y&&Math.sqrt(l/y);t=[(t[0]+i[0])/2,(t[1]+i[1])/2],e=[(e[0]+o[0])/2,(e[1]+o[1])/2],n(h*f)}_=null,r(t,e),u(g)}function p(){if(oo.event.touches.length){for(var e=oo.event.changedTouches,n=0,r=e.length;r>n;++n)delete v[e[n].identifier];for(var i in v)return void t()}oo.selectAll(E).on(m,null),C.on(R,l).on(L,h),b(),c(g)}var f,d=this,g=O.of(d,arguments),v={},y=0,m=".zoom-"+oo.event.changedTouches[0].identifier,x="touchmove"+m,T="touchend"+m,E=[],C=oo.select(d),b=X(d);o(),a(g),C.on(R,null).on(L,o)}function p(){var t=O.of(this,arguments);y?clearTimeout(y):(Ds.call(this),d=e(g=v||oo.mouse(this)),a(t)),y=setTimeout(function(){y=null,c(t)},50),N(),n(Math.pow(2,.002*zo())*S.k),r(g,d),u(t)}function f(){var t=oo.mouse(this),n=Math.log(S.k)/Math.LN2;i(this,t,e(t),oo.event.shiftKey?Math.ceil(n)-1:Math.floor(n)+1)}var d,g,v,y,_,m,x,T,E,S={x:0,y:0,k:1},C=[960,500],b=Vo,A=250,w=0,R="mousedown.zoom",I="mousemove.zoom",M="mouseup.zoom",L="touchstart.zoom",O=k(t,"zoomstart","zoom","zoomend");return qo||(qo="onwheel"in uo?(zo=function(){return-oo.event.deltaY*(oo.event.deltaMode?120:1)},"wheel"):"onmousewheel"in uo?(zo=function(){return oo.event.wheelDelta},"mousewheel"):(zo=function(){return-oo.event.detail},"MozMousePixelScroll")),t.event=function(t){t.each(function(){var t=O.of(this,arguments),e=S;Os?oo.select(this).transition().each("start.zoom",function(){S=this.__chart__||{x:0,y:0,k:1},a(t)}).tween("zoom:zoom",function(){var n=C[0],r=C[1],i=g?g[0]:n/2,o=g?g[1]:r/2,a=oo.interpolateZoom([(i-S.x)/S.k,(o-S.y)/S.k,n/S.k],[(i-e.x)/e.k,(o-e.y)/e.k,n/e.k]);return function(e){var r=a(e),s=n/r[2];this.__chart__=S={x:i-r[0]*s,y:o-r[1]*s,k:s},u(t)}}).each("interrupt.zoom",function(){c(t)}).each("end.zoom",function(){c(t)}):(this.__chart__=S,a(t),u(t),c(t))})},t.translate=function(e){return arguments.length?(S={x:+e[0],y:+e[1],k:S.k},o(),t):[S.x,S.y]},t.scale=function(e){return arguments.length?(S={x:S.x,y:S.y,k:null},n(+e),o(),t):S.k},t.scaleExtent=function(e){return arguments.length?(b=null==e?Vo:[+e[0],+e[1]],t):b},t.center=function(e){return arguments.length?(v=e&&[+e[0],+e[1]],t):v},t.size=function(e){return arguments.length?(C=e&&[+e[0],+e[1]],t):C},t.duration=function(e){return arguments.length?(A=+e,t):A},t.x=function(e){return arguments.length?(x=e,m=e.copy(),S={x:0,y:0,k:1},t):x},t.y=function(e){return arguments.length?(E=e,T=e.copy(),S={x:0,y:0,k:1},t):E},oo.rebind(t,O,"on")};var zo,qo,Vo=[0,1/0];oo.color=ut,ut.prototype.toString=function(){return this.rgb()+""},oo.hsl=ct;var Go=ct.prototype=new ut;Go.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new ct(this.h,this.s,this.l/t)},Go.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new ct(this.h,this.s,t*this.l)},Go.rgb=function(){return lt(this.h,this.s,this.l)},oo.hcl=ht;var Yo=ht.prototype=new ut;Yo.brighter=function(t){return new ht(this.h,this.c,Math.min(100,this.l+$o*(arguments.length?t:1)))},Yo.darker=function(t){return new ht(this.h,this.c,Math.max(0,this.l-$o*(arguments.length?t:1)))},Yo.rgb=function(){return pt(this.h,this.c,this.l).rgb()},oo.lab=ft;var $o=18,Ko=.95047,Wo=1,Qo=1.08883,Zo=ft.prototype=new ut;Zo.brighter=function(t){return new ft(Math.min(100,this.l+$o*(arguments.length?t:1)),this.a,this.b)},Zo.darker=function(t){return new ft(Math.max(0,this.l-$o*(arguments.length?t:1)),this.a,this.b)},Zo.rgb=function(){return dt(this.l,this.a,this.b)},oo.rgb=mt;var Jo=mt.prototype=new ut;Jo.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,n=this.g,r=this.b,i=30;return e||n||r?(e&&i>e&&(e=i),n&&i>n&&(n=i),r&&i>r&&(r=i),new mt(Math.min(255,e/t),Math.min(255,n/t),Math.min(255,r/t))):new mt(i,i,i)},Jo.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new mt(t*this.r,t*this.g,t*this.b)},Jo.hsl=function(){return Ct(this.r,this.g,this.b)},Jo.toString=function(){return"#"+Et(this.r)+Et(this.g)+Et(this.b)};var Xo=oo.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Xo.forEach(function(t,e){Xo.set(t,xt(e))}),oo.functor=Rt,oo.xhr=Nt(S),oo.dsv=function(t,e){function n(t,n,o){arguments.length<3&&(o=n,n=null);var a=It(t,e,null==n?r:i(n),o);return a.row=function(t){return arguments.length?a.response(null==(n=t)?r:i(t)):n},a}function r(t){return n.parse(t.responseText)}function i(t){return function(e){return n.parse(e.responseText,t)}}function o(e){return e.map(a).join(t)}function a(t){return s.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}var s=new RegExp('["'+t+"\n]"),u=t.charCodeAt(0);return n.parse=function(t,e){var r;return n.parseRows(t,function(t,n){if(r)return r(t,n-1);var i=new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+"]"}).join(",")+"}");r=e?function(t,n){return e(i(t),n)}:i})},n.parseRows=function(t,e){function n(){if(l>=c)return a;if(i)return i=!1,o;var e=l;if(34===t.charCodeAt(e)){for(var n=e;n++<c;)if(34===t.charCodeAt(n)){if(34!==t.charCodeAt(n+1))break;++n}l=n+2;return 13===(r=t.charCodeAt(n+1))?(i=!0,10===t.charCodeAt(n+2)&&++l):10===r&&(i=!0),t.slice(e+1,n).replace(/""/g,'"')}for(;c>l;){var r=t.charCodeAt(l++),s=1;if(10===r)i=!0;else if(13===r)i=!0,10===t.charCodeAt(l)&&(++l,++s);else if(r!==u)continue;return t.slice(e,l-s)}return t.slice(e)}for(var r,i,o={},a={},s=[],c=t.length,l=0,h=0;(r=n())!==a;){for(var p=[];r!==o&&r!==a;)p.push(r),r=n();e&&null==(p=e(p,h++))||s.push(p)}return s},n.format=function(e){if(Array.isArray(e[0]))return n.formatRows(e);var r=new E,i=[];return e.forEach(function(t){for(var e in t)r.has(e)||i.push(r.add(e))}),[i.map(a).join(t)].concat(e.map(function(e){return i.map(function(t){return a(e[t])}).join(t)})).join("\n")},n.formatRows=function(t){return t.map(o).join("\n")},n},oo.csv=oo.dsv(",","text/csv"),oo.tsv=oo.dsv("\t","text/tab-separated-values");var ta,ea,na,ra,ia=this[b(this,"requestAnimationFrame")]||function(t){setTimeout(t,17)};oo.timer=function(){kt.apply(this,arguments)},oo.timer.flush=function(){Lt(),Ot()},oo.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)};var oa=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(function(t,e){var n=Math.pow(10,3*vo(8-e));return{scale:e>8?function(t){return t/n}:function(t){return t*n},symbol:t}});oo.formatPrefix=function(t,e){var n=0;return(t=+t)&&(0>t&&(t*=-1),e&&(t=oo.round(t,Pt(t,e))),n=1+Math.floor(1e-12+Math.log(t)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),oa[8+n/3]};var aa=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,sa=oo.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=oo.round(t,Pt(t,e))).toFixed(Math.max(0,Math.min(20,Pt(t*(1+1e-15),e))))}}),ua=oo.time={},ca=Date;Dt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){la.setUTCDate.apply(this._,arguments)},setDay:function(){la.setUTCDay.apply(this._,arguments)},setFullYear:function(){la.setUTCFullYear.apply(this._,arguments)},setHours:function(){la.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){la.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){la.setUTCMinutes.apply(this._,arguments)},setMonth:function(){la.setUTCMonth.apply(this._,arguments)},setSeconds:function(){la.setUTCSeconds.apply(this._,arguments)},setTime:function(){la.setTime.apply(this._,arguments)}};var la=Date.prototype;ua.year=Ut(function(t){return(t=ua.day(t)).setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),ua.years=ua.year.range,ua.years.utc=ua.year.utc.range,ua.day=Ut(function(t){var e=new ca(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),ua.days=ua.day.range,ua.days.utc=ua.day.utc.range,ua.dayOfYear=function(t){var e=ua.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,e){e=7-e;var n=ua[t]=Ut(function(t){return(t=ua.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var n=ua.year(t).getDay();return Math.floor((ua.dayOfYear(t)+(n+e)%7)/7)-(n!==e)});ua[t+"s"]=n.range,ua[t+"s"].utc=n.utc.range,ua[t+"OfYear"]=function(t){var n=ua.year(t).getDay();return Math.floor((ua.dayOfYear(t)+(n+e)%7)/7)}}),ua.week=ua.sunday,ua.weeks=ua.sunday.range,ua.weeks.utc=ua.sunday.utc.range,ua.weekOfYear=ua.sundayOfYear;var ha={"-":"",_:" ",0:"0"},pa=/^\s*\d+/,fa=/^%/;oo.locale=function(t){return{numberFormat:function(t){var e=t.decimal,n=t.thousands,r=t.grouping,i=t.currency,o=r&&n?function(t,e){for(var i=t.length,o=[],a=0,s=r[0],u=0;i>0&&s>0&&(u+s+1>e&&(s=Math.max(1,e-u)),o.push(t.substring(i-=s,i+s)),!((u+=s+1)>e));)s=r[a=(a+1)%r.length];return o.reverse().join(n)}:S;return function(t){var n=aa.exec(t),r=n[1]||" ",a=n[2]||">",s=n[3]||"-",u=n[4]||"",c=n[5],l=+n[6],h=n[7],p=n[8],f=n[9],d=1,g="",v="",y=!1,_=!0;switch(p&&(p=+p.substring(1)),(c||"0"===r&&"="===a)&&(c=r="0",a="="),f){case"n":h=!0,f="g";break;case"%":d=100,v="%",f="f";break;case"p":d=100,v="%",f="r";break;case"b":case"o":case"x":case"X":"#"===u&&(g="0"+f.toLowerCase());case"c":_=!1;case"d":y=!0,p=0;break;case"s":d=-1,f="r"}"$"===u&&(g=i[0],v=i[1]),"r"!=f||p||(f="g"),null!=p&&("g"==f?p=Math.max(1,Math.min(21,p)):"e"!=f&&"f"!=f||(p=Math.max(0,Math.min(20,p)))),f=sa.get(f)||function(t){return t+""};var m=c&&h;return function(t){var n=v;if(y&&t%1)return"";var i=0>t||0===t&&0>1/t?(t=-t,"-"):"-"===s?"":s;if(0>d){var u=oo.formatPrefix(t,p);t=u.scale(t),n=u.symbol+v}else t*=d;var x,T,E=(t=f(t,p)).lastIndexOf(".");if(0>E){var S=_?t.lastIndexOf("e"):-1;0>S?(x=t,T=""):(x=t.substring(0,S),T=t.substring(S))}else x=t.substring(0,E),T=e+t.substring(E+1);!c&&h&&(x=o(x,1/0));var C=g.length+x.length+T.length+(m?0:i.length),b=l>C?new Array(C=l-C+1).join(r):"";return m&&(x=o(b+x,b.length?l-T.length:1/0)),i+=g,t=x+T,("<"===a?i+t+b:">"===a?b+i+t:"^"===a?b.substring(0,C>>=1)+i+t+b.substring(C):i+(m?t:b+t))+n}}}(t),timeFormat:function(t){function e(t){function e(e){for(var n,i,o,a=[],s=-1,u=0;++s<r;)37===t.charCodeAt(s)&&(a.push(t.slice(u,s)),null!=(i=ha[n=t.charAt(++s)])&&(n=t.charAt(++s)),(o=x[n])&&(n=o(e,null==i?"e"===n?" ":"0":i)),a.push(n),u=s+1);return a.push(t.slice(u,s)),a.join("")}var r=t.length;return e.parse=function(e){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null};if(n(r,t,e,0)!=e.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&ca!==Dt,o=new(i?Dt:ca);return"j"in r?o.setFullYear(r.y,0,r.j):"W"in r||"U"in r?("w"in r||(r.w="W"in r?1:0),o.setFullYear(r.y,0,1),o.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(o.getDay()+5)%7:r.w+7*r.U-(o.getDay()+6)%7)):o.setFullYear(r.y,r.m,r.d),o.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),i?o._:o},e.toString=function(){return t},e}function n(t,e,n,r){for(var i,o,a,s=0,u=e.length,c=n.length;u>s;){if(r>=c)return-1;if(37===(i=e.charCodeAt(s++))){if(a=e.charAt(s++),!(o=T[a in ha?e.charAt(s++):a])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}var r=t.dateTime,i=t.date,o=t.time,a=t.periods,s=t.days,u=t.shortDays,c=t.months,l=t.shortMonths;e.utc=function(t){function n(t){try{var e=new(ca=Dt);return e._=t,r(e)}finally{ca=Date}}var r=e(t);return n.parse=function(t){try{ca=Dt;var e=r.parse(t);return e&&e._}finally{ca=Date}},n.toString=r.toString,n},e.multi=e.utc.multi=re;var h=oo.map(),p=jt(s),f=Bt(s),d=jt(u),g=Bt(u),v=jt(c),y=Bt(c),_=jt(l),m=Bt(l);a.forEach(function(t,e){h.set(t.toLowerCase(),e)});var x={a:function(t){return u[t.getDay()]},A:function(t){return s[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return c[t.getMonth()]},c:e(r),d:function(t,e){return Ht(t.getDate(),e,2)},e:function(t,e){return Ht(t.getDate(),e,2)},H:function(t,e){return Ht(t.getHours(),e,2)},I:function(t,e){return Ht(t.getHours()%12||12,e,2)},j:function(t,e){return Ht(1+ua.dayOfYear(t),e,3)},L:function(t,e){return Ht(t.getMilliseconds(),e,3)},m:function(t,e){return Ht(t.getMonth()+1,e,2)},M:function(t,e){return Ht(t.getMinutes(),e,2)},p:function(t){return a[+(t.getHours()>=12)]},S:function(t,e){return Ht(t.getSeconds(),e,2)},U:function(t,e){return Ht(ua.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Ht(ua.mondayOfYear(t),e,2)},x:e(i),X:e(o),y:function(t,e){return Ht(t.getFullYear()%100,e,2)},Y:function(t,e){return Ht(t.getFullYear()%1e4,e,4)},Z:ee,"%":function(){return"%"}},T={a:function(t,e,n){d.lastIndex=0;var r=d.exec(e.slice(n));return r?(t.w=g.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){p.lastIndex=0;var r=p.exec(e.slice(n));return r?(t.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){_.lastIndex=0;var r=_.exec(e.slice(n));return r?(t.m=m.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){v.lastIndex=0;var r=v.exec(e.slice(n));return r?(t.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,e,r){return n(t,x.c.toString(),e,r)},d:Wt,e:Wt,H:Zt,I:Zt,j:Qt,L:te,m:Kt,M:Jt,p:function(t,e,n){var r=h.get(e.slice(n,n+=2).toLowerCase());return null==r?-1:(t.p=r,n)},S:Xt,U:qt,w:zt,W:Vt,x:function(t,e,r){return n(t,x.x.toString(),e,r)},X:function(t,e,r){return n(t,x.X.toString(),e,r)},y:Yt,Y:Gt,Z:$t,"%":ne};return e}(t)}};var da=oo.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});oo.format=da.numberFormat,oo.geo={},ie.prototype={s:0,t:0,add:function(t){oe(t,this.t,ga),oe(ga.s,this.s,this),this.s?this.t+=ga.t:this.s=ga.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var ga=new ie;oo.geo.stream=function(t,e){t&&va.hasOwnProperty(t.type)?va[t.type](t,e):ae(t,e)};var va={Feature:function(t,e){ae(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)ae(n[r].geometry,e)}},ya={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){se(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)se(n[r],e,0)},Polygon:function(t,e){ue(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)ue(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)ae(n[r],e)}};oo.geo.area=function(t){return _a=0,oo.geo.stream(t,xa),_a};var _a,ma=new ie,xa={sphere:function(){_a+=4*Po},point:A,lineStart:A,lineEnd:A,polygonStart:function(){ma.reset(),xa.lineStart=ce},polygonEnd:function(){var t=2*ma;_a+=0>t?4*Po+t:t,xa.lineStart=xa.lineEnd=xa.point=A}};oo.geo.bounds=function(){function t(t,e){m.push(x=[l=t,p=t]),h>e&&(h=e),e>f&&(f=e)}function e(e,n){var r=le([e*Ho,n*Ho]);if(y){var i=pe(y,r),o=pe([i[1],-i[0],0],i);ge(o),o=ve(o);var a=e-d,u=a>0?1:-1,c=o[0]*jo*u,g=vo(a)>180;if(g^(c>u*d&&u*e>c)){(v=o[1]*jo)>f&&(f=v)}else if(c=(c+360)%360-180,g^(c>u*d&&u*e>c)){var v=-o[1]*jo;h>v&&(h=v)}else h>n&&(h=n),n>f&&(f=n);g?d>e?s(l,e)>s(l,p)&&(p=e):s(e,p)>s(l,p)&&(l=e):p>=l?(l>e&&(l=e),e>p&&(p=e)):e>d?s(l,e)>s(l,p)&&(p=e):s(e,p)>s(l,p)&&(l=e)}else t(e,n);y=r,d=e}function n(){T.point=e}function r(){x[0]=l,x[1]=p,T.point=t,y=null}function i(t,n){if(y){var r=t-d;_+=vo(r)>180?r+(r>0?360:-360):r}else g=t,v=n;xa.point(t,n),e(t,n)}function o(){xa.lineStart()}function a(){i(g,v),xa.lineEnd(),vo(_)>Lo&&(l=-(p=180)),x[0]=l,x[1]=p,y=null}function s(t,e){return(e-=t)<0?e+360:e}function u(t,e){return t[0]-e[0]}function c(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}var l,h,p,f,d,g,v,y,_,m,x,T={point:t,lineStart:n,lineEnd:r,polygonStart:function(){T.point=i,T.lineStart=o,T.lineEnd=a,_=0,xa.polygonStart()},polygonEnd:function(){xa.polygonEnd(),T.point=t,T.lineStart=n,T.lineEnd=r,0>ma?(l=-(p=180),h=-(f=90)):_>Lo?f=90:-Lo>_&&(h=-90),x[0]=l,x[1]=p}};return function(t){f=p=-(l=h=1/0),m=[],oo.geo.stream(t,T);o=m.length;if(o){m.sort(u);for(var e=1,n=[d=m[0]];o>e;++e)c((i=m[e])[0],d)||c(i[1],d)?(s(d[0],i[1])>s(d[0],d[1])&&(d[1]=i[1]),s(i[0],d[1])>s(d[0],d[1])&&(d[0]=i[0])):n.push(d=i);for(var r,i,o,a=-1/0,e=0,d=n[o=n.length-1];o>=e;d=i,++e)i=n[e],(r=s(d[1],i[0]))>a&&(a=r,l=i[0],p=d[1])}return m=x=null,l===1/0||h===1/0?[[NaN,NaN],[NaN,NaN]]:[[l,h],[p,f]]}}(),oo.geo.centroid=function(t){Ta=Ea=Sa=Ca=ba=Aa=wa=Ra=Na=Ia=ka=0,oo.geo.stream(t,Ma);var e=Na,n=Ia,r=ka,i=e*e+n*n+r*r;return Oo>i&&(e=Aa,n=wa,r=Ra,Lo>Ea&&(e=Sa,n=Ca,r=ba),i=e*e+n*n+r*r,Oo>i)?[NaN,NaN]:[Math.atan2(n,e)*jo,ot(r/Math.sqrt(i))*jo]};var Ta,Ea,Sa,Ca,ba,Aa,wa,Ra,Na,Ia,ka,Ma={sphere:A,point:_e,lineStart:xe,lineEnd:Te,polygonStart:function(){Ma.lineStart=Ee},polygonEnd:function(){Ma.lineStart=xe}},La=Re(Ce,function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var s=o>0?Po:-Po,u=vo(o-n);vo(u-Po)<Lo?(t.point(n,r=(r+a)/2>0?Fo:-Fo),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(o,r),e=0):i!==s&&u>=Po&&(vo(n-i)<Lo&&(n-=i*Lo),vo(o-s)<Lo&&(o-=s*Lo),r=function(t,e,n,r){var i,o,a=Math.sin(t-n);return vo(a)>Lo?Math.atan((Math.sin(e)*(o=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(e))*Math.sin(t))/(i*o*a)):(e+r)/2}(n,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=o,r=a),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}},function(t,e,n,r){var i;if(null==t)i=n*Fo,r.point(-Po,i),r.point(0,i),r.point(Po,i),r.point(Po,0),r.point(Po,-i),r.point(0,-i),r.point(-Po,-i),r.point(-Po,0),r.point(-Po,i);else if(vo(t[0]-e[0])>Lo){var o=t[0]<e[0]?Po:-Po;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])},[-Po,-Po/2]),Oa=1e9;oo.geo.clipExtent=function(){var t,e,n,r,i,o,a={stream:function(t){return i&&(i.valid=!1),i=o(t),i.valid=!0,i},extent:function(s){return arguments.length?(o=Le(t=+s[0][0],e=+s[0][1],n=+s[1][0],r=+s[1][1]),i&&(i.valid=!1,i=null),a):[[t,e],[n,r]]}};return a.extent([[0,0],[960,500]])},(oo.geo.conicEqualArea=function(){return Oe(Pe)}).raw=Pe,oo.geo.albers=function(){return oo.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},oo.geo.albersUsa=function(){function t(t){var o=t[0],a=t[1];return e=null,n(o,a),e||(r(o,a),e)||i(o,a),e}var e,n,r,i,o=oo.geo.albers(),a=oo.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=oo.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,n){e=[t,n]}};return t.invert=function(t){var e=o.scale(),n=o.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&.234>i&&r>=-.425&&-.214>r?a:i>=.166&&.234>i&&r>=-.214&&-.115>r?s:o).invert(t)},t.stream=function(t){var e=o.stream(t),n=a.stream(t),r=s.stream(t);return{point:function(t,i){e.point(t,i),n.point(t,i),r.point(t,i)},sphere:function(){e.sphere(),n.sphere(),r.sphere()},lineStart:function(){e.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){e.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){e.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){e.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},t.precision=function(e){return arguments.length?(o.precision(e),a.precision(e),s.precision(e),t):o.precision()},t.scale=function(e){return arguments.length?(o.scale(e),a.scale(.35*e),s.scale(e),t.translate(o.translate())):o.scale()},t.translate=function(e){if(!arguments.length)return o.translate();var c=o.scale(),l=+e[0],h=+e[1];return n=o.translate(e).clipExtent([[l-.455*c,h-.238*c],[l+.455*c,h+.238*c]]).stream(u).point,r=a.translate([l-.307*c,h+.201*c]).clipExtent([[l-.425*c+Lo,h+.12*c+Lo],[l-.214*c-Lo,h+.234*c-Lo]]).stream(u).point,i=s.translate([l-.205*c,h+.212*c]).clipExtent([[l-.214*c+Lo,h+.166*c+Lo],[l-.115*c-Lo,h+.234*c-Lo]]).stream(u).point,t},t.scale(1070)};var Pa,Da,Ua,Fa,Ha,ja,Ba={point:A,lineStart:A,lineEnd:A,polygonStart:function(){Da=0,Ba.lineStart=De},polygonEnd:function(){Ba.lineStart=Ba.lineEnd=Ba.point=A,Pa+=vo(Da/2)}},za={point:function(t,e){Ua>t&&(Ua=t),t>Ha&&(Ha=t),Fa>e&&(Fa=e),e>ja&&(ja=e)},lineStart:A,lineEnd:A,polygonStart:A,polygonEnd:A},qa={point:Fe,lineStart:He,lineEnd:je,polygonStart:function(){qa.lineStart=Be},polygonEnd:function(){qa.point=Fe,qa.lineStart=He,qa.lineEnd=je}};oo.geo.path=function(){function t(t){return t&&("function"==typeof s&&o.pointRadius(+s.apply(this,arguments)),a&&a.valid||(a=i(o)),oo.geo.stream(t,a)),o.result()}function e(){return a=null,t}var n,r,i,o,a,s=4.5;return t.area=function(t){return Pa=0,oo.geo.stream(t,i(Ba)),Pa},t.centroid=function(t){return Sa=Ca=ba=Aa=wa=Ra=Na=Ia=ka=0,oo.geo.stream(t,i(qa)),ka?[Na/ka,Ia/ka]:Ra?[Aa/Ra,wa/Ra]:ba?[Sa/ba,Ca/ba]:[NaN,NaN]},t.bounds=function(t){return Ha=ja=-(Ua=Fa=1/0),oo.geo.stream(t,i(za)),[[Ua,Fa],[Ha,ja]]},t.projection=function(t){return arguments.length?(i=(n=t)?t.stream||function(t){var e=ze(function(e,n){return t([e*jo,n*jo])});return function(t){return $e(e(t))}}(t):S,e()):n},t.context=function(t){return arguments.length?(o=null==(r=t)?new function(){function t(t,e){a.push("M",t,",",e,o)}function e(t,e){a.push("M",t,",",e),s.point=n}function n(t,e){a.push("L",t,",",e)}function r(){s.point=t}function i(){a.push("Z")}var o=Ue(4.5),a=[],s={point:t,lineStart:function(){s.point=e},lineEnd:r,polygonStart:function(){s.lineEnd=i},polygonEnd:function(){s.lineEnd=r,s.point=t},pointRadius:function(t){return o=Ue(t),s},result:function(){if(a.length){var t=a.join("");return a=[],t}}};return s}:new function(t){function e(e,n){t.moveTo(e+a,n),t.arc(e,n,a,0,Do)}function n(e,n){t.moveTo(e,n),s.point=r}function r(e,n){t.lineTo(e,n)}function i(){s.point=e}function o(){t.closePath()}var a=4.5,s={point:e,lineStart:function(){s.point=n},lineEnd:i,polygonStart:function(){s.lineEnd=o},polygonEnd:function(){s.lineEnd=i,s.point=e},pointRadius:function(t){return a=t,s},result:A};return s}(t),"function"!=typeof s&&o.pointRadius(s),e()):r},t.pointRadius=function(e){return arguments.length?(s="function"==typeof e?e:(o.pointRadius(+e),+e),t):s},t.projection(oo.geo.albersUsa()).context(null)},oo.geo.transform=function(t){return{stream:function(e){var n=new qe(e);for(var r in t)n[r]=t[r];return n}}},qe.prototype={point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},oo.geo.projection=Ge,oo.geo.projectionMutator=Ye,(oo.geo.equirectangular=function(){return Ge(Ke)}).raw=Ke.invert=Ke,oo.geo.rotation=function(t){function e(e){return e=t(e[0]*Ho,e[1]*Ho),e[0]*=jo,e[1]*=jo,e}return t=Qe(t[0]%360*Ho,t[1]*Ho,t.length>2?t[2]*Ho:0),e.invert=function(e){return e=t.invert(e[0]*Ho,e[1]*Ho),e[0]*=jo,e[1]*=jo,e},e},We.invert=Ke,oo.geo.circle=function(){function t(){var t="function"==typeof r?r.apply(this,arguments):r,e=Qe(-t[0]*Ho,-t[1]*Ho,0).invert,i=[];return n(null,null,1,{point:function(t,n){i.push(t=e(t,n)),t[0]*=jo,t[1]*=jo}}),{type:"Polygon",coordinates:[i]}}var e,n,r=[0,0],i=6;return t.origin=function(e){return arguments.length?(r=e,t):r},t.angle=function(r){return arguments.length?(n=tn((e=+r)*Ho,i*Ho),t):e},t.precision=function(r){return arguments.length?(n=tn(e*Ho,(i=+r)*Ho),t):i},t.angle(90)},oo.geo.distance=function(t,e){var n,r=(e[0]-t[0])*Ho,i=t[1]*Ho,o=e[1]*Ho,a=Math.sin(r),s=Math.cos(r),u=Math.sin(i),c=Math.cos(i),l=Math.sin(o),h=Math.cos(o);return Math.atan2(Math.sqrt((n=h*a)*n+(n=c*l-u*h*s)*n),u*l+c*h*s)},oo.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:e()}}function e(){return oo.range(Math.ceil(o/v)*v,i,v).map(p).concat(oo.range(Math.ceil(c/y)*y,u,y).map(f)).concat(oo.range(Math.ceil(r/d)*d,n,d).filter(function(t){return vo(t%v)>Lo}).map(l)).concat(oo.range(Math.ceil(s/g)*g,a,g).filter(function(t){return vo(t%y)>Lo}).map(h))}var n,r,i,o,a,s,u,c,l,h,p,f,d=10,g=d,v=90,y=360,_=2.5;return t.lines=function(){return e().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[p(o).concat(f(u).slice(1),p(i).reverse().slice(1),f(c).reverse().slice(1))]}},t.extent=function(e){return arguments.length?t.majorExtent(e).minorExtent(e):t.minorExtent()},t.majorExtent=function(e){return arguments.length?(o=+e[0][0],i=+e[1][0],c=+e[0][1],u=+e[1][1],o>i&&(e=o,o=i,i=e),c>u&&(e=c,c=u,u=e),t.precision(_)):[[o,c],[i,u]]},t.minorExtent=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],s=+e[0][1],a=+e[1][1],r>n&&(e=r,r=n,n=e),s>a&&(e=s,s=a,a=e),t.precision(_)):[[r,s],[n,a]]},t.step=function(e){return arguments.length?t.majorStep(e).minorStep(e):t.minorStep()},t.majorStep=function(e){return arguments.length?(v=+e[0],y=+e[1],t):[v,y]},t.minorStep=function(e){return arguments.length?(d=+e[0],g=+e[1],t):[d,g]},t.precision=function(e){return arguments.length?(_=+e,l=nn(s,a,90),h=rn(r,n,_),p=nn(c,u,90),f=rn(o,i,_),t):_},t.majorExtent([[-180,-90+Lo],[180,90-Lo]]).minorExtent([[-180,-80-Lo],[180,80+Lo]])},oo.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[e||r.apply(this,arguments),n||i.apply(this,arguments)]}}var e,n,r=on,i=an;return t.distance=function(){return oo.geo.distance(e||r.apply(this,arguments),n||i.apply(this,arguments))},t.source=function(n){return arguments.length?(r=n,e="function"==typeof n?null:n,t):r},t.target=function(e){return arguments.length?(i=e,n="function"==typeof e?null:e,t):i},t.precision=function(){return arguments.length?t:0},t},oo.geo.interpolate=function(t,e){return function(t,e,n,r){var i=Math.cos(e),o=Math.sin(e),a=Math.cos(r),s=Math.sin(r),u=i*Math.cos(t),c=i*Math.sin(t),l=a*Math.cos(n),h=a*Math.sin(n),p=2*Math.asin(Math.sqrt(st(r-e)+i*a*st(n-t))),f=1/Math.sin(p),d=p?function(t){var e=Math.sin(t*=p)*f,n=Math.sin(p-t)*f,r=n*u+e*l,i=n*c+e*h,a=n*o+e*s;return[Math.atan2(i,r)*jo,Math.atan2(a,Math.sqrt(r*r+i*i))*jo]}:function(){return[t*jo,e*jo]};return d.distance=p,d}(t[0]*Ho,t[1]*Ho,e[0]*Ho,e[1]*Ho)},oo.geo.length=function(t){return Va=0,oo.geo.stream(t,Ga),Va};var Va,Ga={sphere:A,point:A,lineStart:function(){function t(t,i){var o=Math.sin(i*=Ho),a=Math.cos(i),s=vo((t*=Ho)-e),u=Math.cos(s);Va+=Math.atan2(Math.sqrt((s=a*Math.sin(s))*s+(s=r*o-n*a*u)*s),n*o+r*a*u),e=t,n=o,r=a}var e,n,r;Ga.point=function(i,o){e=i*Ho,n=Math.sin(o*=Ho),r=Math.cos(o),Ga.point=t},Ga.lineEnd=function(){Ga.point=Ga.lineEnd=A}},lineEnd:A,polygonStart:A,polygonEnd:A},Ya=sn(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(oo.geo.azimuthalEqualArea=function(){return Ge(Ya)}).raw=Ya;var $a=sn(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},S);(oo.geo.azimuthalEquidistant=function(){return Ge($a)}).raw=$a,(oo.geo.conicConformal=function(){return Oe(un)}).raw=un,(oo.geo.conicEquidistant=function(){return Oe(cn)}).raw=cn;var Ka=sn(function(t){return 1/t},Math.atan);(oo.geo.gnomonic=function(){return Ge(Ka)}).raw=Ka,ln.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Fo]},(oo.geo.mercator=function(){return hn(ln)}).raw=ln;var Wa=sn(function(){return 1},Math.asin);(oo.geo.orthographic=function(){return Ge(Wa)}).raw=Wa;var Qa=sn(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(oo.geo.stereographic=function(){return Ge(Qa)}).raw=Qa,pn.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Fo]},(oo.geo.transverseMercator=function(){var t=hn(pn),e=t.center,n=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):(t=e(),[t[1],-t[0]])},t.rotate=function(t){return t?n([t[0],t[1],t.length>2?t[2]+90:90]):(t=n(),[t[0],t[1],t[2]-90])},n([0,0,90])}).raw=pn,oo.geom={},oo.geom.hull=function(t){function e(t){if(t.length<3)return[];var e,i=Rt(n),o=Rt(r),a=t.length,s=[],u=[];for(e=0;a>e;e++)s.push([+i.call(this,t[e],e),+o.call(this,t[e],e),e]);for(s.sort(vn),e=0;a>e;e++)u.push([s[e][0],-s[e][1]]);var c=gn(s),l=gn(u),h=l[0]===c[0],p=l[l.length-1]===c[c.length-1],f=[];for(e=c.length-1;e>=0;--e)f.push(t[s[c[e]][2]]);for(e=+h;e<l.length-p;++e)f.push(t[s[l[e]][2]]);return f}var n=fn,r=dn;return arguments.length?e(t):(e.x=function(t){return arguments.length?(n=t,e):n},e.y=function(t){return arguments.length?(r=t,e):r},e)},oo.geom.polygon=function(t){return To(t,Za),t};var Za=oo.geom.polygon.prototype=[];Za.area=function(){for(var t,e=-1,n=this.length,r=this[n-1],i=0;++e<n;)t=r,r=this[e],i+=t[1]*r[0]-t[0]*r[1];return.5*i},Za.centroid=function(t){var e,n,r=-1,i=this.length,o=0,a=0,s=this[i-1];for(arguments.length||(t=-1/(6*this.area()));++r<i;)e=s,s=this[r],n=e[0]*s[1]-s[0]*e[1],o+=(e[0]+s[0])*n,a+=(e[1]+s[1])*n;return[o*t,a*t]},Za.clip=function(t){for(var e,n,r,i,o,a,s=mn(t),u=-1,c=this.length-mn(this),l=this[c-1];++u<c;){for(e=t.slice(),t.length=0,i=this[u],o=e[(r=e.length-s)-1],n=-1;++n<r;)yn(a=e[n],l,i)?(yn(o,l,i)||t.push(_n(o,a,l,i)),t.push(a)):yn(o,l,i)&&t.push(_n(o,a,l,i)),o=a;s&&t.push(t[0]),l=i}return t};var Ja,Xa,ts,es,ns,rs=[],is=[];bn.prototype.prepare=function(){for(var t,e=this.edges,n=e.length;n--;)(t=e[n].edge).b&&t.a||e.splice(n,1);return e.sort(wn),e.length},Ln.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},On.prototype={insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=Fn(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(Dn(this,n),t=n,n=t.U),n.C=!1,r.C=!0,Un(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(Un(this,n),t=n,n=t.U),n.C=!1,r.C=!0,Dn(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,o=t.L,a=t.R;if(n=o?a?Fn(a):o:a,i?i.L===t?i.L=n:i.R=n:this._=n,o&&a?(r=n.C,n.C=t.C,n.L=o,o.U=n,n!==a?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=a,a.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r){if(t&&t.C)return void(t.C=!1);do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,Dn(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,Un(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,Dn(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,Un(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,Dn(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,Un(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}},oo.geom.voronoi=function(t){function e(t){var e=new Array(t.length),r=s[0][0],i=s[0][1],o=s[1][0],a=s[1][1];return Hn(n(t),s).cells.forEach(function(n,s){var u=n.edges,c=n.site;(e[s]=u.length?u.map(function(t){var e=t.start();return[e.x,e.y]}):c.x>=r&&c.x<=o&&c.y>=i&&c.y<=a?[[r,a],[o,a],[o,i],[r,i]]:[]).point=t[s]}),e}function n(t){return t.map(function(t,e){return{x:Math.round(o(t,e)/Lo)*Lo,y:Math.round(a(t,e)/Lo)*Lo,i:e}})}var r=fn,i=dn,o=r,a=i,s=os;return t?e(t):(e.links=function(t){return Hn(n(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},e.triangles=function(t){var e=[];return Hn(n(t)).cells.forEach(function(n,r){for(var i,o=n.site,a=n.edges.sort(wn),s=-1,u=a.length,c=a[u-1].edge,l=c.l===o?c.r:c.l;++s<u;)c,i=l,l=(c=a[s].edge).l===o?c.r:c.l,r<i.i&&r<l.i&&Bn(o,i,l)<0&&e.push([t[r],t[i.i],t[l.i]])}),e},e.x=function(t){return arguments.length?(o=Rt(r=t),e):r},e.y=function(t){return arguments.length?(a=Rt(i=t),e):i},e.clipExtent=function(t){return arguments.length?(s=null==t?os:t,e):s===os?null:s},e.size=function(t){return arguments.length?e.clipExtent(t&&[[0,0],t]):s===os?null:s&&s[1]},e)};var os=[[-1e6,-1e6],[1e6,1e6]];oo.geom.delaunay=function(t){return oo.geom.voronoi().triangles(t)},oo.geom.quadtree=function(t,e,n,r,i){function o(t){function o(t,e,n,r,i,o,a,s){if(!isNaN(n)&&!isNaN(r))if(t.leaf){var u=t.x,l=t.y;if(null!=u)if(vo(u-n)+vo(l-r)<.01)c(t,e,n,r,i,o,a,s);else{var h=t.point;t.x=t.y=t.point=null,c(t,h,u,l,i,o,a,s),c(t,e,n,r,i,o,a,s)}else t.x=n,t.y=r,t.point=e}else c(t,e,n,r,i,o,a,s)}function c(t,e,n,r,i,a,s,u){var c=.5*(i+s),l=.5*(a+u),h=n>=c,p=r>=l,f=p<<1|h;t.leaf=!1,t=t.nodes[f]||(t.nodes[f]={leaf:!0,nodes:[],point:null,x:null,y:null}),h?i=c:s=c,p?a=l:u=l,o(t,e,n,r,i,a,s,u)}var l,h,p,f,d,g,v,y,_,m=Rt(s),x=Rt(u);if(null!=e)g=e,v=n,y=r,_=i;else if(y=_=-(g=v=1/0),h=[],p=[],d=t.length,a)for(f=0;d>f;++f)(l=t[f]).x<g&&(g=l.x),l.y<v&&(v=l.y),l.x>y&&(y=l.x),l.y>_&&(_=l.y),h.push(l.x),p.push(l.y);else for(f=0;d>f;++f){var T=+m(l=t[f],f),E=+x(l,f);g>T&&(g=T),v>E&&(v=E),T>y&&(y=T),E>_&&(_=E),h.push(T),p.push(E)}var S=y-g,C=_-v;S>C?_=v+S:y=g+C;var b={leaf:!0,nodes:[],point:null,x:null,y:null};if(b.add=function(t){o(b,t,+m(t,++f),+x(t,f),g,v,y,_)},b.visit=function(t){Vn(t,b,g,v,y,_)},b.find=function(t){return function(t,e,n,r,i,o,a){var s,u=1/0;return function t(c,l,h,p,f){if(!(l>o||h>a||r>p||i>f)){if(d=c.point){var d,g=e-c.x,v=n-c.y,y=g*g+v*v;if(u>y){var _=Math.sqrt(u=y);r=e-_,i=n-_,o=e+_,a=n+_,s=d}}for(var m=c.nodes,x=.5*(l+p),T=.5*(h+f),E=(n>=T)<<1|e>=x,S=E+4;S>E;++E)if(c=m[3&E])switch(3&E){case 0:t(c,l,h,x,T);break;case 1:t(c,x,h,p,T);break;case 2:t(c,l,T,x,f);break;case 3:t(c,x,T,p,f)}}}(t,r,i,o,a),s}(b,t[0],t[1],g,v,y,_)},f=-1,null==e){for(;++f<d;)o(b,t[f],h[f],p[f],g,v,y,_);--f}else t.forEach(b.add);return h=p=t=l=null,b}var a,s=fn,u=dn;return(a=arguments.length)?(s=zn,u=qn,3===a&&(i=n,r=e,n=e=0),o(t)):(o.x=function(t){return arguments.length?(s=t,o):s},o.y=function(t){return arguments.length?(u=t,o):u},o.extent=function(t){return arguments.length?(null==t?e=n=r=i=null:(e=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),o):null==e?null:[[e,n],[r,i]]},o.size=function(t){return arguments.length?(null==t?e=n=r=i=null:(e=n=0,r=+t[0],i=+t[1]),o):null==e?null:[r-e,i-n]},o)},oo.interpolateRgb=Gn,oo.interpolateObject=Yn,oo.interpolateNumber=$n,oo.interpolateString=Kn;var as=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ss=new RegExp(as.source,"g");oo.interpolate=Wn,oo.interpolators=[function(t,e){var n=void 0===e?"undefined":o(e);return("string"===n?Xo.has(e.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(e)?Gn:Kn:e instanceof ut?Gn:Array.isArray(e)?Qn:"object"===n&&isNaN(e)?Yn:$n)(t,e)}],oo.interpolateArray=Qn;var us=function(){return S},cs=oo.map({linear:us,poly:function(t){return function(e){return Math.pow(e,t)}},quad:function(){return Xn},cubic:function(){return tr},sin:function(){return er},exp:function(){return nr},circle:function(){return rr},elastic:function(t,e){var n;return arguments.length<2&&(e=.45),arguments.length?n=e/Do*Math.asin(1/t):(t=1,n=e/4),function(r){return 1+t*Math.pow(2,-10*r)*Math.sin((r-n)*Do/e)}},back:function(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}},bounce:function(){return ir}}),ls=oo.map({in:S,out:Zn,"in-out":Jn,"out-in":function(t){return Jn(Zn(t))}});oo.ease=function(t){var e=t.indexOf("-"),n=e>=0?t.slice(0,e):t,r=e>=0?t.slice(e+1):"in";return n=cs.get(n)||us,r=ls.get(r)||S,function(t){return function(e){return 0>=e?0:e>=1?1:t(e)}}(r(n.apply(null,ao.call(arguments,1))))},oo.interpolateHcl=function(t,e){t=oo.hcl(t),e=oo.hcl(e);var n=t.h,r=t.c,i=t.l,o=e.h-n,a=e.c-r,s=e.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?e.c:r),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:-180>o&&(o+=360),function(t){return pt(n+o*t,r+a*t,i+s*t)+""}},oo.interpolateHsl=function(t,e){t=oo.hsl(t),e=oo.hsl(e);var n=t.h,r=t.s,i=t.l,o=e.h-n,a=e.s-r,s=e.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?e.s:r),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:-180>o&&(o+=360),function(t){return lt(n+o*t,r+a*t,i+s*t)+""}},oo.interpolateLab=function(t,e){t=oo.lab(t),e=oo.lab(e);var n=t.l,r=t.a,i=t.b,o=e.l-n,a=e.a-r,s=e.b-i;return function(t){return dt(n+o*t,r+a*t,i+s*t)+""}},oo.interpolateRound=or,oo.transform=function(t){var e=uo.createElementNS(oo.ns.prefix.svg,"g");return(oo.transform=function(t){if(null!=t){e.setAttribute("transform",t);var n=e.transform.baseVal.consolidate()}return new ar(n?n.matrix:hs)})(t)},ar.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var hs={a:1,b:0,c:0,d:1,e:0,f:0};oo.interpolateTransform=lr,oo.layout={},oo.layout.bundle=function(){return function(t){for(var e=[],n=-1,r=t.length;++n<r;)e.push(hr(t[n]));return e}},oo.layout.chord=function(){function t(){var t,c,h,p,f,d={},g=[],v=oo.range(o),y=[];for(n=[],r=[],t=0,p=-1;++p<o;){for(c=0,f=-1;++f<o;)c+=i[p][f];g.push(c),y.push(oo.range(o)),t+=c}for(a&&v.sort(function(t,e){return a(g[t],g[e])}),s&&y.forEach(function(t,e){t.sort(function(t,n){return s(i[e][t],i[e][n])})}),t=(Do-l*o)/t,c=0,p=-1;++p<o;){for(h=c,f=-1;++f<o;){var _=v[p],m=y[_][f],x=i[_][m],T=c,E=c+=x*t;d[_+"-"+m]={index:_,subindex:m,startAngle:T,endAngle:E,value:x}}r[_]={index:_,startAngle:h,endAngle:c,value:g[_]},c+=l}for(p=-1;++p<o;)for(f=p-1;++f<o;){var S=d[p+"-"+f],C=d[f+"-"+p];(S.value||C.value)&&n.push(S.value<C.value?{source:C,target:S}:{source:S,target:C})}u&&e()}function e(){n.sort(function(t,e){return u((t.source.value+t.target.value)/2,(e.source.value+e.target.value)/2)})}var n,r,i,o,a,s,u,c={},l=0;return c.matrix=function(t){return arguments.length?(o=(i=t)&&i.length,n=r=null,c):i},c.padding=function(t){return arguments.length?(l=t,n=r=null,c):l},c.sortGroups=function(t){return arguments.length?(a=t,n=r=null,c):a},c.sortSubgroups=function(t){return arguments.length?(s=t,n=null,c):s},c.sortChords=function(t){return arguments.length?(u=t,n&&e(),c):u},c.chords=function(){return n||t(),n},c.groups=function(){return r||t(),r},c},oo.layout.force=function(){function t(t){return function(e,n,r,i){if(e.point!==t){var o=e.cx-t.x,a=e.cy-t.y,s=i-n,u=o*o+a*a;if(u>s*s/y){if(g>u){c=e.charge/u;t.px-=o*c,t.py-=a*c}return!0}if(e.point&&u&&g>u){var c=e.pointCharge/u;t.px-=o*c,t.py-=a*c}}return!e.charge}}function e(t){t.px=oo.event.x,t.py=oo.event.y,u.resume()}var n,r,i,o,a,s,u={},c=oo.dispatch("start","tick","end"),l=[1,1],h=.9,p=ps,f=fs,d=-30,g=ds,v=.1,y=.64,_=[],m=[];return u.tick=function(){if((i*=.99)<.005)return n=null,c.end({type:"end",alpha:i=0}),!0;var e,r,u,p,f,g,y,x,T,E=_.length,S=m.length;for(r=0;S>r;++r)p=(u=m[r]).source,(g=(x=(f=u.target).x-p.x)*x+(T=f.y-p.y)*T)&&(g=i*a[r]*((g=Math.sqrt(g))-o[r])/g,x*=g,T*=g,f.x-=x*(y=p.weight+f.weight?p.weight/(p.weight+f.weight):.5),f.y-=T*y,p.x+=x*(y=1-y),p.y+=T*y);if((y=i*v)&&(x=l[0]/2,T=l[1]/2,r=-1,y))for(;++r<E;)(u=_[r]).x+=(x-u.x)*y,u.y+=(T-u.y)*y;if(d)for(yr(e=oo.geom.quadtree(_),i,s),r=-1;++r<E;)(u=_[r]).fixed||e.visit(t(u));for(r=-1;++r<E;)(u=_[r]).fixed?(u.x=u.px,u.y=u.py):(u.x-=(u.px-(u.px=u.x))*h,u.y-=(u.py-(u.py=u.y))*h);c.tick({type:"tick",alpha:i})},u.nodes=function(t){return arguments.length?(_=t,u):_},u.links=function(t){return arguments.length?(m=t,u):m},u.size=function(t){return arguments.length?(l=t,u):l},u.linkDistance=function(t){return arguments.length?(p="function"==typeof t?t:+t,u):p},u.distance=u.linkDistance,u.linkStrength=function(t){return arguments.length?(f="function"==typeof t?t:+t,u):f},u.friction=function(t){return arguments.length?(h=+t,u):h},u.charge=function(t){return arguments.length?(d="function"==typeof t?t:+t,u):d},u.chargeDistance=function(t){return arguments.length?(g=t*t,u):Math.sqrt(g)},u.gravity=function(t){return arguments.length?(v=+t,u):v},u.theta=function(t){return arguments.length?(y=t*t,u):Math.sqrt(y)},u.alpha=function(t){return arguments.length?(t=+t,i?t>0?i=t:(n.c=null,n.t=NaN,n=null,c.end({type:"end",alpha:i=0})):t>0&&(c.start({type:"start",alpha:i=t}),n=kt(u.tick)),u):i},u.start=function(){function t(t,r){if(!n){for(n=new Array(i),u=0;i>u;++u)n[u]=[];for(u=0;c>u;++u){var o=m[u];n[o.source.index].push(o.target),n[o.target.index].push(o.source)}}for(var a,s=n[e],u=-1,l=s.length;++u<l;)if(!isNaN(a=s[u][t]))return a;return Math.random()*r}var e,n,r,i=_.length,c=m.length,h=l[0],g=l[1];for(e=0;i>e;++e)(r=_[e]).index=e,r.weight=0;for(e=0;c>e;++e)"number"==typeof(r=m[e]).source&&(r.source=_[r.source]),"number"==typeof r.target&&(r.target=_[r.target]),++r.source.weight,++r.target.weight;for(e=0;i>e;++e)r=_[e],isNaN(r.x)&&(r.x=t("x",h)),isNaN(r.y)&&(r.y=t("y",g)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(o=[],"function"==typeof p)for(e=0;c>e;++e)o[e]=+p.call(this,m[e],e);else for(e=0;c>e;++e)o[e]=p;if(a=[],"function"==typeof f)for(e=0;c>e;++e)a[e]=+f.call(this,m[e],e);else for(e=0;c>e;++e)a[e]=f;if(s=[],"function"==typeof d)for(e=0;i>e;++e)s[e]=+d.call(this,_[e],e);else for(e=0;i>e;++e)s[e]=d;return u.resume()},u.resume=function(){return u.alpha(.1)},u.stop=function(){return u.alpha(0)},u.drag=function(){return r||(r=oo.behavior.drag().origin(S).on("dragstart.force",fr).on("drag.force",e).on("dragend.force",dr)),arguments.length?void this.on("mouseover.force",gr).on("mouseout.force",vr).call(r):r},oo.rebind(u,c,"on")};var ps=20,fs=1,ds=1/0;oo.layout.hierarchy=function(){function t(i){var o,a=[i],s=[];for(i.depth=0;null!=(o=a.pop());)if(s.push(o),(c=n.call(t,o,o.depth))&&(u=c.length)){for(var u,c,l;--u>=0;)a.push(l=c[u]),l.parent=o,l.depth=o.depth+1;r&&(o.value=0),o.children=c}else r&&(o.value=+r.call(t,o,o.depth)||0),delete o.children;return xr(i,function(t){var n,i;e&&(n=t.children)&&n.sort(e),r&&(i=t.parent)&&(i.value+=t.value)}),s}var e=Sr,n=Tr,r=Er;return t.sort=function(n){return arguments.length?(e=n,t):e},t.children=function(e){return arguments.length?(n=e,t):n},t.value=function(e){return arguments.length?(r=e,t):r},t.revalue=function(e){return r&&(mr(e,function(t){t.children&&(t.value=0)}),xr(e,function(e){var n;e.children||(e.value=+r.call(t,e,e.depth)||0),(n=e.parent)&&(n.value+=e.value)})),e},t},oo.layout.partition=function(){function t(e,n,r,i){var o=e.children;if(e.x=n,e.y=e.depth*i,e.dx=r,e.dy=i,o&&(a=o.length)){var a,s,u,c=-1;for(r=e.value?r/e.value:0;++c<a;)t(s=o[c],n,u=s.value*r,i),n+=u}}function e(t){var n=t.children,r=0;if(n&&(i=n.length))for(var i,o=-1;++o<i;)r=Math.max(r,e(n[o]));return 1+r}function n(n,o){var a=r.call(this,n,o);return t(a[0],0,i[0],i[1]/e(a[0])),a}var r=oo.layout.hierarchy(),i=[1,1];return n.size=function(t){return arguments.length?(i=t,n):i},_r(n,r)},oo.layout.pie=function(){function t(a){var s,u=a.length,c=a.map(function(n,r){return+e.call(t,n,r)}),l=+("function"==typeof r?r.apply(this,arguments):r),h=("function"==typeof i?i.apply(this,arguments):i)-l,p=Math.min(Math.abs(h)/u,+("function"==typeof o?o.apply(this,arguments):o)),f=p*(0>h?-1:1),d=oo.sum(c),g=d?(h-u*f)/d:0,v=oo.range(u),y=[];return null!=n&&v.sort(n===gs?function(t,e){return c[e]-c[t]}:function(t,e){return n(a[t],a[e])}),v.forEach(function(t){y[t]={data:a[t],value:s=c[t],startAngle:l,endAngle:l+=s*g+f,padAngle:p}}),y}var e=Number,n=gs,r=0,i=Do,o=0;return t.value=function(n){return arguments.length?(e=n,t):e},t.sort=function(e){return arguments.length?(n=e,t):n},t.startAngle=function(e){return arguments.length?(r=e,t):r},t.endAngle=function(e){return arguments.length?(i=e,t):i},t.padAngle=function(e){return arguments.length?(o=e,t):o},t};var gs={};oo.layout.stack=function(){function t(s,u){if(!(p=s.length))return s;var c=s.map(function(n,r){return e.call(t,n,r)}),l=c.map(function(e){return e.map(function(e,n){return[o.call(t,e,n),a.call(t,e,n)]})}),h=n.call(t,l,u);c=oo.permute(c,h),l=oo.permute(l,h);var p,f,d,g,v=r.call(t,l,u),y=c[0].length;for(d=0;y>d;++d)for(i.call(t,c[0][d],g=v[d],l[0][d][1]),f=1;p>f;++f)i.call(t,c[f][d],g+=l[f-1][d][1],l[f][d][1]);return s}var e=S,n=Rr,r=Nr,i=wr,o=br,a=Ar;return t.values=function(n){return arguments.length?(e=n,t):e},t.order=function(e){return arguments.length?(n="function"==typeof e?e:vs.get(e)||Rr,t):n},t.offset=function(e){return arguments.length?(r="function"==typeof e?e:ys.get(e)||Nr,t):r},t.x=function(e){return arguments.length?(o=e,t):o},t.y=function(e){return arguments.length?(a=e,t):a},t.out=function(e){return arguments.length?(i=e,t):i},t};var vs=oo.map({"inside-out":function(t){var e,n,r=t.length,i=t.map(Ir),o=t.map(kr),a=oo.range(r).sort(function(t,e){return i[t]-i[e]}),s=0,u=0,c=[],l=[];for(e=0;r>e;++e)n=a[e],u>s?(s+=o[n],c.push(n)):(u+=o[n],l.push(n));return l.reverse().concat(c)},reverse:function(t){return oo.range(t.length).reverse()},default:Rr}),ys=oo.map({silhouette:function(t){var e,n,r,i=t.length,o=t[0].length,a=[],s=0,u=[];for(n=0;o>n;++n){for(e=0,r=0;i>e;e++)r+=t[e][n][1];r>s&&(s=r),a.push(r)}for(n=0;o>n;++n)u[n]=(s-a[n])/2;return u},wiggle:function(t){var e,n,r,i,o,a,s,u,c,l=t.length,h=t[0],p=h.length,f=[];for(f[0]=u=c=0,n=1;p>n;++n){for(e=0,i=0;l>e;++e)i+=t[e][n][1];for(e=0,o=0,s=h[n][0]-h[n-1][0];l>e;++e){for(r=0,a=(t[e][n][1]-t[e][n-1][1])/(2*s);e>r;++r)a+=(t[r][n][1]-t[r][n-1][1])/s;o+=a*t[e][n][1]}f[n]=u-=i?o/i*s:0,c>u&&(c=u)}for(n=0;p>n;++n)f[n]-=c;return f},expand:function(t){var e,n,r,i=t.length,o=t[0].length,a=1/i,s=[];for(n=0;o>n;++n){for(e=0,r=0;i>e;e++)r+=t[e][n][1];if(r)for(e=0;i>e;e++)t[e][n][1]/=r;else for(e=0;i>e;e++)t[e][n][1]=a}for(n=0;o>n;++n)s[n]=0;return s},zero:Nr});oo.layout.histogram=function(){function t(t,o){for(var a,s,u=[],c=t.map(n,this),l=r.call(this,c,o),h=i.call(this,l,c,o),o=-1,p=c.length,f=h.length-1,d=e?1:1/p;++o<f;)(a=u[o]=[]).dx=h[o+1]-(a.x=h[o]),a.y=0;if(f>0)for(o=-1;++o<p;)(s=c[o])>=l[0]&&s<=l[1]&&(a=u[oo.bisect(h,s,1,f)-1],a.y+=d,a.push(t[o]));return u}var e=!0,n=Number,r=Pr,i=Lr;return t.value=function(e){return arguments.length?(n=e,t):n},t.range=function(e){return arguments.length?(r=Rt(e),t):r},t.bins=function(e){return arguments.length?(i="number"==typeof e?function(t){return Or(t,e)}:Rt(e),t):i},t.frequency=function(n){return arguments.length?(e=!!n,t):e},t},oo.layout.pack=function(){function t(t,o){var a=n.call(this,t,o),s=a[0],u=i[0],c=i[1],l=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(s.x=s.y=0,xr(s,function(t){t.r=+l(t.value)}),xr(s,jr),r){var h=r*(e?1:Math.max(2*s.r/u,2*s.r/c))/2;xr(s,function(t){t.r+=h}),xr(s,jr),xr(s,function(t){t.r-=h})}return qr(s,u/2,c/2,e?1:1/Math.max(2*s.r/u,2*s.r/c)),a}var e,n=oo.layout.hierarchy().sort(Dr),r=0,i=[1,1];return t.size=function(e){return arguments.length?(i=e,t):i},t.radius=function(n){return arguments.length?(e=null==n||"function"==typeof n?n:+n,t):e},t.padding=function(e){return arguments.length?(r=+e,t):r},_r(t,n)},oo.layout.tree=function(){function t(t,u){var c=i.call(this,t,u),l=c[0],h=function(t){for(var e,n={A:null,children:[t]},r=[n];null!=(e=r.pop());)for(var i,o=e.children,a=0,s=o.length;s>a;++a)r.push((o[a]=i={_:o[a],parent:e,children:(i=o[a].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=i);return n.children[0]}(l);if(xr(h,e),h.parent.m=-h.z,mr(h,n),s)mr(l,r);else{var p=l,f=l,d=l;mr(l,function(t){t.x<p.x&&(p=t),t.x>f.x&&(f=t),t.depth>d.depth&&(d=t)});var g=o(p,f)/2-p.x,v=a[0]/(f.x+o(f,p)/2+g),y=a[1]/(d.depth||1);mr(l,function(t){t.x=(t.x+g)*v,t.y=t.depth*y})}return c}function e(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e.length){!function(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)(e=i[o]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(t);var i=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+o(t._,r._),t.m=t.z-i):t.z=i}else r&&(t.z=r.z+o(t._,r._));t.parent.A=function(t,e,n){if(e){for(var r,i=t,a=t,s=e,u=i.parent.children[0],c=i.m,l=a.m,h=s.m,p=u.m;s=$r(s),i=Yr(i),s&&i;)u=Yr(u),(a=$r(a)).a=t,(r=s.z+h-i.z-c+o(s._,i._))>0&&(Kr(Wr(s,t,n),t,r),c+=r,l+=r),h+=s.m,c+=i.m,p+=u.m,l+=a.m;s&&!$r(a)&&(a.t=s,a.m+=h-l),i&&!Yr(u)&&(u.t=i,u.m+=c-p,n=t)}return n}(t,r,t.parent.A||n[0])}function n(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function r(t){t.x*=a[0],t.y=t.depth*a[1]}var i=oo.layout.hierarchy().sort(null).value(null),o=Gr,a=[1,1],s=null;return t.separation=function(e){return arguments.length?(o=e,t):o},t.size=function(e){return arguments.length?(s=null==(a=e)?r:null,t):s?null:a},t.nodeSize=function(e){return arguments.length?(s=null==(a=e)?null:r,t):s?a:null},_r(t,i)},oo.layout.cluster=function(){function t(t,o){var a,s=e.call(this,t,o),u=s[0],c=0;xr(u,function(t){var e=t.children;e&&e.length?(t.x=function(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}(e),t.y=function(t){return 1+oo.max(t,function(t){return t.y})}(e)):(t.x=a?c+=n(t,a):0,t.y=0,a=t)});var l=Qr(u),h=Zr(u),p=l.x-n(l,h)/2,f=h.x+n(h,l)/2;return xr(u,i?function(t){t.x=(t.x-u.x)*r[0],t.y=(u.y-t.y)*r[1]}:function(t){t.x=(t.x-p)/(f-p)*r[0],t.y=(1-(u.y?t.y/u.y:1))*r[1]}),s}var e=oo.layout.hierarchy().sort(null).value(null),n=Gr,r=[1,1],i=!1;return t.separation=function(e){return arguments.length?(n=e,t):n},t.size=function(e){return arguments.length?(i=null==(r=e),t):i?null:r},t.nodeSize=function(e){return arguments.length?(i=null!=(r=e),t):i?r:null},_r(t,e)},oo.layout.treemap=function(){function t(t,e){for(var n,r,i=-1,o=t.length;++i<o;)r=(n=t[i]).value*(0>e?0:e),n.area=isNaN(r)||0>=r?0:r}function e(n){var o=n.children;if(o&&o.length){var a,s,u,c=p(n),l=[],h=o.slice(),f=1/0,g="slice"===d?c.dx:"dice"===d?c.dy:"slice-dice"===d?1&n.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(t(h,c.dx*c.dy/n.value),l.area=0;(u=h.length)>0;)l.push(a=h[u-1]),l.area+=a.area,"squarify"!==d||(s=r(l,g))<=f?(h.pop(),f=s):(l.area-=l.pop().area,i(l,g,c,!1),g=Math.min(c.dx,c.dy),l.length=l.area=0,f=1/0);l.length&&(i(l,g,c,!0),l.length=l.area=0),o.forEach(e)}}function n(e){var r=e.children;if(r&&r.length){var o,a=p(e),s=r.slice(),u=[];for(t(s,a.dx*a.dy/e.value),u.area=0;o=s.pop();)u.push(o),u.area+=o.area,null!=o.z&&(i(u,o.z?a.dx:a.dy,a,!s.length),u.length=u.area=0);r.forEach(n)}}function r(t,e){for(var n,r=t.area,i=0,o=1/0,a=-1,s=t.length;++a<s;)(n=t[a].area)&&(o>n&&(o=n),n>i&&(i=n));return r*=r,e*=e,r?Math.max(e*i*g/r,r/(e*o*g)):1/0}function i(t,e,n,r){var i,o=-1,a=t.length,s=n.x,u=n.y,l=e?c(t.area/e):0;if(e==n.dx){for((r||l>n.dy)&&(l=n.dy);++o<a;)(i=t[o]).x=s,i.y=u,i.dy=l,s+=i.dx=Math.min(n.x+n.dx-s,l?c(i.area/l):0);i.z=!0,i.dx+=n.x+n.dx-s,n.y+=l,n.dy-=l}else{for((r||l>n.dx)&&(l=n.dx);++o<a;)(i=t[o]).x=s,i.y=u,i.dx=l,u+=i.dy=Math.min(n.y+n.dy-u,l?c(i.area/l):0);i.z=!1,i.dy+=n.y+n.dy-u,n.x+=l,n.dx-=l}}function a(r){var i=s||u(r),o=i[0];return o.x=o.y=0,o.value?(o.dx=l[0],o.dy=l[1]):o.dx=o.dy=0,s&&u.revalue(o),t([o],o.dx*o.dy/o.value),(s?n:e)(o),f&&(s=i),i}var s,u=oo.layout.hierarchy(),c=Math.round,l=[1,1],h=null,p=Jr,f=!1,d="squarify",g=.5*(1+Math.sqrt(5));return a.size=function(t){return arguments.length?(l=t,a):l},a.padding=function(t){function e(e){return Xr(e,t)}if(!arguments.length)return h;var n;return p=null==(h=t)?Jr:"function"==(n=void 0===t?"undefined":o(t))?function(e){var n=t.call(a,e,e.depth);return null==n?Jr(e):Xr(e,"number"==typeof n?[n,n,n,n]:n)}:"number"===n?(t=[t,t,t,t],e):e,a},a.round=function(t){return arguments.length?(c=t?Math.round:Number,a):c!=Number},a.sticky=function(t){return arguments.length?(f=t,s=null,a):f},a.ratio=function(t){return arguments.length?(g=t,a):g},a.mode=function(t){return arguments.length?(d=t+"",a):d},_r(a,u)},oo.random={normal:function(t,e){var n=arguments.length;return 2>n&&(e=1),1>n&&(t=0),function(){var n,r,i;do{i=(n=2*Math.random()-1)*n+(r=2*Math.random()-1)*r}while(!i||i>1);return t+e*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=oo.random.normal.apply(oo,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=oo.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,n=0;t>n;n++)e+=Math.random();return e}}},oo.scale={};var _s={floor:S,ceil:S};oo.scale.linear=function(){return ii([0,1],[0,1],Wn,!1)};var ms={s:1,g:1,p:1,r:1,e:1};oo.scale.log=function(){return hi(oo.scale.linear().domain([0,1]),10,!0,[1,10])};var xs=oo.format(".0e"),Ts={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};oo.scale.pow=function(){return pi(oo.scale.linear(),1,[0,1])},oo.scale.sqrt=function(){return oo.scale.pow().exponent(.5)},oo.scale.ordinal=function(){return di([],{t:"range",a:[[]]})},oo.scale.category10=function(){return oo.scale.ordinal().range(Es)},oo.scale.category20=function(){return oo.scale.ordinal().range(Ss)},oo.scale.category20b=function(){return oo.scale.ordinal().range(Cs)},oo.scale.category20c=function(){return oo.scale.ordinal().range(bs)};var Es=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(Tt),Ss=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(Tt),Cs=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(Tt),bs=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(Tt);oo.scale.quantile=function(){return gi([],[])},oo.scale.quantize=function(){return vi(0,1,[0,1])},oo.scale.threshold=function(){return yi([.5],[0,1])},oo.scale.identity=function(){return _i([0,1])},oo.svg={},oo.svg.arc=function(){function t(){var t=Math.max(0,+n.apply(this,arguments)),c=Math.max(0,+r.apply(this,arguments)),l=a.apply(this,arguments)-Fo,h=s.apply(this,arguments)-Fo,p=Math.abs(h-l),f=l>h?0:1;if(t>c&&(d=c,c=t,t=d),p>=Uo)return e(c,f)+(t?e(t,1-f):"")+"Z";var d,g,v,y,_,m,x,T,E,S,C,b,A=0,w=0,R=[];if((y=(+u.apply(this,arguments)||0)/2)&&(v=o===As?Math.sqrt(t*t+c*c):+o.apply(this,arguments),f||(w*=-1),c&&(w=ot(v/c*Math.sin(y))),t&&(A=ot(v/t*Math.sin(y)))),c){_=c*Math.cos(l+w),m=c*Math.sin(l+w),x=c*Math.cos(h-w),T=c*Math.sin(h-w);var N=Math.abs(h-l-2*w)<=Po?0:1;if(w&&bi(_,m,x,T)===f^N){var I=(l+h)/2;_=c*Math.cos(I),m=c*Math.sin(I),x=T=null}}else _=m=0;if(t){E=t*Math.cos(h-A),S=t*Math.sin(h-A),C=t*Math.cos(l+A),b=t*Math.sin(l+A);var k=Math.abs(l-h+2*A)<=Po?0:1;if(A&&bi(E,S,C,b)===1-f^k){var M=(l+h)/2;E=t*Math.cos(M),S=t*Math.sin(M),C=b=null}}else E=S=0;if(p>Lo&&(d=Math.min(Math.abs(c-t)/2,+i.apply(this,arguments)))>.001){g=c>t^f?0:1;var L=d,O=d;if(Po>p){var P=null==C?[E,S]:null==x?[_,m]:_n([_,m],[C,b],[x,T],[E,S]),D=_-P[0],U=m-P[1],F=x-P[0],H=T-P[1],j=1/Math.sin(Math.acos((D*F+U*H)/(Math.sqrt(D*D+U*U)*Math.sqrt(F*F+H*H)))/2),B=Math.sqrt(P[0]*P[0]+P[1]*P[1]);O=Math.min(d,(t-B)/(j-1)),L=Math.min(d,(c-B)/(j+1))}if(null!=x){var z=Ai(null==C?[E,S]:[C,b],[_,m],c,L,f),q=Ai([x,T],[E,S],c,L,f);d===L?R.push("M",z[0],"A",L,",",L," 0 0,",g," ",z[1],"A",c,",",c," 0 ",1-f^bi(z[1][0],z[1][1],q[1][0],q[1][1]),",",f," ",q[1],"A",L,",",L," 0 0,",g," ",q[0]):R.push("M",z[0],"A",L,",",L," 0 1,",g," ",q[0])}else R.push("M",_,",",m);if(null!=C){var V=Ai([_,m],[C,b],t,-O,f),G=Ai([E,S],null==x?[_,m]:[x,T],t,-O,f);d===O?R.push("L",G[0],"A",O,",",O," 0 0,",g," ",G[1],"A",t,",",t," 0 ",f^bi(G[1][0],G[1][1],V[1][0],V[1][1]),",",1-f," ",V[1],"A",O,",",O," 0 0,",g," ",V[0]):R.push("L",G[0],"A",O,",",O," 0 0,",g," ",V[0])}else R.push("L",E,",",S)}else R.push("M",_,",",m),null!=x&&R.push("A",c,",",c," 0 ",N,",",f," ",x,",",T),R.push("L",E,",",S),null!=C&&R.push("A",t,",",t," 0 ",k,",",1-f," ",C,",",b);return R.push("Z"),R.join("")}function e(t,e){return"M0,"+t+"A"+t+","+t+" 0 1,"+e+" 0,"+-t+"A"+t+","+t+" 0 1,"+e+" 0,"+t}var n=xi,r=Ti,i=mi,o=As,a=Ei,s=Si,u=Ci;return t.innerRadius=function(e){return arguments.length?(n=Rt(e),t):n},t.outerRadius=function(e){return arguments.length?(r=Rt(e),t):r},t.cornerRadius=function(e){return arguments.length?(i=Rt(e),t):i},t.padRadius=function(e){return arguments.length?(o=e==As?As:Rt(e),t):o},t.startAngle=function(e){return arguments.length?(a=Rt(e),t):a},t.endAngle=function(e){return arguments.length?(s=Rt(e),t):s},t.padAngle=function(e){return arguments.length?(u=Rt(e),t):u},t.centroid=function(){var t=(+n.apply(this,arguments)+ +r.apply(this,arguments))/2,e=(+a.apply(this,arguments)+ +s.apply(this,arguments))/2-Fo;return[Math.cos(e)*t,Math.sin(e)*t]},t};var As="auto";oo.svg.line=function(){return wi(S)};var ws=oo.map({linear:Ri,"linear-closed":Ni,step:function(t){for(var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];++e<n;)i.push("H",(r[0]+(r=t[e])[0])/2,"V",r[1]);return n>1&&i.push("H",r[0]),i.join("")},"step-before":Ii,"step-after":ki,basis:Oi,"basis-open":function(t){if(t.length<4)return Ri(t);for(var e,n=[],r=-1,i=t.length,o=[0],a=[0];++r<3;)e=t[r],o.push(e[0]),a.push(e[1]);for(n.push(Pi(Is,o)+","+Pi(Is,a)),--r;++r<i;)e=t[r],o.shift(),o.push(e[0]),a.shift(),a.push(e[1]),Di(n,o,a);return n.join("")},"basis-closed":function(t){for(var e,n,r=-1,i=t.length,o=i+4,a=[],s=[];++r<4;)n=t[r%i],a.push(n[0]),s.push(n[1]);for(e=[Pi(Is,a),",",Pi(Is,s)],--r;++r<o;)n=t[r%i],a.shift(),a.push(n[0]),s.shift(),s.push(n[1]),Di(e,a,s);return e.join("")},bundle:function(t,e){var n=t.length-1;if(n)for(var r,i,o=t[0][0],a=t[0][1],s=t[n][0]-o,u=t[n][1]-a,c=-1;++c<=n;)i=c/n,(r=t[c])[0]=e*r[0]+(1-e)*(o+i*s),r[1]=e*r[1]+(1-e)*(a+i*u);return Oi(t)},cardinal:function(t,e){return t.length<3?Ri(t):t[0]+Mi(t,Li(t,e))},"cardinal-open":function(t,e){return t.length<4?Ri(t):t[1]+Mi(t.slice(1,-1),Li(t,e))},"cardinal-closed":function(t,e){return t.length<3?Ni(t):t[0]+Mi((t.push(t[0]),t),Li([t[t.length-2]].concat(t,[t[1]]),e))},monotone:function(t){return t.length<3?Ri(t):t[0]+Mi(t,Fi(t))}});ws.forEach(function(t,e){e.key=t,e.closed=/-closed$/.test(t)});var Rs=[0,2/3,1/3,0],Ns=[0,1/3,2/3,0],Is=[0,1/6,2/3,1/6];oo.svg.line.radial=function(){var t=wi(Hi);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},Ii.reverse=ki,ki.reverse=Ii,oo.svg.area=function(){return ji(S)},oo.svg.area.radial=function(){var t=ji(Hi);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},oo.svg.chord=function(){function t(t,a){var s=e(this,i,t,a),u=e(this,o,t,a);return"M"+s.p0+n(s.r,s.p1,s.a1-s.a0)+(function(t,e){return t.a0==e.a0&&t.a1==e.a1}(s,u)?r(s.r,s.p1,s.r,s.p0):r(s.r,s.p1,u.r,u.p0)+n(u.r,u.p1,u.a1-u.a0)+r(u.r,u.p1,s.r,s.p0))+"Z"}function e(t,e,n,r){var i=e.call(t,n,r),o=a.call(t,i,r),c=s.call(t,i,r)-Fo,l=u.call(t,i,r)-Fo;return{r:o,a0:c,a1:l,p0:[o*Math.cos(c),o*Math.sin(c)],p1:[o*Math.cos(l),o*Math.sin(l)]}}function n(t,e,n){return"A"+t+","+t+" 0 "+ +(n>Po)+",1 "+e}function r(t,e,n,r){return"Q 0,0 "+r}var i=on,o=an,a=Bi,s=Ei,u=Si;return t.radius=function(e){return arguments.length?(a=Rt(e),t):a},t.source=function(e){return arguments.length?(i=Rt(e),t):i},t.target=function(e){return arguments.length?(o=Rt(e),t):o},t.startAngle=function(e){return arguments.length?(s=Rt(e),t):s},t.endAngle=function(e){return arguments.length?(u=Rt(e),t):u},t},oo.svg.diagonal=function(){function t(t,i){var o=e.call(this,t,i),a=n.call(this,t,i),s=(o.y+a.y)/2,u=[o,{x:o.x,y:s},{x:a.x,y:s},a];return"M"+(u=u.map(r))[0]+"C"+u[1]+" "+u[2]+" "+u[3]}var e=on,n=an,r=zi;return t.source=function(n){return arguments.length?(e=Rt(n),t):e},t.target=function(e){return arguments.length?(n=Rt(e),t):n},t.projection=function(e){return arguments.length?(r=e,t):r},t},oo.svg.diagonal.radial=function(){var t=oo.svg.diagonal(),e=zi,n=t.projection;return t.projection=function(t){return arguments.length?n(function(t){return function(){var e=t.apply(this,arguments),n=e[0],r=e[1]-Fo;return[n*Math.cos(r),n*Math.sin(r)]}}(e=t)):e},t},oo.svg.symbol=function(){function t(t,r){return(ks.get(e.call(this,t,r))||Gi)(n.call(this,t,r))}var e=Vi,n=qi;return t.type=function(n){return arguments.length?(e=Rt(n),t):e},t.size=function(e){return arguments.length?(n=Rt(e),t):n},t};var ks=oo.map({circle:Gi,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*Ls)),n=e*Ls;return"M0,"+-e+"L"+n+",0 0,"+e+" "+-n+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Ms),n=e*Ms/2;return"M0,"+n+"L"+e+","+-n+" "+-e+","+-n+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Ms),n=e*Ms/2;return"M0,"+-n+"L"+e+","+n+" "+-e+","+n+"Z"}});oo.svg.symbolTypes=ks.keys();var Ms=Math.sqrt(3),Ls=Math.tan(30*Ho);bo.transition=function(t){for(var e,n,r=Os||++Fs,i=Qi(t),o=[],a=Ps||{time:Date.now(),ease:function(t){if(0>=t)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(.5>t?n:3*(t-e)+n-.75)},delay:0,duration:250},s=-1,u=this.length;++s<u;){o.push(e=[]);for(var c=this[s],l=-1,h=c.length;++l<h;)(n=c[l])&&Zi(n,l,i,r,a),e.push(n)}return $i(o,i,r)},bo.interrupt=function(t){return this.each(null==t?Ds:Yi(Qi(t)))};var Os,Ps,Ds=Yi(Qi()),Us=[],Fs=0;Us.call=bo.call,Us.empty=bo.empty,Us.node=bo.node,Us.size=bo.size,oo.transition=function(t,e){return t&&t.transition?Os?t.transition(e):t:oo.selection().transition(t)},oo.transition.prototype=Us,Us.select=function(t){var e,n,r,i=this.id,o=this.namespace,a=[];t=L(t);for(var s=-1,u=this.length;++s<u;){a.push(e=[]);for(var c=this[s],l=-1,h=c.length;++l<h;)(r=c[l])&&(n=t.call(r,r.__data__,l,s))?("__data__"in r&&(n.__data__=r.__data__),Zi(n,l,o,i,r[o][i]),e.push(n)):e.push(null)}return $i(a,o,i)},Us.selectAll=function(t){var e,n,r,i,o,a=this.id,s=this.namespace,u=[];t=O(t);for(var c=-1,l=this.length;++c<l;)for(var h=this[c],p=-1,f=h.length;++p<f;)if(r=h[p]){o=r[s][a],n=t.call(r,r.__data__,p,c),u.push(e=[]);for(var d=-1,g=n.length;++d<g;)(i=n[d])&&Zi(i,d,s,a,o),e.push(i)}return $i(u,s,a)},Us.filter=function(t){var e,n,r=[];"function"!=typeof t&&(t=Y(t));for(var i=0,o=this.length;o>i;i++){r.push(e=[]);for(var a,s=0,u=(a=this[i]).length;u>s;s++)(n=a[s])&&t.call(n,n.__data__,s,i)&&e.push(n)}return $i(r,this.namespace,this.id)},Us.tween=function(t,e){var n=this.id,r=this.namespace;return arguments.length<2?this.node()[r][n].tween.get(t):K(this,null==e?function(e){e[r][n].tween.remove(t)}:function(i){i[r][n].tween.set(t,e)})},Us.attr=function(t,e){if(arguments.length<2){for(e in t)this.attr(e,t[e]);return this}var n="transform"==t?lr:Wn,r=oo.ns.qualify(t);return Ki(this,"attr."+t,e,r.local?function(t){return null==t?function(){this.removeAttributeNS(r.space,r.local)}:(t+="",function(){var e,i=this.getAttributeNS(r.space,r.local);return i!==t&&(e=n(i,t),function(t){this.setAttributeNS(r.space,r.local,e(t))})})}:function(t){return null==t?function(){this.removeAttribute(r)}:(t+="",function(){var e,i=this.getAttribute(r);return i!==t&&(e=n(i,t),function(t){this.setAttribute(r,e(t))})})})},Us.attrTween=function(t,e){var n=oo.ns.qualify(t);return this.tween("attr."+t,n.local?function(t,r){var i=e.call(this,t,r,this.getAttributeNS(n.space,n.local));return i&&function(t){this.setAttributeNS(n.space,n.local,i(t))}}:function(t,r){var i=e.call(this,t,r,this.getAttribute(n));return i&&function(t){this.setAttribute(n,i(t))}})},Us.style=function(t,e,n){var r=arguments.length;if(3>r){if("string"!=typeof t){2>r&&(e="");for(n in t)this.style(n,t[n],e);return this}n=""}return Ki(this,"style."+t,e,function(e){return null==e?function(){this.style.removeProperty(t)}:(e+="",function(){var r,i=s(this).getComputedStyle(this,null).getPropertyValue(t);return i!==e&&(r=Wn(i,e),function(e){this.style.setProperty(t,r(e),n)})})})},Us.styleTween=function(t,e,n){return arguments.length<3&&(n=""),this.tween("style."+t,function(r,i){var o=e.call(this,r,i,s(this).getComputedStyle(this,null).getPropertyValue(t));return o&&function(e){this.style.setProperty(t,o(e),n)}})},Us.text=function(t){return Ki(this,"text",t,Wi)},Us.remove=function(){var t=this.namespace;return this.each("end.transition",function(){var e;this[t].count<2&&(e=this.parentNode)&&e.removeChild(this)})},Us.ease=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].ease:("function"!=typeof t&&(t=oo.ease.apply(oo,arguments)),K(this,function(r){r[n][e].ease=t}))},Us.delay=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].delay:K(this,"function"==typeof t?function(r,i,o){r[n][e].delay=+t.call(r,r.__data__,i,o)}:(t=+t,function(r){r[n][e].delay=t}))},Us.duration=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].duration:K(this,"function"==typeof t?function(r,i,o){r[n][e].duration=Math.max(1,t.call(r,r.__data__,i,o))}:(t=Math.max(1,t),function(r){r[n][e].duration=t}))},Us.each=function(t,e){var n=this.id,r=this.namespace;if(arguments.length<2){var i=Ps,o=Os;try{Os=n,K(this,function(e,i,o){Ps=e[r][n],t.call(e,e.__data__,i,o)})}finally{Ps=i,Os=o}}else K(this,function(i){var o=i[r][n];(o.event||(o.event=oo.dispatch("start","end","interrupt"))).on(t,e)});return this},Us.transition=function(){for(var t,e,n,r=this.id,i=++Fs,o=this.namespace,a=[],s=0,u=this.length;u>s;s++){a.push(t=[]);for(var c,l=0,h=(c=this[s]).length;h>l;l++)(e=c[l])&&(n=e[o][r],Zi(e,l,o,i,{time:n.time,ease:n.ease,delay:n.delay+n.duration,duration:n.duration})),t.push(e)}return $i(a,o,i)},oo.svg.axis=function(){function t(t){t.each(function(){var t,c=oo.select(this),l=this.__chart__||n,h=this.__chart__=n.copy(),p=null==u?h.ticks?h.ticks.apply(h,s):h.domain():u,f=null==e?h.tickFormat?h.tickFormat.apply(h,s):S:e,d=c.selectAll(".tick").data(p,h),g=d.enter().insert("g",".domain").attr("class","tick").style("opacity",Lo),v=oo.transition(d.exit()).style("opacity",Lo).remove(),y=oo.transition(d.order()).style("opacity",1),_=Math.max(i,0)+a,m=ei(h),x=c.selectAll(".domain").data([0]),T=(x.enter().append("path").attr("class","domain"),oo.transition(x));g.append("line"),g.append("text");var E,C,b,A,w=g.select("line"),R=y.select("line"),N=d.select("text").text(f),I=g.select("text"),k=y.select("text"),M="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(t=Ji,E="x",b="y",C="x2",A="y2",N.attr("dy",0>M?"0em":".71em").style("text-anchor","middle"),T.attr("d","M"+m[0]+","+M*o+"V0H"+m[1]+"V"+M*o)):(t=Xi,E="y",b="x",C="y2",A="x2",N.attr("dy",".32em").style("text-anchor",0>M?"end":"start"),T.attr("d","M"+M*o+","+m[0]+"H0V"+m[1]+"H"+M*o)),w.attr(A,M*i),I.attr(b,M*_),R.attr(C,0).attr(A,M*i),k.attr(E,0).attr(b,M*_),h.rangeBand){var L=h,O=L.rangeBand()/2;l=h=function(t){return L(t)+O}}else l.rangeBand?l=h:v.call(t,h,l);g.call(t,l,h),y.call(t,h,h)})}var e,n=oo.scale.linear(),r=Hs,i=6,o=6,a=3,s=[10],u=null;return t.scale=function(e){return arguments.length?(n=e,t):n},t.orient=function(e){return arguments.length?(r=e in js?e+"":Hs,t):r},t.ticks=function(){return arguments.length?(s=so(arguments),t):s},t.tickValues=function(e){return arguments.length?(u=e,t):u},t.tickFormat=function(n){return arguments.length?(e=n,t):e},t.tickSize=function(e){var n=arguments.length;return n?(i=+e,o=+arguments[n-1],t):i},t.innerTickSize=function(e){return arguments.length?(i=+e,t):i},t.outerTickSize=function(e){return arguments.length?(o=+e,t):o},t.tickPadding=function(e){return arguments.length?(a=+e,t):a},t.tickSubdivide=function(){return arguments.length&&t},t};var Hs="bottom",js={top:1,right:1,bottom:1,left:1};oo.svg.brush=function(){function t(o){o.each(function(){var o=oo.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),a=o.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),o.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var s=o.selectAll(".resize").data(g,S);s.exit().remove(),s.enter().append("g").attr("class",function(t){return"resize "+t}).style("cursor",function(t){return Bs[t]}).append("rect").attr("x",function(t){return/[ew]$/.test(t)?-3:null}).attr("y",function(t){return/^[ns]/.test(t)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),s.style("display",t.empty()?"none":null);var u,h=oo.transition(o),p=oo.transition(a);c&&(u=ei(c),p.attr("x",u[0]).attr("width",u[1]-u[0]),n(h)),l&&(u=ei(l),p.attr("y",u[0]).attr("height",u[1]-u[0]),r(h)),e(h)})}function e(t){t.selectAll(".resize").attr("transform",function(t){return"translate("+h[+/e$/.test(t)]+","+p[+/^s/.test(t)]+")"})}function n(t){t.select(".extent").attr("x",h[0]),t.selectAll(".extent,.n>rect,.s>rect").attr("width",h[1]-h[0])}function r(t){t.select(".extent").attr("y",p[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",p[1]-p[0])}function i(){function i(){var t=oo.mouse(m),i=!1;_&&(t[0]+=_[0],t[1]+=_[1]),A||(oo.event.altKey?(y||(y=[(h[0]+h[1])/2,(p[0]+p[1])/2]),R[0]=h[+(t[0]<y[0])],R[1]=p[+(t[1]<y[1])]):y=null),C&&g(t,c,0)&&(n(E),i=!0),b&&g(t,l,1)&&(r(E),i=!0),i&&(e(E),T({type:"brush",mode:A?"move":"resize"}))}function g(t,e,n){var r,i,s=ei(e),u=s[0],c=s[1],l=R[n],g=n?p:h,v=g[1]-g[0];return A&&(u-=l,c-=v+l),r=(n?d:f)?Math.max(u,Math.min(c,t[n])):t[n],A?i=(r+=l)+v:(y&&(l=Math.max(u,Math.min(c,2*y[n]-r))),r>l?(i=r,r=l):i=l),g[0]!=r||g[1]!=i?(n?a=null:o=null,g[0]=r,g[1]=i,!0):void 0}function v(){i(),E.style("pointer-events","all").selectAll(".resize").style("display",t.empty()?"none":null),oo.select("body").style("cursor",null),I.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),w(),T({type:"brushend"})}var y,_,m=this,x=oo.select(oo.event.target),T=u.of(m,arguments),E=oo.select(m),S=x.datum(),C=!/^(n|s)$/.test(S)&&c,b=!/^(e|w)$/.test(S)&&l,A=x.classed("extent"),w=X(m),R=oo.mouse(m),I=oo.select(s(m)).on("keydown.brush",function(){32==oo.event.keyCode&&(A||(y=null,R[0]-=h[1],R[1]-=p[1],A=2),N())}).on("keyup.brush",function(){32==oo.event.keyCode&&2==A&&(R[0]+=h[1],R[1]+=p[1],A=0,N())});if(oo.event.changedTouches?I.on("touchmove.brush",i).on("touchend.brush",v):I.on("mousemove.brush",i).on("mouseup.brush",v),E.interrupt().selectAll("*").interrupt(),A)R[0]=h[0]-R[0],R[1]=p[0]-R[1];else if(S){var k=+/w$/.test(S),M=+/^n/.test(S);_=[h[1-k]-R[0],p[1-M]-R[1]],R[0]=h[k],R[1]=p[M]}else oo.event.altKey&&(y=R.slice());E.style("pointer-events","none").selectAll(".resize").style("display",null),oo.select("body").style("cursor",x.style("cursor")),T({type:"brushstart"}),i()}var o,a,u=k(t,"brushstart","brush","brushend"),c=null,l=null,h=[0,0],p=[0,0],f=!0,d=!0,g=zs[0];return t.event=function(t){t.each(function(){var t=u.of(this,arguments),e={x:h,y:p,i:o,j:a},n=this.__chart__||e;this.__chart__=e,Os?oo.select(this).transition().each("start.brush",function(){o=n.i,a=n.j,h=n.x,p=n.y,t({type:"brushstart"})}).tween("brush:brush",function(){var n=Qn(h,e.x),r=Qn(p,e.y);return o=a=null,function(i){h=e.x=n(i),p=e.y=r(i),t({type:"brush",mode:"resize"})}}).each("end.brush",function(){o=e.i,a=e.j,t({type:"brush",mode:"resize"}),t({type:"brushend"})}):(t({type:"brushstart"}),t({type:"brush",mode:"resize"}),t({type:"brushend"}))})},t.x=function(e){return arguments.length?(c=e,g=zs[!c<<1|!l],t):c},t.y=function(e){return arguments.length?(l=e,g=zs[!c<<1|!l],t):l},t.clamp=function(e){return arguments.length?(c&&l?(f=!!e[0],d=!!e[1]):c?f=!!e:l&&(d=!!e),t):c&&l?[f,d]:c?f:l?d:null},t.extent=function(e){var n,r,i,s,u;return arguments.length?(c&&(n=e[0],r=e[1],l&&(n=n[0],r=r[0]),o=[n,r],c.invert&&(n=c(n),r=c(r)),n>r&&(u=n,n=r,r=u),n==h[0]&&r==h[1]||(h=[n,r])),l&&(i=e[0],s=e[1],c&&(i=i[1],s=s[1]),a=[i,s],l.invert&&(i=l(i),s=l(s)),i>s&&(u=i,i=s,s=u),i==p[0]&&s==p[1]||(p=[i,s])),t):(c&&(o?(n=o[0],r=o[1]):(n=h[0],r=h[1],c.invert&&(n=c.invert(n),r=c.invert(r)),n>r&&(u=n,n=r,r=u))),l&&(a?(i=a[0],s=a[1]):(i=p[0],s=p[1],l.invert&&(i=l.invert(i),s=l.invert(s)),i>s&&(u=i,i=s,s=u))),c&&l?[[n,i],[r,s]]:c?[n,r]:l&&[i,s])},t.clear=function(){return t.empty()||(h=[0,0],p=[0,0],o=a=null),t},t.empty=function(){return!!c&&h[0]==h[1]||!!l&&p[0]==p[1]},oo.rebind(t,u,"on")};var Bs={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},zs=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],qs=ua.format=da.timeFormat,Vs=qs.utc,Gs=Vs("%Y-%m-%dT%H:%M:%S.%LZ");qs.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?to:Gs,to.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},to.toString=Gs.toString,ua.second=Ut(function(t){return new ca(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))},function(t){return t.getSeconds()}),ua.seconds=ua.second.range,ua.seconds.utc=ua.second.utc.range,ua.minute=Ut(function(t){return new ca(6e4*Math.floor(t/6e4))},function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))},function(t){return t.getMinutes()}),ua.minutes=ua.minute.range,ua.minutes.utc=ua.minute.utc.range,ua.hour=Ut(function(t){var e=t.getTimezoneOffset()/60;return new ca(36e5*(Math.floor(t/36e5-e)+e))},function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))},function(t){return t.getHours()}),ua.hours=ua.hour.range,ua.hours.utc=ua.hour.utc.range,ua.month=Ut(function(t){return(t=ua.day(t)).setDate(1),t},function(t,e){t.setMonth(t.getMonth()+e)},function(t){return t.getMonth()}),ua.months=ua.month.range,ua.months.utc=ua.month.utc.range;var Ys=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],$s=[[ua.second,1],[ua.second,5],[ua.second,15],[ua.second,30],[ua.minute,1],[ua.minute,5],[ua.minute,15],[ua.minute,30],[ua.hour,1],[ua.hour,3],[ua.hour,6],[ua.hour,12],[ua.day,1],[ua.day,2],[ua.week,1],[ua.month,1],[ua.month,3],[ua.year,1]],Ks=qs.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",Ce]]),Ws={range:function(t,e,n){return oo.range(Math.ceil(t/n)*n,+e,n).map(no)},floor:S,ceil:S};$s.year=ua.year,ua.scale=function(){return eo(oo.scale.linear(),$s,Ks)};var Qs=$s.map(function(t){return[t[0].utc,t[1]]}),Zs=Vs.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",Ce]]);Qs.year=ua.year.utc,ua.scale.utc=function(){return eo(oo.scale.linear(),Qs,Zs)},oo.text=Nt(function(t){return t.responseText}),oo.json=function(t,e){return It(t,"application/json",ro,e)},oo.html=function(t,e){return It(t,"text/html",io,e)},oo.xml=Nt(function(t){return t.responseXML}),this.d3=oo,void 0!==(i="function"==typeof(r=oo)?r.call(e,n,e,t):r)&&(t.exports=i)}()},"j/5l":function(t,e){function n(){return this.source=null,this.type=null,this.channel=null,this.start=null,this.stop=null,this.tokenIndex=null,this.line=null,this.column=null,this._text=null,this}function r(t,e,i,o,a){return n.call(this),this.source=void 0!==t?t:r.EMPTY_SOURCE,this.type=void 0!==e?e:null,this.channel=void 0!==i?i:n.DEFAULT_CHANNEL,this.start=void 0!==o?o:-1,this.stop=void 0!==a?a:-1,this.tokenIndex=-1,null!==this.source[0]?(this.line=t[0].line,this.column=t[0].column):this.column=-1,this}n.INVALID_TYPE=0,n.EPSILON=-2,n.MIN_USER_TOKEN_TYPE=1,n.EOF=-1,n.DEFAULT_CHANNEL=0,n.HIDDEN_CHANNEL=1,Object.defineProperty(n.prototype,"text",{get:function(){return this._text},set:function(t){this._text=t}}),n.prototype.getTokenSource=function(){return this.source[0]},n.prototype.getInputStream=function(){return this.source[1]},(r.prototype=Object.create(n.prototype)).constructor=r,r.EMPTY_SOURCE=[null,null],r.prototype.clone=function(){var t=new r(this.source,this.type,this.channel,this.start,this.stop);return t.tokenIndex=this.tokenIndex,t.line=this.line,t.column=this.column,t.text=this.text,t},Object.defineProperty(r.prototype,"text",{get:function(){if(null!==this._text)return this._text;var t=this.getInputStream();if(null===t)return null;var e=t.size;return this.start<e&&this.stop<e?t.getText(this.start,this.stop):"<EOF>"},set:function(t){this._text=t}}),r.prototype.toString=function(){var t=this.text;return t=null!==t?t.replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t"):"<no text>","[@"+this.tokenIndex+","+this.start+":"+this.stop+"='"+t+"',<"+this.type+">"+(this.channel>0?",channel="+this.channel:"")+","+this.line+":"+this.column+"]"},e.Token=n,e.CommonToken=r},j0Qz:function(t,e){function n(){return this.atn=null,this.stateNumber=n.INVALID_STATE_NUMBER,this.stateType=null,this.ruleIndex=0,this.epsilonOnlyTransitions=!1,this.transitions=[],this.nextTokenWithinRule=null,this}function r(){return n.call(this),this.stateType=n.BASIC,this}function i(){return n.call(this),this.decision=-1,this.nonGreedy=!1,this}function o(){return i.call(this),this.endState=null,this}function a(){return o.call(this),this.stateType=n.BLOCK_START,this}function s(){return n.call(this),this.stateType=n.BLOCK_END,this.startState=null,this}function u(){return n.call(this),this.stateType=n.RULE_STOP,this}function c(){return n.call(this),this.stateType=n.RULE_START,this.stopState=null,this.isPrecedenceRule=!1,this}function l(){return i.call(this),this.stateType=n.PLUS_LOOP_BACK,this}function h(){return o.call(this),this.stateType=n.PLUS_BLOCK_START,this.loopBackState=null,this}function p(){return o.call(this),this.stateType=n.STAR_BLOCK_START,this}function f(){return n.call(this),this.stateType=n.STAR_LOOP_BACK,this}function d(){return i.call(this),this.stateType=n.STAR_LOOP_ENTRY,this.loopBackState=null,this.isPrecedenceDecision=null,this}function g(){return n.call(this),this.stateType=n.LOOP_END,this.loopBackState=null,this}function v(){return i.call(this),this.stateType=n.TOKEN_START,this}n.INVALID_TYPE=0,n.BASIC=1,n.RULE_START=2,n.BLOCK_START=3,n.PLUS_BLOCK_START=4,n.STAR_BLOCK_START=5,n.TOKEN_START=6,n.RULE_STOP=7,n.BLOCK_END=8,n.STAR_LOOP_BACK=9,n.STAR_LOOP_ENTRY=10,n.PLUS_LOOP_BACK=11,n.LOOP_END=12,n.serializationNames=["INVALID","BASIC","RULE_START","BLOCK_START","PLUS_BLOCK_START","STAR_BLOCK_START","TOKEN_START","RULE_STOP","BLOCK_END","STAR_LOOP_BACK","STAR_LOOP_ENTRY","PLUS_LOOP_BACK","LOOP_END"],n.INVALID_STATE_NUMBER=-1,n.prototype.toString=function(){return this.stateNumber},n.prototype.equals=function(t){return t instanceof n&&this.stateNumber===t.stateNumber},n.prototype.isNonGreedyExitState=function(){return!1},n.prototype.addTransition=function(t,e){void 0===e&&(e=-1),0===this.transitions.length?this.epsilonOnlyTransitions=t.isEpsilon:this.epsilonOnlyTransitions!==t.isEpsilon&&(this.epsilonOnlyTransitions=!1),-1===e?this.transitions.push(t):this.transitions.splice(e,1,t)},(r.prototype=Object.create(n.prototype)).constructor=r,(i.prototype=Object.create(n.prototype)).constructor=i,(o.prototype=Object.create(i.prototype)).constructor=o,(a.prototype=Object.create(o.prototype)).constructor=a,(s.prototype=Object.create(n.prototype)).constructor=s,(u.prototype=Object.create(n.prototype)).constructor=u,(c.prototype=Object.create(n.prototype)).constructor=c,(l.prototype=Object.create(i.prototype)).constructor=l,(h.prototype=Object.create(o.prototype)).constructor=h,(p.prototype=Object.create(o.prototype)).constructor=p,(f.prototype=Object.create(n.prototype)).constructor=f,(d.prototype=Object.create(i.prototype)).constructor=d,(g.prototype=Object.create(n.prototype)).constructor=g,(v.prototype=Object.create(i.prototype)).constructor=v,e.ATNState=n,e.BasicState=r,e.DecisionState=i,e.BlockStartState=o,e.BlockEndState=s,e.LoopEndState=g,e.RuleStartState=c,e.RuleStopState=u,e.TokensStartState=v,e.PlusLoopbackState=l,e.StarLoopbackState=f,e.StarLoopEntryState=d,e.PlusBlockStartState=h,e.StarBlockStartState=p,e.BasicBlockStartState=a},j1YA:function(t,e,n){},k1zP:function(t,e,n){function r(){}function i(){return r.call(this),this.errorRecoveryMode=!1,this.lastErrorIndex=-1,this.lastErrorStates=null,this}function o(){return i.call(this),this}var a=n("j/5l").Token,s=n("5d5Q"),u=s.NoViableAltException,c=s.InputMismatchException,l=s.FailedPredicateException,h=s.ParseCancellationException,p=n("j0Qz").ATNState,f=n("T+Yw").Interval,d=n("T+Yw").IntervalSet;r.prototype.reset=function(t){},r.prototype.recoverInline=function(t){},r.prototype.recover=function(t,e){},r.prototype.sync=function(t){},r.prototype.inErrorRecoveryMode=function(t){},r.prototype.reportError=function(t){},(i.prototype=Object.create(r.prototype)).constructor=i,i.prototype.reset=function(t){this.endErrorCondition(t)},i.prototype.beginErrorCondition=function(t){this.errorRecoveryMode=!0},i.prototype.inErrorRecoveryMode=function(t){return this.errorRecoveryMode},i.prototype.endErrorCondition=function(t){this.errorRecoveryMode=!1,this.lastErrorStates=null,this.lastErrorIndex=-1},i.prototype.reportMatch=function(t){this.endErrorCondition(t)},i.prototype.reportError=function(t,e){this.inErrorRecoveryMode(t)||(this.beginErrorCondition(t),e instanceof u?this.reportNoViableAlternative(t,e):e instanceof c?this.reportInputMismatch(t,e):e instanceof l?this.reportFailedPredicate(t,e):(console.log("unknown recognition error type: "+e.constructor.name),console.log(e.stack),t.notifyErrorListeners(e.getOffendingToken(),e.getMessage(),e)))},i.prototype.recover=function(t,e){this.lastErrorIndex===t.getInputStream().index&&null!==this.lastErrorStates&&this.lastErrorStates.indexOf(t.state)>=0&&t.consume(),this.lastErrorIndex=t._input.index,null===this.lastErrorStates&&(this.lastErrorStates=[]),this.lastErrorStates.push(t.state);var n=this.getErrorRecoverySet(t);this.consumeUntil(t,n)},i.prototype.sync=function(t){if(!this.inErrorRecoveryMode(t)){var e=t._interp.atn.states[t.state],n=t.getTokenStream().LA(1),r=t.atn.nextTokens(e);if(!r.contains(a.EPSILON)&&!r.contains(n))switch(e.stateType){case p.BLOCK_START:case p.STAR_BLOCK_START:case p.PLUS_BLOCK_START:case p.STAR_LOOP_ENTRY:if(null!==this.singleTokenDeletion(t))return;throw new c(t);case p.PLUS_LOOP_BACK:case p.STAR_LOOP_BACK:this.reportUnwantedToken(t);var i=new d;i.addSet(t.getExpectedTokens());var o=i.addSet(this.getErrorRecoverySet(t));this.consumeUntil(t,o)}}},i.prototype.reportNoViableAlternative=function(t,e){var n,r=t.getTokenStream();n=null!==r?e.startToken.type===a.EOF?"<EOF>":r.getText(new f(e.startToken.tokenIndex,e.offendingToken.tokenIndex)):"<unknown input>";var i="no viable alternative at input "+this.escapeWSAndQuote(n);t.notifyErrorListeners(i,e.offendingToken,e)},i.prototype.reportInputMismatch=function(t,e){var n="mismatched input "+this.getTokenErrorDisplay(e.offendingToken)+" expecting "+e.getExpectedTokens().toString(t.literalNames,t.symbolicNames);t.notifyErrorListeners(n,e.offendingToken,e)},i.prototype.reportFailedPredicate=function(t,e){var n="rule "+t.ruleNames[t._ctx.ruleIndex]+" "+e.message;t.notifyErrorListeners(n,e.offendingToken,e)},i.prototype.reportUnwantedToken=function(t){if(!this.inErrorRecoveryMode(t)){this.beginErrorCondition(t);var e=t.getCurrentToken(),n="extraneous input "+this.getTokenErrorDisplay(e)+" expecting "+this.getExpectedTokens(t).toString(t.literalNames,t.symbolicNames);t.notifyErrorListeners(n,e,null)}},i.prototype.reportMissingToken=function(t){if(!this.inErrorRecoveryMode(t)){this.beginErrorCondition(t);var e=t.getCurrentToken(),n="missing "+this.getExpectedTokens(t).toString(t.literalNames,t.symbolicNames)+" at "+this.getTokenErrorDisplay(e);t.notifyErrorListeners(n,e,null)}},i.prototype.recoverInline=function(t){var e=this.singleTokenDeletion(t);if(null!==e)return t.consume(),e;if(this.singleTokenInsertion(t))return this.getMissingSymbol(t);throw new c(t)},i.prototype.singleTokenInsertion=function(t){var e=t.getTokenStream().LA(1),n=t._interp.atn,r=n.states[t.state].transitions[0].target;return!!n.nextTokens(r,t._ctx).contains(e)&&(this.reportMissingToken(t),!0)},i.prototype.singleTokenDeletion=function(t){var e=t.getTokenStream().LA(2);if(this.getExpectedTokens(t).contains(e)){this.reportUnwantedToken(t),t.consume();var n=t.getCurrentToken();return this.reportMatch(t),n}return null},i.prototype.getMissingSymbol=function(t){var e,n=t.getCurrentToken(),r=this.getExpectedTokens(t).first();e=r===a.EOF?"<missing EOF>":"<missing "+t.literalNames[r]+">";var i=n,o=t.getTokenStream().LT(-1);return i.type===a.EOF&&null!==o&&(i=o),t.getTokenFactory().create(i.source,r,e,a.DEFAULT_CHANNEL,-1,-1,i.line,i.column)},i.prototype.getExpectedTokens=function(t){return t.getExpectedTokens()},i.prototype.getTokenErrorDisplay=function(t){if(null===t)return"<no token>";var e=t.text;return null===e&&(e=t.type===a.EOF?"<EOF>":"<"+t.type+">"),this.escapeWSAndQuote(e)},i.prototype.escapeWSAndQuote=function(t){return t=t.replace(/\n/g,"\\n"),t=t.replace(/\r/g,"\\r"),"'"+(t=t.replace(/\t/g,"\\t"))+"'"},i.prototype.getErrorRecoverySet=function(t){for(var e=t._interp.atn,n=t._ctx,r=new d;null!==n&&n.invokingState>=0;){var i=e.states[n.invokingState].transitions[0],o=e.nextTokens(i.followState);r.addSet(o),n=n.parentCtx}return r.removeOne(a.EPSILON),r},i.prototype.consumeUntil=function(t,e){for(var n=t.getTokenStream().LA(1);n!==a.EOF&&!e.contains(n);)t.consume(),n=t.getTokenStream().LA(1)},(o.prototype=Object.create(i.prototype)).constructor=o,o.prototype.recover=function(t,e){for(var n=t._ctx;null!==n;)n.exception=e,n=n.parentCtx;throw new h(e)},o.prototype.recoverInline=function(t){this.recover(t,new c(t))},o.prototype.sync=function(t){},e.BailErrorStrategy=o,e.DefaultErrorStrategy=i},kIFb:function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return i});var r={uncreated:-1,initial:1,running:2,activated:3,userTerminated:4,sysTerminated:5,terminated:6,invalid:0},i={"-1":{type:"danger",desc:"未创建合同"},1:{type:"warning",desc:"未开始执行"},2:{type:"warning",desc:"执行中"},3:{type:"success",desc:"生效中"},4:{type:"info",desc:"用户终止"},5:{type:"info",desc:"系统终止"},6:{type:"info",desc:"合同已终止"}}},nOLo:function(t,e,n){"use strict";e.a={1:{value:1,desc:"支付进行中"},2:{value:2,desc:"已支付成功"},3:{value:3,desc:"支付失败"}}},pHgc:function(t,e,n){e.ATN=n("7y1Z").ATN,e.ATNDeserializer=n("3Rtt").ATNDeserializer,e.LexerATNSimulator=n("WcIR").LexerATNSimulator,e.ParserATNSimulator=n("+1pv").ParserATNSimulator,e.PredictionMode=n("LYMb").PredictionMode},"pr/i":function(t,e){String.fromCodePoint||function(){var t=function(){try{var t={},e=Object.defineProperty,n=e(t,t,t)&&e}catch(t){}return n}(),e=String.fromCharCode,n=Math.floor,r=function(t){var r,i,o=[],a=-1,s=arguments.length;if(!s)return"";for(var u="";++a<s;){var c=Number(arguments[a]);if(!isFinite(c)||c<0||c>1114111||n(c)!=c)throw RangeError("Invalid code point: "+c);c<=65535?o.push(c):(r=55296+((c-=65536)>>10),i=c%1024+56320,o.push(r,i)),(a+1==s||o.length>16384)&&(u+=e.apply(null,o),o.length=0)}return u};t?t(String,"fromCodePoint",{value:r,configurable:!0,writable:!0}):String.fromCodePoint=r}()},qFmK:function(t,e){function n(){return this}function r(){return n.call(this),this}function i(t){if(n.call(this),null===t)throw"delegates";return this.delegates=t,this}n.prototype.syntaxError=function(t,e,n,r,i,o){},n.prototype.reportAmbiguity=function(t,e,n,r,i,o,a){},n.prototype.reportAttemptingFullContext=function(t,e,n,r,i,o){},n.prototype.reportContextSensitivity=function(t,e,n,r,i,o){},(r.prototype=Object.create(n.prototype)).constructor=r,r.INSTANCE=new r,r.prototype.syntaxError=function(t,e,n,r,i,o){console.error("line "+n+":"+r+" "+i)},(i.prototype=Object.create(n.prototype)).constructor=i,i.prototype.syntaxError=function(t,e,n,r,i,o){this.delegates.map(function(a){a.syntaxError(t,e,n,r,i,o)})},i.prototype.reportAmbiguity=function(t,e,n,r,i,o,a){this.delegates.map(function(s){s.reportAmbiguity(t,e,n,r,i,o,a)})},i.prototype.reportAttemptingFullContext=function(t,e,n,r,i,o){this.delegates.map(function(a){a.reportAttemptingFullContext(t,e,n,r,i,o)})},i.prototype.reportContextSensitivity=function(t,e,n,r,i,o){this.delegates.map(function(a){a.reportContextSensitivity(t,e,n,r,i,o)})},e.ErrorListener=n,e.ConsoleErrorListener=r,e.ProxyErrorListener=i},rBFZ:function(t,e,n){function r(t){return i.Lexer.call(this,t),this._interp=new i.atn.LexerATNSimulator(this,a,s,new i.PredictionContextCache),this}var i=n("9C8F"),o=["悋Ꜫ脳맭䅼㯧瞆奤","-ʺ\b\t\t","\t\t\t\t","\b\t\b\t\t\t\n\t\n\v\t\v","\f\t\f\r\t\r\t\t","\t\t\t\t","\t\t\t","\t\t\t\t","\t\t\t",'\t\t \t !\t!"\t"#',"\t#$\t$%\t%&\t&'\t'(\t()\t)","*\t*+\t+,\t,-\t-.\t./\t/0\t0","1\t12\t23\t34\t45\t56\t67\t7","8\t89\t9:\t:;\t;<\t<=\t=>\t>","?\t?@\t@A\tAB\tBC\tCD\tDE\tE","F\tFG\tGH\tHI\tIJ\tJK\tK","","","","","","\b","\b\b\t\t\t\t\n\n\n","\n\n\n\n\v\v\v","\f\f\f\f\f\f\r\r\r","\r\r\r\r\r\r\r\r\r","\r\r\r\r\r\r\r\r\r","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","ǘ\n","ǟ\n","ǥ\n","ǭ\n","ǯ\n","","","","Ȋ\n","","","","","   ",'       !!"',"\"##$$%%&&'","'(())**++,",",--..//001","1223344556","6778899::;",";<<==>>??@","@ɰ\n@\r@@ɱAAAAB","BBBɻ\nB\rBBɼBBB","BBʃ\nB\rBBʄCCCD","DDEEEEEEʒ\nEF","Fʕ\nF\rFFʖGGGGG","GHHHʡ\nH\rHHʢII","IIIIIIIIJJ","JJJKKʵ\nK\rKKʶK","KL\t\v","\r\b\t\n\v\f\r","!#%')+","-/13579;= ?!A","CEGIKMOQSU","WY[]_acegi","kmoqsuwy{}","\"#$%&'()*","+,-#CCccDDdd","EEeeFFffGGggHHhhIIi","iJJjjKKkkLLllMMmm","NNnnOOooPPppQQqq","RRrrSSssTTttUUuuVVv","vWWwwXXxxYYyyZZzz","[[{{\\\\||2;c|","C\\C\\c|>>@@C\\aac|579:",'\v\f""ʮ',"","\t\v","\r","","","","","!#","%')","+-","/1","35","79",";=?","","","","","","","","\t","\v¦\r°","»¾","ÂÉ","ÌÒ","çý","Ė!ę","#Į%Ļ","'Ś)Ŭ","+ſ-ƈ","/ƥ1ǂ3Ǯ","5ǰ7Ǵ","9ǹ;Ȏ","=ȟ?Ȧ","AȰCȲ","EȴGȶIȸ","KȺMȼ","OȾQɀ","SɂUɄ","WɆYɈ","[Ɋ]Ɍ_Ɏ","aɐcɒ","eɔgɖ","iɘkɚ","mɜoɞ","qɠsɢuɤ","wɦyɨ","{ɪ}ɬ","ɯɳ","ɺʆ","ʉʌ","ʔʘ","ʠʤ","ʮʴ","<",".","kp","\bk"," p ¡k¡","¢v¢£k£¤","c¤¥n¥\n","¦§>§¨k","¨©p©ªk","ª«v«¬k¬","­c­®n®¯","@¯\f°±","r±²t²³q","³´e´µg","µ¶g¶·f·",'¸"¸¹v¹º',"qº»¼","q¼½p½","¾¿c¿À","pÀÁfÁ","ÂÃgÃÄp",'ÄÅfÅÆ"',"ÆÇqÇÈhÈ","ÉÊcÊ","ËvËÌ","ÍcÍÎhÎÏ","vÏÐgÐÑ","tÑÒÓ",'qÓÔhÔÕ"',"ÕÖeÖ×q","×ØpØÙvÙ","ÚtÚÛcÛÜ","eÜÝvÝÞ",'"Þßeßàt',"àágáâc","âãvãäkä","åqåæpæ","çèrèé","téêkêë",'eëìgìí"',"íîrîït","ïðkðñeñ","ògòóGóô","zôõrõö","tö÷g÷øu","øùuùúk","úûqûüpü","ýþtþ","ÿgÿĀeĀā","gāĂkĂă","xăĄkĄąp",'ąĆiĆć"',"ćĈvĈĉtĉ","ĊcĊċpċČ","uČčcčĎ","eĎďvďĐk","ĐđqđĒp",'Ēē"ēĔqĔ',"ĕhĕĖ","ėvėĘqĘ ","ęĚeĚě","qěĜpĜĝv","ĝĞtĞğc","ğĠeĠġvġ","ĢaĢģiģĤ","wĤĥcĥĦ","tĦħcħĨp","ĨĩvĩĪ{",'Īī"īĬqĬ','ĭhĭ"Įį',"tįİgİı","hıĲwĲĳp",'ĳĴfĴĵ"',"ĵĶcĶķhķ","ĸvĸĹgĹĺ","tĺ$Ļļ","tļĽgĽľe","ľĿgĿŀk","ŀŁxŁłkł","ŃpŃńińŅ",'"ŅņrņŇ',"nŇňcňŉv","ŉŊhŊŋq","ŋŌtŌōoō","ŎaŎŏiŏŐ","wŐőcőŒ","tŒœcœŔp","ŔŕvŕŖ{",'Ŗŗ"ŗŘqŘ',"řhř&Śś","cśŜeŜŝ","eŝŞgŞşr","şŠvŠšk","šŢpŢţiţ",'Ť"ŤťnťŦ',"kŦŧeŧŨ","gŨũpũŪu","Ūūgū(","ŬŭxŭŮkŮ","ůuůŰkŰű","vűŲaŲų","kųŴpŴŵe","ŵŶtŶŷg","ŷŸoŸŹgŹ","źpźŻvŻż",'"żŽqŽž',"hž*ſƀx","ƀƁkƁƂu","ƂƃkƃƄvƄ",'ƅ"ƅƆqƆƇ',"hƇ,ƈƉ","cƉƊeƊƋe","Ƌƌqƌƍw","ƍƎpƎƏvƏ","ƐaƐƑdƑƒ","cƒƓnƓƔ","cƔƕpƕƖe",'ƖƗgƗƘ"',"Ƙƙiƙƚtƚ","ƛgƛƜcƜƝ","vƝƞgƞƟ",'tƟƠ"Ơơv',"ơƢjƢƣc","ƣƤpƤ.ƥ","ƦcƦƧeƧƨ","eƨƩqƩƪ","wƪƫpƫƬv","ƬƭaƭƮd","ƮƯcƯưnư","ƱcƱƲpƲƳ","eƳƴgƴƵ",'"ƵƶuƶƷo',"ƷƸcƸƹn","ƹƺnƺƻgƻ",'ƼtƼƽ"ƽƾ',"vƾƿjƿǀ","cǀǁpǁ0","ǂǃcǃǄe","Ǆǅeǅǆqǆ","ǇwǇǈpǈǉ","vǉǊaǊǋ","uǋǌgǌǍv","ǍǎvǎǏn","ǏǐgǐǑfǑ","2ǒǓs:Ǔǔ",'K&ǔǕC"ǕǗe3ǖ',"ǘg4ǗǖǗǘ","ǘǯǙǚ","o8ǚǛK&ǛǜK&ǜ","ǞW,ǝǟg4Ǟǝ","Ǟǟǟǯ",'ǠǡI%ǡǢC"Ǣ',"Ǥs:ǣǥg4Ǥǣ","Ǥǥǥǯ","ǦǧG$ǧǨs:Ǩ","ǩG$ǩǪY-ǪǬK&","ǫǭg4ǬǫǬ","ǭǭǯǮ","ǒǮǙǮ","ǠǮǦǯ","4ǰǱM'Ǳǲ","_0ǲǳe3ǳ6Ǵ","ǵg4ǵǶK&ǶǷY-","ǷǸM'Ǹ8ǹǺ","O(Ǻǻe3ǻǼ_0Ǽ","ǽk6ǽǾa1Ǿȉa","ǿȀk6Ȁȁg4ȁȂ","K&Ȃȃe3ȃȊ","Ȅȅ]/ȅȆ_0Ȇȇ","I%ȇȈK&ȈȊ","ȉǿȉȄ","ȊȋȋȌa","ȌȍHȍ:","Ȏȏe3ȏȐK&Ȑȑ","O(ȑȒS*Ȓȓg4ȓȔ","i5ȔȕK&ȕȖe3Ȗ","ȗK&ȗȘI%Șșa","șȚk6Țțg4țȜ","K&Ȝȝe3ȝȞg4Ȟ","<ȟȠa1Ƞȡ","k6ȡȢE#ȢȣY-ȣȤ","S*ȤȥG$ȥ>","Ȧȧi5ȧȨK&Ȩȩ","e3ȩȪ[.ȪȫS*ȫȬ",']/ȬȭC"ȭȮi5',"ȮȯK&ȯ@Ȱȱ","\vȱBȲȳ","\tȳDȴȵ\t","ȵFȶȷ\t","ȷHȸȹ\t","ȹJȺȻ\tȻ","LȼȽ\tȽN","Ⱦȿ\t\bȿP","ɀɁ\t\tɁRɂ","Ƀ\t\nɃTɄɅ\t","\vɅVɆɇ\t\f","ɇXɈɉ\t\rɉ","ZɊɋ\tɋ\\","Ɍɍ\tɍ^","Ɏɏ\tɏ`","ɐɑ\tɑb","ɒɓ\tɓdɔ","ɕ\tɕfɖɗ","\tɗhɘə\t","əjɚɛ\t","ɛlɜɝ\t","ɝnɞɟ\tɟ","pɠɡ\tɡr","ɢɣ\tɣt","ɤɥ\tɥv","ɦɧ\tɧx","ɨɩ\tɩzɪ","ɫ\tɫ|ɬɭ","\tɭ~ɮɰ\t ","ɯɮɰɱ","ɱɯɱɲ","ɲɳɴ3","ɴɵ\t!ɵɶIɶ","ɷɻ}?ɸɻ","0ɹɻw<ɺɷ","ɺɸɺɹ","ɻɼɼɺ","ɼɽɽɾ","ɾʂBɿʃ}?","ʀʃ0ʁʃw<ʂɿ","ʂʀʂʁ","ʃʄʄʂ","ʄʅʅ","ʆʇhʇʈ","Hʈʉʊ","w<ʊʋw<ʋ","ʌʍDʍʎ<","ʎʑDʏʐ<ʐ","ʒDʑʏʑ","ʒʒʓ","ʕw<ʔʓʕʖ","ʖʔʖʗ","ʗʘʙ","Jʙʚ/ʚʛ","Dʛʜ/ʜʝ","Dʝʞʡ}?","ʟʡw<ʠʞʠ","ʟʡʢʢ","ʠʢʣʣ","ʤʥw<ʥʦ","w<ʦʧw<ʧʨw<ʨ","ʩw<ʩʪw<ʪʫw<","ʫʬw<ʬʭw<ʭ","ʮʯw<ʯʰw<","ʰʱw<ʱʲw<ʲ",'ʳʵ\t"ʴʳ',"ʵʶʶʴ","ʶʷʷʸ","ʸʹ\bKʹ","ǗǞǤǬǮȉɱɺɼ","ʂʄʑʖʠʢʶ\b"].join(""),a=(new i.atn.ATNDeserializer).deserialize(o),s=a.decisionToState.map(function(t,e){return new i.dfa.DFA(t,e)});(r.prototype=Object.create(i.Lexer.prototype)).constructor=r,Object.defineProperty(r.prototype,"atn",{get:function(){return a}}),r.EOF=i.Token.EOF,r.T__0=1,r.T__1=2,r.T__2=3,r.T__3=4,r.T__4=5,r.T__5=6,r.T__6=7,r.T__7=8,r.T__8=9,r.T__9=10,r.T__10=11,r.T__11=12,r.T__12=13,r.T__13=14,r.T__14=15,r.T__15=16,r.T__16=17,r.T__17=18,r.T__18=19,r.T__19=20,r.T__20=21,r.T__21=22,r.T__22=23,r.T__23=24,r.TIMEUNIT=25,r.FOR=26,r.SELF=27,r.GROUPUSER=28,r.REGISTERED_USERS=29,r.PUBLIC=30,r.TERMINATE=31,r.ID=32,r.MOBILEPHONE=33,r.EMAIL=34,r.FEATHERACCOUNT=35,r.TWO_DIGITS=36,r.HOUR=37,r.INTEGER_NUMBER=38,r.DATE=39,r.ALPHANUMERIC=40,r.NIGHT_DIGITS=41,r.FOUR_DIGITS=42,r.WS=43,r.prototype.channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"],r.prototype.modeNames=["DEFAULT_MODE"],r.prototype.literalNames=[null,"':'","','","'in'","'initial'","'<initial>'","'proceed to'","'on'","'and'","'end of'","'at'","'after'","'of contract creation'","'price priceExpression'","'receiving transaction of'","'to'","'contract_guaranty of'","'refund after'","'receiving platform_guaranty of'","'accepting license'","'visit_increment of'","'visit of'","'account_balance greater than'","'account_balance smaller than'","'account_settled'"],r.prototype.symbolicNames=[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"TIMEUNIT","FOR","SELF","GROUPUSER","REGISTERED_USERS","PUBLIC","TERMINATE","ID","MOBILEPHONE","EMAIL","FEATHERACCOUNT","TWO_DIGITS","HOUR","INTEGER_NUMBER","DATE","ALPHANUMERIC","NIGHT_DIGITS","FOUR_DIGITS","WS"],r.prototype.ruleNames=["T__0","T__1","T__2","T__3","T__4","T__5","T__6","T__7","T__8","T__9","T__10","T__11","T__12","T__13","T__14","T__15","T__16","T__17","T__18","T__19","T__20","T__21","T__22","T__23","TIMEUNIT","FOR","SELF","GROUPUSER","REGISTERED_USERS","PUBLIC","TERMINATE","CHAR","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","DIGIT","LOWERCASE","UPPERCASE","ALPHA","ID","MOBILEPHONE","EMAIL","FEATHERACCOUNT","TWO_DIGITS","HOUR","INTEGER_NUMBER","DATE","ALPHANUMERIC","NIGHT_DIGITS","FOUR_DIGITS","WS"],r.prototype.grammarFileName="presentablePolicy.g4",e.presentablePolicyLexer=r},wMEt:function(t,e,n){function r(t){return t.hashCodeForConfigSet()}function i(t,e){return t===e||null!==t&&null!==e&&t.equalsForConfigSet(e)}function o(t){return this.configLookup=new l(r,i),this.fullCtx=void 0===t||t,this.readOnly=!1,this.configs=[],this.uniqueAlt=0,this.conflictingAlts=null,this.hasSemanticContext=!1,this.dipsIntoOuterContext=!1,this.cachedHashCode=-1,this}function a(){return o.call(this),this.configLookup=new l,this}var s=n("7y1Z").ATN,u=n("bz+k"),c=u.Hash,l=u.Set,h=n("wQJ6").SemanticContext,p=n("YFoD").merge;o.prototype.add=function(t,e){if(void 0===e&&(e=null),this.readOnly)throw"This set is readonly";t.semanticContext!==h.NONE&&(this.hasSemanticContext=!0),t.reachesIntoOuterContext>0&&(this.dipsIntoOuterContext=!0);var n=this.configLookup.add(t);if(n===t)return this.cachedHashCode=-1,this.configs.push(t),!0;var r=!this.fullCtx,i=p(n.context,t.context,r,e);return n.reachesIntoOuterContext=Math.max(n.reachesIntoOuterContext,t.reachesIntoOuterContext),t.precedenceFilterSuppressed&&(n.precedenceFilterSuppressed=!0),n.context=i,!0},o.prototype.getStates=function(){for(var t=new l,e=0;e<this.configs.length;e++)t.add(this.configs[e].state);return t},o.prototype.getPredicates=function(){for(var t=[],e=0;e<this.configs.length;e++){var n=this.configs[e].semanticContext;n!==h.NONE&&t.push(n.semanticContext)}return t},Object.defineProperty(o.prototype,"items",{get:function(){return this.configs}}),o.prototype.optimizeConfigs=function(t){if(this.readOnly)throw"This set is readonly";if(0!==this.configLookup.length)for(var e=0;e<this.configs.length;e++){var n=this.configs[e];n.context=t.getCachedContext(n.context)}},o.prototype.addAll=function(t){for(var e=0;e<t.length;e++)this.add(t[e]);return!1},o.prototype.equals=function(t){return this===t||t instanceof o&&u.equalArrays(this.configs,t.configs)&&this.fullCtx===t.fullCtx&&this.uniqueAlt===t.uniqueAlt&&this.conflictingAlts===t.conflictingAlts&&this.hasSemanticContext===t.hasSemanticContext&&this.dipsIntoOuterContext===t.dipsIntoOuterContext},o.prototype.hashCode=function(){var t=new c;return this.updateHashCode(t),t.finish()},o.prototype.updateHashCode=function(t){if(this.readOnly){if(-1===this.cachedHashCode){(t=new c).update(this.configs),this.cachedHashCode=t.finish()}t.update(this.cachedHashCode)}else t.update(this.configs)},Object.defineProperty(o.prototype,"length",{get:function(){return this.configs.length}}),o.prototype.isEmpty=function(){return 0===this.configs.length},o.prototype.contains=function(t){if(null===this.configLookup)throw"This method is not implemented for readonly sets.";return this.configLookup.contains(t)},o.prototype.containsFast=function(t){if(null===this.configLookup)throw"This method is not implemented for readonly sets.";return this.configLookup.containsFast(t)},o.prototype.clear=function(){if(this.readOnly)throw"This set is readonly";this.configs=[],this.cachedHashCode=-1,this.configLookup=new l},o.prototype.setReadonly=function(t){this.readOnly=t,t&&(this.configLookup=null)},o.prototype.toString=function(){return u.arrayToString(this.configs)+(this.hasSemanticContext?",hasSemanticContext="+this.hasSemanticContext:"")+(this.uniqueAlt!==s.INVALID_ALT_NUMBER?",uniqueAlt="+this.uniqueAlt:"")+(null!==this.conflictingAlts?",conflictingAlts="+this.conflictingAlts:"")+(this.dipsIntoOuterContext?",dipsIntoOuterContext":"")},(a.prototype=Object.create(o.prototype)).constructor=a,e.ATNConfigSet=o,e.OrderedATNConfigSet=a},wQJ6:function(t,e,n){function r(){return this}function i(t,e,n){return r.call(this),this.ruleIndex=void 0===t?-1:t,this.predIndex=void 0===e?-1:e,this.isCtxDependent=void 0!==n&&n,this}function o(t){r.call(this),this.precedence=void 0===t?0:t}function a(t,e){r.call(this);var n=new u;t instanceof a?t.opnds.map(function(t){n.add(t)}):n.add(t),e instanceof a?e.opnds.map(function(t){n.add(t)}):n.add(e);var i=o.filterPrecedencePredicates(n);if(i.length>0){var s=null;i.map(function(t){(null===s||t.precedence<s.precedence)&&(s=t)}),n.add(s)}return this.opnds=n.values(),this}function s(t,e){r.call(this);var n=new u;t instanceof s?t.opnds.map(function(t){n.add(t)}):n.add(t),e instanceof s?e.opnds.map(function(t){n.add(t)}):n.add(e);var i=o.filterPrecedencePredicates(n);if(i.length>0){var a=i.sort(function(t,e){return t.compareTo(e)}),c=a[a.length-1];n.add(c)}return this.opnds=n.values(),this}var u=n("bz+k").Set,c=n("bz+k").Hash;r.prototype.hashCode=function(){var t=new c;return this.updateHashCode(t),t.finish()},r.prototype.evaluate=function(t,e){},r.prototype.evalPrecedence=function(t,e){return this},r.andContext=function(t,e){if(null===t||t===r.NONE)return e;if(null===e||e===r.NONE)return t;var n=new a(t,e);return 1===n.opnds.length?n.opnds[0]:n},r.orContext=function(t,e){if(null===t)return e;if(null===e)return t;if(t===r.NONE||e===r.NONE)return r.NONE;var n=new s(t,e);return 1===n.opnds.length?n.opnds[0]:n},(i.prototype=Object.create(r.prototype)).constructor=i,r.NONE=new i,i.prototype.evaluate=function(t,e){var n=this.isCtxDependent?e:null;return t.sempred(n,this.ruleIndex,this.predIndex)},i.prototype.updateHashCode=function(t){t.update(this.ruleIndex,this.predIndex,this.isCtxDependent)},i.prototype.equals=function(t){return this===t||t instanceof i&&(this.ruleIndex===t.ruleIndex&&this.predIndex===t.predIndex&&this.isCtxDependent===t.isCtxDependent)},i.prototype.toString=function(){return"{"+this.ruleIndex+":"+this.predIndex+"}?"},(o.prototype=Object.create(r.prototype)).constructor=o,o.prototype.evaluate=function(t,e){return t.precpred(e,this.precedence)},o.prototype.evalPrecedence=function(t,e){return t.precpred(e,this.precedence)?r.NONE:null},o.prototype.compareTo=function(t){return this.precedence-t.precedence},o.prototype.updateHashCode=function(t){t.update(31)},o.prototype.equals=function(t){return this===t||t instanceof o&&this.precedence===t.precedence},o.prototype.toString=function(){return"{"+this.precedence+">=prec}?"},o.filterPrecedencePredicates=function(t){var e=[];return t.values().map(function(t){t instanceof o&&e.push(t)}),e},(a.prototype=Object.create(r.prototype)).constructor=a,a.prototype.equals=function(t){return this===t||t instanceof a&&this.opnds===t.opnds},a.prototype.updateHashCode=function(t){t.update(this.opnds,"AND")},a.prototype.evaluate=function(t,e){for(var n=0;n<this.opnds.length;n++)if(!this.opnds[n].evaluate(t,e))return!1;return!0},a.prototype.evalPrecedence=function(t,e){for(var n=!1,i=[],o=0;o<this.opnds.length;o++){var a=this.opnds[o],s=a.evalPrecedence(t,e);if(n|=s!==a,null===s)return null;s!==r.NONE&&i.push(s)}if(!n)return this;if(0===i.length)return r.NONE;var u=null;return i.map(function(t){u=null===u?t:r.andContext(u,t)}),u},a.prototype.toString=function(){var t="";return this.opnds.map(function(e){t+="&& "+e.toString()}),t.length>3?t.slice(3):t},(s.prototype=Object.create(r.prototype)).constructor=s,s.prototype.constructor=function(t){return this===t||t instanceof s&&this.opnds===t.opnds},s.prototype.updateHashCode=function(t){t.update(this.opnds,"OR")},s.prototype.evaluate=function(t,e){for(var n=0;n<this.opnds.length;n++)if(this.opnds[n].evaluate(t,e))return!0;return!1},s.prototype.evalPrecedence=function(t,e){for(var n=!1,i=[],o=0;o<this.opnds.length;o++){var a=this.opnds[o],s=a.evalPrecedence(t,e);if(n|=s!==a,s===r.NONE)return r.NONE;null!==s&&i.push(s)}if(!n)return this;if(0===i.length)return null;return i.map(function(t){return t}),null},s.prototype.toString=function(){var t="";return this.opnds.map(function(e){t+="|| "+e.toString()}),t.length>3?t.slice(3):t},e.SemanticContext=r,e.PrecedencePredicate=o,e.Predicate=i},wf8X:function(t,e,n){function r(t,e){var n=o.readFileSync(t,"utf8");return i.call(this,n,e),this.fileName=t,this}var i=n("4iSB").InputStream,o="undefined"==typeof window&&"undefined"==typeof importScripts?n("Ya8g"):null;(r.prototype=Object.create(i.prototype)).constructor=r,e.FileStream=r},x18q:function(t,e,n){},y2Ps:function(t,e,n){e.RecognitionException=n("5d5Q").RecognitionException,e.NoViableAltException=n("5d5Q").NoViableAltException,e.LexerNoViableAltException=n("5d5Q").LexerNoViableAltException,e.InputMismatchException=n("5d5Q").InputMismatchException,e.FailedPredicateException=n("5d5Q").FailedPredicateException,e.DiagnosticErrorListener=n("B0bK").DiagnosticErrorListener,e.BailErrorStrategy=n("k1zP").BailErrorStrategy,e.ErrorListener=n("qFmK").ErrorListener},yEAX:function(t,e,n){function r(t,e){if(null===t){var n={state:null,alt:null,context:null,semanticContext:null};return e&&(n.reachesIntoOuterContext=0),n}var r={};return r.state=t.state||null,r.alt=void 0===t.alt?null:t.alt,r.context=t.context||null,r.semanticContext=t.semanticContext||null,e&&(r.reachesIntoOuterContext=t.reachesIntoOuterContext||0,r.precedenceFilterSuppressed=t.precedenceFilterSuppressed||!1),r}function i(t,e){return this.checkContext(t,e),t=r(t),e=r(e,!0),this.state=null!==t.state?t.state:e.state,this.alt=null!==t.alt?t.alt:e.alt,this.context=null!==t.context?t.context:e.context,this.semanticContext=null!==t.semanticContext?t.semanticContext:null!==e.semanticContext?e.semanticContext:s.NONE,this.reachesIntoOuterContext=e.reachesIntoOuterContext,this.precedenceFilterSuppressed=e.precedenceFilterSuppressed,this}function o(t,e){i.call(this,t,e);var n=t.lexerActionExecutor||null;return this.lexerActionExecutor=n||(null!==e?e.lexerActionExecutor:null),this.passedThroughNonGreedyDecision=null!==e&&this.checkNonGreedyDecision(e,this.state),this}var a=n("j0Qz").DecisionState,s=n("wQJ6").SemanticContext,u=n("bz+k").Hash;i.prototype.checkContext=function(t,e){null!==t.context&&void 0!==t.context||null!==e&&null!==e.context&&void 0!==e.context||(this.context=null)},i.prototype.hashCode=function(){var t=new u;return this.updateHashCode(t),t.finish()},i.prototype.updateHashCode=function(t){t.update(this.state.stateNumber,this.alt,this.context,this.semanticContext)},i.prototype.equals=function(t){return this===t||t instanceof i&&(this.state.stateNumber===t.state.stateNumber&&this.alt===t.alt&&(null===this.context?null===t.context:this.context.equals(t.context))&&this.semanticContext.equals(t.semanticContext)&&this.precedenceFilterSuppressed===t.precedenceFilterSuppressed)},i.prototype.hashCodeForConfigSet=function(){var t=new u;return t.update(this.state.stateNumber,this.alt,this.semanticContext),t.finish()},i.prototype.equalsForConfigSet=function(t){return this===t||t instanceof i&&(this.state.stateNumber===t.state.stateNumber&&this.alt===t.alt&&this.semanticContext.equals(t.semanticContext))},i.prototype.toString=function(){return"("+this.state+","+this.alt+(null!==this.context?",["+this.context.toString()+"]":"")+(this.semanticContext!==s.NONE?","+this.semanticContext.toString():"")+(this.reachesIntoOuterContext>0?",up="+this.reachesIntoOuterContext:"")+")"},(o.prototype=Object.create(i.prototype)).constructor=o,o.prototype.updateHashCode=function(t){t.update(this.state.stateNumber,this.alt,this.context,this.semanticContext,this.passedThroughNonGreedyDecision,this.lexerActionExecutor)},o.prototype.equals=function(t){return this===t||t instanceof o&&this.passedThroughNonGreedyDecision==t.passedThroughNonGreedyDecision&&(this.lexerActionExecutor?this.lexerActionExecutor.equals(t.lexerActionExecutor):!t.lexerActionExecutor)&&i.prototype.equals.call(this,t)},o.prototype.hashCodeForConfigSet=o.prototype.hashCode,o.prototype.equalsForConfigSet=o.prototype.equals,o.prototype.checkNonGreedyDecision=function(t,e){return t.passedThroughNonGreedyDecision||e instanceof a&&e.nonGreedy},e.ATNConfig=i,e.LexerATNConfig=o}},["XTzU"]);