minor fixes

This commit is contained in:
lexx committed 2023-10-06 22:07:40 +03:00
1 parent 0eaf410090
commit f2faec67fe
4 files changed
+7 -4

No files matched your search

@@ -145,7 +145,7 @@ Required: `+G.join(", "));return tr[Cn].apply(null,Wo)},log:tr=>{console.log(tr,
<source src="`+qe.source+'"'+(qe.sourcemime?' type="'+qe.sourcemime+'"':"")+` />
`+(qe.altsource?'<source src="'+qe.altsource+'"'+(qe.altsourcemime?' type="'+qe.altsourcemime+'"':"")+` />
`:"")+"</video>",Wt=(qe,Ze)=>{var It;const jt=ft.extend({},Ze);if(!jt.source&&(ft.extend(jt,kt((It=jt.embed)!==null&&It!==void 0?It:"",qe.schema)),!jt.source))return"";jt.altsource||(jt.altsource=""),jt.poster||(jt.poster=""),jt.source=qe.convertURL(jt.source,"source"),jt.altsource=qe.convertURL(jt.altsource,"source"),jt.sourcemime=Le(jt.source),jt.altsourcemime=Le(jt.altsource),jt.poster=qe.convertURL(jt.poster,"poster");const co=Yo(jt.source);if(co&&(jt.source=co.url,jt.type=co.type,jt.allowfullscreen=co.allowFullscreen,jt.width=jt.width||String(co.w),jt.height=jt.height||String(co.h)),jt.embed)return ls(jt.embed,jt,!0,qe.schema);{const Bo=ie(qe),qo=oe(qe),Yr=K(qe);return jt.width=jt.width||"300",jt.height=jt.height||"150",ft.each(jt,(st,Uo)=>{jt[Uo]=qe.dom.encode(""+st)}),jt.type==="iframe"?St(jt,Yr):jt.sourcemime==="application/x-shockwave-flash"?Xt(jt):jt.sourcemime.indexOf("audio")!==-1?xt(jt,Bo):Pe(jt,qo)}},mn=qe=>qe.hasAttribute("data-mce-object")||qe.hasAttribute("data-ephox-embed-iri"),yt=qe=>{qe.on("click keyup touchend",()=>{const Ze=qe.selection.getNode();Ze&&qe.dom.hasClass(Ze,"mce-preview-object")&&qe.dom.getAttrib(Ze,"data-mce-selected")&&Ze.setAttribute("data-mce-selected","2")}),qe.on("ObjectResized",Ze=>{const It=Ze.target;if(It.getAttribute("data-mce-object")){let jt=It.getAttribute("data-mce-html");jt&&(jt=unescape(jt),It.setAttribute("data-mce-html",escape(ls(jt,{width:String(Ze.width),height:String(Ze.height)},!1,qe.schema))))}})},Kt={},pn=(qe,Ze,It)=>new Promise((jt,co)=>{const Bo=qo=>(qo.html&&(Kt[qe.source]=qo),jt({url:qe.source,html:qo.html?qo.html:Ze(qe)}));Kt[qe.source]?Bo(Kt[qe.source]):It({url:qe.source},Bo,co)}),ns=(qe,Ze)=>Promise.resolve({html:Ze(qe),url:qe.source}),Xn=qe=>Ze=>Wt(qe,Ze),ds=(qe,Ze)=>{const It=Ee(qe);return It?pn(Ze,Xn(qe),It):ns(Ze,Xn(qe))},Dr=qe=>ee(Kt,qe),Rs=(qe,Ze)=>q(Ze,qe).bind(It=>q(It,"meta")),Js=(qe,Ze,It)=>jt=>{const co=()=>q(qe,jt),Bo=()=>q(Ze,jt),qo=Uo=>q(Uo,"value").bind(Di=>Di.length>0?y.some(Di):y.none()),Yr=()=>co().bind(Uo=>u(Uo)?qo(Uo).orThunk(Bo):Bo().orThunk(()=>y.from(Uo))),st=()=>Bo().orThunk(()=>co().bind(Uo=>u(Uo)?qo(Uo):y.from(Uo)));return{[jt]:(jt===It?Yr():st()).getOr("")}},Zs=(qe,Ze)=>{const It={};return q(qe,"dimensions").each(jt=>{A(["width","height"],co=>{q(Ze,co).orThunk(()=>q(jt,co)).each(Bo=>It[co]=Bo)})}),It},ba=(qe,Ze)=>{const It=Ze&&Ze!=="dimensions"?Rs(Ze,qe).getOr({}):{},jt=Js(qe,It,Ze);return{...jt("source"),...jt("altsource"),...jt("poster"),...jt("embed"),...Zs(qe,It)}},ar=qe=>{const Ze={...qe,source:{value:q(qe,"source").getOr("")},altsource:{value:q(qe,"altsource").getOr("")},poster:{value:q(qe,"poster").getOr("")}};return A(["width","height"],It=>{q(qe,It).each(jt=>{const co=Ze.dimensions||{};co[It]=jt,Ze.dimensions=co})}),Ze},Ns=qe=>Ze=>{const It=Ze&&Ze.msg?"Media embed handler error: "+Ze.msg:"Media embed handler threw unknown error.";qe.notificationManager.open({type:"error",text:It})},Zr=qe=>{const Ze=qe.selection.getNode(),It=mn(Ze)?qe.serializer.serialize(Ze,{selection:!0}):"",jt=kt(It,qe.schema),Bo=(()=>{if(Bs(jt.source,jt.type)){const qo=qe.dom.getRect(Ze);return{width:qo.w.toString().replace(/px$/,""),height:qo.h.toString().replace(/px$/,"")}}else return{}})();return{embed:It,...jt,...Bo}},No=(qe,Ze)=>It=>{if(a(It.url)&&It.url.trim().length>0){const jt=It.html,Bo={...kt(jt,Ze.schema),source:It.url,embed:jt};qe.setData(ar(Bo))}},Mo=(qe,Ze)=>{const It=qe.dom.select("*[data-mce-object]");for(let jt=0;jt<Ze.length;jt++)for(let co=It.length-1;co>=0;co--)Ze[jt]===It[co]&&It.splice(co,1);qe.selection.select(It[0])},Or=(qe,Ze)=>{const It=qe.dom.select("*[data-mce-object]");qe.insertContent(Ze),Mo(qe,It),qe.nodeChanged()},Bs=(qe,Ze)=>g(Ze)&&Ze==="ephox-embed-iri"&&g(Yo(qe)),ea=(qe,Ze)=>((jt,co)=>jt.width!==co.width||jt.height!==co.height)(qe,Ze)&&Bs(Ze.source,qe.type),gs=(qe,Ze,It)=>{var jt;Ze.embed=ea(qe,Ze)&&lt(It)?Wt(It,{...Ze,embed:""}):ls((jt=Ze.embed)!==null&&jt!==void 0?jt:"",Ze,!1,It.schema),Ze.embed&&(qe.source===Ze.source||Dr(Ze.source))?Or(It,Ze.embed):ds(It,Ze).then(co=>{Or(It,co.html)}).catch(Ns(It))},va=qe=>{const Ze=Zr(qe),It=N(Ze),jt=ar(Ze),co=(ca,Qs)=>{const kr=ba(Qs.getData(),"source");ca.source!==kr.source&&(No(Xa,qe)({url:kr.source,html:""}),ds(qe,kr).then(No(Xa,qe)).catch(Ns(qe)))},Bo=ca=>{var Qs;const kr=ba(ca.getData()),qi=kt((Qs=kr.embed)!==null&&Qs!==void 0?Qs:"",qe.schema);ca.setData(ar(qi))},qo=(ca,Qs,kr)=>{const qi=ba(ca.getData(),Qs),fl=ea(kr,qi)&&lt(qe)?{...qi,embed:""}:qi,pc=Wt(qe,fl);ca.setData(ar({...fl,embed:pc}))},Yr=[{name:"source",type:"urlinput",filetype:"media",label:"Source"}],st=lt(qe)?[{type:"sizeinput",name:"dimensions",label:"Constrain proportions",constrain:!0}]:[],Uo={title:"General",name:"general",items:O([Yr,st])},ta={title:"Embed",items:[{type:"textarea",name:"embed",label:"Paste your embed code below:"}]},la=[];ye(qe)&&la.push({name:"altsource",type:"urlinput",filetype:"media",label:"Alternative source URL"}),be(qe)&&la.push({name:"poster",type:"urlinput",filetype: Line truncated
`));return be(xt.split(""),r).length},Ct=(St,Xt)=>{const xt=bt(St,Xt).join("");return gt(xt)},kt=(St,Xt)=>{const xt=bt(St,Xt).join("").replace(/\s/g,"");return gt(xt)},Le=(St,Xt)=>()=>Xt(St.getBody(),St.schema),at=(St,Xt)=>()=>Xt(St.selection.getRng().cloneContents(),St.schema),_n=St=>Le(St,tt),Tt=St=>({body:{getWordCount:_n(St),getCharacterCount:Le(St,Ct),getCharacterCountWithoutSpaces:Le(St,kt)},selection:{getWordCount:at(St,tt),getCharacterCount:at(St,Ct),getCharacterCountWithoutSpaces:at(St,kt)},getCount:_n(St)}),Rn=(St,Xt)=>{St.windowManager.open({title:"Word Count",body:{type:"panel",items:[{type:"table",header:["Count","Document","Selection"],cells:[["Words",String(Xt.body.getWordCount()),String(Xt.selection.getWordCount())],["Characters (no spaces)",String(Xt.body.getCharacterCountWithoutSpaces()),String(Xt.selection.getCharacterCountWithoutSpaces())],["Characters",String(Xt.body.getCharacterCount()),String(Xt.selection.getCharacterCount())]]}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}]})},Ye=(St,Xt)=>{St.addCommand("mceWordCount",()=>Rn(St,Xt))},Mt=(St,Xt)=>{let xt=null;return{cancel:()=>{t(xt)||(clearTimeout(xt),xt=null)},throttle:(...mn)=>{t(xt)&&(xt=setTimeout(()=>{xt=null,St.apply(null,mn)},Xt))}}};var he=tinymce.util.Tools.resolve("tinymce.util.Delay");const ls=(St,Xt)=>{St.dispatch("wordCountUpdate",{wordCount:{words:Xt.body.getWordCount(),characters:Xt.body.getCharacterCount(),charactersWithoutSpaces:Xt.body.getCharacterCountWithoutSpaces()}})},bo=(St,Xt)=>{ls(St,Xt)},ao=(St,Xt,xt)=>{const Pe=Mt(()=>bo(St,Xt),xt);St.on("init",()=>{bo(St,Xt),he.setEditorTimeout(St,()=>{St.on("SetContent BeforeAddUndo Undo Redo ViewUpdate keyup",Pe.throttle)},0),St.on("remove",Pe.cancel)})},xo=St=>{const Xt=()=>St.execCommand("mceWordCount");St.ui.registry.addButton("wordcount",{tooltip:"Word count",icon:"character-count",onAction:Xt}),St.ui.registry.addMenuItem("wordcount",{text:"Word count",icon:"character-count",onAction:Xt})};var Yo=(St=300)=>{s.add("wordcount",Xt=>{const xt=Tt(Xt);return Ye(Xt,xt),xo(Xt),ao(Xt,xt,St),xt})};Yo()})();function U_e(s){let e,t;return{c(){e=fe("div"),t=fe("div"),Z(t,"class","form-control"),Z(e,"class","tox-wrapper")},m(r,a){He(r,e,a),Q(e,t),t.innerHTML=s[0],s[4](t),s[5](e)},p(r,[a]){a&1&&(t.innerHTML=r[0])},i:xn,o:xn,d(r){r&&Fe(e),s[4](null),s[5](null)}}}const j_e="bold italic underline strikethrough removeformat | link | subscript superscript bullist numlist media image codesample table code wordcount blockquote indent outdent blocks";function Z_e(s,e,t){let{value:r=""}=e,{additionalConfig:a={}}=e,u="",f,m,g;const y=["autoresize","code","image","table","codesample","link","lists","media","wordcount"];she(()=>{m&&m.destroy()}),mv(()=>{const O={target:f,toolbar_mode:"sliding",toolbar_sticky:!0,skin:!1,content_css:!1,content_style:W_e.toString(),branding:!1,inline:!1,plugins:y,contextmenu:!1,menubar:!1,statusbar:!1,entity_encoding:"raw",convert_urls:!1,toolbar:j_e,image_caption:!0,relative_urls:!1,browser_spellcheck:!0,max_height:600,setup(N){m=N,N.on("init",function(L){N.setContent(r!=null?r:"")}),N.on("change input undo redo",function(L){u=N.getContent(),u!==r&&t(0,r=u)})}};V_e.init({...O,...a})});function C(O){as[O?"unshift":"push"](()=>{f=O,t(1,f)})}function A(O){as[O?"unshift":"push"](()=>{g=O,t(2,g)})}return s.$$set=O=>{"value"in O&&t(0,r=O.value),"additionalConfig"in O&&t(3,a=O.additionalConfig)},[r,f,g,a,C,A]}class Uhe extends Eo{constructor(e){super(),ko(this,e,Z_e,U_e,So,{value:0,additionalConfig:3})}}function q_e(s){let e,t,r,a;function u(m){s[2](m)}let f={additionalConfig:s[1]};return s[0].value!==void 0&&(f.value=s[0].value),t=new Uhe({props:f}),as.push(()=>Tr(t,"value",u)),{c(){e=fe("div"),rn(t.$$.fragment),Z(e,"class","mb-0")},m(m,g){He(m,e,g),on(t,e,null),a=!0},p(m,[g]){const y={};!r&&g&1&&(r=!0,y.value=m[0].value,Pr(()=>r=!1)),t.$set(y)},i(m){a||(Me(t.$$.fragment,m),a=!0)},o(m){We(t.$$.fragment,m),a=!1},d(m){m&&Fe(e),sn(t)}}}function G_e(s,e,t){let{block:r}=e,a={};function u(f){s.$$.not_equal(r.value,f)&&(r.value=f,t(0,r))}return s.$$set=f=>{"block"in f&&t(0,r=f.block)},[r,a,u]}class K_e extends Eo{constructor(e){super(),ko(this,e,G_e,q_e,So,{block:0})}}function Fle(s,e,t){const r=s.slice();return r[10]=e[t],r}function Hle(s){let e,t;return e=new jV({props:{sortableClass:"row row-cols-3 mt-3",$$slots:{default:[Y_e]},$$scope:{ctx:s}}}),e.$on("update",s[5]),{c(){rn(e.$$.fragment)},m(r,a){on(e,r,a),t=!0},p(r,a){const u={};a&8198&&(u.$$scope={dirty:a,ctx:r}),e.$set(u)},i(r){t||(Me(e.$$.fragment,r),t=!0)},o(r){We(e.$$.fragment,r),t=!1},d(r){sn(e,r)}}}function $le(s,e){let t,r,a,u;return r=new WV({props:{classes:"h-100",schemas:e[1],record:e[10],hasDelete:!0}}),r.$on("remove",e[4]),{key:s,first:null,c(){t=fe("div"),rn(r.$$.fragment),a=Je(),Z(t,"class","col mb-3"),this.first=t},m(f,m){He(f,t,m),on(r,t,null),Q(t,a),u=!0},p(f,m){e=f;const g={};m&2&&(g.schemas=e[1]),m&4&&(g.record=e[10]),r.$set(g)},i(f){u||(Me(r.$$.fragment,f),u=!0)},o(f){We(r.$$.f Line truncated
`));return be(xt.split(""),r).length},Ct=(St,Xt)=>{const xt=bt(St,Xt).join("");return gt(xt)},kt=(St,Xt)=>{const xt=bt(St,Xt).join("").replace(/\s/g,"");return gt(xt)},Le=(St,Xt)=>()=>Xt(St.getBody(),St.schema),at=(St,Xt)=>()=>Xt(St.selection.getRng().cloneContents(),St.schema),_n=St=>Le(St,tt),Tt=St=>({body:{getWordCount:_n(St),getCharacterCount:Le(St,Ct),getCharacterCountWithoutSpaces:Le(St,kt)},selection:{getWordCount:at(St,tt),getCharacterCount:at(St,Ct),getCharacterCountWithoutSpaces:at(St,kt)},getCount:_n(St)}),Rn=(St,Xt)=>{St.windowManager.open({title:"Word Count",body:{type:"panel",items:[{type:"table",header:["Count","Document","Selection"],cells:[["Words",String(Xt.body.getWordCount()),String(Xt.selection.getWordCount())],["Characters (no spaces)",String(Xt.body.getCharacterCountWithoutSpaces()),String(Xt.selection.getCharacterCountWithoutSpaces())],["Characters",String(Xt.body.getCharacterCount()),String(Xt.selection.getCharacterCount())]]}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}]})},Ye=(St,Xt)=>{St.addCommand("mceWordCount",()=>Rn(St,Xt))},Mt=(St,Xt)=>{let xt=null;return{cancel:()=>{t(xt)||(clearTimeout(xt),xt=null)},throttle:(...mn)=>{t(xt)&&(xt=setTimeout(()=>{xt=null,St.apply(null,mn)},Xt))}}};var he=tinymce.util.Tools.resolve("tinymce.util.Delay");const ls=(St,Xt)=>{St.dispatch("wordCountUpdate",{wordCount:{words:Xt.body.getWordCount(),characters:Xt.body.getCharacterCount(),charactersWithoutSpaces:Xt.body.getCharacterCountWithoutSpaces()}})},bo=(St,Xt)=>{ls(St,Xt)},ao=(St,Xt,xt)=>{const Pe=Mt(()=>bo(St,Xt),xt);St.on("init",()=>{bo(St,Xt),he.setEditorTimeout(St,()=>{St.on("SetContent BeforeAddUndo Undo Redo ViewUpdate keyup",Pe.throttle)},0),St.on("remove",Pe.cancel)})},xo=St=>{const Xt=()=>St.execCommand("mceWordCount");St.ui.registry.addButton("wordcount",{tooltip:"Word count",icon:"character-count",onAction:Xt}),St.ui.registry.addMenuItem("wordcount",{text:"Word count",icon:"character-count",onAction:Xt})};var Yo=(St=300)=>{s.add("wordcount",Xt=>{const xt=Tt(Xt);return Ye(Xt,xt),xo(Xt),ao(Xt,xt,St),xt})};Yo()})();function U_e(s){let e,t;return{c(){e=fe("div"),t=fe("div"),Z(t,"class","form-control"),Z(e,"class","tox-wrapper")},m(r,a){He(r,e,a),Q(e,t),t.innerHTML=s[0],s[4](t),s[5](e)},p(r,[a]){a&1&&(t.innerHTML=r[0])},i:xn,o:xn,d(r){r&&Fe(e),s[4](null),s[5](null)}}}const j_e="bold italic underline strikethrough removeformat | link | subscript superscript bullist numlist media image codesample table code wordcount blockquote indent outdent blocks";function Z_e(s,e,t){let{value:r=""}=e,{additionalConfig:a={}}=e,u="",f,m,g;const y=["autoresize","code","image","table","codesample","link","lists","media","wordcount"];she(()=>{m&&m.destroy()}),mv(()=>{const O={target:f,toolbar_mode:"sliding",toolbar_sticky:!0,skin:!1,content_css:!1,content_style:W_e.toString(),branding:!1,inline:!1,plugins:y,contextmenu:!1,menubar:!1,statusbar:!1,entity_encoding:"raw",convert_urls:!1,toolbar:j_e,image_caption:!0,relative_urls:!1,browser_spellcheck:!0,max_height:600,content_style:"img {max-width: 100%;height: auto;",setup(N){m=N,N.on("init",function(L){N.setContent(r!=null?r:"")}),N.on("change input undo redo",function(L){u=N.getContent(),u!==r&&t(0,r=u)})}};V_e.init({...O,...a})});function C(O){as[O?"unshift":"push"](()=>{f=O,t(1,f)})}function A(O){as[O?"unshift":"push"](()=>{g=O,t(2,g)})}return s.$$set=O=>{"value"in O&&t(0,r=O.value),"additionalConfig"in O&&t(3,a=O.additionalConfig)},[r,f,g,a,C,A]}class Uhe extends Eo{constructor(e){super(),ko(this,e,Z_e,U_e,So,{value:0,additionalConfig:3})}}function q_e(s){let e,t,r,a;function u(m){s[2](m)}let f={additionalConfig:s[1]};return s[0].value!==void 0&&(f.value=s[0].value),t=new Uhe({props:f}),as.push(()=>Tr(t,"value",u)),{c(){e=fe("div"),rn(t.$$.fragment),Z(e,"class","mb-0")},m(m,g){He(m,e,g),on(t,e,null),a=!0},p(m,[g]){const y={};!r&&g&1&&(r=!0,y.value=m[0].value,Pr(()=>r=!1)),t.$set(y)},i(m){a||(Me(t.$$.fragment,m),a=!0)},o(m){We(t.$$.fragment,m),a=!1},d(m){m&&Fe(e),sn(t)}}}function G_e(s,e,t){let{block:r}=e,a={};function u(f){s.$$.not_equal(r.value,f)&&(r.value=f,t(0,r))}return s.$$set=f=>{"block"in f&&t(0,r=f.block)},[r,a,u]}class K_e extends Eo{constructor(e){super(),ko(this,e,G_e,q_e,So,{block:0})}}function Fle(s,e,t){const r=s.slice();return r[10]=e[t],r}function Hle(s){let e,t;return e=new jV({props:{sortableClass:"row row-cols-3 mt-3",$$slots:{default:[Y_e]},$$scope:{ctx:s}}}),e.$on("update",s[5]),{c(){rn(e.$$.fragment)},m(r,a){on(e,r,a),t=!0},p(r,a){const u={};a&8198&&(u.$$scope={dirty:a,ctx:r}),e.$set(u)},i(r){t||(Me(e.$$.fragment,r),t=!0)},o(r){We(e.$$.fragment,r),t=!1},d(r){sn(e,r)}}}function $le(s,e){let t,r,a,u;return r=new WV({props:{classes:"h-100",schemas:e[1],record:e[10],hasDelete:!0}}),r.$on("remove",e[4]),{key:s,first:null,c(){t=fe("div"),rn(r.$$.fragment),a=Je(),Z(t,"class","col mb-3"),this.first=t},m(f,m){He(f,t,m),on(r,t,null),Q(t,a),u=!0},p(f,m){e=f;const g={};m&2&&(g.schemas=e[1]),m&4&&(g.record=e[10]),r.$set(g)} Line truncated
<span class='flatpickr-weekday'>
`+Xe.join("</span><span class='flatpickr-weekday'>")+`
</span>
+1 -1
View File
@@ -1,6 +1,6 @@
{
"main.js": {
"file": "assets/main.91253d73.js",
"file": "assets/main.55e6cd6b.js",
"src": "main.js",
"isEntry": true,
"css": [
+4 -2
View File
@@ -67,8 +67,8 @@
browser_spellcheck: true,
max_height: 600,
// media_poster: false,
// content_style:
// "body {font-family: 'Averta Std', sans serif; color: #152F77}",
content_style:
"img {max-width: 100%;height: auto;",
setup: function (editor) {
activeEditor = editor;
@@ -121,4 +121,6 @@
:global(.tox-tinymce) {
border: 1px solid #ced4da;
}
</style>
+1
View File
@@ -25,6 +25,7 @@ class Writer
echo "Path: /$path".PHP_EOL;
}
public function recordIterator(callable $query, callable $parser, int $skip = 0): int
{
$limit = 100;