=a.e.length)return a;var b={name:a.name,e:a.e.slice(0,2)};return m({name:a.name,e:[b].concat(a.e.slice(2))})}function g(a){a=a.split(":",2);var b="",c;1===a.length?a=["",a[0]]:b=a[0];for(c in e)e[c]===b&&(a[0]=c);return a}function c(a,b){for(var k=0,e,h,f=a.name;a.e&&k=c.length)return b;0===e&&(e=0);for(var g=c.item(e);g.namespaceURI===d;){e+=1;if(e>=c.length)return b;g=c.item(e)}return g=n(a,b.attDeriv(a,c.item(e)),c,e+1)}function f(a,b,c){c.e[0].a?(a.push(c.e[0].text),b.push(c.e[0].a.ns)):f(a,b,c.e[0]);c.e[1].a?(a.push(c.e[1].text),b.push(c.e[1].a.ns)):
-f(a,b,c.e[1])}var d="http://www.w3.org/2000/xmlns/",s,k,q,g,p,r,w,u,A,x,v={type:"notAllowed",nullable:!1,hash:"notAllowed",textDeriv:function(){return v},startTagOpenDeriv:function(){return v},attDeriv:function(){return v},startTagCloseDeriv:function(){return v},endTagDeriv:function(){return v}},t={type:"empty",nullable:!0,hash:"empty",textDeriv:function(){return v},startTagOpenDeriv:function(){return v},attDeriv:function(){return v},startTagCloseDeriv:function(){return t},endTagDeriv:function(){return v}},
-E={type:"text",nullable:!0,hash:"text",textDeriv:function(){return E},startTagOpenDeriv:function(){return v},attDeriv:function(){return v},startTagCloseDeriv:function(){return E},endTagDeriv:function(){return v}},H,y,P;s=c("choice",function(a,b){if(a===v)return b;if(b===v||a===b)return a},function(a,c){var d={},g;b(d,{p1:a,p2:c});c=a=void 0;for(g in d)d.hasOwnProperty(g)&&(void 0===a?a=d[g]:c=void 0===c?d[g]:s(c,d[g]));return function(a,b){return{type:"choice",p1:a,p2:b,nullable:a.nullable||b.nullable,
-textDeriv:function(c,d){return s(a.textDeriv(c,d),b.textDeriv(c,d))},startTagOpenDeriv:e(function(c){return s(a.startTagOpenDeriv(c),b.startTagOpenDeriv(c))}),attDeriv:function(c,d){return s(a.attDeriv(c,d),b.attDeriv(c,d))},startTagCloseDeriv:m(function(){return s(a.startTagCloseDeriv(),b.startTagCloseDeriv())}),endTagDeriv:m(function(){return s(a.endTagDeriv(),b.endTagDeriv())})}}(a,c)});k=function(a,b,c){return function(){var d={},e=0;return function(g,f){var k=b&&b(g,f),p,n;if(void 0!==k)return k;
-k=g.hash||g.toString();p=f.hash||f.toString();k=c.length)return b;0===h&&(h=0);for(var k=c.item(h);k.namespaceURI===d;){h+=1;if(h>=c.length)return b;k=c.item(h)}return k=e(a,b.attDeriv(a,c.item(h)),c,h+1)}function f(a,b,c){c.e[0].a?(a.push(c.e[0].text),b.push(c.e[0].a.ns)):f(a,b,c.e[0]);c.e[1].a?(a.push(c.e[1].text),b.push(c.e[1].a.ns)):
+f(a,b,c.e[1])}var d="http://www.w3.org/2000/xmlns/",t,k,p,h,q,s,w,u,A,y,v={type:"notAllowed",nullable:!1,hash:"notAllowed",textDeriv:function(){return v},startTagOpenDeriv:function(){return v},attDeriv:function(){return v},startTagCloseDeriv:function(){return v},endTagDeriv:function(){return v}},r={type:"empty",nullable:!0,hash:"empty",textDeriv:function(){return v},startTagOpenDeriv:function(){return v},attDeriv:function(){return v},startTagCloseDeriv:function(){return r},endTagDeriv:function(){return v}},
+z={type:"text",nullable:!0,hash:"text",textDeriv:function(){return z},startTagOpenDeriv:function(){return v},attDeriv:function(){return v},startTagCloseDeriv:function(){return z},endTagDeriv:function(){return v}},G,C,L;t=c("choice",function(a,b){if(a===v)return b;if(b===v||a===b)return a},function(a,c){var d={},h;b(d,{p1:a,p2:c});c=a=void 0;for(h in d)d.hasOwnProperty(h)&&(void 0===a?a=d[h]:c=void 0===c?d[h]:t(c,d[h]));return function(a,b){return{type:"choice",p1:a,p2:b,nullable:a.nullable||b.nullable,
+textDeriv:function(c,d){return t(a.textDeriv(c,d),b.textDeriv(c,d))},startTagOpenDeriv:g(function(c){return t(a.startTagOpenDeriv(c),b.startTagOpenDeriv(c))}),attDeriv:function(c,d){return t(a.attDeriv(c,d),b.attDeriv(c,d))},startTagCloseDeriv:l(function(){return t(a.startTagCloseDeriv(),b.startTagCloseDeriv())}),endTagDeriv:l(function(){return t(a.endTagDeriv(),b.endTagDeriv())})}}(a,c)});k=function(a,b,c){return function(){var d={},h=0;return function(e,k){var f=b&&b(e,k),g,r;if(void 0!==f)return f;
+f=e.hash||e.toString();g=k.hash||k.toString();fNode.ELEMENT_NODE;){if(d!==Node.COMMENT_NODE&&(d!==Node.TEXT_NODE||!/^\s+$/.test(b.currentNode.nodeValue)))return[new m("Not allowed node of type "+
-d+".")];d=(c=b.nextSibling())?c.nodeType:0}if(!c)return[new m("Missing element "+a.names)];if(a.names&&-1===a.names.indexOf(h[c.namespaceURI]+":"+c.localName))return[new m("Found "+c.nodeName+" instead of "+a.names+".",c)];if(b.firstChild()){for(e=l(a.e[1],b,c);b.nextSibling();)if(d=b.currentNode.nodeType,!(b.currentNode&&b.currentNode.nodeType===Node.TEXT_NODE&&/^\s+$/.test(b.currentNode.nodeValue)||d===Node.COMMENT_NODE))return[new m("Spurious content.",b.currentNode)];if(b.parentNode()!==c)return[new m("Implementation error.")]}else e=
-l(a.e[1],b,c);b.nextSibling();return e}var c,b,h;b=function(a,c,f,d){var h=a.name,k=null;if("text"===h)a:{for(var q=(a=c.currentNode)?a.nodeType:0;a!==f&&3!==q;){if(1===q){k=[new m("Element not allowed here.",a)];break a}q=(a=c.nextSibling())?a.nodeType:0}c.nextSibling();k=null}else if("data"===h)k=null;else if("value"===h)d!==a.text&&(k=[new m("Wrong value, should be '"+a.text+"', not '"+d+"'",f)]);else if("list"===h)k=null;else if("attribute"===h)a:{if(2!==a.e.length)throw"Attribute with wrong # of elements: "+
-a.e.length;h=a.localnames.length;for(k=0;kNode.ELEMENT_NODE;){if(d!==Node.COMMENT_NODE&&(d!==Node.TEXT_NODE||!/^\s+$/.test(b.currentNode.nodeValue)))return[new l("Not allowed node of type "+
+d+".")];d=(c=b.nextSibling())?c.nodeType:0}if(!c)return[new l("Missing element "+a.names)];if(a.names&&-1===a.names.indexOf(n[c.namespaceURI]+":"+c.localName))return[new l("Found "+c.nodeName+" instead of "+a.names+".",c)];if(b.firstChild()){for(g=m(a.e[1],b,c);b.nextSibling();)if(d=b.currentNode.nodeType,!(b.currentNode&&b.currentNode.nodeType===Node.TEXT_NODE&&/^\s+$/.test(b.currentNode.nodeValue)||d===Node.COMMENT_NODE))return[new l("Spurious content.",b.currentNode)];if(b.parentNode()!==c)return[new l("Implementation error.")]}else g=
+m(a.e[1],b,c);b.nextSibling();return g}var c,b,n;b=function(a,c,f,d){var n=a.name,k=null;if("text"===n)a:{for(var p=(a=c.currentNode)?a.nodeType:0;a!==f&&3!==p;){if(1===p){k=[new l("Element not allowed here.",a)];break a}p=(a=c.nextSibling())?a.nodeType:0}c.nextSibling();k=null}else if("data"===n)k=null;else if("value"===n)d!==a.text&&(k=[new l("Wrong value, should be '"+a.text+"', not '"+d+"'",f)]);else if("list"===n)k=null;else if("attribute"===n)a:{if(2!==a.e.length)throw"Attribute with wrong # of elements: "+
+a.e.length;n=a.localnames.length;for(k=0;k=f&&c.push(l(a.substring(b,d)))):"["===a[d]&&(0>=f&&(b=d+1),f+=1),d+=1;return d};xmldom.XPathIterator.prototype.next=function(){};xmldom.XPathIterator.prototype.reset=function(){};d=function(d,e,g){var f,h,m,l;for(f=0;f=f&&c.push(m(a.substring(b,d)))):"["===a[d]&&(0>=f&&(b=d+1),f+=1),d+=1;return d};xmldom.XPathIterator.prototype.next=function(){};xmldom.XPathIterator.prototype.reset=function(){};d=function(d,f,h){var g,n,m,l;for(g=0;g=(l.getBoundingClientRect().top-x.bottom)/u?c.style.top=Math.abs(l.getBoundingClientRect().top-x.bottom)/u+20+"px":c.style.top="0px");h.style.left=d.getBoundingClientRect().width/u+"px";var d=h.style,l=h.getBoundingClientRect().left/u,A=h.getBoundingClientRect().top/u,x=c.getBoundingClientRect().left/u,v=c.getBoundingClientRect().top/u,t=0,E=
-0,t=x-l,t=t*t,E=v-A,E=E*E,l=Math.sqrt(t+E);d.width=l+"px";u=Math.asin((c.getBoundingClientRect().top-h.getBoundingClientRect().top)/(u*parseFloat(h.style.width)));h.style.transform="rotate("+u+"rad)";h.style.MozTransform="rotate("+u+"rad)";h.style.WebkitTransform="rotate("+u+"rad)";h.style.msTransform="rotate("+u+"rad)";b&&(u=s.getComputedStyle(b,":before").content)&&"none"!==u&&(u=u.substring(1,u.length-1),b.firstChild?b.firstChild.nodeValue=u:b.appendChild(f.createTextNode(u)))}}var n=[],f=l.ownerDocument,
-d=new odf.OdfUtils,s=runtime.getWindow();runtime.assert(Boolean(s),"Expected to be run in an environment which has a global window, like a browser.");this.rerenderAnnotations=a;this.addAnnotation=function(d){b(!0);n.push({node:d.node,end:d.end});h();var e=f.createElement("div"),g=f.createElement("div"),p=f.createElement("div"),m=f.createElement("div"),l=f.createElement("div"),u=d.node;e.className="annotationWrapper";u.parentNode.insertBefore(e,u);g.className="annotationNote";g.appendChild(u);l.className=
-"annotationRemoveButton";g.appendChild(l);p.className="annotationConnector horizontal";m.className="annotationConnector angular";e.appendChild(g);e.appendChild(p);e.appendChild(m);d.end&&c(d);a()};this.forgetAnnotations=function(){for(;n.length;){var a=n[0],c=n.indexOf(a),d=a.node,e=d.parentNode.parentNode;"div"===e.localName&&(e.parentNode.insertBefore(d,e),e.parentNode.removeChild(e));a=a.node.getAttributeNS(odf.Namespaces.officens,"name");a=f.querySelectorAll('span.annotationHighlight[annotation="'+
-a+'"]');e=d=void 0;for(d=0;d=(m.getBoundingClientRect().top-y.bottom)/u?c.style.top=Math.abs(m.getBoundingClientRect().top-y.bottom)/u+20+"px":c.style.top="0px");n.style.left=d.getBoundingClientRect().width/u+"px";var d=n.style,m=n.getBoundingClientRect().left/u,A=n.getBoundingClientRect().top/u,y=c.getBoundingClientRect().left/u,v=c.getBoundingClientRect().top/u,r=0,z=
+0,r=y-m,r=r*r,z=v-A,z=z*z,m=Math.sqrt(r+z);d.width=m+"px";u=Math.asin((c.getBoundingClientRect().top-n.getBoundingClientRect().top)/(u*parseFloat(n.style.width)));n.style.transform="rotate("+u+"rad)";n.style.MozTransform="rotate("+u+"rad)";n.style.WebkitTransform="rotate("+u+"rad)";n.style.msTransform="rotate("+u+"rad)";b&&(u=t.getComputedStyle(b,":before").content)&&"none"!==u&&(u=u.substring(1,u.length-1),b.firstChild?b.firstChild.nodeValue=u:b.appendChild(f.createTextNode(u)))}}var e=[],f=m.ownerDocument,
+d=new odf.OdfUtils,t=runtime.getWindow();runtime.assert(Boolean(t),"Expected to be run in an environment which has a global window, like a browser.");this.rerenderAnnotations=a;this.addAnnotation=function(d){b(!0);e.push({node:d.node,end:d.end});n();var g=f.createElement("div"),h=f.createElement("div"),q=f.createElement("div"),m=f.createElement("div"),l=f.createElement("div"),u=d.node;g.className="annotationWrapper";u.parentNode.insertBefore(g,u);h.className="annotationNote";h.appendChild(u);l.className=
+"annotationRemoveButton";h.appendChild(l);q.className="annotationConnector horizontal";m.className="annotationConnector angular";g.appendChild(h);g.appendChild(q);g.appendChild(m);d.end&&c(d);a()};this.forgetAnnotations=function(){for(;e.length;){var a=e[0],c=e.indexOf(a),d=a.node,g=d.parentNode.parentNode;"div"===g.localName&&(g.parentNode.insertBefore(d,g),g.parentNode.removeChild(g));a=a.node.getAttributeNS(odf.Namespaces.officens,"name");a=f.querySelectorAll('span.annotationHighlight[annotation="'+
+a+'"]');g=d=void 0;for(d=0;da.value||"%"===a.unit)?null:a}function r(a){return(a=g(a))&&"%"!==a.unit?null:a}function w(a){switch(a.namespaceURI){case odf.Namespaces.drawns:case odf.Namespaces.svgns:case odf.Namespaces.dr3dns:return!1;case odf.Namespaces.textns:switch(a.localName){case "note-body":case "ruby-text":return!1}break;case odf.Namespaces.officens:switch(a.localName){case "annotation":case "binary-data":case "event-listeners":return!1}break;default:switch(a.localName){case "editinfo":return!1}}return!0}
-var u="urn:oasis:names:tc:opendocument:xmlns:text:1.0",A="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0",x=/^\s*$/,v=new core.DomUtils;this.isParagraph=m;this.getParagraphElement=l;this.isWithinTrackedChanges=function(a,b){for(;a&&a!==b;){if(a.namespaceURI===u&&"tracked-changes"===a.localName)return!0;a=a.parentNode}return!1};this.isListItem=function(a){return"list-item"===(a&&a.localName)&&a.namespaceURI===u};this.isODFWhitespace=e;this.isGroupingElement=c;this.isCharacterElement=b;this.firstChild=
-h;this.lastChild=a;this.previousNode=n;this.nextNode=f;this.scanLeftForNonWhitespace=d;this.lookLeftForCharacter=function(a){var c;c=0;a.nodeType===Node.TEXT_NODE&&0=b.value||"%"===b.unit)?null:b;return b||r(a)};this.parseFoLineHeight=function(a){return p(a)||
-r(a)};this.getImpactedParagraphs=function(a){var b=a.commonAncestorContainer,c=[];for(b.nodeType===Node.ELEMENT_NODE&&(c=v.getElementsByTagNameNS(b,u,"p").concat(v.getElementsByTagNameNS(b,u,"h")));b&&!m(b);)b=b.parentNode;b&&c.push(b);return c.filter(function(b){return v.rangeIntersectsNode(a,b)})};this.getTextNodes=function(a,b){var c=a.startContainer.ownerDocument.createRange(),d;d=v.getNodesInRange(a,function(d){c.selectNodeContents(d);if(d.nodeType===Node.TEXT_NODE){if(b&&v.rangesIntersect(a,
-c)||v.containsRange(a,c))return Boolean(l(d)&&(!e(d.textContent)||q(d,0)))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}else if(v.rangesIntersect(a,c)&&w(d))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_REJECT});c.detach();return d};this.getTextElements=function(a,d){var f=a.startContainer.ownerDocument.createRange(),g;g=v.getNodesInRange(a,function(g){var h=g.nodeType;f.selectNodeContents(g);if(h===Node.TEXT_NODE){if(v.containsRange(a,f)&&(d||Boolean(l(g)&&(!e(g.textContent)||q(g,0)))))return NodeFilter.FILTER_ACCEPT}else if(b(g)){if(v.containsRange(a,
-f))return NodeFilter.FILTER_ACCEPT}else if(w(g)||c(g))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_REJECT});f.detach();return g};this.getParagraphElements=function(a){var b=a.startContainer.ownerDocument.createRange(),d;d=v.getNodesInRange(a,function(d){b.selectNodeContents(d);if(m(d)){if(v.rangesIntersect(a,b))return NodeFilter.FILTER_ACCEPT}else if(w(d)||c(d))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_REJECT});b.detach();return d}};
+odf.OdfUtils=function(){function l(a){var b=a&&a.localName;return("p"===b||"h"===b)&&a.namespaceURI===u}function m(a){for(;a&&!l(a);)a=a.parentNode;return a}function g(a){return/^[ \t\r\n]+$/.test(a)}function c(a){var b=a&&a.localName;return/^(span|p|h|a|meta)$/.test(b)&&a.namespaceURI===u||"span"===b&&"annotationHighlight"===a.className?!0:!1}function b(a){var b=a&&a.localName,c,d=!1;b&&(c=a.namespaceURI,c===u?d="s"===b||"tab"===b||"line-break"===b:c===A&&(d="frame"===b&&"as-char"===a.getAttributeNS(u,
+"anchor-type")));return d}function n(a){for(;null!==a.firstChild&&c(a);)a=a.firstChild;return a}function a(a){for(;null!==a.lastChild&&c(a);)a=a.lastChild;return a}function e(b){for(;!l(b)&&null===b.previousSibling;)b=b.parentNode;return l(b)?null:a(b.previousSibling)}function f(a){for(;!l(a)&&null===a.nextSibling;)a=a.parentNode;return l(a)?null:n(a.nextSibling)}function d(a){for(var c=!1;a;)if(a.nodeType===Node.TEXT_NODE)if(0===a.length)a=e(a);else return!g(a.data.substr(a.length-1,1));else b(a)?
+(c=!0,a=null):a=e(a);return c}function t(a){var c=!1;for(a=a&&n(a);a;){if(a.nodeType===Node.TEXT_NODE&&0a.value||"%"===a.unit)?null:a}function s(a){return(a=h(a))&&"%"!==a.unit?null:a}function w(a){switch(a.namespaceURI){case odf.Namespaces.drawns:case odf.Namespaces.svgns:case odf.Namespaces.dr3dns:return!1;case odf.Namespaces.textns:switch(a.localName){case "note-body":case "ruby-text":return!1}break;case odf.Namespaces.officens:switch(a.localName){case "annotation":case "binary-data":case "event-listeners":return!1}break;default:switch(a.localName){case "editinfo":return!1}}return!0}
+var u="urn:oasis:names:tc:opendocument:xmlns:text:1.0",A="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0",y=/^\s*$/,v=new core.DomUtils;this.isParagraph=l;this.getParagraphElement=m;this.isWithinTrackedChanges=function(a,b){for(;a&&a!==b;){if(a.namespaceURI===u&&"tracked-changes"===a.localName)return!0;a=a.parentNode}return!1};this.isListItem=function(a){return"list-item"===(a&&a.localName)&&a.namespaceURI===u};this.isODFWhitespace=g;this.isGroupingElement=c;this.isCharacterElement=b;this.firstChild=
+n;this.lastChild=a;this.previousNode=e;this.nextNode=f;this.scanLeftForNonWhitespace=d;this.lookLeftForCharacter=function(a){var c;c=0;a.nodeType===Node.TEXT_NODE&&0=b.value||"%"===b.unit)?null:b;return b||s(a)};this.parseFoLineHeight=function(a){return q(a)||
+s(a)};this.getImpactedParagraphs=function(a){var b=a.commonAncestorContainer,c=[];for(b.nodeType===Node.ELEMENT_NODE&&(c=v.getElementsByTagNameNS(b,u,"p").concat(v.getElementsByTagNameNS(b,u,"h")));b&&!l(b);)b=b.parentNode;b&&c.push(b);return c.filter(function(b){return v.rangeIntersectsNode(a,b)})};this.getTextNodes=function(a,b){var c=a.startContainer.ownerDocument.createRange(),d;d=v.getNodesInRange(a,function(d){c.selectNodeContents(d);if(d.nodeType===Node.TEXT_NODE){if(b&&v.rangesIntersect(a,
+c)||v.containsRange(a,c))return Boolean(m(d)&&(!g(d.textContent)||p(d,0)))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}else if(v.rangesIntersect(a,c)&&w(d))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_REJECT});c.detach();return d};this.getTextElements=function(a,d){var e=a.startContainer.ownerDocument.createRange(),h;h=v.getNodesInRange(a,function(h){var f=h.nodeType;e.selectNodeContents(h);if(f===Node.TEXT_NODE){if(v.containsRange(a,e)&&(d||Boolean(m(h)&&(!g(h.textContent)||p(h,0)))))return NodeFilter.FILTER_ACCEPT}else if(b(h)){if(v.containsRange(a,
+e))return NodeFilter.FILTER_ACCEPT}else if(w(h)||c(h))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_REJECT});e.detach();return h};this.getParagraphElements=function(a){var b=a.startContainer.ownerDocument.createRange(),d;d=v.getNodesInRange(a,function(d){b.selectNodeContents(d);if(l(d)){if(v.rangesIntersect(a,b))return NodeFilter.FILTER_ACCEPT}else if(w(d)||c(d))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_REJECT});b.detach();return d}};
// Input 30
/*
@@ -565,7 +565,7 @@ f))return NodeFilter.FILTER_ACCEPT}else if(w(g)||c(g))return NodeFilter.FILTER_S
@source: http://gitorious.org/webodf/webodf/
*/
runtime.loadClass("odf.OdfUtils");
-odf.TextSerializer=function(){function m(c){var b="",h=l.filter?l.filter.acceptNode(c):NodeFilter.FILTER_ACCEPT,a=c.nodeType,n;if(h===NodeFilter.FILTER_ACCEPT||h===NodeFilter.FILTER_SKIP)for(n=c.firstChild;n;)b+=m(n),n=n.nextSibling;h===NodeFilter.FILTER_ACCEPT&&(a===Node.ELEMENT_NODE&&e.isParagraph(c)?b+="\n":a===Node.TEXT_NODE&&c.textContent&&(b+=c.textContent));return b}var l=this,e=new odf.OdfUtils;this.filter=null;this.writeToString=function(c){return c?m(c):""}};
+odf.TextSerializer=function(){function l(c){var b="",n=m.filter?m.filter.acceptNode(c):NodeFilter.FILTER_ACCEPT,a=c.nodeType,e;if(n===NodeFilter.FILTER_ACCEPT||n===NodeFilter.FILTER_SKIP)for(e=c.firstChild;e;)b+=l(e),e=e.nextSibling;n===NodeFilter.FILTER_ACCEPT&&(a===Node.ELEMENT_NODE&&g.isParagraph(c)?b+="\n":a===Node.TEXT_NODE&&c.textContent&&(b+=c.textContent));return b}var m=this,g=new odf.OdfUtils;this.filter=null;this.writeToString=function(c){return c?l(c):""}};
// Input 31
/*
@@ -602,10 +602,10 @@ odf.TextSerializer=function(){function m(c){var b="",h=l.filter?l.filter.acceptN
@source: http://gitorious.org/webodf/webodf/
*/
runtime.loadClass("core.DomUtils");runtime.loadClass("core.LoopWatchDog");runtime.loadClass("odf.Namespaces");
-odf.TextStyleApplicator=function(m,l,e){function c(a){function b(a,c){return"object"===typeof a&&"object"===typeof c?Object.keys(a).every(function(d){return b(a[d],c[d])}):a===c}this.isStyleApplied=function(c){c=l.getAppliedStylesForElement(c);return b(a,c)}}function b(b){var c={};this.applyStyleToContainer=function(h){var q;q=h.getAttributeNS(a,"style-name");var g=h.ownerDocument;q=q||"";if(!c.hasOwnProperty(q)){var p=q,r;r=q?l.createDerivedStyleObject(q,"text",b):b;g=g.createElementNS(n,"style:style");
-l.updateStyle(g,r);g.setAttributeNS(n,"style:name",m.generateName());g.setAttributeNS(n,"style:family","text");g.setAttributeNS(f,"scope","document-content");e.appendChild(g);c[p]=g}q=c[q].getAttributeNS(n,"name");h.setAttributeNS(a,"text:style-name",q)}}var h=new core.DomUtils,a=odf.Namespaces.textns,n=odf.Namespaces.stylens,f="urn:webodf:names:scope";this.applyStyle=function(d,e,f){var n={},g,m,l,w;runtime.assert(f&&f["style:text-properties"],"applyStyle without any text properties");n["style:text-properties"]=
-f["style:text-properties"];l=new b(n);w=new c(n);d.forEach(function(b){g=w.isStyleApplied(b);if(!1===g){var c=b.ownerDocument,d=b.parentNode,f,k=b,n=new core.LoopWatchDog(1E3);"span"===d.localName&&d.namespaceURI===a?(b.previousSibling&&!h.rangeContainsNode(e,b.previousSibling)?(c=d.cloneNode(!1),d.parentNode.insertBefore(c,d.nextSibling)):c=d,f=!0):(c=c.createElementNS(a,"text:span"),d.insertBefore(c,b),f=!1);for(;k&&(k===b||h.rangeContainsNode(e,k));)n.check(),d=k.nextSibling,k.parentNode!==c&&
-c.appendChild(k),k=d;if(k&&f)for(b=c.cloneNode(!1),c.parentNode.insertBefore(b,c.nextSibling);k;)n.check(),d=k.nextSibling,b.appendChild(k),k=d;m=c;l.applyStyleToContainer(m)}})}};
+odf.TextStyleApplicator=function(l,m,g){function c(a){function b(a,c){return"object"===typeof a&&"object"===typeof c?Object.keys(a).every(function(d){return b(a[d],c[d])}):a===c}this.isStyleApplied=function(c){c=m.getAppliedStylesForElement(c);return b(a,c)}}function b(b){var c={};this.applyStyleToContainer=function(k){var n;n=k.getAttributeNS(a,"style-name");var h=k.ownerDocument;n=n||"";if(!c.hasOwnProperty(n)){var q=n,s;s=n?m.createDerivedStyleObject(n,"text",b):b;h=h.createElementNS(e,"style:style");
+m.updateStyle(h,s);h.setAttributeNS(e,"style:name",l.generateName());h.setAttributeNS(e,"style:family","text");h.setAttributeNS(f,"scope","document-content");g.appendChild(h);c[q]=h}n=c[n].getAttributeNS(e,"name");k.setAttributeNS(a,"text:style-name",n)}}var n=new core.DomUtils,a=odf.Namespaces.textns,e=odf.Namespaces.stylens,f="urn:webodf:names:scope";this.applyStyle=function(d,e,f){var g={},h,m,l,w;runtime.assert(f&&f["style:text-properties"],"applyStyle without any text properties");g["style:text-properties"]=
+f["style:text-properties"];l=new b(g);w=new c(g);d.forEach(function(b){h=w.isStyleApplied(b);if(!1===h){var c=b.ownerDocument,d=b.parentNode,f,k=b,g=new core.LoopWatchDog(1E3);"span"===d.localName&&d.namespaceURI===a?(b.previousSibling&&!n.rangeContainsNode(e,b.previousSibling)?(c=d.cloneNode(!1),d.parentNode.insertBefore(c,d.nextSibling)):c=d,f=!0):(c=c.createElementNS(a,"text:span"),d.insertBefore(c,b),f=!1);for(;k&&(k===b||n.rangeContainsNode(e,k));)g.check(),d=k.nextSibling,k.parentNode!==c&&
+c.appendChild(k),k=d;if(k&&f)for(b=c.cloneNode(!1),c.parentNode.insertBefore(b,c.nextSibling);k;)g.check(),d=k.nextSibling,b.appendChild(k),k=d;m=c;l.applyStyleToContainer(m)}})}};
// Input 32
/*
@@ -642,48 +642,48 @@ c.appendChild(k),k=d;if(k&&f)for(b=c.cloneNode(!1),c.parentNode.insertBefore(b,c
@source: http://gitorious.org/webodf/webodf/
*/
runtime.loadClass("odf.Namespaces");runtime.loadClass("odf.OdfUtils");runtime.loadClass("xmldom.XPath");runtime.loadClass("core.CSSUnits");
-odf.Style2CSS=function(){function m(a){var b={},c,d;if(!a)return b;for(a=a.firstChild;a;){if(d=a.namespaceURI!==p||"style"!==a.localName&&"default-style"!==a.localName?a.namespaceURI===u&&"list-style"===a.localName?"list":a.namespaceURI!==p||"page-layout"!==a.localName&&"default-page-layout"!==a.localName?void 0:"page":a.getAttributeNS(p,"family"))(c=a.getAttributeNS&&a.getAttributeNS(p,"name"))||(c=""),d=b[d]=b[d]||{},d[c]=a;a=a.nextSibling}return b}function l(a,b){if(!b||!a)return null;if(a[b])return a[b];
-var c,d;for(c in a)if(a.hasOwnProperty(c)&&(d=l(a[c].derivedStyles,b)))return d;return null}function e(a,b,c){var d=b[a],f,g;d&&(f=d.getAttributeNS(p,"parent-style-name"),g=null,f&&(g=l(c,f),!g&&b[f]&&(e(f,b,c),g=b[f],b[f]=null)),g?(g.derivedStyles||(g.derivedStyles={}),g.derivedStyles[a]=d):c[a]=d)}function c(a,b){for(var c in a)a.hasOwnProperty(c)&&(e(c,a,b),a[c]=null)}function b(a,b){var c=v[a],d;if(null===c)return null;d=b?"["+c+'|style-name="'+b+'"]':"["+c+"|style-name]";"presentation"===c&&
-(c="draw",d=b?'[presentation|style-name="'+b+'"]':"[presentation|style-name]");return c+"|"+t[a].join(d+","+c+"|")+d}function h(a,c,d){var e=[],f,g;e.push(b(a,c));for(f in d.derivedStyles)if(d.derivedStyles.hasOwnProperty(f))for(g in c=h(a,f,d.derivedStyles[f]),c)c.hasOwnProperty(g)&&e.push(c[g]);return e}function a(a,b,c){if(!a)return null;for(a=a.firstChild;a;){if(a.namespaceURI===b&&a.localName===c)return b=a;a=a.nextSibling}return null}function n(a,b){var c="",d,e;for(d in b)if(b.hasOwnProperty(d)&&
-(d=b[d],e=a.getAttributeNS(d[0],d[1]))){e=e.trim();if(N.hasOwnProperty(d[1])){var f=e.indexOf(" "),g=void 0,h=void 0;-1!==f?(g=e.substring(0,f),h=e.substring(f)):(g=e,h="");(g=Y.parseLength(g))&&("pt"===g.unit&&0.75>g.value)&&(e="0.75pt"+h)}d[2]&&(c+=d[2]+":"+e+";")}return c}function f(b){return(b=a(b,p,"text-properties"))?Y.parseFoFontSize(b.getAttributeNS(g,"font-size")):null}function d(a){a=a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,b,c,d){return b+b+c+c+d+d});return(a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a))?
-{r:parseInt(a[1],16),g:parseInt(a[2],16),b:parseInt(a[3],16)}:null}function s(a,b,c,d){b='text|list[text|style-name="'+b+'"]';var e=c.getAttributeNS(u,"level"),f;c=Y.getFirstNonWhitespaceChild(c);c=Y.getFirstNonWhitespaceChild(c);var g;c&&(f=c.attributes,g=f["fo:text-indent"]?f["fo:text-indent"].value:void 0,f=f["fo:margin-left"]?f["fo:margin-left"].value:void 0);g||(g="-0.6cm");c="-"===g.charAt(0)?g.substring(1):"-"+g;for(e=e&&parseInt(e,10);1 text|list-item > text|list",e-=1;e=b+" > text|list-item > *:not(text|list):first-child";
-void 0!==f&&(f=e+"{margin-left:"+f+";}",a.insertRule(f,a.cssRules.length));d=b+" > text|list-item > *:not(text|list):first-child:before{"+d+";";d+="counter-increment:list;";d+="margin-left:"+g+";";d+="width:"+c+";";d+="display:inline-block}";try{a.insertRule(d,a.cssRules.length)}catch(h){throw h;}}function k(b,c,e,m){if("list"===c)for(var l=m.firstChild,r,t;l;){if(l.namespaceURI===u)if(r=l,"list-level-style-number"===l.localName){var v=r;t=v.getAttributeNS(p,"num-format");var N=v.getAttributeNS(p,
-"num-suffix"),F={1:"decimal",a:"lower-latin",A:"upper-latin",i:"lower-roman",I:"upper-roman"},v=v.getAttributeNS(p,"num-prefix")||"",v=F.hasOwnProperty(t)?v+(" counter(list, "+F[t]+")"):t?v+("'"+t+"';"):v+" ''";N&&(v+=" '"+N+"'");t="content: "+v+";";s(b,e,r,t)}else"list-level-style-image"===l.localName?(t="content: none;",s(b,e,r,t)):"list-level-style-bullet"===l.localName&&(t="content: '"+r.getAttributeNS(u,"bullet-char")+"';",s(b,e,r,t));l=l.nextSibling}else if("page"===c)if(N=r=e="",l=m.getElementsByTagNameNS(p,
-"page-layout-properties")[0],r=l.parentNode.parentNode.parentNode.masterStyles,N="",e+=n(l,X),t=l.getElementsByTagNameNS(p,"background-image"),0f.value)&&(e="0.75pt"+k)}d[2]&&(c+=d[2]+":"+e+";")}return c}function f(b){return(b=a(b,q,"text-properties"))?Z.parseFoFontSize(b.getAttributeNS(h,"font-size")):null}function d(a){a=a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,b,c,d){return b+b+c+c+d+d});return(a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a))?
+{r:parseInt(a[1],16),g:parseInt(a[2],16),b:parseInt(a[3],16)}:null}function t(a,b,c,d){b='text|list[text|style-name="'+b+'"]';var e=c.getAttributeNS(u,"level"),h;c=Z.getFirstNonWhitespaceChild(c);c=Z.getFirstNonWhitespaceChild(c);var f;c&&(h=c.attributes,f=h["fo:text-indent"]?h["fo:text-indent"].value:void 0,h=h["fo:margin-left"]?h["fo:margin-left"].value:void 0);f||(f="-0.6cm");c="-"===f.charAt(0)?f.substring(1):"-"+f;for(e=e&&parseInt(e,10);1 text|list-item > text|list",e-=1;e=b+" > text|list-item > *:not(text|list):first-child";
+void 0!==h&&(h=e+"{margin-left:"+h+";}",a.insertRule(h,a.cssRules.length));d=b+" > text|list-item > *:not(text|list):first-child:before{"+d+";";d+="counter-increment:list;";d+="margin-left:"+f+";";d+="width:"+c+";";d+="display:inline-block}";try{a.insertRule(d,a.cssRules.length)}catch(k){throw k;}}function k(b,c,g,m){if("list"===c)for(var l=m.firstChild,r,s;l;){if(l.namespaceURI===u)if(r=l,"list-level-style-number"===l.localName){var v=r;s=v.getAttributeNS(q,"num-format");var N=v.getAttributeNS(q,
+"num-suffix"),E={1:"decimal",a:"lower-latin",A:"upper-latin",i:"lower-roman",I:"upper-roman"},v=v.getAttributeNS(q,"num-prefix")||"",v=E.hasOwnProperty(s)?v+(" counter(list, "+E[s]+")"):s?v+("'"+s+"';"):v+" ''";N&&(v+=" '"+N+"'");s="content: "+v+";";t(b,g,r,s)}else"list-level-style-image"===l.localName?(s="content: none;",t(b,g,r,s)):"list-level-style-bullet"===l.localName&&(s="content: '"+r.getAttributeNS(u,"bullet-char")+"';",t(b,g,r,s));l=l.nextSibling}else if("page"===c)if(N=r=g="",l=m.getElementsByTagNameNS(q,
+"page-layout-properties")[0],r=l.parentNode.parentNode.parentNode.masterStyles,N="",g+=e(l,ea),s=l.getElementsByTagNameNS(q,"background-image"),0c)break;e=e.nextSibling}a.insertBefore(b,e)}}}function h(a){this.OdfContainer=a}function a(a,
-b,c,d){var e=this;this.size=0;this.type=null;this.name=a;this.container=c;this.onchange=this.onreadystatechange=this.document=this.mimetype=this.url=null;this.EMPTY=0;this.LOADING=1;this.DONE=2;this.state=this.EMPTY;this.load=function(){null!==d&&(this.mimetype=b,d.loadAsDataURL(a,b,function(a,b){a&&runtime.log(a);e.url=b;if(e.onchange)e.onchange(e);if(e.onstatereadychange)e.onstatereadychange(e)}))}}var n=new odf.StyleInfo,f="urn:oasis:names:tc:opendocument:xmlns:office:1.0",d="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0",
-s="urn:webodf:names:scope",k="meta settings scripts font-face-decls styles automatic-styles master-styles body".split(" "),q=(new Date).getTime()+"_webodf_",g=new core.Base64;h.prototype=new function(){};h.prototype.constructor=h;h.namespaceURI=f;h.localName="document";a.prototype.load=function(){};a.prototype.getUrl=function(){return this.data?"data:;base64,"+g.toBase64(this.data):null};odf.OdfContainer=function r(g,k){function l(a){for(var b=a.firstChild,c;b;)c=b.nextSibling,b.nodeType===Node.ELEMENT_NODE?
-l(b):b.nodeType===Node.PROCESSING_INSTRUCTION_NODE&&a.removeChild(b),b=c}function x(a,b){for(var c=a&&a.firstChild;c;)c.nodeType===Node.ELEMENT_NODE&&c.setAttributeNS(s,"scope",b),c=c.nextSibling}function v(a,b){var c=null,d,e,f;if(a)for(c=a.cloneNode(!0),d=c.firstChild;d;)e=d.nextSibling,d.nodeType===Node.ELEMENT_NODE&&(f=d.getAttributeNS(s,"scope"))&&f!==b&&c.removeChild(d),d=e;return c}function t(a){var b=I.rootElement.ownerDocument,c;if(a){l(a.documentElement);try{c=b.importNode(a.documentElement,
-!0)}catch(d){}}return c}function E(a){I.state=a;if(I.onchange)I.onchange(I);if(I.onstatereadychange)I.onstatereadychange(I)}function H(a){Z=null;I.rootElement=a;a.fontFaceDecls=m(a,f,"font-face-decls");a.styles=m(a,f,"styles");a.automaticStyles=m(a,f,"automatic-styles");a.masterStyles=m(a,f,"master-styles");a.body=m(a,f,"body");a.meta=m(a,f,"meta")}function y(a){a=t(a);var c=I.rootElement;a&&"document-styles"===a.localName&&a.namespaceURI===f?(c.fontFaceDecls=m(a,f,"font-face-decls"),b(c,c.fontFaceDecls),
-c.styles=m(a,f,"styles"),b(c,c.styles),c.automaticStyles=m(a,f,"automatic-styles"),x(c.automaticStyles,"document-styles"),b(c,c.automaticStyles),c.masterStyles=m(a,f,"master-styles"),b(c,c.masterStyles),n.prefixStyleNames(c.automaticStyles,q,c.masterStyles)):E(r.INVALID)}function P(a){a=t(a);var c,d,e;if(a&&"document-content"===a.localName&&a.namespaceURI===f){c=I.rootElement;d=m(a,f,"font-face-decls");if(c.fontFaceDecls&&d)for(e=d.firstChild;e;)c.fontFaceDecls.appendChild(e),e=d.firstChild;else d&&
-(c.fontFaceDecls=d,b(c,d));d=m(a,f,"automatic-styles");x(d,"document-content");if(c.automaticStyles&&d)for(e=d.firstChild;e;)c.automaticStyles.appendChild(e),e=d.firstChild;else d&&(c.automaticStyles=d,b(c,d));c.body=m(a,f,"body");b(c,c.body)}else E(r.INVALID)}function B(a){a=t(a);var c;a&&("document-meta"===a.localName&&a.namespaceURI===f)&&(c=I.rootElement,c.meta=m(a,f,"meta"),b(c,c.meta))}function R(a){a=t(a);var c;a&&("document-settings"===a.localName&&a.namespaceURI===f)&&(c=I.rootElement,c.settings=
-m(a,f,"settings"),b(c,c.settings))}function G(a){a=t(a);var b;if(a&&"manifest"===a.localName&&a.namespaceURI===d)for(b=I.rootElement,b.manifest=a,a=b.manifest.firstChild;a;)a.nodeType===Node.ELEMENT_NODE&&("file-entry"===a.localName&&a.namespaceURI===d)&&(Q[a.getAttributeNS(d,"full-path")]=a.getAttributeNS(d,"media-type")),a=a.nextSibling}function L(a){var b=a.shift(),c,d;b?(c=b[0],d=b[1],K.loadAsDOM(c,function(b,c){d(c);b||I.state===r.INVALID||L(a)})):E(r.DONE)}function X(a){var b="";odf.Namespaces.forEachPrefix(function(a,
-c){b+=" xmlns:"+a+'="'+c+'"'});return''}function oa(){var a=new xmldom.LSSerializer,b=X("document-meta");a.filter=new odf.OdfNodeFilter;b+=a.writeToString(I.rootElement.meta,odf.Namespaces.namespaceMap);return b+""}function N(a,b){var c=document.createElementNS(d,"manifest:file-entry");c.setAttributeNS(d,"manifest:full-path",a);c.setAttributeNS(d,"manifest:media-type",b);return c}function sa(){var a=
-runtime.parseXML(''),b=m(a,d,"manifest"),c=new xmldom.LSSerializer,e;for(e in Q)Q.hasOwnProperty(e)&&b.appendChild(N(e,Q[e]));c.filter=new odf.OdfNodeFilter;return'\n'+c.writeToString(a,odf.Namespaces.namespaceMap)}function Y(){var a=new xmldom.LSSerializer,b=X("document-settings");a.filter=new odf.OdfNodeFilter;b+=a.writeToString(I.rootElement.settings,odf.Namespaces.namespaceMap);
-return b+""}function ba(){var a=odf.Namespaces.namespaceMap,b=new xmldom.LSSerializer,c=v(I.rootElement.automaticStyles,"document-styles"),d=I.rootElement.masterStyles&&I.rootElement.masterStyles.cloneNode(!0),f=X("document-styles");n.removePrefixFromStyleNames(c,q,d);b.filter=new e(d,c);f+=b.writeToString(I.rootElement.fontFaceDecls,a);f+=b.writeToString(I.rootElement.styles,a);f+=b.writeToString(c,a);f+=b.writeToString(d,a);return f+""}function M(){var a=
-odf.Namespaces.namespaceMap,b=new xmldom.LSSerializer,d=v(I.rootElement.automaticStyles,"document-content"),e=X("document-content");b.filter=new c(I.rootElement.body,d);e+=b.writeToString(d,a);e+=b.writeToString(I.rootElement.body,a);return e+""}function V(a,b){runtime.loadXML(a,function(a,c){if(a)b(a);else{var d=t(c);d&&"document"===d.localName&&d.namespaceURI===f?(H(d),E(r.DONE)):E(r.INVALID)}})}function S(){function a(b,c){var e;c||(c=b);e=document.createElementNS(f,c);
-d[b]=e;d.appendChild(e)}var b=new core.Zip("",null),c=runtime.byteArrayFromString("application/vnd.oasis.opendocument.text","utf8"),d=I.rootElement,e=document.createElementNS(f,"text");b.save("mimetype",c,!1,new Date);a("meta");a("settings");a("scripts");a("fontFaceDecls","font-face-decls");a("styles");a("automaticStyles","automatic-styles");a("masterStyles","master-styles");a("body");d.body.appendChild(e);E(r.DONE);return b}function J(){var a,b=new Date;a=runtime.byteArrayFromString(Y(),"utf8");
-K.save("settings.xml",a,!0,b);a=runtime.byteArrayFromString(oa(),"utf8");K.save("meta.xml",a,!0,b);a=runtime.byteArrayFromString(ba(),"utf8");K.save("styles.xml",a,!0,b);a=runtime.byteArrayFromString(M(),"utf8");K.save("content.xml",a,!0,b);a=runtime.byteArrayFromString(sa(),"utf8");K.save("META-INF/manifest.xml",a,!0,b)}function C(a,b){J();K.writeAs(a,function(a){b(a)})}var I=this,K,Q={},Z;this.onstatereadychange=k;this.rootElement=this.state=this.onchange=null;this.setRootElement=H;this.getContentElement=
-function(){var a;Z||(a=I.rootElement.body,Z=a.getElementsByTagNameNS(f,"text")[0]||a.getElementsByTagNameNS(f,"presentation")[0]||a.getElementsByTagNameNS(f,"spreadsheet")[0]);return Z};this.getDocumentType=function(){var a=I.getContentElement();return a&&a.localName};this.getPart=function(b){return new a(b,Q[b],I,K)};this.getPartData=function(a,b){K.load(a,b)};this.createByteArray=function(a,b){J();K.createByteArray(a,b)};this.saveAs=C;this.save=function(a){C(g,a)};this.getUrl=function(){return g};
-this.state=r.LOADING;this.rootElement=function(a){var b=document.createElementNS(a.namespaceURI,a.localName),c;a=new a;for(c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}(h);K=g?new core.Zip(g,function(a,b){K=b;a?V(g,function(b){a&&(K.error=a+"\n"+b,E(r.INVALID))}):L([["styles.xml",y],["content.xml",P],["meta.xml",B],["settings.xml",R],["META-INF/manifest.xml",G]])}):S()};odf.OdfContainer.EMPTY=0;odf.OdfContainer.LOADING=1;odf.OdfContainer.DONE=2;odf.OdfContainer.INVALID=3;odf.OdfContainer.SAVING=
+odf.OdfContainer=function(){function l(a,b,c){for(a=a?a.firstChild:null;a;){if(a.localName===c&&a.namespaceURI===b)return a;a=a.nextSibling}return null}function m(a){var b,c=k.length;for(b=0;bc)break;e=e.nextSibling}a.insertBefore(b,e)}}}function n(a){this.OdfContainer=a}function a(a,
+b,c,d){var e=this;this.size=0;this.type=null;this.name=a;this.container=c;this.onchange=this.onreadystatechange=this.document=this.mimetype=this.url=null;this.EMPTY=0;this.LOADING=1;this.DONE=2;this.state=this.EMPTY;this.load=function(){null!==d&&(this.mimetype=b,d.loadAsDataURL(a,b,function(a,b){a&&runtime.log(a);e.url=b;if(e.onchange)e.onchange(e);if(e.onstatereadychange)e.onstatereadychange(e)}))}}var e=new odf.StyleInfo,f="urn:oasis:names:tc:opendocument:xmlns:office:1.0",d="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0",
+t="urn:webodf:names:scope",k="meta settings scripts font-face-decls styles automatic-styles master-styles body".split(" "),p=(new Date).getTime()+"_webodf_",h=new core.Base64;n.prototype=new function(){};n.prototype.constructor=n;n.namespaceURI=f;n.localName="document";a.prototype.load=function(){};a.prototype.getUrl=function(){return this.data?"data:;base64,"+h.toBase64(this.data):null};odf.OdfContainer=function s(h,k){function m(a){for(var b=a.firstChild,c;b;)c=b.nextSibling,b.nodeType===Node.ELEMENT_NODE?
+m(b):b.nodeType===Node.PROCESSING_INSTRUCTION_NODE&&a.removeChild(b),b=c}function y(a,b){for(var c=a&&a.firstChild;c;)c.nodeType===Node.ELEMENT_NODE&&c.setAttributeNS(t,"scope",b),c=c.nextSibling}function v(a,b){var c=null,d,e,h;if(a)for(c=a.cloneNode(!0),d=c.firstChild;d;)e=d.nextSibling,d.nodeType===Node.ELEMENT_NODE&&(h=d.getAttributeNS(t,"scope"))&&h!==b&&c.removeChild(d),d=e;return c}function r(a){var b=I.rootElement.ownerDocument,c;if(a){m(a.documentElement);try{c=b.importNode(a.documentElement,
+!0)}catch(d){}}return c}function z(a){I.state=a;if(I.onchange)I.onchange(I);if(I.onstatereadychange)I.onstatereadychange(I)}function G(a){ba=null;I.rootElement=a;a.fontFaceDecls=l(a,f,"font-face-decls");a.styles=l(a,f,"styles");a.automaticStyles=l(a,f,"automatic-styles");a.masterStyles=l(a,f,"master-styles");a.body=l(a,f,"body");a.meta=l(a,f,"meta")}function C(a){a=r(a);var c=I.rootElement;a&&"document-styles"===a.localName&&a.namespaceURI===f?(c.fontFaceDecls=l(a,f,"font-face-decls"),b(c,c.fontFaceDecls),
+c.styles=l(a,f,"styles"),b(c,c.styles),c.automaticStyles=l(a,f,"automatic-styles"),y(c.automaticStyles,"document-styles"),b(c,c.automaticStyles),c.masterStyles=l(a,f,"master-styles"),b(c,c.masterStyles),e.prefixStyleNames(c.automaticStyles,p,c.masterStyles)):z(s.INVALID)}function L(a){a=r(a);var c,d,e;if(a&&"document-content"===a.localName&&a.namespaceURI===f){c=I.rootElement;d=l(a,f,"font-face-decls");if(c.fontFaceDecls&&d)for(e=d.firstChild;e;)c.fontFaceDecls.appendChild(e),e=d.firstChild;else d&&
+(c.fontFaceDecls=d,b(c,d));d=l(a,f,"automatic-styles");y(d,"document-content");if(c.automaticStyles&&d)for(e=d.firstChild;e;)c.automaticStyles.appendChild(e),e=d.firstChild;else d&&(c.automaticStyles=d,b(c,d));c.body=l(a,f,"body");b(c,c.body)}else z(s.INVALID)}function B(a){a=r(a);var c;a&&("document-meta"===a.localName&&a.namespaceURI===f)&&(c=I.rootElement,c.meta=l(a,f,"meta"),b(c,c.meta))}function M(a){a=r(a);var c;a&&("document-settings"===a.localName&&a.namespaceURI===f)&&(c=I.rootElement,c.settings=
+l(a,f,"settings"),b(c,c.settings))}function F(a){a=r(a);var b;if(a&&"manifest"===a.localName&&a.namespaceURI===d)for(b=I.rootElement,b.manifest=a,a=b.manifest.firstChild;a;)a.nodeType===Node.ELEMENT_NODE&&("file-entry"===a.localName&&a.namespaceURI===d)&&(R[a.getAttributeNS(d,"full-path")]=a.getAttributeNS(d,"media-type")),a=a.nextSibling}function K(a){var b=a.shift(),c,d;b?(c=b[0],d=b[1],J.loadAsDOM(c,function(b,c){d(c);b||I.state===s.INVALID||K(a)})):z(s.DONE)}function ea(a){var b="";odf.Namespaces.forEachPrefix(function(a,
+c){b+=" xmlns:"+a+'="'+c+'"'});return''}function pa(){var a=new xmldom.LSSerializer,b=ea("document-meta");a.filter=new odf.OdfNodeFilter;b+=a.writeToString(I.rootElement.meta,odf.Namespaces.namespaceMap);return b+""}function N(a,b){var c=document.createElementNS(d,"manifest:file-entry");c.setAttributeNS(d,"manifest:full-path",a);c.setAttributeNS(d,"manifest:media-type",b);return c}function qa(){var a=
+runtime.parseXML(''),b=l(a,d,"manifest"),c=new xmldom.LSSerializer,e;for(e in R)R.hasOwnProperty(e)&&b.appendChild(N(e,R[e]));c.filter=new odf.OdfNodeFilter;return'\n'+c.writeToString(a,odf.Namespaces.namespaceMap)}function Z(){var a=new xmldom.LSSerializer,b=ea("document-settings");a.filter=new odf.OdfNodeFilter;b+=a.writeToString(I.rootElement.settings,odf.Namespaces.namespaceMap);
+return b+""}function $(){var a=odf.Namespaces.namespaceMap,b=new xmldom.LSSerializer,c=v(I.rootElement.automaticStyles,"document-styles"),d=I.rootElement.masterStyles&&I.rootElement.masterStyles.cloneNode(!0),h=ea("document-styles");e.removePrefixFromStyleNames(c,p,d);b.filter=new g(d,c);h+=b.writeToString(I.rootElement.fontFaceDecls,a);h+=b.writeToString(I.rootElement.styles,a);h+=b.writeToString(c,a);h+=b.writeToString(d,a);return h+""}function Q(){var a=
+odf.Namespaces.namespaceMap,b=new xmldom.LSSerializer,d=v(I.rootElement.automaticStyles,"document-content"),e=ea("document-content");b.filter=new c(I.rootElement.body,d);e+=b.writeToString(d,a);e+=b.writeToString(I.rootElement.body,a);return e+""}function W(a,b){runtime.loadXML(a,function(a,c){if(a)b(a);else{var d=r(c);d&&"document"===d.localName&&d.namespaceURI===f?(G(d),z(s.DONE)):z(s.INVALID)}})}function S(){function a(b,c){var e;c||(c=b);e=document.createElementNS(f,
+c);d[b]=e;d.appendChild(e)}var b=new core.Zip("",null),c=runtime.byteArrayFromString("application/vnd.oasis.opendocument.text","utf8"),d=I.rootElement,e=document.createElementNS(f,"text");b.save("mimetype",c,!1,new Date);a("meta");a("settings");a("scripts");a("fontFaceDecls","font-face-decls");a("styles");a("automaticStyles","automatic-styles");a("masterStyles","master-styles");a("body");d.body.appendChild(e);z(s.DONE);return b}function O(){var a,b=new Date;a=runtime.byteArrayFromString(Z(),"utf8");
+J.save("settings.xml",a,!0,b);a=runtime.byteArrayFromString(pa(),"utf8");J.save("meta.xml",a,!0,b);a=runtime.byteArrayFromString($(),"utf8");J.save("styles.xml",a,!0,b);a=runtime.byteArrayFromString(Q(),"utf8");J.save("content.xml",a,!0,b);a=runtime.byteArrayFromString(qa(),"utf8");J.save("META-INF/manifest.xml",a,!0,b)}function H(a,b){O();J.writeAs(a,function(a){b(a)})}var I=this,J,R={},ba;this.onstatereadychange=k;this.rootElement=this.state=this.onchange=null;this.setRootElement=G;this.getContentElement=
+function(){var a;ba||(a=I.rootElement.body,ba=a.getElementsByTagNameNS(f,"text")[0]||a.getElementsByTagNameNS(f,"presentation")[0]||a.getElementsByTagNameNS(f,"spreadsheet")[0]);return ba};this.getDocumentType=function(){var a=I.getContentElement();return a&&a.localName};this.getPart=function(b){return new a(b,R[b],I,J)};this.getPartData=function(a,b){J.load(a,b)};this.createByteArray=function(a,b){O();J.createByteArray(a,b)};this.saveAs=H;this.save=function(a){H(h,a)};this.getUrl=function(){return h};
+this.state=s.LOADING;this.rootElement=function(a){var b=document.createElementNS(a.namespaceURI,a.localName),c;a=new a;for(c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}(n);J=h?new core.Zip(h,function(a,b){J=b;a?W(h,function(b){a&&(J.error=a+"\n"+b,z(s.INVALID))}):K([["styles.xml",C],["content.xml",L],["meta.xml",B],["settings.xml",M],["META-INF/manifest.xml",F]])}):S()};odf.OdfContainer.EMPTY=0;odf.OdfContainer.LOADING=1;odf.OdfContainer.DONE=2;odf.OdfContainer.INVALID=3;odf.OdfContainer.SAVING=
4;odf.OdfContainer.MODIFIED=5;odf.OdfContainer.getContainer=function(a){return new odf.OdfContainer(a,null)};return odf.OdfContainer}();
// Input 34
/*
@@ -721,9 +721,9 @@ this.state=r.LOADING;this.rootElement=function(a){var b=document.createElementNS
@source: http://gitorious.org/webodf/webodf/
*/
runtime.loadClass("core.Base64");runtime.loadClass("xmldom.XPath");runtime.loadClass("odf.OdfContainer");
-odf.FontLoader=function(){function m(c,b,h,a,n){var f,d=0,l;for(l in c)if(c.hasOwnProperty(l)){if(d===h){f=l;break}d+=1}f?b.getPartData(c[f].href,function(d,l){if(d)runtime.log(d);else{var g="@font-face { font-family: '"+(c[f].family||f)+"'; src: url(data:application/x-font-ttf;charset=binary;base64,"+e.convertUTF8ArrayToBase64(l)+') format("truetype"); }';try{a.insertRule(g,a.cssRules.length)}catch(p){runtime.log("Problem inserting rule in CSS: "+runtime.toJson(p)+"\nRule: "+g)}}m(c,b,h+1,a,n)}):
-n&&n()}var l=new xmldom.XPath,e=new core.Base64;odf.FontLoader=function(){this.loadFonts=function(c,b){for(var e=c.rootElement.fontFaceDecls;b.cssRules.length;)b.deleteRule(b.cssRules.length-1);if(e){var a={},n,f,d,s;if(e)for(e=l.getODFElementsWithXPath(e,"style:font-face[svg:font-face-src]",odf.Namespaces.resolvePrefix),n=0;n text|list-item > *:first-child:before {";if(F=y.getAttributeNS(t,"style-name")){y=
-p[F];C=R.getFirstNonWhitespaceChild(y);y=void 0;if(C)if("list-level-style-number"===C.localName){y=C.getAttributeNS(A,"num-format");F=C.getAttributeNS(A,"num-suffix");var M="",M={1:"decimal",a:"lower-latin",A:"upper-latin",i:"lower-roman",I:"upper-roman"},J=void 0,J=C.getAttributeNS(A,"num-prefix")||"",J=M.hasOwnProperty(y)?J+(" counter(list, "+M[y]+")"):y?J+("'"+y+"';"):J+" ''";F&&(J+=" '"+F+"'");y=M="content: "+J+";"}else"list-level-style-image"===C.localName?y="content: none;":"list-level-style-bullet"===
-C.localName&&(y="content: '"+C.getAttributeNS(t,"bullet-char")+"';");C=y}if(G){for(y=m[G];y;)G=y,y=m[G];D+="counter-increment:"+G+";";C?(C=C.replace("list",G),D+=C):D+="content:counter("+G+");"}else G="",C?(C=C.replace("list",u),D+=C):D+="content: counter("+u+");",D+="counter-increment:"+u+";",g.insertRule("text|list#"+u+" {counter-reset:"+u+"}",g.cssRules.length);D+="}";m[u]=G;D&&g.insertRule(D,g.cssRules.length)}O.insertBefore(L,O.firstChild);x();E(f);if(!b&&(f=[K],ma.hasOwnProperty("statereadychange")))for(g=
-ma.statereadychange,C=0;C text|list-item > *:first-child:before {";if(ga=V.getAttributeNS(r,
+"style-name")){V=q[ga];x=M.getFirstNonWhitespaceChild(V);V=void 0;if(x)if("list-level-style-number"===x.localName){V=x.getAttributeNS(A,"num-format");ga=x.getAttributeNS(A,"num-suffix");var D="",D={1:"decimal",a:"lower-latin",A:"upper-latin",i:"lower-roman",I:"upper-roman"},F=void 0,F=x.getAttributeNS(A,"num-prefix")||"",F=D.hasOwnProperty(V)?F+(" counter(list, "+D[V]+")"):V?F+("'"+V+"';"):F+" ''";ga&&(F+=" '"+ga+"'");V=D="content: "+F+";"}else"list-level-style-image"===x.localName?V="content: none;":
+"list-level-style-bullet"===x.localName&&(V="content: '"+x.getAttributeNS(r,"bullet-char")+"';");x=V}if(Y){for(V=l[Y];V;)Y=V,V=l[Y];z+="counter-increment:"+Y+";";x?(x=x.replace("list",Y),z+=x):z+="content:counter("+Y+");"}else Y="",x?(x=x.replace("list",u),z+=x):z+="content: counter("+u+");",z+="counter-increment:"+u+";",g.insertRule("text|list#"+u+" {counter-reset:"+u+"}",g.cssRules.length);z+="}";l[u]=Y;z&&g.insertRule(z,g.cssRules.length)}P.insertBefore(K,P.firstChild);y();C(f);if(!b&&(f=[J],la.hasOwnProperty("statereadychange")))for(g=
+la.statereadychange,x=0;xd?-n.countBackwardSteps(-d,
-f):0;a.move(d);b&&(f=0b?-n.countBackwardSteps(-b,f):0,a.move(f,!0));e.emit(ops.OdtDocument.signalCursorMoved,a);return!0};this.spec=function(){return{optype:"MoveCursor",memberid:l,timestamp:e,position:c,length:b}}};
+ops.OpMoveCursor=function(){var l=this,m,g,c,b;this.init=function(n){m=n.memberid;g=n.timestamp;c=parseInt(n.position,10);b=void 0!==n.length?parseInt(n.length,10):0};this.merge=function(n){return"MoveCursor"===n.optype&&n.memberid===m?(c=n.position,b=n.length,g=n.timestamp,!0):!1};this.transform=function(g,a){var e=g.spec(),f=c+b,d,t=[l];switch(e.optype){case "RemoveText":d=e.position+e.length;d<=c?c-=e.length:e.positiond?-e.countBackwardSteps(-d,
+f):0;a.move(d);b&&(f=0b?-e.countBackwardSteps(-b,f):0,a.move(f,!0));g.emit(ops.OdtDocument.signalCursorMoved,a);return!0};this.spec=function(){return{optype:"MoveCursor",memberid:m,timestamp:g,position:c,length:b}}};
// Input 46
/*
@@ -1170,11 +1170,11 @@ f):0;a.move(d);b&&(f=0b?-n.countBackwardSteps(-b,f
@source: http://www.webodf.org/
@source: http://gitorious.org/webodf/webodf/
*/
-ops.OpInsertTable=function(){function m(a,c){var d;if(1===s.length)d=s[0];else if(3===s.length)switch(a){case 0:d=s[0];break;case b-1:d=s[2];break;default:d=s[1]}else d=s[a];if(1===d.length)return d[0];if(3===d.length)switch(c){case 0:return d[0];case h-1:return d[2];default:return d[1]}return d[c]}var l=this,e,c,b,h,a,n,f,d,s;this.init=function(k){e=k.memberid;c=k.timestamp;a=parseInt(k.position,10);b=parseInt(k.initialRows,10);h=parseInt(k.initialColumns,10);n=k.tableName;f=k.tableStyleName;d=k.tableColumnStyleName;
-s=k.tableCellStyleMatrix};this.transform=function(b,c){var d=b.spec(),e=[l];switch(d.optype){case "InsertTable":e=null;break;case "AddAnnotation":d.position=a.textNode.length?null:a.textNode.splitText(a.offset));for(a=a.textNode;a!==f;)if(a=a.parentNode,d=a.cloneNode(!1),k){for(m&&d.appendChild(m);k.nextSibling;)d.appendChild(k.nextSibling);
-a.parentNode.insertBefore(d,a.nextSibling);k=a;m=d}else a.parentNode.insertBefore(d,a),k=d,m=a;b.isListItem(m)&&(m=m.childNodes[0]);h.fixCursorPositions(l);h.getOdfCanvas().refreshSize();h.emit(ops.OdtDocument.signalParagraphChanged,{paragraphElement:n,memberId:l,timeStamp:e});h.emit(ops.OdtDocument.signalParagraphChanged,{paragraphElement:m,memberId:l,timeStamp:e});h.getOdfCanvas().rerenderAnnotations();return!0};this.spec=function(){return{optype:"SplitParagraph",memberid:l,timestamp:e,position:c}}};
+ops.OpSplitParagraph=function(){var l=this,m,g,c,b=new odf.OdfUtils;this.init=function(b){m=b.memberid;g=b.timestamp;c=parseInt(b.position,10)};this.transform=function(b,a){var e=b.spec(),f=[l];switch(e.optype){case "SplitParagraph":e.position=a.textNode.length?null:a.textNode.splitText(a.offset));for(a=a.textNode;a!==f;)if(a=a.parentNode,d=a.cloneNode(!1),k){for(l&&d.appendChild(l);k.nextSibling;)d.appendChild(k.nextSibling);
+a.parentNode.insertBefore(d,a.nextSibling);k=a;l=d}else a.parentNode.insertBefore(d,a),k=d,l=a;b.isListItem(l)&&(l=l.childNodes[0]);n.fixCursorPositions(m);n.getOdfCanvas().refreshSize();n.emit(ops.OdtDocument.signalParagraphChanged,{paragraphElement:e,memberId:m,timeStamp:g});n.emit(ops.OdtDocument.signalParagraphChanged,{paragraphElement:l,memberId:m,timeStamp:g});n.getOdfCanvas().rerenderAnnotations();return!0};this.spec=function(){return{optype:"SplitParagraph",memberid:m,timestamp:g,position:c}}};
// Input 50
/*
@@ -1330,8 +1330,8 @@ a.parentNode.insertBefore(d,a.nextSibling);k=a;m=d}else a.parentNode.insertBefor
@source: http://www.webodf.org/
@source: http://gitorious.org/webodf/webodf/
*/
-ops.OpSetParagraphStyle=function(){var m=this,l,e,c,b;this.init=function(h){l=h.memberid;e=h.timestamp;c=h.position;b=h.styleName};this.transform=function(c,a){var e=c.spec(),f=[m];switch(e.optype){case "RemoveParagraphStyle":e.styleName===b&&(b="")}return f};this.execute=function(h){var a;if(a=h.getPositionInTextNode(c))if(a=h.getParagraphElement(a.textNode))return""!==b?a.setAttributeNS("urn:oasis:names:tc:opendocument:xmlns:text:1.0","text:style-name",b):a.removeAttributeNS("urn:oasis:names:tc:opendocument:xmlns:text:1.0",
-"style-name"),h.getOdfCanvas().refreshSize(),h.emit(ops.OdtDocument.signalParagraphChanged,{paragraphElement:a,timeStamp:e,memberId:l}),h.getOdfCanvas().rerenderAnnotations(),!0;return!1};this.spec=function(){return{optype:"SetParagraphStyle",memberid:l,timestamp:e,position:c,styleName:b}}};
+ops.OpSetParagraphStyle=function(){var l=this,m,g,c,b;this.init=function(n){m=n.memberid;g=n.timestamp;c=n.position;b=n.styleName};this.transform=function(c,a){var e=c.spec(),f=[l];switch(e.optype){case "RemoveParagraphStyle":e.styleName===b&&(b="")}return f};this.execute=function(n){var a;if(a=n.getPositionInTextNode(c))if(a=n.getParagraphElement(a.textNode))return""!==b?a.setAttributeNS("urn:oasis:names:tc:opendocument:xmlns:text:1.0","text:style-name",b):a.removeAttributeNS("urn:oasis:names:tc:opendocument:xmlns:text:1.0",
+"style-name"),n.getOdfCanvas().refreshSize(),n.emit(ops.OdtDocument.signalParagraphChanged,{paragraphElement:a,timeStamp:g,memberId:m}),n.getOdfCanvas().rerenderAnnotations(),!0;return!1};this.spec=function(){return{optype:"SetParagraphStyle",memberid:m,timestamp:g,position:c,styleName:b}}};
// Input 51
/*
@@ -1368,11 +1368,11 @@ ops.OpSetParagraphStyle=function(){var m=this,l,e,c,b;this.init=function(h){l=h.
@source: http://gitorious.org/webodf/webodf/
*/
runtime.loadClass("odf.Namespaces");
-ops.OpUpdateParagraphStyle=function(){function m(a,b){var c,d,e=b?b.split(","):[];for(c=0;ck?-g.countBackwardSteps(-k,d):0,s.move(d),l.emit(ops.OdtDocument.signalCursorMoved,s));l.getOdfCanvas().addAnnotation(f);return!0};this.spec=function(){return{optype:"AddAnnotation",memberid:e,timestamp:c,position:b,
-length:h,name:a}}};
+ops.OpAddAnnotation=function(){function l(a,b,c){if(c=a.getPositionInTextNode(c,g))a=c.textNode,c.offset!==a.length&&a.splitText(c.offset),a.parentNode.insertBefore(b,a.nextSibling)}var m=this,g,c,b,n,a;this.init=function(e){g=e.memberid;c=parseInt(e.timestamp,10);b=parseInt(e.position,10);n=parseInt(e.length,10)||0;a=e.name};this.transform=function(a,c){var d=a.spec(),g=b+n,k=[m];switch(d.optype){case "AddAnnotation":d.positionk?-h.countBackwardSteps(-k,d):0,m.move(d),e.emit(ops.OdtDocument.signalCursorMoved,m));e.getOdfCanvas().addAnnotation(f);return!0};this.spec=function(){return{optype:"AddAnnotation",memberid:g,timestamp:c,position:b,
+length:n,name:a}}};
// Input 55
/*
@@ -1524,9 +1524,9 @@ length:h,name:a}}};
@source: http://gitorious.org/webodf/webodf/
*/
runtime.loadClass("odf.Namespaces");runtime.loadClass("core.DomUtils");
-ops.OpRemoveAnnotation=function(){var m,l,e,c,b;this.init=function(h){m=h.memberid;l=h.timestamp;e=parseInt(h.position,10);c=parseInt(h.length,10);b=new core.DomUtils};this.transform=function(b,a){return null};this.execute=function(c){for(var a=c.getIteratorAtPosition(e).container(),l,f=null,d=null;a.namespaceURI!==odf.Namespaces.officens||"annotation"!==a.localName;)a=a.parentNode;if(null===a)return!1;f=a;(l=f.getAttributeNS(odf.Namespaces.officens,"name"))&&(d=b.getElementsByTagNameNS(c.getRootNode(),
-odf.Namespaces.officens,"annotation-end").filter(function(a){return l===a.getAttributeNS(odf.Namespaces.officens,"name")})[0]||null);c.getOdfCanvas().forgetAnnotations();for(a=b.getElementsByTagNameNS(f,odf.Namespaces.webodfns+":names:cursor","cursor");a.length;)f.parentNode.insertBefore(a.pop(),f);f.parentNode.removeChild(f);d&&d.parentNode.removeChild(d);c.fixCursorPositions();c.getOdfCanvas().refreshAnnotations();return!0};this.spec=function(){return{optype:"RemoveAnnotation",memberid:m,timestamp:l,
-position:e,length:c}}};
+ops.OpRemoveAnnotation=function(){var l,m,g,c,b;this.init=function(n){l=n.memberid;m=n.timestamp;g=parseInt(n.position,10);c=parseInt(n.length,10);b=new core.DomUtils};this.transform=function(b,a){return null};this.execute=function(c){for(var a=c.getIteratorAtPosition(g).container(),e,f=null,d=null;a.namespaceURI!==odf.Namespaces.officens||"annotation"!==a.localName;)a=a.parentNode;if(null===a)return!1;f=a;(e=f.getAttributeNS(odf.Namespaces.officens,"name"))&&(d=b.getElementsByTagNameNS(c.getRootNode(),
+odf.Namespaces.officens,"annotation-end").filter(function(a){return e===a.getAttributeNS(odf.Namespaces.officens,"name")})[0]||null);c.getOdfCanvas().forgetAnnotations();for(a=b.getElementsByTagNameNS(f,odf.Namespaces.webodfns+":names:cursor","cursor");a.length;)f.parentNode.insertBefore(a.pop(),f);f.parentNode.removeChild(f);d&&d.parentNode.removeChild(d);c.fixCursorPositions();c.getOdfCanvas().refreshAnnotations();return!0};this.spec=function(){return{optype:"RemoveAnnotation",memberid:l,timestamp:m,
+position:g,length:c}}};
// Input 56
/*
@@ -1564,21 +1564,21 @@ position:e,length:c}}};
*/
runtime.loadClass("ops.OpAddCursor");runtime.loadClass("ops.OpApplyDirectStyling");runtime.loadClass("ops.OpRemoveCursor");runtime.loadClass("ops.OpMoveCursor");runtime.loadClass("ops.OpInsertTable");runtime.loadClass("ops.OpInsertText");runtime.loadClass("ops.OpRemoveText");runtime.loadClass("ops.OpSplitParagraph");runtime.loadClass("ops.OpSetParagraphStyle");runtime.loadClass("ops.OpUpdateParagraphStyle");runtime.loadClass("ops.OpAddParagraphStyle");runtime.loadClass("ops.OpRemoveParagraphStyle");
runtime.loadClass("ops.OpAddAnnotation");runtime.loadClass("ops.OpRemoveAnnotation");
-ops.OperationFactory=function(){function m(e){return function(){return new e}}var l;this.register=function(e,c){l[e]=c};this.create=function(e){var c=null,b=l[e.optype];b&&(c=b(e),c.init(e));return c};l={AddCursor:m(ops.OpAddCursor),ApplyDirectStyling:m(ops.OpApplyDirectStyling),InsertTable:m(ops.OpInsertTable),InsertText:m(ops.OpInsertText),RemoveText:m(ops.OpRemoveText),SplitParagraph:m(ops.OpSplitParagraph),SetParagraphStyle:m(ops.OpSetParagraphStyle),UpdateParagraphStyle:m(ops.OpUpdateParagraphStyle),
-AddParagraphStyle:m(ops.OpAddParagraphStyle),RemoveParagraphStyle:m(ops.OpRemoveParagraphStyle),MoveCursor:m(ops.OpMoveCursor),RemoveCursor:m(ops.OpRemoveCursor),AddAnnotation:m(ops.OpAddAnnotation),RemoveAnnotation:m(ops.OpRemoveAnnotation)}};
+ops.OperationFactory=function(){function l(g){return function(){return new g}}var m;this.register=function(g,c){m[g]=c};this.create=function(g){var c=null,b=m[g.optype];b&&(c=b(g),c.init(g));return c};m={AddCursor:l(ops.OpAddCursor),ApplyDirectStyling:l(ops.OpApplyDirectStyling),InsertTable:l(ops.OpInsertTable),InsertText:l(ops.OpInsertText),RemoveText:l(ops.OpRemoveText),SplitParagraph:l(ops.OpSplitParagraph),SetParagraphStyle:l(ops.OpSetParagraphStyle),UpdateParagraphStyle:l(ops.OpUpdateParagraphStyle),
+AddParagraphStyle:l(ops.OpAddParagraphStyle),RemoveParagraphStyle:l(ops.OpRemoveParagraphStyle),MoveCursor:l(ops.OpMoveCursor),RemoveCursor:l(ops.OpRemoveCursor),AddAnnotation:l(ops.OpAddAnnotation),RemoveAnnotation:l(ops.OpRemoveAnnotation)}};
// Input 57
runtime.loadClass("core.Cursor");runtime.loadClass("core.PositionIterator");runtime.loadClass("core.PositionFilter");runtime.loadClass("core.LoopWatchDog");runtime.loadClass("odf.OdfUtils");
-gui.SelectionMover=function(m,l){function e(){u.setUnfilteredPosition(m.getNode(),0);return u}function c(a,b){var c,d=null;a&&(c=b?a[a.length-1]:a[0]);c&&(d={top:c.top,left:b?c.right:c.left,bottom:c.bottom});return d}function b(a,d,e,f){var g=a.nodeType;e.setStart(a,d);e.collapse(!f);f=c(e.getClientRects(),!0===f);!f&&0a?-1:1;for(a=Math.abs(a);0m?n.previousPosition():n.nextPosition());)if(I.check(),k.acceptPosition(n)===v&&(r+=1,p=n.container(),w=b(p,n.unfilteredDomOffset(),C),w.top!==V)){if(w.top!==J&&J!==V)break;J=w.top;w=Math.abs(S-w.left);if(null===u||wa?(d=k.previousPosition,f=-1):(d=k.nextPosition,f=1);for(g=b(k.container(),k.unfilteredDomOffset(),p);d.call(k);)if(c.acceptPosition(k)===v){if(w.getParagraphElement(k.getCurrentNode())!==m)break;h=b(k.container(),k.unfilteredDomOffset(),p);if(h.bottom!==g.bottom&&(g=h.top>=g.top&&h.bottomg.bottom,!g))break;n+=f;g=h}p.detach();return n}function p(a,b){for(var c=0,d;a.parentNode!==b;)runtime.assert(null!==a.parentNode,"parent is null"),
-a=a.parentNode;for(d=b.firstChild;d!==a;)c+=1,d=d.nextSibling;return c}function r(a,b,c){runtime.assert(null!==a,"SelectionMover.countStepsToPosition called with element===null");var d=e(),f=d.container(),g=d.unfilteredDomOffset(),h=0,k=new core.LoopWatchDog(1E3);d.setUnfilteredPosition(a,b);a=d.container();runtime.assert(Boolean(a),"SelectionMover.countStepsToPosition: positionIterator.container() returned null");b=d.unfilteredDomOffset();d.setUnfilteredPosition(f,g);var f=a,g=b,l=d.container(),
-m=d.unfilteredDomOffset();if(f===l)f=m-g;else{var n=f.compareDocumentPosition(l);2===n?n=-1:4===n?n=1:10===n?(g=p(f,l),n=gf)for(;d.nextPosition()&&(k.check(),c.acceptPosition(d)===v&&(h+=1),d.container()!==a||d.unfilteredDomOffset()!==b););else if(0a?-1:1;for(a=Math.abs(a);0n?l.previousPosition():l.nextPosition());)if(I.check(),k.acceptPosition(l)===v&&(s+=1,q=l.container(),w=b(q,l.unfilteredDomOffset(),H),w.top!==W)){if(w.top!==O&&O!==W)break;O=w.top;w=Math.abs(S-w.left);if(null===u||wa?(d=k.previousPosition,e=-1):(d=k.nextPosition,e=1);for(h=b(k.container(),k.unfilteredDomOffset(),q);d.call(k);)if(c.acceptPosition(k)===v){if(w.getParagraphElement(k.getCurrentNode())!==n)break;f=b(k.container(),k.unfilteredDomOffset(),q);if(f.bottom!==h.bottom&&(h=f.top>=h.top&&f.bottomh.bottom,!h))break;l+=e;h=f}q.detach();return l}function q(a,b){for(var c=0,d;a.parentNode!==b;)runtime.assert(null!==a.parentNode,"parent is null"),
+a=a.parentNode;for(d=b.firstChild;d!==a;)c+=1,d=d.nextSibling;return c}function s(a,b,c){runtime.assert(null!==a,"SelectionMover.countStepsToPosition called with element===null");var d=g(),e=d.container(),h=d.unfilteredDomOffset(),f=0,k=new core.LoopWatchDog(1E3);d.setUnfilteredPosition(a,b);a=d.container();runtime.assert(Boolean(a),"SelectionMover.countStepsToPosition: positionIterator.container() returned null");b=d.unfilteredDomOffset();d.setUnfilteredPosition(e,h);var e=a,h=b,n=d.container(),
+l=d.unfilteredDomOffset();if(e===n)e=l-h;else{var m=e.compareDocumentPosition(n);2===m?m=-1:4===m?m=1:10===m?(h=q(e,n),m=he)for(;d.nextPosition()&&(k.check(),c.acceptPosition(d)===v&&(f+=1),d.container()!==a||d.unfilteredDomOffset()!==b););else if(0=b&&(l=-c.movePointBackward(-b,a));e.handleUpdate();return l};this.handleUpdate=function(){};this.getStepCounter=function(){return c.getStepCounter()};this.getMemberId=function(){return m};this.getNode=function(){return b.getNode()};this.getAnchorNode=function(){return b.getAnchorNode()};this.getSelectedRange=function(){return b.getSelectedRange()};
-this.getOdtDocument=function(){return l};b=new core.Cursor(l.getDOM(),m);c=new gui.SelectionMover(b,l.getRootNode())};
+ops.OdtCursor=function(l,m){var g=this,c,b;this.removeFromOdtDocument=function(){b.remove()};this.move=function(b,a){var e=0;0=b&&(e=-c.movePointBackward(-b,a));g.handleUpdate();return e};this.handleUpdate=function(){};this.getStepCounter=function(){return c.getStepCounter()};this.getMemberId=function(){return l};this.getNode=function(){return b.getNode()};this.getAnchorNode=function(){return b.getAnchorNode()};this.getSelectedRange=function(){return b.getSelectedRange()};
+this.getOdtDocument=function(){return m};b=new core.Cursor(m.getDOM(),l);c=new gui.SelectionMover(b,m.getRootNode())};
// Input 60
/*
@@ -1656,21 +1656,17 @@ this.getOdtDocument=function(){return l};b=new core.Cursor(l.getDOM(),m);c=new g
@source: http://www.webodf.org/
@source: http://gitorious.org/webodf/webodf/
*/
-ops.EditInfo=function(m,l){function e(){var c=[],a;for(a in b)b.hasOwnProperty(a)&&c.push({memberid:a,time:b[a].time});c.sort(function(a,b){return a.time-b.time});return c}var c,b={};this.getNode=function(){return c};this.getOdtDocument=function(){return l};this.getEdits=function(){return b};this.getSortedEdits=function(){return e()};this.addEdit=function(c,a){b[c]={time:a}};this.clearEdits=function(){b={}};this.destroy=function(b){m.removeChild(c);b()};c=l.getDOM().createElementNS("urn:webodf:names:editinfo",
-"editinfo");m.insertBefore(c,m.firstChild)};
+ops.EditInfo=function(l,m){function g(){var c=[],a;for(a in b)b.hasOwnProperty(a)&&c.push({memberid:a,time:b[a].time});c.sort(function(a,b){return a.time-b.time});return c}var c,b={};this.getNode=function(){return c};this.getOdtDocument=function(){return m};this.getEdits=function(){return b};this.getSortedEdits=function(){return g()};this.addEdit=function(c,a){b[c]={time:a}};this.clearEdits=function(){b={}};this.destroy=function(b){l.removeChild(c);b()};c=m.getDOM().createElementNS("urn:webodf:names:editinfo",
+"editinfo");l.insertBefore(c,l.firstChild)};
// Input 61
-gui.Avatar=function(m,l){var e=this,c,b,h;this.setColor=function(a){b.style.borderColor=a};this.setImageUrl=function(a){e.isVisible()?b.src=a:h=a};this.isVisible=function(){return"block"===c.style.display};this.show=function(){h&&(b.src=h,h=void 0);c.style.display="block"};this.hide=function(){c.style.display="none"};this.markAsFocussed=function(a){c.className=a?"active":""};this.destroy=function(a){m.removeChild(c);a()};(function(){var a=m.ownerDocument,e=a.documentElement.namespaceURI;c=a.createElementNS(e,
-"div");b=a.createElementNS(e,"img");b.width=64;b.height=64;c.appendChild(b);c.style.width="64px";c.style.height="70px";c.style.position="absolute";c.style.top="-80px";c.style.left="-34px";c.style.display=l?"block":"none";m.appendChild(c)})()};
+gui.Avatar=function(l,m){var g=this,c,b,n;this.setColor=function(a){b.style.borderColor=a};this.setImageUrl=function(a){g.isVisible()?b.src=a:n=a};this.isVisible=function(){return"block"===c.style.display};this.show=function(){n&&(b.src=n,n=void 0);c.style.display="block"};this.hide=function(){c.style.display="none"};this.markAsFocussed=function(a){c.className=a?"active":""};this.destroy=function(a){l.removeChild(c);a()};(function(){var a=l.ownerDocument,e=a.documentElement.namespaceURI;c=a.createElementNS(e,
+"div");b=a.createElementNS(e,"img");b.width=64;b.height=64;c.appendChild(b);c.style.width="64px";c.style.height="70px";c.style.position="absolute";c.style.top="-80px";c.style.left="-34px";c.style.display=m?"block":"none";l.appendChild(c)})()};
// Input 62
runtime.loadClass("gui.Avatar");runtime.loadClass("ops.OdtCursor");
-gui.Caret=function(m,l,e){function c(e){n&&a.parentNode&&(!f||e)&&(e&&void 0!==d&&runtime.clearTimeout(d),f=!0,b.style.opacity=e||"0"===b.style.opacity?"1":"0",d=runtime.setTimeout(function(){f=!1;c(!1)},500))}var b,h,a,n=!1,f=!1,d;this.refreshCursorBlinking=function(){e||m.getSelectedRange().collapsed?(n=!0,c(!0)):(n=!1,b.style.opacity="0")};this.setFocus=function(){n=!0;h.markAsFocussed(!0);c(!0)};this.removeFocus=function(){n=!1;h.markAsFocussed(!1);b.style.opacity="0"};this.setAvatarImageUrl=
-function(a){h.setImageUrl(a)};this.setColor=function(a){b.style.borderColor=a;h.setColor(a)};this.getCursor=function(){return m};this.getFocusElement=function(){return b};this.toggleHandleVisibility=function(){h.isVisible()?h.hide():h.show()};this.showHandle=function(){h.show()};this.hideHandle=function(){h.hide()};this.ensureVisible=function(){var a,c,d,e,f=m.getOdtDocument().getOdfCanvas().getElement().parentNode,h;d=f.offsetWidth-f.clientWidth+5;e=f.offsetHeight-f.clientHeight+5;h=b.getBoundingClientRect();
-a=h.left-d;c=h.top-e;d=h.right+d;e=h.bottom+e;h=f.getBoundingClientRect();ch.bottom&&(f.scrollTop+=e-h.bottom);ah.right&&(f.scrollLeft+=d-h.right)};this.destroy=function(c){h.destroy(function(d){d?c(d):(a.removeChild(b),c())})};(function(){var c=m.getOdtDocument().getDOM();b=c.createElementNS(c.documentElement.namespaceURI,"span");a=m.getNode();a.appendChild(b);h=new gui.Avatar(a,l)})()};
+gui.Caret=function(l,m,g){function c(g){e&&a.parentNode&&(!f||g)&&(g&&void 0!==d&&runtime.clearTimeout(d),f=!0,b.style.opacity=g||"0"===b.style.opacity?"1":"0",d=runtime.setTimeout(function(){f=!1;c(!1)},500))}var b,n,a,e=!1,f=!1,d;this.refreshCursorBlinking=function(){g||l.getSelectedRange().collapsed?(e=!0,c(!0)):(e=!1,b.style.opacity="0")};this.setFocus=function(){e=!0;n.markAsFocussed(!0);c(!0)};this.removeFocus=function(){e=!1;n.markAsFocussed(!1);b.style.opacity="0"};this.setAvatarImageUrl=
+function(a){n.setImageUrl(a)};this.setColor=function(a){b.style.borderColor=a;n.setColor(a)};this.getCursor=function(){return l};this.getFocusElement=function(){return b};this.toggleHandleVisibility=function(){n.isVisible()?n.hide():n.show()};this.showHandle=function(){n.show()};this.hideHandle=function(){n.hide()};this.ensureVisible=function(){var a,c,d,e,f=l.getOdtDocument().getOdfCanvas().getElement().parentNode,g;d=f.offsetWidth-f.clientWidth+5;e=f.offsetHeight-f.clientHeight+5;g=b.getBoundingClientRect();
+a=g.left-d;c=g.top-e;d=g.right+d;e=g.bottom+e;g=f.getBoundingClientRect();cg.bottom&&(f.scrollTop+=e-g.bottom);ag.right&&(f.scrollLeft+=d-g.right)};this.destroy=function(c){n.destroy(function(d){d?c(d):(a.removeChild(b),c())})};(function(){var c=l.getOdtDocument().getDOM();b=c.createElementNS(c.documentElement.namespaceURI,"span");a=l.getNode();a.appendChild(b);n=new gui.Avatar(a,m)})()};
// Input 63
-runtime.loadClass("core.EventNotifier");
-gui.ClickHandler=function(){function m(){e=0;c=null}var l,e=0,c=null,b=new core.EventNotifier([gui.ClickHandler.signalSingleClick,gui.ClickHandler.signalDoubleClick,gui.ClickHandler.signalTripleClick]);this.subscribe=function(c,a){b.subscribe(c,a)};this.handleMouseUp=function(h){var a=runtime.getWindow();c&&c.x===h.screenX&&c.y===h.screenY?(e+=1,1===e?b.emit(gui.ClickHandler.signalSingleClick,h):2===e?b.emit(gui.ClickHandler.signalDoubleClick,void 0):3===e&&(a.clearTimeout(l),b.emit(gui.ClickHandler.signalTripleClick,
-void 0),m())):(b.emit(gui.ClickHandler.signalSingleClick,h),e=1,c={x:h.screenX,y:h.screenY},a.clearTimeout(l),l=a.setTimeout(m,400))}};gui.ClickHandler.signalSingleClick="click";gui.ClickHandler.signalDoubleClick="doubleClick";gui.ClickHandler.signalTripleClick="tripleClick";(function(){return gui.ClickHandler})();
-// Input 64
/*
Copyright (C) 2012-2013 KO GmbH
@@ -1705,9 +1701,9 @@ void 0),m())):(b.emit(gui.ClickHandler.signalSingleClick,h),e=1,c={x:h.screenX,y
@source: http://www.webodf.org/
@source: http://gitorious.org/webodf/webodf/
*/
-gui.KeyboardHandler=function(){function m(b,c){c||(c=l.None);return b+":"+c}var l=gui.KeyboardHandler.Modifier,e=null,c={};this.setDefault=function(b){e=b};this.bind=function(b,e,a){b=m(b,e);runtime.assert(!1===c.hasOwnProperty(b),"tried to overwrite the callback handler of key combo: "+b);c[b]=a};this.unbind=function(b,e){var a=m(b,e);delete c[a]};this.reset=function(){e=null;c={}};this.handleEvent=function(b){var h=b.keyCode,a=l.None;b.metaKey&&(a|=l.Meta);b.ctrlKey&&(a|=l.Ctrl);b.altKey&&(a|=l.Alt);
-b.shiftKey&&(a|=l.Shift);h=m(h,a);h=c[h];a=!1;h?a=h():null!==e&&(a=e(b));a&&(b.preventDefault?b.preventDefault():b.returnValue=!1)}};gui.KeyboardHandler.Modifier={None:0,Meta:1,Ctrl:2,Alt:4,Shift:8,MetaShift:9,CtrlShift:10,AltShift:12};gui.KeyboardHandler.KeyCode={Backspace:8,Tab:9,Clear:12,Enter:13,End:35,Home:36,Left:37,Up:38,Right:39,Down:40,Delete:46,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90};(function(){return gui.KeyboardHandler})();
-// Input 65
+gui.KeyboardHandler=function(){function l(b,c){c||(c=m.None);return b+":"+c}var m=gui.KeyboardHandler.Modifier,g=null,c={};this.setDefault=function(b){g=b};this.bind=function(b,g,a){b=l(b,g);runtime.assert(!1===c.hasOwnProperty(b),"tried to overwrite the callback handler of key combo: "+b);c[b]=a};this.unbind=function(b,g){var a=l(b,g);delete c[a]};this.reset=function(){g=null;c={}};this.handleEvent=function(b){var n=b.keyCode,a=m.None;b.metaKey&&(a|=m.Meta);b.ctrlKey&&(a|=m.Ctrl);b.altKey&&(a|=m.Alt);
+b.shiftKey&&(a|=m.Shift);n=l(n,a);n=c[n];a=!1;n?a=n():null!==g&&(a=g(b));a&&(b.preventDefault?b.preventDefault():b.returnValue=!1)}};gui.KeyboardHandler.Modifier={None:0,Meta:1,Ctrl:2,Alt:4,Shift:8,MetaShift:9,CtrlShift:10,AltShift:12};gui.KeyboardHandler.KeyCode={Backspace:8,Tab:9,Clear:12,Enter:13,End:35,Home:36,Left:37,Up:38,Right:39,Down:40,Delete:46,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90};(function(){return gui.KeyboardHandler})();
+// Input 64
/*
Copyright (C) 2013 KO GmbH
@@ -1743,45 +1739,54 @@ b.shiftKey&&(a|=l.Shift);h=m(h,a);h=c[h];a=!1;h?a=h():null!==e&&(a=e(b));a&&(b.p
@source: http://gitorious.org/webodf/webodf/
*/
runtime.loadClass("odf.Namespaces");runtime.loadClass("xmldom.LSSerializer");runtime.loadClass("odf.OdfNodeFilter");runtime.loadClass("odf.TextSerializer");
-gui.Clipboard=function(){var m,l,e;this.setDataFromRange=function(c,b){var e=!0,a,n=c.clipboardData;a=runtime.getWindow();var f=b.startContainer.ownerDocument;!n&&a&&(n=a.clipboardData);n?(f=f.createElement("span"),f.appendChild(b.cloneContents()),a=n.setData("text/plain",l.writeToString(f)),e=e&&a,a=n.setData("text/html",m.writeToString(f,odf.Namespaces.namespaceMap)),e=e&&a,c.preventDefault()):e=!1;return e};m=new xmldom.LSSerializer;l=new odf.TextSerializer;e=new odf.OdfNodeFilter;m.filter=e;l.filter=
-e};
+gui.Clipboard=function(){var l,m,g;this.setDataFromRange=function(c,b){var g=!0,a,e=c.clipboardData;a=runtime.getWindow();var f=b.startContainer.ownerDocument;!e&&a&&(e=a.clipboardData);e?(f=f.createElement("span"),f.appendChild(b.cloneContents()),a=e.setData("text/plain",m.writeToString(f)),g=g&&a,a=e.setData("text/html",l.writeToString(f,odf.Namespaces.namespaceMap)),g=g&&a,c.preventDefault()):g=!1;return g};l=new xmldom.LSSerializer;m=new odf.TextSerializer;g=new odf.OdfNodeFilter;l.filter=g;m.filter=
+g};
+// Input 65
+/*
+
+ Copyright (C) 2013 KO GmbH
+
+ @licstart
+ The JavaScript code in this page is free software: you can redistribute it
+ and/or modify it under the terms of the GNU Affero General Public License
+ (GNU AGPL) as published by the Free Software Foundation, either version 3 of
+ the License, or (at your option) any later version. The code is distributed
+ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
+
+ As additional permission under GNU AGPL version 3 section 7, you
+ may distribute non-source (e.g., minimized or compacted) forms of
+ that code without the copy of the GNU GPL normally required by
+ section 4, provided you include this license notice and a URL
+ through which recipients can access the Corresponding Source.
+
+ As a special exception to the AGPL, any HTML file which merely makes function
+ calls to this code, and for that purpose includes it by reference shall be
+ deemed a separate work for copyright law purposes. In addition, the copyright
+ holders of this code give you permission to combine this code with free
+ software libraries that are released under the GNU LGPL. You may copy and
+ distribute such a system following the terms of the GNU AGPL for this code
+ and the LGPL for the libraries. If you modify this code, you may extend this
+ exception to your version of the code, but you are not obligated to do so.
+ If you do not wish to do so, delete this exception statement from your
+ version.
+
+ This license applies to this entire compilation.
+ @licend
+ @source: http://www.webodf.org/
+ @source: http://gitorious.org/webodf/webodf/
+*/
+runtime.loadClass("core.EventNotifier");runtime.loadClass("ops.OpApplyDirectStyling");runtime.loadClass("gui.StyleHelper");
+gui.DirectTextStyler=function(l,m){function g(a,b){for(var c=0,d=b[c];d&&a;)a=a[d],c+=1,d=b[c];return b.length===c?a:void 0}function c(a,b){var c=g(a[0],b);return a.every(function(a){return c===g(a,b)})?c:void 0}function b(){function a(b,c,d){b!==c&&(void 0===e&&(e={}),e[d]=c);return c}var b=w.getCursor(m),d=b&&b.getSelectedRange(),b=d&&u.getAppliedStyles(d),e;y=a(y,d?u.isBold(d):!1,"isBold");v=a(v,d?u.isItalic(d):!1,"isItalic");r=a(r,d?u.hasUnderline(d):!1,"hasUnderline");z=a(z,d?u.hasStrikeThrough(d):
+!1,"hasStrikeThrough");d=b&&c(b,["style:text-properties","fo:font-size"]);G=a(G,d&&parseFloat(d),"fontSize");C=a(C,b&&c(b,["style:text-properties","style:font-name"]),"fontName");e&&A.emit(gui.DirectTextStyler.textStylingChanged,e)}function n(a){a.getMemberId()===m&&b()}function a(a){a===m&&b()}function e(a){a.getMemberId()===m&&b()}function f(){b()}function d(a){var c=w.getCursor(m);c&&w.getParagraphElement(c.getNode())===a.paragraphElement&&b()}function t(a,b){var c=w.getCursor(m);if(!c)return!1;
+b(!a(c.getSelectedRange()));return!0}function k(a,b){var c=w.getCursorSelection(m),d=new ops.OpApplyDirectStyling,e={};e[a]=b;d.init({memberid:m,position:c.position,length:c.length,setProperties:{"style:text-properties":e}});l.enqueue(d)}function p(a){k("fo:font-weight",a?"bold":"normal")}function h(a){k("fo:font-style",a?"italic":"normal")}function q(a){k("style:text-underline-style",a?"solid":"none")}function s(a){k("style:text-line-through-style",a?"solid":"none")}var w=l.getOdtDocument(),u=new gui.StyleHelper(w.getFormatting()),
+A=new core.EventNotifier([gui.DirectTextStyler.textStylingChanged]),y=!1,v=!1,r=!1,z=!1,G,C;this.setBold=p;this.setItalic=h;this.setHasUnderline=q;this.setHasStrikethrough=s;this.setFontSize=function(a){k("fo:font-size",a+"pt")};this.setFontName=function(a){k("style:font-name",a)};this.toggleBold=t.bind(this,u.isBold,p);this.toggleItalic=t.bind(this,u.isItalic,h);this.toggleUnderline=t.bind(this,u.hasUnderline,q);this.toggleStrikethrough=t.bind(this,u.hasStrikeThrough,s);this.isBold=function(){return y};
+this.isItalic=function(){return v};this.hasUnderline=function(){return r};this.hasStrikeThrough=function(){return z};this.fontSize=function(){return G};this.fontName=function(){return C};this.subscribe=function(a,b){A.subscribe(a,b)};this.unsubscribe=function(a,b){A.unsubscribe(a,b)};this.destroy=function(b){w.unsubscribe(ops.OdtDocument.signalCursorAdded,n);w.unsubscribe(ops.OdtDocument.signalCursorRemoved,a);w.unsubscribe(ops.OdtDocument.signalCursorMoved,e);w.unsubscribe(ops.OdtDocument.signalParagraphStyleModified,
+f);w.unsubscribe(ops.OdtDocument.signalParagraphChanged,d);b()};w.subscribe(ops.OdtDocument.signalCursorAdded,n);w.subscribe(ops.OdtDocument.signalCursorRemoved,a);w.subscribe(ops.OdtDocument.signalCursorMoved,e);w.subscribe(ops.OdtDocument.signalParagraphStyleModified,f);w.subscribe(ops.OdtDocument.signalParagraphChanged,d);b()};gui.DirectTextStyler.textStylingChanged="textStyling/changed";(function(){return gui.DirectTextStyler})();
// Input 66
-runtime.loadClass("core.DomUtils");runtime.loadClass("core.Utils");runtime.loadClass("odf.OdfUtils");runtime.loadClass("ops.OpAddCursor");runtime.loadClass("ops.OpRemoveCursor");runtime.loadClass("ops.OpMoveCursor");runtime.loadClass("ops.OpInsertText");runtime.loadClass("ops.OpRemoveText");runtime.loadClass("ops.OpSplitParagraph");runtime.loadClass("ops.OpSetParagraphStyle");runtime.loadClass("ops.OpRemoveAnnotation");runtime.loadClass("gui.ClickHandler");runtime.loadClass("gui.Clipboard");runtime.loadClass("gui.KeyboardHandler");
-runtime.loadClass("gui.StyleHelper");
-gui.SessionController=function(){gui.SessionController=function(m,l){function e(a,b,c,d){var e="on"+b,f=!1;a.attachEvent&&(f=a.attachEvent(e,c));!f&&a.addEventListener&&(a.addEventListener(b,c,!1),f=!0);f&&!d||!a.hasOwnProperty(e)||(a[e]=c)}function c(a,b,c){var d="on"+b;a.detachEvent&&a.detachEvent(d,c);a.removeEventListener&&a.removeEventListener(b,c,!1);a[d]===c&&(a[d]=null)}function b(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function h(a,b){var c=new ops.OpMoveCursor;c.init({memberid:l,
-position:a,length:b||0});return c}function a(a,b){var c=gui.SelectionMover.createPositionIterator(z.getRootNode()),d=z.getOdfCanvas().getElement(),e;e=a;if(!e)return null;for(;e!==d&&!("urn:webodf:names:cursor"===e.namespaceURI&&"cursor"===e.localName||"urn:webodf:names:editinfo"===e.namespaceURI&&"editinfo"===e.localName);)if(e=e.parentNode,!e)return null;e!==d&&a!==e&&(a=e.parentNode,b=Array.prototype.indexOf.call(a.childNodes,e));c.setUnfilteredPosition(a,b);return z.getDistanceFromCursor(l,c.container(),
-c.unfilteredDomOffset())}function n(a){var b=z.getOdfCanvas().getElement(),c=z.getRootNode(),d=0;b.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_PRECEDING||(a=gui.SelectionMover.createPositionIterator(c),a.moveToEnd(),c=a.container(),d=a.unfilteredDomOffset());return{node:c,offset:d}}function f(b){za&&runtime.setTimeout(function(){var c;a:{var d=z.getOdfCanvas().getElement(),e=ca.getSelection(),f,g,k,p;if(null===e.anchorNode&&null===e.focusNode){c=b.clientX;f=b.clientY;g=z.getDOM();g.caretRangeFromPoint?
-(c=g.caretRangeFromPoint(c,f),f={container:c.startContainer,offset:c.startOffset}):g.caretPositionFromPoint?(c=g.caretPositionFromPoint(c,f),f={container:c.offsetNode,offset:c.offset}):f=null;if(!f){c=null;break a}c=f.container;f=f.offset;g=c;e=f}else c=e.anchorNode,f=e.anchorOffset,g=e.focusNode,e=e.focusOffset;runtime.assert(null!==c&&null!==g,"anchorNode is null or focusNode is null");k=qa.containsNode(d,c);p=qa.containsNode(d,g);k||p?(k||(k=n(c),c=k.node,f=k.offset),p||(k=n(g),g=k.node,e=k.offset),
-d.focus(),c={anchorNode:c,anchorOffset:f,focusNode:g,focusOffset:e}):c=null}null!==c&&(d=a(c.anchorNode,c.anchorOffset),f=c.focusNode===c.anchorNode&&c.focusOffset===c.anchorOffset?d:a(c.focusNode,c.focusOffset),null!==f&&0!==f||null!==d&&0!==d)&&(c=z.getCursorPosition(l),d=h(c+d,f-d),m.enqueue(d))},0)}function d(a){f(a)}function s(){var a=z.getOdfCanvas().getElement(),b=/[A-Za-z0-9]/,c=0,d=0,e,f;if(qa.containsNode(a,ca.getSelection().focusNode)){a=gui.SelectionMover.createPositionIterator(z.getRootNode());
-e=z.getCursor(l).getNode();for(a.setUnfilteredPosition(e,0);a.previousPosition();)if(f=a.getCurrentNode(),f.nodeType===Node.TEXT_NODE){f=f.data[a.unfilteredDomOffset()];if(!b.test(f))break;c-=1}else if(f.namespaceURI!==odf.Namespaces.textns||"span"!==f.localName)break;a.setUnfilteredPosition(e,0);do if(f=a.getCurrentNode(),f.nodeType===Node.TEXT_NODE){f=f.data[a.unfilteredDomOffset()];if(!b.test(f))break;d+=1}else if(f.namespaceURI!==odf.Namespaces.textns||"span"!==f.localName)break;while(a.nextPosition());
-if(0!==c||0!==d)b=z.getCursorPosition(l),c=h(b+c,Math.abs(c)+Math.abs(d)),m.enqueue(c)}}function k(){var a=z.getOdfCanvas().getElement(),b,c;qa.containsNode(a,ca.getSelection().focusNode)&&(c=z.getParagraphElement(z.getCursor(l).getNode()),a=z.getDistanceFromCursor(l,c,0),b=gui.SelectionMover.createPositionIterator(z.getRootNode()),b.moveToEndOfNode(c),c=z.getDistanceFromCursor(l,c,b.unfilteredDomOffset()),0!==a||0!==c)&&(b=z.getCursorPosition(l),a=h(b+a,Math.abs(a)+Math.abs(c)),m.enqueue(a))}function q(a){var b=
-z.getCursorSelection(l),c=z.getCursor(l).getStepCounter();0!==a&&(a=0a.length&&(a.position+=a.length,a.length=-a.length);
-return a}function V(a){var b=new ops.OpRemoveText;b.init({memberid:l,position:a.position,length:a.length});return b}function S(){var a=M(z.getCursorSelection(l)),b=null;0===a.length?0
+ Copyright (C) 2013 KO GmbH
@licstart
The JavaScript code in this page is free software: you can redistribute it
@@ -1813,7 +1818,43 @@ ga.subscribe(gui.ClickHandler.signalDoubleClick,s);ga.subscribe(gui.ClickHandler
@source: http://www.webodf.org/
@source: http://gitorious.org/webodf/webodf/
*/
-ops.MemberModel=function(){};ops.MemberModel.prototype.getMemberDetailsAndUpdates=function(m,l){};ops.MemberModel.prototype.unsubscribeMemberDetailsUpdates=function(m,l){};ops.MemberModel.prototype.close=function(m){};
+runtime.loadClass("core.EventNotifier");runtime.loadClass("core.Utils");runtime.loadClass("odf.OdfUtils");runtime.loadClass("ops.OpAddParagraphStyle");runtime.loadClass("ops.OpSetParagraphStyle");runtime.loadClass("gui.StyleHelper");
+gui.DirectParagraphStyler=function(l,m,g){function c(){function a(b,d,e){b!==d&&(void 0===c&&(c={}),c[e]=d);return d}var b=h.getCursor(m),b=b&&b.getSelectedRange(),c;A=a(A,b?w.isAlignedLeft(b):!1,"isAlignedLeft");y=a(y,b?w.isAlignedCenter(b):!1,"isAlignedCenter");v=a(v,b?w.isAlignedRight(b):!1,"isAlignedRight");r=a(r,b?w.isAlignedJustified(b):!1,"isAlignedJustified");c&&u.emit(gui.DirectParagraphStyler.paragraphStylingChanged,c)}function b(a){a.getMemberId()===m&&c()}function n(a){a===m&&c()}function a(a){a.getMemberId()===
+m&&c()}function e(){c()}function f(a){var b=h.getCursor(m);b&&h.getParagraphElement(b.getNode())===a.paragraphElement&&c()}function d(a){var b=h.getCursor(m).getSelectedRange(),c=h.getCursorPosition(m),b=s.getParagraphElements(b),d=h.getFormatting();b.forEach(function(b){var e=c+h.getDistanceFromCursor(m,b,0),f=b.getAttributeNS(odf.Namespaces.textns,"style-name");b=g.generateName();var k,e=e+1;f&&(k=d.createDerivedStyleObject(f,"paragraph",{}));k=a(k||{});f=new ops.OpAddParagraphStyle;f.init({memberid:m,
+styleName:b,isAutomaticStyle:!0,setProperties:k});k=new ops.OpSetParagraphStyle;k.init({memberid:m,styleName:b,position:e});l.enqueue(f);l.enqueue(k)})}function t(a){d(function(b){return q.mergeObjects(b,a)})}function k(a){t({"style:paragraph-properties":{"fo:text-align":a}})}function p(a,b){var c=h.getFormatting().getDefaultTabStopDistance(),d=b["style:paragraph-properties"],d=(d=d&&d["fo:margin-left"])&&s.parseLength(d);return q.mergeObjects(b,{"style:paragraph-properties":{"fo:margin-left":d&&
+d.unit===c.unit?d.value+a*c.value+d.unit:a*c.value+c.unit}})}var h=l.getOdtDocument(),q=new core.Utils,s=new odf.OdfUtils,w=new gui.StyleHelper(h.getFormatting()),u=new core.EventNotifier([gui.DirectParagraphStyler.paragraphStylingChanged]),A,y,v,r;this.isAlignedLeft=function(){return A};this.isAlignedCenter=function(){return y};this.isAlignedRight=function(){return v};this.isAlignedJustified=function(){return r};this.alignParagraphLeft=function(){k("left");return!0};this.alignParagraphCenter=function(){k("center");
+return!0};this.alignParagraphRight=function(){k("right");return!0};this.alignParagraphJustified=function(){k("justify");return!0};this.indent=function(){d(p.bind(null,1));return!0};this.outdent=function(){d(p.bind(null,-1));return!0};this.subscribe=function(a,b){u.subscribe(a,b)};this.unsubscribe=function(a,b){u.unsubscribe(a,b)};this.destroy=function(c){h.unsubscribe(ops.OdtDocument.signalCursorAdded,b);h.unsubscribe(ops.OdtDocument.signalCursorRemoved,n);h.unsubscribe(ops.OdtDocument.signalCursorMoved,
+a);h.unsubscribe(ops.OdtDocument.signalParagraphStyleModified,e);h.unsubscribe(ops.OdtDocument.signalParagraphChanged,f);c()};h.subscribe(ops.OdtDocument.signalCursorAdded,b);h.subscribe(ops.OdtDocument.signalCursorRemoved,n);h.subscribe(ops.OdtDocument.signalCursorMoved,a);h.subscribe(ops.OdtDocument.signalParagraphStyleModified,e);h.subscribe(ops.OdtDocument.signalParagraphChanged,f);c()};gui.DirectParagraphStyler.paragraphStylingChanged="paragraphStyling/changed";(function(){return gui.DirectParagraphStyler})();
+// Input 67
+runtime.loadClass("core.DomUtils");runtime.loadClass("core.Utils");runtime.loadClass("odf.OdfUtils");runtime.loadClass("ops.OpAddCursor");runtime.loadClass("ops.OpRemoveCursor");runtime.loadClass("ops.OpMoveCursor");runtime.loadClass("ops.OpInsertText");runtime.loadClass("ops.OpRemoveText");runtime.loadClass("ops.OpSplitParagraph");runtime.loadClass("ops.OpSetParagraphStyle");runtime.loadClass("ops.OpRemoveAnnotation");runtime.loadClass("gui.Clipboard");runtime.loadClass("gui.KeyboardHandler");runtime.loadClass("gui.DirectTextStyler");
+runtime.loadClass("gui.DirectParagraphStyler");
+gui.SessionController=function(){gui.SessionController=function(l,m,g){function c(a,b,c,d){var e="on"+b,h=!1;a.attachEvent&&(h=a.attachEvent(e,c));!h&&a.addEventListener&&(a.addEventListener(b,c,!1),h=!0);h&&!d||!a.hasOwnProperty(e)||(a[e]=c)}function b(a,b,c){var d="on"+b;a.detachEvent&&a.detachEvent(d,c);a.removeEventListener&&a.removeEventListener(b,c,!1);a[d]===c&&(a[d]=null)}function n(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function a(a,b){var c=new ops.OpMoveCursor;c.init({memberid:m,
+position:a,length:b||0});return c}function e(a,b){var c=gui.SelectionMover.createPositionIterator(x.getRootNode()),d=x.getOdfCanvas().getElement(),e;e=a;if(!e)return null;for(;e!==d&&!("urn:webodf:names:cursor"===e.namespaceURI&&"cursor"===e.localName||"urn:webodf:names:editinfo"===e.namespaceURI&&"editinfo"===e.localName);)if(e=e.parentNode,!e)return null;e!==d&&a!==e&&(a=e.parentNode,b=Array.prototype.indexOf.call(a.childNodes,e));c.setUnfilteredPosition(a,b);return x.getDistanceFromCursor(m,c.container(),
+c.unfilteredDomOffset())}function f(a){var b=x.getOdfCanvas().getElement(),c=x.getRootNode(),d=0;b.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_PRECEDING||(a=gui.SelectionMover.createPositionIterator(c),a.moveToEnd(),c=a.container(),d=a.unfilteredDomOffset());return{node:c,offset:d}}function d(b){runtime.setTimeout(function(){var c;a:{var d=x.getOdfCanvas().getElement(),h=X.getSelection(),g,k,n,q;if(null===h.anchorNode&&null===h.focusNode){c=b.clientX;g=b.clientY;k=x.getDOM();k.caretRangeFromPoint?
+(c=k.caretRangeFromPoint(c,g),g={container:c.startContainer,offset:c.startOffset}):k.caretPositionFromPoint?(c=k.caretPositionFromPoint(c,g),g={container:c.offsetNode,offset:c.offset}):g=null;if(!g){c=null;break a}c=g.container;g=g.offset;k=c;h=g}else c=h.anchorNode,g=h.anchorOffset,k=h.focusNode,h=h.focusOffset;runtime.assert(null!==c&&null!==k,"anchorNode is null or focusNode is null");n=T.containsNode(d,c);q=T.containsNode(d,k);n||q?(n||(n=f(c),c=n.node,g=n.offset),q||(n=f(k),k=n.node,h=n.offset),
+d.focus(),c={anchorNode:c,anchorOffset:g,focusNode:k,focusOffset:h}):c=null}null!==c&&(d=e(c.anchorNode,c.anchorOffset),g=c.focusNode===c.anchorNode&&c.focusOffset===c.anchorOffset?d:e(c.focusNode,c.focusOffset),null!==g&&0!==g||null!==d&&0!==d)&&(c=x.getCursorPosition(m),d=a(c+d,g-d),l.enqueue(d))},0)}function t(a){d(a)}function k(b){var c=x.getCursorSelection(m),d=x.getCursor(m).getStepCounter();0!==b&&(b=0a.length&&(a.position+=a.length,a.length=-a.length);return a}function Q(a){var b=new ops.OpRemoveText;b.init({memberid:m,position:a.position,length:a.length});return b}function W(){var a=$(x.getCursorSelection(m)),
+b=null;0===a.length?0
+ Copyright (C) 2012-2013 KO GmbH
@licstart
The JavaScript code in this page is free software: you can redistribute it
@@ -1885,11 +1926,11 @@ ops.TrivialMemberModel=function(){this.getMemberDetailsAndUpdates=function(m,l){
@source: http://www.webodf.org/
@source: http://gitorious.org/webodf/webodf/
*/
-ops.OperationRouter=function(){};ops.OperationRouter.prototype.setOperationFactory=function(m){};ops.OperationRouter.prototype.setPlaybackFunction=function(m){};ops.OperationRouter.prototype.push=function(m){};ops.OperationRouter.prototype.close=function(m){};ops.OperationRouter.prototype.getHasLocalUnsyncedOpsAndUpdates=function(m){};ops.OperationRouter.prototype.unsubscribeHasLocalUnsyncedOpsUpdates=function(m){};
+ops.TrivialMemberModel=function(){this.getMemberDetailsAndUpdates=function(l,m){m(l,{memberid:l,fullname:"Unknown",color:"black",imageurl:"avatar-joe.png"})};this.unsubscribeMemberDetailsUpdates=function(l,m){};this.close=function(l){l()}};
// Input 70
/*
- Copyright (C) 2012 KO GmbH
+ Copyright (C) 2013 KO GmbH
@licstart
The JavaScript code in this page is free software: you can redistribute it
@@ -1921,11 +1962,47 @@ ops.OperationRouter=function(){};ops.OperationRouter.prototype.setOperationFacto
@source: http://www.webodf.org/
@source: http://gitorious.org/webodf/webodf/
*/
-ops.TrivialOperationRouter=function(){var m,l;this.setOperationFactory=function(e){m=e};this.setPlaybackFunction=function(e){l=e};this.push=function(e){e=e.spec();e.timestamp=(new Date).getTime();e=m.create(e);l(e)};this.close=function(e){e()};this.getHasLocalUnsyncedOpsAndUpdates=function(e){e(!0)};this.unsubscribeHasLocalUnsyncedOpsUpdates=function(e){}};
+ops.OperationRouter=function(){};ops.OperationRouter.prototype.setOperationFactory=function(l){};ops.OperationRouter.prototype.setPlaybackFunction=function(l){};ops.OperationRouter.prototype.push=function(l){};ops.OperationRouter.prototype.close=function(l){};ops.OperationRouter.prototype.getHasLocalUnsyncedOpsAndUpdates=function(l){};ops.OperationRouter.prototype.unsubscribeHasLocalUnsyncedOpsUpdates=function(l){};
// Input 71
-gui.EditInfoHandle=function(m){var l=[],e,c=m.ownerDocument,b=c.documentElement.namespaceURI;this.setEdits=function(h){l=h;var a,m,f,d;e.innerHTML="";for(h=0;h
+
+ @licstart
+ The JavaScript code in this page is free software: you can redistribute it
+ and/or modify it under the terms of the GNU Affero General Public License
+ (GNU AGPL) as published by the Free Software Foundation, either version 3 of
+ the License, or (at your option) any later version. The code is distributed
+ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
+
+ As additional permission under GNU AGPL version 3 section 7, you
+ may distribute non-source (e.g., minimized or compacted) forms of
+ that code without the copy of the GNU GPL normally required by
+ section 4, provided you include this license notice and a URL
+ through which recipients can access the Corresponding Source.
+
+ As a special exception to the AGPL, any HTML file which merely makes function
+ calls to this code, and for that purpose includes it by reference shall be
+ deemed a separate work for copyright law purposes. In addition, the copyright
+ holders of this code give you permission to combine this code with free
+ software libraries that are released under the GNU LGPL. You may copy and
+ distribute such a system following the terms of the GNU AGPL for this code
+ and the LGPL for the libraries. If you modify this code, you may extend this
+ exception to your version of the code, but you are not obligated to do so.
+ If you do not wish to do so, delete this exception statement from your
+ version.
+
+ This license applies to this entire compilation.
+ @licend
+ @source: http://www.webodf.org/
+ @source: http://gitorious.org/webodf/webodf/
+*/
+ops.TrivialOperationRouter=function(){var l,m;this.setOperationFactory=function(g){l=g};this.setPlaybackFunction=function(g){m=g};this.push=function(g){g=g.spec();g.timestamp=(new Date).getTime();g=l.create(g);m(g)};this.close=function(g){g()};this.getHasLocalUnsyncedOpsAndUpdates=function(g){g(!0)};this.unsubscribeHasLocalUnsyncedOpsUpdates=function(g){}};
// Input 72
+gui.EditInfoHandle=function(l){var m=[],g,c=l.ownerDocument,b=c.documentElement.namespaceURI;this.setEdits=function(n){m=n;var a,e,f,d;g.innerHTML="";for(n=0;n
@@ -1961,10 +2038,10 @@ d=c.createElementNS(b,"span"),d.className="editInfoTime",d.setAttributeNS("urn:w
@source: http://gitorious.org/webodf/webodf/
*/
runtime.loadClass("ops.EditInfo");runtime.loadClass("gui.EditInfoHandle");
-gui.EditInfoMarker=function(m,l){function e(b,c){return runtime.getWindow().setTimeout(function(){a.style.opacity=b},c)}var c=this,b,h,a,n,f;this.addEdit=function(b,c){var k=Date.now()-c;m.addEdit(b,c);h.setEdits(m.getSortedEdits());a.setAttributeNS("urn:webodf:names:editinfo","editinfo:memberid",b);if(n){var l=n;runtime.getWindow().clearTimeout(l)}f&&(l=f,runtime.getWindow().clearTimeout(l));1E4>k?(e(1,0),n=e(0.5,1E4-k),f=e(0.2,2E4-k)):1E4<=k&&2E4>k?(e(0.5,0),f=e(0.2,2E4-k)):e(0.2,0)};this.getEdits=
-function(){return m.getEdits()};this.clearEdits=function(){m.clearEdits();h.setEdits([]);a.hasAttributeNS("urn:webodf:names:editinfo","editinfo:memberid")&&a.removeAttributeNS("urn:webodf:names:editinfo","editinfo:memberid")};this.getEditInfo=function(){return m};this.show=function(){a.style.display="block"};this.hide=function(){c.hideHandle();a.style.display="none"};this.showHandle=function(){h.show()};this.hideHandle=function(){h.hide()};this.destroy=function(c){b.removeChild(a);h.destroy(function(a){a?
-c(a):m.destroy(c)})};(function(){var d=m.getOdtDocument().getDOM();a=d.createElementNS(d.documentElement.namespaceURI,"div");a.setAttribute("class","editInfoMarker");a.onmouseover=function(){c.showHandle()};a.onmouseout=function(){c.hideHandle()};b=m.getNode();b.appendChild(a);h=new gui.EditInfoHandle(b);l||c.hide()})()};
-// Input 73
+gui.EditInfoMarker=function(l,m){function g(b,c){return runtime.getWindow().setTimeout(function(){a.style.opacity=b},c)}var c=this,b,n,a,e,f;this.addEdit=function(b,c){var k=Date.now()-c;l.addEdit(b,c);n.setEdits(l.getSortedEdits());a.setAttributeNS("urn:webodf:names:editinfo","editinfo:memberid",b);if(e){var m=e;runtime.getWindow().clearTimeout(m)}f&&(m=f,runtime.getWindow().clearTimeout(m));1E4>k?(g(1,0),e=g(0.5,1E4-k),f=g(0.2,2E4-k)):1E4<=k&&2E4>k?(g(0.5,0),f=g(0.2,2E4-k)):g(0.2,0)};this.getEdits=
+function(){return l.getEdits()};this.clearEdits=function(){l.clearEdits();n.setEdits([]);a.hasAttributeNS("urn:webodf:names:editinfo","editinfo:memberid")&&a.removeAttributeNS("urn:webodf:names:editinfo","editinfo:memberid")};this.getEditInfo=function(){return l};this.show=function(){a.style.display="block"};this.hide=function(){c.hideHandle();a.style.display="none"};this.showHandle=function(){n.show()};this.hideHandle=function(){n.hide()};this.destroy=function(c){b.removeChild(a);n.destroy(function(a){a?
+c(a):l.destroy(c)})};(function(){var d=l.getOdtDocument().getDOM();a=d.createElementNS(d.documentElement.namespaceURI,"div");a.setAttribute("class","editInfoMarker");a.onmouseover=function(){c.showHandle()};a.onmouseout=function(){c.hideHandle()};b=l.getNode();b.appendChild(a);n=new gui.EditInfoHandle(b);m||c.hide()})()};
+// Input 74
/*
Copyright (C) 2012-2013 KO GmbH
@@ -2000,14 +2077,14 @@ c(a):m.destroy(c)})};(function(){var d=m.getOdtDocument().getDOM();a=d.createEle
@source: http://gitorious.org/webodf/webodf/
*/
runtime.loadClass("gui.Caret");runtime.loadClass("ops.TrivialMemberModel");runtime.loadClass("ops.EditInfo");runtime.loadClass("gui.EditInfoMarker");gui.SessionViewOptions=function(){this.caretBlinksOnRangeSelect=this.caretAvatarsInitiallyVisible=this.editInfoMarkersInitiallyVisible=!0};
-gui.SessionView=function(){return function(m,l,e){function c(a,b,c){function d(b,c,e){c=b+'[editinfo|memberid^="'+a+'"]'+e+c;a:{var f=s.firstChild;for(b=b+'[editinfo|memberid^="'+a+'"]'+e;f;){if(f.nodeType===Node.TEXT_NODE&&0===f.data.indexOf(b)){b=f;break a}f=f.nextSibling}b=null}b?b.data=c:s.appendChild(document.createTextNode(c))}d("div.editInfoMarker","{ background-color: "+c+"; }","");d("span.editInfoColor","{ background-color: "+c+"; }","");d("span.editInfoAuthor",'{ content: "'+b+'"; }',":before");
-d("dc|creator",'{ content: "'+b+'"; display: none;}',":before");d("dc|creator","{ background-color: "+c+"; }","")}function b(a){var b,c;for(c in q)q.hasOwnProperty(c)&&(b=q[c],a?b.show():b.hide())}function h(a){e.getCarets().forEach(function(b){a?b.showHandle():b.hideHandle()})}function a(a,b){var d=e.getCaret(a);b?(d&&(d.setAvatarImageUrl(b.imageurl),d.setColor(b.color)),c(a,b.fullname,b.color)):runtime.log('MemberModel sent undefined data for member "'+a+'".')}function n(b){var c=b.getMemberId(),
-d=l.getMemberModel();e.registerCursor(b,p,r);a(c,null);d.getMemberDetailsAndUpdates(c,a);runtime.log("+++ View here +++ eagerly created an Caret for '"+c+"'! +++")}function f(b){var c=!1,d;for(d in q)if(q.hasOwnProperty(d)&&q[d].getEditInfo().getEdits().hasOwnProperty(b)){c=!0;break}c||l.getMemberModel().unsubscribeMemberDetailsUpdates(b,a)}function d(a){var b=a.paragraphElement,c=a.memberId;a=a.timeStamp;var d,e="",f=b.getElementsByTagNameNS(k,"editinfo")[0];f?(e=f.getAttributeNS(k,"id"),d=q[e]):
-(e=Math.random().toString(),d=new ops.EditInfo(b,l.getOdtDocument()),d=new gui.EditInfoMarker(d,g),f=b.getElementsByTagNameNS(k,"editinfo")[0],f.setAttributeNS(k,"id",e),q[e]=d);d.addEdit(c,new Date(a))}var s,k="urn:webodf:names:editinfo",q={},g=void 0!==m.editInfoMarkersInitiallyVisible?Boolean(m.editInfoMarkersInitiallyVisible):!0,p=void 0!==m.caretAvatarsInitiallyVisible?Boolean(m.caretAvatarsInitiallyVisible):!0,r=void 0!==m.caretBlinksOnRangeSelect?Boolean(m.caretBlinksOnRangeSelect):!0;this.showEditInfoMarkers=
-function(){g||(g=!0,b(g))};this.hideEditInfoMarkers=function(){g&&(g=!1,b(g))};this.showCaretAvatars=function(){p||(p=!0,h(p))};this.hideCaretAvatars=function(){p&&(p=!1,h(p))};this.getSession=function(){return l};this.getCaret=function(a){return e.getCaret(a)};this.destroy=function(b){var c=l.getOdtDocument(),g=l.getMemberModel(),h=Object.keys(q).map(function(a){return q[a]});c.subscribe(ops.OdtDocument.signalCursorAdded,n);c.subscribe(ops.OdtDocument.signalCursorRemoved,f);c.subscribe(ops.OdtDocument.signalParagraphChanged,
-d);e.getCarets().forEach(function(b){g.unsubscribeMemberDetailsUpdates(b.getCursor().getMemberId(),a)});s.parentNode.removeChild(s);(function t(a,c){c?b(c):a
@@ -2043,27 +2120,27 @@ s.type="text/css";s.media="screen, print, handheld, projection";s.appendChild(do
@source: http://gitorious.org/webodf/webodf/
*/
runtime.loadClass("gui.Caret");
-gui.CaretManager=function(m){function l(a){return d.hasOwnProperty(a)?d[a]:null}function e(){return Object.keys(d).map(function(a){return d[a]})}function c(){return m.getSession().getOdtDocument().getOdfCanvas().getElement()}function b(a){a===m.getInputMemberId()&&c().removeAttribute("tabindex");delete d[a]}function h(a){a=a.getMemberId();a===m.getInputMemberId()&&(a=l(a))&&a.refreshCursorBlinking()}function a(a){a.memberId===m.getInputMemberId()&&(a=l(a.memberId))&&a.ensureVisible()}function n(){var a=
-l(m.getInputMemberId());a&&a.setFocus()}function f(){var a=l(m.getInputMemberId());a&&a.removeFocus()}var d={};this.registerCursor=function(a,b,e){var f=a.getMemberId(),h=c();b=new gui.Caret(a,b,e);d[f]=b;f===m.getInputMemberId()&&(runtime.log("Starting to track input on new cursor of "+f),a.handleUpdate=b.ensureVisible,h.setAttribute("tabindex",0),h.focus());return b};this.getCaret=l;this.getCarets=e;this.destroy=function(d){var f=m.getSession().getOdtDocument(),l=c(),g=e();f.unsubscribe(ops.OdtDocument.signalParagraphChanged,
-a);f.unsubscribe(ops.OdtDocument.signalCursorMoved,h);f.unsubscribe(ops.OdtDocument.signalCursorRemoved,b);l.onfocus=null;l.onblur=null;(function r(a,b){b?d(b):ab?-1:b-1})};c.slideChange=function(b){var e=c.getPages(c.odf_canvas.odfContainer().rootElement),a=-1,m=0;e.forEach(function(b){b=b[1];b.hasAttribute("slide_current")&&(a=m,b.removeAttribute("slide_current"));m+=1});b=b(a,e.length);-1===b&&(b=a);e[b][1].setAttribute("slide_current",
-"1");document.getElementById("pagelist").selectedIndex=b;"cont"===c.slide_mode&&l.scrollBy(0,e[b][1].getBoundingClientRect().top-30)};c.selectSlide=function(b){c.slideChange(function(c,a){return b>=a||0>b?-1:b})};c.scrollIntoContView=function(b){var e=c.getPages(c.odf_canvas.odfContainer().rootElement);0!==e.length&&l.scrollBy(0,e[b][1].getBoundingClientRect().top-30)};c.getPages=function(b){b=b.getElementsByTagNameNS(odf.Namespaces.drawns,"page");var c=[],a;for(a=0;a=a.rangeCount||!p)||(a=a.getRangeAt(0),p.setPoint(a.startContainer,a.startOffset))}function h(){var a=m.ownerDocument.defaultView.getSelection(),b,c;a.removeAllRanges();p&&p.node()&&(b=p.node(),c=b.ownerDocument.createRange(),
-c.setStart(b,p.position()),c.collapse(!0),a.addRange(c))}function a(a){var d=a.charCode||a.keyCode;if(p=null,p&&37===d)b(),p.stepBackward(),h();else if(16<=d&&20>=d||33<=d&&40>=d)return;c(a)}function n(a){c(a)}function f(a){for(var b=a.firstChild;b&&b!==a;)b.nodeType===Node.ELEMENT_NODE&&f(b),b=b.nextSibling||b.parentNode;var c,d,e,b=a.attributes;c="";for(e=b.length-1;0<=e;e-=1)d=b.item(e),c=c+" "+d.nodeName+'="'+d.nodeValue+'"';a.setAttribute("customns_name",a.nodeName);a.setAttribute("customns_atts",
-c);b=a.firstChild;for(d=/^\s*$/;b&&b!==a;)c=b,b=b.nextSibling||b.parentNode,c.nodeType===Node.TEXT_NODE&&d.test(c.nodeValue)&&c.parentNode.removeChild(c)}function d(a,b){for(var c=a.firstChild,e,f,g;c&&c!==a;){if(c.nodeType===Node.ELEMENT_NODE)for(d(c,b),e=c.attributes,g=e.length-1;0<=g;g-=1)f=e.item(g),"http://www.w3.org/2000/xmlns/"!==f.namespaceURI||b[f.nodeValue]||(b[f.nodeValue]=f.localName);c=c.nextSibling||c.parentNode}}function s(){var a=m.ownerDocument.createElement("style"),b;b={};d(m,b);
-var c={},e,f,g=0;for(e in b)if(b.hasOwnProperty(e)&&e){f=b[e];if(!f||c.hasOwnProperty(f)||"xmlns"===f){do f="ns"+g,g+=1;while(c.hasOwnProperty(f));b[e]=f}c[f]=!0}a.type="text/css";b="@namespace customns url(customns);\n"+k;a.appendChild(m.ownerDocument.createTextNode(b));l=l.parentNode.replaceChild(a,l)}var k,q,g,p=null;m.id||(m.id="xml"+String(Math.random()).substring(2));q="#"+m.id+" ";k=q+"*,"+q+":visited, "+q+":link {display:block; margin: 0px; margin-left: 10px; font-size: medium; color: black; background: white; font-variant: normal; font-weight: normal; font-style: normal; font-family: sans-serif; text-decoration: none; white-space: pre-wrap; height: auto; width: auto}\n"+
-q+":before {color: blue; content: '<' attr(customns_name) attr(customns_atts) '>';}\n"+q+":after {color: blue; content: '' attr(customns_name) '>';}\n"+q+"{overflow: auto;}\n";(function(b){e(b,"click",n);e(b,"keydown",a);e(b,"drop",c);e(b,"dragend",c);e(b,"beforepaste",c);e(b,"paste",c)})(m);this.updateCSS=s;this.setXML=function(a){a=a.documentElement||a;g=a=m.ownerDocument.importNode(a,!0);for(f(a);m.lastChild;)m.removeChild(m.lastChild);m.appendChild(a);s();p=new core.PositionIterator(a)};this.getXML=
-function(){return g}};
+runtime.loadClass("xmldom.XPath");runtime.loadClass("odf.Namespaces");
+gui.PresenterUI=function(){var l=new xmldom.XPath,m=runtime.getWindow();return function(g){var c=this;c.setInitialSlideMode=function(){c.startSlideMode("single")};c.keyDownHandler=function(b){if(!b.target.isContentEditable&&"input"!==b.target.nodeName)switch(b.keyCode){case 84:c.toggleToolbar();break;case 37:case 8:c.prevSlide();break;case 39:case 32:c.nextSlide();break;case 36:c.firstSlide();break;case 35:c.lastSlide()}};c.root=function(){return c.odf_canvas.odfContainer().rootElement};c.firstSlide=
+function(){c.slideChange(function(b,c){return 0})};c.lastSlide=function(){c.slideChange(function(b,c){return c-1})};c.nextSlide=function(){c.slideChange(function(b,c){return b+1b?-1:b-1})};c.slideChange=function(b){var g=c.getPages(c.odf_canvas.odfContainer().rootElement),a=-1,e=0;g.forEach(function(b){b=b[1];b.hasAttribute("slide_current")&&(a=e,b.removeAttribute("slide_current"));e+=1});b=b(a,g.length);-1===b&&(b=a);g[b][1].setAttribute("slide_current",
+"1");document.getElementById("pagelist").selectedIndex=b;"cont"===c.slide_mode&&m.scrollBy(0,g[b][1].getBoundingClientRect().top-30)};c.selectSlide=function(b){c.slideChange(function(c,a){return b>=a||0>b?-1:b})};c.scrollIntoContView=function(b){var g=c.getPages(c.odf_canvas.odfContainer().rootElement);0!==g.length&&m.scrollBy(0,g[b][1].getBoundingClientRect().top-30)};c.getPages=function(b){b=b.getElementsByTagNameNS(odf.Namespaces.drawns,"page");var c=[],a;for(a=0;a=a.rangeCount||!q)||(a=a.getRangeAt(0),q.setPoint(a.startContainer,a.startOffset))}function n(){var a=l.ownerDocument.defaultView.getSelection(),b,c;a.removeAllRanges();q&&q.node()&&(b=q.node(),c=b.ownerDocument.createRange(),
+c.setStart(b,q.position()),c.collapse(!0),a.addRange(c))}function a(a){var d=a.charCode||a.keyCode;if(q=null,q&&37===d)b(),q.stepBackward(),n();else if(16<=d&&20>=d||33<=d&&40>=d)return;c(a)}function e(a){c(a)}function f(a){for(var b=a.firstChild;b&&b!==a;)b.nodeType===Node.ELEMENT_NODE&&f(b),b=b.nextSibling||b.parentNode;var c,d,e,b=a.attributes;c="";for(e=b.length-1;0<=e;e-=1)d=b.item(e),c=c+" "+d.nodeName+'="'+d.nodeValue+'"';a.setAttribute("customns_name",a.nodeName);a.setAttribute("customns_atts",
+c);b=a.firstChild;for(d=/^\s*$/;b&&b!==a;)c=b,b=b.nextSibling||b.parentNode,c.nodeType===Node.TEXT_NODE&&d.test(c.nodeValue)&&c.parentNode.removeChild(c)}function d(a,b){for(var c=a.firstChild,e,h,f;c&&c!==a;){if(c.nodeType===Node.ELEMENT_NODE)for(d(c,b),e=c.attributes,f=e.length-1;0<=f;f-=1)h=e.item(f),"http://www.w3.org/2000/xmlns/"!==h.namespaceURI||b[h.nodeValue]||(b[h.nodeValue]=h.localName);c=c.nextSibling||c.parentNode}}function t(){var a=l.ownerDocument.createElement("style"),b;b={};d(l,b);
+var c={},e,h,f=0;for(e in b)if(b.hasOwnProperty(e)&&e){h=b[e];if(!h||c.hasOwnProperty(h)||"xmlns"===h){do h="ns"+f,f+=1;while(c.hasOwnProperty(h));b[e]=h}c[h]=!0}a.type="text/css";b="@namespace customns url(customns);\n"+k;a.appendChild(l.ownerDocument.createTextNode(b));m=m.parentNode.replaceChild(a,m)}var k,p,h,q=null;l.id||(l.id="xml"+String(Math.random()).substring(2));p="#"+l.id+" ";k=p+"*,"+p+":visited, "+p+":link {display:block; margin: 0px; margin-left: 10px; font-size: medium; color: black; background: white; font-variant: normal; font-weight: normal; font-style: normal; font-family: sans-serif; text-decoration: none; white-space: pre-wrap; height: auto; width: auto}\n"+
+p+":before {color: blue; content: '<' attr(customns_name) attr(customns_atts) '>';}\n"+p+":after {color: blue; content: '' attr(customns_name) '>';}\n"+p+"{overflow: auto;}\n";(function(b){g(b,"click",e);g(b,"keydown",a);g(b,"drop",c);g(b,"dragend",c);g(b,"beforepaste",c);g(b,"paste",c)})(l);this.updateCSS=t;this.setXML=function(a){a=a.documentElement||a;h=a=l.ownerDocument.importNode(a,!0);for(f(a);l.lastChild;)l.removeChild(l.lastChild);l.appendChild(a);t();q=new core.PositionIterator(a)};this.getXML=
+function(){return h}};
+// Input 78
/*
Copyright (C) 2013 KO GmbH
@@ -2098,9 +2175,9 @@ function(){return g}};
@source: http://www.webodf.org/
@source: http://gitorious.org/webodf/webodf/
*/
-gui.UndoManager=function(){};gui.UndoManager.prototype.subscribe=function(m,l){};gui.UndoManager.prototype.unsubscribe=function(m,l){};gui.UndoManager.prototype.setOdtDocument=function(m){};gui.UndoManager.prototype.saveInitialState=function(){};gui.UndoManager.prototype.resetInitialState=function(){};gui.UndoManager.prototype.setPlaybackFunction=function(m){};gui.UndoManager.prototype.hasUndoStates=function(){};gui.UndoManager.prototype.hasRedoStates=function(){};
-gui.UndoManager.prototype.moveForward=function(m){};gui.UndoManager.prototype.moveBackward=function(m){};gui.UndoManager.prototype.onOperationExecuted=function(m){};gui.UndoManager.signalUndoStackChanged="undoStackChanged";gui.UndoManager.signalUndoStateCreated="undoStateCreated";gui.UndoManager.signalUndoStateModified="undoStateModified";(function(){return gui.UndoManager})();
-// Input 78
+gui.UndoManager=function(){};gui.UndoManager.prototype.subscribe=function(l,m){};gui.UndoManager.prototype.unsubscribe=function(l,m){};gui.UndoManager.prototype.setOdtDocument=function(l){};gui.UndoManager.prototype.saveInitialState=function(){};gui.UndoManager.prototype.resetInitialState=function(){};gui.UndoManager.prototype.setPlaybackFunction=function(l){};gui.UndoManager.prototype.hasUndoStates=function(){};gui.UndoManager.prototype.hasRedoStates=function(){};
+gui.UndoManager.prototype.moveForward=function(l){};gui.UndoManager.prototype.moveBackward=function(l){};gui.UndoManager.prototype.onOperationExecuted=function(l){};gui.UndoManager.signalUndoStackChanged="undoStackChanged";gui.UndoManager.signalUndoStateCreated="undoStateCreated";gui.UndoManager.signalUndoStateModified="undoStateModified";(function(){return gui.UndoManager})();
+// Input 79
/*
Copyright (C) 2013 KO GmbH
@@ -2135,9 +2212,9 @@ gui.UndoManager.prototype.moveForward=function(m){};gui.UndoManager.prototype.mo
@source: http://www.webodf.org/
@source: http://gitorious.org/webodf/webodf/
*/
-gui.UndoStateRules=function(){function m(e){return e.spec().optype}function l(e){switch(m(e)){case "MoveCursor":case "AddCursor":case "RemoveCursor":return!1;default:return!0}}this.getOpType=m;this.isEditOperation=l;this.isPartOfOperationSet=function(e,c){if(l(e)){if(0===c.length)return!0;var b;if(b=l(c[c.length-1]))a:{b=c.filter(l);var h=m(e),a;b:switch(h){case "RemoveText":case "InsertText":a=!0;break b;default:a=!1}if(a&&h===m(b[0])){if(1===b.length){b=!0;break a}h=b[b.length-2].spec().position;
-b=b[b.length-1].spec().position;a=e.spec().position;if(b===a-(b-h)){b=!0;break a}}b=!1}return b}return!0}};
-// Input 79
+gui.UndoStateRules=function(){function l(g){return g.spec().optype}function m(g){switch(l(g)){case "MoveCursor":case "AddCursor":case "RemoveCursor":return!1;default:return!0}}this.getOpType=l;this.isEditOperation=m;this.isPartOfOperationSet=function(g,c){if(m(g)){if(0===c.length)return!0;var b;if(b=m(c[c.length-1]))a:{b=c.filter(m);var n=l(g),a;b:switch(n){case "RemoveText":case "InsertText":a=!0;break b;default:a=!1}if(a&&n===l(b[0])){if(1===b.length){b=!0;break a}n=b[b.length-2].spec().position;
+b=b[b.length-1].spec().position;a=g.spec().position;if(b===a-(b-n)){b=!0;break a}}b=!1}return b}return!0}};
+// Input 80
/*
Copyright (C) 2013 KO GmbH
@@ -2173,13 +2250,13 @@ b=b[b.length-1].spec().position;a=e.spec().position;if(b===a-(b-h)){b=!0;break a
@source: http://gitorious.org/webodf/webodf/
*/
runtime.loadClass("core.DomUtils");runtime.loadClass("gui.UndoManager");runtime.loadClass("gui.UndoStateRules");
-gui.TrivialUndoManager=function(m){function l(){r.emit(gui.UndoManager.signalUndoStackChanged,{undoAvailable:a.hasUndoStates(),redoAvailable:a.hasRedoStates()})}function e(){q!==d&&q!==g[g.length-1]&&g.push(q)}function c(a){var b=a.previousSibling||a.nextSibling;a.parentNode.removeChild(a);n.normalizeTextNodes(b)}function b(a){return Object.keys(a).map(function(b){return a[b]})}function h(a){function c(a){var b=a.spec();if(f[b.memberid])switch(b.optype){case "AddCursor":d[b.memberid]||(d[b.memberid]=
-a,delete f[b.memberid],g-=1);break;case "MoveCursor":e[b.memberid]||(e[b.memberid]=a)}}var d={},e={},f={},g,h=a.pop();k.getCursors().forEach(function(a){f[a.getMemberId()]=!0});for(g=Object.keys(f).length;h&&0
@@ -2215,22 +2292,23 @@ b.refreshCSS(),q=g[g.length-1]||d,l());return e}};gui.TrivialUndoManager.signalD
@source: http://gitorious.org/webodf/webodf/
*/
runtime.loadClass("core.EventNotifier");runtime.loadClass("odf.OdfUtils");runtime.loadClass("gui.SelectionMover");runtime.loadClass("gui.StyleHelper");runtime.loadClass("core.PositionFilterChain");
-ops.OdtDocument=function(m){function l(){var a=m.odfContainer().getContentElement(),b=a&&a.localName;runtime.assert("text"===b,"Unsupported content element type '"+b+"'for OdtDocument");return a}function e(a){function b(a){for(;!(a.namespaceURI===odf.Namespaces.officens&&"text"===a.localName||a.namespaceURI===odf.Namespaces.officens&&"annotation"===a.localName);)a=a.parentNode;return a}this.acceptPosition=function(c){c=c.container();var d=f[a].getNode();return b(c)===b(d)?s:k}}function c(a){var b=
-gui.SelectionMover.createPositionIterator(l());for(a+=1;0=e;e+=1){b=a.container();d=a.unfilteredDomOffset();if(b.nodeType===Node.TEXT_NODE&&" "===b.data[d]&&n.isSignificantWhitespace(b,
-d)){runtime.assert(" "===b.data[d],"upgradeWhitespaceToElement: textNode.data[offset] should be a literal space");var f=b.ownerDocument.createElementNS("urn:oasis:names:tc:opendocument:xmlns:text:1.0","text:s");f.appendChild(b.ownerDocument.createTextNode(" "));b.deleteData(d,1);0= 0");1===q.acceptPosition(d)?(h=d.container(),h.nodeType===Node.TEXT_NODE&&(e=h,k=0)):b+=1;for(;0=f;f+=1){b=a.container();d=a.unfilteredDomOffset();if(b.nodeType===Node.TEXT_NODE&&" "===b.data[d]&&
+e.isSignificantWhitespace(b,d)){runtime.assert(" "===b.data[d],"upgradeWhitespaceToElement: textNode.data[offset] should be a literal space");var g=b.ownerDocument.createElementNS("urn:oasis:names:tc:opendocument:xmlns:text:1.0","text:s");g.appendChild(b.ownerDocument.createTextNode(" "));b.deleteData(d,1);0= 0");1===p.acceptPosition(d)?(g=d.container(),g.nodeType===Node.TEXT_NODE&&(e=g,k=0)):b+=1;for(;0
@@ -2266,7 +2344,7 @@ ops.OdtDocument.signalCursorRemoved="cursor/removed";ops.OdtDocument.signalCurso
@source: http://gitorious.org/webodf/webodf/
*/
runtime.loadClass("ops.TrivialMemberModel");runtime.loadClass("ops.TrivialOperationRouter");runtime.loadClass("ops.OperationFactory");runtime.loadClass("ops.OdtDocument");
-ops.Session=function(m){var l=new ops.OperationFactory,e=new ops.OdtDocument(m),c=new ops.TrivialMemberModel,b=null;this.setMemberModel=function(b){c=b};this.setOperationFactory=function(c){l=c;b&&b.setOperationFactory(l)};this.setOperationRouter=function(c){b=c;c.setPlaybackFunction(function(a){a.execute(e);e.emit(ops.OdtDocument.signalOperationExecuted,a)});c.setOperationFactory(l)};this.getMemberModel=function(){return c};this.getOperationFactory=function(){return l};this.getOdtDocument=function(){return e};
-this.enqueue=function(c){b.push(c)};this.close=function(h){b.close(function(a){a?h(a):c.close(function(a){a?h(a):e.close(h)})})};this.destroy=function(b){e.destroy(b)};this.setOperationRouter(new ops.TrivialOperationRouter)};
-// Input 82
+ops.Session=function(l){var m=new ops.OperationFactory,g=new ops.OdtDocument(l),c=new ops.TrivialMemberModel,b=null;this.setMemberModel=function(b){c=b};this.setOperationFactory=function(c){m=c;b&&b.setOperationFactory(m)};this.setOperationRouter=function(c){b=c;c.setPlaybackFunction(function(a){a.execute(g);g.emit(ops.OdtDocument.signalOperationExecuted,a)});c.setOperationFactory(m)};this.getMemberModel=function(){return c};this.getOperationFactory=function(){return m};this.getOdtDocument=function(){return g};
+this.enqueue=function(c){b.push(c)};this.close=function(l){b.close(function(a){a?l(a):c.close(function(a){a?l(a):g.close(l)})})};this.destroy=function(b){g.destroy(b)};this.setOperationRouter(new ops.TrivialOperationRouter)};
+// Input 83
var webodf_css="@namespace draw url(urn:oasis:names:tc:opendocument:xmlns:drawing:1.0);\n@namespace fo url(urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0);\n@namespace office url(urn:oasis:names:tc:opendocument:xmlns:office:1.0);\n@namespace presentation url(urn:oasis:names:tc:opendocument:xmlns:presentation:1.0);\n@namespace style url(urn:oasis:names:tc:opendocument:xmlns:style:1.0);\n@namespace svg url(urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0);\n@namespace table url(urn:oasis:names:tc:opendocument:xmlns:table:1.0);\n@namespace text url(urn:oasis:names:tc:opendocument:xmlns:text:1.0);\n@namespace runtimens url(urn:webodf); /* namespace for runtime only */\n@namespace cursor url(urn:webodf:names:cursor);\n@namespace editinfo url(urn:webodf:names:editinfo);\n@namespace annotation url(urn:webodf:names:annotation);\n@namespace dc url(http://purl.org/dc/elements/1.1/);\n\noffice|document > *, office|document-content > * {\n display: none;\n}\noffice|body, office|document {\n display: inline-block;\n position: relative;\n}\n\ntext|p, text|h {\n display: block;\n padding: 0;\n margin: 0;\n line-height: normal;\n position: relative;\n min-height: 1.3em; /* prevent empty paragraphs and headings from collapsing if they are empty */\n}\n*[runtimens|containsparagraphanchor] {\n position: relative;\n}\ntext|s {\n white-space: pre;\n}\ntext|tab {\n display: inline;\n white-space: pre;\n}\ntext|line-break {\n content: \" \";\n display: block;\n}\ntext|tracked-changes {\n /*Consumers that do not support change tracking, should ignore changes.*/\n display: none;\n}\noffice|binary-data {\n display: none;\n}\noffice|text {\n display: block;\n text-align: left;\n overflow: visible;\n word-wrap: break-word;\n}\n\noffice|text::selection {\n /** Let's not draw selection highlight that overflows into the office|text\n * node when selecting content across several paragraphs\n */\n background: transparent;\n}\noffice|text * draw|text-box {\n /** only for text documents */\n display: block;\n border: 1px solid #d3d3d3;\n}\noffice|spreadsheet {\n display: block;\n border-collapse: collapse;\n empty-cells: show;\n font-family: sans-serif;\n font-size: 10pt;\n text-align: left;\n page-break-inside: avoid;\n overflow: hidden;\n}\noffice|presentation {\n display: inline-block;\n text-align: left;\n}\n#shadowContent {\n display: inline-block;\n text-align: left;\n}\ndraw|page {\n display: block;\n position: relative;\n overflow: hidden;\n}\npresentation|notes, presentation|footer-decl, presentation|date-time-decl {\n display: none;\n}\n@media print {\n draw|page {\n border: 1pt solid black;\n page-break-inside: avoid;\n }\n presentation|notes {\n /*TODO*/\n }\n}\noffice|spreadsheet text|p {\n border: 0px;\n padding: 1px;\n margin: 0px;\n}\noffice|spreadsheet table|table {\n margin: 3px;\n}\noffice|spreadsheet table|table:after {\n /* show sheet name the end of the sheet */\n /*content: attr(table|name);*/ /* gives parsing error in opera */\n}\noffice|spreadsheet table|table-row {\n counter-increment: row;\n}\noffice|spreadsheet table|table-row:before {\n width: 3em;\n background: #cccccc;\n border: 1px solid black;\n text-align: center;\n content: counter(row);\n display: table-cell;\n}\noffice|spreadsheet table|table-cell {\n border: 1px solid #cccccc;\n}\ntable|table {\n display: table;\n}\ndraw|frame table|table {\n width: 100%;\n height: 100%;\n background: white;\n}\ntable|table-header-rows {\n display: table-header-group;\n}\ntable|table-row {\n display: table-row;\n}\ntable|table-column {\n display: table-column;\n}\ntable|table-cell {\n width: 0.889in;\n display: table-cell;\n word-break: break-all; /* prevent long words from extending out the table cell */\n}\ndraw|frame {\n display: block;\n}\ndraw|image {\n display: block;\n width: 100%;\n height: 100%;\n top: 0px;\n left: 0px;\n background-repeat: no-repeat;\n background-size: 100% 100%;\n -moz-background-size: 100% 100%;\n}\n/* only show the first image in frame */\ndraw|frame > draw|image:nth-of-type(n+2) {\n display: none;\n}\ntext|list:before {\n display: none;\n content:\"\";\n}\ntext|list {\n counter-reset: list;\n}\ntext|list-item {\n display: block;\n}\ntext|number {\n display:none;\n}\n\ntext|a {\n color: blue;\n text-decoration: underline;\n cursor: pointer;\n}\ntext|note-citation {\n vertical-align: super;\n font-size: smaller;\n}\ntext|note-body {\n display: none;\n}\ntext|note:hover text|note-citation {\n background: #dddddd;\n}\ntext|note:hover text|note-body {\n display: block;\n left:1em;\n max-width: 80%;\n position: absolute;\n background: #ffffaa;\n}\nsvg|title, svg|desc {\n display: none;\n}\nvideo {\n width: 100%;\n height: 100%\n}\n\n/* below set up the cursor */\ncursor|cursor {\n display: inline;\n width: 0px;\n height: 1em;\n /* making the position relative enables the avatar to use\n the cursor as reference for its absolute position */\n position: relative;\n z-index: 1;\n}\ncursor|cursor > span {\n display: inline;\n position: absolute;\n top: 5%; /* push down the caret; 0px can do the job, 5% looks better, 10% is a bit over */\n height: 1em;\n border-left: 2px solid black;\n outline: none;\n}\n\ncursor|cursor > div {\n padding: 3px;\n box-shadow: 0px 0px 5px rgba(50, 50, 50, 0.75);\n border: none !important;\n border-radius: 5px;\n opacity: 0.3;\n}\n\ncursor|cursor > div > img {\n border-radius: 5px;\n}\n\ncursor|cursor > div.active {\n opacity: 0.8;\n}\n\ncursor|cursor > div:after {\n content: ' ';\n position: absolute;\n width: 0px;\n height: 0px;\n border-style: solid;\n border-width: 8.7px 5px 0 5px;\n border-color: black transparent transparent transparent;\n\n top: 100%;\n left: 43%;\n}\n\n\n.editInfoMarker {\n position: absolute;\n width: 10px;\n height: 100%;\n left: -20px;\n opacity: 0.8;\n top: 0;\n border-radius: 5px;\n background-color: transparent;\n box-shadow: 0px 0px 5px rgba(50, 50, 50, 0.75);\n}\n.editInfoMarker:hover {\n box-shadow: 0px 0px 8px rgba(0, 0, 0, 1);\n}\n\n.editInfoHandle {\n position: absolute;\n background-color: black;\n padding: 5px;\n border-radius: 5px;\n opacity: 0.8;\n box-shadow: 0px 0px 5px rgba(50, 50, 50, 0.75);\n bottom: 100%;\n margin-bottom: 10px;\n z-index: 3;\n left: -25px;\n}\n.editInfoHandle:after {\n content: ' ';\n position: absolute;\n width: 0px;\n height: 0px;\n border-style: solid;\n border-width: 8.7px 5px 0 5px;\n border-color: black transparent transparent transparent;\n\n top: 100%;\n left: 5px;\n}\n.editInfo {\n font-family: sans-serif;\n font-weight: normal;\n font-style: normal;\n text-decoration: none;\n color: white;\n width: 100%;\n height: 12pt;\n}\n.editInfoColor {\n float: left;\n width: 10pt;\n height: 10pt;\n border: 1px solid white;\n}\n.editInfoAuthor {\n float: left;\n margin-left: 5pt;\n font-size: 10pt;\n text-align: left;\n height: 12pt;\n line-height: 12pt;\n}\n.editInfoTime {\n float: right;\n margin-left: 30pt;\n font-size: 8pt;\n font-style: italic;\n color: yellow;\n height: 12pt;\n line-height: 12pt;\n}\n\n.annotationWrapper {\n display: inline;\n position: relative;\n}\n\n.annotationRemoveButton:before {\n content: '\u00d7';\n color: white;\n padding: 5px;\n line-height: 1em;\n}\n\n.annotationRemoveButton {\n width: 20px;\n height: 20px;\n border-radius: 10px;\n background-color: black;\n box-shadow: 0px 0px 5px rgba(50, 50, 50, 0.75);\n position: absolute;\n top: -10px;\n left: -10px;\n z-index: 3;\n text-align: center;\n font-family: sans-serif;\n font-style: normal;\n font-weight: normal;\n text-decoration: none;\n font-size: 15px;\n}\n.annotationRemoveButton:hover {\n cursor: pointer;\n box-shadow: 0px 0px 5px rgba(0, 0, 0, 1);\n}\n\n.annotationNote {\n width: 4cm;\n position: absolute;\n display: inline;\n z-index: 10;\n}\n.annotationNote > office|annotation {\n display: block;\n text-align: left;\n}\n\n.annotationConnector {\n position: absolute;\n display: inline;\n z-index: 2;\n border-top: 1px dashed brown;\n}\n.annotationConnector.angular {\n -moz-transform-origin: left top;\n -webkit-transform-origin: left top;\n -ms-transform-origin: left top;\n transform-origin: left top;\n}\n.annotationConnector.horizontal {\n left: 0;\n}\n.annotationConnector.horizontal:before {\n content: '';\n display: inline;\n position: absolute;\n width: 0px;\n height: 0px;\n border-style: solid;\n border-width: 8.7px 5px 0 5px;\n border-color: brown transparent transparent transparent;\n top: -1px;\n left: -5px;\n}\n\noffice|annotation {\n width: 100%;\n height: 100%;\n display: none;\n background: rgb(198, 238, 184);\n background: -moz-linear-gradient(90deg, rgb(198, 238, 184) 30%, rgb(180, 196, 159) 100%);\n background: -webkit-linear-gradient(90deg, rgb(198, 238, 184) 30%, rgb(180, 196, 159) 100%);\n background: -o-linear-gradient(90deg, rgb(198, 238, 184) 30%, rgb(180, 196, 159) 100%);\n background: -ms-linear-gradient(90deg, rgb(198, 238, 184) 30%, rgb(180, 196, 159) 100%);\n background: linear-gradient(180deg, rgb(198, 238, 184) 30%, rgb(180, 196, 159) 100%);\n box-shadow: 0 3px 4px -3px #ccc;\n}\n\noffice|annotation > dc|creator {\n display: block;\n font-size: 10pt;\n font-weight: normal;\n font-style: normal;\n font-family: sans-serif;\n color: white;\n background-color: brown;\n padding: 4px;\n}\noffice|annotation > dc|date {\n display: block;\n font-size: 10pt;\n font-weight: normal;\n font-style: normal;\n font-family: sans-serif;\n border: 4px solid transparent;\n}\noffice|annotation > text|list {\n display: block;\n padding: 5px;\n}\n\n/* This is very temporary CSS. This must go once\n * we start bundling webodf-default ODF styles for annotations.\n */\noffice|annotation text|p {\n font-size: 10pt;\n color: black;\n font-weight: normal;\n font-style: normal;\n text-decoration: none;\n font-family: sans-serif;\n}\n\ndc|*::selection {\n background: transparent;\n}\ndc|*::-moz-selection {\n background: transparent;\n}\n\n#annotationsPane {\n background-color: #EAEAEA;\n width: 4cm;\n height: 100%;\n display: none;\n position: absolute;\n outline: 1px solid #ccc;\n}\n\n.annotationHighlight {\n background-color: yellow;\n position: relative;\n}\n";