/* Taketori - Make Text Vertical * Copyright 2010-2011 CMONOS. Co,Ltd (http://cmonos.jp) * * Version: 1.3.0 * Lisence: MIT Lisence * Last-Modified: 2012-04-06 */ var TaketoriVersionForMuse={ver:"r8"},TaketoriDblClickAlert={"ja-jp":"\ufeff\u7e26\u66f8\u304d\u5316\u3057\u305f\u3044\u90e8\u5206\u3092\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002","zh-tw":"\u9ede\u5169\u4e0b\u4ee5\u5207\u63db\u5230\u76f4\u6392\u986f\u793a\u3002","zh-cn":"Double click to make text vertical.","ko-kr":"Double click to make text vertical."},TaketoriDefaultLang=document.getElementsByTagName("html")[0]&&document.getElementsByTagName("html")[0].lang? document.getElementsByTagName("html")[0].lang.search(/tw/i)!=-1?"zh-tw":"ja-jp":"ja-jp",TaketoriTool=function(){}; TaketoriTool.prototype={element:function(a){arguments.length>1&&(a=Array.prototype.slice.call(arguments));this.elements=[];return this.appendElement(a)},list:function(){return this.elements?this.elements:[]},appendElement:function(a){arguments.length>1&&(a=Array.prototype.slice.call(arguments));if(!a)return this;if(!this.elements)this.elements=[];if(a.constructor==Array)for(var b=0,c=a.length;b')},setTemporaryCSS:function(a){if(!this.temporaryStyle)this.temporaryStyle=document.createElement("style"),this.temporaryStyle.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(this.temporaryStyle);this.temporaryStyle.appendChild(document.createTextNode(a))},removeTemporaryCSS:function(){if(this.temporaryStyle)document.getElementsByTagName("head")[0].removeChild(this.temporaryStyle),this.temporaryStyle=null},init:function(){if(!this.windowWidth){var a= this;this.document.element(window).addEventListener("resize",function(){a.resizeTimer&&clearTimeout(a.resizeTimer);a.resizeTimer=setTimeout(function(){a.refresh()},500)})}if(!this.windowWidth)this.windowWidth=self.innerWidth?self.innerWidth:document.compatMode!=null&&document.compatMode!="BackCompat"?self.document.documentElement.clientWidth:self.document.body.clientWidth;if(!this.windowHeight)this.windowHeight=self.innerHeight?self.innerHeight:document.compatMode!=null&&document.compatMode!="BackCompat"? self.document.documentElement.clientHeight:self.document.body.clientHeight;if(!this.isMSIE&&this.rubyDisabled==null)this.rubyDisabled=window.opera?!0:this.getStyle(document.createElement("ruby")).display=="block"?!0:!1},set:function(a){if(this.isLegacy)return this;if(!this.config)this.config={};a!=null&&this.merge(this.config,a);if(this.config.lang)this.config.lang=this.config.lang.toLowerCase();return this},merge:function(a,b){a||(a={});if(b!=null)for(var c in b)if(b[c]!=null)if(b[c].constructor== Array)this.merge(a[c],b[c]);else if(typeof b[c]=="string"||typeof b[c]=="number"||typeof b[c]=="boolean")a[c]=b[c];return a},element:function(a){if(this.isLegacy)return this;arguments.length>1&&(a=Array.prototype.slice.call(arguments));if(!this.config.elements)this.config.elements=[];if(a&&a.constructor==Array)for(var b=0,c=a.length;b0){b=b.sort(function(a, b){return b.readabilityScore-a.readabilityScore});c=[];f=0;for(g=b.length;f").replace(/"/g,'"').replace(/&/g,"&")},getCookie:function(a){for(var b=[],c=document.cookie.split(/;\s*/),d=0,f=c.length;d=0){var h=c[d].substring(0,g),g=c[d].substring(g+1,c[d].length);b[h]=g}}return a!= null&&b[a]!=null?b[a]:""},setCookie:function(a,b,c){if(!c)this.config.cookieExpires?c=this.config.cookieExpires:(c=new Date,c.setTime(c.getTime()+864E8));document.cookie=a+"="+b+"; expires="+c.toGMTString()+";"+(this.config.cookieDomain!=null&&this.config.cookieDomain!=""?" domain="+this.config.cookieDomain+";":"")+(this.config.cookiePath!=null&&this.config.cookiePath!=""?" path="+this.config.cookiePath:"")},deleteCookie:function(a){this.setCookie(a,"",new Date(70,0,1,0,0,1))},setOnLoad:function(a){if(this.isLegacy)return this; typeof window.addEventListener=="function"?window.addEventListener("load",a,!1):typeof window.attachEvent=="object"&&window.attachEvent("onload",!this.isMultiColumnReady?function(){setTimeout(a,600)}:a);return this},getStyle:function(a){if(a.currentStyle)return a.currentStyle;else{var b=document.defaultView.getComputedStyle(a,null),c=document.createElement("div");if(b.length){for(var d=0,f=b.length;d0&&b.height&&b.height.search(/\d+\.?\d*(px|em)/i)!= -1&&parseInt(b.height)>0)h||b.cssFloat&&b.cssFloat!="none"||b.display=="inline-block"?g=!0:(d.style.width="auto",d.style.height="auto");else if(b.width&&b.width.search(/\d+\.?\d*%/)!=-1||b.height&&b.height.search(/\d+\.?\d*%/)!=-1)d.style.width=b.height&&b.height.search(/\d+\.?\d*%/)!=-1?b.height:"auto",d.style.height=b.width&&b.width.search(/\d+\.?\d*%/)!=-1?b.width:"auto";else{if(b.width=="0px")d.style.width="auto";if(b.height=="0px")d.style.height="auto"}if(!this.isWritingModeReady||g||this.isWritingModeReady&& !c){var i=0,j=0,k=!1;this.isWritingModeReady?(i=this.getMarginSize([b.paddingLeft,b.paddingRight,b.borderLeftWidth,b.borderRightWidth]),j=this.getMarginSize([b.paddingTop,b.paddingBottom,b.borderTopWidth,b.borderBottomWidth]),k=!0):(i=this.getMarginSize([b.paddingTop,b.paddingBottom,b.borderTopWidth,b.borderBottomWidth]),j=this.getMarginSize([b.paddingLeft,b.paddingRight,b.borderLeftWidth,b.borderRightWidth]));var m=!isNaN(parseInt(b.width))&&parseInt(b.width)>0?parseInt(b.width):a.width?a.width: a.offsetWidth?a.offsetWidth-(k?i:j):null,l=!isNaN(parseInt(b.height))&&parseInt(b.height)>0?parseInt(b.height):a.height?a.height:a.offsetHeight?a.offsetHeight-(k?j:i):null,q=!1;if(!m||!l)this.makeClipboard(this.process.target,!0),this.clipboard.appendChild(d),m=d.offsetWidth?d.offsetWidth-(k?i:j):d.clientWidth,l=d.offsetHeight?d.offsetHeight-(k?j:i):d.clientHeight,this.clipboard.removeChild(d);if(!isNaN(m)&&!isNaN(l)){m+=i;l+=j;if(l>this.process.config.height)m=parseInt(m*this.process.config.height/ l),l=this.process.config.height,q=!0;if(m>this.process.config.width)l=parseInt(l*this.process.config.width/m),m=this.process.config.width,q=!0;if(q||g)if(i=m-i,j=l-j,g)h||b.display=="inline-block"?(d.width=j,d.style.width=j+"px"):d.style.width="auto",d.height=i,d.style.height=i+"px";else if(d.width=i,d.height=j,d.style.width=i+"px",d.style.height=j+"px",q&&f)d.style.overflow="auto"}}d.style.borderTopWidth=b.borderLeftWidth||0;d.style.borderRightWidth=b.borderTopWidth||0;d.style.borderBottomWidth= b.borderRightWidth||0;d.style.borderLeftWidth=b.borderBottomWidth||0;d.style.borderTopColor=b.borderLeftColor||"";d.style.borderRightColor=b.borderTopColor||"";d.style.borderBottomColor=b.borderRightColor||"";d.style.borderLeftColor=b.borderBottomColor||"";d.style.borderTopStyle=b.borderLeftStyle||"none";d.style.borderRightStyle=b.borderTopStyle||"none";d.style.borderBottomStyle=b.borderRightStyle||"none";d.style.borderLeftStyle=b.borderBottomStyle||"none";if(f||!c||this.isWritingModeReady&&(!this.isMSIE|| this.isMSIE<8))d.style.paddingTop=b.paddingLeft||0,d.style.paddingRight=b.paddingTop||0,d.style.paddingBottom=b.paddingRight||0,d.style.paddingLeft=b.paddingBottom||0;if(this.isWritingModeReady){if(f&&c)d.style.overflowX=b.overflowY?b.overflowY:"visible",d.style.overflowY=b.overflowX?b.overflowX:"visible";if(b.backgroundPositionX||b.backgroundPositionY)d.style.backgroundPositionX=b.backgroundPositionY?b.backgroundPositionY=="top"?"left":b.backgroundPositionY=="bottom"?"right":b.backgroundPositionY: "50%",d.style.backgroundPositionY=b.backgroundPositionX?b.backgroundPositionX=="left"?"top":b.backgroundPositionX=="right"?"bottom":b.backgroundPositionX:"50%";else if(b.backgroundPosition&&b.backgroundPosition.search(/(\S+)\s+(\S)/)!=-1)d.style.backgroundPosition=RegExp.$2+" "+RegExp.$1+";";if(f||!c||!this.isMSIE||this.isMSIE<8)d.style.marginTop=b.marginLeft||0,d.style.marginRight=b.marginTop||0,d.style.marginBottom=b.marginRight||0,d.style.marginLeft=b.marginBottom||0}else if(d.style.marginRight= parseInt((b.marginRight&&b.marginRight!="auto"?parseInt(b.marginRight):0)+(l-m)/2)+"px",m-l>0?(d.style.marginTop=d.style.marginBottom="0px",d.style.marginLeft=parseInt((b.marginLeft&&b.marginLeft!="auto"?parseInt(b.marginLeft):0)+(l-m))+"px",d.style.paddingTop=parseInt(d.style.paddingTop)+(m-l)+"px"):(d.style.marginTop=parseInt((b.marginTop&&b.marginTop!="auto"?parseInt(b.marginTop):0)+(m-l)/2)+"px",d.style.marginBottom=parseInt((b.marginBottom&&b.marginBottom!="auto"?parseInt(b.marginBottom):0)+ (m-l)/2)+"px",d.style.marginLeft=parseInt((b.marginLeft&&b.marginLeft!="auto"?parseInt(b.marginLeft):0)+(l-m)/2)+"px"),b.backgroundPosition&&b.backgroundPosition.search(/(\S+)\s+(\S)/)!=-1)d.style.backgroundPosition=RegExp.$2+" "+RegExp.$1+";";return c?d.style.cssText+";"+a.style.cssText:this.outerHTML(d)},outerHTML:function(a){if(!a)return"";var b=document.createElement("div");b.appendChild(a.cloneNode(!0));return b.innerHTML},rotatedBlockAdditionalCSSText:function(a,b,c,d){c==null&&(c=0);if(this.isWritingModeReady)return"width:"+ b+"px;height:"+a+"px;"+(c?(!d?"padding-bottom:":"margin-bottom:")+c+"px;":"")+(!d?"position:relative;overflow:auto;overflow-x:auto;overflow-y:hidden;":"");else{var f=this.isIE9?"overflow-x:hidden;overflow-y:hidden;":"overflow-x:visible;overflow-y:visible;";return"width:"+a+"px;height:"+b+"px;margin-top:-"+b+"px;margin-right:"+(b-a-c)+"px;margin-bottom:"+(a+c)+"px;margin-left:0;"+(!d?"padding-right:"+c+"px;overflow:auto;"+f:"")}},toVertical:function(a){if(this.isLegacy)return this;var b=this;if(a== null||a)this.setOnLoad(function(){b.toVertical(!1)});else{this.importCSS();var c=!1,d=!1;if(!this.targetElements)if(!this.config.elements||this.config.elements[0]=="=auto")this.targetElements=this.japaneseReadableElements(this.config.minScore==null?3:this.config.minScore),this.config.togglable=!1,c=!0;else if(this.config.elements[0]=="=dblclick")d=c=!0;else{var f=this.document.element(this.config.elements).list();this.targetElements=[];for(var a=0,g=f.length;a this.windowHeight?this.windowWidth:this.windowHeight;this.clipboard.style.top="-"+(c+100)+"px";this.clipboard.style.left="-"+(c+100)+"px";this.clipboard.style.width=c+"px";this.clipboard.style.height=c+"px";this.clipboard.style.overflow="auto"}},removeClipboard:function(){this.temporaryContent&&this.temporaryContent.parentNode.removeChild(this.temporaryContent);this.clipboard&&this.clipboard.parentNode.removeChild(this.clipboard);this.temporaryContent=this.clipboard=null},toPx:function(a,b,c,d){return!a? 0:c?a.search(/(\d+\.\d+)/)!=-1?parseInt(RegExp.$1*b):parseInt(1.5*b):a.search(/\d+\.?\d*em/i)!=-1?parseInt(parseFloat(a)*b):a.search(/\d+\.?\d*%/)!=-1?parseInt(parseFloat(a)*(d?d:b)/100):a.search(/\d/)!=-1?parseInt(a):a},getFontSize:function(a){if(!isNaN(a)||a.search(/\d+px/)!=-1)return parseInt(a);else{var b=this.getStyle(document.body).fontSize,b=b.search(/\d+\.?\d*(em|%)/)!=-1?this.toPx(b,16):parseInt(b),a=this.toPx(a,b);return a>0?a:16}},getHeight:function(a){return!isNaN(a)||a.search(/\d+px/)!= -1?parseInt(a):null},setCurrentConfig:function(a,b){b||(b=this.configClone(this.config));if(!b.classNameImported){var c=a.className;if(c)for(var d=["width","height","fontFamily","maxHeight","multiColumnEnabled","gap","contentWidth","contentHeight","lang"],f=0,g=d.length;ff?f:d}else this.process.config.contentHeight&&this.process.config.multiColumnEnabled?(d=this.toPx(b.height,d),this.process.config.columnCount=Math.ceil(this.process.config.contentHeight/(d+this.process.config.gap)),this.process.config.height=parseInt((this.process.config.contentHeight+this.process.config.gap)/this.process.config.columnCount)-this.process.config.gap):this.process.config.height=b.height&&b.height=="width"?this.process.config.width: this.process.config.multiColumnEnabled?this.toPx(b.height,d):this.process.config.contentHeight||this.toPx(b.height,d);if(c.letterSpacing!="normal")this.process.letterSpacing=c.letterSpacing;if(c.textIndent!="0px")this.process.textIndent=this.process.textIndentPTag=c.textIndent,a.style.textIndent="0px";this.process.pointer=c.cursor;this.process.fontSize=c.fontSize;this.process.currentConfig=b;return this},getElementWidth:function(a,b){return a.offsetWidth||a.scrollWidth?(a.offsetWidth?a.offsetWidth: a.scrollWidth)-this.getMarginSize([b.paddingLeft,b.paddingRight,b.borderLeftWidth,b.borderRightWidth]):parseInt(b.width.replace(/\D+/,""))-this.getMarginSize([b.paddingLeft,b.paddingRight,b.borderLeftWidth,b.borderRightWidth])},getMarginSize:function(a){for(var b=0,c=0,d=a.length;c1){var c=this.process.config.width*this.process.config.columnCount;if(this.process.width+50=c&&(b=this.getMultiColumnWidth(a),b=b>this.process.config.contentHeight?!0:!1)}else this.isWritingModeReady?(this.temporaryContent.style.height=this.process.config.contentHeight+ "px",this.temporaryContent.innerHTML=a,this.process.width=this.temporaryContent.scrollWidth||this.temporaryContent.clientWidth||this.temporaryContent.offsetWidth):(this.temporaryContent.style.width=this.process.config.contentHeight+"px",this.temporaryContent.innerHTML=a,this.process.width=this.temporaryContent.scrollHeight||this.temporaryContent.clientHeight||this.temporaryContent.offsetHeight),b=this.process.width>this.process.config.contentWidth?!0:!1;this.clipboard.className="";return b},getMultiColumnWidth:function(a){if(!this.temporaryContent)this.temporaryContent= document.createElement("div"),this.clipboard.appendChild(this.temporaryContent);var b=0;this.setTaketoriClassName(this.clipboard);this.setMultiColumnStyle(this.temporaryContent);this.temporaryContent.innerHTML=a;b=this.isWritingModeReady?this.getTotalHeight(this.temporaryContent):this.getTotalWidth(this.temporaryContent);this.clipboard.className="";return b},setMultiColumnStyle:function(a){a.className="taketori-col taketori-multi-column";a.style.overflow="auto";this.isWritingModeReady?(a.style.width= this.process.config.width+"px",a.style.height=this.process.config.height+"px"):(a.style.width=this.process.config.height+"px",a.style.height=this.process.config.width+"px");a.style.MozColumnWidth=this.process.config.height+"px";a.style.webkitColumnWidth=this.process.config.height+"px";a.style.OColumnWidth=this.process.config.height+"px";a.style.columnWidth=this.process.config.height+"px";a.style.MozColumnGap=this.process.config.gap+"px";a.style.webkitColumnGap=this.process.config.gap+"px";a.style.OColumnGap= this.process.config.gap+"px";a.style.columnGap=this.process.config.gap+"px"},setMultiColumnWidth:function(a){if(this.isWritingModeReady){var b=this.getTotalHeight(a);a.style.height=b+"px";a.style.overflow="visible";this.fixMargin(a,this.process.config.width,b)}else b=this.getTotalWidth(a),a.style.width=b+"px",a.style.overflow="visible",this.fixMargin(a,b,this.process.config.width)},getTotalWidth:function(a){return Math.ceil((a.scrollWidth||a.clientWidth||a.offsetWidth)/(this.process.config.height+ this.process.config.gap))*(this.process.config.height+this.process.config.gap)-this.process.config.gap},getTotalHeight:function(a){return Math.ceil((a.scrollHeight||a.clientHeight||a.offsetHeight)/(this.process.config.height+this.process.config.gap))*(this.process.config.height+this.process.config.gap)-this.process.config.gap},setTaketoriClassName:function(a){var b=this.isWritingModeReady?"taketori-writingmode-ttb":"taketori-ttb";b+=this.isIE9?" taketori-ttb-hidden":" taketori-ttb-visible";this.rubyDisabled&& (b+=" taketori-ruby-disabled");this.isTextEmphasisReady||(b+=" taketori-text-emphasis-disabled");this.isWritingModeReady&&navigator.userAgent.search(/WebKit/i)!=-1&&navigator.userAgent.search(/Windows/i)!=-1&&(b+=" taketori-atsign-"+this.process.currentConfig.lang);b+=" taketori-lang-"+this.process.currentConfig.lang;a.className+=(a.className?" ":"")+b},removeTaketoriClassName:function(a){this.document.element(a).removeClassName("taketori-ttb").removeClassName("taketori-ttb-hidden").removeClassName("taketori-ttb-visible").removeClassName("taketori-writingmode-ttb").removeClassName("taketori-ruby-disabled").removeClassName("taketori-(lang|serif|sans-serif|cursive|kai)[\\w\\-]*")}, make:function(a,b){this.document.element(a).addClassName("taketori-in-progress");var c=this;setTimeout(function(){b||c.setCurrentConfig(a);c.makeClipboard(a);c.parse(a,!0);c.complement(a);c.removeClipboard();c.document.element(a).removeClassName("taketori-in-progress")},120)},isSkipClass:function(a){if(this.config.skipClass&&a.className)for(var a=0,b=this.config.skipClass.length;a7)){c=="li"&&this.process.listStyleType&&this.process.listStyleType[this.process.listStyleType.length-1]!=""&&(g+=' data-marker="'+this.getListMarkerText()+'"');if(c=="ul"||c=="ol")j=!0,this.process.listStart[this.process.listStart.length]=0,p=k.listStyleType.toLowerCase(),this.isIncludedIn(["none","disc","circle","square"],p)?this.process.listStyleType[this.process.listStyleType.length]= "":(this.process.listStyleType[this.process.listStyleType.length]=p,i+=(i?" ":"")+"cjk");if(this.isWritingModeReady&&c=="strong"){if(!this.isTextEmphasisReady)this.process.kenten||(H=!0),this.process.kenten=!0;i+=(i?" ":"")+"bo-ten"}!this.isWritingModeReady&&k.fontStyle&&k.fontStyle.toLowerCase()=="italic"&&q&&(i+=(i?" ":"")+"italic");if(k.textDecoration&&q&&(p=k.textDecoration.toLowerCase(),p!="none"&&(p.search(/underline/i)!=-1&&p.search(/overline/i)!=-1?(i+=(i?" ":"")+"border-bothline",m=this.lineMarginHeight(k)): p.search(/underline/i)!=-1?(i+=(i?" ":"")+"underline border-underline",m=this.lineMarginHeight(k)):p.search(/overline/i)!=-1&&(i+=(i?" ":"")+"overline border-overline",m=this.lineMarginHeight(k)),!this.isWritingModeReady&&m)))this.process.lineMarginHeight||(l=!0),this.process.lineMarginHeight=m}m="";if(i){x=0;for(p=this.targetElements.length;x";j&&(d+=' start=""'); d+=">";f="";this.process.openTags[this.process.openTags.length]=d;this.process.closeTags[this.process.closeTags.length]=c}if(b&&c!="div"&&(!document.getElementById(a.id).style.paddingTop||document.getElementById(a.id).style.paddingTop=="0px"))document.getElementById(a.id).style.paddingTop="1px";A=0;for(p=a.childNodes.length;A",this.process.columnHTML+=d);if(v)this.process.lineLength=v;break;case 3:var j=this.escapeHTML(a.nodeValue),j=j.replace(/\uFF0F\uFF3C/g,"\u3033\u3035").replace(/\uFF3C\uFF0F/g,"\u3033\u3035").replace(/\uFF0F\u0022\uFF3C/g,"\u3034\u3035").replace(/\uFF3C\u0022\uFF0F/g,"\u3034\u3035"),n=this,C=0;j.replace(/&#?\w+;|\s+|./g,function(a){if(a.search(/^[\u1100-\u11FF\u2014\u2025-\u2026\u2030-\u20AB\u20AD-\u218F\u2460-\u24FF\u2500-\u254B\u2600-\u261F\u2620-\u277F\u2E80-\u2FDF\u2FF0-\u4DBF\u4E00-\u9FFF\uA960-\uA97F\uAC00-\uD7AF\uD7B0-\uD7FF\uF900-\uFAFF\uFE30-\uFE4F\uFF00\uFF01\uFF03-\uFF06\uFF08-\uFF0C\uFF0E-\uFF1B\uFF1F-\uFF3D\uFF40-\uFF5B\uFF5D-\uFF60\uFFA0-\uFFEF]$/)!= -1){n.setCJK();if((!n.isWritingModeReady||n.process.kenten)&&!n.process.ltr){var b=n.process.pointer=="pointer"?" cursorPointer":"",b=""+a+"";a=n.kinsokuShori(b)}C++}else if(a.search(/^\s+$/)!=-1)C>0&&(C+=0.5);else{a.search(/^[0-9a-zA-Z]$/)!=-1?(C+=0.5,n.process.latin++):(C++,n.process.latin=0);if(n.process.noCJK==0){b=n.process.pointer== "pointer"?" cursorPointer":"";b='"+a;a=b}this.isTextEmphasisReady||n.process.noCJK++}!n.process.isBreakable||C>1&&n.isNoBreak(n.process.width+ C*n.process.roughFormula+n.process.lineHeight)?n.process.columnHTML+=a:(C=1,n.appendHTML(a))});this.setCJK()}}},isNoBreak:function(a){return this.isWritingModeReady||!this.process.isMultiColumnEnabled?a1?a+50 0)this.process.columnHTML=this.process.columnHTML.replace('";this.process.latin=this.process.noCJK=0},lineMarginHeight:function(a){var b=a.lineHeight,a=this.getFontSize(a.fontSize);return b.search(/\d+px/)!=-1?parseInt((parseInt(b)-a)/2):parseInt((parseFloat(b)*a-a)/2)},getListMarkerText:function(){var a=++this.process.listStart[this.process.listStart.length-1],b=this.process.listStyleType[this.process.listStyleType.length-1];return b=="A"|| b=="\u30a2"||b=="upper-latin"||b=="katakana"?(b=["\u30a2","\u30a2","\u30a4","\u30a6","\u30a8","\u30aa","\u30ab","\u30ad","\u30af","\u30b1","\u30b3","\u30b5","\u30b7","\u30b9","\u30bb","\u30bd","\u30bf","\u30c1","\u30c4","\u30c6","\u30c8","\u30ca","\u30cb","\u30cc","\u30cd","\u30ce","\u30cf","\u30d2","\u30d5","\u30d8","\u30db","\u30de","\u30df","\u30e0","\u30e1","\u30e2","\u30e4","\u30e6","\u30e8","\u30e9","\u30ea","\u30eb","\u30ec","\u30ed","\u30ef","\u30f0","\u30f1","\u30f2","\u30f3"],"("+b[a]+")"): b=="a"||b=="\u3042"||b=="lower-latin"||b=="hiragana"?(b=["\u3042","\u3042","\u3044","\u3046","\u3048","\u304a","\u304b","\u304d","\u304f","\u3051","\u3053","\u3055","\u3057","\u3059","\u305b","\u305d","\u305f","\u3061","\u3064","\u3066","\u3068","\u306a","\u306b","\u306c","\u306d","\u306e","\u306f","\u3072","\u3075","\u3078","\u307b","\u307e","\u307f","\u3080","\u3081","\u3082","\u3084","\u3086","\u3088","\u3089","\u308a","\u308b","\u308c","\u308d","\u308f","\u3090","\u3091","\u3092","\u3093"],"("+ b[a]+")"):b=="\u30a4"||b=="katakana-iroha"?(b=["\u30a4","\u30a4","\u30ed","\u30cf","\u30cb","\u30db","\u30d8","\u30c8","\u30c1","\u30ea","\u30cc","\u30eb","\u30f2","\u30ef","\u30ab","\u30e8","\u30bf","\u30ec","\u30bd","\u30c4","\u30cd","\u30ca","\u30e9","\u30e0","\u30a6","\u30f0","\u30ce","\u30aa","\u30af","\u30e4","\u30de","\u30b1","\u30d5","\u30b3","\u30a8","\u30c6","\u30a2","\u30b5","\u30ad","\u30e6","\u30e1","\u30df","\u30b7","\u30f1","\u30d2","\u30e2","\u30bb","\u30b9"],"("+b[a]+")"):b=="\u3044"|| b=="hiragana-iroha"?(b=["\u3044","\u3044","\u308d","\u306f","\u306b","\u307b","\u3078","\u3068","\u3061","\u308a","\u306c","\u308b","\u3092","\u308f","\u304b","\u3088","\u305f","\u308c","\u305d","\u3064","\u306d","\u306a","\u3089","\u3080","\u3046","\u3090","\u306e","\u304a","\u304f","\u3084","\u307e","\u3051","\u3075","\u3053","\u3048","\u3066","\u3042","\u3055","\u304d","\u3086","\u3081","\u307f","\u3057","\u3091","\u3072","\u3082","\u305b","\u3059"],"("+b[a]+")"):b=="I"||b=="upper-roman"?(b=["I", "I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII","XIII","XIV","XV","XVI","XVII","XVIII","XIX","XX"],"("+b[a]+")"):b=="i"||b=="lower-roman"?(b=["i","i","ii","iii","iv","v","vi","vii","viii","ix","x","xi","xii","xiii","xiv","xv","xvi","xvii","xviii","xix","xx"],"("+b[a]+")"):b=="1"||b=="decimal"||b=="\u4e00"||b=="cjk-ideographic"||b=="\u58f1"?a<=10?(b=b=="\u58f1"?["\u58f1","\u58f1","\u5f10","\u53c2","\u56db","\u4f0d","\u516d","\u4e03","\u516b","\u4e5d","\u62fe"]:["\u4e00","\u4e00","\u4e8c", "\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341"],"("+b[a]+")"):"("+a+")":""},appendHTML:function(a,b){var c="";a==null&&(a="");if((b||this.process.isBreakable)&&this.process.columnHTML!="")if(this.isWritingModeReady&&!this.isMultiColumnReady||!this.process.isMultiColumnEnabled){if(c=b?this.columnComplement():this.columnComplement(this.process.columnHTML+a),b||this.process.config.width'+c+"",this.process.columnCount++,(b||this.process.config.columnCount&&this.process.config.columnCount==this.process.columnCount)&&this.containerBreak()}else if(this.process.config.contentHeight&&this.process.config.contentWidth){if(c=b?this.columnComplement():this.columnComplement(this.process.columnHTML+a),b||this.hasToBreak(c))b||(c=this.columnComplement()), this.process.content+=this.process.config.columnCount&&this.process.config.columnCount>1?'
'+c+"
":'
'+c+"
",this.containerBreak()}else if(b)this.process.content=document.createElement("div"),this.setMultiColumnStyle(this.process.content),this.process.content.innerHTML= this.columnComplement(),this.containerBreak(),this.setMultiColumnWidth(this.process.target.firstChild);this.process.columnHTML+=a},columnComplement:function(a){var b=!1,c="";a==null?(c=this.process.columnHTML+(this.process.noCJK>1?"
":""),b=!0):c=a+(this.process.noCJK?"
":"");if(b){this.process.columnHTML="";this.process.width=0;if(this.process.noCJK)this.process.noCJK=1;if(this.process.latin)this.process.latin=1}for(var a="",d=this.process.openTagsHTML,f=!0,g=this.process.closeTags.length- 1;g>=0;g--){var h=this.process.closeTags[g],i=RegExp("<"+h+"(?!\\w)[^>]*>\\s*$");c.search(i)==-1?a+="":a==""&&(c=c.replace(i,""),h=="li"&&(f=!1))}if(b){this.process.openTagsHTML=this.process.openTags.join("");if(f)this.process.openTagsHTML=this.process.openTagsHTML.replace(/ data-marker=".*?"/g,"");g=0;for(b=this.process.listStart.length;g]*class="cjk[^>]*>.<\/span>)$/,""),RegExp.$1&&(a=''+RegExp.$1+a+""),this.process.kinsoku=null;return a},complement:function(){this.appendHTML("",!0)},containerBreak:function(){if(typeof this.process.config.onbreak=="function")this.process.config.onbreak(this);else this._containerBreak()},_containerBreak:function(){if(this.process.target){this.removeClipboard();if(!this.process.target.taketori)this.process.target.taketori= {};if(!this.process.config.contentWidth||!this.process.config.contentHeight||!this.process.done){var a=this.process.target.innerHTML;this.setTaketoriClassName(this.process.target);if(typeof this.process.content=="object")this.process.target.innerHTML="",this.process.target.appendChild(this.process.content);else{this.process.target.innerHTML=this.process.content;var b=this.process.target.firstChild,c=this,d=this.process.config.width,f=this.process.config.gap;setTimeout(function(){if(c.isWritingModeReady){if(b.clientHeight< b.scrollHeight)b.style.height=b.scrollHeight+"px"}else if(b.clientWidth