redde 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. data/.gitignore +20 -0
  2. data/.rspec +1 -0
  3. data/Gemfile +4 -0
  4. data/Guardfile +24 -0
  5. data/LICENSE +22 -0
  6. data/README.md +57 -0
  7. data/Rakefile +2 -0
  8. data/lib/generators/redde/deploy/deploy_generator.rb +34 -0
  9. data/lib/generators/redde/deploy/templates/Capfile +4 -0
  10. data/lib/generators/redde/deploy/templates/deploy.rb +33 -0
  11. data/lib/generators/redde/deploy/templates/recipes/base.rb +16 -0
  12. data/lib/generators/redde/deploy/templates/recipes/check.rb +13 -0
  13. data/lib/generators/redde/deploy/templates/recipes/database.rb +66 -0
  14. data/lib/generators/redde/deploy/templates/recipes/imagemagick.rb +8 -0
  15. data/lib/generators/redde/deploy/templates/recipes/memcached.rb +10 -0
  16. data/lib/generators/redde/deploy/templates/recipes/monit.rb +35 -0
  17. data/lib/generators/redde/deploy/templates/recipes/nginx.rb +26 -0
  18. data/lib/generators/redde/deploy/templates/recipes/nodejs.rb +10 -0
  19. data/lib/generators/redde/deploy/templates/recipes/postfix.rb +37 -0
  20. data/lib/generators/redde/deploy/templates/recipes/rbenv.rb +17 -0
  21. data/lib/generators/redde/deploy/templates/recipes/templates/database.yml.erb +8 -0
  22. data/lib/generators/redde/deploy/templates/recipes/templates/dkim-filter.conf.erb +57 -0
  23. data/lib/generators/redde/deploy/templates/recipes/templates/dkim-filter.defaults.erb +11 -0
  24. data/lib/generators/redde/deploy/templates/recipes/templates/dkim-keys.conf.erb +2 -0
  25. data/lib/generators/redde/deploy/templates/recipes/templates/gemrc.erb +1 -0
  26. data/lib/generators/redde/deploy/templates/recipes/templates/main.cf.erb +43 -0
  27. data/lib/generators/redde/deploy/templates/recipes/templates/memcached.erb +47 -0
  28. data/lib/generators/redde/deploy/templates/recipes/templates/monit_monitrc.erb +21 -0
  29. data/lib/generators/redde/deploy/templates/recipes/templates/monit_nginx.erb +5 -0
  30. data/lib/generators/redde/deploy/templates/recipes/templates/monit_unicorn.erb +14 -0
  31. data/lib/generators/redde/deploy/templates/recipes/templates/nginx_unicorn.erb +28 -0
  32. data/lib/generators/redde/deploy/templates/recipes/templates/unicorn.rb.erb +36 -0
  33. data/lib/generators/redde/deploy/templates/recipes/templates/unicorn_init.erb +84 -0
  34. data/lib/generators/redde/deploy/templates/recipes/unicorn.rb +27 -0
  35. data/lib/generators/redde/layout/layout_generator.rb +57 -0
  36. data/lib/generators/redde/layout/templates/assets/images/admin/addphoto.png +0 -0
  37. data/lib/generators/redde/layout/templates/assets/images/admin/ajaxloader2.gif +0 -0
  38. data/lib/generators/redde/layout/templates/assets/images/admin/arrow_down.png +0 -0
  39. data/lib/generators/redde/layout/templates/assets/images/admin/arrow_enter.png +0 -0
  40. data/lib/generators/redde/layout/templates/assets/images/admin/arrow_right.png +0 -0
  41. data/lib/generators/redde/layout/templates/assets/images/admin/coins.png +0 -0
  42. data/lib/generators/redde/layout/templates/assets/images/admin/confirm.png +0 -0
  43. data/lib/generators/redde/layout/templates/assets/images/admin/del.png +0 -0
  44. data/lib/generators/redde/layout/templates/assets/images/admin/delete.png +0 -0
  45. data/lib/generators/redde/layout/templates/assets/images/admin/email.png +0 -0
  46. data/lib/generators/redde/layout/templates/assets/images/admin/error.png +0 -0
  47. data/lib/generators/redde/layout/templates/assets/images/admin/fio.png +0 -0
  48. data/lib/generators/redde/layout/templates/assets/images/admin/folder.png +0 -0
  49. data/lib/generators/redde/layout/templates/assets/images/admin/folder_.png +0 -0
  50. data/lib/generators/redde/layout/templates/assets/images/admin/icon_eye.gif +0 -0
  51. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/css/jquery.lightbox-0.5.css +101 -0
  52. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/images/lightbox-blank.gif +0 -0
  53. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/images/lightbox-btn-close.gif +0 -0
  54. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/images/lightbox-btn-next.gif +0 -0
  55. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/images/lightbox-btn-prev.gif +0 -0
  56. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/images/lightbox-ico-loading.gif +0 -0
  57. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/js/jquery.js +32 -0
  58. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/js/jquery.lightbox-0.5.js +477 -0
  59. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/js/jquery.lightbox-0.5.min.js +42 -0
  60. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/js/jquery.lightbox-0.5.pack.js +14 -0
  61. data/lib/generators/redde/layout/templates/assets/images/admin/logo.png +0 -0
  62. data/lib/generators/redde/layout/templates/assets/images/admin/logo_reddeshop.png +0 -0
  63. data/lib/generators/redde/layout/templates/assets/images/admin/move_handler.png +0 -0
  64. data/lib/generators/redde/layout/templates/assets/images/admin/phone.png +0 -0
  65. data/lib/generators/redde/layout/templates/assets/images/admin/photo_ico.png +0 -0
  66. data/lib/generators/redde/layout/templates/assets/images/admin/print.png +0 -0
  67. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/css/docstyle.css +123 -0
  68. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/css/redactor.css +369 -0
  69. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/css/style.css +119 -0
  70. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/css/wym.css +136 -0
  71. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/img/icons.png +0 -0
  72. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/by.js +72 -0
  73. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/de.js +75 -0
  74. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/en.js +76 -0
  75. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/es.js +76 -0
  76. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/fr.js +74 -0
  77. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/hu.js +76 -0
  78. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/it.js +76 -0
  79. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/ja.js +76 -0
  80. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/lv.js +74 -0
  81. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/nl.js +76 -0
  82. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/pl.js +75 -0
  83. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/pt_br.js +81 -0
  84. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/ru.js +75 -0
  85. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/sq.js +76 -0
  86. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/tr.js +76 -0
  87. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/ua.js +75 -0
  88. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/zh_cn.js +77 -0
  89. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/plugins/file.html +3 -0
  90. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/plugins/image.html +39 -0
  91. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/plugins/image_edit.html +35 -0
  92. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/plugins/link.html +74 -0
  93. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/plugins/table.html +25 -0
  94. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/plugins/video.html +15 -0
  95. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/redactor.js.erb +2260 -0
  96. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/redactor.min.js +1 -0
  97. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/toolbars/default.js +219 -0
  98. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/toolbars/mini.js +103 -0
  99. data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/_jquery.reddebox.js.erb +214 -0
  100. data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/close.png +0 -0
  101. data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/jquery.reddebox.js.erb +246 -0
  102. data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/jquery.reddebox.scss +31 -0
  103. data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/next.png +0 -0
  104. data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/prev.png +0 -0
  105. data/lib/generators/redde/layout/templates/assets/images/admin/refresh.png +0 -0
  106. data/lib/generators/redde/layout/templates/assets/images/admin/submit.png +0 -0
  107. data/lib/generators/redde/layout/templates/assets/images/admin/submit_hover.png +0 -0
  108. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/change-log.txt +19 -0
  109. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/check-exists.php +15 -0
  110. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/index.php +50 -0
  111. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/jquery.uploadifive.js +888 -0
  112. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/jquery.uploadifive.min.js +6 -0
  113. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/license-standard.txt +71 -0
  114. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/uploadifive-cancel.png +0 -0
  115. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/uploadifive-image-only.php +66 -0
  116. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/uploadifive.css +100 -0
  117. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/uploadifive.php +33 -0
  118. data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/#swfobject.js +4 -0
  119. data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/cancel.png +0 -0
  120. data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/jquery.uploadify.min.js +315 -0
  121. data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/uploadify-cancel.png +0 -0
  122. data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/uploadify.css +66 -0
  123. data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/uploadify.swf +0 -0
  124. data/lib/generators/redde/layout/templates/assets/images/admin/view.png +0 -0
  125. data/lib/generators/redde/layout/templates/assets/images/admin/view_mk.png +0 -0
  126. data/lib/generators/redde/layout/templates/assets/javascripts/admin/jquery.ui.nestedSortable.js +390 -0
  127. data/lib/generators/redde/layout/templates/assets/javascripts/admin/swfobject.js +4 -0
  128. data/lib/generators/redde/layout/templates/assets/javascripts/admin/zen_textarea.min.js +17 -0
  129. data/lib/generators/redde/layout/templates/assets/javascripts/admin.js +88 -0
  130. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/_reset.scss +32 -0
  131. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/_list.scss +22 -0
  132. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/_notice.scss +39 -0
  133. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/_orders.scss +22 -0
  134. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/_partners.scss +15 -0
  135. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/_photos.scss +31 -0
  136. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/_sortable.scss +17 -0
  137. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/default.scss +127 -0
  138. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/defaults/_input.scss +43 -0
  139. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/defaults/_table.scss +24 -0
  140. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/_header.scss +57 -0
  141. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/_launchbar.scss +35 -0
  142. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/_login.scss +10 -0
  143. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/_main.scss +59 -0
  144. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/_sidebar.scss +35 -0
  145. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/shop/_filter.scss +16 -0
  146. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/shop/_order-sh.scss +59 -0
  147. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/shop/_pe.scss +43 -0
  148. data/lib/generators/redde/layout/templates/assets/stylesheets/admin.scss +12 -0
  149. data/lib/generators/redde/layout/templates/controllers/base_controller.rb +6 -0
  150. data/lib/generators/redde/layout/templates/helpers/admin_helper.rb +37 -0
  151. data/lib/generators/redde/layout/templates/layouts/admin.html.haml +30 -0
  152. data/lib/generators/redde/layout/templates/layouts/login.html.haml +32 -0
  153. data/lib/generators/redde/layout/templates/shared/_header.html.haml +13 -0
  154. data/lib/generators/redde/layout/templates/shared/_launchbar.html.haml +9 -0
  155. data/lib/generators/redde/layout/templates/shared/_sidebar.html.haml +23 -0
  156. data/lib/generators/redde/scaffold/scaffold_generator.rb +114 -0
  157. data/lib/generators/redde/scaffold/templates/controllers/controller.rb +55 -0
  158. data/lib/generators/redde/scaffold/templates/edit.html.haml +36 -0
  159. data/lib/generators/redde/scaffold/templates/index.html.haml +37 -0
  160. data/lib/redde/version.rb +3 -0
  161. data/lib/redde.rb +4 -0
  162. data/redde.gemspec +26 -0
  163. data/spec/deploy_generator_spec.rb +29 -0
  164. data/spec/layout_generator_spec.rb +41 -0
  165. data/spec/scaffold_generator_spec.rb +25 -0
  166. data/spec/spec_helper.rb +10 -0
  167. metadata +327 -0
@@ -0,0 +1,17 @@
1
+ var zen_textarea=(function(){var d={"variables":{"lang":"en","locale":"en-US","charset":"UTF-8","indentation":"\t","newline":"\n","nl":"\n"},"css":{"filters":"html,css","snippets":{"@i":"@import url(|);","@m":"@media print {\n\t|\n}","@f":"@font-face {\n\tfont-family:|;\n\tsrc:url(|);\n}","!":"!important","pos":"position:|;","pos:s":"position:static;","pos:a":"position:absolute;","pos:r":"position:relative;","pos:f":"position:fixed;","t":"top:|;","t:a":"top:auto;","r":"right:|;","r:a":"right:auto;","b":"bottom:|;","b:a":"bottom:auto;","brad":"-webkit-border-radius: ${1:radius};\n-moz-border-radius: $1;\n-ms-border-radius: $1;\nborder-radius: $1;","bsha":"-webkit-box-shadow: ${1:hoff} ${2:voff} ${3:blur} ${4:rgba(0,0,0,0.5)};\n-moz-box-shadow: $1 $2 $3 $4;\n-ms-box-shadow: $1 $2 $3 $4;\nbox-shadow: $1 $2 $3 $4;","l":"left:|;","l:a":"left:auto;","z":"z-index:|;","z:a":"z-index:auto;","fl":"float:|;","fl:n":"float:none;","fl:l":"float:left;","fl:r":"float:right;","cl":"clear:|;","cl:n":"clear:none;","cl:l":"clear:left;","cl:r":"clear:right;","cl:b":"clear:both;","d":"display:|;","d:n":"display:none;","d:b":"display:block;","d:i":"display:inline;","d:ib":"display:inline-block;","d:li":"display:list-item;","d:ri":"display:run-in;","d:cp":"display:compact;","d:tb":"display:table;","d:itb":"display:inline-table;","d:tbcp":"display:table-caption;","d:tbcl":"display:table-column;","d:tbclg":"display:table-column-group;","d:tbhg":"display:table-header-group;","d:tbfg":"display:table-footer-group;","d:tbr":"display:table-row;","d:tbrg":"display:table-row-group;","d:tbc":"display:table-cell;","d:rb":"display:ruby;","d:rbb":"display:ruby-base;","d:rbbg":"display:ruby-base-group;","d:rbt":"display:ruby-text;","d:rbtg":"display:ruby-text-group;","v":"visibility:|;","v:v":"visibility:visible;","v:h":"visibility:hidden;","v:c":"visibility:collapse;","ov":"overflow:|;","ov:v":"overflow:visible;","ov:h":"overflow:hidden;","ov:s":"overflow:scroll;","ov:a":"overflow:auto;","ovx":"overflow-x:|;","ovx:v":"overflow-x:visible;","ovx:h":"overflow-x:hidden;","ovx:s":"overflow-x:scroll;","ovx:a":"overflow-x:auto;","ovy":"overflow-y:|;","ovy:v":"overflow-y:visible;","ovy:h":"overflow-y:hidden;","ovy:s":"overflow-y:scroll;","ovy:a":"overflow-y:auto;","ovs":"overflow-style:|;","ovs:a":"overflow-style:auto;","ovs:s":"overflow-style:scrollbar;","ovs:p":"overflow-style:panner;","ovs:m":"overflow-style:move;","ovs:mq":"overflow-style:marquee;","zoo":"zoom:1;","cp":"clip:|;","cp:a":"clip:auto;","cp:r":"clip:rect(|);","bxz":"box-sizing:|;","bxz:cb":"box-sizing:content-box;","bxz:bb":"box-sizing:border-box;","bxsh":"box-shadow:|;","bxsh:n":"box-shadow:none;","bxsh:w":"-webkit-box-shadow:0 0 0 #000;","bxsh:m":"-moz-box-shadow:0 0 0 0 #000;","m":"margin:|;","m:a":"margin:auto;","m:0":"margin:0;","m:2":"margin:0 0;","m:3":"margin:0 0 0;","m:4":"margin:0 0 0 0;","mt":"margin-top:|;","mt:a":"margin-top:auto;","mr":"margin-right:|;","mr:a":"margin-right:auto;","mb":"margin-bottom:|;","mb:a":"margin-bottom:auto;","ml":"margin-left:|;","ml:a":"margin-left:auto;","p":"padding:|;","p:0":"padding:0;","p:2":"padding:0 0;","p:3":"padding:0 0 0;","p:4":"padding:0 0 0 0;","pt":"padding-top:|;","pr":"padding-right:|;","pb":"padding-bottom:|;","pl":"padding-left:|;","w":"width:|;","w:a":"width:auto;","h":"height:|;","h:a":"height:auto;","maw":"max-width:|;","maw:n":"max-width:none;","mah":"max-height:|;","mah:n":"max-height:none;","miw":"min-width:|;","mih":"min-height:|;","o":"outline:|;","o:n":"outline:none;","oo":"outline-offset:|;","ow":"outline-width:|;","os":"outline-style:|;","oc":"outline-color:#000;","oc:i":"outline-color:invert;","bd":"border:|;","bd+":"border:1px solid #000;","bd:n":"border:none;","bdbk":"border-break:|;","bdbk:c":"border-break:close;","bdcl":"border-collapse:|;","bdcl:c":"border-collapse:collapse;","bdcl:s":"border-collapse:separate;","bdc":"border-color:#000;","bdi":"border-image:url(|);","bdi:n":"border-image:none;","bdi:w":"-webkit-border-image:url(|) 0 0 0 0 stretch stretch;","bdi:m":"-moz-border-image:url(|) 0 0 0 0 stretch stretch;","bdti":"border-top-image:url(|);","bdti:n":"border-top-image:none;","bdri":"border-right-image:url(|);","bdri:n":"border-right-image:none;","bdbi":"border-bottom-image:url(|);","bdbi:n":"border-bottom-image:none;","bdli":"border-left-image:url(|);","bdli:n":"border-left-image:none;","bdci":"border-corner-image:url(|);","bdci:n":"border-corner-image:none;","bdci:c":"border-corner-image:continue;","bdtli":"border-top-left-image:url(|);","bdtli:n":"border-top-left-image:none;","bdtli:c":"border-top-left-image:continue;","bdtri":"border-top-right-image:url(|);","bdtri:n":"border-top-right-image:none;","bdtri:c":"border-top-right-image:continue;","bdbri":"border-bottom-right-image:url(|);","bdbri:n":"border-bottom-right-image:none;","bdbri:c":"border-bottom-right-image:continue;","bdbli":"border-bottom-left-image:url(|);","bdbli:n":"border-bottom-left-image:none;","bdbli:c":"border-bottom-left-image:continue;","bdf":"border-fit:|;","bdf:c":"border-fit:clip;","bdf:r":"border-fit:repeat;","bdf:sc":"border-fit:scale;","bdf:st":"border-fit:stretch;","bdf:ow":"border-fit:overwrite;","bdf:of":"border-fit:overflow;","bdf:sp":"border-fit:space;","bdl":"border-length:|;","bdl:a":"border-length:auto;","bdsp":"border-spacing:|;","bds":"border-style:|;","bds:n":"border-style:none;","bds:h":"border-style:hidden;","bds:dt":"border-style:dotted;","bds:ds":"border-style:dashed;","bds:s":"border-style:solid;","bds:db":"border-style:double;","bds:dtds":"border-style:dot-dash;","bds:dtdtds":"border-style:dot-dot-dash;","bds:w":"border-style:wave;","bds:g":"border-style:groove;","bds:r":"border-style:ridge;","bds:i":"border-style:inset;","bds:o":"border-style:outset;","bdw":"border-width:|;","bdt":"border-top:|;","bdt+":"border-top:1px solid #000;","bdt:n":"border-top:none;","bdtw":"border-top-width:|;","bdts":"border-top-style:|;","bdts:n":"border-top-style:none;","bdtc":"border-top-color:#000;","bdr":"border-right:|;","bdr+":"border-right:1px solid #000;","bdr:n":"border-right:none;","bdrw":"border-right-width:|;","bdrs":"border-right-style:|;","bdrs:n":"border-right-style:none;","bdrc":"border-right-color:#000;","bdb":"border-bottom:|;","bdb+":"border-bottom:1px solid #000;","bdb:n":"border-bottom:none;","bdbw":"border-bottom-width:|;","bdbs":"border-bottom-style:|;","bdbs:n":"border-bottom-style:none;","bdbc":"border-bottom-color:#000;","bdl":"border-left:|;","bdl+":"border-left:1px solid #000;","bdl:n":"border-left:none;","bdlw":"border-left-width:|;","bdls":"border-left-style:|;","bdls:n":"border-left-style:none;","bdlc":"border-left-color:#000;","bdrs":"border-radius:|;","bdtrrs":"border-top-right-radius:|;","bdtlrs":"border-top-left-radius:|;","bdbrrs":"border-bottom-right-radius:|;","bdblrs":"border-bottom-left-radius:|;","bg":"background:|;","bg+":"background:#FFF url(|) 0 0 no-repeat;","bg:n":"background:none;","bg:ie":"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='${1:x}.png',sizingMethod='${2:crop}');","bgc":"background-color:#FFF;","bgi":"background-image:url(|);","bgi:n":"background-image:none;","bgr":"background-repeat:|;","bgr:n":"background-repeat:no-repeat;","bgr:x":"background-repeat:repeat-x;","bgr:y":"background-repeat:repeat-y;","bga":"background-attachment:|;","bga:f":"background-attachment:fixed;","bga:s":"background-attachment:scroll;","bgp":"background-position:0 0;","bgpx":"background-position-x:|;","bgpy":"background-position-y:|;","bgbk":"background-break:|;","bgbk:bb":"background-break:bounding-box;","bgbk:eb":"background-break:each-box;","bgbk:c":"background-break:continuous;","bgcp":"background-clip:|;","bgcp:bb":"background-clip:border-box;","bgcp:pb":"background-clip:padding-box;","bgcp:cb":"background-clip:content-box;","bgcp:nc":"background-clip:no-clip;","bgo":"background-origin:|;","bgo:pb":"background-origin:padding-box;","bgo:bb":"background-origin:border-box;","bgo:cb":"background-origin:content-box;","bgz":"background-size:|;","bgz:a":"background-size:auto;","bgz:ct":"background-size:contain;","bgz:cv":"background-size:cover;","c":"color:#000;","tbl":"table-layout:|;","tbl:a":"table-layout:auto;","tbl:f":"table-layout:fixed;","cps":"caption-side:|;","cps:t":"caption-side:top;","cps:b":"caption-side:bottom;","ec":"empty-cells:|;","ec:s":"empty-cells:show;","ec:h":"empty-cells:hide;","lis":"list-style:|;","lis:n":"list-style:none;","lisp":"list-style-position:|;","lisp:i":"list-style-position:inside;","lisp:o":"list-style-position:outside;","list":"list-style-type:|;","list:n":"list-style-type:none;","list:d":"list-style-type:disc;","list:c":"list-style-type:circle;","list:s":"list-style-type:square;","list:dc":"list-style-type:decimal;","list:dclz":"list-style-type:decimal-leading-zero;","list:lr":"list-style-type:lower-roman;","list:ur":"list-style-type:upper-roman;","lisi":"list-style-image:|;","lisi:n":"list-style-image:none;","q":"quotes:|;","q:n":"quotes:none;","q:ru":"quotes:'\00AB' '\00BB' '\201E' '\201C';","q:en":"quotes:'\201C' '\201D' '\2018' '\2019';","ct":"content:|;","ct:n":"content:normal;","ct:oq":"content:open-quote;","ct:noq":"content:no-open-quote;","ct:cq":"content:close-quote;","ct:ncq":"content:no-close-quote;","ct:a":"content:attr(|);","ct:c":"content:counter(|);","ct:cs":"content:counters(|);","coi":"counter-increment:|;","cor":"counter-reset:|;","va":"vertical-align:|;","va:sup":"vertical-align:super;","va:t":"vertical-align:top;","va:tt":"vertical-align:text-top;","va:m":"vertical-align:middle;","va:bl":"vertical-align:baseline;","va:b":"vertical-align:bottom;","va:tb":"vertical-align:text-bottom;","va:sub":"vertical-align:sub;","ta":"text-align:|;","ta:l":"text-align:left;","ta:c":"text-align:center;","ta:r":"text-align:right;","tal":"text-align-last:|;","tal:a":"text-align-last:auto;","tal:l":"text-align-last:left;","tal:c":"text-align-last:center;","tal:r":"text-align-last:right;","td":"text-decoration:|;","td:n":"text-decoration:none;","td:u":"text-decoration:underline;","td:o":"text-decoration:overline;","td:l":"text-decoration:line-through;","te":"text-emphasis:|;","te:n":"text-emphasis:none;","te:ac":"text-emphasis:accent;","te:dt":"text-emphasis:dot;","te:c":"text-emphasis:circle;","te:ds":"text-emphasis:disc;","te:b":"text-emphasis:before;","te:a":"text-emphasis:after;","th":"text-height:|;","th:a":"text-height:auto;","th:f":"text-height:font-size;","th:t":"text-height:text-size;","th:m":"text-height:max-size;","ti":"text-indent:|;","ti:-":"text-indent:-9999px;","tj":"text-justify:|;","tj:a":"text-justify:auto;","tj:iw":"text-justify:inter-word;","tj:ii":"text-justify:inter-ideograph;","tj:ic":"text-justify:inter-cluster;","tj:d":"text-justify:distribute;","tj:k":"text-justify:kashida;","tj:t":"text-justify:tibetan;","to":"text-outline:|;","to+":"text-outline:0 0 #000;","to:n":"text-outline:none;","tr":"text-replace:|;","tr:n":"text-replace:none;","tt":"text-transform:|;","tt:n":"text-transform:none;","tt:c":"text-transform:capitalize;","tt:u":"text-transform:uppercase;","tt:l":"text-transform:lowercase;","tw":"text-wrap:|;","tw:n":"text-wrap:normal;","tw:no":"text-wrap:none;","tw:u":"text-wrap:unrestricted;","tw:s":"text-wrap:suppress;","tsh":"text-shadow:|;","tsh+":"text-shadow:0 0 0 #000;","tsh:n":"text-shadow:none;","lh":"line-height:|;","whs":"white-space:|;","whs:n":"white-space:normal;","whs:p":"white-space:pre;","whs:nw":"white-space:nowrap;","whs:pw":"white-space:pre-wrap;","whs:pl":"white-space:pre-line;","whsc":"white-space-collapse:|;","whsc:n":"white-space-collapse:normal;","whsc:k":"white-space-collapse:keep-all;","whsc:l":"white-space-collapse:loose;","whsc:bs":"white-space-collapse:break-strict;","whsc:ba":"white-space-collapse:break-all;","wob":"word-break:|;","wob:n":"word-break:normal;","wob:k":"word-break:keep-all;","wob:l":"word-break:loose;","wob:bs":"word-break:break-strict;","wob:ba":"word-break:break-all;","wos":"word-spacing:|;","wow":"word-wrap:|;","wow:nm":"word-wrap:normal;","wow:n":"word-wrap:none;","wow:u":"word-wrap:unrestricted;","wow:s":"word-wrap:suppress;","lts":"letter-spacing:|;","f":"font:|;","f+":"font:1em Arial,sans-serif;","fw":"font-weight:|;","fw:n":"font-weight:normal;","fw:b":"font-weight:bold;","fw:br":"font-weight:bolder;","fw:lr":"font-weight:lighter;","fs":"font-style:|;","fs:n":"font-style:normal;","fs:i":"font-style:italic;","fs:o":"font-style:oblique;","fv":"font-variant:|;","fv:n":"font-variant:normal;","fv:sc":"font-variant:small-caps;","fz":"font-size:|;","fza":"font-size-adjust:|;","fza:n":"font-size-adjust:none;","ff":"font-family:|;","ff:s":"font-family:serif;","ff:ss":"font-family:sans-serif;","ff:c":"font-family:cursive;","ff:f":"font-family:fantasy;","ff:m":"font-family:monospace;","fef":"font-effect:|;","fef:n":"font-effect:none;","fef:eg":"font-effect:engrave;","fef:eb":"font-effect:emboss;","fef:o":"font-effect:outline;","fem":"font-emphasize:|;","femp":"font-emphasize-position:|;","femp:b":"font-emphasize-position:before;","femp:a":"font-emphasize-position:after;","fems":"font-emphasize-style:|;","fems:n":"font-emphasize-style:none;","fems:ac":"font-emphasize-style:accent;","fems:dt":"font-emphasize-style:dot;","fems:c":"font-emphasize-style:circle;","fems:ds":"font-emphasize-style:disc;","fsm":"font-smooth:|;","fsm:a":"font-smooth:auto;","fsm:n":"font-smooth:never;","fsm:aw":"font-smooth:always;","fst":"font-stretch:|;","fst:n":"font-stretch:normal;","fst:uc":"font-stretch:ultra-condensed;","fst:ec":"font-stretch:extra-condensed;","fst:c":"font-stretch:condensed;","fst:sc":"font-stretch:semi-condensed;","fst:se":"font-stretch:semi-expanded;","fst:e":"font-stretch:expanded;","fst:ee":"font-stretch:extra-expanded;","fst:ue":"font-stretch:ultra-expanded;","op":"opacity:|;","op:ie":"filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);","op:ms":"-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';","rz":"resize:|;","rz:n":"resize:none;","rz:b":"resize:both;","rz:h":"resize:horizontal;","rz:v":"resize:vertical;","cur":"cursor:|;","cur:a":"cursor:auto;","cur:d":"cursor:default;","cur:c":"cursor:crosshair;","cur:ha":"cursor:hand;","cur:he":"cursor:help;","cur:m":"cursor:move;","cur:p":"cursor:pointer;","cur:t":"cursor:text;","pgbb":"page-break-before:|;","pgbb:au":"page-break-before:auto;","pgbb:al":"page-break-before:always;","pgbb:l":"page-break-before:left;","pgbb:r":"page-break-before:right;","pgbi":"page-break-inside:|;","pgbi:au":"page-break-inside:auto;","pgbi:av":"page-break-inside:avoid;","pgba":"page-break-after:|;","pgba:au":"page-break-after:auto;","pgba:al":"page-break-after:always;","pgba:l":"page-break-after:left;","pgba:r":"page-break-after:right;","orp":"orphans:|;","wid":"widows:|;"}},"html":{"filters":"html","snippets":{"cc:ie6":"<!--[if lte IE 6]>\n\t${child}|\n<![endif]-->","cc:ie":"<!--[if IE]>\n\t${child}|\n<![endif]-->","cc:noie":"<!--[if !IE]><!-->\n\t${child}|\n<!--<![endif]-->","html:4t":'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n'+'<html lang="${lang}">\n'+"<head>\n"+' <meta http-equiv="Content-Type" content="text/html;charset=${charset}">\n'+" <title></title>\n"+"</head>\n"+"<body>\n\t${child}|\n</body>\n"+"</html>","html:4s":'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\n'+'<html lang="${lang}">\n'+"<head>\n"+' <meta http-equiv="Content-Type" content="text/html;charset=${charset}">\n'+" <title></title>\n"+"</head>\n"+"<body>\n\t${child}|\n</body>\n"+"</html>","html:xt":'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n'+'<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="${lang}">\n'+"<head>\n"+' <meta http-equiv="Content-Type" content="text/html;charset=${charset}" />\n'+" <title></title>\n"+"</head>\n"+"<body>\n\t${child}|\n</body>\n"+"</html>","html:xs":'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n'+'<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="${lang}">\n'+"<head>\n"+' <meta http-equiv="Content-Type" content="text/html;charset=${charset}" />\n'+" <title></title>\n"+"</head>\n"+"<body>\n\t${child}|\n</body>\n"+"</html>","html:xxs":'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n'+'<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="${lang}">\n'+"<head>\n"+' <meta http-equiv="Content-Type" content="text/html;charset=${charset}" />\n'+" <title></title>\n"+"</head>\n"+"<body>\n\t${child}|\n</body>\n"+"</html>","html:5":"<!DOCTYPE HTML>\n"+'<html lang="${locale}">\n'+"<head>\n"+' <meta charset="${charset}">\n'+" <title></title>\n"+"</head>\n"+"<body>\n\t${child}|\n</body>\n"+"</html>"},"abbreviations":{"a":'<a href="">',"a:link":'<a href="http://|">',"a:mail":'<a href="mailto:|">',"abbr":'<abbr title="">',"acronym":'<acronym title="">',"base":'<base href="" />',"bdo":'<bdo dir="">',"bdo:r":'<bdo dir="rtl">',"bdo:l":'<bdo dir="ltr">',"link:css":'<link rel="stylesheet" type="text/css" href="${1:style}.css" media="all" />',"link:print":'<link rel="stylesheet" type="text/css" href="|print.css" media="print" />',"link:favicon":'<link rel="shortcut icon" type="image/x-icon" href="|favicon.ico" />',"link:touch":'<link rel="apple-touch-icon" href="|favicon.png" />',"link:rss":'<link rel="alternate" type="application/rss+xml" title="RSS" href="|rss.xml" />',"link:atom":'<link rel="alternate" type="application/atom+xml" title="Atom" href="atom.xml" />',"meta:utf":'<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />',"meta:win":'<meta http-equiv="Content-Type" content="text/html;charset=windows-1251" />',"meta:compat":'<meta http-equiv="X-UA-Compatible" content="IE=7" />',"style":'<style type="text/css">',"script":'<script type="text/javascript">',"script:src":'<script type="text/javascript" src="">',"img":'<img src="" alt="" />',"iframe":'<iframe src="" frameborder="0">',"embed":'<embed src="" type="" />',"object":'<object data="" type="">',"param":'<param name="" value="" />',"map":'<map name="">',"area":'<area shape="" coords="" href="" alt="" />',"area:d":'<area shape="default" href="" alt="" />',"area:c":'<area shape="circle" coords="" href="" alt="" />',"area:r":'<area shape="rect" coords="" href="" alt="" />',"area:p":'<area shape="poly" coords="" href="" alt="" />',"link":'<link rel="stylesheet" href="" />',"form":'<form action="">',"form:get":'<form action="" method="get">',"form:post":'<form action="" method="post">',"label":'<label for="">',"input":'<input type="" />',"input:hidden":'<input type="hidden" name="" />',"input:h":'<input type="hidden" name="" />',"input:text":'<input type="text" name="" id="" />',"input:t":'<input type="text" name="" id="" />',"input:search":'<input type="search" name="" id="" />',"input:email":'<input type="email" name="" id="" />',"input:url":'<input type="url" name="" id="" />',"input:password":'<input type="password" name="" id="" />',"input:p":'<input type="password" name="" id="" />',"input:datetime":'<input type="datetime" name="" id="" />',"input:date":'<input type="date" name="" id="" />',"input:datetime-local":'<input type="datetime-local" name="" id="" />',"input:month":'<input type="month" name="" id="" />',"input:week":'<input type="week" name="" id="" />',"input:time":'<input type="time" name="" id="" />',"input:number":'<input type="number" name="" id="" />',"input:color":'<input type="color" name="" id="" />',"input:checkbox":'<input type="checkbox" name="" id="" />',"input:c":'<input type="checkbox" name="" id="" />',"input:radio":'<input type="radio" name="" id="" />',"input:r":'<input type="radio" name="" id="" />',"input:range":'<input type="range" name="" id="" />',"input:file":'<input type="file" name="" id="" />',"input:f":'<input type="file" name="" id="" />',"input:submit":'<input type="submit" value="" />',"input:s":'<input type="submit" value="" />',"input:image":'<input type="image" src="" alt="" />',"input:i":'<input type="image" src="" alt="" />',"input:reset":'<input type="reset" value="" />',"input:button":'<input type="button" value="" />',"input:b":'<input type="button" value="" />',"select":'<select name="" id=""></select>',"option":'<option value=""></option>',"textarea":'<textarea name="" id="" cols="30" rows="10">',"menu:context":'<menu type="context">',"menu:c":'<menu type="context">',"menu:toolbar":'<menu type="toolbar">',"menu:t":'<menu type="toolbar">',"video":'<video src="">',"audio":'<audio src="">',"html:xml":'<html xmlns="http://www.w3.org/1999/xhtml">',"bq":"<blockquote>","acr":"<acronym>","fig":"<figure>","ifr":"<iframe>","emb":"<embed>","obj":"<object>","src":"<source>","cap":"<caption>","colg":"<colgroup>","fst":"<fieldset>","btn":"<button>","optg":"<optgroup>","opt":"<option>","tarea":"<textarea>","leg":"<legend>","sect":"<section>","art":"<article>","hdr":"<header>","ftr":"<footer>","adr":"<address>","dlg":"<dialog>","str":"<strong>","prog":"<progress>","fset":"<fieldset>","datag":"<datagrid>","datal":"<datalist>","kg":"<keygen>","out":"<output>","det":"<details>","cmd":"<command>","ol+":"ol>li","ul+":"ul>li","dl+":"dl>dt+dd","map+":"map>area","table+":"table>tr>td","colgroup+":"colgroup>col","colg+":"colgroup>col","tr+":"tr>td","select+":"select>option","optgroup+":"optgroup>option","optg+":"optgroup>option"},"element_types":{"empty":"area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,keygen,command","block_level":"address,applet,blockquote,button,center,dd,del,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,link,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul,h1,h2,h3,h4,h5,h6","inline_level":"a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"}},"xml":{"extends":"html","filters":"html"},"xsl":{"extends":"html","filters":"html, xsl","abbreviations":{"tm":'<xsl:template match="" mode="">',"tmatch":"tm","tn":'<xsl:template name="">',"tname":"tn","xsl:when":'<xsl:when test="">',"wh":"xsl:when","var":'<xsl:variable name="">',"vare":'<xsl:variable name="" select=""/>',"if":'<xsl:if test="">',"call":'<xsl:call-template name=""/>',"attr":'<xsl:attribute name="">',"wp":'<xsl:with-param name="" select=""/>',"par":'<xsl:param name="" select=""/>',"val":'<xsl:value-of select=""/>',"co":'<xsl:copy-of select=""/>',"each":'<xsl:for-each select="">',"for":"each","ap":'<xsl:apply-templates select="" mode=""/>',"choose+":"xsl:choose>xsl:when+xsl:otherwise"}},"haml":{"filters":"haml","extends":"html"}};
2
+ var ac=(function(){var az="zen-tag",au="zen-expando",aD="zen-reference",ax="system",aB="user",at=/^<(\w+\:?[\w\-]*)((?:\s+[\w\:\-]+\s*=\s*(['"]).*?\3)*)\s*(\/?)>/,ay=/([\w\-]+)\s*=\s*(['"])(.*?)\2/g,aE={},av={};function aA(aH){return(aH||"").replace(/^\s+|\s+$/g,"");}function aG(aH){return aH&&aH.__zen_parsed__;}function an(aH){aH.__zen_parsed__=true;}function ao(aH){return aH==ax?aE:av;}function aC(aK){var aJ={},aH=aK.split(",");for(var aI=0;aI<aH.length;aI++){aJ[aH[aI]]=true;}return aJ;}function ap(aI,aK,aH){var aP=ao(aI),aQ=[],aJ;if(aP&&aK in aP){aJ=aP[aK];if(aH in aJ){aQ.push(aJ[aH]);}}var aN;if(aJ&&"extends" in aJ){aN=aJ;}else{if(aI==aB&&aK in aE&&"extends" in aE[aK]){aN=aE[aK];}}if(aN){if(!aG(aN["extends"])){var aL=aN["extends"].split(",");for(var aM=0;aM<aL.length;aM++){aL[aM]=aA(aL[aM]);}aN["extends"]=aL;an(aN["extends"]);}for(var aM=0;aM<aN["extends"].length;aM++){var aO=aN["extends"][aM];if(aP[aO]&&aP[aO][aH]){aQ.push(aP[aO][aH]);}}}return aQ;}function aq(aK,aH,aI){var aJ=ap(aK,aH,aI);return aJ[0];}function aF(aJ,aK,aI,aP){var aH=ap(aJ,aK,aI),aQ=null,aM;for(var aL=0,aN=aH.length;aL<aN;aL++){aM=aH[aL];if(aP in aM){if(aI=="abbreviations"&&!aG(aM[aP])){var aO=aM[aP];aM[aP]=e(aP,aO);aM[aP].__ref=aO;an(aM[aP]);}aQ=aM[aP];break;}}return aQ;}function am(aI,aH,aJ){return{type:aI,key:aH,value:aJ};}function ar(aH,aI){return am(au,aH,aI);}function aw(aL,aM,aK,aJ){var aI={name:aM,is_empty:!!aJ};if(aK){var aH;aI.attributes=[];while(aH=ay.exec(aK)){aI.attributes.push({name:aH[1],value:aH[3]});}}return am(az,aL,aI);}function e(aI,aJ){aI=aA(aI);var aH;if(aI.substr(-1)=="+"){return ar(aI,aJ);}else{if(aH=at.exec(aJ)){return aw(aI,aH[1],aH[2],aH[4]=="/");}else{return am(aD,aI,aJ);}}}return{setVocabulary:function(aI,aH){if(aH==ax){aE=aI;}else{av=aI;}},getVocabulary:ao,getResource:function(aH,aI,aJ){return aF(aB,aH,aI,aJ)||aF(ax,aH,aI,aJ);},getAbbreviation:function(aI,aH){return this.getResource(aI,"abbreviations",aH)||this.getResource(aI,"abbreviations",aH.replace(/\-/g,":"));},getSnippet:function(aI,aH){return this.getResource(aI,"snippets",aH)||this.getResource(aI,"snippets",aH.replace(/\-/g,":"));},getVariable:function(aH){return aq(aB,"variables",aH)||aq(ax,"variables",aH);},getSubset:function(aH,aI){return aq(aB,aH,aI)||aq(ax,aH,aI);},isItemInCollection:function(aH,aJ,aI){return aI in this.getElementsCollection(ao(aB)[aH],aJ)||aI in this.getElementsCollection(ao(ax)[aH],aJ);},getElementsCollection:function(aJ,aI){if(aJ&&aJ.element_types){var aH=aJ.element_types;if(!aG(aH)){for(var aK in aH){aH[aK]=aC(aH[aK]);}an(aH);}return aH[aI]||{};}else{return{};}},hasSyntax:function(aH){return aH in ao(aB)||aH in ao(ax);}};})();try{ac.setVocabulary(d,"system");ac.setVocabulary(my_zen_settings,"user");}catch(ag){}var U=(function(){var ao=/^[\w\d\-_\$\:@!]+\+?$/i;function au(aw){this.abbreviation="";this.parent=null;this.children=[];this.count=1;this.name=null;this.text=null;this.attributes=[];this.is_repeating=false;this.has_implict_name=false;}au.prototype={addChild:function(aw){aw=aw||new au;aw.parent=this;this.children.push(aw);return aw;},replace:function(az){if(this.parent){var ay=this.parent.children;for(var ax=0,aw=ay.length;ax<aw;ax++){if(ay[ax]===this){ay[ax]=az;this.parent=null;return;}}}},setAbbreviation:function(az){this.abbreviation=az;var aw=az.match(/\*(\d+)?$/);if(aw){this.count=parseInt(aw[1]||1,10);this.is_repeating=!aw[1];az=az.substr(0,az.length-aw[0].length);}if(az){var aA=at(az);var ay=aA[0];if(aA.length==2){this.text=aA[1];}if(ay){var ax=av(ay);this.name=ax[0]||"div";this.has_implict_name=!ax[0];this.attributes=ax[1];}}if(this.name&&!ao.test(this.name)){throw new Error("InvalidAbbreviation");}},getAbbreviation:function(){return this.expr;},toString:function(aB){aB=aB||0;var ay="(empty)";if(this.abbreviation){ay="";if(this.name){ay=this.name;}if(this.text!==null){ay+=(ay?" ":"")+'{text: "'+this.text+'"}';}if(this.attributes.length){var az=[];for(var aA=0,ax=this.attributes.length;aA<ax;aA++){az.push(this.attributes[aA].name+'="'+this.attributes[aA].value+'"');}ay+=" ["+az.join(", ")+"]";}}var aw=Y.repeatString("-",aB)+ay+"\n";for(var aA=0,ax=this.children.length;aA<ax;aA++){aw+=this.children[aA].toString(aB+1);}return aw;},hasEmptyChildren:function(){for(var ax=0,aw=this.children.length;ax<aw;ax++){if(this.children[ax].isEmpty()){return true;}}return false;},isEmpty:function(){return !this.abbreviation;},isTextNode:function(){return !this.name&&this.text;}};function e(aw){if(typeof(aw)=="string"){aw=aw.charCodeAt(0);}return(aw&&aw>47&&aw<58);}function ar(aA){for(var az=aA.children.length-1;az>=0;az--){var aB=aA.children[az];if(aB.isEmpty()){var ax=[az,1];for(var aw=0,ay=aB.children.length;aw<ay;aw++){ax.push(aB.children[aw]);}Array.prototype.splice.apply(aA.children,ax);}}return aA;}function an(aw){return(aw||"").replace(/^\s+|\s+$/g,"");}function am(ax,ay){var aw=ay.substring(ax).match(/^[\w\-:\$]+/);return aw?aw[0]:"";}function aq(aA){aA=an(aA);var aC=100,ay=/^(["'])((?:(?!\1)[^\\]|\\.)*)\1/,aE=[],aB;while(aA&&aC--){var aD=am(0,aA);
3
+ aB=null;if(aD){aB={name:aD,value:""};var aw=aA.charAt(aD.length);switch(aw){case"=":var ax=aA.charAt(aD.length+1);if(ax=='"'||ax=="'"){var az=aA.substring(aD.length+1).match(ay);if(az){aB.value=az[2];aA=an(aA.substring(aD.length+az[0].length+1));}else{aA="";}}else{var az=aA.substring(aD.length+1).match(/(.+?)(\s|$)/);if(az){aB.value=az[1];aA=an(aA.substring(aD.length+az[1].length+1));}else{aA="";}}break;default:aA=an(aA.substring(aD.length));break;}}else{break;}if(aB){aE.push(aB);}}return aE;}function av(aF){var aJ=[],ax="",aE=true,aB,aG={"#":"id",".":"class"};var aD=0,aH=aF.length,ay;while(aD<aH){var aw=aF.charAt(aD);switch(aw){case"#":ay=am(aD,aF.substring(1));aJ.push({name:aG[aw],value:ay});aD+=ay.length+1;aE=false;break;case".":ay=am(aD,aF.substring(1));if(!aB){aB={name:aG[aw],value:""};aJ.push(aB);}aB.value+=((aB.value)?" ":"")+ay;aD+=ay.length+1;aE=false;break;case"[":var az=aF.indexOf("]",aD);if(az==-1){aD=aF.length;}else{var aI=aq(aF.substring(aD+1,az));for(var aA=0,aC=aI.length;aA<aC;aA++){aJ.push(aI[aA]);}aD=az;}aE=false;break;default:if(aE){ax+=aw;}aD++;}}return[ax,aJ];}function ap(ay){while(ay.hasEmptyChildren()){ar(ay);}for(var ax=0,aw=ay.children.length;ax<aw;ax++){ap(ay.children[ax]);}return ay;}function at(aC){if(aC.indexOf("{")==-1){return[aC];}var aB=0,aD=0,ay=[],az=0,ax=aC.length,aA;while(az<ax){aA=aC.charAt(az);switch(aA){case"[":if(!aD){aB++;}break;case"]":if(!aD){aB--;}break;case"{":if(!aB){aD++;ay.push(az);}break;case"}":if(!aB){aD--;var aw=ay.pop();if(aD===0){return[aC.substring(0,aw),aC.substring(aw+1,az)];}}break;}az++;}return[aC];}return{parse:function(aK){var aG=new au,ay=aG.addChild(),aC=0,aI=aK.length,aF=0,az=0,aD=0,aE=[aG],ax,aH,aA="";aE.last=function(){return this[this.length-1];};var aJ=function(){if(aA){ay.setAbbreviation(aA);}aA="";};while(aC<aI){ax=aK.charAt(aC);aH=aC?aK.charAt(aC-1):"";switch(ax){case"{":if(!az){aF++;}aA+=ax;break;case"}":if(!az){aF--;}aA+=ax;break;case"[":if(!aF){az++;}aA+=ax;break;case"]":if(!aF){az--;}aA+=ax;break;case"(":if(!aF&&!az){aJ();if(aH!="+"&&aH!=">"){ay=ay.parent.addChild();}aE.push(ay);ay=ay.addChild();}else{aA+=ax;}break;case")":if(!aF&&!az){aJ();ay=aE.pop();if(aC<aI-1&&aK.charAt(aC+1)=="*"){var aw="",aL;for(var aB=aC+2;aB<aI;aB++){aL=aK.charAt(aB);if(e(aL)){aw+=aL;}else{break;}}aC+=aw.length+1;aw=parseInt(aw||1,10);while(1<aw--){ay.parent.addChild(ay);}}}else{aA+=ax;}break;case"+":if(!aF&&!az&&aC!=aI-1){aJ();ay=ay.parent.addChild();}else{aA+=ax;}break;case">":if(!aF&&!az){aJ();ay=ay.addChild();}else{aA+=ax;}break;default:aA+=ax;}aC++;}aJ();return ap(aG);},TreeNode:au,optimizeTree:ap};})();var Y=(function(){var am=/<\/?[\w:\-]+(?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*\s*(\/?)>$/,aP="{%::zen-caret::%}",ao="\n",aA={},aY="html",aU={},aq={tag_case:"lower",attr_case:"lower",attr_quotes:"double",tag_nl:"decide",place_cursor:true,indent:true,inline_break:3,self_closing_tag:"xhtml",filters:""};function aD(aZ){if(typeof(aZ)=="string"){aZ=aZ.charCodeAt(0);}return(aZ&&aZ>47&&aZ<58);}function aS(a1){a1=String(a1);var a0=a1.charCodeAt(0),aZ="#.>+*:$-_!@[]()|";return(a0>64&&a0<91)||(a0>96&&a0<123)||aD(a1)||aZ.indexOf(a1)!=-1;}function aG(){return Y.getNewline();}function aV(){return(typeof(aP)!="string")?aP():aP;}function ar(a3,a2){var a0=aG();var aZ=(a3||"").replace(/\r\n/g,"\n").replace(/\n\r/g,"\n").replace(/\r/g,"\n").replace(/\n/g,a0).split(a0);if(a2){for(var a1=aZ.length;a1>=0;a1--){if(!e(aZ[a1])){aZ.splice(a1,1);}}}return aZ;}function e(aZ){return(aZ||"").replace(/^\s+|\s+$/g,"");}function aE(a0){var aZ={};for(var a1 in aq){aZ[a1]=(a1 in a0)?a0[a1]:aq[a1];}return aZ;}function aT(a0,aZ){aU[a0.toLowerCase()]=aE(aZ||{});}function aC(a2,a0){var aZ="";for(var a1=0;a1<a0;a1++){aZ+=a2;}return aZ;}function av(a5,a4){var a3=(typeof(a4)=="number")?aC(ax(),a4):a4,aZ="";var a1=ar(a5),a0=aG();aZ+=a1[0];for(var a2=1;a2<a1.length;a2++){aZ+=a0+a3+a1[a2];}return aZ;}function ay(aZ,a1){var a0=function(){};a0.prototype=a1.prototype;aZ.prototype=new a0();aZ.prototype.constructor=aZ;aZ.baseConstructor=a1;aZ.superClass=a1.prototype;}function aQ(aZ,a0){return aK(a0,aW(aZ))?true:false;}function an(aZ){return am.test(aZ);}function aX(a0,aZ){var a1;if(typeof aZ=="function"){a1=aZ;}else{if(aZ){a1=function(a3,a2){return(a2 in aZ)?aZ[a2]:a3;};}else{a1=function(a4,a3){var a2=aL(a3);return(a2!==null&&typeof a2!="undefined")?a2:a4;};}}return a0.replace(/\$\{([\w\-]+)\}/g,a1);}function aW(aZ){return(aZ||"").replace(/(.+)\!$/,"$1");}function au(a2){for(var a0=0,aZ=a2.length;a0<aZ;a0++){var a1=a2.charAt(a0);if(a1=="\\"){a0++;continue;}else{if(a1=="$"&&a2.charAt(a0+1)=="#"){return true;}}}return false;}function aJ(a1,a0){a0=a0||"html";var aZ=null;if(a1.name){aZ=aM(a0,aW(a1.name));if(aZ&&aZ.type=="zen-reference"){aZ=aM(a0,aW(aZ.value));}}this.name=(aZ)?aZ.value.name:a1.name;this.real_name=a1.name;this.count=a1.count||1;this._abbr=aZ;this.syntax=a0;this._content="";this._paste_content="";this.repeat_by_lines=a1.is_repeating;this.is_repeating=a1&&a1.count>1;this.parent=null;
4
+ this.has_implicit_name=a1.has_implict_name;this.setContent(a1.text);if(this._abbr){this.copyAttributes(this._abbr.value);}this.copyAttributes(a1);}aJ.prototype={addChild:function(aZ){if(!this.children){this.children=[];}aZ.parent=this;this.children.push(aZ);},addAttribute:function(a0,a1){if(!this.attributes){this.attributes=[];}if(!this._attr_hash){this._attr_hash={};}a1=az(a1,"|",aV());var aZ;if(a0 in this._attr_hash){aZ=this._attr_hash[a0];if(a0=="class"){aZ.value+=((aZ.value)?" ":"")+a1;}else{aZ.value=a1;}}else{aZ={name:a0,value:a1};this._attr_hash[a0]=aZ;this.attributes.push(aZ);}},copyAttributes:function(a2){if(a2&&a2.attributes){for(var a1=0,a0=a2.attributes.length;a1<a0;a1++){var aZ=a2.attributes[a1];this.addAttribute(aZ.name,aZ.value);}}},hasTagsInContent:function(){return this.getContent()&&am.test(this.getContent());},setContent:function(aZ){this._content=az(aZ||"","|",aV());},getContent:function(){return this._content||"";},setPasteContent:function(aZ){this._paste_content=Y.escapeText(aZ);},getPasteContent:function(){return this._paste_content;},findDeepestChild:function(){if(!this.children||!this.children.length){return null;}var aZ=this;while(true){aZ=aZ.children[aZ.children.length-1];if(!aZ.children||!aZ.children.length){break;}}return aZ;}};function ap(a0,aZ){this.name=aW(a0.name);this.real_name=a0.name;this.count=a0.count;this.children=[];this._content=a0.text||"";this.repeat_by_lines=a0.is_repeating;this.is_repeating=a0&&a0.count>1;this.attributes=[];this.value=az(aK(aZ,this.name),"|",aV());this.parent=null;this.syntax=aZ;this.addAttribute("id",aV());this.addAttribute("class",aV());this.copyAttributes(a0);}ay(ap,aJ);function aM(a0,aZ){return ac.getAbbreviation(a0,aZ);}function aK(a0,aZ){return ac.getSnippet(a0,aZ);}function aL(aZ){return ac.getVariable(aZ);}function ax(){return aL("indentation");}function aR(aZ){this.type=(aZ instanceof ap)?"snippet":"tag";this.name=aZ.name;this.real_name=aZ.real_name;this.children=[];this.counter=1;this.is_repeating=aZ.is_repeating;this.repeat_by_lines=aZ.repeat_by_lines;this.has_implicit_name=this.type=="tag"&&aZ.has_implicit_name;this.attributes=[];if(aZ.attributes){for(var a2=0,a1=aZ.attributes.length;a2<a1;a2++){var a0=aZ.attributes[a2];this.attributes.push({name:a0.name,value:a0.value});}}this.source=aZ;this.parent=null;this.nextSibling=null;this.previousSibling=null;this.start="";this.end="";this.content=aZ.getContent()||"";this.padding="";}aR.prototype={addChild:function(aZ){aZ.parent=this;if(aZ.has_implicit_name&&this.isInline()){aZ.name="span";}var a0=this.children[this.children.length-1];if(a0){aZ.previousSibling=a0;a0.nextSibling=aZ;}this.children.push(aZ);},getAttribute:function(a0){a0=a0.toLowerCase();for(var a1=0,aZ=this.attributes.length;a1<aZ;a1++){if(this.attributes[a1].name.toLowerCase()==a0){return this.attributes[a1].value;}}return null;},isUnary:function(){if(this.type=="snippet"){return false;}return(this.source._abbr&&this.source._abbr.value.is_empty)||ac.isItemInCollection(this.source.syntax,"empty",this.name);},isInline:function(){return this.type=="text"||ac.isItemInCollection(this.source.syntax,"inline_level",this.name);},isBlock:function(){return this.type=="snippet"||!this.isInline();},hasTagsInContent:function(){return this.content&&am.test(this.content);},hasChildren:function(){return !!this.children.length;},hasBlockChildren:function(){if(this.hasTagsInContent()&&this.isBlock()){return true;}for(var aZ=0;aZ<this.children.length;aZ++){if(this.children[aZ].isBlock()){return true;}}return false;},findDeepestChild:function(){if(!this.children.length){return null;}var aZ=this;while(true){aZ=aZ.children[aZ.children.length-1];if(!aZ.children.length){break;}}return aZ;},toString:function(){var a1="";for(var a0=0,aZ=this.children.length;a0<aZ;a0++){a1+=this.children[a0].toString();}return this.start+this.content+a1+this.end;},hasOutputPlaceholder:function(){if(au(this.content)){return true;}else{for(var a0=0,aZ=this.attributes.length;a0<aZ;a0++){if(au(this.attributes[a0].value)){return true;}}}return false;},findElementsWithOutputPlaceholder:function(aZ){aZ=aZ||[];for(var a1=0,a0=this.children.length;a1<a0;a1++){if(this.children[a1].hasOutputPlaceholder()){aZ.push(this.children[a1]);}this.children[a1].findElementsWithOutputPlaceholder(aZ);}return aZ;},pasteContent:function(a9){var a2="$#",aZ=[a2,a9],a1=function(){return aZ;},a6=[];if(this.hasOutputPlaceholder()){a6.push(this);}a6=a6.concat(this.findElementsWithOutputPlaceholder());if(a6.length){for(var a5=0,a8=a6.length;a5<a8;a5++){var ba=a6[a5];ba.content=az(ba.content,a2,a1);for(var a3=0,a4=ba.attributes.length;a3<a4;a3++){var a7=ba.attributes[a3];a7.value=az(a7.value,a2,a1);}}}else{var a0=this.findDeepestChild()||this;a0.content+=a9;}}};function aH(a8,a4){a4=a4||new aR(a8);var a5=1,a2="";if(a8.children){for(var a1=0,a3=a8.children.length;a1<a3;a1++){var aZ=a8.children[a1];a5=aZ.count;if(aZ.repeat_by_lines){a2=ar(aZ.getPasteContent(),true);a5=Math.max(a2.length,1);}else{a2=aZ.getPasteContent();
5
+ }for(var a0=0;a0<a5;a0++){var a7=new aR(aZ);a4.addChild(a7);a7.counter=a0+1;if(aZ.children&&aZ.children.length){aH(aZ,a7);}if(a2){var a6=(typeof(a2)=="string")?a2:(a2[a0]||"");a7.pasteContent(e(a6));}}}}return a4;}function aF(aZ,a4,a1){a4=aO(a4);if(typeof(a1)=="string"){a1=a1.split(/[\|,]/g);}for(var a3=0,a0=a1.length;a3<a0;a3++){var a2=e(a1[a3].toLowerCase());if(a2&&a2 in aA){aZ=aA[a2](aZ,a4);}}return aZ;}function aI(a0,aZ){aZ=aZ||"html";if(a0.isEmpty()){return null;}return aQ(a0.name,aZ)?new ap(a0,aZ):new aJ(a0,aZ);}function aw(a5,a4,a3){var aZ=aI(a5,a4);a3.addChild(aZ);var a0=a3;while(a0.parent){a0=a0.parent;}a0.last=aZ;if(aZ.repeat_by_lines){a0.multiply_elem=aZ;}for(var a1=0,a2=a5.children.length;a1<a2;a1++){aw(a5.children[a1],a4,aZ);}}function at(a3,a2){for(var a1=0,a0=a3.children.length;a1<a0;a1++){var a4=a3.children[a1];if(!a4.isEmpty()&&!a4.isTextNode()&&a4.name.indexOf("+")!=-1){var aZ=aM(a2,a4.name);if(aZ){a3.children[a1]=U.parse(aZ.value);}}at(a3.children[a1],a2);}}function aN(aZ,a0){at(aZ,a0);return U.optimizeTree(aZ);}function aB(a2,a1){var a0="",aZ=a2.length;while(a1>aZ++){a0+="0";}return a0+a2;}function az(a4,a0,aZ){var a2=0,a7=a4.length,a1=a0.length,a6=0;while(a2<a7){if(a4.charAt(a2)=="\\"){a2+=a1+1;}else{if(a4.substr(a2,a1)==a0){var a3=a1;a6++;var a8=aZ;if(typeof(aZ)!=="string"){var a5=aZ(a4,a0,a2,a6);if(a5){a3=a5[0].length;a8=a5[1];}else{a8=false;}}if(a8===false){a2++;continue;}a4=a4.substring(0,a2)+a8+a4.substring(a2+a3);a7=a4.length;a2+=a8.length;}else{a2++;}}}return a4;}function aO(a0){var aZ=a0;if(typeof(a0)=="string"&&a0 in aU){aZ=aU[a0];}if(!aZ){aZ=aU["plain"];}return aZ;}aT("xhtml");aT("html",{self_closing_tag:false});aT("xml",{self_closing_tag:true,tag_nl:true});aT("plain",{tag_nl:false,indent:false,place_cursor:false});return{actions:{},registerAction:function(aZ,a0){this.actions[aZ.toLowerCase()]=a0;},runAction:function(a0,aZ){if(!(aZ instanceof Array)){aZ=Array.prototype.slice.call(arguments,1);}a0=a0.toLowerCase();if(a0 in this.actions){return this.actions[a0].apply(this,aZ);}},expandAbbreviation:function(a0,a2,a1){a2=a2||"html";var a3=this.parseIntoTree(a0,a2);if(a3){var aZ=aH(a3);this.applyFilters(aZ,a2,a1,a3.filters);return aX(aZ.toString());}return"";},extractAbbreviation:function(a5){var a1=a5.length,aZ=-1,a3=0,a4=0,a0=0;while(true){a1--;if(a1<0){aZ=0;break;}var a2=a5.charAt(a1);if(a2=="]"){a4++;}else{if(a2=="["){if(!a4){aZ=a1+1;break;}a4--;}else{if(a2=="}"){a0++;}else{if(a2=="{"){if(!a0){aZ=a1+1;break;}a0--;}else{if(a2==")"){a3++;}else{if(a2=="("){if(!a3){aZ=a1+1;break;}a3--;}else{if(a4||a0){continue;}else{if(!aS(a2)||(a2==">"&&an(a5.substring(0,a1+1)))){aZ=a1+1;break;}}}}}}}}}if(aZ!=-1&&!a0&&!a4&&!a3){return a5.substring(aZ);}else{return"";}},parseIntoTree:function(a1,a4){a4=a4||"html";var a0="";a1=a1.replace(/\|([\w\|\-]+)$/,function(a8,a7){a0=a7;return"";});try{var a3=U.parse(a1),a6=new aJ({},a4);a3=aN(a3,a4);}catch(a5){if(a5.message=="InvalidAbbreviation"){return null;}}for(var a2=0,aZ=a3.children.length;a2<aZ;a2++){aw(a3.children[a2],a4,a6);}a6.filters=a0;return a6;},padString:av,setupProfile:aT,getNewline:function(){return ao;},setNewline:function(aZ){ao=aZ;this.setVariable("newline",aZ);this.setVariable("nl",aZ);},wrapWithAbbreviation:function(a0,a5,a2,a1){a2=a2||"html";var a4=this.parseIntoTree(a0,a2),a3=false;if(a4){if(a4.multiply_elem){a4.multiply_elem.setPasteContent(a5);a4.multiply_elem.repeat_by_lines=a3=true;}var aZ=aH(a4);if(!a3){aZ.pasteContent(a5);}this.applyFilters(aZ,a2,a1,a4.filters);return aX(aZ.toString());}return null;},splitByLines:ar,isInsideTag:function(a2,a1){var a0=/^<\/?\w[\w\:\-]*.*?>/;var a3=a1;while(a3>-1){if(a2.charAt(a3)=="<"){break;}a3--;}if(a3!=-1){var aZ=a0.exec(a2.substring(a3));if(aZ&&a1>a3&&a1<a3+aZ[0].length){return true;}}return false;},getCaretPlaceholder:aV,setCaretPlaceholder:function(aZ){aP=aZ;},rolloutTree:aH,registerFilter:function(aZ,a0){aA[aZ]=a0;},nodeFactory:function(a0,aZ){return new aR({name:a0,attributes:aZ||[]});},applyFilters:function(aZ,a0,a2,a3){a2=aO(a2);var a1=a2.filters;if(!a1){a1=ac.getSubset(a0,"filters")||aY;}if(a3){a1+="|"+((typeof(a3)=="string")?a3:a3.join("|"));}if(!a1){a1=aY;}return aF(aZ,a2,a1);},runFilters:aF,repeatString:aC,getVariable:aL,setVariable:function(a0,a1){var aZ=ac.getVocabulary("user")||{};if(!("varaibles" in aZ)){aZ.variables={};}aZ.variables[a0]=a1;ac.setVocabulary(aZ,"user");},replaceVariables:aX,escapeText:function(aZ){return aZ.replace(/([\$\|\\])/g,"\\$1");},unescapeText:function(aZ){return aZ.replace(/\\(.)/g,"$1");},replaceCounter:function(a1,a0){var aZ="$";a0=String(a0);return az(a1,aZ,function(a5,a4,a6,a2){if(a5.charAt(a6+1)=="{"||aD(a5.charAt(a6+1))){return false;}var a3=a6+1;while(a5.charAt(a3)=="$"&&a5.charAt(a3+1)!="{"){a3++;}return[a5.substring(a6,a3),aB(a0,a3-a6)];});},isNumeric:aD,upgradeTabstops:function(a5,a6){var a1=0,a4=["start","end","content"],aZ=function(a7){return"\\"+a7;},a3=function(a8,a7,a9){a7=parseInt(a7);if(a7>a1){a1=a7;}if(a9){return"${"+(a7+a6)+":"+a9+"}";}else{return"$"+(a7+a6);
6
+ }};for(var a2=0,a0=a4.length;a2<a0;a2++){a5[a4[a2]]=this.processTextBeforePaste(a5[a4[a2]],aZ,a3);}return a1;},getProfile:function(aZ){return(aZ in aU)?aU[aZ]:aU["plain"];},getImageSize:function(a6){var a2="\211PNG\r\n\032\n",a5="\377\330",a0="GIF8",aZ=function(){return a6.charCodeAt(a4++);};if(a6.substr(0,8)===a2){var a4=a6.indexOf("IHDR")+4;return{width:(aZ()<<24)|(aZ()<<16)|(aZ()<<8)|aZ(),height:(aZ()<<24)|(aZ()<<16)|(aZ()<<8)|aZ()};}else{if(a6.substr(0,4)===a0){a4=6;return{width:aZ()|(aZ()<<8),height:aZ()|(aZ()<<8)};}else{if(a6.substr(0,2)===a5){a4=2;var a1=a6.length;while(a4<a1){if(aZ()!=255){return;}var a3=aZ();if(a3==218){break;}var a7=(aZ()<<8)|aZ();if(a3>=192&&a3<=207&&!(a3&4)&&!(a3&8)){a4+=1;return{height:(aZ()<<8)|aZ(),width:(aZ()<<8)|aZ()};}else{a4+=a7-2;}}}}}},getCounterForNode:function(a0){var aZ=a0.counter;if(!a0.is_repeating&&!a0.repeat_by_lines){while(a0=a0.parent){if(a0.is_repeating||a0.repeat_by_lines){return a0.counter;}}}return aZ;},processTextBeforePaste:function(bb,a9,a6){var a3=0,a8=bb.length,a7,a2,a0=[];var a1=function(bc,bd){while(bc<a8){if(!bd(bb.charAt(bc++))){break;}}return bc-1;};while(a3<a8){var aZ=bb.charAt(a3);if(aZ=="\\"&&a3+1<a8){a0.push(a9(bb.charAt(a3+1)));a3+=2;continue;}else{if(aZ=="$"){var a5=bb.charAt(a3+1)||"";a2=a3;if(this.isNumeric(a5)){a7=a3+1;a3=a1(a7,this.isNumeric);if(a7<a3){a0.push(a6(a2,bb.substring(a7,a3)));continue;}}else{if(a5=="{"){var ba=1;a7=a3+2;a3=a1(a7,this.isNumeric);if(a3>a7){if(bb.charAt(a3)=="}"){a0.push(a6(a2,bb.substring(a7,a3)));a3++;continue;}else{if(bb.charAt(a3)==":"){var a4=a3+2;a3=a1(a4,function(bc){if(bc=="{"){ba++;}else{if(bc=="}"){ba--;}}return !!ba;});a0.push(a6(a2,bb.substring(a7,a4-2),bb.substring(a4-1,a3)));a3++;continue;}}}}}a3=a2;}}a0.push(aZ);a3++;}return a0.join("");}};})();function q(an){var e=an.getSelectionRange(),ao=String(an.getContent());if(e.start!=e.end){return ao.substring(e.start,e.end);}var am=an.getCurrentLineRange();return Y.extractAbbreviation(ao.substring(am.start,e.start));}function R(ao,am,aq){am=String(am||ao.getSyntax());aq=String(aq||ao.getProfileName());var e=ao.getSelectionRange().end,an,ap="";if((an=q(ao))){ap=Y.expandAbbreviation(an,am,aq);if(ap){ao.replaceContent(ap,e-an.length,e);return true;}}return false;}function L(am,e,an){e=String(e||am.getSyntax());an=String(an||am.getProfileName());if(!R(am,e,an)){am.replaceContent(Y.getVariable("indentation"),am.getCaretPos());}}function i(aq,au,an){au=String((au||"out").toLowerCase());an=String(an||aq.getProfileName());var ao=aq.getSelectionRange(),ax=ao.end,am=ao.start,aw=ao.end,at=String(aq.getContent()),ao=null,ay,ap=Y.html_matcher.last_match["opening_tag"],av=Y.html_matcher.last_match["closing_tag"];if(au=="in"&&ap&&am!=aw){if(!av){return false;}else{if(ap.start==am){if(at.charAt(ap.end)=="<"){ay=Y.html_matcher.find(at,ap.end+1,an);if(ay[0]==ap.end&&ay[1]==av.start){ao=Y.html_matcher(at,ap.end+1,an);}else{ao=[ap.end,av.start];}}else{ao=[ap.end,av.start];}}else{var e=at.substring(0,av.start).indexOf("<",ap.end);var ar=e!=-1?e+1:ap.end;ao=Y.html_matcher(at,ar,an);}}}else{ao=Y.html_matcher(at,ax,an);}if(ao!==null&&ao[0]!=-1){aq.createSelection(ao[0],ao[1]);return true;}else{return false;}}function z(ao,ap,e){var am=/\s|\n|\r/;function an(aq){return am.test(aq);}while(ap<e){if(!an(ao.charAt(ap))){break;}ap++;}while(e>ap){e--;if(!an(ao.charAt(e))){e++;break;}}return[ap,e];}function v(aq,av,am,ap){am=String(am||aq.getSyntax());ap=String(ap||aq.getProfileName());av=av||aq.prompt("Enter abbreviation");var ao=aq.getSelectionRange(),at=ao.start,e=ao.end,ar=String(aq.getContent());if(!av||typeof av=="undefined"){return null;}av=String(av);if(at==e){ao=Y.html_matcher(ar,at,ap);if(!ao||ao[0]==-1){return null;}var an=z(ar,ao[0],ao[1]);at=an[0];e=an[1];}var au=Y.escapeText(ar.substring(at,e)),aw=Y.wrapWithAbbreviation(av,P(aq,au),am,ap);if(aw){aq.setCaretPos(e);aq.replaceContent(aw,at,e);}}function P(e,am){return s(am,f(e));}function s(ao,an){var e=Y.splitByLines(ao);for(var am=0;am<e.length;am++){if(e[am].search(an)==0){e[am]=e[am].substr(an.length);}}return e.join(Y.getNewline());}function f(e){return al(e.getCurrentLine());}function al(e){return(e.match(/^(\s+)/)||[""])[0];}function j(at,ao,aq){ao=ao||1;aq=aq||0;var av=at.getCaretPos()+aq,au=String(at.getContent()),an=au.length,am=-1,ap=/^\s+$/;function e(az){return au.charAt(az);}function ay(az){var aB=az;while(aB>=0){var aA=e(aB);if(aA=="\n"||aA=="\r"){break;}aB--;}return au.substring(aB,az);}while(av<an&&av>0){av+=ao;var ar=e(av),ax=e(av+1),aw=e(av-1);switch(ar){case'"':case"'":if(ax==ar&&aw=="="){am=av+1;}break;case">":if(ax=="<"){am=av+1;}break;case"\n":case"\r":if(ap.test(ay(av-1))){am=av;}break;}if(am!=-1){break;}}return am;}function t(am){var e=am.getCaretPos(),an=j(am,-1);if(an==e){an=j(am,-1,-2);}if(an!=-1){am.setCaretPos(an);}}function V(e){var am=j(e,1);if(am!=-1){e.setCaretPos(am);}}function D(at){var ay=at.getCaretPos(),au=String(at.getContent()),am=Y.getNewline(),ao=Y.getVariable("indentation"),ap=String(at.getSyntax());
7
+ if(ap=="html"){var aq=Y.html_matcher.getTags(au,ay,String(at.getProfileName()));if(aq[0]&&aq[1]&&aq[0].type=="tag"&&aq[0].end==ay&&aq[1].start==ay){at.replaceContent(am+ao+Y.getCaretPlaceholder()+am,ay);return true;}}else{if(ap=="css"){if(ay&&au.charAt(ay-1)=="{"){for(var ar=ay,av=au.length,e;ar<av;ar++){e=au.charAt(ar);if(e=="}"){return false;}if(e=="{"){break;}}var ax=am+ao+Y.getCaretPlaceholder()+am,aw=ay<au.length&&au.charAt(ay)=="}";var an=Y.getVariable("close_css_brace");if(an){ax+=Y.replaceVariables(an);}else{if(!aw){ax+="}";}}at.replaceContent(ax,ay,ay+(aw?1:0));return true;}}}return false;}function S(ar){if(!D(ar)){var ap=f(ar),au=String(ar.getContent()),av=ar.getCaretPos(),an=au.length,am=Y.getNewline();var at=ar.getCurrentLineRange(),ao="";for(var aq=at.end+1,e;aq<an;aq++){e=au.charAt(aq);if(e==" "||e=="\t"){ao+=e;}else{break;}}if(ao.length>ap.length){ar.replaceContent(am+ao,av,av,true);}else{ar.replaceContent(am,av);}}}function a(am){var e=am.getCurrentLineRange();am.createSelection(e.start,e.end);}function l(ao){var aq=String(ao.getContent()),am=ao.getCaretPos();if(aq.charAt(am)=="<"){am++;}var an=Y.html_matcher.getTags(aq,am,String(ao.getProfileName()));if(an&&an[0]){var e=an[0],ap=an[1];if(ap){if(e.start<=am&&e.end>=am){ao.setCaretPos(ap.start);}else{if(ap.start<=am&&ap.end>=am){ao.setCaretPos(e.start);}}}}}function w(ap){var ao=ap.getSelectionRange();if(ao.start==ao.end){var ar=Y.html_matcher(String(ap.getContent()),ap.getCaretPos(),String(ap.getProfileName()));if(ar){ao.start=ar[0];ao.end=ar[1];}}if(ao.start!=ao.end){var aq=String(ap.getContent()).substring(ao.start,ao.end),e=aq.length;var am=Y.splitByLines(aq);for(var an=1;an<am.length;an++){am[an]=am[an].replace(/^\s+/,"");}aq=am.join("").replace(/\s{2,}/," ");ap.replaceContent(aq,ao.start,ao.end);ap.createSelection(ao.start,ao.start+aq.length);}}function ai(an){var am=String(an.getSyntax());if(am=="css"){var e=an.getCaretPos();var ao=Y.html_matcher.getTags(String(an.getContent()),e);if(ao&&ao[0]&&ao[0].type=="tag"&&ao[0].start<=e&&ao[0].end>=e){am="html";}}switch(am){case"css":return u(an);default:return H(an);}}function H(am){var e=am.getSelectionRange(),an=String(am.getContent());if(e.start==e.end){var ao=Y.html_matcher.getTags(an,am.getCaretPos(),String(am.getProfileName()));if(ao&&ao[0]){e.start=ao[0].start;e.end=ao[1]?ao[1].end:ao[0].end;}}return I(am,"<!--","-->",e.start,e.end);}function u(am){var e=am.getSelectionRange();if(e.start==e.end){e=am.getCurrentLineRange();var an=z(String(am.getContent()),e.start,e.end);e.start=an[0];e.end=an[1];}return I(am,"/*","*/",e.start,e.end);}function ah(av,au,ao,aq){var ap=ao.charAt(0),e=aq.charAt(0),an=-1,am=-1;function at(aw,ax){return av.substr(ax,aw.length)==aw;}while(au--){if(av.charAt(au)==ap&&at(ao,au)){an=au;break;}}if(an!=-1){au=an;var ar=av.length;while(ar>=au++){if(av.charAt(au)==e&&at(aq,au)){am=au+aq.length;break;}}}return(an!=-1&&am!=-1)?[an,am]:null;}function af(am){var e=new RegExp("[.*+?|()\\[\\]{}\\\\]","g");return am.replace(e,"\\$&");}function I(ao,an,am,e,av){var aq=String(ao.getContent()),aw=ao.getCaretPos(),at=null;function au(ax){return ax.replace(new RegExp("^"+af(an)+"\\s*"),function(ay){aw-=ay.length;return"";}).replace(new RegExp("\\s*"+af(am)+"$"),"");}function ap(ax,ay){return aq.substr(ay,ax.length)==ax;}var ar=ah(aq,aw,an,am);if(ar&&ar[0]<=e&&ar[1]>=av){e=ar[0];av=ar[1];at=au(aq.substring(e,av));}else{at=an+" "+aq.substring(e,av).replace(new RegExp(af(an)+"\\s*|\\s*"+af(am),"g"),"")+" "+am;aw+=an.length+1;}if(at!==null){ao.setCaretPos(e);ao.replaceContent(P(ao,at),e,av);ao.setCaretPos(aw);return true;}return false;}function G(ar,aq){var ax=ar.getCaretPos(),an=Y.getProfile(String(aq||ar.getProfileName())),au=Y.getCaretPlaceholder();var ao=Y.html_matcher.getTags(String(ar.getContent()),ax,String(ar.getProfileName()));if(ao&&ao[0]){var aw=ao[0].full_tag;if(ao[1]){var av=" /";if(an.self_closing_tag===true){av="/";}aw=aw.replace(/\s*>$/,av+">");if(aw.length+ao[0].start<ax){aw+=au;}else{var at=ax-ao[0].start;aw=aw.substring(0,at)+au+aw.substring(at);}ar.replaceContent(aw,ao[0].start,ao[1].end);}else{var e=Y.getNewline(),am=Y.getVariable("indentation");var ap=(an.tag_nl===true)?e+am+au+e:au;aw=aw.replace(/\s*\/>$/,">")+ap+"</"+ao[0].name+">";ar.replaceContent(aw,ao[0].start,ao[0].end);}return true;}else{return false;}}function W(aq,at){var e=aq.length,ar=0,am=e-1;for(var ao=at-1;ao>0;ao--){var ap=aq.charAt(ao);if(ap=="\n"||ap=="\r"){ar=ao+1;break;}}for(var an=at;an<e;an++){var ap=aq.charAt(an);if(ap=="\n"||ap=="\r"){am=an;break;}}return{start:ar,end:am};}function O(ap){var e=ap.getCaretPos(),aq=String(ap.getContent());var ar=Y.html_matcher.getTags(aq,e,String(ap.getProfileName()));if(ar&&ar[0]){if(!ar[1]){ap.replaceContent(Y.getCaretPlaceholder(),ar[0].start,ar[0].end);}else{var an=z(aq,ar[0].end,ar[1].start),ao=W(aq,an[0]),at=al(aq.substring(ao.start,ao.end)),am=aq.substring(an[0],an[1]);am=s(am,at);ap.replaceContent(Y.getCaretPlaceholder()+am,ar[0].start,ar[1].end);}return true;
8
+ }else{return false;}}function k(e,am,an){an=an||0;return am.charAt(an)==e.charAt(0)&&am.substr(an,e.length)==e;}function r(ao){var ap=String(ao.getSelection()),am=ao.getCaretPos();if(!ap){var aq=String(ao.getContent()),an,e;while(am-->=0){if(k("src=",aq,am)){if(e=aq.substr(am).match(/^(src=(["'])?)([^'"<>\s]+)\1?/)){ap=e[3];am+=e[1].length;}break;}else{if(k("url(",aq,am)){if(e=aq.substr(am).match(/^(url\((['"])?)([^'"\)\s]+)\1?/)){ap=e[3];am+=e[1].length;}break;}}}}if(ap){if(k("data:",ap)){return T(ao,ap,am);}else{return h(ao,ap,am);}}else{return false;}}function h(ao,ap,ar){var e=ao.getFilePath(),am="application/octet-stream";if(e===null){throw"You should save your file before using this action";}var aq=zen_file.locateFile(e,ap);if(aq===null){throw"Can't find "+ap+" file";}var an=x.encode(String(zen_file.read(aq)));if(!an){throw"Can't encode file content to base64";}an="data:"+(x.mime_types[String(zen_file.getExt(aq))]||am)+";base64,"+an;ao.replaceContent("$0"+an,ar,ar+ap.length);return true;}function T(an,ao,ap){var am=String(an.prompt("Enter path to file (absolute or relative)"));if(!am){return false;}var e=zen_file.createPath(an.getFilePath(),am);if(!e){throw"Can't save file";}zen_file.save(e,x.decode(ao.replace(/^data\:.+?;.+?,/,"")));an.replaceContent("$0"+am,ap,ap+ao.length);return true;}function p(e,am){return e.toFixed(typeof am=="undefined"?2:am).replace(/\.?0+$/,"");}function ad(ao,an){var ap=String(ao.getContent()),am=ap.length,e=ao.getCaretPos()-1,aq=e+1;while(e>=0&&an(ap.charAt(e),e,ap)){e--;}while(aq<am&&an(ap.charAt(aq),aq,ap)){aq++;}return aq>e?[++e,aq]:null;}function y(ao,ar){var aq=String(ao.getContent()),e=false,an=false;var ap=ad(ao,function(at){if(Y.isNumeric(at)){return true;}if(at=="."){return an?false:an=true;}if(at=="-"){return e?false:e=true;}return false;});if(ap){var am=parseFloat(aq.substring(ap[0],ap[1]));if(!isNaN(am)){am=p(am+ar);ao.replaceContent(am,ap[0],ap[1]);ao.createSelection(ap[0],ap[0]+am.length);return true;}}return false;}function aa(an){var aq=String(an.getContent()),ap=".+-*/\\";var ao=ad(an,function(e){return Y.isNumeric(e)||ap.indexOf(e)!=-1;});if(ao){var at=aq.substring(ao[0],ao[1]);at=at.replace(/([\d\.\-]+)\\([\d\.\-]+)/g,"Math.round($1/$2)");try{var am=new Function("return "+at)();am=p(am);an.replaceContent(am,ao[0],ao[1]);an.setCaretPos(ao[0]+am.length);return true;}catch(ar){}}return false;}Y.registerAction("expand_abbreviation",R);Y.registerAction("expand_abbreviation_with_tab",L);Y.registerAction("match_pair",i);Y.registerAction("match_pair_inward",function(e){i(e,"in");});Y.registerAction("match_pair_outward",function(e){i(e,"out");});Y.registerAction("wrap_with_abbreviation",v);Y.registerAction("prev_edit_point",t);Y.registerAction("next_edit_point",V);Y.registerAction("insert_formatted_line_break",S);Y.registerAction("insert_formatted_line_break_only",D);Y.registerAction("select_line",a);Y.registerAction("matching_pair",l);Y.registerAction("merge_lines",w);Y.registerAction("toggle_comment",ai);Y.registerAction("split_join_tag",G);Y.registerAction("remove_tag",O);Y.registerAction("encode_decode_data_url",r);Y.registerAction("increment_number_by_1",function(e){return y(e,1);});Y.registerAction("decrement_number_by_1",function(e){return y(e,-1);});Y.registerAction("increment_number_by_10",function(e){return y(e,10);});Y.registerAction("decrement_number_by_10",function(e){return y(e,-10);});Y.registerAction("increment_number_by_01",function(e){return y(e,0.1);});Y.registerAction("decrement_number_by_01",function(e){return y(e,-0.1);});Y.registerAction("evaluate_math_expression",aa);(function(){var aq=/^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,aD=/^<\/([\w\:\-]+)[^>]*>/,aA=/([\w\-:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;var av=ay("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed");var au=ay("address,applet,blockquote,button,center,dd,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,isindex,li,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul");var ar=ay("a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var");var aw=ay("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");var am="xhtml";var aB={opening_tag:null,closing_tag:null,start_ix:-1,end_ix:-1};function aC(e){if(!e||e!="html"){e="xhtml";}am=e;}function aF(aH,e){var aG=aH[1].toLowerCase();return{name:aG,full_tag:aH[0],start:e,end:e+aH[0].length,unary:Boolean(aH[3])||(aG in av&&am=="html"),has_close:Boolean(aH[3]),type:"tag",close_self:(aG in aw&&am=="html")};}function an(aG,e){return{start:aG,end:e,type:"comment"};}function ay(aI){var aH={},e=aI.split(",");for(var aG=0;aG<e.length;aG++){aH[e[aG]]=true;}return aH;}function az(aI,aJ,e){e=e||0;var aH=-1,aG=-1;if(aI&&!aJ){aH=aI.start;aG=aI.end;}else{if(aI&&aJ){if((aI.start<e&&aI.end>e)||(aJ.start<=e&&aJ.end>e)){aH=aI.start;
9
+ aG=aJ.end;}else{aH=aI.end;aG=aJ.start;}}}return[aH,aG];}function ax(aH,aI,e){e=e||0;aB.opening_tag=aH;aB.closing_tag=aI;var aG=az(aH,aI,e);aB.start_ix=aG[0];aB.end_ix=aG[1];return aB.start_ix!=-1?[aB.start_ix,aB.end_ix]:null;}function ap(aH,aG,e){if(e.has_close){return null;}else{}}function at(aJ,aG,aN,aT){aT=aT||az;aC(aN);var aR=[],aS=[],aM=null,aK=null,aO=null,aI=aJ.length,aQ,aH,e;aR.last=aS.last=function(){return this[this.length-1];};function aV(aX,aY){if(arguments.length==1){aY=aH;}return aJ.substr(aY,aX.length)==aX;}function aP(aX){while(aX--){if(aJ.charAt(aX)=="<"&&aV("<!--",aX)){break;}}return aX;}aH=aG;while(aH--&&aH>=0){var aL=aJ.charAt(aH);if(aL=="<"){var aW=aJ.substring(aH,aI);if((aQ=aW.match(aD))){e=aF(aQ,aH);if(e.start<aG&&e.end>aG){aK=e;}else{aS.push(e);}}else{if((aQ=aW.match(aq))){e=aF(aQ,aH);if(e.unary){if(e.start<aG&&e.end>aG){return aT(e,null,aG);}}else{if(aS.last()&&aS.last().name==e.name){aS.pop();}else{aM=e;break;}}}else{if(aW.indexOf("<!--")==0){var aU=aW.search("-->")+aH+3;if(aH<aG&&aU>=aG){return aT(an(aH,aU));}}}}}else{if(aL=="-"&&aV("-->")){aH=aP(aH);}}}if(!aM){return aT(null);}if(!aK){for(aH=aG;aH<aI;aH++){var aL=aJ.charAt(aH);if(aL=="<"){var aW=aJ.substring(aH,aI);if((aQ=aW.match(aq))){e=aF(aQ,aH);if(!e.unary){aR.push(e);}}else{if((aQ=aW.match(aD))){var e=aF(aQ,aH);if(aR.last()&&aR.last().name==e.name){aR.pop();}else{aK=e;break;}}else{if(aV("<!--")){aH+=aW.search("-->")+2;}}}}else{if(aL=="-"&&aV("-->")){if(!aR.last()||aR.last().type!="comment"){var aU=aH+3;return aT(an(aP(aH),aU));}}}}}return aT(aM,aK,aG);}var ao=function(aG,e,aH){return at(aG,e,aH,ax);};ao.start_tag=aq;ao.end_tag=aD;ao.find=function(aG,e,aH){return at(aG,e,aH);};ao.getTags=function(aG,e,aH){return at(aG,e,aH,function(aI,aJ){return[aI,aJ];});};ao.last_match=aB;try{Y.html_matcher=ao;}catch(aE){}})();var x={chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",mime_types:{"gif":"image/gif","png":"image/png","jpg":"image/jpeg","jpeg":"image/jpeg","svg":"image/svg+xml","html":"text/html","htm":"text/html"},encode:function(ar){var am=[];var aA,ay,aw,az,ax,av,au,at,aq,ao;var an=0,ap=ar.length,e=this.chars;while(an<ap){at=ar.charCodeAt(an++);aq=ar.charCodeAt(an++);ao=ar.charCodeAt(an++);aA=at&255;ay=aq&255;aw=ao&255;az=aA>>2;ax=((aA&3)<<4)|(ay>>4);av=((ay&15)<<2)|(aw>>6);au=aw&63;if(isNaN(aq)){av=au=64;}else{if(isNaN(ao)){au=64;}}am.push(e.charAt(az)+e.charAt(ax)+e.charAt(av)+e.charAt(au));}return am.join("");},decode:function(at){var ao,am,e,ax,aw,av,au,az,ar=0,aA=0,ap="",aq=[];var an=this.chars,ay=at.length;if(!at){return at;}at+="";do{ax=an.indexOf(at.charAt(ar++));aw=an.indexOf(at.charAt(ar++));av=an.indexOf(at.charAt(ar++));au=an.indexOf(at.charAt(ar++));az=ax<<18|aw<<12|av<<6|au;ao=az>>16&255;am=az>>8&255;e=az&255;if(av==64){aq[aA++]=String.fromCharCode(ao);}else{if(au==64){aq[aA++]=String.fromCharCode(ao,am);}else{aq[aA++]=String.fromCharCode(ao,am,e);}}}while(ar<ay);return aq.join("");}};var Q=(function(){var ar={toString:function(){return"StopIteration";}};function aq(aw,ay){if(aw.next){try{while(true){ay(aw.next());}}catch(az){if(az!=ar){throw az;}}}else{for(var ax=0;ax<aw.length;ax++){ay(aw[ax]);}}}function au(az,ay){function ax(aA){return aA!="\n"&&/^[\s\u00a0]*$/.test(aA);}var aw={state:ay,take:function(aA){if(typeof(aA)=="string"){aA={style:aA,type:aA};}aA.content=(aA.content||"")+az.get();if(!/\n$/.test(aA.content)){az.nextWhile(ax);}aA.value=aA.content+az.get();return aA;},next:function(){if(!az.more()){throw ar;}var aA;if(az.equals("\n")){az.next();return this.take("whitespace");}if(az.applies(ax)){aA="whitespace";}else{while(!aA){aA=this.state(az,function(aB){aw.state=aB;});}}return this.take(aA);}};return aw;}var e=function(aA){var aB="";var aC=0;var az="";if(typeof aA=="string"){var ax=aA,ay=false;aA={next:function(){if(!ay){ay=true;return ax;}else{throw ar;}}};}function aw(){while(aC==aB.length){az+=aB;aB="";aC=0;try{aB=aA.next();}catch(aD){if(aD!=ar){throw aD;}else{return false;}}}return true;}return{peek:function(){if(!aw()){return null;}return aB.charAt(aC);},next:function(){if(!aw()){if(az.length>0){throw"End of stringstream reached without emptying buffer ('"+az+"').";}else{throw ar;}}return aB.charAt(aC++);},get:function(){var aD=az;az="";if(aC>0){aD+=aB.slice(0,aC);aB=aB.slice(aC);aC=0;}return aD;},push:function(aD){aB=aB.slice(0,aC)+aD+aB.slice(aC);},lookAhead:function(aK,aF,aG,aH){function aJ(aO){return aH?aO.toLowerCase():aO;}aK=aJ(aK);var aN=false;var aM=az,aL=aC;if(aG){this.nextWhileMatches(/[\s\u00a0]/);}while(true){var aE=aC+aK.length,aD=aB.length-aC;if(aE<=aB.length){aN=aK==aJ(aB.slice(aC,aE));aC=aE;break;}else{if(aK.slice(0,aD)==aJ(aB.slice(aC))){az+=aB;aB="";try{aB=aA.next();}catch(aI){if(aI!=ar){throw aI;}break;}aC=0;aK=aK.slice(aD);}else{break;}}}if(!(aN&&aF)){aB=az.slice(aM.length)+aB;aC=aL;az=aM;}return aN;},lookAheadRegex:function(aF,aE){if(aF.source.charAt(0)!="^"){throw new Error("Regexps passed to lookAheadRegex must start with ^");}while(aB.indexOf("\n",aC)==-1){try{aB+=aA.next();
10
+ }catch(aG){if(aG!=ar){throw aG;}break;}}var aD=aB.slice(aC).match(aF);if(aD&&aE){aC+=aD[0].length;}return aD;},more:function(){return this.peek()!==null;},applies:function(aE){var aD=this.peek();return(aD!==null&&aE(aD));},nextWhile:function(aE){var aD;while((aD=this.peek())!==null&&aE(aD)){this.next();}},matches:function(aE){var aD=this.peek();return(aD!==null&&aE.test(aD));},nextWhileMatches:function(aE){var aD;while((aD=this.peek())!==null&&aE.test(aD)){this.next();}},equals:function(aD){return aD===this.peek();},endOfLine:function(){var aD=this.peek();return aD==null||aD=="\n";}};};var at={autoSelfClosers:{"br":true,"img":true,"hr":true,"link":true,"input":true,"meta":true,"col":true,"frame":true,"base":true,"area":true},doNotIndent:{"pre":true,"!cdata":true}};var ap={autoSelfClosers:{},doNotIndent:{"!cdata":true}};var an=at;var av=false;var ao=(function(){function aw(aB,aC){var aA=aB.next();if(aA=="<"){if(aB.equals("!")){aB.next();if(aB.equals("[")){if(aB.lookAhead("[CDATA[",true)){aC(ax("xml-cdata","]]>"));return null;}else{return"xml-text";}}else{if(aB.lookAhead("--",true)){aC(ax("xml-comment","-->"));return null;}else{if(aB.lookAhead("DOCTYPE",true)){aB.nextWhileMatches(/[\w\._\-]/);aC(ax("xml-doctype",">"));return"xml-doctype";}else{return"xml-text";}}}}else{if(aB.equals("?")){aB.next();aB.nextWhileMatches(/[\w\._\-]/);aC(ax("xml-processing","?>"));return"xml-processing";}else{if(aB.equals("/")){aB.next();}aC(az);return"xml-punctuation";}}}else{if(aA=="&"){while(!aB.endOfLine()){if(aB.next()==";"){break;}}return"xml-entity";}else{aB.nextWhileMatches(/[^&<\n]/);return"xml-text";}}}function az(aB,aC){var aA=aB.next();if(aA==">"){aC(aw);return"xml-punctuation";}else{if(/[?\/]/.test(aA)&&aB.equals(">")){aB.next();aC(aw);return"xml-punctuation";}else{if(aA=="="){return"xml-punctuation";}else{if(/[\'\"]/.test(aA)){aC(ay(aA));return null;}else{aB.nextWhileMatches(/[^\s\u00a0=<>\"\'\/?]/);return"xml-name";}}}}}function ay(aA){return function(aB,aC){while(!aB.endOfLine()){if(aB.next()==aA){aC(az);break;}}return"xml-attribute";};}function ax(aB,aA){return function(aC,aD){while(!aC.endOfLine()){if(aC.lookAhead(aA,true)){aD(aw);break;}aC.next();}return aB;};}return function(aB,aA){return au(aB,aA||aw);};})();function am(aS){var aO=ao(aS),aJ;var aP=[aG];var aF=0,aR=0;var aQ=null,aD=null;var aM;function aI(aW){for(var aX=aW.length-1;aX>=0;aX--){aP.push(aW[aX]);}}function aB(){aI(arguments);aM=true;}function aw(){aI(arguments);aM=false;}function aC(){aJ.style+=" xml-error";}function aE(aW){return function(aX,aY){if(aY==aW){aB();}else{aC();aB(arguments.callee);}};}function aH(aX,aY){var aW=an.doNotIndent.hasOwnProperty(aX)||(aD&&aD.noIndent);aD={prev:aD,name:aX,indent:aR,startOfLine:aY,noIndent:aW};}function aU(){aD=aD.prev;}function ax(aW){return function(aX,aZ){var aY=aW;if(aY&&aY.noIndent){return aZ;}if(av&&/<!\[CDATA\[/.test(aX)){return 0;}if(aY&&/^<\//.test(aX)){aY=aY.prev;}while(aY&&!aY.startOfLine){aY=aY.prev;}if(aY){return aY.indent+indentUnit;}else{return 0;}};}function aG(){return aw(az,aG);}var aA={"xml-text":true,"xml-entity":true,"xml-comment":true,"xml-processing":true,"xml-doctype":true};function az(aW,aX){if(aX=="<"){aB(aV,aL,ay(aF==1));}else{if(aX=="</"){aB(aK,aE(">"));}else{if(aW=="xml-cdata"){if(!aD||aD.name!="!cdata"){aH("!cdata");}if(/\]\]>$/.test(aX)){aU();}aB();}else{if(aA.hasOwnProperty(aW)){aB();}else{aC();aB();}}}}}function aV(aW,aX){if(aW=="xml-name"){aQ=aX.toLowerCase();aJ.style="xml-tagname";aB();}else{aQ=null;aw();}}function aK(aW,aX){if(aW=="xml-name"){aJ.style="xml-tagname";if(aD&&aX.toLowerCase()==aD.name){aU();}else{aC();}}aB();}function ay(aW){return function(aX,aY){if(aY=="/>"||(aY==">"&&an.autoSelfClosers.hasOwnProperty(aQ))){aB();}else{if(aY==">"){aH(aQ,aW);aB();}else{aC();aB(arguments.callee);}}};}function aL(aW){if(aW=="xml-name"){aJ.style="xml-attname";aB(aN,aL);}else{aw();}}function aN(aW,aX){if(aX=="="){aB(aT);}else{if(aX==">"||aX=="/>"){aw(ay);}else{aw();}}}function aT(aW){if(aW=="xml-attribute"){aB(aT);}else{aw();}}return{indentation:function(){return aR;},next:function(){aJ=aO.next();if(aJ.style=="whitespace"&&aF==0){aR=aJ.value.length;}else{aF++;}if(aJ.content=="\n"){aR=aF=0;aJ.indentation=ax(aD);}if(aJ.style=="whitespace"||aJ.type=="xml-comment"){return aJ;}while(true){aM=false;aP.pop()(aJ.style,aJ.content);if(aM){return aJ;}}},copy:function(){var aY=aP.concat([]),aX=aO.state,aW=aD;var aZ=this;return function(a0){aP=aY.concat([]);aF=aR=0;aD=aW;aO=ao(a0,aX);return aZ;};}};}return{make:function(aw){if(typeof aw=="string"){aw=e(aw);}return am(aw);}};})();var K=(function(){var e,aA=[],an,av,aw;e={lines:null,total_lines:0,linenum:-1,line:"",ch:"",chnum:-1,init:function(aE){var aD=e;aD.lines=aE.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split("\n");aD.total_lines=aD.lines.length;aD.chnum=-1;aD.linenum=-1;aD.ch="";aD.line="";aD.nextLine();aD.nextChar();},nextLine:function(){var aD=this;aD.linenum+=1;if(aD.total_lines<=aD.linenum){aD.line=false;}else{aD.line=aD.lines[aD.linenum];
11
+ }if(aD.chnum!==-1){aD.chnum=0;}return aD.line;},nextChar:function(){var aD=this;aD.chnum+=1;while(aD.line.charAt(aD.chnum)===""){if(this.nextLine()===false){aD.ch=false;return false;}aD.chnum=-1;aD.ch="\n";return"\n";}aD.ch=aD.line.charAt(aD.chnum);return aD.ch;},peek:function(){return this.line.charAt(this.chnum+1);}};av=function(aD){return(aD==="_"||aD==="-"||(aD>="a"&&aD<="z")||(aD>="A"&&aD<="Z"));};aw=function(aD){return(aD!==false&&aD>="0"&&aD<="9");};an=(function(){var aD="{}[]()+*=.,;:>~|\\%$#@^!".split(""),aF="*^|$~".split(""),aG={},aH={},aE=0;for(;aE<aD.length;aE+=1){aG[aD[aE]]=true;}for(aE=0;aE<aF.length;aE+=1){aH[aF[aE]]=true;}return function(aI,aJ){if(aJ){return !!aH[aI];}return !!aG[aI];};}());function az(aD){return typeof aD!=="undefined";}function au(){return{"char":e.chnum,line:e.linenum};}function am(aG,aF,aE){var aD=e,aH=aE||{};aA.push({charstart:az(aH["char"])?aH["char"]:aD.chnum,charend:az(aH.charend)?aH.charend:aD.chnum,linestart:az(aH.line)?aH.line:aD.linenum,lineend:az(aH.lineend)?aH.lineend:aD.linenum,value:aG,type:aF||aG});}function ay(aD,aH){var aF=e,aG=aH||{},aI=az(aG["char"])?aG["char"]:aF.chnum,aE=az(aG.line)?aG.line:aF.linenum;return{name:"ParseError",message:aD+" at line "+(aE+1)+" char "+(aI+1),walker:aF,tokens:aA};}function at(){var aF=e.ch,aE="",aD=au();while(aF===" "||aF==="\t"){aE+=aF;aF=e.nextChar();}am(aE,"white",aD);}function aq(){var aD=e,aH=aD.ch,aF=aH,aG,aE=au();aG=aD.nextChar();if(aG!=="*"){aE.charend=aE["char"];aE.lineend=aE.line;return am(aF,aF,aE);}while(!(aH==="*"&&aG==="/")){aF+=aG;aH=aG;aG=aD.nextChar();}aF+=aG;aD.nextChar();am(aF,"comment",aE);}function ax(){var aD=e,aI=aD.ch,aH=aI,aF=aI,aG,aE=au();aI=aD.nextChar();while(aI!==aH){if(aI==="\n"){aG=aD.nextChar();if(aG==="\\"){aF+=aI+aG;}else{throw ay("Unterminated string",aE);}}else{if(aI==="\\"){aF+=aI+aD.nextChar();}else{aF+=aI;}}aI=aD.nextChar();}aF+=aI;aD.nextChar();am(aF,"string",aE);}function aC(){var aD=e,aH=aD.ch,aG=0,aF=aH,aE=au();aH=aD.nextChar();while(aH!==")"&&!aG){if(aH==="("){aG++;}else{if(aH===")"){aG--;}else{if(aH===false){throw ay("Unterminated brace",aE);}}}aF+=aH;aH=aD.nextChar();}aF+=aH;aD.nextChar();am(aF,"brace",aE);}function ar(aG){var aD=e,aH=aD.ch,aE=au(),aF=(aG)?aG+aH:aH;aH=aD.nextChar();if(aG){aE["char"]-=aG.length;}while(av(aH)||aw(aH)){aF+=aH;aH=aD.nextChar();}am(aF,"identifier",aE);}function ao(){var aE=e,aI=aE.ch,aF=au(),aG=aI,aD=aG===".",aH;aI=aE.nextChar();aH=!aw(aI);if(aD&&aH){aF.charend=aF["char"];aF.lineend=aF.line;return am(aG,".",aF);}if(aG==="-"&&aH){return ar("-");}while(aI!==false&&(aw(aI)||(!aD&&aI==="."))){if(aI==="."){aD=true;}aG+=aI;aI=aE.nextChar();}am(aG,"number",aF);}function ap(){var aD=e,aH=aD.ch,aE=au(),aF=aH,aG=aD.nextChar();if(aG==="="&&an(aF,true)){aF+=aG;am(aF,"match",aE);aD.nextChar();return;}aE.charend=aE["char"]+1;aE.lineend=aE.line;am(aF,aF,aE);}function aB(){var aD=e.ch;if(aD===" "||aD==="\t"){return at();}if(aD==="/"){return aq();}if(aD==='"'||aD==="'"){return ax();}if(aD==="("){return aC();}if(aD==="-"||aD==="."||aw(aD)){return ao();}if(av(aD)){return ar();}if(an(aD)){return ap();}if(aD==="\n"){am("line");e.nextChar();return;}throw ay("Unrecognized character");}return{lex:function(aD){e.init(aD);aA=[];while(e.ch!==false){aB();}return aA;},toSource:function(aH){var aF=0,aD=aH.length,aE,aG="";for(;aF<aD;aF+=1){aE=aH[aF];if(aE.type==="line"){aG+="\n";}else{aG+=aE.value;}}return aG;}};}());var C=(function(){var e="{}/\\<>";function ap(ar){var aq="{};:";return aq.indexOf(ar.type)!=-1;}function ao(aq,ar){return aq.charAt(ar)=="\r"&&aq.charAt(ar+1)=="\n"?2:1;}function an(at,aw){var av,ay;for(var au=0,aq=at.length;au<aq;au++){av=at[au];if(av.type=="value"){av.children=[];ay=null;var ar=av.ref_start_ix;while(ar<=av.ref_end_ix){var ax=aw[ar];if(ax.type!="white"){if(!ay){ay=[ax.start,ax.end];}else{ay[1]=ax.end;}}else{if(ay){av.children.push(ay);ay=null;}}ar++;}if(ay){av.children.push(ay);}}}return at;}function am(ar,at,au,aq){at=at||"";return{type:ar||"",content:at,start:au,end:au+at.length,ref_start_ix:aq,ref_end_ix:aq};}return{parseCSS:function(aq,ar){return this.optimizeCSS(K.lex(aq),ar||0,aq);},parseHTML:function(ar,ax){var aw=Q.make(ar),aq=[],au,at=0;try{while(au=aw.next()){aq.push(am(au.style,au.content,ax+at,0));at+=au.value.length;}}catch(av){if(av!="StopIteration"){throw av;}}return aq;},optimizeCSS:function(aB,av,az){av=av||0;var aH=[],au,ax,aD,ar=0,aC=false,aA=false,aE=0,aG,at={selector:null,value:null},aw,aF=[];function ay(aI,aJ){if(aJ&&aJ in at){if(!at[aJ]){at[aJ]=am(aJ,aI.value,av+aE+aI.charstart,ax);aH.push(at[aJ]);}else{at[aJ].content+=aI.value;at[aJ].end+=aI.value.length;at[aJ].ref_end_ix=ax;}}else{aH.push(am(aI.type,aI.value,av+aE+aI.charstart,ax));}}for(ax=0,aD=aB.length;ax<aD;ax++){au=aB[ax];aG=null;if(au.type=="line"){aE+=ar;aw=az?ao(az,aE):1;var aq=aw==1?"\n":"\r\n";aF.push(am(au.type,aq,av+aE));aH.push(am(au.type,aq,av+aE,ax));aE+=aw;ar=0;continue;}aF.push(am(au.type,au.value,av+aE+au.charstart));ar=au.charstart+au.value.length;if(au.type!="white"){if(au.type=="{"){aC=true;
12
+ at.selector=null;}else{if(aC){if(au.type==":"){aA=true;}else{if(au.type==";"){aA=false;at.value=null;}else{if(au.type=="}"){aA=aC=false;at.value=null;}else{if(aA||at.value){aG="value";}}}}}else{if(at.selector||(!aC&&!ap(au))){aG="selector";}}}ay(au,aG);}else{if(ax<aD-1&&ap(aB[ax+1])){continue;}if(at.selector||at.value){ay(au,at.selector?"selector":"value");}}}aH.__original=aF;return an(aH,aF);},extractCSSRule:function(aw,ax,ay){var az="",at=aw.length,av=ax,ar=-1,aq;while(av>=0){aq=aw.charAt(av);if(aq=="{"){ar=av;break;}else{if(aq=="}"&&!ay){av++;break;}}av--;}while(av<at){aq=aw.charAt(av);if(aq=="{"){ar=av;}else{if(aq=="}"){if(ar!=-1){az=aw.substring(ar,av+1);}break;}}av++;}if(az){av=ar-1;var au="";while(av>=0){aq=aw.charAt(av);if(e.indexOf(aq)!=-1){break;}av--;}au=aw.substring(av+1,ar).replace(/^[\s\n\r]+/m,"");return[ar-au.length,ar+az.length];}return null;},token:am};})();function ak(e){if(e.getSyntax()!="css"){return false;}return E(e,B(e));}function J(am){var e;if(String(am.getSyntax())=="css"){e=aj(am);}else{e=ae(am);}return E(am,e);}function E(e,an){if(an){var am=e.getSelectionRange();e.replaceContent(an.data,an.start,an.end,true);e.createSelection(an.caret,an.caret+am.end-am.start);return true;}return false;}function ae(ap){var at=ap.getCaretPos();var aq=A(ap);if(aq){var ao=/\bsrc=(["'])(.+?)\1/i,e,ar;if(e=ao.exec(aq.tag)){ar=e[2];}if(ar){var an=ab(ap,ar);if(an){var am=N(aq.tag,"width",an.width);am=N(am,"height",an.height);return{"data":am,"start":aq.start,"end":aq.end,"caret":at};}}}return null;}function o(ar,an){var aq,at=-1,e=false;for(var ap=an,am=ar.length;ap<am;ap++){var ao=ar[ap];if(ao.type=="value"){aq=ao;at=ap;if(ar[ap+1]&&ar[ap+1].type==";"){aq=ar[ap+1];at+=1;}else{e=true;}break;}}return{token:aq,ix:at,need_col:e};}function aj(an){var e=an.getCaretPos(),aB=String(an.getContent()),aq=C.extractCSSRule(aB,e,true);if(aq){var aw=C.parseCSS(aB.substring(aq[0],aq[1]),aq[0]),am=b(aw,e,"identifier"),az=c(aw,am+1),aA;if(!az){return false;}var aD=o(aw,am);if(aA=/url\((["']?)(.+?)\1\)/i.exec(az.content)){var ay=ab(an,aA[2]);if(ay){var ap={width:null,height:null},av=[],at=Z(aw,am);for(var aC=0,au=aw.length;aC<au;aC++){if(aw[aC].type=="identifier"&&aw[aC].content in ap){ap[aw[aC].content]=aC;}}function ar(aG,aH){var aF;if(ap[aG]!==null&&(aF=c(aw,ap[aG]+1))){av.push([aF.start,aF.end,aH+"px"]);}else{av.push([aD.token.end,aD.token.end,at(aG,aH+"px")]);}}ar("width",ay.width);ar("height",ay.height);if(av.length){av.sort(function(aG,aF){return aG[0]-aF[0];});var aE=aB.substring(av[0][0],av[av.length-1][1]),ao=av[0][0];for(var aC=av.length-1;aC>=0;aC--){var ax=av[aC];aE=n(aE,ax[0]-ao,ax[1]-ao,ax[2]);if(ax[0]<e){e+=ax[2].length-ax[1]+ax[0];}}if(aD.need_col){aE=n(aE,aD.token.end-ao,aD.token.end-ao,";");}return{"data":aE,"start":ao,"end":av[av.length-1][1],"caret":e};}}}}return false;}function Z(ap,aq){var ao="",an="",am,e;aq=ap[aq].ref_start_ix;ap=ap.__original;for(am=aq-1;am>=0;am--){if(ap[am].type=="white"){ao=ap[am].content+ao;}else{if(ap[am].type=="line"){ao=ap[am].content+ao;break;}else{break;}}}for(am=aq+1,e=ap.length;am<e;am++){if(ap[am].type=="white"||ap[am].type==":"){an+=ap[am].content;}else{break;}}if(an.indexOf(":")==-1){an=":";}return function(ar,at){return ao+ar+an+at+";";};}function ab(am,an){var ao;if(an){if(k("data:",an)){ao=x.decode(an.replace(/^data\:.+?;.+?,/,""));}else{var e=zen_file.locateFile(am.getFilePath(),an);if(e===null){throw"Can't find "+an+" file";}ao=String(zen_file.read(e));}return Y.getImageSize(ao);}}function A(ao){var e=ao.getCaretPos(),ap=String(ao.getContent()),aq=ap.length,an=-1,am=-1;do{if(e<0){break;}if(ap.charAt(e)=="<"){if(ap.substring(e,e+4).toLowerCase()=="<img"){an=e;break;}else{return null;}}}while(e--);e=ao.getCaretPos();do{if(e>=aq){break;}if(ap.charAt(e)==">"){am=e+1;break;}}while(e++);if(an!=-1&&am!=-1){return{start:an,end:am,tag:ap.substring(an,am)};}return null;}function N(am,ao,an){if(am.toLowerCase().indexOf(ao)!=-1){var e=new RegExp(ao+"=(['\"])(.*?)(['\"])","i");return am.replace(e,function(ar,aq,ap){return ao+"="+aq+an+aq;});}else{return am.replace(/\s*(\/?>)$/," "+ao+'="'+an+'" $1');}}function B(ao){var aC=String(ao.getContent()),e=ao.getCaretPos(),av=C.extractCSSRule(aC,e),aw;if(!av||e<av[0]||e>av[1]){return false;}var ay=C.parseCSS(aC.substring(av[0],av[1]),av[0]),ar=b(ay,e,"identifier");if(ar!=-1){var aA=ay[ar].content,ax=c(ay,ar+1),az=M(aA),an=new RegExp("^(?:\\-\\w+\\-)?"+az+"$"),an=X(az),am=[];if(!ax){return false;}for(var aD=0,at,au=ay.length;aD<au;aD++){at=ay[aD];if(at.type=="identifier"&&an.test(at.content)&&at.content!=aA){aw=c(ay,aD+1);if(aw){am.push({name:at,value:aw});}}}if(am.length){var aE=aC.substring(am[0].value.start,am[am.length-1].value.end),ap=am[0].value.start,aB=ax.content,aq;for(var aD=am.length-1;aD>=0;aD--){aw=am[aD].value;aq=F(aA,aB,am[aD].name.content,aw.content);aE=n(aE,aw.start-ap,aw.end-ap,aq);if(aw.start<e){e+=aq.length-aw.content.length;}}return{"data":aE,"start":ap,"end":am[am.length-1].value.end,"caret":e};}}}Y.actions.doCSSReflection=B;
13
+ function M(e){return e.replace(/^\s*\-\w+\-/,"");}function X(am){am=M(am);var an="^(?:\\-\\w+\\-)?",e;if(am=="opacity"||am=="filter"){return new RegExp(an+"(?:opacity|filter)$");}else{if(e=am.match(/^border-radius-(top|bottom)(left|right)/)){return new RegExp(an+"(?:"+am+"|border-"+e[1]+"-"+e[2]+"-radius)$");}else{if(e=am.match(/^border-(top|bottom)-(left|right)-radius/)){return new RegExp(an+"(?:"+am+"|border-radius-"+e[1]+e[2]+")$");}}}return new RegExp(an+am+"$");}function F(ao,an,am,ap){ao=M(ao);am=M(am);if(ao=="opacity"&&am=="filter"){return ap.replace(/opacity=[^)]*/i,"opacity="+Math.floor(parseFloat(an)*100));}else{if(ao=="filter"&&am=="opacity"){var e=an.match(/opacity=([^)]*)/i);return e?p(parseInt(e[1])/100):ap;}}return an;}function c(ao,ap){for(var an=ap,e=ao.length;an<e;an++){var am=ao[an];if(am.type=="value"){return am;}else{if(am.type=="identifier"||am.type==";"){break;}}}return null;}function n(an,ao,e,am){return an.substring(0,ao)+am+an.substring(e);}function b(aq,ar,ao){var ap=-1;for(var an=0,e=aq.length;an<e;an++){var am=aq[an];if(am.start<=ar&&am.end>=ar){ap=an;break;}}if(ap!=-1){while(ap>=0){if(aq[ap].type==ao){return ap;}ap--;}}return -1;}Y.registerAction("reflect_css_value",ak);Y.registerAction("update_image_size",J);(function(){var ao=/^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,at={"xml-tagname":1,"xml-attname":1,"xml-attribute":1},ap={"selector":1,"identifier":1,"value":1};function aE(aG){var aF=true;return av(aG,false,function(aI,aH){if(aF){aF=false;return aw(aI,aH);}else{return au(aI,aH);}},aC);}function aB(aF){return av(aF,true,au,aD);}function aC(aO,aG,aK,aH){var aL=C.parseHTML(aO,aG),aJ=[];for(var aI=0,aM=aL.length;aI<aM;aI++){var aF=aL[aI],aN;if(aF.type in at){aN=aF.start>=aK;if(aF.type=="xml-attribute"&&e(aF.content.charAt(0))){aN=aF.start+1>=aK&&aF.end-1!=aH;}if(!aN&&!(aK==aH&&aF.end>aK)){continue;}if(aF.type=="xml-attname"){aJ=ax(aL,aI,aH<=aF.end?aF.start:-1);if(aJ){return aJ;}}else{if(aF.end>aH){aJ=[aF.start,aF.end];if(aF.type=="xml-attribute"){aJ=az(aF.content,aJ);}if(aK==aJ[0]&&aH==aJ[1]){continue;}return aJ;}}}}return null;}function aD(aO,aG,aK,aH){var aL=C.parseHTML(aO,aG),aJ;for(var aI=aL.length-1,aM=aL.length;aI>=0;aI--){var aF=aL[aI],aN;if(aF.type in at){aN=aF.start<aK;if(aF.type=="xml-attribute"&&e(aF.content.charAt(0))){aN=aF.start+1<aK;}if(!aN){continue;}if(aF.type=="xml-attname"){aJ=ax(aL,aI,aF.start);if(aJ){return aJ;}}else{aJ=[aF.start,aF.end];if(aF.type=="xml-attribute"){aJ=az(aF.content,aJ);}return aJ;}}}return null;}function aw(aG,aH){var aF;while(aH>=0){if(aF=au(aG,aH)){return aF;}aH--;}return null;}function au(aG,aH){var aF;if(aG.charAt(aH)=="<"&&(aF=aG.substring(aH,aG.length).match(ao))){return[aH,aH+aF[0].length];}}function e(aF){return aF=='"'||aF=="'";}function av(aM,aT,aQ,aG){var aO=String(aM.getContent()),aI=aO.length,aR,aS,aF,aK=100000,aP=[-1,-1],aH=aM.getSelectionRange(),aL=Math.min(aH.start,aH.end),aJ=Math.max(aH.start,aH.end);var aN=aL;while(aN>=0&&aN<aI&&aK>0){aK--;if((aR=aQ(aO,aN,aT))){if(aP[0]==aR[0]&&aP[1]==aR[1]){break;}aP[0]=aR[0];aP[1]=aR[1];aS=aO.substring(aR[0],aR[1]);aF=aG(aS,aR[0],aL,aJ);if(aF){aM.createSelection(aF[0],aF[1]);return true;}else{aN=aT?aR[0]:aR[1]-1;}}aN+=aT?-1:1;}return false;}function an(aF){return av(aF,false,C.extractCSSRule,aA);}function ay(aF){return av(aF,true,C.extractCSSRule,ar);}function aA(aP,aI,aN,aL){var aO=C.parseCSS(aP,aI),aT,aM=[];function aS(aU){return aU[0]==aN&&aU[1]==aL;}for(var aK=0,aR=aO.length;aK<aR;aK++){var aG=aO[aK],aT;if(aG.type in ap){if(aN==aL){aT=aG.end>aN;}else{aT=aG.start>=aN;if(aG.type=="value"){aT=aT||aN>=aG.start&&aG.end>=aL;}}if(!aT){continue;}if(aG.type=="identifier"){var aQ=aq(aO,aK,aL<=aG.end?aG.start:-1);if(aQ){return aQ;}}else{if(aG.type=="value"&&aL>aG.start&&aG.children){var aF=aG.children;for(var aH=0,aJ=aF.length;aH<aJ;aH++){if(aF[aH][0]>=aN||(aN==aL&&aF[aH][1]>aN)){aM=[aF[aH][0],aF[aH][1]];if(aS(aM)){var aQ=am(aP,aM[0],aM[1],aI);if(!aS(aQ)){return aQ;}else{continue;}}return aM;}}}else{if(aG.end>aL){return[aG.start,aG.end];}}}}}return null;}function ar(aO,aI,aM,aJ){var aN=C.parseCSS(aO,aI),aL=[];function aS(aT){return aT[0]==aM&&aT[1]==aJ;}for(var aK=aN.length-1,aQ=aN.length;aK>=0;aK--){var aG=aN[aK],aR;if(aG.type in ap){aR=aG.start<aM;if(aG.type=="value"&&aG.ref_start_ix!=aG.ref_end_ix){aR=aG.start<=aM;}if(!aR){continue;}if(aG.type=="identifier"){var aP=aq(aN,aK,aG.start);if(aP){return aP;}}else{if(aG.type=="value"&&aG.ref_start_ix!=aG.ref_end_ix){var aF=aG.children;for(var aH=aF.length-1;aH>=0;aH--){if(aF[aH][0]<aM){aL=[aF[aH][0],aF[aH][1]];var aP=am(aO,aL[0],aL[1],aI);return !aS(aP)?aP:aL;}}aL=[aG.start,aG.end];if(!aS(aL)){return aL;}}else{return[aG.start,aG.end];}}}}return null;}function aq(aJ,aH,aK){for(var aG=aH+1,aF=aJ.length;aG<aF;aG++){var aI=aJ[aG];if((aI.type=="value"&&aK==-1)||aI.type=="identifier"){return[aI.start,aI.end];}else{if(aI.type==";"){return[aK==-1?aI.start:aK,aI.end];}else{if(aI.type=="}"){return[aK==-1?aI.start:aK,aI.start-1];
14
+ }}}}return null;}function ax(aJ,aH,aK){for(var aG=aH+1,aF=aJ.length;aG<aF;aG++){var aI=aJ[aG];if(aI.type=="xml-attribute"){if(aK==-1){return az(aI.content,[aI.start,aI.end]);}else{return[aK,aI.end];}}else{if(aI.type=="xml-attname"){return[aI.start,aJ[aH].end];}}}return null;}function az(aF,aG){if(e(aF.charAt(0))){aG[0]++;}if(e(aF.charAt(aF.length-1))){aG[1]--;}return aG;}function am(aI,aJ,aG,aH){aI=aI.substring(aJ-aH,aG-aH);var aF;if(aF=aI.match(/^[\w\-]+\(['"]?/)){aJ+=aF[0].length;if(aF=aI.match(/['"]?\)$/)){aG-=aF[0].length;}}return[aJ,aG];}Y.registerAction("select_next_item",function(aF){if(aF.getSyntax()=="css"){return an(aF);}else{return aE(aF);}});Y.registerAction("select_previous_item",function(aF){if(aF.getSyntax()=="css"){return ay(aF);}else{return aB(aF);}});})();(function(){function e(ar,aq){var au=ar.getAttribute("id"),ap=ar.getAttribute("class"),ao=Y.getNewline();if(au||ap){var av="",at=(ar.parent)?ar.parent.padding:"";if(au){av+="#"+au;}if(ap){av+="."+ap;}ar.start=ar.start.replace(/</,"<!-- "+av+" -->"+ao+at+"<");ar.end=ar.end.replace(/>/,">"+ao+at+"<!-- /"+av+" -->");var an=Y.getCounterForNode(ar);ar.start=Y.replaceCounter(ar.start,an);ar.end=Y.replaceCounter(ar.end,an);}}function am(an,aq){if(aq.tag_nl===false){return an;}for(var ap=0,ao=an.children.length;ap<ao;ap++){var ar=an.children[ap];if(ar.isBlock()){e(ar,ap);}am(ar,aq);}return an;}Y.registerFilter("c",am);})();(function(){var e=/(.+)\!$/;function am(an,aq){for(var ap=0,ao=an.children.length;ap<ao;ap++){var ar=an.children[ap];if(ar.type=="snippet"&&e.test(ar.real_name)){ar.start=ar.start.replace(/(;?)$/," !important$1");}am(ar,aq);}return an;}Y.registerFilter("css",am);})();(function(){var am={"<":"&lt;",">":"&gt;","&":"&amp;"};function e(ao){return ao.replace(/([<>&])/g,function(aq,ap){return am[ap];});}function an(ao,ar,au){for(var aq=0,ap=ao.children.length;aq<ap;aq++){var at=ao.children[aq];at.start=e(at.start);at.end=e(at.end);an(at);}return ao;}Y.registerFilter("e",an);})();(function(){function e(am,ap){for(var ao=0,an=am.children.length;ao<an;ao++){var aq=am.children[ao];if(aq.type=="snippet"){aq.start=aq.start.replace(/([\w\-]+\s*:)(?!:)\s*/,"$1 ");}e(aq,ap);}return am;}Y.registerFilter("fc",e);})();(function(){var aq="${child}",ar="%s";function an(){return Y.getNewline();}function at(){return ac.getVariable("indentation");}function e(ax){return(ax.parent&&ax.parent.hasBlockChildren());}function aw(ax){return ax.parent&&!ax.parent.parent&&!ax.previousSibling;}function ap(ay,ax){if(!ax.inline_break){return false;}while(ay.previousSibling&&ay.previousSibling.isInline()){ay=ay.previousSibling;}if(!ay.isInline()){return false;}var az=1;while(ay=ay.nextSibling){if(ay.type=="text"||!ay.isInline()){az=0;}else{if(ay.isInline()){az++;}}}return az>=ax.inline_break;}function au(ay,ax){return(ay.children.length&&ap(ay.children[0],ax));}function av(aE,az,ax){var aB=aE.source.value;if(!aB){return ao(aE,az,ax);}aE.start=aE.end=ar;var aC=(aE.parent)?aE.parent.padding:Y.repeatString(at(),ax);if(!aw(aE)){aE.start=an()+aC+aE.start;}var aA=aB.split(aq),aF=Y.splitByLines(aA[0]||""),aD=at();if(aF.length>1){var ay=aF[aF.length-1].match(/^(\s+)/);if(ay){aD=ay[1];}}aE.padding=aC+aD;return aE;}function ao(az,ay,aD){if(!az.name){return az;}az.start=az.end=ar;var aB=(az.isUnary()&&!az.children.length);if(ay.tag_nl!==false){var aA=(az.parent)?az.parent.padding:Y.repeatString(at(),aD),aC=(ay.tag_nl===true),ax=ap(az,ay);if(az.type!="text"){if(((az.isBlock()||ax)&&az.parent)||aC){if(!az.parent||(az.parent.type!="snippet"&&!aw(az))){az.start=an()+aA+az.start;}if(az.hasBlockChildren()||au(az,ay)||(aC&&!aB)){az.end=an()+aA+az.end;}if(az.hasTagsInContent()||(aC&&!az.hasChildren()&&!aB)){az.start+=an()+aA+at();}}else{if(az.isInline()&&e(az)&&!aw(az)){az.start=an()+aA+az.start;}else{if(az.isInline()&&az.hasBlockChildren()){az.end=an()+aA+az.end;}}}az.padding=aA+at();}}return az;}function am(ax,aA,aC){aC=aC||0;for(var az=0,ay=ax.children.length;az<ay;az++){var aB=ax.children[az];aB=(aB.type=="tag")?ao(aB,aA,aC):av(aB,aA,aC);if(aB.content){aB.content=Y.padString(aB.content,aB.padding);}am(aB,aA,aC+1);}return ax;}Y.registerFilter("_format",am);})();(function(){var e="${child}";function ao(aB,ar){var ay="",au=ar.attr_quotes=="single"?"'":'"',az=ar.place_cursor?Y.getCaretPlaceholder():"",aA,av,ax;for(av=0;av<aB.attributes.length;av++){ax=aB.attributes[av];switch(ax.name.toLowerCase()){case"id":ay+="#"+(ax.value||az);break;case"class":ay+="."+(ax.value||az);break;}}var at=[];for(av=0;av<aB.attributes.length;av++){ax=aB.attributes[av];var aw=ax.name.toLowerCase();if(aw!="id"&&aw!="class"){aA=(ar.attr_case=="upper")?ax.name.toUpperCase():aw;at.push(":"+aA+" => "+au+(ax.value||az)+au);}}if(at.length){ay+="{"+at.join(", ")+"}";}return ay;}function am(aA,au,ar){var ay=aA.source.value;if(!ay){return aq(aA,au,ar);}var ax=ay.split(e),at=ax[0]||"",aw=ax[1]||"",az=aA.parent?aA.parent.padding:"";aA.start=aA.start.replace("%s",Y.padString(at,az));aA.end=aA.end.replace("%s",Y.padString(aw,az));
15
+ var av=function(aC,aB){if(aB=="id"||aB=="class"){return aA.getAttribute(aB);}else{return aC;}};aA.start=Y.replaceVariables(aA.start,av);aA.end=Y.replaceVariables(aA.end,av);return aA;}function an(ar){return(ar.parent&&ar.parent.hasBlockChildren());}function aq(aE,ax,ar){if(!aE.name){return aE;}var aC=ao(aE,ax),az="",aD=ax.place_cursor?Y.getCaretPlaceholder():"",aw="",at=(aE.isUnary()&&!aE.children.length),au="",ay="";if(ax.self_closing_tag&&at){aw="/";}var av="%"+((ax.tag_case=="upper")?aE.name.toUpperCase():aE.name.toLowerCase());if(av.toLowerCase()=="%div"&&aC&&aC.indexOf("{")==-1){av="";}aE.end="";au=av+aC+aw;var aB="%s";var aA=aE.start.indexOf(aB);aE.start=aE.start.substring(0,aA)+au+aE.start.substring(aA+aB.length);if(!aE.children.length&&!at){aE.start+=aD;}return aE;}function ap(ar,aw,ay){ay=ay||0;if(ay==0){ar=Y.runFilters(ar,aw,"_format");}for(var av=0,au=ar.children.length;av<au;av++){var ax=ar.children[av];ax=(ax.type=="tag")?aq(ax,aw,ay):am(ax,aw,ay);var at=Y.getCounterForNode(ax);ax.start=Y.unescapeText(Y.replaceCounter(ax.start,at));ax.end=Y.unescapeText(Y.replaceCounter(ax.end,at));ap(ax,aw,ay+1);}return ar;}Y.registerFilter("haml",ap);})();(function(){var e="${child}",ar=0;function ap(av,au){switch(String(au||"").toLowerCase()){case"lower":return av.toLowerCase();case"upper":return av.toUpperCase();}return av;}function ao(au,az){var ax="",aw=az.attr_quotes=="single"?"'":'"',aB=az.place_cursor?Y.getCaretPlaceholder():"",aA;for(var ay=0;ay<au.attributes.length;ay++){var av=au.attributes[ay];aA=ap(av.name,az.attr_case);ax+=" "+aA+"="+aw+(av.value||aB)+aw;}return ax;}function am(aC,aw,au){var aA=aC.source.value;if(!aA){return at(aC,aw,au);}var az=aA.split(e),av=az[0]||"",ay=az[1]||"",aB=aC.parent?aC.parent.padding:"";aC.start=aC.start.replace("%s",Y.padString(av,aB));aC.end=aC.end.replace("%s",Y.padString(ay,aB));var ax=function(aE,aD){if(aD=="id"||aD=="class"){return aC.getAttribute(aD);}else{return aE;}};aC.start=Y.replaceVariables(aC.start,ax);aC.end=Y.replaceVariables(aC.end,ax);return aC;}function an(au){return(au.parent&&au.parent.hasBlockChildren());}function at(aG,az,au){if(!aG.name){return aG;}var aE=ao(aG,az),aB="",aF=az.place_cursor?Y.getCaretPlaceholder():"",ay="",av=(aG.isUnary()&&!aG.children.length),aw="",aA="";if(az.self_closing_tag=="xhtml"){ay=" /";}else{if(az.self_closing_tag===true){ay="/";}}if(aG.type!="text"){var ax=ap(aG.name,az.tag_case);if(av){aw="<"+ax+aE+ay+">";aG.end="";}else{aw="<"+ax+aE+">";aA="</"+ax+">";}}var aD="%s";var aC=aG.start.indexOf(aD);aG.start=aG.start.substring(0,aC)+aw+aG.start.substring(aC+aD.length);aC=aG.end.indexOf(aD);aG.end=aG.end.substring(0,aC)+aA+aG.end.substring(aC+aD.length);if(!aG.children.length&&!av&&aG.content.indexOf(aF)==-1){aG.start+=aF;}return aG;}function aq(au,ay,aA){aA=aA||0;if(aA==0){au=Y.runFilters(au,ay,"_format");ar=0;}for(var ax=0,aw=au.children.length;ax<aw;ax++){var az=au.children[ax];az=(az.type=="tag")?at(az,ay,aA):am(az,ay,aA);var av=Y.getCounterForNode(az);az.start=Y.unescapeText(Y.replaceCounter(az.start,av));az.end=Y.unescapeText(Y.replaceCounter(az.end,av));az.content=Y.unescapeText(Y.replaceCounter(az.content,av));ar+=Y.upgradeTabstops(az,ar)+1;aq(az,ay,aA+1);}return au;}Y.registerFilter("html",aq);})();(function(){function e(am,aq,au){for(var ap=0,ao=am.children.length;ap<ao;ap++){var ar=am.children[ap];if(ar.type=="tag"){var at=/^\s+/;ar.start=ar.start.replace(at,"");ar.end=ar.end.replace(at,"");}var an=/[\n\r]/g;ar.start=ar.start.replace(an,"");ar.end=ar.end.replace(an,"");ar.content=ar.content.replace(an,"");e(ar);}return am;}Y.registerFilter("s",e);})();(function(){function e(am,ap,ar){for(var ao=0,an=am.children.length;ao<an;ao++){var aq=am.children[ao];if(aq.content){aq.content=aq.content.replace(/^([\s|\u00a0])?[\d|#|\-|\*|\u2022]+\.?\s*/,"$1");}e(aq);}return am;}Y.registerFilter("t",e);})();(function(){var am={"xsl:variable":1,"xsl:with-param":1};function e(ao){ao.start=ao.start.replace(/\s+select\s*=\s*(['"]).*?\1/,"");}function an(ao){for(var aq=0,ap=ao.children.length;aq<ap;aq++){var ar=ao.children[aq];if(ar.type=="tag"&&ar.name.toLowerCase() in am&&ar.children.length){e(ar);}an(ar);}}Y.registerFilter("xsl",an);})();var g=(function(){var ap=!!window.opera,ao=/mac\s+os/i.test(navigator.userAgent),aq={"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":":","'":'"',",":"<",".":">","/":"?","\\":"|"},an={"esc":27,"escape":27,"tab":9,"space":32,"return":13,"enter":13,"backspace":8,"scrolllock":145,"scroll_lock":145,"scroll":145,"capslock":20,"caps_lock":20,"caps":20,"numlock":144,"num_lock":144,"num":144,"pause":19,"break":19,"insert":45,"home":36,"delete":46,"end":35,"pageup":33,"page_up":33,"pu":33,"pagedown":34,"page_down":34,"pd":34,"plus":187,"minus":189,"left":37,"up":38,"right":39,"down":40,"f1":112,"f2":113,"f3":114,"f4":115,"f5":116,"f6":117,"f7":118,"f8":119,"f9":120,"f10":121,"f11":122,"f12":123},am={"ctrl":"⌃","control":"⌃","meta":"⌘","shift":"⇧","alt":"⌥","enter":"⏎","tab":"⇥","left":"←","right":"→","up":"↑","down":"↓"},at={"meta":"Ctrl","control":"Ctrl","left":"←","right":"→","up":"↑","down":"↓"},ar={SHIFT:1,CTRL:2,ALT:4,META:8};
16
+ function e(au){return au.charAt().toUpperCase()+au.substring(1);}return{compile:function(az){if(typeof az!="string"){return az;}var au=0,aA=az.toLowerCase().split("+"),ay,aw;for(var ax=0,av=aA.length;ax<av;ax++){aw=aA[ax];if(ao&&ap){if(aw=="ctrl"||aw=="control"){aw="meta";}else{if(aw=="meta"){aw="ctrl";}}}else{if(!ao&&aw=="meta"){aw="ctrl";}}if(aw=="ctrl"||aw=="control"){au|=ar.CTRL;}else{if(aw=="shift"){au|=ar.SHIFT;}else{if(aw=="alt"){au|=ar.ALT;}else{if(aw=="meta"){au|=ar.META;}else{ay=aw;}}}}}return{mask:au,key:ay};},test:function(aw,av){var au=0,ax=this.compile(aw);if(av.ctrlKey){au|=ar.CTRL;}if(av.shiftKey){au|=ar.SHIFT;}if(av.altKey){au|=ar.ALT;}if(av.metaKey){au|=ar.META;}var ay=av.keyCode?av.keyCode:av.which,az=String.fromCharCode(ay).toLowerCase();if(au!==ax.mask){return false;}if(ax.key.length>1){return an[ax.key]==ay;}else{if(ay==188){az=",";}if(ay==190){az=".";}if(ay==191){az="/";}if(az==ax.key){return true;}if(av.shiftKey&&aq[az]){return aq[az]==ax.key;}}return false;},format:function(aA){var az=ao?am:at,ay=ao?"":"+",ax=aA.toLowerCase().split("+"),au=[],aw;for(var av=0;av<ax.length;av++){aw=ax[av];au.push(aw in az?az[aw]:e(aw));}return au.join(ay);}};})();var m=(function(){var aG=null,ay="|",aB={profile:"xhtml",syntax:"html",use_tab:false,pretty_break:false},au={},ao=null;var aD=document.createElement("textarea");aD.value="\n";Y.setNewline(aD.value);aD=null;function aF(){return aG.value||"";}function an(){if("selectionStart" in aG){var aK=aG.selectionEnd-aG.selectionStart;return{start:aG.selectionStart,end:aG.selectionEnd};}else{if(document.selection){aG.focus();var aI=document.selection.createRange();if(aI===null){return{start:0,end:aF().length};}var aJ=aG.createTextRange();var aL=aJ.duplicate();aJ.moveToBookmark(aI.getBookmark());aL.setEndPoint("EndToStart",aJ);return{start:aL.text.length,end:aL.text.length+aI.text.length};}else{return null;}}}function aq(aL,aI){if(typeof(aI)=="undefined"){aI=aL;}if("setSelectionRange" in aG){aG.setSelectionRange(aL,aI);}else{if("createTextRange" in aG){var aJ=aG.createTextRange();aJ.collapse(true);var aK=Y.splitByLines(aF().substring(0,aL)).length-1;aI-=aK+Y.splitByLines(aF().substring(aL,aI)).length-1;aL-=aK;aJ.moveStart("character",aL);aJ.moveEnd("character",aI-aL);aJ.select();}}}function av(aN,aP){var aI=aN.length,aO=0,aJ=aI-1;for(var aL=aP-1;aL>0;aL--){var aM=aN.charAt(aL);if(aM=="\n"||aM=="\r"){aO=aL+1;break;}}for(var aK=aP;aK<aI;aK++){var aM=aN.charAt(aK);if(aM=="\n"||aM=="\r"){aJ=aK;break;}}return{start:aO,end:aJ};}function aC(){var aI=an();return aI?aI.start:null;}function aE(aI){return(aI.match(/^(\s+)/)||[""])[0];}function ap(){var aN=aG.className||"",aL=/\bzc\-(\w+)\-(\w+)/g,aJ,aI=am(ao);while((aJ=aL.exec(aN))){var aK=aJ[1].toLowerCase(),aM=aJ[2].toLowerCase();if(aM=="true"||aM=="yes"||aM=="1"){aM=true;}else{if(aM=="false"||aM=="no"||aM=="0"){aM=false;}}aI[aK]=aM;}return aI;}function aw(aI){return ap()[aI];}function am(aJ){aJ=aJ||{};var aI={};for(var aK in aB){if(aB.hasOwnProperty(aK)){aI[aK]=(aK in aJ)?aJ[aK]:aB[aK];}}return aI;}function ax(aL){var aK=0,aI=aL.indexOf(ay),aJ={};if(aI!=-1){aL=aL.split(ay).join("");}else{aI=aL.length;}aL=Y.processTextBeforePaste(aL,function(aM){return aM;},function(aN,aM,aO){if(aO){aJ[aM]=aO;}if(aN<aI){aI=aN;if(aO){aK=aO.length;}}return aJ[aM]||"";});return[aL,aI,aI+aK];}function e(aI){return aI.replace(/(^\s+|\s+$)/g,"").replace(/[\s\\\/]+/g,"_").replace(/\./g,"").toLowerCase();}function aA(aK,aI,aJ){au[aK.toLowerCase()]={compiled:g.compile(aK),label:aI,action:e(aJ||aI)};}function az(aI){aI.cancelBubble=true;aI.returnValue=false;if(aI.stopPropagation){aI.stopPropagation();aI.preventDefault();}}function ar(aJ){aJ=aJ||window.event;var aO=aJ.target||aJ.srcElement,aP=aJ.keyCode||aJ.which,aN;if(aO&&aO.nodeType==1&&aO.nodeName=="TEXTAREA"){m.setContext(aO);var aL,aK,aI;for(var aM in au){if(au.hasOwnProperty(aM)){aL=au[aM];if(g.test(aL.compiled,aJ)){aN=aL.action;switch(aN){case"expand_abbreviation":if(aP==9){if(aw("use_tab")){aN="expand_abbreviation_with_tab";}else{return true;}}break;case"insert_formatted_line_break":if(aP==13&&!aw("pretty_break")){return true;}break;}Y.runAction(aN,[m]);az(aJ);return false;}}}}return true;}var aH=document,at=window.opera?"keypress":"keydown";if(aH.addEventListener){aH.addEventListener(at,ar,false);}else{if(aH.attachEvent){ele.attachEvent("on"+at,ar);}else{aH["on"+at]=func;}}ao=am();aA("Meta+E","Expand Abbreviation");aA("Tab","Expand Abbreviation");aA("Meta+D","Balance Tag Outward","match_pair_outward");aA("Shift+Meta+D","Balance Tag inward","match_pair_inward");aA("Shift+Meta+A","Wrap with Abbreviation");aA("Ctrl+Alt+RIGHT","Next Edit Point");aA("Ctrl+Alt+LEFT","Previous Edit Point","prev_edit_point");aA("Meta+L","Select Line");aA("Meta+Shift+M","Merge Lines");aA("Meta+/","Toggle Comment");aA("Meta+J","Split/Join Tag");aA("Meta+K","Remove Tag");aA("Ctrl+I","Update image size");aA("Enter","Insert Formatted Line Break");aA("Meta+Y","Evaluate Math Expression");aA("Ctrl+UP","Increment number by 1");
17
+ aA("Ctrl+DOWN","Decrement number by 1");aA("Alt+UP","Increment number by 0.1");aA("Alt+DOWN","Decrement number by 0.1");aA("Ctrl+Alt+UP","Increment number by 10");aA("Ctrl+Alt+DOWN","Decrement number by 10");aA("Meta+.","Select Next Item");aA("Meta+,","Select Previous Item");aA("Meta+Shift+B","Reflect CSS Value");return{setContext:function(aI){aG=aI;ay=Y.getCaretPlaceholder();},getSelectionRange:an,createSelection:aq,getCurrentLineRange:function(){var aI=aC(),aJ=aF();if(aI===null){return null;}return av(aJ,aI);},getCaretPos:aC,setCaretPos:function(aI){aq(aI);},getCurrentLine:function(){var aI=this.getCurrentLineRange();return aI.start<aI.end?this.getContent().substring(aI.start,aI.end):"";},replaceContent:function(aQ,aI,aK,aM){var aO=aF(),aR=aC(),aJ=typeof(aI)!=="undefined",aP=typeof(aK)!=="undefined";if(!aM){aQ=Y.padString(aQ,aE(this.getCurrentLine()));}var aL=ax(aQ);aQ=aL[0];aI=aI||0;if(aL[1]!==-1){aL[1]+=aI;aL[2]+=aI;}else{aL[1]=aL[2]=aQ.length+aI;}try{if(aJ&&aP){aO=aO.substring(0,aI)+aQ+aO.substring(aK);}else{if(aJ){aO=aO.substring(0,aI)+aQ+aO.substring(aI);}}aG.value=aO;this.createSelection(aL[1],aL[2]);}catch(aN){}},getContent:aF,getSyntax:function(){var aJ=this.getOption("syntax"),aI=this.getCaretPos();if(!ac.hasSyntax(aJ)){aJ="html";}if(aJ=="html"){var aK=Y.html_matcher.getTags(this.getContent(),aI);if(aK&&aK[0]&&aK[0].type=="tag"&&aK[0].name.toLowerCase()=="style"){if(aK[0].end<=aI&&aK[1].start>=aI){aJ="css";}}}return aJ;},getProfileName:function(){return this.getOption("profile");},prompt:function(aI){return prompt(aI);},getSelection:function(){var aI=an();if(aI){try{return aF().substring(aI.start,aI.end);}catch(aJ){}}return"";},getFilePath:function(){return location.href;},setOptions:function(aI){ao=am(aI);},getOption:aw,addShortcut:aA,unbindShortcut:function(aI){aI=aI.toLowerCase();if(aI in au){delete au[aI];}},getShortcuts:function(){var aI=[],aJ;for(var aK in au){if(au.hasOwnProperty(aK)){aJ=aK.toLowerCase();if(aJ=="tab"||aJ=="enter"){continue;}aI.push({keystroke:g.format(aK),compiled:au[aK].compiled,label:au[aK].label,action:au[aK].action});}}return aI;},getInfo:function(){var aK="This textareas on this page are powered by Zen Coding project: "+"a set of tools for fast HTML coding.\n\n"+"Available shortcuts:\n";var aJ=this.getShortcuts(),aL=[];for(var aI=0;aI<aJ.length;aI++){aL.push(aJ[aI].keystroke+" — "+aJ[aI].label);}aK+=aL.join("\n")+"\n\n";aK+="More info on http://code.google.com/p/zen-coding/";return aK;},showInfo:function(){alert(this.getInfo());},setup:function(aI){this.setOptions(aI);},getCore:function(){return Y;},getResourceManager:function(){return ac;}};})();return m;})();
@@ -0,0 +1,88 @@
1
+ // This is a manifest file that'll be compiled into including all the files listed below.
2
+ // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
3
+ // be included in the compiled file accessible from http://example.com/assets/application.js
4
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
5
+ // the compiled file.
6
+ //
7
+ //= require jquery
8
+ //= require jquery_ujs
9
+ //= require jquery-ui.min
10
+ //= require admin/swfobject
11
+ //= require admin/uploadify/jquery.uploadify.min
12
+ //= require admin/uploadifive/jquery.uploadifive
13
+ //= require admin/lightbox/js/jquery.lightbox-0.5
14
+ //= require admin/jquery.ui.nestedSortable
15
+ //= require admin/zen_textarea.min
16
+ //= require admin/redactor/redactor
17
+ //= require admin/redactor/langs/ru
18
+ //= require admin/redactor/toolbars/default
19
+
20
+ function goTo(event,url) {
21
+ if (!$(event.target).hasClass("dont-move")) {
22
+ window.location = url;
23
+ };
24
+ };
25
+
26
+ var lightBox;
27
+
28
+ function remove_fields(link) {
29
+ $(link).prev("input[type=hidden]").val("1");
30
+ $(link).closest("div").hide();
31
+ }
32
+
33
+ function remove_fields_gal(link) {
34
+ $(link).prev("input[type=hidden]").val("1");
35
+ hideElem($(link).closest("tr"));
36
+ function hideElem(el) {
37
+ el.hide();
38
+ el.hasClass("bot") ? el.hide() : hideElem(el.next("tr"));
39
+ };
40
+ }
41
+
42
+ function add_fields(link, association, content) {
43
+ var new_id = new Date().getTime();
44
+ var regexp = new RegExp("new_" + association, "g")
45
+ var innerPrint = $(link).before(content.replace(regexp, new_id));
46
+ }
47
+
48
+ function add_fields_gal(link, association, content) {
49
+ var new_id = new Date().getTime();
50
+ var regexp = new RegExp("new_" + association, "g")
51
+ var innerPrint = $(link).closest("tfoot").prev("tbody").append(content.replace(regexp, new_id));
52
+ }
53
+
54
+ function selectCheckbox(el) {
55
+ el.checked ? $(el).closest("tr").addClass("selected") : $(el).closest("tr").removeClass("selected");
56
+ }
57
+
58
+ function selectLang(el) {
59
+ var show_lang = el.removeClass("selected").attr("class");
60
+ $("tr, tbody").filter("."+show_lang).show();
61
+ var hide_lang = el.siblings("a").removeClass("selected").attr("class");
62
+ $("tr, tbody").filter("."+hide_lang).hide();
63
+ el.addClass("selected");
64
+ }
65
+
66
+ $(function(){
67
+
68
+ $("#onchange-submit").find("select, input").change(function(){
69
+ $(this).closest("form").submit();
70
+ });
71
+
72
+ lightBox = $("ul.photos:not(.no-lb) a:not(.del)").lightBox();
73
+
74
+ $('textarea:not(.nowred)').redactor({
75
+ path: '/assets/redactor',
76
+ load: false
77
+ });
78
+
79
+ setTimeout(function(){
80
+ selectLang($("tr.lang").find("a.selected"));
81
+ }, 500);
82
+ ;
83
+ $('a.ru_lang, a.en_lang').click(function(e) {
84
+ selectLang($(this));
85
+ e.preventDefault();
86
+ });
87
+
88
+ });
@@ -0,0 +1,32 @@
1
+ * {
2
+ margin: 0;
3
+ padding: 0;
4
+ }
5
+
6
+ th {
7
+ text-align:left;
8
+ }
9
+
10
+ a {
11
+ color:#0047B3;
12
+ &:hover {text-decoration:none;}
13
+ }
14
+
15
+ html, body {width:100%; height:100%;}
16
+ body {
17
+ min-width:1000px;
18
+ overflow-y:scroll;
19
+ background-color: #F3F1EC;
20
+ text-align: left;
21
+ font:12px "Lucida Grande", "Lucida Sans Unicode", helvetica, arial, verdana, sans-serif;
22
+ }
23
+
24
+ #wrapper {
25
+ padding: 0 30px 30px 30px;max-width: 1200px;min-width: 800px;margin: 0 auto;
26
+ }
27
+
28
+ label {font-size: 14px;font-weight: bold;}
29
+ textarea {width: 100%; min-width: 275px;font-size: 12px;}
30
+ input {font-size: 18px;}
31
+
32
+ @import 'defaults/*';
@@ -0,0 +1,22 @@
1
+ table.list {
2
+ margin-left:0; width:auto; border-collapse:collapse;
3
+ td {border:1px solid #ededed; border-width:1px 0;}
4
+ col.w1 { width:1%;}
5
+ a:hover {color:#737300;}
6
+ td, th {vertical-align:middle; width:auto; padding:0 5px 0 0;}
7
+ th {background:#ededed; letter-spacing:1px;}
8
+ .handle {border-color:#fff;}
9
+ td * {vertical-align:middle;}
10
+ td.show {
11
+ a {border-radius:10px; border:1px solid transparent; display:inline-block; width:20px; height:20px; background:image-url("admin/icon_eye.gif") no-repeat 1px 1px;}
12
+ a.not-show {opacity:0.4; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=40);}
13
+ }
14
+ tr:hover {
15
+ td {background:#ffc;}
16
+ }
17
+ .green {color:green; font-weight:bold; text-shadow:0 0 10px green;}
18
+ }
19
+
20
+ table.sortable {
21
+ margin-left:-18px;
22
+ }
@@ -0,0 +1,39 @@
1
+ .notice, .alert {
2
+ padding:7px 15px;
3
+ margin:10px 30px;
4
+ border-radius:4px;
5
+ border:1px solid;
6
+ border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
7
+ font-size:13px;
8
+ line-height:18px;
9
+ color:#fff;
10
+ text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);
11
+ background-repeat: repeat-x;
12
+ z-index:1000;
13
+ position:relative;
14
+ }
15
+
16
+ .notice {
17
+ background-color:#57A957;
18
+ background-image: -khtml-gradient(linear, left top, left bottom, from(#62c462), to(#57a957));
19
+ background-image: -moz-linear-gradient(top, #62c462, #57a957);
20
+ background-image: -ms-linear-gradient(top, #62c462, #57a957);
21
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #62c462), color-stop(100%, #57a957));
22
+ background-image: -webkit-linear-gradient(top, #62c462, #57a957);
23
+ background-image: -o-linear-gradient(top, #62c462, #57a957);
24
+ background-image: linear-gradient(top, #62c462, #57a957);
25
+ behavior:url("/PIE.htc");
26
+ }
27
+
28
+ .alert {
29
+ background-color: #c43c35;
30
+ background-image: -khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));
31
+ background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
32
+ background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35);
33
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));
34
+ background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
35
+ background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
36
+ background-image: linear-gradient(top, #ee5f5b, #c43c35);
37
+ border-color: #c43c35 #c43c35 #882a25;
38
+ behavior:url("/PIE.htc");
39
+ }
@@ -0,0 +1,22 @@
1
+ .orders {
2
+ border-collapse:collapse; width:100%;
3
+ th {background:#AE4C4C; color:#fff; padding:2px 5px; text-align:left; font-size:24px; font-weight:normal; font-family:Verdana; }
4
+ th.green {background:#65C2BB;}
5
+ td {padding:5px 6px; vertical-align:baseline; width:auto;}
6
+ tr:hover td {background:#ffc; cursor:pointer;}
7
+ .i3, .i4 {text-align:right;}
8
+ .i1 {
9
+ width:1px; white-space:nowrap;
10
+ strong {font-weight:bold; font-size:16px;}
11
+ em {font-style:normal; font-size:10px; }
12
+ }
13
+ .i2 {color:#999; line-height:16px;}
14
+ .i3 {font-size:10px;}
15
+ .i4 {vertical-align:top; border-left:1px solid #EDEDED; width:1%;}
16
+ a { color:#000; }
17
+ a:hover {text-decoration:underline;}
18
+ p {padding-right:22px; font-size:11px; line-height:18px;}
19
+ p.name {background:url(admin/fio.png) no-repeat 100% 0; font-weight:bold;}
20
+ p.email {background:url(admin/email.png) no-repeat 100% 0;}
21
+ p.phone {background:url(admin/phone.png) no-repeat 100% 0;}
22
+ }
@@ -0,0 +1,15 @@
1
+ table.partners {
2
+ border-collapse:collapse; line-height:normal; width:100%;
3
+ th, td {border-top:1px solid #ededed; vertical-align:baseline; padding-top:10px; padding-bottom:10px;}
4
+ .txt {
5
+ font-size:16px;
6
+ p {font-size:11px; line-height:16px;}
7
+ }
8
+ th:first-child {
9
+ padding:10px 15px 10px 5px; vertical-align:top;
10
+ img {padding:1px; border:1px solid #E6E6E6; display:block;}
11
+ }
12
+ td.last {text-align:right;}
13
+ .lnk {color:#0047B3; font-size:16px; line-height:100%; text-decoration:none; font-weight:700;}
14
+ .lnk:hover { text-decoration:underline; }
15
+ }
@@ -0,0 +1,31 @@
1
+ ul.photos {
2
+ margin:5px 0 5px -3px; overflow:hidden; list-style:none;
3
+ li {width:119px; height:119px; border:1px solid #ccc; float:left; margin:0 0 3px 3px; position:relative;}
4
+ li.ui-sortable-helper {
5
+ &, & > * {cursor:crosshair;}
6
+ }
7
+ a {text-decoration:none;}
8
+ a:first-child {display:block; width:100%; height:100%; background:#ccc; background-repeat:no-repeat; background-position:center; position:relative;}
9
+ em {
10
+ font-style:normal; display:block; position:absolute; background:rgba(#000,0.7); color:#fff; padding:0 3px;
11
+ border-radius:3px; left:0; bottom:0; max-width:93px;
12
+ }
13
+ a.del {width:0; overflow:hidden; text-indent:-9999px; position:absolute; display:block; bottom:0; right:0;}
14
+ img {display:block;}
15
+ }
16
+
17
+ ul.photos1 {
18
+ li {width:229px; height:115px; overflow:hidden;}
19
+ li.hide {opacity:0.7;}
20
+ li.hide:hover {opacity:1;}
21
+ a, img {display:inline-block; width:229px; height:115px;}
22
+ a.del {top:94px;}
23
+ }
24
+
25
+ ul.photos2 {
26
+ li {height:135px; overflow:hidden; width:auto;}
27
+ li.hide {opacity:0.7;}
28
+ li.hide:hover {opacity:1;}
29
+ a, img {display:inline-block; height:135px;}
30
+ a.del {top:auto; bottom:0; height:20px;}
31
+ }
@@ -0,0 +1,17 @@
1
+ .placeholder {background-color: #CCFF99; outline:1px dashed green;}
2
+ .ui-nestedSortable-error {background:#fbe3e4; outline:1px dashed red;}
3
+ ol {padding-left: 30px;}
4
+ ol.sortable, ol.sortable ol { padding: 0;margin:0;list-style-type: none;}
5
+ ol.sortable ol {margin: 0 0 0 25px;}
6
+ .sortable li {}
7
+ .sortable li div {
8
+ background:url("admin/folder.png") no-repeat 0 2px; padding-left:25px; cursor: move; position:relative;
9
+ &:hover {background-color:#ffc;}
10
+ a {line-height:20px;}
11
+ p {
12
+ position:absolute; right:0; margin:0; line-height:20px; z-index:1; top:0;
13
+ a, img {display:inline-block; vertical-align:middle; line-height:20px;}
14
+ a {text-decoration:none; color:#999;}
15
+ a.not-show {opacity:0.4;}
16
+ }
17
+ }