keycloak-d4science-spi-parent/keycloak-d4science-theme/src/main/resources/theme/d4science/account/resources/assets/Trans-T3xmFvQM.js

3 lines
7.4 KiB
JavaScript
Raw Normal View History

import{createElement as N,isValidElement as P,Fragment as z,cloneElement as M,Children as J,useContext as U}from"react";import{ai as X,av as Y,aw as Z,ax as D,ay as B,az as q}from"./index-Bw6oJPms.js";var G={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};const Q=X(G);var _=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function V(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(Q[n[1]]||e.charAt(e.length-2)==="/")&&(t.voidElement=!0),t.name.startsWith("!--"))){var o=e.indexOf("-->");return{type:"comment",comment:o!==-1?e.slice(4,o):""}}for(var f=new RegExp(_),s=null;(s=f.exec(e))!==null;)if(s[0].trim())if(s[1]){var l=s[1].trim(),p=[l,""];l.indexOf("=")>-1&&(p=l.split("=")),t.attrs[p[0]]=p[1],f.lastIndex--}else s[2]&&(t.attrs[s[2]]=s[3].trim().substring(1,s[3].length-1));return t}var R=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,ee=/^\s*$/,te=Object.create(null);function I(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(n){var o=[];for(var f in n)o.push(f+'="'+n[f]+'"');return o.length?" "+o.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(I,"")+"</"+t.name+">";case"comment":return e+"<!--"+t.comment+"-->"}}var ne={parse:function(e,t){t||(t={}),t.components||(t.components=te);var n,o=[],f=[],s=-1,l=!1;if(e.indexOf("<")!==0){var p=e.indexOf("<");o.push({type:"text",content:p===-1?e:e.substring(0,p)})}return e.replace(R,function(m,u){if(l){if(m!=="</"+n.name+">")return;l=!1}var v,j=m.charAt(1)!=="/",A=m.startsWith("<!--"),b=u+m.length,x=e.charAt(b);if(A){var y=V(m);return s<0?(o.push(y),o):((v=f[s]).children.push(y),o)}if(j&&(s++,(n=V(m)).type==="tag"&&t.components[n.name]&&(n.type="component",l=!0),n.voidElement||l||!x||x==="<"||n.children.push({type:"text",content:e.slice(b,e.indexOf("<",b))}),s===0&&o.push(n),(v=f[s-1])&&v.children.push(n),f[s]=n),(!j||n.voidElement)&&(s>-1&&(n.voidElement||n.name===m.slice(2,-1))&&(s--,n=s===-1?o:f[s]),!l&&x!=="<"&&x)){v=s===-1?o:f[s].children;var c=e.indexOf("<",b),i=e.slice(b,c===-1?void 0:c);ee.test(i)&&(i=" "),(c>-1&&s+v.length>=0||i!==" ")&&v.push({type:"text",content:i})}}),o},stringify:function(e){return e.reduce(function(t,n){return t+I("",n)},"")}};function H(e,t){if(!e)return!1;const n=e.props?e.props.children:e.children;return t?n.length>0:!!n}function S(e){if(!e)return[];const t=e.props?e.props.children:e.children;return e.props&&e.props.i18nIsDynamicList?F(t):t}function se(e){return Object.prototype.toString.call(e)!=="[object Array]"?!1:e.every(t=>P(t))}function F(e){return Array.isArray(e)?e:[e]}function re(e,t){const n={...t};return n.props=Object.assign(e.props,t.props),n}function L(e,t){if(!e)return"";let n="";const o=F(e),f=t.transSupportBasicHtmlNodes&&t.transKeepBasicHtmlNodesFor?t.transKeepBasicHtmlNodesFor:[];return o.forEach((s,l)=>{if(typeof s=="string")n+=`${s}`;else if(P(s)){const p=Object.keys(s.props).length,m=f.indexOf(s.type)>-1,u=s.props.children;if(!u&&m&&p===0)n+=`<${s.type}/>`;else if(!u&&(!m||p!==0))n+=`<${l}></${l}>`;else if(s.props.i18nIsDynamicList)n+=`<${l}></${l}>`;else if(m&&p===1&&typeof u=="string")n+=`<${s.type}>${u}</${s.type}>`;else{const v=L(u,t);n+=`<${l}>${v}</${l}>`}}else if(s===null)D("Trans: the passed in value is invalid - seems you passed in a null child.");else if(typeof s=="object"){const{format:p,...m}=s,u=Object.keys(m);if(u.length===1){const v=p?`${u[0]}, ${p}`:u[0];n+=`{{${v}}}`}else D("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",s)}else D("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",s)}),n}function ae(e,t,n,o,f,s){if(t==="")return[];const l=o.transKeepBasicHtmlNodesFor||[],p=t&&new RegExp(l.map(c=>`<${c}`).join("|")).test(t);if(!e&&!p&&!s)return[t];const m={};function u(c){F
//# sourceMappingURL=Trans-T3xmFvQM.js.map