1class Controls{el=wp.element.createElement;components=wp.components;data=wp.data;i18n=wp.i18n;timeout=null;constructor(buildUI,state={}){let compose=wp.compose;const{withState}=compose;const{withSelect,withDispatch}=wp.data;return compose.compose(withDispatch(this.dispatchMeta.bind(this)),withSelect(this.updateSelect.bind(this)),withState(state))(buildUI.bind(this));} 2dispatchMeta(dispatch,props){return{setMetaValue:(metaValue)=>{const userData=this.data.select('core').getCurrentUser();const user=this.data.select('core').getEntityRecord('root','user',userData.id);let meta={[props.metaKey]:metaValue,};dispatch('core').saveUser({id:user.id,meta:{...user.meta,...meta},});},};} 3debounce(func,wait=1000){return(...args)=>{const later=()=>{clearTimeout(this.timeout);func(...args);};clearTimeout(this.timeout);this.timeout=setTimeout(later,wait);};} 4updateSelect(select,props){const userData=this.data.select('core').getCurrentUser();if(Object.keys(userData).length==0)return{};const user=select('core').getEntityRecord('root','user',userData.id);if(user===undefined){return{};} 5return{metaValue:user.meta[props.metaKey],};}}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.