Files
Testing/html5-chat1/chatadmin/editors/tinymce/plugins/table/plugin.min.min.min.js

1 line
22 KiB
JavaScript
Raw Normal View History

2026-11-17 16:15:01 -05:00
!function(B,G){function q(f,c){for(var g,d=[],a=0;a<f.length;++a){if(g=H[f[a]]||k(f[a]),!g){throw"module definition dependecy not found: "+f[a]}d.push(g)}c.apply(null,d)}function b(d,c,a){if("string"!=typeof d){throw"invalid module definition, module id must be defined and be a string"}if(c===G){throw"invalid module definition, dependencies must be specified"}if(a===G){throw"invalid module definition, definition function must be specified"}q(c,function(){H[d]=a.apply(null,arguments)})}function x(a){return!!H[a]}function k(c){for(var e=B,d=c.split(/[.\/]/),a=0;a<d.length;++a){if(!e[d[a]]){return}e=e[d[a]]}return e}function E(h){for(var f=0;f<h.length;f++){for(var e=B,g=h[f],d=g.split(/[.\/]/),c=0;c<d.length-1;++c){e[d[c]]===G&&(e[d[c]]={}),e=e[d[c]]}e[d[d.length-1]]=H[g]}}var H={},w="tinymce/tableplugin/TableGrid",D="tinymce/util/Tools",C="tinymce/Env",F="tinymce/tableplugin/Quirks",A="tinymce/util/VK",j="tinymce/tableplugin/CellSelection",v="tinymce/dom/TreeWalker",y="tinymce/tableplugin/Plugin",z="tinymce/PluginManager";b(w,[D,C],function(d,a){function f(h,g){return parseInt(h.getAttribute(g)||1,10)}var c=d.each;return function(ag,ac){function an(){var g=0;r=[],c(["thead","tbody","tfoot"],function(l){var h=O.select("> "+l+" tr",ac);c(h,function(m,p){p+=g,c(O.select("> td, > th",m),function(R,P){var M,u,N,o;if(r[p]){for(;r[p][P];){P++}}for(N=f(R,"rowspan"),o=f(R,"colspan"),u=p;p+N>u;u++){for(r[u]||(r[u]=[]),M=P;P+o>M;M++){r[u][M]={part:l,real:u==p&&M==P,elm:R,rowspan:N,colspan:o}}}})}),g+=h.length})}function X(h,g){return h=h.cloneNode(g),h.removeAttribute("id"),h}function ae(h,g){var i;return i=r[g],i?i[h]:void 0}function al(h,g,i){h&&(i=parseInt(i,10),1===i?h.removeAttribute(g,1):h.setAttribute(g,i,1))}function ak(g){return g&&(O.hasClass(g.elm,"mce-item-selected")||g==t)}function V(){var g=[];return c(ac.rows,function(h){c(h.cells,function(i){return O.hasClass(i,"mce-item-selected")||i==t.elm?(g.push(h),!1):void 0})}),g}function aj(){var g=O.createRng();g.setStartAfter(ac),g.setEndAfter(ac),J.setRng(g),O.remove(ac)}function ab(i){var h,g={};return ag.settings.table_clone_elements!==!1&&(g=d.makeMap((ag.settings.table_clone_elements||"strong em b i span font h1 h2 h3 h4 h5 h6 p div").toUpperCase(),/[ ,]/)),d.walk(i,function(m){var l;return 3==m.nodeType?(c(O.getParents(m.parentNode,null,i).reverse(),function(o){g[o.nodeName]&&(o=X(o,!1),h?l&&l.appendChild(o):h=l=o,l=o)}),l&&(l.innerHTML=a.ie?" ":'<br data-mce-bogus="1" />'),!1):void 0},"childNodes"),i=X(i,!1),al(i,"rowSpan",1),al(i,"colSpan",1),h?i.appendChild(h):a.ie||(i.innerHTML='<br data-mce-bogus="1" />'),i}function ad(){var h=O.createRng(),g;return c(O.select("tr",ac),function(i){0===i.cells.length&&O.remove(i)}),0===O.select("tr",ac).length?(h.setStartBefore(ac),h.setEndBefore(ac),J.setRng(h),O.remove(ac),void 0):(c(O.select("thead,tbody,tfoot",ac),function(i){0===i.rows.length&&O.remove(i)}),an(),g=r[Math.min(r.length-1,aa.y)],g&&(J.select(g[Math.min(g.length-1,aa.x)].elm,!0),J.collapse(!0)),void 0)}function ah(M,P,m,g){var u,h,N,R,p;for(u=r[P][M].elm.parentNode,N=1;m>=N;N++){if(u=O.getNext(u,"tr")){for(h=M;h>=0;h--){if(p=r[P+N][h].elm,p.parentNode==u){for(R=1;g>=R;R++){O.insertAfter(ab(p),p)}break}}if(-1==h){for(R=1;g>=R;R++){u.insertBefore(ab(u.cells[0]),u.cells[0])}}}}}function ai(){c(r,function(h,g){c(h,function(s,p){var m,u,l;if(ak(s)&&(s=s.elm,m=f(s,"colspan"),u=f(s,"rowspan"),m>1||u>1)){for(al(s,"rowSpan",1),al(s,"colSpan",1),l=0;m-1>l;l++){O.insertAfter(ab(s),s)}ah(p,g,u-1,m)}})})}function U(at,M,N){var m,au,ar,R,l,P,aq,T,S,g,ap;if(at?(m=n(at),au=m.x,ar=m.y,R=au+(M-1),l=ar+(N-1)):(aa=Z=null,c(r,function(i,h){c(i,function(o,p){ak(o)&&(aa||(aa={x:p,y:h}),Z={x:p,y:h})})}),au=aa.x,ar=aa.y,R=Z.x,l=Z.y),T=ae(au,ar),S=ae(R,l),T&&S&&T.part==S.part){for(ai(),an(),T=ae(au,ar).elm,al(T,"colSpan",R-au+1),al(T,"rowSpan",l-ar+1),aq=ar;l>=aq;aq++){for(P=au;R>=P;P++){r[aq]&&r[aq][P]&&(at=r[aq][P].elm,at!=T&&(g=d.grep(at.childNodes),c(g,function(h){T.appendChild(h)}),g.length&&(g=d.grep(T.childNodes),ap=0,c(g,function(h){"BR"==h.nodeName&&O.getAttrib(h,"data-mce-bogus