UNPKG

compound-ex4

Version:

Compound-ex4 - MVC framework for NodeJS (ExpressJs 4 version), fork compoundjs(https://github.com/1602/compound)

1 lines 133 kB
(function(){var root=this,modules,require_from,register,error;if(typeof global=="undefined"){var global;typeof window!="undefined"?global=window:global={}}modules={},require_from=function(parent,from){return function(name){return modules[from]&&modules[from][name]?(modules[from][name].parent=parent,modules[from][name].initialize&&modules[from][name].initialize(),modules[from][name].exports):error(name,from)}},register=function(names,directory,callback){var module={exports:{},initialize:function(){callback.call(module.exports,global,module,module.exports,require_from(module,directory),undefined),delete module.initialize},parent:null};for(var from in names){modules[from]=modules[from]||{};for(var j in names[from]){var name=names[from][j];modules[from][name]=module}}},error=function anonymous(name,from){var message="Warn: could not find module "+name;console.log(message)},register({0:["./events"]},0,function(global,module,exports,require,window){(function(){var extend=function(child,parent){for(var key in parent)hasProp.call(parent,key)&&(child[key]=parent[key]);function ctor(){this.constructor=child}return ctor.prototype=parent.prototype,child.prototype=new ctor,child.__super__=parent.prototype,child},hasProp={}.hasOwnProperty;this.Event=function(){function Event(start_mark,end_mark){this.start_mark=start_mark,this.end_mark=end_mark}return Event}(),this.NodeEvent=function(superClass){extend(NodeEvent,superClass);function NodeEvent(anchor,start_mark,end_mark){this.anchor=anchor,this.start_mark=start_mark,this.end_mark=end_mark}return NodeEvent}(this.Event),this.CollectionStartEvent=function(superClass){extend(CollectionStartEvent,superClass);function CollectionStartEvent(anchor,tag,implicit,start_mark,end_mark,flow_style){this.anchor=anchor,this.tag=tag,this.implicit=implicit,this.start_mark=start_mark,this.end_mark=end_mark,this.flow_style=flow_style}return CollectionStartEvent}(this.NodeEvent),this.CollectionEndEvent=function(superClass){extend(CollectionEndEvent,superClass);function CollectionEndEvent(){return CollectionEndEvent.__super__.constructor.apply(this,arguments)}return CollectionEndEvent}(this.Event),this.StreamStartEvent=function(superClass){extend(StreamStartEvent,superClass);function StreamStartEvent(start_mark,end_mark,encoding){this.start_mark=start_mark,this.end_mark=end_mark,this.encoding=encoding}return StreamStartEvent}(this.Event),this.StreamEndEvent=function(superClass){extend(StreamEndEvent,superClass);function StreamEndEvent(){return StreamEndEvent.__super__.constructor.apply(this,arguments)}return StreamEndEvent}(this.Event),this.DocumentStartEvent=function(superClass){extend(DocumentStartEvent,superClass);function DocumentStartEvent(start_mark,end_mark,explicit,version,tags){this.start_mark=start_mark,this.end_mark=end_mark,this.explicit=explicit,this.version=version,this.tags=tags}return DocumentStartEvent}(this.Event),this.DocumentEndEvent=function(superClass){extend(DocumentEndEvent,superClass);function DocumentEndEvent(start_mark,end_mark,explicit){this.start_mark=start_mark,this.end_mark=end_mark,this.explicit=explicit}return DocumentEndEvent}(this.Event),this.AliasEvent=function(superClass){extend(AliasEvent,superClass);function AliasEvent(){return AliasEvent.__super__.constructor.apply(this,arguments)}return AliasEvent}(this.NodeEvent),this.ScalarEvent=function(superClass){extend(ScalarEvent,superClass);function ScalarEvent(anchor,tag,implicit,value,start_mark,end_mark,style){this.anchor=anchor,this.tag=tag,this.implicit=implicit,this.value=value,this.start_mark=start_mark,this.end_mark=end_mark,this.style=style}return ScalarEvent}(this.NodeEvent),this.SequenceStartEvent=function(superClass){extend(SequenceStartEvent,superClass);function SequenceStartEvent(){return SequenceStartEvent.__super__.constructor.apply(this,arguments)}return SequenceStartEvent}(this.CollectionStartEvent),this.SequenceEndEvent=function(superClass){extend(SequenceEndEvent,superClass);function SequenceEndEvent(){return SequenceEndEvent.__super__.constructor.apply(this,arguments)}return SequenceEndEvent}(this.CollectionEndEvent),this.MappingStartEvent=function(superClass){extend(MappingStartEvent,superClass);function MappingStartEvent(){return MappingStartEvent.__super__.constructor.apply(this,arguments)}return MappingStartEvent}(this.CollectionStartEvent),this.MappingEndEvent=function(superClass){extend(MappingEndEvent,superClass);function MappingEndEvent(){return MappingEndEvent.__super__.constructor.apply(this,arguments)}return MappingEndEvent}(this.CollectionEndEvent)}).call(this)}),register({0:["./errors"]},0,function(global,module,exports,require,window){(function(){var indexOf=[].indexOf||function(item){for(var i=0,l=this.length;i<l;i++)if(i in this&&this[i]===item)return i;return-1},extend=function(child,parent){for(var key in parent)hasProp.call(parent,key)&&(child[key]=parent[key]);function ctor(){this.constructor=child}return ctor.prototype=parent.prototype,child.prototype=new ctor,child.__super__=parent.prototype,child},hasProp={}.hasOwnProperty;this.Mark=function(){function Mark(line,column,buffer,pointer){this.line=line,this.column=column,this.buffer=buffer,this.pointer=pointer}return Mark.prototype.get_snippet=function(indent,max_length){var break_chars,end,head,ref,ref1,start,tail;indent==null&&(indent=4),max_length==null&&(max_length=75);if(this.buffer==null)return null;break_chars="\0\r\n…\u2028\u2029",head="",start=this.pointer;while(start>0&&(ref=this.buffer[start-1],indexOf.call(break_chars,ref)<0)){start--;if(this.pointer-start>max_length/2-1){head=" ... ",start+=5;break}}tail="",end=this.pointer;while(end<this.buffer.length&&(ref1=this.buffer[end],indexOf.call(break_chars,ref1)<0)){end++;if(end-this.pointer>max_length/2-1){tail=" ... ",end-=5;break}}return""+(new Array(indent)).join(" ")+head+this.buffer.slice(start,end)+tail+"\n"+(new Array(indent+this.pointer-start+head.length)).join(" ")+"^"},Mark.prototype.toString=function(){var snippet,where;return snippet=this.get_snippet(),where=" on line "+(this.line+1)+", column "+(this.column+1),snippet?where:where+":\n"+snippet},Mark}(),this.YAMLError=function(superClass){extend(YAMLError,superClass);function YAMLError(message){this.message=message,YAMLError.__super__.constructor.call(this),this.stack=this.toString()+"\n"+(new Error).stack.split("\n").slice(1).join("\n")}return YAMLError.prototype.toString=function(){return this.message},YAMLError}(Error),this.MarkedYAMLError=function(superClass){extend(MarkedYAMLError,superClass);function MarkedYAMLError(context,context_mark,problem,problem_mark,note){this.context=context,this.context_mark=context_mark,this.problem=problem,this.problem_mark=problem_mark,this.note=note,MarkedYAMLError.__super__.constructor.call(this)}return MarkedYAMLError.prototype.toString=function(){var lines;return lines=[],this.context!=null&&lines.push(this.context),this.context_mark!=null&&(this.problem==null||this.problem_mark==null||this.context_mark.line!==this.problem_mark.line||this.context_mark.column!==this.problem_mark.column)&&lines.push(this.context_mark.toString()),this.problem!=null&&lines.push(this.problem),this.problem_mark!=null&&lines.push(this.problem_mark.toString()),this.note!=null&&lines.push(this.note),lines.join("\n")},MarkedYAMLError}(this.YAMLError)}).call(this)}),register({0:["./nodes"]},0,function(global,module,exports,require,window){(function(){var unique_id,extend=function(child,parent){for(var key in parent)hasProp.call(parent,key)&&(child[key]=parent[key]);function ctor(){this.constructor=child}return ctor.prototype=parent.prototype,child.prototype=new ctor,child.__super__=parent.prototype,child},hasProp={}.hasOwnProperty;unique_id=0,this.Node=function(){function Node(tag,value,start_mark,end_mark){this.tag=tag,this.value=value,this.start_mark=start_mark,this.end_mark=end_mark,this.unique_id="node_"+unique_id++}return Node}(),this.ScalarNode=function(superClass){extend(ScalarNode,superClass),ScalarNode.prototype.id="scalar";function ScalarNode(tag,value,start_mark,end_mark,style){this.tag=tag,this.value=value,this.start_mark=start_mark,this.end_mark=end_mark,this.style=style,ScalarNode.__super__.constructor.apply(this,arguments)}return ScalarNode}(this.Node),this.CollectionNode=function(superClass){extend(CollectionNode,superClass);function CollectionNode(tag,value,start_mark,end_mark,flow_style){this.tag=tag,this.value=value,this.start_mark=start_mark,this.end_mark=end_mark,this.flow_style=flow_style,CollectionNode.__super__.constructor.apply(this,arguments)}return CollectionNode}(this.Node),this.SequenceNode=function(superClass){extend(SequenceNode,superClass);function SequenceNode(){return SequenceNode.__super__.constructor.apply(this,arguments)}return SequenceNode.prototype.id="sequence",SequenceNode}(this.CollectionNode),this.MappingNode=function(superClass){extend(MappingNode,superClass);function MappingNode(){return MappingNode.__super__.constructor.apply(this,arguments)}return MappingNode.prototype.id="mapping",MappingNode}(this.CollectionNode)}).call(this)}),register({0:["./composer"]},0,function(global,module,exports,require,window){(function(){var MarkedYAMLError,events,nodes,extend=function(child,parent){for(var key in parent)hasProp.call(parent,key)&&(child[key]=parent[key]);function ctor(){this.constructor=child}return ctor.prototype=parent.prototype,child.prototype=new ctor,child.__super__=parent.prototype,child},hasProp={}.hasOwnProperty;events=require("./events"),MarkedYAMLError=require("./errors").MarkedYAMLError,nodes=require("./nodes"),this.ComposerError=function(superClass){extend(ComposerError,superClass);function ComposerError(){return ComposerError.__super__.constructor.apply(this,arguments)}return ComposerError}(MarkedYAMLError),this.Composer=function(){function Composer(){this.anchors={}}return Composer.prototype.check_node=function(){return this.check_event(events.StreamStartEvent)&&this.get_event(),!this.check_event(events.StreamEndEvent)},Composer.prototype.get_node=function(){if(!this.check_event(events.StreamEndEvent))return this.compose_document()},Composer.prototype.get_single_node=function(){var document,event;this.get_event(),document=null,this.check_event(events.StreamEndEvent)||(document=this.compose_document());if(!this.check_event(events.StreamEndEvent))throw event=this.get_event(),new exports.ComposerError("expected a single document in the stream",document.start_mark,"but found another document",event.start_mark);return this.get_event(),document},Composer.prototype.compose_document=function(){var node;return this.get_event(),node=this.compose_node(),this.get_event(),this.anchors={},node},Composer.prototype.compose_node=function(parent,index){var anchor,event,node;if(this.check_event(events.AliasEvent)){event=this.get_event(),anchor=event.anchor;if(anchor in this.anchors)return this.anchors[anchor];throw new exports.ComposerError(null,null,"found undefined alias "+anchor,event.start_mark)}event=this.peek_event(),anchor=event.anchor;if(anchor!==null&&anchor in this.anchors)throw new exports.ComposerError("found duplicate anchor "+anchor+"; first occurence",this.anchors[anchor].start_mark,"second occurrence",event.start_mark);return this.descend_resolver(parent,index),this.check_event(events.ScalarEvent)?node=this.compose_scalar_node(anchor):this.check_event(events.SequenceStartEvent)?node=this.compose_sequence_node(anchor):this.check_event(events.MappingStartEvent)&&(node=this.compose_mapping_node(anchor)),this.ascend_resolver(),node},Composer.prototype.compose_scalar_node=function(anchor){var event,node,tag;event=this.get_event(),tag=event.tag;if(tag===null||tag==="!")tag=this.resolve(nodes.ScalarNode,event.value,event.implicit);return node=new nodes.ScalarNode(tag,event.value,event.start_mark,event.end_mark,event.style),anchor!==null&&(this.anchors[anchor]=node),node},Composer.prototype.compose_sequence_node=function(anchor){var end_event,index,node,start_event,tag;start_event=this.get_event(),tag=start_event.tag;if(tag===null||tag==="!")tag=this.resolve(nodes.SequenceNode,null,start_event.implicit);node=new nodes.SequenceNode(tag,[],start_event.start_mark,null,start_event.flow_style),anchor!==null&&(this.anchors[anchor]=node),index=0;while(!this.check_event(events.SequenceEndEvent))node.value.push(this.compose_node(node,index)),index++;return end_event=this.get_event(),node.end_mark=end_event.end_mark,node},Composer.prototype.compose_mapping_node=function(anchor){var end_event,item_key,item_value,node,start_event,tag;start_event=this.get_event(),tag=start_event.tag;if(tag===null||tag==="!")tag=this.resolve(nodes.MappingNode,null,start_event.implicit);node=new nodes.MappingNode(tag,[],start_event.start_mark,null,start_event.flow_style),anchor!==null&&(this.anchors[anchor]=node);while(!this.check_event(events.MappingEndEvent))item_key=this.compose_node(node),item_value=this.compose_node(node,item_key),node.value.push([item_key,item_value]);return end_event=this.get_event(),node.end_mark=end_event.end_mark,node},Composer}()}).call(this)}),register({0:["./util"]},0,function(global,module,exports,require,window){(function(){var ref,ref1,ref2,slice=[].slice,hasProp={}.hasOwnProperty;this.StringStream=function(){function StringStream(){this.string=""}return StringStream.prototype.write=function(chunk){return this.string+=chunk},StringStream}(),this.clone=function(_this){return function(obj){return _this.extend({},obj)}}(this),this.extend=function(){var destination,i,k,len,source,sources,v;destination=arguments[0],sources=2<=arguments.length?slice.call(arguments,1):[];for(i=0,len=sources.length;i<len;i++){source=sources[i];for(k in source)v=source[k],destination[k]=v}return destination},this.is_empty=function(obj){var key;if(Array.isArray(obj)||typeof obj=="string")return obj.length===0;for(key in obj){if(!hasProp.call(obj,key))continue;return!1}return!0},this.inspect=(ref=(ref1=(ref2=require("util"))!=null?ref2.inspect:void 0)!=null?ref1:global.inspect)!=null?ref:function(a){return""+a},this.pad_left=function(str,char,length){return str=String(str),str.length>=length?str:str.length+1===length?""+char+str:""+(new Array(length-str.length+1)).join(char)+str},this.to_hex=function(num){return typeof num=="string"&&(num=num.charCodeAt(0)),num.toString(16)}}).call(this)}),register({0:["./constructor"]},0,function(global,module,exports,require,window){(function(){var MarkedYAMLError,nodes,util,extend=function(child,parent){for(var key in parent)hasProp.call(parent,key)&&(child[key]=parent[key]);function ctor(){this.constructor=child}return ctor.prototype=parent.prototype,child.prototype=new ctor,child.__super__=parent.prototype,child},hasProp={}.hasOwnProperty,indexOf=[].indexOf||function(item){for(var i=0,l=this.length;i<l;i++)if(i in this&&this[i]===item)return i;return-1};MarkedYAMLError=require("./errors").MarkedYAMLError,nodes=require("./nodes"),util=require("./util"),this.ConstructorError=function(superClass){extend(ConstructorError,superClass);function ConstructorError(){return ConstructorError.__super__.constructor.apply(this,arguments)}return ConstructorError}(MarkedYAMLError),this.BaseConstructor=function(){BaseConstructor.prototype.yaml_constructors={},BaseConstructor.prototype.yaml_multi_constructors={},BaseConstructor.add_constructor=function(tag,constructor){return this.prototype.hasOwnProperty("yaml_constructors")||(this.prototype.yaml_constructors=util.extend({},this.prototype.yaml_constructors)),this.prototype.yaml_constructors[tag]=constructor},BaseConstructor.add_multi_constructor=function(tag_prefix,multi_constructor){return this.prototype.hasOwnProperty("yaml_multi_constructors")||(this.prototype.yaml_multi_constructors=util.extend({},this.prototype.yaml_multi_constructors)),this.prototype.yaml_multi_constructors[tag_prefix]=multi_constructor};function BaseConstructor(){this.constructed_objects={},this.constructing_nodes=[],this.deferred_constructors=[]}return BaseConstructor.prototype.check_data=function(){return this.check_node()},BaseConstructor.prototype.get_data=function(){if(this.check_node())return this.construct_document(this.get_node())},BaseConstructor.prototype.get_single_data=function(){var node;return node=this.get_single_node(),node!=null?this.construct_document(node):null},BaseConstructor.prototype.construct_document=function(node){var data;data=this.construct_object(node);while(!util.is_empty(this.deferred_constructors))this.deferred_constructors.pop()();return data},BaseConstructor.prototype.defer=function(f){return this.deferred_constructors.push(f)},BaseConstructor.prototype.construct_object=function(node){var constructor,object,ref,tag_prefix,tag_suffix;if(node.unique_id in this.constructed_objects)return this.constructed_objects[node.unique_id];if(ref=node.unique_id,indexOf.call(this.constructing_nodes,ref)>=0)throw new exports.ConstructorError(null,null,"found unconstructable recursive node",node.start_mark);this.constructing_nodes.push(node.unique_id),constructor=null,tag_suffix=null;if(node.tag in this.yaml_constructors)constructor=this.yaml_constructors[node.tag];else{for(tag_prefix in this.yaml_multi_constructors)if(node.tag.indexOf(tag_prefix===0)){tag_suffix=node.tag.slice(tag_prefix.length),constructor=this.yaml_multi_constructors[tag_prefix];break}constructor==null&&(null in this.yaml_multi_constructors?(tag_suffix=node.tag,constructor=this.yaml_multi_constructors[null]):null in this.yaml_constructors?constructor=this.yaml_constructors[null]:node instanceof nodes.ScalarNode?constructor=this.construct_scalar:node instanceof nodes.SequenceNode?constructor=this.construct_sequence:node instanceof nodes.MappingNode&&(constructor=this.construct_mapping))}return object=constructor.call(this,tag_suffix!=null?tag_suffix:node,node),this.constructed_objects[node.unique_id]=object,this.constructing_nodes.pop(),object},BaseConstructor.prototype.construct_scalar=function(node){if(node instanceof nodes.ScalarNode)return node.value;throw new exports.ConstructorError(null,null,"expected a scalar node but found "+node.id,node.start_mark)},BaseConstructor.prototype.construct_sequence=function(node){var child,i,len,ref,results;if(node instanceof nodes.SequenceNode){ref=node.value,results=[];for(i=0,len=ref.length;i<len;i++)child=ref[i],results.push(this.construct_object(child));return results}throw new exports.ConstructorError(null,null,"expected a sequence node but found "+node.id,node.start_mark)},BaseConstructor.prototype.construct_mapping=function(node){var i,key,key_node,len,mapping,ref,ref1,value,value_node;if(node instanceof nodes.MappingNode){mapping={},ref=node.value;for(i=0,len=ref.length;i<len;i++){ref1=ref[i],key_node=ref1[0],value_node=ref1[1],key=this.construct_object(key_node);if(typeof key=="object")throw new exports.ConstructorError("while constructing a mapping",node.start_mark,"found unhashable key",key_node.start_mark);value=this.construct_object(value_node),mapping[key]=value}return mapping}throw new ConstructorError(null,null,"expected a mapping node but found "+node.id,node.start_mark)},BaseConstructor.prototype.construct_pairs=function(node){var i,key,key_node,len,pairs,ref,ref1,value,value_node;if(node instanceof nodes.MappingNode){pairs=[],ref=node.value;for(i=0,len=ref.length;i<len;i++)ref1=ref[i],key_node=ref1[0],value_node=ref1[1],key=this.construct_object(key_node),value=this.construct_object(value_node),pairs.push([key,value]);return pairs}throw new exports.ConstructorError(null,null,"expected a mapping node but found "+node.id,node.start_mark)},BaseConstructor}(),this.Constructor=function(superClass){var BOOL_VALUES,TIMESTAMP_PARTS,TIMESTAMP_REGEX;extend(Constructor,superClass);function Constructor(){return Constructor.__super__.constructor.apply(this,arguments)}return BOOL_VALUES={on:!0,off:!1,"true":!0,"false":!1,yes:!0,no:!1},TIMESTAMP_REGEX=/^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[\x20\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\.([0-9]*))?(?:[\x20\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$/,TIMESTAMP_PARTS={year:1,month:2,day:3,hour:4,minute:5,second:6,fraction:7,tz:8,tz_sign:9,tz_hour:10,tz_minute:11},Constructor.prototype.construct_scalar=function(node){var i,key_node,len,ref,ref1,value_node;if(node instanceof nodes.MappingNode){ref=node.value;for(i=0,len=ref.length;i<len;i++){ref1=ref[i],key_node=ref1[0],value_node=ref1[1];if(key_node.tag==="tag:yaml.org,2002:value")return this.construct_scalar(value_node)}}return Constructor.__super__.construct_scalar.call(this,node)},Constructor.prototype.flatten_mapping=function(node){var i,index,j,key_node,len,len1,merge,ref,ref1,submerge,subnode,value,value_node;merge=[],index=0;while(index<node.value.length){ref=node.value[index],key_node=ref[0],value_node=ref[1];if(key_node.tag==="tag:yaml.org,2002:merge"){node.value.splice(index,1);if(value_node instanceof nodes.MappingNode)this.flatten_mapping(value_node),merge=merge.concat(value_node.value);else{if(!(value_node instanceof nodes.SequenceNode))throw new exports.ConstructorError("while constructing a mapping",node.start_mark,"expected a mapping or list of mappings for merging but found "+value_node.id,value_node.start_mark);submerge=[],ref1=value_node.value;for(i=0,len=ref1.length;i<len;i++){subnode=ref1[i];if(!(subnode instanceof nodes.MappingNode))throw new exports.ConstructorError("while constructing a mapping",node.start_mark,"expected a mapping for merging, but found "+subnode.id,subnode.start_mark);this.flatten_mapping(subnode),submerge.push(subnode.value)}submerge.reverse();for(j=0,len1=submerge.length;j<len1;j++)value=submerge[j],merge=merge.concat(value)}}else key_node.tag==="tag:yaml.org,2002:value"?(key_node.tag="tag:yaml.org,2002:str",index++):index++}if(merge.length)return node.value=merge.concat(node.value)},Constructor.prototype.construct_mapping=function(node){return node instanceof nodes.MappingNode&&this.flatten_mapping(node),Constructor.__super__.construct_mapping.call(this,node)},Constructor.prototype.construct_yaml_null=function(node){return this.construct_scalar(node),null},Constructor.prototype.construct_yaml_bool=function(node){var value;return value=this.construct_scalar(node),BOOL_VALUES[value.toLowerCase()]},Constructor.prototype.construct_yaml_int=function(node){var base,digit,digits,i,len,part,ref,sign,value;value=this.construct_scalar(node),value=value.replace(/_/g,""),sign=value[0]==="-"?-1:1;if(ref=value[0],indexOf.call("+-",ref)>=0)value=value.slice(1);if(value==="0")return 0;if(value.indexOf("0b")===0)return sign*parseInt(value.slice(2),2);if(value.indexOf("0x")===0)return sign*parseInt(value.slice(2),16);if(value.indexOf("0o")===0)return sign*parseInt(value.slice(2),8);if(value[0]==="0")return sign*parseInt(value,8);if(indexOf.call(value,":")>=0){digits=function(){var i,len,ref1,results;ref1=value.split(/:/g),results=[];for(i=0,len=ref1.length;i<len;i++)part=ref1[i],results.push(parseInt(part));return results}(),digits.reverse(),base=1,value=0;for(i=0,len=digits.length;i<len;i++)digit=digits[i],value+=digit*base,base*=60;return sign*value}return sign*parseInt(value)},Constructor.prototype.construct_yaml_float=function(node){var base,digit,digits,i,len,part,ref,sign,value;value=this.construct_scalar(node),value=value.replace(/_/g,"").toLowerCase(),sign=value[0]==="-"?-1:1;if(ref=value[0],indexOf.call("+-",ref)>=0)value=value.slice(1);if(value===".inf")return sign*Infinity;if(value===".nan")return NaN;if(indexOf.call(value,":")>=0){digits=function(){var i,len,ref1,results;ref1=value.split(/:/g),results=[];for(i=0,len=ref1.length;i<len;i++)part=ref1[i],results.push(parseFloat(part));return results}(),digits.reverse(),base=1,value=0;for(i=0,len=digits.length;i<len;i++)digit=digits[i],value+=digit*base,base*=60;return sign*value}return sign*parseFloat(value)},Constructor.prototype.construct_yaml_binary=function(node){var error,value;value=this.construct_scalar(node);try{return typeof window!="undefined"&&window!==null?atob(value):(new Buffer(value,"base64")).toString("ascii")}catch(_error){throw error=_error,new exports.ConstructorError(null,null,"failed to decode base64 data: "+error,node.start_mark)}},Constructor.prototype.construct_yaml_timestamp=function(node){var date,day,fraction,hour,index,key,match,millisecond,minute,month,second,tz_hour,tz_minute,tz_sign,value,values,year;value=this.construct_scalar(node),match=node.value.match(TIMESTAMP_REGEX),values={};for(key in TIMESTAMP_PARTS)index=TIMESTAMP_PARTS[key],values[key]=match[index];year=parseInt(values.year),month=parseInt(values.month)-1,day=parseInt(values.day);if(!values.hour)return new Date(Date.UTC(year,month,day));hour=parseInt(values.hour),minute=parseInt(values.minute),second=parseInt(values.second),millisecond=0;if(values.fraction){fraction=values.fraction.slice(0,6);while(fraction.length<6)fraction+="0";fraction=parseInt(fraction),millisecond=Math.round(fraction/1e3)}if(values.tz_sign){tz_sign=values.tz_sign==="-"?1:-1;if(tz_hour=parseInt(values.tz_hour))hour+=tz_sign*tz_hour;if(tz_minute=parseInt(values.tz_minute))minute+=tz_sign*tz_minute}return date=new Date(Date.UTC(year,month,day,hour,minute,second,millisecond)),date},Constructor.prototype.construct_yaml_pair_list=function(type,node){var list;list=[];if(node instanceof nodes.SequenceNode)return this.defer(function(_this){return function(){var i,key,key_node,len,ref,ref1,results,subnode,value,value_node;ref=node.value,results=[];for(i=0,len=ref.length;i<len;i++){subnode=ref[i];if(!(subnode instanceof nodes.MappingNode))throw new exports.ConstructorError("while constructing "+type,node.start_mark,"expected a mapping of length 1 but found "+subnode.id,subnode.start_mark);if(subnode.value.length!==1)throw new exports.ConstructorError("while constructing "+type,node.start_mark,"expected a mapping of length 1 but found "+subnode.id,subnode.start_mark);ref1=subnode.value[0],key_node=ref1[0],value_node=ref1[1],key=_this.construct_object(key_node),value=_this.construct_object(value_node),results.push(list.push([key,value]))}return results}}(this)),list;throw new exports.ConstructorError("while constructing "+type,node.start_mark,"expected a sequence but found "+node.id,node.start_mark)},Constructor.prototype.construct_yaml_omap=function(node){return this.construct_yaml_pair_list("an ordered map",node)},Constructor.prototype.construct_yaml_pairs=function(node){return this.construct_yaml_pair_list("pairs",node)},Constructor.prototype.construct_yaml_set=function(node){var data;return data=[],this.defer(function(_this){return function(){var item,results;results=[];for(item in _this.construct_mapping(node))results.push(data.push(item));return results}}(this)),data},Constructor.prototype.construct_yaml_str=function(node){return this.construct_scalar(node)},Constructor.prototype.construct_yaml_seq=function(node){var data;return data=[],this.defer(function(_this){return function(){var i,item,len,ref,results;ref=_this.construct_sequence(node),results=[];for(i=0,len=ref.length;i<len;i++)item=ref[i],results.push(data.push(item));return results}}(this)),data},Constructor.prototype.construct_yaml_map=function(node){var data;return data={},this.defer(function(_this){return function(){var key,ref,results,value;ref=_this.construct_mapping(node),results=[];for(key in ref)value=ref[key],results.push(data[key]=value);return results}}(this)),data},Constructor.prototype.construct_yaml_object=function(node,klass){var data;return data=new klass,this.defer(function(_this){return function(){var key,ref,results,value;ref=_this.construct_mapping(node,!0),results=[];for(key in ref)value=ref[key],results.push(data[key]=value);return results}}(this)),data},Constructor.prototype.construct_undefined=function(node){throw new exports.ConstructorError(null,null,"could not determine a constructor for the tag "+node.tag,node.start_mark)},Constructor}(this.BaseConstructor),this.Constructor.add_constructor("tag:yaml.org,2002:null",this.Constructor.prototype.construct_yaml_null),this.Constructor.add_constructor("tag:yaml.org,2002:bool",this.Constructor.prototype.construct_yaml_bool),this.Constructor.add_constructor("tag:yaml.org,2002:int",this.Constructor.prototype.construct_yaml_int),this.Constructor.add_constructor("tag:yaml.org,2002:float",this.Constructor.prototype.construct_yaml_float),this.Constructor.add_constructor("tag:yaml.org,2002:binary",this.Constructor.prototype.construct_yaml_binary),this.Constructor.add_constructor("tag:yaml.org,2002:timestamp",this.Constructor.prototype.construct_yaml_timestamp),this.Constructor.add_constructor("tag:yaml.org,2002:omap",this.Constructor.prototype.construct_yaml_omap),this.Constructor.add_constructor("tag:yaml.org,2002:pairs",this.Constructor.prototype.construct_yaml_pairs),this.Constructor.add_constructor("tag:yaml.org,2002:set",this.Constructor.prototype.construct_yaml_set),this.Constructor.add_constructor("tag:yaml.org,2002:str",this.Constructor.prototype.construct_yaml_str),this.Constructor.add_constructor("tag:yaml.org,2002:seq",this.Constructor.prototype.construct_yaml_seq),this.Constructor.add_constructor("tag:yaml.org,2002:map",this.Constructor.prototype.construct_yaml_map),this.Constructor.add_constructor(null,this.Constructor.prototype.construct_undefined)}).call(this)}),register({0:["./emitter"]},0,function(global,module,exports,require,window){(function(){var ScalarAnalysis,YAMLError,events,util,extend=function(child,parent){for(var key in parent)hasProp.call(parent,key)&&(child[key]=parent[key]);function ctor(){this.constructor=child}return ctor.prototype=parent.prototype,child.prototype=new ctor,child.__super__=parent.prototype,child},hasProp={}.hasOwnProperty,indexOf=[].indexOf||function(item){for(var i=0,l=this.length;i<l;i++)if(i in this&&this[i]===item)return i;return-1};events=require("./events"),util=require("./util"),YAMLError=require("./errors").YAMLError,this.EmitterError=function(superClass){extend(EmitterError,superClass);function EmitterError(){return EmitterError.__super__.constructor.apply(this,arguments)}return EmitterError}(YAMLError),this.Emitter=function(){var C_WHITESPACE,DEFAULT_TAG_PREFIXES,ESCAPE_REPLACEMENTS;C_WHITESPACE="\0 \r\n…\u2028\u2029",DEFAULT_TAG_PREFIXES={"!":"!","tag:yaml.org,2002:":"!!"},ESCAPE_REPLACEMENTS={"\0":"0","":"a","\b":"b"," ":"t","\n":"n"," ":"v","\f":"f","\r":"r","":"e",'"':'"',"\\":"\\","…":"N"," ":"_","\u2028":"L","\u2029":"P"};function Emitter(stream,options){var ref;this.stream=stream,this.encoding=null,this.states=[],this.state=this.expect_stream_start,this.events=[],this.event=null,this.indents=[],this.indent=null,this.flow_level=0,this.root_context=!1,this.sequence_context=!1,this.mapping_context=!1,this.simple_key_context=!1,this.line=0,this.column=0,this.whitespace=!0,this.indentation=!0,this.open_ended=!1,this.canonical=options.canonical,this.allow_unicode=options.allow_unicode,this.canonical==null&&(this.canonical=!1),this.allow_unicode==null&&(this.allow_unicode=!0),this.best_indent=1<options.indent&&options.indent<10?options.indent:2,this.best_width=options.width>this.indent*2?options.width:80,this.best_line_break=(ref=options.line_break)==="\r"||ref==="\n"||ref==="\r\n"?options.line_break:"\n",this.tag_prefixes=null,this.prepared_anchor=null,this.prepared_tag=null,this.analysis=null,this.style=null}return Emitter.prototype.dispose=function(){return this.states=[],this.state=null},Emitter.prototype.emit=function(event){var results;this.events.push(event),results=[];while(!this.need_more_events())this.event=this.events.shift(),this.state(),results.push(this.event=null);return results},Emitter.prototype.need_more_events=function(){var event;return this.events.length===0?!0:(event=this.events[0],event instanceof events.DocumentStartEvent?this.need_events(1):event instanceof events.SequenceStartEvent?this.need_events(2):event instanceof events.MappingStartEvent?this.need_events(3):!1)},Emitter.prototype.need_events=function(count){var event,i,len,level,ref;level=0,ref=this.events.slice(1);for(i=0,len=ref.length;i<len;i++){event=ref[i],event instanceof events.DocumentStartEvent||event instanceof events.CollectionStartEvent?level++:event instanceof events.DocumentEndEvent||event instanceof events.CollectionEndEvent?level--:event instanceof events.StreamEndEvent&&(level=-1);if(level<0)return!1}return this.events.length<count+1},Emitter.prototype.increase_indent=function(options){options==null&&(options={}),this.indents.push(this.indent);if(this.indent==null)return this.indent=options.flow?this.best_indent:0;if(!options.indentless)return this.indent+=this.best_indent},Emitter.prototype.expect_stream_start=function(){return this.event instanceof events.StreamStartEvent?(this.event.encoding&&!("encoding"in this.stream)&&(this.encoding=this.event.encoding),this.write_stream_start(),this.state=this.expect_first_document_start):this.error("expected StreamStartEvent, but got",this.event)},Emitter.prototype.expect_nothing=function(){return this.error("expected nothing, but got",this.event)},Emitter.prototype.expect_first_document_start=function(){return this.expect_document_start(!0)},Emitter.prototype.expect_document_start=function(first){var explicit,handle,i,k,len,prefix,ref;first==null&&(first=!1);if(this.event instanceof events.DocumentStartEvent){(this.event.version||this.event.tags)&&this.open_ended&&(this.write_indicator("...",!0),this.write_indent()),this.event.version&&this.write_version_directive(this.prepare_version(this.event.version)),this.tag_prefixes=util.clone(DEFAULT_TAG_PREFIXES);if(this.event.tags){ref=function(){var ref,results;ref=this.event.tags,results=[];for(k in ref){if(!hasProp.call(ref,k))continue;results.push(k)}return results}.call(this).sort();for(i=0,len=ref.length;i<len;i++)handle=ref[i],prefix=this.event.tags[handle],this.tag_prefixes[prefix]=handle,this.write_tag_directive(this.prepare_tag_handle(handle),this.prepare_tag_prefix(prefix))}return explicit=!first||this.event.explicit||this.canonical||this.event.version||this.event.tags||this.check_empty_document(),explicit&&(this.write_indent(),this.write_indicator("---",!0),this.canonical&&this.write_indent()),this.state=this.expect_document_root}return this.event instanceof events.StreamEndEvent?(this.open_ended&&(this.write_indicator("...",!0),this.write_indent()),this.write_stream_end(),this.state=this.expect_nothing):this.error("expected DocumentStartEvent, but got",this.event)},Emitter.prototype.expect_document_end=function(){return this.event instanceof events.DocumentEndEvent?(this.write_indent(),this.event.explicit&&(this.write_indicator("...",!0),this.write_indent()),this.flush_stream(),this.state=this.expect_document_start):this.error("expected DocumentEndEvent, but got",this.event)},Emitter.prototype.expect_document_root=function(){return this.states.push(this.expect_document_end),this.expect_node({root:!0})},Emitter.prototype.expect_node=function(expect){expect==null&&(expect={}),this.root_context=!!expect.root,this.sequence_context=!!expect.sequence,this.mapping_context=!!expect.mapping,this.simple_key_context=!!expect.simple_key;if(this.event instanceof events.AliasEvent)return this.expect_alias();if(!(this.event instanceof events.ScalarEvent||this.event instanceof events.CollectionStartEvent))return this.error("expected NodeEvent, but got",this.event);this.process_anchor("&"),this.process_tag();if(this.event instanceof events.ScalarEvent)return this.expect_scalar();if(this.event instanceof events.SequenceStartEvent)return this.flow_level||this.canonical||this.event.flow_style||this.check_empty_sequence()?this.expect_flow_sequence():this.expect_block_sequence();if(this.event instanceof events.MappingStartEvent)return this.flow_level||this.canonical||this.event.flow_style||this.check_empty_mapping()?this.expect_flow_mapping():this.expect_block_mapping()},Emitter.prototype.expect_alias=function(){return this.event.anchor||this.error("anchor is not specified for alias"),this.process_anchor("*"),this.state=this.states.pop()},Emitter.prototype.expect_scalar=function(){return this.increase_indent({flow:!0}),this.process_scalar(),this.indent=this.indents.pop(),this.state=this.states.pop()},Emitter.prototype.expect_flow_sequence=function(){return this.write_indicator("[",!0,{whitespace:!0}),this.flow_level++,this.increase_indent({flow:!0}),this.state=this.expect_first_flow_sequence_item},Emitter.prototype.expect_first_flow_sequence_item=function(){return this.event instanceof events.SequenceEndEvent?(this.indent=this.indents.pop(),this.flow_level--,this.write_indicator("]",!1),this.state=this.states.pop()):((this.canonical||this.column>this.best_width)&&this.write_indent(),this.states.push(this.expect_flow_sequence_item),this.expect_node({sequence:!0}))},Emitter.prototype.expect_flow_sequence_item=function(){return this.event instanceof events.SequenceEndEvent?(this.indent=this.indents.pop(),this.flow_level--,this.canonical&&(this.write_indicator(",",!1),this.write_indent()),this.write_indicator("]",!1),this.state=this.states.pop()):(this.write_indicator(",",!1),(this.canonical||this.column>this.best_width)&&this.write_indent(),this.states.push(this.expect_flow_sequence_item),this.expect_node({sequence:!0}))},Emitter.prototype.expect_flow_mapping=function(){return this.write_indicator("{",!0,{whitespace:!0}),this.flow_level++,this.increase_indent({flow:!0}),this.state=this.expect_first_flow_mapping_key},Emitter.prototype.expect_first_flow_mapping_key=function(){return this.event instanceof events.MappingEndEvent?(this.indent=this.indents.pop(),this.flow_level--,this.write_indicator("}",!1),this.state=this.states.pop()):((this.canonical||this.column>this.best_width)&&this.write_indent(),!this.canonical&&this.check_simple_key()?(this.states.push(this.expect_flow_mapping_simple_value),this.expect_node({mapping:!0,simple_key:!0})):(this.write_indicator("?",!0),this.states.push(this.expect_flow_mapping_value),this.expect_node({mapping:!0})))},Emitter.prototype.expect_flow_mapping_key=function(){return this.event instanceof events.MappingEndEvent?(this.indent=this.indents.pop(),this.flow_level--,this.canonical&&(this.write_indicator(",",!1),this.write_indent()),this.write_indicator("}",!1),this.state=this.states.pop()):(this.write_indicator(",",!1),(this.canonical||this.column>this.best_width)&&this.write_indent(),!this.canonical&&this.check_simple_key()?(this.states.push(this.expect_flow_mapping_simple_value),this.expect_node({mapping:!0,simple_key:!0})):(this.write_indicator("?",!0),this.states.push(this.expect_flow_mapping_value),this.expect_node({mapping:!0})))},Emitter.prototype.expect_flow_mapping_simple_value=function(){return this.write_indicator(":",!1),this.states.push(this.expect_flow_mapping_key),this.expect_node({mapping:!0})},Emitter.prototype.expect_flow_mapping_value=function(){return(this.canonical||this.column>this.best_width)&&this.write_indent(),this.write_indicator(":",!0),this.states.push(this.expect_flow_mapping_key),this.expect_node({mapping:!0})},Emitter.prototype.expect_block_sequence=function(){var indentless;return indentless=this.mapping_context&&!this.indentation,this.increase_indent({indentless:indentless}),this.state=this.expect_first_block_sequence_item},Emitter.prototype.expect_first_block_sequence_item=function(){return this.expect_block_sequence_item(!0)},Emitter.prototype.expect_block_sequence_item=function(first){return first==null&&(first=!1),!first&&this.event instanceof events.SequenceEndEvent?(this.indent=this.indents.pop(),this.state=this.states.pop()):(this.write_indent(),this.write_indicator("-",!0,{indentation:!0}),this.states.push(this.expect_block_sequence_item),this.expect_node({sequence:!0}))},Emitter.prototype.expect_block_mapping=function(){return this.increase_indent(),this.state=this.expect_first_block_mapping_key},Emitter.prototype.expect_first_block_mapping_key=function(){return this.expect_block_mapping_key(!0)},Emitter.prototype.expect_block_mapping_key=function(first){return first==null&&(first=!1),!first&&this.event instanceof events.MappingEndEvent?(this.indent=this.indents.pop(),this.state=this.states.pop()):(this.write_indent(),this.check_simple_key()?(this.states.push(this.expect_block_mapping_simple_value),this.expect_node({mapping:!0,simple_key:!0})):(this.write_indicator("?",!0,{indentation:!0}),this.states.push(this.expect_block_mapping_value),this.expect_node({mapping:!0})))},Emitter.prototype.expect_block_mapping_simple_value=function(){return this.write_indicator(":",!1),this.states.push(this.expect_block_mapping_key),this.expect_node({mapping:!0})},Emitter.prototype.expect_block_mapping_value=function(){return this.write_indent(),this.write_indicator(":",!0,{indentation:!0}),this.states.push(this.expect_block_mapping_key),this.expect_node({mapping:!0})},Emitter.prototype.check_empty_document=function(){var event;return this.event instanceof events.DocumentStartEvent&&this.events.length!==0?(event=this.events[0],event instanceof events.ScalarEvent&&event.anchor==null&&event.tag==null&&event.implicit&&event.value===""):!1},Emitter.prototype.check_empty_sequence=function(){return this.event instanceof events.SequenceStartEvent&&this.events[0]instanceof events.SequenceEndEvent},Emitter.prototype.check_empty_mapping=function(){return this.event instanceof events.MappingStartEvent&&this.events[0]instanceof events.MappingEndEvent},Emitter.prototype.check_simple_key=function(){var length;return length=0,this.event instanceof events.NodeEvent&&this.event.anchor!=null&&(this.prepared_anchor==null&&(this.prepared_anchor=this.prepare_anchor(this.event.anchor)),length+=this.prepared_anchor.length),this.event.tag!=null&&(this.event instanceof events.ScalarEvent||this.event instanceof events.CollectionStartEvent)&&(this.prepared_tag==null&&(this.prepared_tag=this.prepare_tag(this.event.tag)),length+=this.prepared_tag.length),this.event instanceof events.ScalarEvent&&(this.analysis==null&&(this.analysis=this.analyze_scalar(this.event.value)),length+=this.analysis.scalar.length),length<128&&(this.event instanceof events.AliasEvent||this.event instanceof events.ScalarEvent&&!this.analysis.empty&&!this.analysis.multiline||this.check_empty_sequence()||this.check_empty_mapping())},Emitter.prototype.process_anchor=function(indicator){if(this.event.anchor==null){this.prepared_anchor=null;return}return this.prepared_anchor==null&&(this.prepared_anchor=this.prepare_anchor(this.event.anchor)),this.prepared_anchor&&this.write_indicator(""+indicator+this.prepared_anchor,!0),this.prepared_anchor=null},Emitter.prototype.process_tag=function(){var tag;tag=this.event.tag;if(this.event instanceof events.ScalarEvent){this.style==null&&(this.style=this.choose_scalar_style());if((!this.canonical||tag==null)&&(this.style===""&&this.event.implicit[0]||this.style!==""&&this.event.implicit[1])){this.prepared_tag=null;return}this.event.implicit[0]&&tag==null&&(tag="!",this.prepared_tag=null)}else if((!this.canonical||tag==null)&&this.event.implicit){this.prepared_tag=null;return}return tag==null&&this.error("tag is not specified"),this.prepared_tag==null&&(this.prepared_tag=this.prepare_tag(tag)),this.write_indicator(this.prepared_tag,!0),this.prepared_tag=null},Emitter.prototype.process_scalar=function(){var split;this.analysis==null&&(this.analysis=this.analyze_scalar(this.event.value)),this.style==null&&(this.style=this.choose_scalar_style()),split=!this.simple_key_context;switch(this.style){case'"':this.write_double_quoted(this.analysis.scalar,split);break;case"'":this.write_single_quoted(this.analysis.scalar,split);break;case">":this.write_folded(this.analysis.scalar);break;case"|":this.write_literal(this.analysis.scalar);break;default:this.write_plain(this.analysis.scalar,split)}return this.analysis=null,this.style=null},Emitter.prototype.choose_scalar_style=function(){var ref;return this.analysis==null&&(this.analysis=this.analyze_scalar(this.event.value)),this.event.style==='"'||this.canonical?'"':!this.event.style&&this.event.implicit[0]&&(!this.simple_key_context||!this.analysis.empty&&!this.analysis.multiline)&&(this.flow_level&&this.analysis.allow_flow_plain||!this.flow_level&&this.analysis.allow_block_plain)?"":this.event.style&&(ref=this.event.style,indexOf.call("|>",ref)>=0)&&!this.flow_level&&!this.simple_key_context&&this.analysis.allow_block?this.event.style:(!this.event.style||this.event.style==="'")&&this.analysis.allow_single_quoted&&(!this.simple_key_context||!this.analysis.multiline)?"'":'"'},Emitter.prototype.prepare_version=function(arg){var major,minor,version;return major=arg[0],minor=arg[1],version=major+"."+minor,major===1?version:this.error("unsupported YAML version",version)},Emitter.prototype.prepare_tag_handle=function(handle){var char,i,len,ref;handle||this.error("tag handle must not be empty"),(handle[0]!=="!"||handle.slice(-1)!=="!")&&this.error("tag handle must start and end with '!':",handle),ref=handle.slice(1,-1);for(i=0,len=ref.length;i<len;i++)char=ref[i],"0"<=char&&char<="9"||"A"<=char&&char<="Z"||"a"<=char&&char<="z"||indexOf.call("-_",char)>=0||this.error("invalid character '"+char+"' in the tag handle:",handle);return handle},Emitter.prototype.prepare_tag_prefix=function(prefix){var char,chunks,end,start;prefix||this.error("tag prefix must not be empty"),chunks=[],start=0,end=+(prefix[0]==="!");while(end<prefix.length)char=prefix[end],"0"<=char&&char<="9"||"A"<=char&&char<="Z"||"a"<=char&&char<="z"||indexOf.call("-;/?!:@&=+$,_.~*'()[]",char)>=0?end++:(start<end&&chunks.push(prefix.slice(start,end)),start=end+=1,chunks.push(char));return start<end&&chunks.push(prefix.slice(start,end)),chunks.join("")},Emitter.prototype.prepare_tag=function(tag){var char,chunks,end,handle,i,k,len,prefix,ref,start,suffix,suffix_text;tag||this.error("tag must not be empty");if(tag==="!")return tag;handle=null,suffix=tag,ref=function(){var ref,results;ref=this.tag_prefixes,results=[];for(k in ref){if(!hasProp.call(ref,k))continue;results.push(k)}return results}.call(this).sort();for(i=0,len=ref.length;i<len;i++)prefix=ref[i],tag.indexOf(prefix)===0&&(prefix==="!"||prefix.length<tag.length)&&(handle=this.tag_prefixes[prefix],suffix=tag.slice(prefix.length));chunks=[],start=end=0;while(end<suffix.length)char=suffix[end],"0"<=char&&char<="9"||"A"<=char&&char<="Z"||"a"<=char&&char<="z"||indexOf.call("-;/?!:@&=+$,_.~*'()[]",char)>=0||char==="!"&&handle!=="!"?end++:(start<end&&chunks.push(suffix.slice(start,end)),start=end+=1,chunks.push(char));return start<end&&chunks.push(suffix.slice(start,end)),suffix_text=chunks.join(""),handle?""+handle+suffix_text:"!<"+suffix_text+">"},Emitter.prototype.prepare_anchor=function(anchor){var char,i,len;anchor||this.error("anchor must not be empty");for(i=0,len=anchor.length;i<len;i++)char=anchor[i],"0"<=char&&char<="9"||"A"<=char&&char<="Z"||"a"<=char&&char<="z"||indexOf.call("-_",char)>=0||this.error("invalid character '"+char+"' in the anchor:",anchor);return anchor},Emitter.prototype.analyze_scalar=function(scalar){var allow_block,allow_block_plain,allow_double_quoted,allow_flow_plain,allow_single_quoted,block_indicators,break_space,char,flow_indicators,followed_by_whitespace,i,index,leading_break,leading_space,len,line_breaks,preceded_by_whitespace,previous_break,previous_space,ref,ref1,space_break,special_characters,trailing_break,trailing_space,unicode_characters;scalar||new ScalarAnalysis(scalar,!0,!1,!1,!0,!0,!0,!1),block_indicators=!1,flow_indicators=!1,line_breaks=!1,special_characters=!1,unicode_characters=!1,leading_space=!1,leading_break=!1,trailing_space=!1,trailing_break=!1,break_space=!1,space_break=!1;if(scalar.indexOf("---")===0||scalar.indexOf("...")===0)block_indicators=!0,flow_indicators=!0;preceded_by_whitespace=!0,followed_by_whitespace=scalar.length===1||(ref=scalar[1],indexOf.call("\0 \r\n…\u2028\u2029",ref)>=0),previous_space=!1,previous_break=!1,index=0;for(index=i=0,len=scalar.length;i<len;index=++i)char=scalar[index],index===0?indexOf.call("#,[]{}&*!|>'\"%@`",char)>=0||char==="-"&&followed_by_whitespace?(flow_indicators=!0,block_indicators=!0):indexOf.call("?:",char)>=0&&(flow_indicators=!0,followed_by_whitespace&&(block_indicators=!0)):indexOf.call(",?[]{}",char)>=0?flow_indicators=!0:char===":"?(flow_indicators=!0,followed_by_whitespace&&(block_indicators=!0)):char==="#"&&preceded_by_whitespace&&(flow_indicators=!0,block_indicators=!0),indexOf.call("\n…\u2028\u2029",char)>=0&&(line_breaks=!0),char==="\n"||" "<=char&&char<="~"||(char!==""&&(char==="…"||" "<=char&&char<="퟿"||""<=char&&char<="�")?(unicode_characters=!0,this.allow_unicode||(special_characters=!0)):special_characters=!0),char===" "?(index===0&&(leading_space=!0),index===scalar.length-1&&(trailing_space=!0),previous_break&&(break_space=!0),previous_break=!1,previous_space=!0):indexOf.call("\n…\u2028\u2029",char)>=0?(index===0&&(leading_break=!0),index===scalar.length-1&&(trailing_break=!0),previous_space&&(space_break=!0),previous_break=!0,previous_space=!1):(previous_break=!1,previous_space=!1),preceded_by_whitespace=indexOf.call(C_WHITESPACE,char)>=0,followed_by_whitespace=index+2>=scalar.length||(ref1=scalar[index+2],indexOf.call(C_WHITESPACE,ref1)>=0);allow_flow_plain=!0,allow_block_plain=!0,allow_single_quoted=!0,allow_double_quoted=!0,allow_block=!0;if(leading_space||leading_break||trailing_space||trailing_break)allow_flow_plain=allow_block_plain=!1;trailing_space&&(allow_block=!1),break_space&&(allow_flow_plain=allow_block_plain=allow_single_quoted=!1);if(space_break||special_characters)allow_flow_plain=allow_block_plain=allow_single_quoted=allow_block=!1;return line_breaks&&(allow_flow_plain=allow_block_plain=!1),flow_indicators&&(allow_flow_plain=!1),block_indicators&&(allow_block_plain=!1),new ScalarAnalysis(scalar,!1,line_breaks,allow_flow_plain,allow_block_plain,allow_single_quoted,allow_double_quoted,allow_block)},Emitter.prototype.write_stream_start=function(){if(this.encoding&&this.encoding.indexOf("utf-16")===0)return this.stream.write("",this.encoding)},Emitter.prototype.write_stream_end=