fix bug Zusammenstellung remove nicht_in_orientierung=1

This commit is contained in:
salam committed 2026-07-03 06:33:36 +02:00
1 parent 0c9d2858b0
commit b8869d6202
12 files changed
+326 -252

No files matched your search

@@ -11,7 +11,7 @@ var Zp=Object.defineProperty;var to=(t,e)=>{for(var n in e)Zp(t,n,{get:e[n],enum
`,textSerializers:s={}}=n||{},l="";return t.nodesBetween(r,o,(a,c,d,u)=>{var f;a.isBlock&&c>r&&(l+=i);let h=s?.[a.type.name];if(h)return d&&(l+=h({node:a,pos:c,parent:d,index:u,range:e})),!1;a.isText&&(l+=(f=a?.text)==null?void 0:f.slice(Math.max(r,c)-c,o-c))}),l}function Bl(t,e){let n={from:0,to:t.content.size};return Ll(t,n,e)}function Vo(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}function Nb(t,e,n){let{blockSeparator:r=`
`,textSerializers:o={}}=n||{},i=_o(e),s=ne.fromJSON(i,t);return Bl(s,{blockSeparator:r,textSerializers:{...Vo(i),...o}})}function Lu(t,e){let n=oe(e,t.schema),{from:r,to:o}=t.selection,i=[];t.doc.nodesBetween(r,o,l=>{i.push(l)});let s=i.reverse().find(l=>l.type.name===n.name);return s?{...s.attrs}:{}}function Wo(t,e){let n=Or(typeof e=="string"?e:e.name,t.schema);return n==="node"?Lu(t,e):n==="mark"?Ol(t,e):{}}function Bu(t,e=JSON.stringify){let n={};return t.filter(r=>{let o=e(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function Ob(t){let e=Bu(t);return e.length===1?e:e.filter((n,r)=>!e.filter((i,s)=>s!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function jo(t){let{mapping:e,steps:n}=t,r=[];return e.maps.forEach((o,i)=>{let s=[];if(o.ranges.length)o.forEach((l,a)=>{s.push({from:l,to:a})});else{let{from:l,to:a}=n[i];if(l===void 0||a===void 0)return;s.push({from:l,to:a})}s.forEach(({from:l,to:a})=>{let c=e.slice(i).map(l,-1),d=e.slice(i).map(a),u=e.invert().map(c,-1),f=e.invert().map(d);r.push({oldRange:{from:u,to:f},newRange:{from:c,to:d}})})}),Ob(r)}function zu(t,e=0){let r=t.type===t.type.schema.topNodeType?0:1,o=e,i=o+t.nodeSize,s=t.marks.map(c=>{let d={type:c.type.name};return Object.keys(c.attrs).length&&(d.attrs={...c.attrs}),d}),l={...t.attrs},a={type:t.type.name,from:o,to:i};return Object.keys(l).length&&(a.attrs=l),s.length&&(a.marks=s),t.content.childCount&&(a.content=[],t.forEach((c,d)=>{var u;(u=a.content)==null||u.push(zu(c,e+d+r))})),t.text&&(a.text=t.text),a}function Dr(t,e,n){let r=[];return t===e?n.resolve(t).marks().forEach(o=>{let i=n.resolve(t),s=Bo(i,o.type);s&&r.push({mark:o,...s})}):n.nodesBetween(t,e,(o,i)=>{!o||o?.nodeSize===void 0||r.push(...o.marks.map(s=>({from:i,to:i+o.nodeSize,mark:s})))}),r}var zl=(t,e,n,r=20)=>{let o=t.doc.resolve(n),i=r,s=null;for(;i>0&&s===null;){let l=o.node(i);l?.type.name===e?s=l:i-=1}return[s,i]};function Pn(t,e){return e.nodes[t]||e.marks[t]||null}function Mr(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{let o=t.find(i=>i.type===e&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}var Hu=(t,e=500)=>{let n="",r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(o,i,s,l)=>{var a,c;let d=((c=(a=o.type.spec).toText)==null?void 0:c.call(a,{node:o,pos:i,parent:s,index:l}))||o.textContent||"%leaf%";n+=o.isAtom&&!o.isText?d:d.slice(0,Math.max(0,r-i))}),n};function Po(t,e,n={}){let{empty:r,ranges:o}=t.selection,i=e?rt(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(u=>i?i.name===u.type.name:!0).find(u=>Tr(u.attrs,n,{strict:!1}));let s=0,l=[];if(o.forEach(({$from:u,$to:f})=>{let h=u.pos,p=f.pos;t.doc.nodesBetween(h,p,(m,g)=>{if(i&&m.inlineContent&&!m.type.allowsMarkType(i))return!1;if(!m.isText&&!m.marks.length)return;let y=Math.max(h,g),w=Math.min(p,g+m.nodeSize),b=w-y;s+=b,l.push(...m.marks.map(x=>({mark:x,from:y,to:w})))})}),s===0)return!1;let a=l.filter(u=>i?i.name===u.mark.type.name:!0).filter(u=>Tr(u.mark.attrs,n,{strict:!1})).reduce((u,f)=>u+f.to-f.from,0),c=l.filter(u=>i?u.mark.type!==i&&u.mark.type.excludes(i):!0).reduce((u,f)=>u+f.to-f.from,0);return(a>0?a+c:a)>=s}function Uo(t,e,n={}){if(!e)return qe(t,null,n)||Po(t,null,n);let r=Or(e,t.schema);return r==="node"?qe(t,e,n):r==="mark"?Po(t,e,n):!1}var Hl=(t,e)=>{let{$from:n,$to:r,$anchor:o}=t.selection;if(e){let i=Je(l=>l.type.name===e)(t.selection);if(!i)return!1;let s=t.doc.resolve(i.pos+1);return o.pos+1===s.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},$l=t=>{let{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function Ml(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function Do(t,e){let{nodeExtensions:n}=rn(e),r=n.find(s=>s.name===t);if(!r)return!1;let o={name:r.name,options:r.options,storage:r.storage},i=J($(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function ln(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;if(t.isText)return!/\S/.test((r=t.text)!=null?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let o=!0;return t.content.forEach(i=>{o!==!1&&(ln(i,{ignoreWhitespace:n,checkChildren:e})||(o=!1))}),o}return!1}function Ir(t){return t instanceof L}function Rb({selection:t,pos:e,nodeSize:n,selectedOnTextSelection:r=!1}){let{from:o,to:i}=t;return!!(o<=e&&i>=e+n||r&&Hn(t)&&o>e&&i<e+n)}var Fl=class $u{constructor(e){this.position=e}static fromJSON(e){return new $u(e.position)}toJSON(){return{position:this.position}}};function Fu(t,e){let n=e.mapping.mapResult(t.position);return{position:new Fl(n.pos),mapResult:n}}function _u(t){return new Fl(t)}function _l(t,e,n){let o=t.state.doc.content.size,i=nt(e,0,o),s=nt(n,0,o),l=t.coordsAtPos(i),a=t.coordsAtPos(s,-1),c=Math.min(l.top,a.top),d=Math.max(l.bottom,a.bottom) Line truncated
`,textSerializers:o={}}=n||{},i=_o(e),s=ne.fromJSON(i,t);return Bl(s,{blockSeparator:r,textSerializers:{...Vo(i),...o}})}function Lu(t,e){let n=oe(e,t.schema),{from:r,to:o}=t.selection,i=[];t.doc.nodesBetween(r,o,l=>{i.push(l)});let s=i.reverse().find(l=>l.type.name===n.name);return s?{...s.attrs}:{}}function Wo(t,e){let n=Or(typeof e=="string"?e:e.name,t.schema);return n==="node"?Lu(t,e):n==="mark"?Ol(t,e):{}}function Bu(t,e=JSON.stringify){let n={};return t.filter(r=>{let o=e(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function Ob(t){let e=Bu(t);return e.length===1?e:e.filter((n,r)=>!e.filter((i,s)=>s!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function jo(t){let{mapping:e,steps:n}=t,r=[];return e.maps.forEach((o,i)=>{let s=[];if(o.ranges.length)o.forEach((l,a)=>{s.push({from:l,to:a})});else{let{from:l,to:a}=n[i];if(l===void 0||a===void 0)return;s.push({from:l,to:a})}s.forEach(({from:l,to:a})=>{let c=e.slice(i).map(l,-1),d=e.slice(i).map(a),u=e.invert().map(c,-1),f=e.invert().map(d);r.push({oldRange:{from:u,to:f},newRange:{from:c,to:d}})})}),Ob(r)}function zu(t,e=0){let r=t.type===t.type.schema.topNodeType?0:1,o=e,i=o+t.nodeSize,s=t.marks.map(c=>{let d={type:c.type.name};return Object.keys(c.attrs).length&&(d.attrs={...c.attrs}),d}),l={...t.attrs},a={type:t.type.name,from:o,to:i};return Object.keys(l).length&&(a.attrs=l),s.length&&(a.marks=s),t.content.childCount&&(a.content=[],t.forEach((c,d)=>{var u;(u=a.content)==null||u.push(zu(c,e+d+r))})),t.text&&(a.text=t.text),a}function Dr(t,e,n){let r=[];return t===e?n.resolve(t).marks().forEach(o=>{let i=n.resolve(t),s=Bo(i,o.type);s&&r.push({mark:o,...s})}):n.nodesBetween(t,e,(o,i)=>{!o||o?.nodeSize===void 0||r.push(...o.marks.map(s=>({from:i,to:i+o.nodeSize,mark:s})))}),r}var zl=(t,e,n,r=20)=>{let o=t.doc.resolve(n),i=r,s=null;for(;i>0&&s===null;){let l=o.node(i);l?.type.name===e?s=l:i-=1}return[s,i]};function Pn(t,e){return e.nodes[t]||e.marks[t]||null}function Mr(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{let o=t.find(i=>i.type===e&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}var Hu=(t,e=500)=>{let n="",r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(o,i,s,l)=>{var a,c;let d=((c=(a=o.type.spec).toText)==null?void 0:c.call(a,{node:o,pos:i,parent:s,index:l}))||o.textContent||"%leaf%";n+=o.isAtom&&!o.isText?d:d.slice(0,Math.max(0,r-i))}),n};function Po(t,e,n={}){let{empty:r,ranges:o}=t.selection,i=e?rt(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(u=>i?i.name===u.type.name:!0).find(u=>Tr(u.attrs,n,{strict:!1}));let s=0,l=[];if(o.forEach(({$from:u,$to:f})=>{let h=u.pos,p=f.pos;t.doc.nodesBetween(h,p,(m,g)=>{if(i&&m.inlineContent&&!m.type.allowsMarkType(i))return!1;if(!m.isText&&!m.marks.length)return;let y=Math.max(h,g),w=Math.min(p,g+m.nodeSize),b=w-y;s+=b,l.push(...m.marks.map(x=>({mark:x,from:y,to:w})))})}),s===0)return!1;let a=l.filter(u=>i?i.name===u.mark.type.name:!0).filter(u=>Tr(u.mark.attrs,n,{strict:!1})).reduce((u,f)=>u+f.to-f.from,0),c=l.filter(u=>i?u.mark.type!==i&&u.mark.type.excludes(i):!0).reduce((u,f)=>u+f.to-f.from,0);return(a>0?a+c:a)>=s}function Uo(t,e,n={}){if(!e)return qe(t,null,n)||Po(t,null,n);let r=Or(e,t.schema);return r==="node"?qe(t,e,n):r==="mark"?Po(t,e,n):!1}var Hl=(t,e)=>{let{$from:n,$to:r,$anchor:o}=t.selection;if(e){let i=Je(l=>l.type.name===e)(t.selection);if(!i)return!1;let s=t.doc.resolve(i.pos+1);return o.pos+1===s.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},$l=t=>{let{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function Ml(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function Do(t,e){let{nodeExtensions:n}=rn(e),r=n.find(s=>s.name===t);if(!r)return!1;let o={name:r.name,options:r.options,storage:r.storage},i=J($(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function ln(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;if(t.isText)return!/\S/.test((r=t.text)!=null?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let o=!0;return t.content.forEach(i=>{o!==!1&&(ln(i,{ignoreWhitespace:n,checkChildren:e})||(o=!1))}),o}return!1}function Ir(t){return t instanceof L}function Rb({selection:t,pos:e,nodeSize:n,selectedOnTextSelection:r=!1}){let{from:o,to:i}=t;return!!(o<=e&&i>=e+n||r&&Hn(t)&&o>e&&i<e+n)}var Fl=class $u{constructor(e){this.position=e}static fromJSON(e){return new $u(e.position)}toJSON(){return{position:this.position}}};function Fu(t,e){let n=e.mapping.mapResult(t.position);return{position:new Fl(n.pos),mapResult:n}}function _u(t){return new Fl(t)}function _l(t,e,n){let o=t.state.doc.content.size,i=nt(e,0,o),s=nt(n,0,o),l=t.coordsAtPos(i),a=t.coordsAtPos(s,-1),c=Math.min(l.top,a.top),d=Math.max(l.bottom,a.bottom) Line truncated
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function r0(t){return Object.prototype.toString.call(t).slice(8,-1)}function Cr(t){return r0(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function Vl(t,e){let n={...t};return Cr(t)&&Cr(e)&&Object.keys(e).forEach(r=>{Cr(e[r])&&Cr(t[r])?n[r]=Vl(t[r],e[r]):n[r]=e[r]}),n}var Ko=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...J($(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...J($(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(t={}){let e=this.extend({...this.config,addOptions:()=>Vl(this.options,t)});return e.name=this.name,e.parent=this.parent,this.child=null,e}extend(t={}){let e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},te=class ju extends Ko{constructor(){super(...arguments),this.type="mark"}static create(e={}){let n=typeof e=="function"?e():e;return new ju(n)}static handleExit({editor:e,mark:n}){let{tr:r}=e.state,o=e.state.selection.$from;if(o.pos===o.end()){let s=o.marks();if(!!!s.find(c=>c?.type.name===n.name))return!1;let a=s.find(c=>c?.type.name===n.name);return a&&r.removeStoredMark(a),r.insertText(" ",o.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){let n=typeof e=="function"?e():e;return super.extend(n)}};function Uu(t){return typeof t=="number"}var qo=class{constructor(t){this.find=t.find,this.handler=t.handler}},o0=(t,e,n)=>{if(Lo(e))return[...t.matchAll(e)];let r=e(t,n);return r?r.map(o=>{let i=[o.text];return i.index=o.index,i.input=t,i.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(o.replaceWith)),i}):[]};function i0(t){let{editor:e,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:l}=t,{commands:a,chain:c,can:d}=new Nr({editor:e,state:n}),u=[];return n.doc.nodesBetween(r,o,(h,p)=>{var m,g,y,w,b;if((g=(m=h.type)==null?void 0:m.spec)!=null&&g.code||!(h.isText||h.isTextblock||h.isInline))return;let x=(b=(w=(y=h.content)==null?void 0:y.size)!=null?w:h.nodeSize)!=null?b:0,k=Math.max(r,p),M=Math.min(o,p+x);if(k>=M)return;let S=h.isText?h.text||"":h.textBetween(k-p,M-p,void 0,"\uFFFC");o0(S,i.find,s).forEach(A=>{if(A.index===void 0)return;let v=k+A.index+1,R=v+A[0].length,j={from:n.tr.mapping.map(v),to:n.tr.mapping.map(R)},D=i.handler({state:n,range:j,match:A,commands:a,chain:c,can:d,pasteEvent:s,dropEvent:l});u.push(D)})}),u.every(h=>h!==null)}var Ro=null,s0=t=>{var e;let n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)==null||e.setData("text/html",t),n};function Ku(t){let{editor:e,rules:n}=t,r=null,o=!1,i=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,l;try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}let a=({state:d,from:u,to:f,rule:h,pasteEvt:p})=>{let m=d.tr,g=Er({state:d,transaction:m});if(!(!i0({editor:e,state:g,from:Math.max(u-1,0),to:f.b-1,rule:h,pasteEvent:p,dropEvent:l})||!m.steps.length)){try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m}};return n.map(d=>new B({view(u){let f=p=>{var m;r=(m=u.dom.parentElement)!=null&&m.contains(p.target)?u.dom.parentElement:null,r&&(Ro=e)},h=()=>{Ro&&(Ro=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",h),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",h)}}},props:{handleDOMEvents:{drop:(u,f)=>{if(i=r===u.dom.parentElement,l=f,!i){let h=Ro;h?.isEditable&&setTimeout(()=>{let p=h.state.selection;p&&h.commands.deleteRange({from:p.from,to:p.to})},10)}return!1},paste:(u,f)=>{var h;let p=(h=f.clipboardData)==null?void 0:h.getData("text/html");return s=f,o=!!p?.includes("data-pm-slice"),!1}}},appendTransaction:(u,f,h)=>{let p=u[0],m=p.getMeta("uiEvent")==="paste"&&!o,g=p.getMeta("uiEvent")==="drop"&&!i,y=p.getMeta("applyPasteRules"),w=!!y;if(!m&&!g&&!w)return;if(w){let{text:k}=y;typeof k=="string"?k=k:k=Rr(C.from(k),h.schema);let{from:M}=y,S=M+k.length,P=s0(k);return a({rule:d,state:h,from:M,to:{b:S},pasteEvt:P})}let b=f.doc.content.findDiffStart(h.doc.content),x=f.doc.content.findDiffEnd(h.doc.content);if(!(!Uu(b)||!x||b===x.b))return a({rule:d,state:h,from:b,to:x,pasteEvt:s})}}))}var Jo=class{constructor(t,e){this.splittableMarks=[],this.editor=e,this.baseExtensions=t,this.extensions=Fo(t),this.schema=Pl(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{let n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:Pn(e.name,this.schema)},r=$(e,"addCommands",n);return r?{...t,...r()}:t},{})}get plugins(){let{edito Line truncated
position: relative;
}