agenda-libre-ruby/public/assets/tinymce/plugins/table/plugin-0d4057859445665d58e85d861f2bbf5f983dfa6014b99b6cca0a6561309deb94.js

6 lines
155 KiB
JavaScript
Raw Normal View History

2018-01-01 17:52:33 +01:00
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e[f]=d(a[f]);b.apply(null,e)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("d",tinymce.util.Tools.resolve),g("1",["d"],function(a){return a("tinymce.PluginManager")}),h("1p",Array),h("1q",Error),g("f",["1p","1q"],function(a,b){var c=function(){},d=function(a){return function(){return a()}},e=function(a,b){return function(){return a(b.apply(null,arguments))}},f=function(a){return function(){return a}},g=function(a){return a},h=function(a,b){return a===b},i=function(b){for(var c=new a(arguments.length-1),d=1;d<arguments.length;d++)c[d-1]=arguments[d];return function(){for(var d=new a(arguments.length),e=0;e<d.length;e++)d[e]=arguments[e];var f=c.concat(d);return b.apply(null,f)}},j=function(a){return function(){return!a.apply(null,arguments)}},k=function(a){return function(){throw new b(a)}},l=function(a){return a()},m=function(a){a()},n=f(!1),o=f(!0);return{noop:c,noarg:d,compose:e,constant:f,identity:g,tripleEquals:h,curry:i,not:j,die:k,apply:l,call:m,never:n,always:o}}),h("1r",Object),g("g",["f","1r"],function(a,b){var c=a.never,d=a.always,e=function(){return f},f=function(){var f=function(a){return a.isNone()},g=function(a){return a()},h=function(a){return a},i=function(){},j={fold:function(a,b){return a()},is:c,isSome:c,isNone:d,getOr:h,getOrThunk:g,getOrDie:function(a){throw new Error(a||"error: getOrDie called on none.")},or:h,orThunk:g,map:e,ap:e,each:i,bind:e,flatten:e,exists:c,forall:d,filter:e,equals:f,equals_:f,toArray:function(){return[]},toString:a.constant("none()")};return b.freeze&&b.freeze(j),j}(),g=function(a){var b=function(){return a},h=function(){return k},i=function(b){return g(b(a))},j=function(b){return b(a)},k={fold:function(b,c){return c(a)},is:function(b){return a===b},isSome:d,isNone:c,getOr:b,getOrThunk:b,getOrDie:b,or:h,orThunk:h,map:i,ap:function(b){return b.fold(e,function(b){return g(b(a))})},each:function(b){b(a)},bind:j,flatten:b,exists:j,forall:j,filter:function(b){return b(a)?k:f},equals:function(b){return b.is(a)},equals_:function(b,d){return b.fold(c,function(b){return d(a,b)})},toArray:function(){return[a]},toString:function(){return"some("+a+")"}};return k},h=function(a){return null===a||void 0===a?f:g(a)};return{some:g,none:e,from:h}}),h("1s",String),g("e",["g","1p","1q","1s"],function(a,b,c,d){var e=function(){var a=b.prototype.indexOf,c=function(b,c){return a.call(b,c)},d=function(a,b){return u(a,b)};return void 0===a?d:c}(),f=function(b,c){var d=e(b,c);return d===-1?a.none():a.some(d)},g=function(a,b){return e(a,b)>-1},h=function(a,b){return t(a,b).isSome()},i=function(a,b){for(var c=[],d=0;d<a;d++)c.push(b(d));return c},j=function(a,b){for(var c=[],d=0;d<a.length;d+=b){var e=a.slice(d,d+b);c.push(e)}return c},k=function(a,c){for(var d=a.length,e=new b(d),f=0;f<d;f++){var g=a[f];e[f]=c(g,f,a)}return e},l=function(a,b){for(var c=0,d=a.length;c<d;c++){var e=a[c];b(e,c,a)}},m=function(a,b){for(var c=a.length-1;c>=0;c--){var d=a[c];b(d,c,a)}},n=function(a,b){for(var c=[],d=[],e=0,f=a.length;e<f;e++){var g=a[e],h=b(g,e,a)?c:d;h.push(g)}return{pass:c,fail:d}},o=function(a,b){for(var c=[],d=0,e=a.length;d<e;d++){var f=a[d];b(f,d,a)&&c.push(f)}return c},p=function(a,b){if(0===a.length)return[];for(var c=b(a[0]),d=[],e=[],f=0,g=a.length;f<g;f++){var h=a[f],i=b(h);i!==c&&(d.push(e),e=[]),c=i,e.push(h)}return 0!==e.length&&d.push(e),d},q=function(a,b,c){return m(a,function(a){c=b(c,a)}),c},r=function(a,b,c){return l(a,function(a){c=b
q(b,j),b};return{extract:r}}),g("k",["r","l","12","28","13","1m"],function(a,b,c,d,e,f){var g=function(a,c){return b.fromDom(a.dom().cloneNode(c))},h=function(a){return g(a,!1)},i=function(a){return g(a,!0)},j=function(c,d){var e=b.fromTag(d),f=a.clone(c);return a.setAll(e,f),e},k=function(a,b){var c=j(a,b),e=f.children(i(a));return d.append(c,e),c},l=function(a,b){var g=j(a,b);c.before(a,g);var h=f.children(a);return d.append(g,h),e.remove(a),g};return{shallow:h,shallowAs:j,deep:i,copy:k,mutate:l}}),g("3p",["26","g","1q"],function(a,b,c){return function(d,e){var f=function(a){if(!d(a))throw new c("Can only get "+e+" value of a "+e+" node");return j(a).getOr("")},g=function(a){try{return h(a)}catch(a){return b.none()}},h=function(a){return d(a)?b.from(a.dom().nodeValue):b.none()},i=a.detect().browser,j=i.isIE()&&10===i.version.major?g:h,k=function(a,b){if(!d(a))throw new c("Can only set raw "+e+" value of a "+e+" node");a.dom().nodeValue=b};return{get:f,getOption:j,set:k}}}),g("1l",["n","3p"],function(a,b){var c=b(a.isText,"text"),d=function(a){return c.get(a)},e=function(a){return c.getOption(a)},f=function(a,b){c.set(a,b)};return{get:d,getOption:e,set:f}}),g("2b",["e","n","1l","1m"],function(a,b,c,d){var e=function(a){return"img"===b.name(a)?1:c.getOption(a).fold(function(){return d.children(a).length},function(a){return a.length})},f=function(a,b){return e(a)===b},g=function(a,b){return 0===b},h="\xa0",i=function(a){return c.getOption(a).filter(function(a){return 0!==a.trim().length||a.indexOf(h)>-1}).isSome()},j=["img","br"],k=function(c){var d=i(c);return d||a.contains(j,b.name(c))};return{getEnd:e,isEnd:f,isStart:g,isCursorPosition:k}}),g("1d",["g","2a","1m","2b"],function(a,b,c,d){var e=function(a){return b.descendant(a,d.isCursorPosition)},f=function(a){return g(a,d.isCursorPosition)},g=function(b,d){var e=function(b){for(var f=c.children(b),g=f.length-1;g>=0;g--){var h=f[g];if(d(h))return a.some(h);var i=e(h);if(i.isSome())return i}return a.none()};return e(b)};return{first:e,last:f}}),g("i",["e","1t","1c","12","k","l","n","r","22","y","1m","1d"],function(a,b,c,d,e,f,g,h,i,j,k,l){var m=function(){var a=f.fromTag("td");return d.append(a,f.fromTag("br")),a},n=function(a,c,d){var f=e.copy(a,c);return b.each(d,function(a,b){null===a?h.remove(f,b):h.set(f,b,a)}),f},o=function(a){return a},p=function(a){return function(){return f.fromTag("tr",a.dom())}},q=function(b,f,g){var h=l.first(b);return h.map(function(h){var i=g.join(","),k=j.ancestors(h,i,function(a){return c.eq(a,b)});return a.foldr(k,function(a,b){var c=e.shallow(b);return d.append(a,c),c},f)}).getOr(f)},r=function(a,b,c){var e=function(b){var e=k.owner(b.element()),h=f.fromTag(g.name(b.element()),e.dom()),j=c.getOr(["strong","em","b","i","span","font","h1","h2","h3","h4","h5","h6","p","div"]),l=j.length>0?q(b.element(),h,j):h;return d.append(l,f.fromTag("br")),i.copy(b.element(),h),i.remove(h,"height"),1!==b.colspan()&&i.remove(b.element(),"width"),a(b.element(),h),h};return{row:p(b),cell:e,replace:n,gap:m}},s=function(a){return{row:p(a),cell:m,replace:o,gap:m}};return{cellOperations:r,paste:s}}),g("m",["e","l","1m","23"],function(a,b,c,d){var e=function(a,e){var f=e||d,g=f.createElement("div");return g.innerHTML=a,c.children(b.fromDom(g))},f=function(c,d){return a.map(c,function(a){return b.fromTag(a,d)})},g=function(c,d){return a.map(c,function(a){return b.fromText(a,d)})},h=function(c){return a.map(c,b.fromDom)};return{fromHtml:e,fromTags:f,fromText:g,fromDom:h}}),g("5v",[],function(){return["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"]}),g("56",["5v","e","f","r","1c","22","l","12","28","n","29","2a","13","y","t","1l","1m"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){return function(){var r=function(a){return g.fromDom(a.dom().cloneNode(!1))},s=function(c){return!!j.isElement(c)&&("body"===j.name(c)||b.contains(a,j.name(c)))},t=function(a){return!!j.isElement(a)&&b.contains(["br
var k=function(a,b,d,e){d===e?c.remove(a,b):c.set(a,b,d)},l=function(c,h){var l=[],m=[],n=function(b,h){var n=i.child(c,h).getOrThunk(function(){var a=d.fromTag(h,j.owner(c).dom());return e.append(c,a),a});g.empty(n);var o=a.map(b,function(b){b.isNew()&&l.push(b.element());var c=b.element();return g.empty(c),a.each(b.cells(),function(a){a.isNew()&&m.push(a.element()),k(a.element(),"colspan",a.colspan(),1),k(a.element(),"rowspan",a.rowspan(),1),e.append(c,a.element())}),c});f.append(n,o)},o=function(a){i.child(c,a).bind(g.remove)},p=function(a,b){a.length>0?n(a,b):o(b)},q=[],r=[],s=[];return a.each(h,function(a){switch(a.section()){case"thead":q.push(a);break;case"tbody":r.push(a);break;case"tfoot":s.push(a)}}),p(q,"thead"),p(r,"tbody"),p(s,"tfoot"),{newRows:b.constant(l),newCells:b.constant(m)}},m=function(b){var c=a.map(b,function(b){var c=h.shallow(b.element());return a.each(b.cells(),function(a){var b=h.deep(a.element());k(b,"colspan",a.colspan(),1),k(b,"rowspan",a.rowspan(),1),e.append(c,b)}),c});return c};return{render:l,copy:m}}),g("5g",["e","g","3m","3v"],function(a,b,c,d){var e=function(a,b){for(var c=[],d=0;d<a;d++)c.push(b(d));return c},f=function(a,b){for(var c=[],d=a;d<b;d++)c.push(d);return c},g=function(b,c){var d=[];return a.each(b,function(a,e){e<b.length-1&&!c(a,b[e+1])?d.push(a):e===b.length-1&&d.push(a)}),d},h=function(e,f){if(f<0||f>=e.length-1)return b.none();var g=e[f].fold(function(){var b=a.reverse(e.slice(0,f));return c.findMap(b,function(a,b){return a.map(function(a){return{value:a,delta:b+1}})})},function(a){return b.some({value:a,delta:0})}),h=e[f+1].fold(function(){var a=e.slice(f+1);return c.findMap(a,function(a,b){return a.map(function(a){return{value:a,delta:b+1}})})},function(a){return b.some({value:a,delta:1})});return g.bind(function(a){return h.map(function(b){var c=b.delta+a.delta;return d.abs(b.value-a.value)/c})})};return{repeat:e,range:f,unique:g,deduce:h}}),g("5b",["e","f","g","1x","5g"],function(a,b,c,d,e){var f=function(c){var f=c.grid(),h=e.range(0,f.columns()),i=e.range(0,f.rows());return a.map(h,function(e){var f=function(){return a.bind(i,function(a){return d.getAt(c,a,e).filter(function(a){return a.column()===e}).fold(b.constant([]),function(a){return[a]})})},h=function(a){return 1===a.colspan()},j=function(){return d.getAt(c,0,e)};return g(f,h,j)})},g=function(b,d,e){var f=b(),g=a.find(f,d),h=g.orThunk(function(){return c.from(f[0]).orThunk(e)});return h.map(function(a){return a.element()})},h=function(c){var f=c.grid(),h=e.range(0,f.rows()),i=e.range(0,f.columns());return a.map(h,function(e){var f=function(){return a.bind(i,function(a){return d.getAt(c,e,a).filter(function(a){return a.row()===e}).fold(b.constant([]),function(a){return[a]})})},h=function(a){return 1===a.rowspan()},j=function(){return d.getAt(c,e,0)};return g(f,h,j)})};return{columns:f,rows:h}}),g("5c",["r","22","l"],function(a,b,c){var d=function(d,e,f,g,h){var i=c.fromTag("div");return b.setAll(i,{position:"absolute",left:e-g/2+"px",top:f+"px",height:h+"px",width:g+"px"}),a.set(i,"data-column",d),i},e=function(d,e,f,g,h){var i=c.fromTag("div");return b.setAll(i,{position:"absolute",left:e+"px",top:f-h/2+"px",height:h+"px",width:g+"px"}),a.set(i,"data-row",d),i};return{col:d,row:e}}),g("5d",[],function(){var a=function(a){var b=a.replace(/\./g,"-"),c=function(a){return b+"-"+a};return{resolve:c}};return{css:a}}),g("4k",["5d"],function(a){var b=a.css("ephox-snooker");return{resolve:b.resolve}}),g("4m",[],function(){return function(a,b,c){var d=c||!1,e=function(){b(),d=!0},f=function(){a(),d=!1},g=function(){var a=d?f:e;a()},h=function(){return d};return{on:e,off:f,toggle:g,isOn:h}}}),g("5e",["e","r"],function(a,b){var c=function(a,c){var d=b.get(a,c);return void 0===d||""===d?[]:d.split(" ")},d=function(a,d,e){var f=c(a,d),g=f.concat([e]);b.set(a,d,g.join(" "))},e=function(d,e,f){var g=a.filter(c(d,e),function(a){return a!==f});g.length>0?b.set(d,e,g.join(" ")):b.remove(d,e)};return{read:c,add:d,remove:e}}),g("4n",["e","5e"],function(a,b){var c=function(a){return void 0!==a.dom().classList},d=function(a){r
f},j=function(a,b,d){var e=a.dom,g={},i={};if(g["class"]=d["class"],i.height=f.addSizeSuffix(d.height),e.getAttrib(b,"width")&&!a.settings.table_style_by_css?g.width=f.removePxSuffix(d.width):i.width=f.addSizeSuffix(d.width),a.settings.table_style_by_css?(i["border-width"]=f.addSizeSuffix(d.border),i["border-spacing"]=f.addSizeSuffix(d.cellspacing),c.extend(g,{"data-mce-border-color":d.borderColor,"data-mce-cell-padding":d.cellpadding,"data-mce-border":d.border})):c.extend(g,{border:d.border,cellpadding:d.cellpadding,cellspacing:d.cellspacing}),a.settings.table_style_by_css&&b.children)for(var j=0;j<b.children.length;j++)h(e,b.children[j],{"border-width":f.addSizeSuffix(d.border),"border-color":d.borderColor,padding:f.addSizeSuffix(d.cellpadding)});d.style?c.extend(i,e.parseStyle(d.style)):i=c.extend({},e.parseStyle(e.getAttrib(b,"style")),i),g.style=e.serializeStyle(i),e.setAttribs(b,g)},k=function(a,c,f){var h,i,k=a.dom;g.updateStyleField(a,f),i=f.control.rootControl.toJSON(),i["class"]===!1&&delete i["class"],a.undoManager.transact(function(){c||(c=d.insert(a,i.cols||1,i.rows||1)),j(a,c,i),h=k.select("caption",c)[0],h&&!i.caption&&k.remove(h),!h&&i.caption&&(h=k.create("caption"),h.innerHTML=b.ie?"\xa0":'<br data-mce-bogus="1"/>',c.insertBefore(h,c.firstChild)),e.unApplyAlign(a,c),i.align&&e.applyAlign(a,c,i.align),a.focus(),a.addVisual()})},l=function(b,c){var d,e,f,h,j,l=b.dom,m={};c===!0?(d=l.getParent(b.selection.getStart(),"table"),d&&(m=i(b,d))):(e={label:"Cols",name:"cols"},f={label:"Rows",name:"rows"}),b.settings.table_class_list&&(m["class"]&&(m["class"]=m["class"].replace(/\s*mce\-item\-table\s*/g,"")),h={name:"class",type:"listbox",label:"Class",values:g.buildListItems(b.settings.table_class_list,function(a){a.value&&(a.textStyle=function(){return b.formatter.getCssText({block:"table",classes:[a.value]})})})}),j={type:"form",layout:"flex",direction:"column",labelGapCalc:"children",padding:0,items:[{type:"form",labelGapCalc:!1,padding:0,layout:"grid",columns:2,defaults:{type:"textbox",maxWidth:50},items:b.settings.table_appearance_options!==!1?[e,f,{label:"Width",name:"width",onchange:a.curry(g.updateStyleField,b)},{label:"Height",name:"height",onchange:a.curry(g.updateStyleField,b)},{label:"Cell spacing",name:"cellspacing"},{label:"Cell padding",name:"cellpadding"},{label:"Border",name:"border"},{label:"Caption",name:"caption",type:"checkbox"}]:[e,f,{label:"Width",name:"width",onchange:a.curry(g.updateStyleField,b)},{label:"Height",name:"height",onchange:a.curry(g.updateStyleField,b)}]},{label:"Alignment",name:"align",type:"listbox",text:"None",values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},h]},b.settings.table_advtab!==!1?b.windowManager.open({title:"Table properties",data:m,bodyType:"tabpanel",body:[{title:"General",type:"form",items:j},g.createStyleForm(b)],onsubmit:a.curry(k,b,d)}):b.windowManager.open({title:"Table properties",data:m,body:j,onsubmit:a.curry(k,b,d)})};return{open:l}}),g("16",["f","14","2x","z","2y"],function(a,b,c,d,e){function f(a,f,g){function i(a,b,c){c&&l.setAttrib(a,b,c)}function j(a,b,c){c&&l.setStyle(a,b,c)}var k,l=a.dom;e.updateStyleField(a,g),k=g.control.rootControl.toJSON(),a.undoManager.transact(function(){b.each(f,function(b){i(b,"scope",k.scope),i(b,"style",k.style),i(b,"class",k["class"]),j(b,"height",d.addSizeSuffix(k.height)),k.type!==b.parentNode.nodeName.toLowerCase()&&h(a.dom,b,k.type),1===f.length&&c.unApplyAlign(a,b),k.align&&c.applyAlign(a,b,k.align)}),a.focus()})}var g=function(a,c){var d=a.dom,f={height:d.getStyle(c,"height")||d.getAttrib(c,"height"),scope:d.getAttrib(c,"scope"),"class":d.getAttrib(c,"class")};return f.type=c.parentNode.nodeName.toLowerCase(),b.each("left center right".split(" "),function(b){a.formatter.matchNode(c,"align"+b)&&(f.align=b)}),a.settings.table_row_advtab!==!1&&b.extend(f,e.extractAdvancedStyles(d,c)),f},h=function(a,b,c){var d=a.getParent(b,"table"),e=b.parentNode,f=a.select(c,d)[0];f||(f=a.create(c),d.firstChild?"CAPTION"===d.firstChild.nodeName?a.insertAfter
},t=function(d){var e=c.fromDom(d.anchorNode),g=c.fromDom(d.focusNode);return b.after(e,d.anchorOffset,g,d.focusOffset)?a.some(f.range(c.fromDom(d.anchorNode),d.anchorOffset,c.fromDom(d.focusNode),d.focusOffset)):s(d)},u=function(a,b){var c=g.selectNodeContents(a,b);l(a,c)},v=function(a,b){var d=g.selectNodeContents(a,b);return f.range(c.fromDom(d.startContainer),d.startOffset,c.fromDom(d.endContainer),d.endOffset)},w=function(b){var c=b.getSelection();return c.rangeCount>0?t(c):a.none()},x=function(a){return w(a).map(function(a){return f.exact(a.start(),a.soffset(),a.finish(),a.foffset())})},y=function(a,b){var c=h.asLtrRange(a,b);return g.getFirstRect(c)},z=function(a,b){var c=h.asLtrRange(a,b);return g.getBounds(c)},A=function(a,b,c){return i.fromPoint(a,b,c)},B=function(a,b){var c=h.asLtrRange(a,b);return g.toString(c)},C=function(a){var b=a.getSelection();b.removeAllRanges()},D=function(a,b){var c=h.asLtrRange(a,b);return g.cloneFragment(c)},E=function(a,b,c){var e=h.asLtrRange(a,b),f=d.fromElements(c,a.document);g.replaceWith(e,f)},F=function(a,b){var c=h.asLtrRange(a,b);g.deleteContents(c)};return{setExact:p,getExact:w,get:x,setRelative:q,toNative:r,setToElement:u,clear:C,clone:D,replace:E,deleteAt:F,forElement:v,getFirstRect:y,getBounds:z,getAtPoint:A,findWithin:n,getAsString:B}}),g("1g",["d"],function(a){return a("tinymce.util.VK")}),g("7",["e","g","1b","j","1c","l","n","y","t","1d","1e","1f","1g","z","o"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){var p=function(a,b,d,e){return t(a,b,c.next(d),e)},q=function(a,b,d,e){return t(a,b,c.prev(d),e)},r=function(a,b){var c=k.exact(b,0,b,0);return l.toNative(c)},s=function(b,c){var d=h.descendants(c,"tr");return a.last(d).bind(function(a){return i.descendant(a,"td,th").map(function(a){return r(b,a)})})},t=function(a,c,e,f,g){return e.fold(b.none,b.none,function(b,c){return j.first(c).map(function(b){return r(a,b)})},function(b){return d.table(b,c).bind(function(c){var d=o.noMenu(b);return a.undoManager.transact(function(){f.insertRowsAfter(c,d)}),s(a,c)})})},u=["table","li","dl"],v=function(b,c,h,i){if(b.keyCode===m.TAB){var j=n.getBody(c),k=function(b){var c=g.name(b);return e.eq(b,j)||a.contains(u,c)},l=c.selection.getRng();if(l.collapsed){var o=f.fromDom(l.startContainer);d.cell(o,k).each(function(a){b.preventDefault();var d=b.shiftKey?q:p,e=d(c,k,a,h,i);e.each(function(a){c.selection.setRng(a)})})}}};return{handle:v}}),g("3f",["1k"],function(a){var b=a.immutable("selection","kill");return{response:b}}),g("1j",[],function(){var a=function(a){return function(b){return b===a}},b=a(38),c=a(40),d=function(a){return a>=37&&a<=40};return{ltr:{isBackward:a(37),isForward:a(39)},rtl:{isBackward:a(39),isForward:a(37)},isUp:b,isDown:c,isNavigation:d}});g("4r",["f","l","37","1n"],function(a,b,c,d){var e=function(c,e){var f=d.asLtrRange(c,e);return{start:a.constant(b.fromDom(f.startContainer)),soffset:a.constant(f.startOffset),finish:a.constant(b.fromDom(f.endContainer)),foffset:a.constant(f.endOffset)}},f=function(b,d,e,f){return{start:a.constant(c.on(b,d)),finish:a.constant(c.on(e,f))}};return{convertToRange:e,makeSitus:f}});g("3g",["4r","f","1t","g","l","1e","37","1f"],function(a,b,c,d,e,f,g,h){return function(i){var j=function(a,b){return d.from(i.document.elementFromPoint(a,b)).map(e.fromDom)},k=function(a){return a.dom().getBoundingClientRect()},l=function(a,d,e,g){var j=f.exact(a,d,e,g);return h.getFirstRect(i,j).map(function(a){return c.map(a,b.apply)})},m=function(){return h.get(i).map(function(b){return a.convertToRange(i,b)})},n=function(b){var c=f.relative(b.start(),b.finish());return a.convertToRange(i,c)},o=function(a,c){return h.getAtPoint(i,a,c).map(function(a){return{start:b.constant(g.on(a.start(),a.soffset())),finish:b.constant(g.on(a.finish(),a.foffset()))}})},p=function(){h.clear(i)},q=function(a){h.setToElement(i,a)},r=function(a){h.setExact(i,a.start(),a.soffset(),a.finish(),a.foffset())},s=function(a,b){h.setRelative(i,a,b)},t=function(){return i.innerHeight},u=function(){return i.scrollY},v=function(a,b){i.scrollBy(a,b)};return{elementFromPoint:j,getRect:k,